From cf7f8dcda7265bc58e9284facf41197c0c829ee3 Mon Sep 17 00:00:00 2001 From: Rouven Seifert Date: Mon, 5 Jun 2023 12:31:07 +0200 Subject: [PATCH] bettered up the pww package --- flake.lock | 18 +++++++++--------- pkgs/pww/default.nix | 18 ++++++++++-------- users/rouven/fixes.nix | 8 +++++++- users/rouven/modules/hyprland/waybar.nix | 4 ++-- users/rouven/modules/ssh/default.nix | 1 + users/rouven/modules/theme/default.nix | 8 ++++++-- 6 files changed, 35 insertions(+), 22 deletions(-) diff --git a/flake.lock b/flake.lock index 86f9592..9906c27 100644 --- a/flake.lock +++ b/flake.lock @@ -165,11 +165,11 @@ ] }, "locked": { - "lastModified": 1685865037, - "narHash": "sha256-atwfu0IUL2f6oWFt3KG1uqPTj7DxUoYW7+KVOv+o5DY=", + "lastModified": 1685885003, + "narHash": "sha256-+OB0EvZBfGvnlTGg6mtyUCqkMnUp9DkmRUU4d7BZBVE=", "owner": "nix-community", "repo": "home-manager", - "rev": "57ed23cd29e7b72518e19d2917e2b2880a94162c", + "rev": "607d8fad96436b134424b9935166a7cd0884003e", "type": "github" }, "original": { @@ -185,11 +185,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1685808451, - "narHash": "sha256-IxiTI9WDvhIM8ciAmBX+EARu/B4h+quWLo/8w86tXrc=", + "lastModified": 1685951361, + "narHash": "sha256-Hx9yVkyEjVf5ohiWW2HmSuGgxDaVOqGLMIGSz/HV6f8=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "df98db50924c05f0bd7a8c95cdab5d4ece13a1f1", + "rev": "1a4e6e6a4b3272118a51bebb4a45ecd642383209", "type": "github" }, "original": { @@ -268,11 +268,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1685709197, - "narHash": "sha256-ASoXZVoXj6L9PzNDfuDrAxrqaDuH7e1qTzdzkOODu4M=", + "lastModified": 1685953862, + "narHash": "sha256-aROVoLllFZde9EWr3EP97fXIlOghgrdmO6TeYkZRs5g=", "owner": "nix-community", "repo": "lanzaboote", - "rev": "e422970c1bc3351bb7a20cf6e30e78d975280ed3", + "rev": "45d04a45d3dfcdee5246f7c0dfed056313de2a61", "type": "github" }, "original": { diff --git a/pkgs/pww/default.nix b/pkgs/pww/default.nix index a13b8ff..7d4f39c 100644 --- a/pkgs/pww/default.nix +++ b/pkgs/pww/default.nix @@ -1,24 +1,26 @@ -{ stdenv, lib, buildGoModule, path, pkgs, go, fetchFromGitHub, playerctl }: +{ lib, buildGoModule, makeWrapper, fetchFromGitHub, playerctl }: buildGoModule rec { pname = "pww"; - version = "unstable-2023-04-06"; + version = "0.0.6"; src = fetchFromGitHub { owner = "abenz1267"; repo = "pww"; - rev = "8c973e600052d1c94a0921ed10d0723c123187c6"; # unstable because 6.0.0 has some crashes - hash = "sha256-IqLo1MlPGaM0n0TEhptiM5FvqJ8bsEPn7N2EEL6iWK8="; + rev = "v${version}"; + hash = "sha256-nqNSzipOa0gj9qF49f/1R5QZMSY9xmjBnAVkiXdrSa4="; }; - buildInputs = [ playerctl ]; - - outputs = [ "out" ]; + nativeBuildInputs = [ makeWrapper ]; vendorSha256 = "sha256-3PnXB8AfZtgmYEPJuh0fwvG38dtngoS/lxyx3H+rvFs="; + postInstall = '' + wrapProgram $out/bin/${pname} \ + --prefix PATH : "${lib.makeBinPath [ playerctl ]}" + ''; meta = with lib; { description = "Utility wrapper around playerctl"; - homepage = "https://github.com/Mic92/sops-nix"; + homepage = "https://github.com/abenz1267/pww"; license = licenses.mit; maintainers = with maintainers; [ therealr5 ]; platforms = platforms.all; diff --git a/users/rouven/fixes.nix b/users/rouven/fixes.nix index ea1ca7b..396f429 100644 --- a/users/rouven/fixes.nix +++ b/users/rouven/fixes.nix @@ -1,5 +1,11 @@ -{ pkgs, ... }: +{ pkgs, lib, ... }: { + + # fixes qt themes + environment.variables = { + "QT_STYLE_OVERRIDE" = lib.mkForce "kvantum"; + "QT_QPA_PLATFORMTHEME" = lib.mkForce "Dracula"; + }; # open ports for kde connect networking.firewall = rec { allowedTCPPortRanges = [{ from = 1714; to = 1764; }]; diff --git a/users/rouven/modules/hyprland/waybar.nix b/users/rouven/modules/hyprland/waybar.nix index fd37dbd..6534dc0 100644 --- a/users/rouven/modules/hyprland/waybar.nix +++ b/users/rouven/modules/hyprland/waybar.nix @@ -1,6 +1,6 @@ { self, config, pkgs, hyprland, ... }: { - systemd.user.services.waybar.Service.Environment = "PATH=${pkgs.hyprland}/bin:${pkgs.playerctl}/bin:${pkgs.pulseaudio}/bin"; + systemd.user.services.waybar.Service.Environment = "PATH=${pkgs.hyprland}/bin"; programs.waybar = { enable = true; systemd.enable = true; @@ -33,7 +33,7 @@ format = " {}"; max-length = 80; return-type = "json"; - exec = "${self.packages.x86_64-linux.pww}/bin/pww -w spotifyd:title -f '{{title}} - {{artist}}' -p None 2> /dev/null"; + exec = "${self.packages.x86_64-linux.pww}/bin/pww -w spotifyd:title -p None 2> /dev/null"; }; cpu = { format = "{usage}% "; diff --git a/users/rouven/modules/ssh/default.nix b/users/rouven/modules/ssh/default.nix index 12d871d..87d2d77 100644 --- a/users/rouven/modules/ssh/default.nix +++ b/users/rouven/modules/ssh/default.nix @@ -19,6 +19,7 @@ in user = "root"; port = 2222; }; + falkenstein-1 = matchBlocks."rfive.de"; "kaki" = { hostname = "kaki.ifsr.de"; user = "root"; diff --git a/users/rouven/modules/theme/default.nix b/users/rouven/modules/theme/default.nix index 6a6a21a..1dd21c5 100644 --- a/users/rouven/modules/theme/default.nix +++ b/users/rouven/modules/theme/default.nix @@ -1,12 +1,11 @@ { pkgs, nix-colors, ... }: { - # home.packages = with pkgs; [ libsForQt5.qtstyleplugin-kvantum ]; + home.packages = with pkgs; [ libsForQt5.qtstyleplugin-kvantum ]; colorScheme = nix-colors.colorSchemes.dracula; # theme hardcoded to dracula, too lazy to make all this base16 home.sessionVariables.GTK_THEME = "Dracula"; - home.sessionVariables.QT_QPA_PLATFORMTHEME = "Dracula"; qt = { enable = true; style = { @@ -31,4 +30,9 @@ package = pkgs.dracula-theme; size = 16; }; + xdg.configFile = { + "Kvantum/Dracula/Dracula.kvconfig".source = "${pkgs.dracula-theme}/share/Kvantum/Dracula/Dracula.kvconfig"; + "Kvantum/Dracula/Dracula.svg".source = "${pkgs.dracula-theme}/share/Kvantum/Dracula/Dracula.svg"; + "Kvantum/kvantum.kvconfig".text = "[General]\ntheme=Dracula"; + }; }