From c6c49b62b5170e44ebe5d1ae8d634227f6707e11 Mon Sep 17 00:00:00 2001 From: Donovan Glover Date: Sun, 7 Apr 2024 10:41:16 -0400 Subject: [PATCH] chore: Improve formatting --- containers/wine.nix | 6 +++--- home/hyprland.nix | 19 +++++++++---------- modules/containers.nix | 2 +- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/containers/wine.nix b/containers/wine.nix index 30b19d54..3017ba86 100644 --- a/containers/wine.nix +++ b/containers/wine.nix @@ -1,9 +1,9 @@ { nix-config, config, lib, pkgs, ... }: let - inherit (nix-config.inputs) sakaya; + inherit (nix-config.inputs.sakaya.packages.${pkgs.system}) sakaya; inherit (config.modules.system) username; - inherit (lib) singleton; + inherit (lib) singleton getExe; sakayaPort = 39493; in @@ -30,7 +30,7 @@ in ]; serviceConfig = { - ExecStart = "/usr/bin/env su ${username} --command=${sakaya.packages.${pkgs.system}.sakaya}/bin/sakaya"; + ExecStart = "/usr/bin/env su ${username} --command=${getExe sakaya}"; }; wantedBy = [ "multi-user.target" ]; diff --git a/home/hyprland.nix b/home/hyprland.nix index e24181b5..4281ee04 100644 --- a/home/hyprland.nix +++ b/home/hyprland.nix @@ -1,16 +1,19 @@ { pkgs, ... }: let - inherit (pkgs) polkit_gnome; + inherit (pkgs) polkit_gnome callPackage; opacity = "0.95"; super = "SUPER"; + hycov = callPackage ../packages/hycov.nix { }; + raiseVolumeScript = "hypr/raise-volume.fish"; lowerVolumeScript = "hypr/lower-volume.fish"; gapsScript = "hypr/gaps.sh"; randomBackgroundScript = "hypr/random-bg.fish"; swapBackgroundScript = "hypr/swap-bg.fish"; + setBackgroundScript = "hypr/set-bg.fish"; in { home.packages = with pkgs; [ @@ -41,7 +44,7 @@ in enable = true; plugins = [ - (pkgs.callPackage ../packages/hycov.nix { }) + hycov ]; settings = { @@ -320,7 +323,7 @@ in ''; }; - xdg.configFile."hypr/set-bg.fish" = { + xdg.configFile.${setBackgroundScript} = { executable = true; text = /* fish */ '' #!/usr/bin/env fish @@ -351,10 +354,8 @@ in text = /* fish */ '' #!/usr/bin/env fish - cd ~/.config/hypr - for monitor in (hyprctl monitors -j | jq -r '.[].name') - ./set-bg.fish "$monitor" "$(random choice $(fd . /run/current-system/sw/share/backgrounds/Spring2024FanartSubmissions --follow -e jpg -e png))" + ~/.config/${setBackgroundScript} "$monitor" "$(random choice $(fd . /run/current-system/sw/share/backgrounds/Spring2024FanartSubmissions --follow -e jpg -e png))" end ''; }; @@ -368,10 +369,8 @@ in set M1 "$(echo "$M" | head -n 1)" set M2 "$(echo "$M" | tail -n 1)" - cd ~/.config/hypr - - ./set-bg.fish "$(swww query | choose 0 | choose -c 0..-1 | tail -n 1)" $M1 - ./set-bg.fish "$(swww query | choose 0 | choose -c 0..-1 | head -n 1)" $M2 + ~/.config/${setBackgroundScript} "$(swww query | choose 0 | choose -c 0..-1 | tail -n 1)" $M1 + ~/.config/${setBackgroundScript} "$(swww query | choose 0 | choose -c 0..-1 | head -n 1)" $M2 ''; }; diff --git a/modules/containers.nix b/modules/containers.nix index 7c41d6ed..18261592 100644 --- a/modules/containers.nix +++ b/modules/containers.nix @@ -55,7 +55,7 @@ in hostAddress = "192.168.100.34"; localAddress = "192.168.100.49"; - config = { lib, pkgs, ... }: { + config = { ... }: { imports = [ ../containers ../containers/wine.nix