fix persist module
This commit is contained in:
parent
a9c66613e3
commit
b8aee72114
@ -19,7 +19,7 @@ let
|
|||||||
inherit (builtins) concatMap;
|
inherit (builtins) concatMap;
|
||||||
inherit (lib) mkIf;
|
inherit (lib) mkIf;
|
||||||
|
|
||||||
homeDirectory = config.home-manager.users.${config.mainuser}.home.homeDirectory or /home/${config.mainuser};
|
homeDirectory = config.home-manager.users.${config.mainuser}.home.homeDirectory or "/home/${config.mainuser}";
|
||||||
in {
|
in {
|
||||||
options = let
|
options = let
|
||||||
inherit (lib) mkOption mkEnableOption;
|
inherit (lib) mkOption mkEnableOption;
|
||||||
@ -186,22 +186,22 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/" = lib.mkIf (config.deviceSpecific.devInfo.fileSystem != "zfs") {
|
# fileSystems."/" = lib.mkIf (config.deviceSpecific.devInfo.fileSystem != "zfs") {
|
||||||
device = "none";
|
# device = "none";
|
||||||
options = [ "defaults" "size=2G" "mode=755" ];
|
# options = [ "defaults" "size=2G" "mode=755" ];
|
||||||
fsType = "tmpfs";
|
# fsType = "tmpfs";
|
||||||
};
|
# };
|
||||||
|
|
||||||
boot.initrd = lib.mkIf (config.deviceSpecific.devInfo.fileSystem != "zfs") {
|
# boot.initrd = lib.mkIf (config.deviceSpecific.devInfo.fileSystem != "zfs") {
|
||||||
postMountCommands =
|
# postMountCommands =
|
||||||
assert config.fileSystems
|
# assert config.fileSystems
|
||||||
? ${cfg.persistRoot}
|
# ? ${cfg.persistRoot}
|
||||||
&& config.fileSystems.${cfg.persistRoot}.neededForBoot; ''
|
# && config.fileSystems.${cfg.persistRoot}.neededForBoot; ''
|
||||||
mkdir -p /mnt-root/nix
|
# mkdir -p /mnt-root/nix
|
||||||
mount --bind /mnt-root${cfg.persistRoot}/nix /mnt-root/nix
|
# mount --bind /mnt-root${cfg.persistRoot}/nix /mnt-root/nix
|
||||||
chmod 755 /mnt-root
|
# chmod 755 /mnt-root
|
||||||
'';
|
# '';
|
||||||
};
|
# };
|
||||||
|
|
||||||
systemd.services.persist-cache-cleanup = lib.mkIf cfg.cache.clean.enable {
|
systemd.services.persist-cache-cleanup = lib.mkIf cfg.cache.clean.enable {
|
||||||
description = "Cleaning up cache files and directories";
|
description = "Cleaning up cache files and directories";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user