setup home impermanence

This commit is contained in:
2025-06-07 18:08:03 +03:00
parent 6001d53e9b
commit 3178c5dbbe
3 changed files with 51 additions and 8 deletions
+28 -1
View File
@@ -49,7 +49,34 @@
home-manager.nixosModules.home-manager
{
home-manager.useUserPackages = true;
home-manager.users.yaroslav = import ./home/yaroslav/Aphelion/Aphelion.nix;
home-manager.users.yaroslav = {
imports = [
impermanence.homeManagerModules.home-manager
"./home/yaroslav/Aphelion/Aphelion.nix"
];
home.persistence."/nix/persist/home" = {
directories = [
"Downloads"
"Music"
"Pictures"
"Documents"
"Videos"
".ssh"
"nixos"
".local/share/keyrings"
".local/share/nicotine"
".local/share/mpd"
".config/nicotine"
".mozilla"
".local/share/AyuGramDesktop"
];
files = [
".p10k.zsh"
".zsh_history"
];
};
};
}
];
};
+18 -5
View File
@@ -29,6 +29,12 @@
options = [ "subvol=@nix" ];
};
fileSystems."/nix/persist/home" =
{
device = "/dev/disk/by-uuid/3126fadd-b793-4110-bcb7-577b7978cba2";
fsType = "btrfs";
options = [ "compress=zstd" "subvol=@home-persist" ];
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/595C-784B";
fsType = "vfat";
@@ -43,7 +49,7 @@
fileSystems."/vol/Trash" = {
device = "/dev/mapper/yarikpc-trash";
fsType = "ext4";
options = [ "defaults" "size=1G" "uid=1000" "gid=100" ];
options = [ "defaults" ];
};
swapDevices = [ ];
@@ -57,10 +63,17 @@
# networking.interfaces.lxdbr0.useDHCP = lib.mkDefault true;
# networking.interfaces.veth9787cb37.useDHCP = lib.mkDefault true;
# networking.interfaces.virbr0.useDHCP = lib.mkDefault true;
systemd.tmpfiles.rules = [
"d /vol/Trash - yaroslav users - -"
];
boot.initrd.systemd.tmpfiles.settings = {
"100-mountpoint-Trash" = {
"/vol/Trash" = {
d = {
user = "root";
mode = "0770";
group = "users";
};
};
};
};
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
+4 -1
View File
@@ -3,11 +3,14 @@
{
users.users.yaroslav = {
isNormalUser = true;
extraGroups = [ "wheel" "incus-admin" "networkmanager" "libvirtd" ]; # Enable sudo for the user.
extraGroups = [ "wheel" "incus-admin" "networkmanager" "libvirtd" ];
shell = pkgs.zsh;
packages = with pkgs; [
tree
];
initialHashedPassword = "$6$.r5fJE91KtrOA2T.$JVjtzlFWx.RsTsNmO5WOsi1MhK6TUTKo8K5F2GgG.bAXYuYjGu4sK3SMzhk4oJ9FBoAcnyHmk7sLMsgLbUeoE1";
};
users.users.root = {
initialHashedPassword = "$y$j9T$eS.via4Hx/iPNJKAFbVah/$aHFf172uH6UYrSXPMrnbaFkAQ2o8AnJcYd4JgX1/of5";
};
}