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

75 lines
1.9 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 {
environment = {
systemPackages = [ ] ++ cfg.pkgs;
pathsToLink = [ "/share/zsh" ];
};
programs = {
light = True;
2024-12-03 14:20:37 +00:00
nano = False;
2024-11-21 09:24:15 +00:00
git = True // { package = pkgs.gitMinimal; };
nh = True // {
flake = flakeDir;
clean = True // { extraArgs = "--keep-since 3d --keep 3"; };
};
};
})
(mkIf cfg.hyprland.enable {
2024-11-23 14:31:05 +00:00
programs = {
hyprland = with pkgs;
let h = inputs.hyprland.packages.${system};
in True // {
2024-11-21 09:24:15 +00:00
package = h.hyprland;
portalPackage = h.xdg-desktop-portal-hyprland;
};
2024-11-23 14:31:05 +00:00
};
2024-11-21 09:24:15 +00:00
})
(mkIf cfg.sway.enable {
2024-11-23 14:31:05 +00:00
programs = { sway = True // { package = pkgs.swayfx; }; };
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;
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;
};
};
};
};
})
2024-12-03 14:20:37 +00:00
(mkIf cfg.hamachi.enable { programs.haguichi = True; })
2024-11-21 09:24:15 +00:00
];
}