mirror of
https://github.com/Andrey0189/nixos-config-reborn.git
synced 2025-09-15 10:06:00 +03:00
smart stuff
This commit is contained in:
58
flake.nix
58
flake.nix
@@ -18,37 +18,41 @@
|
|||||||
#};
|
#};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, home-manager, ... }@inputs:
|
outputs = { self, nixpkgs, home-manager, ... }@inputs: let
|
||||||
|
system = "x86_64-linux";
|
||||||
|
stateVersion = "24.05";
|
||||||
|
user = "amper";
|
||||||
|
hosts = [
|
||||||
|
"slim3"
|
||||||
|
];
|
||||||
|
|
||||||
let
|
makeSystem = { hostname }: nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = system;
|
||||||
stateVersion = "24.05";
|
specialArgs = {
|
||||||
user = "amper";
|
inherit inputs stateVersion hostname user;
|
||||||
hostname = "slim3";
|
|
||||||
in {
|
|
||||||
|
|
||||||
# slim3 - system hostname
|
|
||||||
nixosConfigurations = {
|
|
||||||
${hostname} = nixpkgs.lib.nixosSystem {
|
|
||||||
specialArgs = {
|
|
||||||
inherit inputs system stateVersion hostname user;
|
|
||||||
};
|
|
||||||
|
|
||||||
modules = [
|
|
||||||
./hosts/${hostname}/configuration.nix
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
homeConfigurations.${user} = home-manager.lib.homeManagerConfiguration {
|
modules = [
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
./hosts/${hostname}/configuration.nix
|
||||||
extraSpecialArgs = {
|
];
|
||||||
inherit inputs stateVersion user;
|
};
|
||||||
};
|
|
||||||
|
|
||||||
modules = [
|
in {
|
||||||
./home-manager/home.nix
|
nixosConfigurations = {
|
||||||
];
|
${builtins.elemAt hosts 0} = makeSystem {
|
||||||
|
hostname = builtins.elemAt hosts 0;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
homeConfigurations.${user} = home-manager.lib.homeManagerConfiguration {
|
||||||
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
extraSpecialArgs = {
|
||||||
|
inherit inputs stateVersion user;
|
||||||
|
};
|
||||||
|
|
||||||
|
modules = [
|
||||||
|
./home-manager/home.nix
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user