1
0
Fork 0
mirror of https://git.sr.ht/~neverness/ultima synced 2025-01-10 02:23:53 +00:00
ultima/modules/nixos/programs/default.nix

69 lines
1.8 KiB
Nix
Raw Normal View History

{ x, pkgs, inputs, lib, config, ... }:
2024-11-21 09:24:15 +00:00
with lib;
2024-12-09 01:15:55 +00:00
with x;
2024-11-21 09:24:15 +00:00
let cfg = config.module.programs;
in {
options = {
module.programs = {
pkgs = mkOpt.list.pkgs;
2024-12-09 01:15:55 +00:00
common.enable = mkBool;
hyprland.enable = mkBool;
sway.enable = mkBool;
steam.enable = mkBool;
torrserver.enable = mkBool;
hamachi = {
enable = mkBool;
gui.enable = mkBool;
2024-11-21 09:24:15 +00:00
};
};
};
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-12-06 12:57:22 +00:00
git = True // { package = mkDefault pkgs.gitMinimal; };
2024-12-09 01:15:55 +00:00
ryzen-monitor-ng = True;
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-06 12:57:22 +00:00
(mkIf cfg.hamachi.enable { services.logmein-hamachi = True; })
(mkIf cfg.hamachi.gui.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;
};
};
};
};
})
];
}