From 2de7a0a1ad44f7456270fe6f37eba0da1033d6d3 Mon Sep 17 00:00:00 2001 From: "RingOfStorms (Josh)" Date: Fri, 12 Jul 2024 11:54:01 -0500 Subject: [PATCH] Manage background with gnome settings --- flake.lock | 6 +++--- hosts/_common/components/nebula.nix | 1 + hosts/_common/components/plasma_wayland.nix | 21 ++++++++++++++++++++ hosts/_common/components/plasma_xorg.nix | 19 ++++++++++++++++++ users/_common/components/readme.md | 0 users/josh/home_manager/de/gnome.nix | 22 ++++++++++++++++++--- users/josh/home_manager/de/gtk.nix | 4 ++-- 7 files changed, 65 insertions(+), 8 deletions(-) create mode 100644 hosts/_common/components/plasma_wayland.nix create mode 100644 hosts/_common/components/plasma_xorg.nix delete mode 100644 users/_common/components/readme.md diff --git a/flake.lock b/flake.lock index 292b9f7..91a3d90 100644 --- a/flake.lock +++ b/flake.lock @@ -175,11 +175,11 @@ ] }, "locked": { - "lastModified": 1718788307, - "narHash": "sha256-SqiOz0sljM0GjyQEVinPXQxaGcbOXw5OgpCWGPgh/vo=", + "lastModified": 1720734513, + "narHash": "sha256-neWQ8eNtLTd+YMesb7WjKl1SVCbDyCm46LUgP/g/hdo=", "owner": "nix-community", "repo": "home-manager", - "rev": "d7830d05421d0ced83a0f007900898bdcaf2a2ca", + "rev": "90ae324e2c56af10f20549ab72014804a3064c7f", "type": "github" }, "original": { diff --git a/hosts/_common/components/nebula.nix b/hosts/_common/components/nebula.nix index 4fa023d..3759872 100644 --- a/hosts/_common/components/nebula.nix +++ b/hosts/_common/components/nebula.nix @@ -2,6 +2,7 @@ { environment.systemPackages = with pkgs; [ nebula + traceroute # for debugging ]; networking.firewall.allowedUDPPorts = [ 4242 ]; diff --git a/hosts/_common/components/plasma_wayland.nix b/hosts/_common/components/plasma_wayland.nix new file mode 100644 index 0000000..8e8b487 --- /dev/null +++ b/hosts/_common/components/plasma_wayland.nix @@ -0,0 +1,21 @@ +{ pkgs, ... }: +{ + services.xserver = { + enable = true; + displayManager.gdm = { + enable = true; + autoSuspend = false; + wayland = true; + }; + displayManager.defaultSession = "plasma"; + displayManager.sddm.wayland.enable = true; + desktopManager.plasma6 = { + enable = true; + }; + }; + environment.systemPackages = with pkgs; [ + xclip + ]; +} + + diff --git a/hosts/_common/components/plasma_xorg.nix b/hosts/_common/components/plasma_xorg.nix new file mode 100644 index 0000000..a47846c --- /dev/null +++ b/hosts/_common/components/plasma_xorg.nix @@ -0,0 +1,19 @@ +{ pkgs, ... }: +{ + services.xserver = { + enable = true; + displayManager.gdm = { + enable = true; + autoSuspend = false; + wayland = false; + }; + displayManager.defaultSession = "plasmax11"; + desktopManager.plasma6 = { + enable = true; + }; + }; + environment.systemPackages = with pkgs; [ + xclip + ]; +} + diff --git a/users/_common/components/readme.md b/users/_common/components/readme.md deleted file mode 100644 index e69de29..0000000 diff --git a/users/josh/home_manager/de/gnome.nix b/users/josh/home_manager/de/gnome.nix index 00a6ab5..c618c45 100644 --- a/users/josh/home_manager/de/gnome.nix +++ b/users/josh/home_manager/de/gnome.nix @@ -1,14 +1,19 @@ -{ pkgs, lib, ... }: +{ + pkgs, + settings, + lib, + ... +}: with lib.hm.gvariant; { home.packages = with pkgs; [ # use `dconf dump /` before and after and diff the files for easy editing of dconf below - # > `dconf dump / > /tmp/dconf_dump_start && watch -n0.5 'dconf dump / > /tmp/dconf_dump_current && diff --color /tmp/dconf_dump_start /tmp/dconf_dump_current -U12'` + # > `dconf dump / > /tmp/dconf_dump_start && watch -n0.5 "dconf dump / > /tmp/dconf_dump_current && diff --color /tmp/dconf_dump_start /tmp/dconf_dump_current -U12"` # OR (Must be logged into user directly, no SU to user will work): `dconf watch /` # OR get the exact converted config from `dconf dump / | dconf2nix | less` and search with forward slash # gnome.dconf-editor # gnomeExtensions.workspace-switch-wraparound - #gnomeExtensions.forge # probably don't need on this on tiny laptop but may explore this instead of sway for my desktop + #gnomeExtensions.forge # probably don"t need on this on tiny laptop but may explore this instead of sway for my desktop ]; dconf = { @@ -101,9 +106,20 @@ with lib.hm.gvariant; idle-brightness = 15; power-saver-profile-on-low-battery = false; }; + "org/gnome/desktop/background" = { + color-shading-type = "solid"; + picture-options = "zoom"; + picture-uri = "file://" + (settings.usersDir + "/_common/components/black.png"); + picture-uri-dark = "file://" + (settings.usersDir + "/_common/components/black.png"); + primary-color = "#000000000000"; + secondary-color = "#000000000000"; + }; "org/gnome/desktop/screensaver" = { lock-enabled = false; idle-activation-enabled = false; + picture-options = "zoom"; + picture-uri = "file://" + (settings.usersDir + "/_common/components/black.png"); + picture-uri-dark = "file://" + (settings.usersDir + "/_common/components/black.png"); }; "org/gnome/desktop/applications/terminal" = { exec = "alacritty"; diff --git a/users/josh/home_manager/de/gtk.nix b/users/josh/home_manager/de/gtk.nix index f6727ad..b42a49b 100644 --- a/users/josh/home_manager/de/gtk.nix +++ b/users/josh/home_manager/de/gtk.nix @@ -10,13 +10,13 @@ gtk3.extraConfig = { Settings = '' - gtk-application-prefer-dark-theme=1 + gtk-application-prefer-dark-theme=1 ''; }; gtk4.extraConfig = { Settings = '' - gtk-application-prefer-dark-theme=1 + gtk-application-prefer-dark-theme=1 ''; }; };