host specialisation
This commit is contained in:
parent
481edb2a4d
commit
70a1ab7e68
2 changed files with 9 additions and 3 deletions
|
@ -5,8 +5,6 @@
|
|||
./common
|
||||
./fake_flake.nix
|
||||
./users.nix
|
||||
|
||||
./specific/grimm-nixos-laptop/configuration.nix
|
||||
];
|
||||
|
||||
# Bootloader.
|
||||
|
|
|
@ -9,6 +9,14 @@ let
|
|||
nivSources = import ./nix/sources.nix;
|
||||
asGithubRef = src: "github:${src.owner}/${src.repo}/${src.rev}";
|
||||
|
||||
build_target = let env_host = builtins.getEnv "NIXOS_TARGET_HOST"; in if env_host != "" then env_host else builtins.replaceStrings ["\n"] [""] (lib.toLower (builtins.readFile /proc/sys/kernel/hostname));
|
||||
|
||||
host_modules = {
|
||||
grimmauld-nixos = [
|
||||
./specific/grimm-nixos-laptop/configuration.nix
|
||||
];
|
||||
};
|
||||
|
||||
nixpkgs_patches = [
|
||||
{
|
||||
# tlpui
|
||||
|
@ -22,7 +30,7 @@ in
|
|||
"${nivSources.agenix}/modules/age.nix"
|
||||
(import "${nivSources.lix-module}/module.nix" { lix = nivSources.lix-pkg; })
|
||||
(builtins.getFlake (asGithubRef nivSources.chaotic)).nixosModules.default # fixme: ideally we'd not rely on the flake syntax to load the module
|
||||
];
|
||||
] ++ lib.optionals (builtins.hasAttr build_target host_modules) host_modules.${build_target};
|
||||
|
||||
nixpkgs.hostPlatform = system;
|
||||
|
||||
|
|
Loading…
Reference in a new issue