From 558c12035e8c7ec81c07701e2d20ffe37dff84e8 Mon Sep 17 00:00:00 2001 From: punkfairie Date: Sun, 20 Oct 2024 18:37:56 -0700 Subject: [PATCH] fix(sddm): Move pkg derv to it's own file Nix was complaining that it wasn't a valid package so moved to it's own file and called with callPackage() --- modules/nixos/sddm-rose-pine-pkg.nix | 21 +++++++++++++++++++++ modules/nixos/sddm.nix | 24 ++---------------------- 2 files changed, 23 insertions(+), 22 deletions(-) create mode 100644 modules/nixos/sddm-rose-pine-pkg.nix diff --git a/modules/nixos/sddm-rose-pine-pkg.nix b/modules/nixos/sddm-rose-pine-pkg.nix new file mode 100644 index 0000000..26326de --- /dev/null +++ b/modules/nixos/sddm-rose-pine-pkg.nix @@ -0,0 +1,21 @@ +{ + stdenvNoCC, + libsForQt5, + sources, +}: +stdenvNoCC.mkDerivation { + pname = "sddm-rose-pine-theme"; + version = "1.2"; + dontBuild = true; + + propagatedUserEnvPkgs = [ + libsForQt5.qt5.qtgraphicaleffects + ]; + + src = sources.sddm-rose-pine; + + installPhase = '' + mkdir -p $out/share/sddm/themes + cp -aR $src $out/share/sddm/themes/rose-pine + ''; +} diff --git a/modules/nixos/sddm.nix b/modules/nixos/sddm.nix index b04dd76..fab4c10 100644 --- a/modules/nixos/sddm.nix +++ b/modules/nixos/sddm.nix @@ -1,6 +1,7 @@ { lib, config, + pkgs, ... }: let inherit (config.rose-pine) sources; @@ -13,28 +14,7 @@ in { services.displayManager.sddm.theme = "rose-pine"; environment.systemPackages = [ - ( - { - stdenvNoCC, - libsForQt5, - }: - stdenvNoCC.mkDerivation { - pname = "sddm-rose-pine-theme"; - version = "1.2"; - dontBuild = true; - - propagatedUserEnvPkgs = [ - libsForQt5.qt5.qtgraphicaleffects - ]; - - src = sources.sddm; - - installPhase = '' - mkdir -p $out/share/sddm/themes - cp -aR $src $out/share/sddm/themes/rose-pine - ''; - } - ) + (pkgs.callPackage ./sddm-rose-pine-pkg.nix {inherit sources;}) ]; }; }