summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix26
1 files changed, 20 insertions, 6 deletions
diff --git a/flake.nix b/flake.nix
index 8c63e01..30bd680 100644
--- a/flake.nix
+++ b/flake.nix
@@ -8,14 +8,20 @@
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
+
+ home-manager = {
+ url = "github:nix-community/home-manager";
+ inputs.nixpkgs.follows = "nixpkgs";
+ };
};
- outputs = { self, nixpkgs, sops-nix }: let
+ outputs = { self, nixpkgs, sops-nix, home-manager }: let
lib = nixpkgs.lib;
- makeHost = host: system: lib.nixosSystem {
+ makeNixos = host: system: lib.nixosSystem {
inherit system;
modules = [
+ ./userdata.nix
{ networking.hostName = host; }
./nixos/${host}/configuration.nix
@@ -23,12 +29,20 @@
];
};
- makeX86 = hosts: lib.genAttrs hosts (
- host: makeHost host "x86_64-linux"
- );
+ makeHome = useType: system: home-manager.lib.homeManagerConfiguration {
+ pkgs = nixpkgs.legacyPackages.${system};
+ modules = [
+ ./userdata.nix
+ ./home-manager/${useType}/home.nix
+ ];
+ };
in
{
nixosConfigurations =
- makeX86 [ "cez" "kay" "lia" "fscusat" "dspace" ];
+ lib.genAttrs [ "cez" "kay" "lia" "fscusat" "dspace" ]
+ (host: makeNixos host "x86_64-linux");
+ homeConfigurations =
+ lib.genAttrs [ "common" ]
+ (host: makeHome host "x86_64-linux");
};
}