Update
This commit is contained in:
parent
ca9e1f520a
commit
f4a22eb9a6
|
@ -1 +0,0 @@
|
||||||
materus@materusPC.1079801:1747170257
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
{...}:
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
|
@ -180,7 +180,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
assertion = config.mkk.isDecrypted;
|
assertion = mkkArg.isDecrypted;
|
||||||
message = "Need to decrypt MKK repo to build";
|
message = "Need to decrypt MKK repo to build";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
@ -189,23 +189,11 @@
|
||||||
|
|
||||||
(
|
(
|
||||||
let
|
let
|
||||||
decryptedBool =
|
|
||||||
let
|
|
||||||
file = ../private/check-encryption;
|
|
||||||
resultFile = pkgs.runCommandLocal "check-encryption" { src = file; } ''
|
|
||||||
if [[ "$(< $src)" != "DECRYPTED" ]]; then
|
|
||||||
echo -n "no" >> $out;
|
|
||||||
else
|
|
||||||
echo -n "yes" >> $out;
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
in
|
|
||||||
(builtins.readFile resultFile == "yes");
|
|
||||||
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.konfig = lib.mkOption { default = { }; };
|
options.konfig = lib.mkOption { default = { }; };
|
||||||
options.mkk.isDecrypted = lib.mkOption { default = decryptedBool; };
|
|
||||||
config = {
|
config = {
|
||||||
konfig = {
|
konfig = {
|
||||||
unstable = mkkArg.unstable;
|
unstable = mkkArg.unstable;
|
||||||
|
|
|
@ -13,8 +13,7 @@ let
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
(builtins.readFile resultFile == "yes");
|
(builtins.readFile resultFile == "yes");
|
||||||
|
|
||||||
|
|
||||||
stable = inputs.config-stable;
|
stable = inputs.config-stable;
|
||||||
unstable = inputs.config-unstable;
|
unstable = inputs.config-unstable;
|
||||||
|
@ -28,20 +27,52 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# * NixOS configurations
|
# * NixOS configurations
|
||||||
nixosConfigurations = {
|
nixosConfigurations =
|
||||||
|
let
|
||||||
|
mkSystem =
|
||||||
|
hostname:
|
||||||
|
{
|
||||||
|
system ? "x86_64-linux",
|
||||||
|
isStable ? true,
|
||||||
|
extraArgs ? { },
|
||||||
|
extraModules ? [ ],
|
||||||
|
}:
|
||||||
|
(if isStable then nixpkgs else nixpkgs-unstable).lib.nixosSystem {
|
||||||
|
system = system;
|
||||||
|
specialArgs = {
|
||||||
|
mkkArg =
|
||||||
|
mkkArg
|
||||||
|
// {
|
||||||
|
current = (if isStable then stable else unstable);
|
||||||
|
}
|
||||||
|
// {
|
||||||
|
isDecrypted = (isDecrypted (if isStable then stable else unstable).nixpkgs system);
|
||||||
|
}
|
||||||
|
// extraArgs;
|
||||||
|
};
|
||||||
|
modules = [
|
||||||
|
./hosts/${hostname}.nix
|
||||||
|
(
|
||||||
|
if
|
||||||
|
(
|
||||||
|
(isDecrypted (if isStable then stable else unstable).nixpkgs system)
|
||||||
|
&& builtins.pathExists ./hosts/${hostname}-private.nix
|
||||||
|
)
|
||||||
|
then
|
||||||
|
./hosts/${hostname}-private.nix
|
||||||
|
else
|
||||||
|
{ }
|
||||||
|
)
|
||||||
|
./common.nix
|
||||||
|
./common-os.nix
|
||||||
|
] ++ extraModules;
|
||||||
|
};
|
||||||
|
|
||||||
|
in
|
||||||
|
{
|
||||||
# ** materusPC
|
# ** materusPC
|
||||||
|
"materusPC" = mkSystem "materusPC" { };
|
||||||
"materusPC" = nixpkgs.lib.nixosSystem rec {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
specialArgs = { mkkArg = mkkArg // {current = stable;}; };
|
|
||||||
modules = [
|
|
||||||
./hosts/materusPC.nix
|
|
||||||
(if (isDecrypted stable.nixpkgs system) then ./hosts/materusPC-private.nix else {} )
|
|
||||||
./common.nix
|
|
||||||
|
|
||||||
];
|
|
||||||
};
|
|
||||||
# * default.nix END
|
# * default.nix END
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue