Refactor login.nix

This commit is contained in:
Kiana Sheibani 2024-07-05 01:46:31 -04:00
parent 2933c110b6
commit 4364155946

View file

@ -1,28 +1,27 @@
{ config, lib, pkgs, tokyo-night-sddm-src, ... }:
lib.mkIf (config.platform != "mobile")
(let
tokyo-night-sddm = with pkgs.libsForQt5; pkgs.stdenv.mkDerivation {
name = "tokyo-night-sddm";
src = tokyo-night-sddm-src;
installPhase = ''
let
tokyo-night-sddm = pkgs.stdenv.mkDerivation {
name = "tokyo-night-sddm";
src = tokyo-night-sddm-src;
installPhase = ''
cp -f ${./tokyo-night-sddm/theme.conf} ./theme.conf
mkdir -p $out/share/sddm/themes/tokyo-night-sddm
mv * $out/share/sddm/themes/tokyo-night-sddm
'';
};
in {
environment.systemPackages = with pkgs.libsForQt5; [
tokyo-night-sddm # Theme
qtbase
qtsvg
qtquickcontrols2
qtgraphicaleffects
];
};
in lib.mkIf (config.platform != "mobile") {
environment.systemPackages = with pkgs.libsForQt5; [
tokyo-night-sddm # Theme
qtbase
qtsvg
qtquickcontrols2
qtgraphicaleffects
];
services.displayManager.defaultSession = "hyprland";
services.displayManager.sddm = {
enable = true;
wayland.enable = true;
theme = "tokyo-night-sddm";
};
})
services.displayManager.defaultSession = "hyprland";
services.displayManager.sddm = {
enable = true;
wayland.enable = true;
theme = "tokyo-night-sddm";
};
}