mirror of
https://git.sr.ht/~neverness/ultima
synced 2025-01-07 20:43:52 +00:00
70 lines
1.7 KiB
Nix
70 lines
1.7 KiB
Nix
{ pkgs, lib, config, inputs, flakeDir, True, False, ... }:
|
|
|
|
with lib;
|
|
|
|
let cfg = config.module.programs;
|
|
in {
|
|
options = {
|
|
module.programs = {
|
|
common.enable = mkEnableOption "";
|
|
hyprland.enable = mkEnableOption "";
|
|
sway.enable = mkEnableOption "";
|
|
steam.enable = mkEnableOption "";
|
|
torrserver.enable = mkEnableOption "";
|
|
pkgs = mkOption {
|
|
type = lib.types.listOf lib.types.package;
|
|
default = null;
|
|
};
|
|
};
|
|
};
|
|
|
|
imports = [ ./torrserver ];
|
|
config = mkMerge [
|
|
(mkIf cfg.common.enable {
|
|
environment = {
|
|
systemPackages = [ ] ++ cfg.pkgs;
|
|
pathsToLink = [ "/share/zsh" ];
|
|
};
|
|
programs = {
|
|
light = True;
|
|
git = True // { package = pkgs.gitMinimal; };
|
|
nh = True // {
|
|
flake = flakeDir;
|
|
clean = True // { extraArgs = "--keep-since 3d --keep 3"; };
|
|
};
|
|
nano = False;
|
|
};
|
|
})
|
|
(mkIf cfg.hyprland.enable {
|
|
programs = with pkgs;
|
|
let h = inputs.hyprland.packages.${system};
|
|
in {
|
|
hyprland = True // {
|
|
package = h.hyprland;
|
|
portalPackage = h.xdg-desktop-portal-hyprland;
|
|
};
|
|
};
|
|
})
|
|
(mkIf cfg.sway.enable {
|
|
programs = with pkgs; { sway = True // { package = swayfx; }; };
|
|
})
|
|
(mkIf cfg.steam.enable {
|
|
hardware.xone = True;
|
|
programs = {
|
|
gamescope = True;
|
|
steam = True // { # GAMING
|
|
package = pkgs.steam.override {
|
|
extraEnv = {
|
|
MANGOHUD = true;
|
|
OBS_VKCAPTURE = true;
|
|
RADV_TEX_ANISO = 16;
|
|
};
|
|
};
|
|
extraCompatPackages = with pkgs; [ proton-ge-bin ];
|
|
};
|
|
};
|
|
})
|
|
];
|
|
}
|
|
|