sway: define the secret snippets more idiomatically

This commit is contained in:
2023-07-15 00:23:14 +00:00
parent e6a989bc92
commit 0ed9394fff
5 changed files with 7 additions and 7 deletions

View File

@@ -66,7 +66,6 @@ in
{ {
"jackett_apikey".owner = config.users.users.colin.name; "jackett_apikey".owner = config.users.users.colin.name;
"mx-sanebot-env".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; "transmission_passwd".owner = config.users.users.colin.name;
} }
]; ];

View File

@@ -70,6 +70,8 @@ in
"sway-contrib.grimshot" "sway-contrib.grimshot"
"wdisplays" # like xrandr "wdisplays" # like xrandr
]; ];
secrets.".config/sane-sway/snippets.txt" = ../../../../secrets/common/snippets.txt.bin;
}; };
} }
@@ -135,7 +137,7 @@ in
wrapperFeatures.gtk = true; wrapperFeatures.gtk = true;
}; };
sane.user.fs.".config/sway/config".symlink.text = 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 = sane.user.fs.".config/waybar/config".symlink.target =
let let

View File

@@ -1,4 +1,4 @@
{ pkgs, config }: { pkgs }:
let let
fuzzel = "${pkgs.fuzzel}/bin/fuzzel"; fuzzel = "${pkgs.fuzzel}/bin/fuzzel";
sed = "${pkgs.gnused}/bin/sed"; sed = "${pkgs.gnused}/bin/sed";
@@ -16,11 +16,10 @@ let
# "bookmarking"/snippets inspired by Luke Smith: # "bookmarking"/snippets inspired by Luke Smith:
# - <https://www.youtube.com/watch?v=d_11QaTlf1I> # - <https://www.youtube.com/watch?v=d_11QaTlf1I>
snip-file = ../snippets.txt; snip-file = ../snippets.txt;
# TODO: querying sops here breaks encapsulation list-snips = "cat ${snip-file} ~/.config/sane-sway/snippets.txt";
list-snips = "cat ${snip-file} ${config.sops.secrets.snippets.path}";
strip-comments = "${sed} 's/ #.*$//'"; strip-comments = "${sed} 's/ #.*$//'";
snip-cmd = "${wtype} $(${list-snips} | ${fuzzel} -d -i -w 60 | ${strip-comments})"; 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"; emoji-cmd = "${pkgs.splatmoji}/bin/splatmoji -s medium-light type";
# mod = "Mod1"; # Alt # mod = "Mod1"; # Alt

View File

@@ -1,3 +1,3 @@
- router_passwd: CenturyLink password from old home - router_passwd: CenturyLink password from old home
- no longer used - 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