Rename custom module to chvp

This commit is contained in:
Charlotte Van Petegem 2020-11-13 22:40:55 +01:00
parent da2abefc9a
commit 7ca622b82c
No known key found for this signature in database
GPG key ID: 019E764B7184435A
32 changed files with 44 additions and 44 deletions

View file

@ -1,7 +1,7 @@
{ ... }: { ... }:
{ {
custom.zfs.homeLinks = [ chvp.zfs.homeLinks = [
{ path = ".config/calibre"; type = "cache"; } { path = ".config/calibre"; type = "cache"; }
]; ];

View file

@ -1,5 +1,5 @@
{ ... }: { { ... }: {
custom.zfs.homeLinks = [ chvp.zfs.homeLinks = [
{ path = ".ICAClient"; type = "data"; } { path = ".ICAClient"; type = "data"; }
]; ];
home-manager.users.charlotte = { pkgs, ... }: { home-manager.users.charlotte = { pkgs, ... }: {

View file

@ -5,7 +5,7 @@
home.packages = with pkgs; [ deluge ]; home.packages = with pkgs; [ deluge ];
}; };
custom.zfs.homeLinks = [ chvp.zfs.homeLinks = [
{ path = ".config/deluge"; type = "data"; } { path = ".config/deluge"; type = "data"; }
]; ];
} }

View file

@ -1,7 +1,7 @@
{ ... }: { ... }:
{ {
custom.zfs.homeLinks = [ chvp.zfs.homeLinks = [
{ path = ".local/share/direnv"; type = "cache"; } { path = ".local/share/direnv"; type = "cache"; }
]; ];

View file

@ -1,7 +1,7 @@
{ ... }: { ... }:
{ {
custom.zfs.systemLinks = [ chvp.zfs.systemLinks = [
{ path = "/var/lib/docker"; type = "cache"; } { path = "/var/lib/docker"; type = "cache"; }
{ path = "/var/lib/docker/volumes"; type = "data"; } { path = "/var/lib/docker/volumes"; type = "data"; }
]; ];

View file

@ -1,7 +1,7 @@
{ ... }: { ... }:
{ {
custom.zfs.homeLinks = [ chvp.zfs.homeLinks = [
{ path = ".dropbox"; type = "cache"; } { path = ".dropbox"; type = "cache"; }
{ path = "Dropbox"; type = "data"; } { path = "Dropbox"; type = "data"; }
]; ];

View file

@ -1,7 +1,7 @@
{ ... }: { ... }:
{ {
custom.zfs.homeLinks = [ chvp.zfs.homeLinks = [
{ type = "data"; path = ".local/share/df_linux"; } { type = "data"; path = ".local/share/df_linux"; }
]; ];

View file

@ -5,7 +5,7 @@
home.packages = with pkgs; [ element-desktop ]; home.packages = with pkgs; [ element-desktop ];
}; };
custom.zfs.homeLinks = [ chvp.zfs.homeLinks = [
{ path = ".config/Element"; type = "data"; } { path = ".config/Element"; type = "data"; }
]; ];
} }

View file

@ -11,7 +11,7 @@
}) })
]; ];
custom.zfs.homeLinks = [ chvp.zfs.homeLinks = [
{ path = ".cache/mozilla"; type = "cache"; } { path = ".cache/mozilla"; type = "cache"; }
{ path = ".mozilla"; type = "data"; } { path = ".mozilla"; type = "data"; }
]; ];

View file

@ -1,7 +1,7 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
{ {
options.custom.git.email = lib.mkOption { options.chvp.git.email = lib.mkOption {
type = lib.types.str; type = lib.types.str;
default = "charlotte@vanpetegem.me"; default = "charlotte@vanpetegem.me";
example = "charlotte@vanpetegem.me"; example = "charlotte@vanpetegem.me";
@ -37,7 +37,7 @@
key = "charlotte@vanpetegem.me"; key = "charlotte@vanpetegem.me";
signByDefault = true; signByDefault = true;
}; };
userEmail = config.custom.git.email; userEmail = config.chvp.git.email;
userName = "Charlotte Van Petegem"; userName = "Charlotte Van Petegem";
}; };
}; };

View file

@ -1,7 +1,7 @@
{ config, lib, ... }: { config, lib, ... }:
{ {
options.custom.gnupg.pinentryFlavor = lib.mkOption { options.chvp.gnupg.pinentryFlavor = lib.mkOption {
type = lib.types.str; type = lib.types.str;
default = "curses"; default = "curses";
example = "qt"; example = "qt";
@ -10,7 +10,7 @@
''; '';
}; };
config.custom.zfs.homeLinks = [ config.chvp.zfs.homeLinks = [
{ path = ".gnupg/crls.d"; type = "data"; } { path = ".gnupg/crls.d"; type = "data"; }
{ path = ".gnupg/private-keys-v1.d"; type = "data"; } { path = ".gnupg/private-keys-v1.d"; type = "data"; }
{ path = ".gnupg/pubring.kbx"; type = "data"; } { path = ".gnupg/pubring.kbx"; type = "data"; }
@ -25,7 +25,7 @@
enable = true; enable = true;
defaultCacheTtl = 7200; defaultCacheTtl = 7200;
maxCacheTtl = 99999; maxCacheTtl = 99999;
pinentryFlavor = config.custom.gnupg.pinentryFlavor; pinentryFlavor = config.chvp.gnupg.pinentryFlavor;
}; };
}; };
} }

View file

@ -83,7 +83,7 @@ let
toRecursiveINIBase 1; toRecursiveINIBase 1;
in in
{ {
custom.zfs.homeLinks = [ chvp.zfs.homeLinks = [
{ path = "mail"; type = "data"; } { path = "mail"; type = "data"; }
{ path = ".local/share/offlineimap"; type = "data"; } { path = ".local/share/offlineimap"; type = "data"; }
{ path = ".local/share/contacts"; type = "data"; } { path = ".local/share/contacts"; type = "data"; }

View file

@ -1,5 +1,5 @@
{ ... }: { { ... }: {
custom.zfs.homeLinks = [ chvp.zfs.homeLinks = [
{ path = ".config/Mumble"; type = "data"; } { path = ".config/Mumble"; type = "data"; }
{ path = ".local/share/Mumble"; type = "data"; } { path = ".local/share/Mumble"; type = "data"; }
]; ];

View file

@ -15,7 +15,7 @@ let
kotlinls = import ../packages/kotlin-language-server/default.nix { inherit pkgs; }; kotlinls = import ../packages/kotlin-language-server/default.nix { inherit pkgs; };
in in
{ {
custom.zfs.homeLinks = [ chvp.zfs.homeLinks = [
{ path = ".local/share/nvim"; type = "cache"; } { path = ".local/share/nvim"; type = "cache"; }
{ path = ".cache/nvim"; type = "cache"; } { path = ".cache/nvim"; type = "cache"; }
]; ];

View file

@ -1,7 +1,7 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
custom.zfs.systemLinks = [ chvp.zfs.systemLinks = [
{ path = "/etc/NetworkManager/system-connections"; type = "data"; } { path = "/etc/NetworkManager/system-connections"; type = "data"; }
]; ];

View file

@ -1,7 +1,7 @@
{ ... }: { ... }:
{ {
custom.zfs.homeLinks = [ chvp.zfs.homeLinks = [
{ path = ".cache/nix-index"; type = "cache"; } { path = ".cache/nix-index"; type = "cache"; }
]; ];

View file

@ -41,7 +41,7 @@
}; };
}; };
custom.zfs.homeLinks = [ chvp.zfs.homeLinks = [
{ path = ".pki"; type = "cache"; } # Required for eid-mw browser configuration { path = ".pki"; type = "cache"; } # Required for eid-mw browser configuration
{ path = ".cache/qutebrowser"; type = "cache"; } { path = ".cache/qutebrowser"; type = "cache"; }
{ path = ".local/share/qutebrowser"; type = "data"; } { path = ".local/share/qutebrowser"; type = "data"; }

View file

@ -7,7 +7,7 @@
}; };
# PulseAudio doesn't play nice with symlinks # PulseAudio doesn't play nice with symlinks
systemd.user.services.pulseaudio.environment = lib.mkIf config.custom.zfs.enable { systemd.user.services.pulseaudio.environment = lib.mkIf config.chvp.zfs.enable {
XDG_CONFIG_HOME = "/data/home/charlotte/.config"; XDG_CONFIG_HOME = "/data/home/charlotte/.config";
}; };

View file

@ -3,7 +3,7 @@
{ {
imports = [ ./ssh/secret.nix ]; imports = [ ./ssh/secret.nix ];
custom.zfs.homeLinks = [ chvp.zfs.homeLinks = [
{ path = ".ssh/known_hosts"; type = "cache"; } { path = ".ssh/known_hosts"; type = "cache"; }
]; ];

View file

@ -7,7 +7,7 @@
pulseaudio.support32Bit = true; pulseaudio.support32Bit = true;
}; };
custom.zfs.homeLinks = [ chvp.zfs.homeLinks = [
{ path = ".paradoxlauncher"; type = "data"; } { path = ".paradoxlauncher"; type = "data"; }
{ path = ".steam"; type = "data"; } { path = ".steam"; type = "data"; }
{ path = ".local/share/Steam"; type = "data"; } { path = ".local/share/Steam"; type = "data"; }

View file

@ -1,7 +1,7 @@
{ ... }: { ... }:
{ {
custom.zfs.homeLinks = [ chvp.zfs.homeLinks = [
{ path = ".config/syncthing"; type = "data"; } { path = ".config/syncthing"; type = "data"; }
{ path = "sync"; type = "data"; } { path = "sync"; type = "data"; }
]; ];

View file

@ -5,7 +5,7 @@
home.packages = with pkgs; [ teams ]; home.packages = with pkgs; [ teams ];
}; };
custom.zfs.homeLinks = [ chvp.zfs.homeLinks = [
{ path = ".config/Microsoft"; type = "data"; } { path = ".config/Microsoft"; type = "data"; }
]; ];
} }

View file

@ -1,5 +1,5 @@
{ ... }: { { ... }: {
custom.zfs.homeLinks = [ chvp.zfs.homeLinks = [
{ path = "VirtualBox VMs"; type = "data"; } { path = "VirtualBox VMs"; type = "data"; }
]; ];

View file

@ -1,7 +1,7 @@
{ ... }: { ... }:
{ {
custom.zfs.homeLinks = [ chvp.zfs.homeLinks = [
{ path = "desktop"; type = "data"; } { path = "desktop"; type = "data"; }
{ path = "documents"; type = "data"; } { path = "documents"; type = "data"; }
{ path = "downloads"; type = "data"; } { path = "downloads"; type = "data"; }

View file

@ -1,7 +1,7 @@
{ ... }: { ... }:
{ {
custom.zfs.homeLinks = [ chvp.zfs.homeLinks = [
{ path = ".config/0ad"; type = "cache"; } { path = ".config/0ad"; type = "cache"; }
]; ];

View file

@ -1,7 +1,7 @@
{ ... }: { ... }:
{ {
custom.zfs.homeLinks = [ chvp.zfs.homeLinks = [
{ path = ".local/share/autojump"; type = "cache"; } { path = ".local/share/autojump"; type = "cache"; }
{ path = ".local/share/zsh"; type = "cache"; } { path = ".local/share/zsh"; type = "cache"; }
]; ];

View file

@ -30,7 +30,7 @@
}; };
# Machine-specific application settings # Machine-specific application settings
custom = { chvp = {
git.email = "charlotte.vanpetegem@ugent.be"; git.email = "charlotte.vanpetegem@ugent.be";
zfs = { zfs = {
enable = true; enable = true;

View file

@ -30,7 +30,7 @@
}; };
# Machine-specific settings # Machine-specific settings
custom = { chvp = {
git.email = "charlotte@vanpetegem.me"; git.email = "charlotte@vanpetegem.me";
zfs = { zfs = {
enable = true; enable = true;

View file

@ -5,10 +5,10 @@ let
$DRY_RUN_CMD mkdir -p $VERBOSE_ARG "/home/charlotte/$(dirname ${location.path})" $DRY_RUN_CMD mkdir -p $VERBOSE_ARG "/home/charlotte/$(dirname ${location.path})"
$DRY_RUN_CMD ln -sf -T $VERBOSE_ARG "/${location.type}/home/charlotte/${location.path}" "/home/charlotte/${location.path}" $DRY_RUN_CMD ln -sf -T $VERBOSE_ARG "/${location.type}/home/charlotte/${location.path}" "/home/charlotte/${location.path}"
'') '')
config.custom.zfs.homeLinks; config.chvp.zfs.homeLinks;
in in
{ {
options.custom.zfs = { options.chvp.zfs = {
enable = lib.mkOption { enable = lib.mkOption {
default = false; default = false;
example = true; example = true;
@ -33,26 +33,26 @@ in
}; };
}; };
config.boot = lib.mkIf config.custom.zfs.enable { config.boot = lib.mkIf config.chvp.zfs.enable {
supportedFilesystems = [ "zfs" ]; supportedFilesystems = [ "zfs" ];
zfs.requestEncryptionCredentials = config.custom.zfs.encrypted; zfs.requestEncryptionCredentials = config.chvp.zfs.encrypted;
initrd.postDeviceCommands = lib.mkAfter '' initrd.postDeviceCommands = lib.mkAfter ''
zfs rollback -r rpool/local/root@blank zfs rollback -r rpool/local/root@blank
''; '';
}; };
config.virtualisation.docker.storageDriver = lib.mkIf config.custom.zfs.enable "zfs"; config.virtualisation.docker.storageDriver = lib.mkIf config.chvp.zfs.enable "zfs";
config.services.zfs.autoScrub.enable = config.custom.zfs.enable; config.services.zfs.autoScrub.enable = config.chvp.zfs.enable;
config.services.zfs.trim.enable = config.custom.zfs.enable; config.services.zfs.trim.enable = config.chvp.zfs.enable;
config.systemd.tmpfiles.rules = lib.mkIf config.custom.zfs.enable ( config.systemd.tmpfiles.rules = lib.mkIf config.chvp.zfs.enable (
[ "d /home/charlotte 0700 charlotte users - -" ] ++ [ "d /home/charlotte 0700 charlotte users - -" ] ++
(map (location: "L ${location.path} - - - - /${location.type}${location.path}") config.custom.zfs.systemLinks) (map (location: "L ${location.path} - - - - /${location.type}${location.path}") config.chvp.zfs.systemLinks)
); );
config.home-manager.users.charlotte = { lib, ... }: { config.home-manager.users.charlotte = { lib, ... }: {
home.activation = lib.mkIf config.custom.zfs.enable { home.activation = lib.mkIf config.chvp.zfs.enable {
linkCommands = lib.hm.dag.entryAfter [ "writeBoundary" ] (lib.concatStringsSep "\n" linkCommands); linkCommands = lib.hm.dag.entryAfter [ "writeBoundary" ] (lib.concatStringsSep "\n" linkCommands);
}; };
}; };

View file

@ -1,7 +1,7 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
custom.zfs.systemLinks = [ chvp.zfs.systemLinks = [
{ path = "/var/lib/bluetooth"; type = "cache"; } { path = "/var/lib/bluetooth"; type = "cache"; }
]; ];

View file

@ -19,7 +19,7 @@
../configurations/zsh.nix ../configurations/zsh.nix
]; ];
custom.zfs.systemLinks = [ chvp.zfs.systemLinks = [
{ path = "/root/.ssh"; type = "data"; } { path = "/root/.ssh"; type = "data"; }
]; ];

View file

@ -57,5 +57,5 @@
''; '';
}; };
custom.gnupg.pinentryFlavor = "qt"; chvp.gnupg.pinentryFlavor = "qt";
} }