mirror of
https://github.com/semere-meb/dotfiles-nix.git
synced 2026-08-03 10:24:36 +00:00
reduced kernel logs and formatted the files
This commit is contained in:
parent
839b7404cf
commit
3ba0464f5f
10 changed files with 186 additions and 94 deletions
74
flake.nix
74
flake.nix
|
|
@ -12,38 +12,48 @@
|
|||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, home-manager, ... }:
|
||||
let
|
||||
lib = nixpkgs.lib;
|
||||
userVars = import ./vars.nix;
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
home-manager,
|
||||
...
|
||||
}:
|
||||
let
|
||||
lib = nixpkgs.lib;
|
||||
userVars = import ./vars.nix;
|
||||
|
||||
hostsDir = ./hosts;
|
||||
hostNames = builtins.attrNames (
|
||||
lib.filterAttrs (name: type: type == "directory") (builtins.readDir hostsDir)
|
||||
);
|
||||
hostsDir = ./hosts;
|
||||
hostNames = builtins.attrNames (
|
||||
lib.filterAttrs (name: type: type == "directory") (builtins.readDir hostsDir)
|
||||
);
|
||||
|
||||
nixosConfigurations = lib.genAttrs hostNames (name:
|
||||
let
|
||||
hostConfig = import (./hosts + "/${name}");
|
||||
in
|
||||
lib.nixosSystem {
|
||||
system = hostConfig.system;
|
||||
specialArgs = { inherit userVars; };
|
||||
modules = [ hostConfig.configModule ] ++ [
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
extraSpecialArgs = { inherit userVars; };
|
||||
backupFileExtension = "backup";
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
);
|
||||
in
|
||||
{
|
||||
inherit nixosConfigurations;
|
||||
};
|
||||
nixosConfigurations = lib.genAttrs hostNames (
|
||||
name:
|
||||
let
|
||||
hostConfig = import (./hosts + "/${name}");
|
||||
in
|
||||
lib.nixosSystem {
|
||||
system = hostConfig.system;
|
||||
specialArgs = { inherit userVars; };
|
||||
modules = [
|
||||
hostConfig.configModule
|
||||
]
|
||||
++ [
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
extraSpecialArgs = { inherit userVars; };
|
||||
backupFileExtension = "backup";
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
);
|
||||
in
|
||||
{
|
||||
inherit nixosConfigurations;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue