Move all the individual stored impermanence folders to specific files

This commit is contained in:
Bun 2025-04-29 20:54:29 -04:00
parent 57201099fb
commit dbd5ea69cd
19 changed files with 178 additions and 160 deletions

View file

@ -238,6 +238,9 @@
}; };
# Symlinks to Librewolf # Symlinks to Librewolf
home.file.".librewolf".source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.mozilla/firefox"; home = {
file.".librewolf".source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.mozilla/firefox";
persistence."/persist${config.home.homeDirectory}".directories = [ ".mozilla" ];
};
}; };
} }

View file

@ -1,14 +1,18 @@
{ config, pkgs, ... }: { config, lib, pkgs, ... }:
{ {
programs.obs-studio = { config = lib.mkIf config.home.production.enable {
enable = config.home.production.enable; programs.obs-studio = {
plugins = with pkgs.obs-studio-plugins; [ enable = true;
looking-glass-obs plugins = with pkgs.obs-studio-plugins; [
obs-multi-rtmp looking-glass-obs
obs-pipewire-audio-capture obs-multi-rtmp
obs-tuna obs-pipewire-audio-capture
obs-vkcapture obs-tuna
obs-webkitgtk obs-vkcapture
]; obs-webkitgtk
];
};
home.persistence."/persist${config.home.homeDirectory}".directories = [ ".config/obs-studio" ];
}; };
} }

View file

@ -1,60 +1,64 @@
{ config, ... }: { config, lib, ... }:
{ {
programs.thunderbird = { config = lib.mkIf config.home.desktop.enable {
enable = config.home.desktop.enable; programs.thunderbird = {
profiles = { enable = config.home.desktop.enable;
Main = { profiles = {
isDefault = true; Main = {
userContent = '' isDefault = true;
*{scrollbar-width:none !important} userContent = ''
''; *{scrollbar-width:none !important}
settings = { '';
"general.autoScroll" = true; settings = {
"general.autoScroll" = true;
"security.mixed_content.block_active_content" = true; "security.mixed_content.block_active_content" = true;
"security.mixed_content.block_display_content" = true; "security.mixed_content.block_display_content" = true;
"extensions.enabled" = false; "extensions.enabled" = false;
"extensions.autoDisableScopes" = 0; "extensions.autoDisableScopes" = 0;
"extensions.allow-non-mpc-extensions" = false; "extensions.allow-non-mpc-extensions" = false;
"extensions.installDistroAddons" = false; "extensions.installDistroAddons" = false;
"extensions.getAddons.cache.enabled" = false; "extensions.getAddons.cache.enabled" = false;
"extensions.blocklist.enabled" = true; "extensions.blocklist.enabled" = true;
"extensions.webextensions.userSelection" = false; "extensions.webextensions.userSelection" = false;
"extensions.checkCompatibility" = false; "extensions.checkCompatibility" = false;
"extensions.allowRemoteAddons" = false; "extensions.allowRemoteAddons" = false;
"extensions.ui.enabled" = false; "extensions.ui.enabled" = false;
"extensions.ui.useSystemTheme" = true; "extensions.ui.useSystemTheme" = true;
"extensions.activeThemeID" = "thunderbird-compact-dark@mozilla.org"; "extensions.activeThemeID" = "thunderbird-compact-dark@mozilla.org";
"privacy.clearOnShutdown.cookies" = true; "privacy.clearOnShutdown.cookies" = true;
"privacy.clearOnShutdown.cache" = true; "privacy.clearOnShutdown.cache" = true;
"privacy.clearOnShutdown.formdata" = true; "privacy.clearOnShutdown.formdata" = true;
"privacy.clearOnShutdown.siteSettings" = true; "privacy.clearOnShutdown.siteSettings" = true;
"privacy.trackingprotection.enabled" = true; "privacy.trackingprotection.enabled" = true;
"privacy.firstparty.isolate" = true; "privacy.firstparty.isolate" = true;
"privacy.donottrackheader.enabled" = true; "privacy.donottrackheader.enabled" = true;
"privacy.resistFingerprinting" = true; "privacy.resistFingerprinting" = true;
"browser.history.enabled" = false; "browser.history.enabled" = false;
"browser.sessionstore.privacy_level" = 2; "browser.sessionstore.privacy_level" = 2;
"browser.tabs.warnOnClose" = false; "browser.tabs.warnOnClose" = false;
"browser.shell.checkDefaultBrowser" = false; "browser.shell.checkDefaultBrowser" = false;
"browser.urlbar.suggest.openpage" = false; "browser.urlbar.suggest.openpage" = false;
"browser.urlbar.suggest.bookmark" = false; "browser.urlbar.suggest.bookmark" = false;
"browser.urlbar.suggest.history" = false; "browser.urlbar.suggest.history" = false;
"browser.urlbar.suggest.searches" = false; "browser.urlbar.suggest.searches" = false;
"browser.urlbar.suggest.topsites" = false; "browser.urlbar.suggest.topsites" = false;
"browser.download.promptForDownload" = true; "browser.download.promptForDownload" = true;
"network.cookie.cookieBehavior" = 1; "network.cookie.cookieBehavior" = 1;
"network.dns.dnsOverHttps.enabled" = true; "network.dns.dnsOverHttps.enabled" = true;
"network.http.speculative-parallel-limit" = 0; "network.http.speculative-parallel-limit" = 0;
"network.http.pipelining" = false; "network.http.pipelining" = false;
"network.predictor.enabled" = false; "network.predictor.enabled" = false;
"network.cookie.lifetimePolicy" = 2; "network.cookie.lifetimePolicy" = 2;
}; };
};
}; };
}; };
home.persistence."/persist${config.home.homeDirectory}".directories = [ ".thunderbird" ];
}; };
} }

View file

@ -1,14 +1,22 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
{ {
home.packages = with pkgs; lib.mkIf config.home.gaming.enable [ config = lib.mkIf config.home.gaming.enable {
heroic home.packages = with pkgs; [
prismlauncher heroic
steam prismlauncher
steam-run-free steam
]; steam-run-free
];
nixpkgs.allowUnfreePackages = [ home.persistence."/persist${config.home.homeDirectory}".directories = [
"steam" ".config/heroic"
"steam-unwrapped" ".local/share/PrismLauncher"
]; ".local/share/Steam"
];
nixpkgs.allowUnfreePackages = [
"steam"
"steam-unwrapped"
];
};
} }

View file

@ -1,8 +1,11 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
{ {
home.packages = with pkgs; lib.mkIf config.home.desktop.enable [ home = lib.mkIf config.home.desktop.enable {
libreoffice packages = with pkgs; [
qbittorrent libreoffice
vesktop qbittorrent
]; vesktop
];
persistence."/persist${config.home.homeDirectory}".directories = [ ".config/vesktop" ];
};
} }

View file

@ -1,11 +1,17 @@
{ config, lib, pkgs, blender, ... }: { config, lib, pkgs, blender, ... }:
{ {
config = lib.mkIf config.home.production.enable { nixpkgs.overlays = [ blender.overlays.default ];
nixpkgs.overlays = [ blender.overlays.default ];
home.packages = with pkgs; [ home = lib.mkIf config.home.production.enable {
packages = with pkgs; [
audacity audacity
blender_4_4 blender_4_4
krita krita
]; ];
persistence."/persist${config.home.homeDirectory}".directories = [
".config/audacity"
".config/blender"
".local/share/krita"
];
}; };
} }

View file

@ -7,6 +7,7 @@
./eza ./eza
./fastfetch ./fastfetch
./git ./git
./lazygit
./ncmpcpp ./ncmpcpp
./neovim ./neovim
./nh ./nh

View file

@ -7,10 +7,8 @@
extraConfig.safe.directory = "/etc/nixos"; extraConfig.safe.directory = "/etc/nixos";
}; };
programs.lazygit.enable = true;
home.packages = with pkgs; [ home.packages = with pkgs; [
gnupg
git-crypt git-crypt
gnupg
]; ];
} }

View file

@ -0,0 +1,5 @@
{ config, ... }:
{
programs.lazygit.enable = true;
home.persistence."/persist${config.home.homeDirectory}".directories = [ ".local/state/lazygit" ];
}

View file

@ -110,4 +110,6 @@
nmap <C-a> :NERDTreeToggleVCS<CR> nmap <C-a> :NERDTreeToggleVCS<CR>
''; '';
}; };
home.persistence."/persist${config.home.homeDirectory}".directories = [ ".local/share/nvim/undo" ];
} }

View file

