1
0
Fork 0
mirror of https://git.sr.ht/~neverness/ultima synced 2025-01-08 19:33:54 +00:00
ultima/modules/nixos/programs/default.nix

67 lines
1.8 KiB
Nix
Raw Normal View History

2024-11-27 10:37:54 +00:00
{ pkgs, inputs, lib, config, flakeDir, True, False, ... }:
2024-11-21 09:24:15 +00:00
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 "";
2024-12-03 14:20:37 +00:00
hamachi.enable = mkEnableOption "";
2024-11-21 09:24:15 +00:00
pkgs = mkOption {
2024-11-23 14:31:05 +00:00
type = types.listOf types.package;
2024-11-21 09:24:15 +00:00
default = null;
};
};
};
imports = [ ./torrserver ];
config = mkMerge [
(mkIf cfg.common.enable {
2024-12-04 09:53:29 +00:00
environment.systemPackages = [ ] ++ cfg.pkgs;
2024-11-21 09:24:15 +00:00
programs = {
2024-12-03 14:20:37 +00:00
nano = False;
2024-12-04 09:53:29 +00:00
light = True;
2024-11-21 09:24:15 +00:00
git = True // { package = pkgs.gitMinimal; };
2024-12-04 09:53:29 +00:00
nh = True // { flake = flakeDir; };
2024-11-21 09:24:15 +00:00
};
})
(mkIf cfg.hyprland.enable {
2024-12-04 09:53:29 +00:00
programs.hyprland = with inputs.hyprland.packages.${pkgs.system};
True // {
package = hyprland;
portalPackage = xdg-desktop-portal-hyprland;
};
2024-11-21 09:24:15 +00:00
})
(mkIf cfg.sway.enable {
2024-12-04 09:53:29 +00:00
programs.sway = True // { package = pkgs.swayfx; };
2024-11-21 09:24:15 +00:00
})
2024-12-04 09:53:29 +00:00
(mkIf cfg.hamachi.enable { programs.haguichi = True; })
2024-11-21 09:24:15 +00:00
(mkIf cfg.steam.enable {
2024-12-03 14:20:37 +00:00
environment.systemPackages = with pkgs; [ protonup-qt ];
2024-11-21 09:24:15 +00:00
hardware.xone = True;
programs = {
gamescope = True;
2024-12-03 14:20:37 +00:00
gamemode = True;
2024-11-21 09:24:15 +00:00
steam = True // { # GAMING
2024-12-03 14:20:37 +00:00
gamescopeSession = True;
2024-12-04 09:53:29 +00:00
remotePlay.openFirewall = true;
2024-12-03 14:20:37 +00:00
extraCompatPackages = with pkgs; [ proton-ge-bin ];
2024-11-21 09:24:15 +00:00
package = pkgs.steam.override {
extraEnv = {
MANGOHUD = true;
OBS_VKCAPTURE = true;
RADV_TEX_ANISO = 16;
};
};
};
};
})
];
}