The Great Modularization

This commit is contained in:
wo2wz 2025-07-20 13:02:43 -04:00
parent e0b7d60a8d
commit eb279f1f65
34 changed files with 1356 additions and 1286 deletions

10
modules/nixos/default.nix Normal file
View file

@ -0,0 +1,10 @@
{ config, ... }:
{
imports = [
./gaming.nix
./kde.nix
# ./niri.nix
./ssh.nix
];
}

28
modules/nixos/gaming.nix Normal file
View file

@ -0,0 +1,28 @@
{ inputs, config, pkgs, ... }:
let
nixpkgs-unstable = import inputs.nixpkgs-unstable {
system = "${pkgs.system}";
config.allowUnfree = true;
};
in {
programs = {
gamemode.enable = true; # performance tuning for games
steam = {
enable = true;
extraCompatPackages = [ pkgs.proton-ge-bin ];
};
};
environment.systemPackages = with pkgs; [
# heroic games launcher
heroic
(prismlauncher.override {
# Change Java runtimes available to Prism Launcher
jdks = [
jdk8
nixpkgs-unstable.graalvmPackages.graalvm-oracle_17
inputs.nixpkgs-pin.legacyPackages.${pkgs.system}.graalvm-ce
];
})
];
}

26
modules/nixos/kde.nix Normal file
View file

@ -0,0 +1,26 @@
{ config, pkgs, ... }:
{
services = {
xserver.enable = true;
displayManager.sddm = {
enable = true;
wayland = {
enable = true;
compositor = "kwin";
};
};
desktopManager.plasma6.enable = true;
};
programs.kdeconnect.enable = true;
# remove unnecessary packages
environment.plasma6.excludePackages = with pkgs.kdePackages; [
elisa
discover
konsole
khelpcenter
krdp
];
}

12
modules/nixos/niri.nix Normal file
View file

@ -0,0 +1,12 @@
{ config, ... }:
{
programs.niri.enable = true;
environment.systemPackages = with pkgs; [
fuzzel
mako
waybar
xwayland-satellite
];
}

22
modules/nixos/ssh.nix Normal file
View file

@ -0,0 +1,22 @@
{ config, pkgs, ... }:
{
programs.ssh = {
startAgent = true;
enableAskPassword = true;
extraConfig = "
Host gameserver
Hostname 192.168.2.221
Port 22
User wo2w
IdentityFile /home/wo2w/.ssh/ssh-key
";
};
environment = {
systemPackages = if config.services.desktopManager.plasma6.enable then with pkgs; [ kdePackages.ksshaskpass ] else [];
variables = {
SSH_ASKPASS_REQUIRE = "prefer";
};
};
}