@ -1,4 +1,5 @@
{ ... }: { config, ... }:
{ {
programs.nix-index.enable = true; programs.nix-index.enable = true;
home.persistence."/persist${config.home.homeDirectory}".directories = [ ".cache/nix-index" ];
} }

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: { config, pkgs, ... }:
{ {
programs.zsh = { programs.zsh = {
enable = true; enable = true;
@ -25,4 +25,6 @@
source ${pkgs.zsh-you-should-use}/share/zsh/plugins/you-should-use/you-should-use.plugin.zsh source ${pkgs.zsh-you-should-use}/share/zsh/plugins/you-should-use/you-should-use.plugin.zsh
''; '';
}; };
home.persistence."/persist${config.home.homeDirectory}".directories = [ ".config/zsh" ];
} }

View file

@ -3,6 +3,7 @@
imports = [ imports = [
./easyeffects ./easyeffects
./gnome-keyring ./gnome-keyring
./impermanence
./mpd ./mpd
./playerctl ./playerctl
]; ];

View file

@ -0,0 +1,24 @@
{ config, impermanence, ... }:
{
imports = [ impermanence.homeManagerModules.impermanence ];
home.persistence."/persist${config.home.homeDirectory}" = {
directories = [
"Keepers"
"Projects"
"Documents"
"Pictures"
"Videos"
"Games"
"VMs"
".ssh"
".gnupg"
".config/sunshine"
".local/share/keyrings"
".local/state/wireplumber"
];
allowOther = false;
};
}

View file

@ -1,19 +1,23 @@
{ config, lib, ... }: { config, lib, ... }:
{ {
services = lib.mkIf config.home.desktop.enable { config = lib.mkIf config.home.desktop.enable {
mpd = { services = {
enable = true; mpd = {
network.startWhenNeeded = true; enable = true;
musicDirectory = "${config.home.homeDirectory}/Network/Midas/Music/NixBops"; network.startWhenNeeded = true;
playlistDirectory = "${config.services.mpd.musicDirectory}/Playlists"; musicDirectory = "${config.home.homeDirectory}/Network/Midas/Music/NixBops";
extraConfig = '' playlistDirectory = "${config.services.mpd.musicDirectory}/Playlists";
audio_output { extraConfig = ''
type "pipewire" audio_output {
name "Local Pipewire" type "pipewire"
} name "Local Pipewire"
''; }
'';
};
mpd-mpris.enable = true;
mpd-discord-rpc.enable = true;
}; };
mpd-mpris.enable = true;
mpd-discord-rpc.enable = true; home.persistence."/persist${config.home.homeDirectory}".directories = [ ".local/share/mpd" ];
}; };
} }

View file

@ -1,8 +1,13 @@
{ impermanence, ... }: { impermanence, ... }:
{ {
imports = [ imports = [ impermanence.nixosModules.impermanence ];
./main
./root environment.persistence."/persist" = {
impermanence.nixosModules.impermanence hideMounts = true;
]; directories = [
"/storage"
"/var/lib/nixos"
];
files = [ "/etc/machine-id" ];
};
} }

View file

@ -1,43 +0,0 @@
{ config, ... }:
{
environment.persistence."/persist" = {
hideMounts = true;
users.${config.sysusers.main} = {
directories = [
"Keepers"
"Projects"
"Documents"
"Pictures"
"Videos"
"Games"
"VMs"
".mozilla"
".thunderbird"
".config/blender"
".config/dconf"
".config/heroic"
".config/obs-studio"
".config/sunshine"
".config/vesktop"
".config/zsh"
".local/share/PrismLauncher"
".local/share/Steam"
".local/share/TelegramDesktop"
".local/share/mpd"
".local/share/nvim/undo"
".local/state/lazygit"
".local/state/wireplumber"
".cache/nix-index"
{ directory = ".ssh"; mode = "0700"; }
{ directory = ".gnupg"; mode = "0700"; }
{ directory = ".local/share/keyrings"; mode = "0700"; }
];
};
};
}

View file

@ -1,11 +0,0 @@
{ ... }:
{
environment.persistence."/persist" = {
hideMounts = true;
directories = [
"/storage"
"/var/lib/nixos"
];
files = [ "/etc/machine-id" ];
};
}

View file

@ -1,4 +1,4 @@
{ hm, stable, unstable, nur, blender, ... }: { hm, stable, unstable, blender, impermanence, nur, ... }:
{ {
imports = [ hm.nixosModules.home-manager ]; imports = [ hm.nixosModules.home-manager ];
@ -9,8 +9,9 @@
inherit inherit
stable stable
unstable unstable
nur
blender blender
impermanence
nur
; ;
}; };
}; };