forked from Fediversity/Fediversity
factor out to nixos.nix
This commit is contained in:
parent
e801416cba
commit
7c5a93ce82
2 changed files with 13 additions and 19 deletions
|
@ -90,23 +90,8 @@ in
|
||||||
autoconf
|
autoconf
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
eval = import "${sources.nixpkgs}/nixos/lib/eval-config.nix" {
|
|
||||||
system = builtins.currentSystem;
|
|
||||||
specialArgs = {
|
|
||||||
inherit sources;
|
|
||||||
};
|
|
||||||
modules = [ configuration ];
|
|
||||||
};
|
|
||||||
os = {
|
|
||||||
inherit (eval) pkgs config options;
|
|
||||||
system = eval.config.system.build.toplevel;
|
|
||||||
inherit (eval.config.system.build) vm vmWithBootLoader;
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
{
|
import ${pathToRoot}/deployment/nixos.nix { inherit configuration; }
|
||||||
drv_path = os.config.system.build.toplevel.drvPath;
|
|
||||||
out_path = os.config.system.build.toplevel;
|
|
||||||
}
|
|
||||||
'
|
'
|
||||||
)
|
)
|
||||||
# instantiate the config in /nix/store
|
# instantiate the config in /nix/store
|
||||||
|
|
|
@ -4,11 +4,20 @@
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
sources = import ../npins;
|
sources = import ../npins;
|
||||||
os = import "${sources.nixpkgs}/nixos" { inherit system configuration; };
|
eval = import "${sources.nixpkgs}/nixos/lib/eval-config.nix" {
|
||||||
|
inherit system;
|
||||||
|
specialArgs = {
|
||||||
|
inherit sources;
|
||||||
|
};
|
||||||
|
modules = [ configuration ];
|
||||||
|
};
|
||||||
|
os = {
|
||||||
|
inherit (eval) pkgs config options;
|
||||||
|
system = eval.config.system.build.toplevel;
|
||||||
|
inherit (eval.config.system.build) vm vmWithBootLoader;
|
||||||
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
substituters = builtins.concatStringsSep " " os.config.nix.settings.substituters;
|
|
||||||
trusted_public_keys = builtins.concatStringsSep " " os.config.nix.settings.trusted-public-keys;
|
|
||||||
drv_path = os.config.system.build.toplevel.drvPath;
|
drv_path = os.config.system.build.toplevel.drvPath;
|
||||||
out_path = os.config.system.build.toplevel;
|
out_path = os.config.system.build.toplevel;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue