diff --git a/hosts/common/home/aerc.nix b/hosts/common/home/aerc.nix index 995a83b9..2e913aa2 100644 --- a/hosts/common/home/aerc.nix +++ b/hosts/common/home/aerc.nix @@ -7,5 +7,5 @@ sopsFile = ../../../secrets/universal/aerc_accounts.conf; format = "binary"; }; - sane.fs."/home/colin/.config/aerc/accounts.conf" = sane-lib.fs.wantedSymlinkTo config.sops.secrets.aerc_accounts.path; + sane.user.fs.".config/aerc/accounts.conf" = sane-lib.fs.wantedSymlinkTo config.sops.secrets.aerc_accounts.path; } diff --git a/hosts/common/home/firefox.nix b/hosts/common/home/firefox.nix index 9b63b292..a26e02be 100644 --- a/hosts/common/home/firefox.nix +++ b/hosts/common/home/firefox.nix @@ -155,7 +155,7 @@ in # the specific attribute path is found via scraping ublock code here: # - # - - sane.fs."/home/colin/${cfg.browser.dotDir}/managed-storage/uBlock0@raymondhill.net.json" = sane-lib.fs.wantedText '' + sane.user.fs."${cfg.browser.dotDir}/managed-storage/uBlock0@raymondhill.net.json" = sane-lib.fs.wantedText '' { "name": "uBlock0@raymondhill.net", "description": "ignored", @@ -165,7 +165,7 @@ in } } ''; - sane.fs."/home/colin/${cfg.browser.dotDir}/${cfg.browser.libName}.overrides.cfg" = sane-lib.fs.wantedText '' + sane.user.fs."${cfg.browser.dotDir}/${cfg.browser.libName}.overrides.cfg" = sane-lib.fs.wantedText '' // if we can't query the revocation status of a SSL cert because the issuer is offline, // treat it as unrevoked. // see: @@ -181,10 +181,10 @@ in sane.persist.home.byPath."${cfg.browser.dotDir}/default" = lib.mkIf (cfg.persistData != null) { store = cfg.persistData; }; - sane.fs."/home/colin/${cfg.browser.dotDir}/default" = sane-lib.fs.wantedDir; + sane.user.fs."${cfg.browser.dotDir}/default" = sane-lib.fs.wantedDir; # instruct Firefox to put the profile in a predictable directory (so we can do things like persist just it). # XXX: the directory *must* exist, even if empty; Firefox will not create the directory itself. - sane.fs."/home/colin/${cfg.browser.dotDir}/profiles.ini" = sane-lib.fs.wantedText '' + sane.user.fs."${cfg.browser.dotDir}/profiles.ini" = sane-lib.fs.wantedText '' [Profile0] Name=default IsRelative=1 diff --git a/hosts/common/home/gfeeds.nix b/hosts/common/home/gfeeds.nix index 0d6e744d..c38294b3 100644 --- a/hosts/common/home/gfeeds.nix +++ b/hosts/common/home/gfeeds.nix @@ -6,7 +6,7 @@ let all-feeds = config.sane.feeds; wanted-feeds = feeds.filterByFormat ["text" "image"] all-feeds; in { - sane.fs."/home/colin/.config/org.gabmus.gfeeds.json" = sane-lib.fs.wantedText ( + sane.user.fs.".config/org.gabmus.gfeeds.json" = sane-lib.fs.wantedText ( builtins.toJSON { # feed format is a map from URL to a dict, # with dict["tags"] a list of string tags. diff --git a/hosts/common/home/git.nix b/hosts/common/home/git.nix index 30e530c8..1ac6ae52 100644 --- a/hosts/common/home/git.nix +++ b/hosts/common/home/git.nix @@ -4,7 +4,7 @@ let mkCfg = lib.generators.toINI { }; in { - sane.fs."/home/colin/.config/git/config" = sane-lib.fs.wantedText (mkCfg { + sane.user.fs.".config/git/config" = sane-lib.fs.wantedText (mkCfg { user.name = "Colin"; user.email = "colin@uninsane.org"; alias.co = "checkout"; diff --git a/hosts/common/home/gpodder.nix b/hosts/common/home/gpodder.nix index 4eac262b..41bdecfb 100644 --- a/hosts/common/home/gpodder.nix +++ b/hosts/common/home/gpodder.nix @@ -6,7 +6,7 @@ let all-feeds = config.sane.feeds; wanted-feeds = feeds.filterByFormat ["podcast"] all-feeds; in { - sane.fs."/home/colin/.config/gpodderFeeds.opml" = sane-lib.fs.wantedText ( + sane.user.fs.".config/gpodderFeeds.opml" = sane-lib.fs.wantedText ( feeds.feedsToOpml wanted-feeds ); } diff --git a/hosts/common/home/keyring.nix b/hosts/common/home/keyring.nix index e655a4ad..34cb9390 100644 --- a/hosts/common/home/keyring.nix +++ b/hosts/common/home/keyring.nix @@ -3,8 +3,9 @@ { sane.persist.home.private = [ ".local/share/keyrings" ]; - sane.fs."/home/colin/private/.local/share/keyrings/default" = { + sane.user.fs."private/.local/share/keyrings/default" = { generated.script.script = builtins.readFile ../../../scripts/init-keyring; + # TODO: is this `wantedBy` needed? can we inherit it? wantedBy = [ config.sane.fs."/home/colin/private".unit ]; }; } diff --git a/hosts/common/home/kitty.nix b/hosts/common/home/kitty.nix index 524b19c1..3df8ca82 100644 --- a/hosts/common/home/kitty.nix +++ b/hosts/common/home/kitty.nix @@ -1,7 +1,7 @@ { pkgs, sane-lib, ... }: { - sane.fs."/home/colin/.config/kitty/kitty.conf" = sane-lib.fs.wantedText '' + sane.user.fs.".config/kitty/kitty.conf" = sane-lib.fs.wantedText '' # docs: https://sw.kovidgoyal.net/kitty/conf/ # disable terminal bell (when e.g. you backspace too many times) enable_audio_bell no diff --git a/hosts/common/home/libreoffice.nix b/hosts/common/home/libreoffice.nix index 9663666c..60fb5ff5 100644 --- a/hosts/common/home/libreoffice.nix +++ b/hosts/common/home/libreoffice.nix @@ -2,7 +2,7 @@ { # libreoffice: disable first-run stuff - sane.fs."/home/colin/.config/libreoffice/4/user/registrymodifications.xcu" = sane-lib.fs.wantedText '' + sane.user.fs.".config/libreoffice/4/user/registrymodifications.xcu" = sane-lib.fs.wantedText '' false diff --git a/hosts/common/home/mpv.nix b/hosts/common/home/mpv.nix index 51d5a97a..27194c02 100644 --- a/hosts/common/home/mpv.nix +++ b/hosts/common/home/mpv.nix @@ -2,7 +2,7 @@ { # format is =%% - sane.fs."/home/colin/.config/mpv/mpv.conf" = sane-lib.fs.wantedText '' + sane.user.fs.".config/mpv/mpv.conf" = sane-lib.fs.wantedText '' save-position-on-quit=%3%yes keep-open=%3%yes ''; diff --git a/hosts/common/home/newsflash.nix b/hosts/common/home/newsflash.nix index f29843eb..8dff84de 100644 --- a/hosts/common/home/newsflash.nix +++ b/hosts/common/home/newsflash.nix @@ -6,7 +6,7 @@ let all-feeds = config.sane.feeds; wanted-feeds = feeds.filterByFormat ["text" "image"] all-feeds; in { - sane.fs."/home/colin/.config/newsflashFeeds.opml" = sane-lib.fs.wantedText ( + sane.user.fs.".config/newsflashFeeds.opml" = sane-lib.fs.wantedText ( feeds.feedsToOpml wanted-feeds ); } diff --git a/hosts/common/home/splatmoji.nix b/hosts/common/home/splatmoji.nix index e9b8207f..7836427d 100644 --- a/hosts/common/home/splatmoji.nix +++ b/hosts/common/home/splatmoji.nix @@ -5,8 +5,8 @@ { sane.persist.home.plaintext = [ ".local/state/splatmoji" ]; - sane.fs."/home/colin/.config/splatmoji/splatmoji.config" = sane-lib.fs.wantedText '' - history_file=/home/colin/.local/state/splatmoji/history + sane.user.fs.".config/splatmoji/splatmoji.config" = sane-lib.fs.wantedText '' + history_file=~/.local/state/splatmoji/history history_length=5 # TODO: wayland equiv paste_command=xdotool key ctrl+v diff --git a/hosts/common/home/ssh.nix b/hosts/common/home/ssh.nix index 426fde58..986e324b 100644 --- a/hosts/common/home/ssh.nix +++ b/hosts/common/home/ssh.nix @@ -13,8 +13,8 @@ in { # ssh key is stored in private storage sane.persist.home.private = [ ".ssh/id_ed25519" ]; - sane.fs."/home/colin/.ssh/id_ed25519.pub" = sane-lib.fs.wantedText user-pubkey; - sane.fs."/home/colin/.ssh/known_hosts" = sane-lib.fs.wantedText known-hosts-text; + sane.user.fs.".ssh/id_ed25519.pub" = sane-lib.fs.wantedText user-pubkey; + sane.user.fs.".ssh/known_hosts" = sane-lib.fs.wantedText known-hosts-text; users.users.colin.openssh.authorizedKeys.keys = let diff --git a/hosts/common/home/sublime-music.nix b/hosts/common/home/sublime-music.nix index 5cb5d3be..1a1301c8 100644 --- a/hosts/common/home/sublime-music.nix +++ b/hosts/common/home/sublime-music.nix @@ -7,5 +7,5 @@ sopsFile = ../../../secrets/universal/sublime_music_config.json.bin; format = "binary"; }; - sane.fs."/home/colin/.config/sublime-music/config.json" = sane-lib.fs.wantedSymlinkTo config.sops.secrets.sublime_music_config.path; + sane.user.fs.".config/sublime-music/config.json" = sane-lib.fs.wantedSymlinkTo config.sops.secrets.sublime_music_config.path; } diff --git a/hosts/common/home/vlc.nix b/hosts/common/home/vlc.nix index ea120a8a..7f19403e 100644 --- a/hosts/common/home/vlc.nix +++ b/hosts/common/home/vlc.nix @@ -9,7 +9,7 @@ let ); in { - sane.fs."/home/colin/.config/vlc/vlcrc" = sane-lib.fs.wantedText '' + sane.user.fs.".config/vlc/vlcrc" = sane-lib.fs.wantedText '' [podcast] podcast-urls=${podcast-urls} [core] diff --git a/hosts/common/home/xdg-dirs.nix b/hosts/common/home/xdg-dirs.nix index 51983320..7a74bc1c 100644 --- a/hosts/common/home/xdg-dirs.nix +++ b/hosts/common/home/xdg-dirs.nix @@ -3,7 +3,7 @@ { # XDG defines things like ~/Desktop, ~/Downloads, etc. # these clutter the home, so i mostly don't use them. - sane.fs."/home/colin/.config/user-dirs.dirs" = sane-lib.fs.wantedText '' + sane.user.fs.".config/user-dirs.dirs" = sane-lib.fs.wantedText '' XDG_DESKTOP_DIR="$HOME/.xdg/Desktop" XDG_DOCUMENTS_DIR="$HOME/dev" XDG_DOWNLOAD_DIR="$HOME/tmp" @@ -16,5 +16,5 @@ # prevent `xdg-user-dirs-update` from overriding/updating our config # see - sane.fs."/home/colin/.config/user-dirs.conf" = sane-lib.fs.wantedText "enabled=False"; + sane.user.fs.".config/user-dirs.conf" = sane-lib.fs.wantedText "enabled=False"; } diff --git a/hosts/common/home/zsh/default.nix b/hosts/common/home/zsh/default.nix index 953886c1..0a8acbef 100644 --- a/hosts/common/home/zsh/default.nix +++ b/hosts/common/home/zsh/default.nix @@ -36,7 +36,7 @@ in ]; # zsh/prezto complains if zshrc doesn't exist; but it does allow an "empty" file. - sane.fs."/home/colin/.config/zsh/.zshrc" = sane-lib.fs.wantedText "# "; + sane.user.fs.".config/zsh/.zshrc" = sane-lib.fs.wantedText "# "; # enable zsh completions environment.pathsToLink = [ "/share/zsh" ]; @@ -107,7 +107,7 @@ in # prezto = oh-my-zsh fork; controls prompt, auto-completion, etc. # see: https://github.com/sorin-ionescu/prezto # i believe this file is auto-sourced by the prezto init.zsh script. - sane.fs."/home/colin/.config/zsh/.zpreztorc" = sane-lib.fs.wantedText '' + sane.user.fs.".config/zsh/.zpreztorc" = sane-lib.fs.wantedText '' zstyle ':prezto:*:*' color 'yes' # modules (they ship with prezto): diff --git a/hosts/modules/gui/sway.nix b/hosts/modules/gui/sway.nix index 4421d069..edf78944 100644 --- a/hosts/modules/gui/sway.nix +++ b/hosts/modules/gui/sway.nix @@ -171,7 +171,7 @@ in enable = true; wrapperFeatures.gtk = true; }; - sane.fs."/home/colin/.config/sway/config" = + sane.user.fs.".config/sway/config" = let fuzzel = "${pkgs.fuzzel}/bin/fuzzel"; sed = "${pkgs.gnused}/bin/sed"; @@ -346,10 +346,10 @@ in } ''; - sane.fs."/home/colin/.config/waybar/config" = sane-lib.fs.wantedSymlinkTo waybar-config-text; + sane.user.fs.".config/waybar/config" = sane-lib.fs.wantedSymlinkTo waybar-config-text; # style docs: https://github.com/Alexays/Waybar/wiki/Styling - sane.fs."/home/colin/.config/waybar/style.css" = sane-lib.fs.wantedText '' + sane.user.fs.".config/waybar/style.css" = sane-lib.fs.wantedText '' * { font-family: monospace; }