refactor flake

This commit is contained in:
Anthony Rodriguez 2024-08-25 23:53:48 +02:00
parent 0ec0ecec20
commit 37d398fd80
Signed by: nezia
GPG key ID: EE3BE97C040A86CE

View file

@ -37,25 +37,17 @@
} }
{ _module.args = { inherit hostname username; }; } { _module.args = { inherit hostname username; }; }
]; ];
configureSystem = hostname: homeConfig: nixpkgs.lib.nixosSystem {
system = system;
modules = commonModules hostname ++ [
{ home-manager.users.${username} = import homeConfig; }
];
};
in { in {
nixosConfigurations = { nixosConfigurations = {
vamos = vamos = configureSystem "vamos" ./home/laptop;
let hostname = "vamos"; solaire = configureSystem "solaire" ./home/desktop;
in nixpkgs.lib.nixosSystem {
system = system;
modules = commonModules hostname ++ [
{ home-manager.users.nezia = import ./home/laptop; }
];
};
solaire = let
hostname = "solaire";
in nixpkgs.lib.nixosSystem {
system = system;
modules = commonModules hostname ++ [
{ home-manager.users.nezia = import ./home/desktop; }
];
};
}; };
}; };
} }