Move media dirs to btrfs subvolume
This commit is contained in:
parent
2bbab5fede
commit
f4c382507e
22
home/xdg.nix
22
home/xdg.nix
@ -1,3 +1,21 @@
|
||||
{ ... }: {
|
||||
xdg.enable = true;
|
||||
{ config, ... }:
|
||||
let
|
||||
mediaDirectory = "\$HOME/media";
|
||||
in {
|
||||
xdg = {
|
||||
enable = true;
|
||||
userDirs = {
|
||||
enable = true;
|
||||
createDirectories = true;
|
||||
|
||||
/* TODO: this can be a btrfs subvolume to exclude those directories from snapshots */
|
||||
download = "${mediaDirectory}/Downloads";
|
||||
music = "${mediaDirectory}/Music";
|
||||
pictures = "${mediaDirectory}/Pictures";
|
||||
publicShare = "${mediaDirectory}/Public";
|
||||
templates = "${mediaDirectory}/Templates";
|
||||
videos = "${mediaDirectory}/Videos";
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -121,6 +121,12 @@ inputs.nixpkgs.lib.nixosSystem {
|
||||
options = [ "subvol=home" "compress=zstd" ];
|
||||
};
|
||||
|
||||
fileSystems."/home/me/media" =
|
||||
{ device = "/dev/disk/by-uuid/93bdadfc-961a-4ea6-aef0-d3cd50847f0b";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=home/me/media" "compress=zstd" ];
|
||||
};
|
||||
|
||||
fileSystems."/swap" =
|
||||
{ device = "/dev/disk/by-uuid/" + swapUUID;
|
||||
fsType = "btrfs";
|
||||
|
Loading…
Reference in New Issue
Block a user