From dae3149a93cab4d1140526e15eb928d275f56128 Mon Sep 17 00:00:00 2001 From: Azat Bahawi Date: Fri, 7 Apr 2023 19:35:15 +0300 Subject: 2023-04-07 --- modules/common/common/nix/default.nix | 2 +- modules/common/profiles/email.nix | 22 +++++++++++++++++++--- modules/common/subversion.nix | 2 +- modules/nixos/games/gamemode.nix | 8 +++++++- modules/nixos/games/lutris.nix | 10 +--------- modules/nixos/mpd.nix | 2 ++ 6 files changed, 31 insertions(+), 15 deletions(-) (limited to 'modules') diff --git a/modules/common/common/nix/default.nix b/modules/common/common/nix/default.nix index c06296d..dc73d68 100644 --- a/modules/common/common/nix/default.nix +++ b/modules/common/common/nix/default.nix @@ -99,7 +99,7 @@ with lib; { patches = [./patches/alejandra-no-ads.patch]; }); - inherit (pkgsPR "224461" "sha256-5+GjqIYkHXfOFRFOZUiy+/OJ0USHrDp5vJebv3XErbw=") ntfy-sh; + inherit (pkgsPR "225109" "sha256-aLQcBwo2y92bn/nugidJtFCCEdkNOkSsTeoZ5B2Qt1c=") libvlc; } // (with super; let np = nodePackages; diff --git a/modules/common/profiles/email.nix b/modules/common/profiles/email.nix index e289c2e..9cc12d7 100644 --- a/modules/common/profiles/email.nix +++ b/modules/common/profiles/email.nix @@ -39,7 +39,18 @@ in { attrs ]; - pass = path: "${config.hm.programs.password-store.package}/bin/pass show ${path}"; + getPassword = { + path, + line ? 0, + }: + assert (builtins.isInt line); + concatStringsSep " " ( + [ + "${config.hm.programs.password-store.package}/bin/pass show ${path}" + ] + ++ optional (line > 0) + "| ${pkgs.gnused}/bin/sed -e '${toString line}!d'" + ); in rec { shire = mkAccount rec { address = my.email; @@ -64,7 +75,9 @@ in { tls.enable = true; }; userName = "azahi@shire.net"; - passwordCommand = pass "email/shire.net/azahi"; + passwordCommand = getPassword { + path = "email/shire.net/azahi"; + }; }; yahoo = mkAccount rec { @@ -74,7 +87,10 @@ in { flavor = "yahoo.com"; userName = "admin@yahoo.com"; - passwordCommand = pass "email/yahoo.com/admin"; + passwordCommand = getPassword { + path = "email/yahoo.com/admin"; + line = 2; + }; }; }; }; diff --git a/modules/common/subversion.nix b/modules/common/subversion.nix index 077f449..40ea07d 100644 --- a/modules/common/subversion.nix +++ b/modules/common/subversion.nix @@ -46,7 +46,7 @@ in { }; }; - packages = with pkgs; [(subversionClient.override {saslSupport = true;})]; + packages = [(pkgs.subversionClient.override {saslSupport = true;})]; }; }; } diff --git a/modules/nixos/games/gamemode.nix b/modules/nixos/games/gamemode.nix index 051d12e..193a764 100644 --- a/modules/nixos/games/gamemode.nix +++ b/modules/nixos/games/gamemode.nix @@ -9,5 +9,11 @@ in { options.nixfiles.modules.games.gamemode.enable = mkEnableOption "Feral GameMode"; - config = mkIf cfg.enable {programs.gamemode.enable = true;}; + config = mkIf cfg.enable { + hm.xdg.configFile."gamemode.ini".text = generators.toINI {} { + general.softrealtime = "auto"; + }; + + programs.gamemode.enable = true; + }; } diff --git a/modules/nixos/games/lutris.nix b/modules/nixos/games/lutris.nix index 2737953..ad1e43e 100644 --- a/modules/nixos/games/lutris.nix +++ b/modules/nixos/games/lutris.nix @@ -17,15 +17,7 @@ in { }; hm.home.packages = with pkgs; [ - (lutris.override { - lutris-unwrapped = lutris-unwrapped.override { - wine = buildFHSUserEnv { - # We don't really need Wine because Lutris downloads a required - # runtime for us. - name = "empty"; - }; - }; - }) + lutris vkBasalt winetricks ]; diff --git a/modules/nixos/mpd.nix b/modules/nixos/mpd.nix index 7540c14..b38ab9f 100644 --- a/modules/nixos/mpd.nix +++ b/modules/nixos/mpd.nix @@ -41,7 +41,9 @@ in { settings = rec { ncmpcpp_directory = "${config.dirs.data}/ncmpcpp"; + lyrics_directory = "${ncmpcpp_directory}/lyrics"; + lyrics_fetchers = "musixmatch, genius, internet"; playlist_disable_highlight_delay = 1; message_delay_time = 1; -- cgit 1.4.1