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";
|
||||
}
|
||||
];
|
||||
|
@ -189,23 +189,11 @@
|
|||
|
||||
(
|
||||
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
|
||||
{
|
||||
options.konfig = lib.mkOption { default = { }; };
|
||||
options.mkk.isDecrypted = lib.mkOption { default = decryptedBool; };
|
||||
config = {
|
||||
konfig = {
|
||||
unstable = mkkArg.unstable;
|
||||
|
|
|
@ -15,7 +15,6 @@ let
|
|||
in
|
||||
(builtins.readFile resultFile == "yes");
|
||||
|
||||
|
||||
stable = inputs.config-stable;
|
||||
unstable = inputs.config-unstable;
|
||||
nixpkgs = stable.nixpkgs;
|
||||
|
@ -28,19 +27,51 @@ let
|
|||
in
|
||||
{
|
||||
# * NixOS configurations
|
||||
nixosConfigurations = {
|
||||
# ** 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
|
||||
|
||||
];
|
||||
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" = mkSystem "materusPC" { };
|
||||
# * default.nix END
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue