1
0
Fork 0
mirror of https://git.sr.ht/~neverness/ultima synced 2025-01-10 02:03:52 +00:00
ultima/modules/nixos/programs/default.nix
2024-12-09 10:15:55 +09:00

69 lines
1.8 KiB
Nix

{ x, pkgs, inputs, lib, config, flakeDir, True, False, ... }:
with lib;
with x;
let cfg = config.module.programs;
in {
options = {
module.programs = {
common.enable = mkBool;
hyprland.enable = mkBool;
sway.enable = mkBool;
steam.enable = mkBool;
torrserver.enable = mkBool;
hamachi = {
enable = mkBool;
gui.enable = mkBool;
};
pkgs = mkOpt.list.pkgs;
};
};
imports = [ ./torrserver ];
config = mkMerge [
(mkIf cfg.common.enable {
environment.systemPackages = [ ] ++ cfg.pkgs;
programs = {
nano = False;
light = True;
git = True // { package = mkDefault pkgs.gitMinimal; };
ryzen-monitor-ng = True;
nh = True // { flake = flakeDir; };
};
})
(mkIf cfg.hyprland.enable {
programs.hyprland = with inputs.hyprland.packages.${pkgs.system};
True // {
package = hyprland;
portalPackage = xdg-desktop-portal-hyprland;
};
})
(mkIf cfg.sway.enable {
programs.sway = True // { package = pkgs.swayfx; };
})
(mkIf cfg.hamachi.enable { services.logmein-hamachi = True; })
(mkIf cfg.hamachi.gui.enable { programs.haguichi = True; })
(mkIf cfg.steam.enable {
environment.systemPackages = with pkgs; [ protonup-qt ];
hardware.xone = True;
programs = {
gamescope = True;
gamemode = True;
steam = True // { # GAMING
gamescopeSession = True;
remotePlay.openFirewall = true;
extraCompatPackages = with pkgs; [ proton-ge-bin ];
package = pkgs.steam.override {
extraEnv = {
MANGOHUD = true;
OBS_VKCAPTURE = true;
RADV_TEX_ANISO = 16;
};
};
};
};
})
];
}