Merge branch 'overhaul' of ssh://solis:34916/Koen/nix-config into overhaul

This commit is contained in:
KoenDR06 2025-09-03 16:45:45 +02:00
commit a16080e5fc
9 changed files with 39 additions and 21 deletions

View file

@ -3,10 +3,13 @@
./dev.nix
./terminal.nix
./terminal/zsh.nix
./visual.nix
./visual/firefox.nix
./server.nix
./gaming.nix
];
}

24
modules/apps/gaming.nix Normal file
View file

@ -0,0 +1,24 @@
{
lib,
config,
pkgs,
...
}: let
inherit (lib) mkEnableOption mkIf;
cfg = config.horseman.apps.gaming;
in {
options = {
horseman.apps.gaming = {
enable = mkEnableOption "Games and things for games";
};
};
config = mkIf cfg.enable {
programs.steam = {
enable = true;
remotePlay.openFirewall = false; # Open ports in the firewall for Steam Remote Play
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
};
};
}

View file

@ -0,0 +1,55 @@
{
lib,
config,
pkgs,
...
}: let
inherit (lib) mkEnableOption mkIf;
cfg = config.horseman.apps.terminal.zsh;
in {
options = {
horseman.apps.terminal.zsh = {
enable = mkEnableOption "The ZSH shell and plugins for it";
};
};
config = mkIf cfg.enable {
users.defaultUserShell = pkgs.zsh;
environment.shells = with pkgs; [zsh];
programs.zsh = {
enable = true;
enableCompletion = true;
histSize = 10000;
shellAliases = {
clone-dotfiles = "cp -r /home/horseman/nix-config/config/dotfiles/.\* /home/horseman/";
rebuild = "function _rebuild(){clone-dotfiles && sudo nixos-rebuild switch --flake \"$@\" && nix fmt *}; _rebuild";
update = "sudo nix flake update && git commit flake.lock -m 'Update flake.lock: $(date +%y-%m-%d)' && rebuild";
compose = "sudo docker compose";
wolpc = "wakeonlan D8:5E:D3:A8:B1:0A";
capture-config = "nix run github:pjones/plasma-manager > ~/nix-config/modules/wm/plasma/default.nix";
reboot-to-windows = "sudo efibootmgr -n 0000";
mkdir = "mkdir -p";
l = "ls -lAh --group-directories-first";
zip = "zip -r";
cat = "bat";
py = "python3";
};
ohMyZsh = {
enable = true;
plugins = [
"zsh-interactive-cd"
"git-auto-fetch"
"wd"
];
theme = "theme";
custom = "/home/horseman/nix-config/config/zsh";
};
shellInit = "eval \"$(direnv hook zsh)\"";
};
};
}