system: add snapper for home and subvol for nix
This commit is contained in:
parent
2fc7225354
commit
115b139f1c
@ -65,6 +65,7 @@
|
||||
source-code-pro
|
||||
jetbrains-mono
|
||||
font-awesome # Icons
|
||||
hack-font
|
||||
corefonts # MS
|
||||
(nerdfonts.override { # Nerdfont Icons override
|
||||
fonts = [
|
||||
@ -133,6 +134,15 @@
|
||||
# com.obsproject.Studio
|
||||
# com.parsecgaming.parsec
|
||||
# com.usebottles.bottles
|
||||
snapper.configs = {
|
||||
home = {
|
||||
subvolume = "/home";
|
||||
extraConfig = ''
|
||||
TIMELINE_CREATE=yes
|
||||
TIMELINE_CLEANUP=yes
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
#xdg.portal = { # Required for flatpak
|
||||
@ -167,10 +177,10 @@
|
||||
};
|
||||
|
||||
system = { # NixOS settings
|
||||
autoUpgrade = { # Allow auto update
|
||||
enable = true;
|
||||
channel = "https://nixos.org/channels/nixos-unstable";
|
||||
};
|
||||
# autoUpgrade = { # Allow auto update
|
||||
# enable = true;
|
||||
# channel = "https://nixos.org/channels/nixos-unstable";
|
||||
# };
|
||||
stateVersion = "22.05";
|
||||
};
|
||||
}
|
||||
|
@ -25,19 +25,31 @@
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-label/NIXROOT";
|
||||
fsType = "btrfs";
|
||||
options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvol=@" ];
|
||||
options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvol=@,discard=async" ];
|
||||
};
|
||||
|
||||
fileSystems."/home" =
|
||||
{ device = "/dev/disk/by-label/NIXROOT";
|
||||
fsType = "btrfs";
|
||||
options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvol=@home" ];
|
||||
options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvol=@home,discard=async" ];
|
||||
};
|
||||
|
||||
fileSystems."/home/.snapshots" =
|
||||
{ device = "/dev/disk/by-label/NIXROOT";
|
||||
fsType = "btrfs";
|
||||
options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvol=@snapshots,discard=async" ];
|
||||
};
|
||||
|
||||
fileSystems."/srv" =
|
||||
{ device = "/dev/disk/by-label/NIXROOT";
|
||||
fsType = "btrfs";
|
||||
options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvol=@srv" ];
|
||||
options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvol=@srv,discard=async" ];
|
||||
};
|
||||
|
||||
fileSystems."/nix" =
|
||||
{ device = "/dev/disk/by-label/NIXROOT";
|
||||
fsType = "btrfs";
|
||||
options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvol=@nix,discard=async" ];
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
|
Loading…
Reference in New Issue
Block a user