home: group desktop stuff

This commit is contained in:
Peder Bergebakken Sundt 2024-10-07 11:39:06 +02:00
parent de26106903
commit 28e082cd9c
18 changed files with 52 additions and 44 deletions

View File

@ -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
];
}

View File

@ -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; [

View File

@ -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 = [ "<Super>e" ];
magnifier = [ "<Super>Escape" ];
@ -144,6 +145,12 @@ with lib.hm.gvariant;
name = "Open SymPy terminal";
};
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom13" = {
binding = "<Shift><Control>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\"";

View File

@ -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
{

View File

@ -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

View File

@ -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;
};
}

View File

@ -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;
};
}