refactor rice into config

This commit is contained in:
atagen 2025-07-21 12:26:28 +10:00
parent 08c13ea2bc
commit 9a1217044c
64 changed files with 225 additions and 230 deletions

76
graphical/shell.nix Normal file
View file

@ -0,0 +1,76 @@
{
pkgs,
lib,
inputs,
mainUser,
config,
...
}:
let
inherit (lib) getExe getExe';
inherit (config) rice;
in
{
# quickshell stuff
environment.systemPackages =
builtins.attrValues {
inherit (pkgs.kdePackages) qtbase qtdeclarative;
inherit (pkgs) wl-clipboard;
}
++ [
(inputs.quickshell.packages.${pkgs.system}.default.override {
withHyprland = false;
withI3 = false;
})
];
hm.systemd.user.services.quickshell = {
Unit.PartOf = [ "graphical-session.target" ];
Unit.After = [
"graphical-session.target"
"niri.service"
];
Install.WantedBy = [ "graphical-session.target" ];
Service = {
ExecStart = "${getExe' (inputs.quickshell.packages.${pkgs.system}.default.override {
withHyprland = false;
withI3 = false;
}) "qs"}";
};
};
hm.quickServices = {
"swaync" = "${getExe pkgs.swaynotificationcenter}";
"swaybg" = "${getExe pkgs.swaybg} -m fill -i ${rice.bg.src}";
"swayidle" =
let
niri = inputs.niri.packages.${pkgs.system}.niri-unstable;
systemctl = getExe' pkgs.systemd "systemctl";
in
''
${lib.getExe pkgs.swayidle} -w \
timeout 1800 '${systemctl} suspend' \
timeout 600 '${niri} msg action power-off-monitors'
'';
};
hm.systemd.user.targets.tray = {
Unit = {
Description = "Home Manager System Tray";
Requires = [ "graphical-session.target" ];
};
};
imports = [ inputs.arbys.nixosModules.arbys ];
environment = {
arbys = {
enable = true;
clobber = true;
};
files."/home/${mainUser}/.config/quickshell" = {
source = "/home/${mainUser}/.nix/graphical/shell/quickshell";
uid = 1000;
gid = 100;
};
};
}