From a83068d010ddde0876b1addc9fb935989ffbc9f4 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Sat, 29 Mar 2025 14:30:34 +0200 Subject: [PATCH] run "statix fix" hosts/dunamis/sops.nix: fix w/ statix hosts/dunamis/users/user/home-configuration.nix: fix w/ statix hosts/eldrid/users/user/home-configuration.nix: fix w/ statix modules/home/desktop/gnome/default.nix: fix w/ statix modules/home/desktop/hyprland/default.nix: fix w/ statix modules/home/desktop/niri/default.nix: add swayosd, move bar to the bottom, fix w/ statix modules/nixos/system/security/basic.nix: fix w/ statix Signed-off-by: unexplrd --- hosts/dunamis/sops.nix | 3 +- .../dunamis/users/user/home-configuration.nix | 2 +- .../eldrid/users/user/home-configuration.nix | 2 +- modules/home/desktop/gnome/default.nix | 2 +- modules/home/desktop/hyprland/default.nix | 2 +- modules/home/desktop/niri/default.nix | 38 +++++++++++-------- modules/nixos/system/security/basic.nix | 2 +- 7 files changed, 29 insertions(+), 22 deletions(-) diff --git a/hosts/dunamis/sops.nix b/hosts/dunamis/sops.nix index 8c20272..2a79ab4 100644 --- a/hosts/dunamis/sops.nix +++ b/hosts/dunamis/sops.nix @@ -1,5 +1,4 @@ -{inputs, ...}: let -in { +{inputs, ...}: { imports = with inputs; [ sops-nix.nixosModules.sops ]; diff --git a/hosts/dunamis/users/user/home-configuration.nix b/hosts/dunamis/users/user/home-configuration.nix index c6f10cd..8a91e5d 100644 --- a/hosts/dunamis/users/user/home-configuration.nix +++ b/hosts/dunamis/users/user/home-configuration.nix @@ -11,7 +11,7 @@ ./flatpak.nix ]; home = { - stateVersion = osConfig.system.stateVersion; + inherit (osConfig.system) stateVersion; sessionPath = ["$HOME/.local/bin"]; }; diff --git a/hosts/eldrid/users/user/home-configuration.nix b/hosts/eldrid/users/user/home-configuration.nix index c6f10cd..8a91e5d 100644 --- a/hosts/eldrid/users/user/home-configuration.nix +++ b/hosts/eldrid/users/user/home-configuration.nix @@ -11,7 +11,7 @@ ./flatpak.nix ]; home = { - stateVersion = osConfig.system.stateVersion; + inherit (osConfig.system) stateVersion; sessionPath = ["$HOME/.local/bin"]; }; diff --git a/modules/home/desktop/gnome/default.nix b/modules/home/desktop/gnome/default.nix index 3d6479d..bd078ad 100644 --- a/modules/home/desktop/gnome/default.nix +++ b/modules/home/desktop/gnome/default.nix @@ -6,7 +6,7 @@ }: with lib; let cfg = config.desktop.gnome; - colors = config.lib.stylix.colors; + inherit (config.lib.stylix) colors; in { options = { desktop.gnome.enable = diff --git a/modules/home/desktop/hyprland/default.nix b/modules/home/desktop/hyprland/default.nix index f8e2ea3..1e980bc 100644 --- a/modules/home/desktop/hyprland/default.nix +++ b/modules/home/desktop/hyprland/default.nix @@ -9,7 +9,7 @@ cfg = config.desktop.hyprland; hostname = osConfig.networking.hostName; cursor_size = config.stylix.cursor.size; - colors = config.lib.stylix.colors; + inherit (config.lib.stylix) colors; keyboard = if hostname == "eldrid" then "chromeos" diff --git a/modules/home/desktop/niri/default.nix b/modules/home/desktop/niri/default.nix index cbc3b86..960dc80 100644 --- a/modules/home/desktop/niri/default.nix +++ b/modules/home/desktop/niri/default.nix @@ -8,7 +8,7 @@ cfg = config.desktop.niri; hostname = osConfig.networking.hostName; cursor_size = config.stylix.cursor.size; - colors = config.lib.stylix.colors; + inherit (config.lib.stylix) colors; keyboard = if hostname == "eldrid" then "chromeos" @@ -33,10 +33,14 @@ in { qt.enable = false; }; services = { - wpaperd.enable = true; - playerctld.enable = true; - network-manager-applet.enable = true; copyq.enable = true; + network-manager-applet.enable = true; + playerctld.enable = true; + swayosd = { + enable = true; + topMargin = 0.8; + }; + wpaperd.enable = true; gnome-keyring = { enable = true; components = ["secrets"]; @@ -384,7 +388,6 @@ in { niri = { target = "niri/config.kdl"; text = let - cursor_size = toString config.stylix.cursor.size; left = "n"; down = "e"; up = "i"; @@ -460,7 +463,7 @@ in { cursor { xcursor-theme "${config.stylix.cursor.name}" - xcursor-size ${cursor_size} + xcursor-size ${toString cursor_size} } layout { @@ -635,10 +638,15 @@ in { Ctrl+Print { screenshot-screen; } Shift+Print { screenshot-window; } - XF86AudioRaiseVolume allow-when-locked=true { spawn "wpctl" "set-volume" "-l" "1.0" "@DEFAULT_AUDIO_SINK@" "5%+"; } - XF86AudioLowerVolume allow-when-locked=true { spawn "wpctl" "set-volume" "-l" "1.0" "@DEFAULT_AUDIO_SINK@" "5%-"; } - XF86AudioMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; } - XF86AudioMicMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"; } + Caps_Lock { spawn "swayosd-client" "--caps-lock"; } + // XF86AudioRaiseVolume allow-when-locked=true { spawn "wpctl" "set-volume" "-l" "1.0" "@DEFAULT_AUDIO_SINK@" "5%+"; } + // XF86AudioLowerVolume allow-when-locked=true { spawn "wpctl" "set-volume" "-l" "1.0" "@DEFAULT_AUDIO_SINK@" "5%-"; } + // XF86AudioMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; } + // XF86AudioMicMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"; } + XF86AudioRaiseVolume allow-when-locked=true { spawn "swayosd-client" "--output-volume" "raise"; } + XF86AudioLowerVolume allow-when-locked=true { spawn "swayosd-client" "--output-volume" "lower"; } + XF86AudioMute allow-when-locked=true { spawn "swayosd-client" "--output-volume" "mute-toggle"; } + XF86AudioMicMute allow-when-locked=true { spawn "swayosd-client" "--input-volume" "mute-toggle"; } XF86AudioPlay allow-when-locked=true { spawn "playerctl" "play-pause"; } XF86AudioPause allow-when-locked=true { spawn "playerctl" "pause"; } XF86AudioPrev allow-when-locked=true { spawn "playerctl" "previous"; } @@ -1144,7 +1152,7 @@ in { settings = { bar-0 = { # layer = "top"; - position = "top"; + position = "bottom"; height = 32; spacing = 4; margin-left = 63; @@ -1355,10 +1363,10 @@ in { .mpris.paused, .modules-left, .modules-right { - border-bottom-left-radius: 12px; - border-bottom-right-radius: 12px; - border-top-left-radius: 0px; - border-top-right-radius: 0px; + border-top-left-radius: 12px; + border-top-right-radius: 12px; + border-bottom-left-radius: 0px; + border-bottom-right-radius: 0px; background-color: @base00; color: @base05; padding: 0 0.5em; diff --git a/modules/nixos/system/security/basic.nix b/modules/nixos/system/security/basic.nix index db6dca7..eddd501 100644 --- a/modules/nixos/system/security/basic.nix +++ b/modules/nixos/system/security/basic.nix @@ -40,7 +40,7 @@ in { }; environment.systemPackages = with pkgs; [ - (mkIf (config.security.doas.enable) doas-sudo-shim) # if doas install doas sudo shim + (mkIf config.security.doas.enable doas-sudo-shim) # if doas install doas sudo shim ]; services.dbus = {