This commit is contained in:
Mateusz Słodkowicz 2025-05-18 09:51:46 +02:00
parent f2a598668b
commit 80af4584e6
Signed by: materus
GPG Key ID: 28D140BCA60B4FD1
5 changed files with 49 additions and 38 deletions

1
.gitattributes vendored
View File

@ -1,2 +1,3 @@
**/private/** filter=git-crypt diff=git-crypt **/private/** filter=git-crypt diff=git-crypt
private/** filter=git-crypt diff=git-crypt private/** filter=git-crypt diff=git-crypt
*-private.nix filter=git-crypt diff=git-crypt

View File

@ -178,8 +178,18 @@
assertion = builtins ? currentSystem; assertion = builtins ? currentSystem;
message = "MKK must be build with --impure"; message = "MKK must be build with --impure";
} }
{ {
assertion = assertion = config.konfig.decrypted;
message = "Need to decrypt MKK repo to build";
}
];
}
# * Args
(
let
decryptedBool =
let let
file = ../private/check-encryption; file = ../private/check-encryption;
resultFile = pkgs.runCommandLocal "check-encryption" { src = file; } '' resultFile = pkgs.runCommandLocal "check-encryption" { src = file; } ''
@ -191,15 +201,13 @@
''; '';
in in
(builtins.readFile resultFile == "yes"); (builtins.readFile resultFile == "yes");
message = "Need to decrypt MKK repo to build";
} in
];
}
# * Args
{ {
options.konfig = lib.mkOption { default = { }; }; options.konfig = lib.mkOption { default = { }; };
config = { config = {
konfig = { konfig = {
decrypted = decryptedBool;
unstable = mkkArg.unstable; unstable = mkkArg.unstable;
stable = mkkArg.stable; stable = mkkArg.stable;
current = mkkArg.current; current = mkkArg.current;
@ -221,6 +229,7 @@
_module.args.konfig = config.konfig; _module.args.konfig = config.konfig;
}; };
} }
)
# * common.nix END # * common.nix END
]; ];

View File

@ -1,4 +1,4 @@
# * default.nix # * Outputs - default.nix
{ inputs, configRootPath }: { inputs, configRootPath }:
let let
stable = inputs.config-stable; stable = inputs.config-stable;
@ -24,7 +24,7 @@ in
./hosts/materusPC.nix ./hosts/materusPC.nix
]; ];
}; };
# * default.nix END
}; };
} }

Binary file not shown.

View File

@ -8,6 +8,7 @@
}: }:
{ {
imports = [ imports = [
./materusPC-private.nix
# * CONFIG # * CONFIG
# ** Nix System Settings # ** Nix System Settings
{ {