diff --git a/hosts/common/secrets.nix b/hosts/common/secrets.nix index dfe7e58a1..ab5bb95b2 100644 --- a/hosts/common/secrets.nix +++ b/hosts/common/secrets.nix @@ -66,7 +66,6 @@ in { "jackett_apikey".owner = config.users.users.colin.name; "mx-sanebot-env".owner = config.users.users.colin.name; - "snippets".owner = config.users.users.colin.name; "transmission_passwd".owner = config.users.users.colin.name; } ]; diff --git a/hosts/modules/gui/sway/default.nix b/hosts/modules/gui/sway/default.nix index e2920f3cd..b029cef00 100644 --- a/hosts/modules/gui/sway/default.nix +++ b/hosts/modules/gui/sway/default.nix @@ -70,6 +70,8 @@ in "sway-contrib.grimshot" "wdisplays" # like xrandr ]; + + secrets.".config/sane-sway/snippets.txt" = ../../../../secrets/common/snippets.txt.bin; }; } @@ -135,7 +137,7 @@ in wrapperFeatures.gtk = true; }; sane.user.fs.".config/sway/config".symlink.text = - import ./sway-config.nix { inherit config pkgs; }; + import ./sway-config.nix { inherit pkgs; }; sane.user.fs.".config/waybar/config".symlink.target = let diff --git a/hosts/modules/gui/sway/sway-config.nix b/hosts/modules/gui/sway/sway-config.nix index 2849a8062..b00a85fa5 100644 --- a/hosts/modules/gui/sway/sway-config.nix +++ b/hosts/modules/gui/sway/sway-config.nix @@ -1,4 +1,4 @@ -{ pkgs, config }: +{ pkgs }: let fuzzel = "${pkgs.fuzzel}/bin/fuzzel"; sed = "${pkgs.gnused}/bin/sed"; @@ -16,11 +16,10 @@ let # "bookmarking"/snippets inspired by Luke Smith: # - snip-file = ../snippets.txt; - # TODO: querying sops here breaks encapsulation - list-snips = "cat ${snip-file} ${config.sops.secrets.snippets.path}"; + list-snips = "cat ${snip-file} ~/.config/sane-sway/snippets.txt"; strip-comments = "${sed} 's/ #.*$//'"; snip-cmd = "${wtype} $(${list-snips} | ${fuzzel} -d -i -w 60 | ${strip-comments})"; - # TODO: next splatmoji release should allow `-s none` to disable skin tones + # TODO: splatmoji release > 1.2.0 should allow `-s none` to disable skin tones emoji-cmd = "${pkgs.splatmoji}/bin/splatmoji -s medium-light type"; # mod = "Mod1"; # Alt diff --git a/secrets/common/README.md b/secrets/common/README.md index b3169626e..374957eb0 100644 --- a/secrets/common/README.md +++ b/secrets/common/README.md @@ -1,3 +1,3 @@ - router_passwd: CenturyLink password from old home - no longer used -- snippets.bin: sensitive snippets that go into e.g. sway menu +- snippets.txt.bin: sensitive snippets that go into e.g. sway menu diff --git a/secrets/common/snippets.bin b/secrets/common/snippets.txt.bin similarity index 100% rename from secrets/common/snippets.bin rename to secrets/common/snippets.txt.bin