little more cleanup
This commit is contained in:
parent
15641360ca
commit
4268754afb
2 changed files with 9 additions and 12 deletions
|
|
@ -28,7 +28,9 @@
|
|||
*/
|
||||
|
||||
imports = (import "${modulesPath}/module-list.nix") ++ [
|
||||
# For the VM node, but not the in-VM configuration.nix
|
||||
./module-allow-rebuild-in-vm.nix
|
||||
# For the VM node, and the in-VM configuration.nix
|
||||
./dynix-vm-configuration.nix
|
||||
(toString dynix)
|
||||
];
|
||||
|
|
@ -37,12 +39,12 @@
|
|||
enable = true;
|
||||
serviceConfig.Type = "oneshot";
|
||||
serviceConfig.RemainAfterExit = true;
|
||||
serviceConfig.RequisteOf = [ "multi-user.target" ];
|
||||
path = [ config.system.path ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig.requisteOf = [ "multi-user.target" ];
|
||||
after = [ "default.target" ];
|
||||
script = ''
|
||||
nix profile install -vv "${dynix.modules}"
|
||||
nix profile install -vv "${dynix.modules}" # "
|
||||
|
||||
mkdir -vp /etc/nixos
|
||||
nixos-generate-config
|
||||
|
|
|
|||
|
|
@ -6,6 +6,9 @@
|
|||
|
||||
mkDynixConfigurationDotNix = finalAttrs: {
|
||||
name,
|
||||
/** A *path* to a `configuration.nix`-like NixOS module.
|
||||
* NOT a NixOS module *value*.
|
||||
*/
|
||||
configuration,
|
||||
}: assert lib.isStringLike configuration; let
|
||||
self = finalAttrs.finalPackage;
|
||||
|
|
@ -17,18 +20,17 @@
|
|||
|
||||
phases = [ "installPhase" ];
|
||||
|
||||
#outputs = [ "out" "modules" ];
|
||||
outputs = [ "out" ];
|
||||
modulesOut = "${placeholder "out"}/share/nixos";
|
||||
#modulesOut = "${placeholder "modules"}/share/nixos/modules";
|
||||
|
||||
baseConfiguration = configuration;
|
||||
dynixVmConfiguration = ./dynix-vm-configuration.nix;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -Dm a=r "$baseConfiguration" "$modulesOut/test-configuration.nix"
|
||||
install -Dm a=r "${./dynix-vm-configuration.nix}" "$modulesOut/dynix-vm-configuration.nix"
|
||||
install -Dm a=r "$dynixVmConfiguration" "$modulesOut/dynix-vm-configuration.nix"
|
||||
|
||||
echo "/** GENERATED BY mk-test-configuration-dot-nix! */" >> "$modulesOut/configuration.nix"
|
||||
echo "{ ... }:" >> "$modulesOut/configuration.nix"
|
||||
|
|
@ -42,9 +44,6 @@
|
|||
echo " ];" >> "$modulesOut/configuration.nix"
|
||||
echo "}" >> "$modulesOut/configuration.nix"
|
||||
|
||||
#mkdir -p "$out"
|
||||
#cp -r --reflink=auto "$modulesOut/"* "$out/"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
|
|
@ -52,10 +51,6 @@
|
|||
modulesPath = self.out + "/share/nixos";
|
||||
configuration = self.out + "/share/nixos/configuration.nix";
|
||||
};
|
||||
|
||||
meta = {
|
||||
#outputsToInstall = [ "modules" ];
|
||||
};
|
||||
};
|
||||
in lib.extendMkDerivation {
|
||||
constructDrv = stdenv.mkDerivation;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue