flake.nix: Refactor common modules

This commit is contained in:
Florian RICHER 2024-04-08 00:06:14 +02:00
parent 3b184178cb
commit 35fc9a7c61

View file

@ -18,36 +18,30 @@
home-manager, home-manager,
nix-flatpak, nix-flatpak,
... ...
}: { }:
let
common-modules = [
home-manager.nixosModules.home-manager
(import ./home/common-home-manager.nix { inherit inputs; })
];
in {
nixosConfigurations = { nixosConfigurations = {
nixos-test = nixpkgs.lib.nixosSystem { nixos-test = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [ ./hosts/nixos-test ] ++ common-modules;
./hosts/nixos-test
home-manager.nixosModules.home-manager
(import ./home/common-home-manager.nix { inherit inputs; })
];
}; };
perso-laptop = nixpkgs.lib.nixosSystem { perso-laptop = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [ ./hosts/perso-laptop ] ++ common-modules;
./hosts/perso-laptop
home-manager.nixosModules.home-manager
(import ./home/common-home-manager.nix { inherit inputs; })
];
}; };
perso-desktop = nixpkgs.lib.nixosSystem { perso-desktop = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [ ./hosts/perso-desktop ] ++ common-modules;
./hosts/perso-desktop
home-manager.nixosModules.home-manager
(import ./home/common-home-manager.nix { inherit inputs; })
];
}; };
}; };
}; };