nix-config/flake.nix

77 lines
2.1 KiB
Nix

{
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
nixpkgs-stable.url = "nixpkgs/nixos-23.05";
home-manager = {
url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixpkgs";
};
impermanence.url = "github:nix-community/impermanence";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
agenix = {
url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{ self
, nixpkgs
, nixpkgs-stable
, nixos-hardware
, home-manager
, impermanence
, agenix
, ...
}@inputs:
let
inherit (self) outputs;
in
rec {
overlays = import ./overlays { inherit inputs; };
nixosModules = import ./modules/nixos;
homeManagerModules = import ./modules/home-manager;
secrets = import ./secrets;
stablePkgs = nixpkgs-stable.legacyPackages."x86_64-linux";
nixosConfigurations = {
trantor = nixpkgs.lib.nixosSystem {
modules = [
./hosts/trantor
home-manager.nixosModules.home-manager
impermanence.nixosModules.impermanence
agenix.nixosModules.default
];
};
capibara = nixpkgs.lib.nixosSystem {
specialArgs = { inherit stablePkgs impermanence inputs outputs; };
modules = [
./hosts/capibara
nixos-hardware.nixosModules.lenovo-thinkpad-x230
home-manager.nixosModules.home-manager
impermanence.nixosModules.impermanence
agenix.nixosModules.default
];
};
};
homeConfigurations = {
"rilla@echidna" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = { inherit inputs outputs; };
modules = [ ./hosts/echidna/home.nix ];
};
"ricard@coder-workspace" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = { inherit inputs outputs; };
modules = [ ./hosts/coder-workspace/home.nix ];
};
};
};
}