mirror of
https://github.com/Andrey0189/nixos-config-reborn.git
synced 2025-09-15 10:06:00 +03:00
add stateVersion to hosts
This commit is contained in:
14
flake.nix
14
flake.nix
@@ -23,10 +23,10 @@
|
|||||||
stateVersion = "24.05";
|
stateVersion = "24.05";
|
||||||
user = "amper";
|
user = "amper";
|
||||||
hosts = [
|
hosts = [
|
||||||
"slim3"
|
{ hostname = "slim3"; stateVersion = "24.05"; }
|
||||||
];
|
];
|
||||||
|
|
||||||
makeSystem = { hostname }: nixpkgs.lib.nixosSystem {
|
makeSystem = { hostname, stateVersion }: nixpkgs.lib.nixosSystem {
|
||||||
system = system;
|
system = system;
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit inputs stateVersion hostname user;
|
inherit inputs stateVersion hostname user;
|
||||||
@@ -38,10 +38,12 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
in {
|
in {
|
||||||
nixosConfigurations = nixpkgs.lib.foldl' (configs: hostname:
|
nixosConfigurations = nixpkgs.lib.foldl' (configs: host:
|
||||||
configs // {
|
configs // {
|
||||||
"${hostname}" = makeSystem { inherit hostname; };
|
"${host.hostname}" = makeSystem {
|
||||||
}) {} hosts;
|
inherit (host) hostname stateVersion;
|
||||||
|
};
|
||||||
|
}) {} hosts;
|
||||||
|
|
||||||
homeConfigurations.${user} = home-manager.lib.homeManagerConfiguration {
|
homeConfigurations.${user} = home-manager.lib.homeManagerConfiguration {
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
Reference in New Issue
Block a user