diff --git a/users/pbsds/home/gnome.nix b/users/pbsds/home/gnome.nix index f35526c..6e90e2f 100644 --- a/users/pbsds/home/gnome.nix +++ b/users/pbsds/home/gnome.nix @@ -3,10 +3,7 @@ { imports = [ ./default.nix - ./profiles/gnome - ./profiles/mpv.nix - ./profiles/desktop.nix - ./profiles/salert.nix - ./profiles/sshuttle.nix + ./profiles/desktop + ./profiles/desktop/gnome ]; } diff --git a/users/pbsds/home/profiles/desktop.nix b/users/pbsds/home/profiles/desktop/default.nix similarity index 84% rename from users/pbsds/home/profiles/desktop.nix rename to users/pbsds/home/profiles/desktop/default.nix index bf00329..d9629e2 100644 --- a/users/pbsds/home/profiles/desktop.nix +++ b/users/pbsds/home/profiles/desktop/default.nix @@ -6,18 +6,21 @@ ./lxterminal ./pulsar ./zed + ./mpv.nix + ./salert.nix + ./sshuttle.nix ]; # TODO: doesn't work? - nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ - "discord" - "telegra-desktop" - "spotify" + nixpkgs.config.permittedUnfreePackages = [ + pkgs.discord.name + pkgs.telegram-desktop.name + pkgs.spotify.name ]; - nixpkgs.config.allowInsecurePredicate = pkg: builtins.elem (lib.getName pkg) [ - "pulsar" - "zotero" + nixpkgs.config.permittedInsecurePackages = [ + pkgs.pulsar.name + pkgs.zotero.name ]; home.packages = with pkgs; [ diff --git a/users/pbsds/home/profiles/gnome/dconf-gnome-bindings.nix b/users/pbsds/home/profiles/desktop/gnome/dconf-gnome-bindings.nix similarity index 96% rename from users/pbsds/home/profiles/gnome/dconf-gnome-bindings.nix rename to users/pbsds/home/profiles/desktop/gnome/dconf-gnome-bindings.nix index e0379df..960693d 100644 --- a/users/pbsds/home/profiles/gnome/dconf-gnome-bindings.nix +++ b/users/pbsds/home/profiles/desktop/gnome/dconf-gnome-bindings.nix @@ -102,6 +102,7 @@ with lib.hm.gvariant; "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/" "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom12/" "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom11/" + "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom13/" ]; home = [ "e" ]; magnifier = [ "Escape" ]; @@ -144,6 +145,12 @@ with lib.hm.gvariant; name = "Open SymPy terminal"; }; + "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom13" = { + binding = "Print"; + command = "normcap"; + name = "normcap OCR"; + }; + "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2" = { binding = ""; command = "sh -c \"$HOME/.local/opt/left-window.sh\""; diff --git a/users/pbsds/home/profiles/gnome/dconf-gnome-extensions.nix b/users/pbsds/home/profiles/desktop/gnome/dconf-gnome-extensions.nix similarity index 100% rename from users/pbsds/home/profiles/gnome/dconf-gnome-extensions.nix rename to users/pbsds/home/profiles/desktop/gnome/dconf-gnome-extensions.nix diff --git a/users/pbsds/home/profiles/gnome/dconf-gnome-theme.nix b/users/pbsds/home/profiles/desktop/gnome/dconf-gnome-theme.nix similarity index 100% rename from users/pbsds/home/profiles/gnome/dconf-gnome-theme.nix rename to users/pbsds/home/profiles/desktop/gnome/dconf-gnome-theme.nix diff --git a/users/pbsds/home/profiles/gnome/dconf-pull.sh b/users/pbsds/home/profiles/desktop/gnome/dconf-pull.sh similarity index 96% rename from users/pbsds/home/profiles/gnome/dconf-pull.sh rename to users/pbsds/home/profiles/desktop/gnome/dconf-pull.sh index b84c41f..6eee90b 100755 --- a/users/pbsds/home/profiles/gnome/dconf-pull.sh +++ b/users/pbsds/home/profiles/desktop/gnome/dconf-pull.sh @@ -21,6 +21,7 @@ dump1() { dump "org/gnome/mutter/keybindings" dump "org/gnome/shell/keybindings" dump "org/gnome/settings-daemon/plugins/media-keys" + # dump "org/gnome/desktop/notifications/application/emote" } | dconf2nix > dconf-gnome-bindings.nix { diff --git a/users/pbsds/home/profiles/gnome/default.nix b/users/pbsds/home/profiles/desktop/gnome/default.nix similarity index 90% rename from users/pbsds/home/profiles/gnome/default.nix rename to users/pbsds/home/profiles/desktop/gnome/default.nix index 8ea770f..9f492be 100644 --- a/users/pbsds/home/profiles/gnome/default.nix +++ b/users/pbsds/home/profiles/desktop/gnome/default.nix @@ -27,9 +27,9 @@ let in { - home.file.".local/opt/open-microsoft-url-files.py".source = ../../files/opt/open-microsoft-url-files.py; - home.file.".local/opt/python-interactive-imports.py".source = ../../files/opt/python-interactive-imports.py; - home.file.".local/opt/sympy-interactive-imports.py".source = ../../files/opt/sympy-interactive-imports.py; + home.file.".local/opt/open-microsoft-url-files.py".source = ../../../files/opt/open-microsoft-url-files.py; + home.file.".local/opt/python-interactive-imports.py".source = ../../../files/opt/python-interactive-imports.py; + home.file.".local/opt/sympy-interactive-imports.py".source = ../../../files/opt/sympy-interactive-imports.py; # qt theme qt.enable = true; @@ -62,12 +62,12 @@ in "org/gnome/desktop/background" = { color-shading-type = "solid"; picture-options = "zoom"; - picture-uri = "file://${../../files/wallpaper.jpg}"; - picture-uri-dark = "file://${../../files/wallpaper.jpg}"; + picture-uri = "file://${../../../files/wallpaper.jpg}"; + picture-uri-dark = "file://${../../../files/wallpaper.jpg}"; }; "org/gnome/desktop/screensaver" = { idle-activation-enabled = false; - picture-uri = "file://${../../files/screensaver.jpg}"; + picture-uri = "file://${../../../files/screensaver.jpg}"; }; # theme diff --git a/users/pbsds/home/profiles/lxterminal/default.nix b/users/pbsds/home/profiles/desktop/lxterminal/default.nix similarity index 100% rename from users/pbsds/home/profiles/lxterminal/default.nix rename to users/pbsds/home/profiles/desktop/lxterminal/default.nix diff --git a/users/pbsds/home/profiles/lxterminal/lxterminal.conf b/users/pbsds/home/profiles/desktop/lxterminal/lxterminal.conf similarity index 100% rename from users/pbsds/home/profiles/lxterminal/lxterminal.conf rename to users/pbsds/home/profiles/desktop/lxterminal/lxterminal.conf diff --git a/users/pbsds/home/profiles/mpv.nix b/users/pbsds/home/profiles/desktop/mpv.nix similarity index 100% rename from users/pbsds/home/profiles/mpv.nix rename to users/pbsds/home/profiles/desktop/mpv.nix diff --git a/users/pbsds/home/profiles/pulsar/config.cson b/users/pbsds/home/profiles/desktop/pulsar/config.cson similarity index 100% rename from users/pbsds/home/profiles/pulsar/config.cson rename to users/pbsds/home/profiles/desktop/pulsar/config.cson diff --git a/users/pbsds/home/profiles/pulsar/default.nix b/users/pbsds/home/profiles/desktop/pulsar/default.nix similarity index 100% rename from users/pbsds/home/profiles/pulsar/default.nix rename to users/pbsds/home/profiles/desktop/pulsar/default.nix diff --git a/users/pbsds/home/profiles/pulsar/keymap.cson b/users/pbsds/home/profiles/desktop/pulsar/keymap.cson similarity index 100% rename from users/pbsds/home/profiles/pulsar/keymap.cson rename to users/pbsds/home/profiles/desktop/pulsar/keymap.cson diff --git a/users/pbsds/home/profiles/pulsar/snippets.cson b/users/pbsds/home/profiles/desktop/pulsar/snippets.cson similarity index 100% rename from users/pbsds/home/profiles/pulsar/snippets.cson rename to users/pbsds/home/profiles/desktop/pulsar/snippets.cson diff --git a/users/pbsds/home/profiles/desktop/salert.nix b/users/pbsds/home/profiles/desktop/salert.nix new file mode 100644 index 0000000..ec89e1a --- /dev/null +++ b/users/pbsds/home/profiles/desktop/salert.nix @@ -0,0 +1,26 @@ +{ pkgs, lib, ... }: +let + inherit (lib) getExe; + inherit (pkgs) mpv; +in +{ + programs = let + rcScript = '' + salert() { + local retval=$? + if test $retval -eq 0; then + #${getExe mpv} ${../../files/sounds/TFH_MadameC_Sing.wav} --no-video --really-quiet || true + #${getExe mpv} ${../../files/sounds/NTR-BKIE-USA-0065.wav} --no-video --really-quiet || true + ${getExe mpv} ${../../files/sounds/NTR-BKIE-USA-0134.wav} --no-video --really-quiet || true + else + ${getExe mpv} ${../../files/sounds/NTR-BKIE-USA-0137.wav} --no-video --really-quiet || true + fi + return $retval + } + ''; + in { + # TODO: fish + bash.initExtra = rcScript; + zsh.initExtra = rcScript; + }; +} diff --git a/users/pbsds/home/profiles/sshuttle.nix b/users/pbsds/home/profiles/desktop/sshuttle.nix similarity index 100% rename from users/pbsds/home/profiles/sshuttle.nix rename to users/pbsds/home/profiles/desktop/sshuttle.nix diff --git a/users/pbsds/home/profiles/zed/default.nix b/users/pbsds/home/profiles/desktop/zed/default.nix similarity index 100% rename from users/pbsds/home/profiles/zed/default.nix rename to users/pbsds/home/profiles/desktop/zed/default.nix diff --git a/users/pbsds/home/profiles/salert.nix b/users/pbsds/home/profiles/salert.nix deleted file mode 100644 index c5a7f91..0000000 --- a/users/pbsds/home/profiles/salert.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ pkgs, lib, ... }: -let - inherit (lib) getExe; - inherit (pkgs) mpv; -in -{ - programs = let - rcScript = '' - salert() { - local retval=$? - if test $retval -eq 0; then - #${getExe mpv} ${../files/sounds/TFH_MadameC_Sing.wav} --no-video --really-quiet || true - #${getExe mpv} ${../files/sounds/NTR-BKIE-USA-0065.wav} --no-video --really-quiet || true - ${getExe mpv} ${../files/sounds/NTR-BKIE-USA-0134.wav} --no-video --really-quiet || true - else - ${getExe mpv} ${../files/sounds/NTR-BKIE-USA-0137.wav} --no-video --really-quiet || true - fi - return $retval - } - ''; - in { - # TODO: fish - bash.initExtra = rcScript; - zsh.initExtra = rcScript; - }; -}