Refactor options.nix as separate file

This commit is contained in:
2026-08-31 00:43:07 +02:00
parent a4d8971a77
commit 4e8aea6a24
18 changed files with 266 additions and 276 deletions
-3
View File
@@ -1,8 +1,5 @@
{ config, lib, pkgs, modulesPath, ... }:
{
options.lumpiasty.gaming = lib.mkEnableOption "Enable options specific to gaming computers";
options.lumpiasty.scx = lib.mkEnableOption "Enable sched-ext";
config = lib.mkIf config.lumpiasty.gaming {
# https://github.com/NixOS/nixpkgs/blob/10e687235226880ed5e9f33f1ffa71fe60f2638a/nixos/modules/programs/steam.nix
hardware.graphics = {
-2
View File
@@ -6,8 +6,6 @@
# defaults, mirroring the Fedora 45 change:
# https://fedoraproject.org/wiki/Changes/IPv6-Mostly_Support_In_NetworkManager
{
options.lumpiasty.ipv6Mostly = lib.mkEnableOption "Enable IPv6-mostly (RFC 8925 + CLAT/464XLAT) support in NetworkManager";
config = lib.mkIf config.lumpiasty.ipv6Mostly {
# Use the patched NM build with CLAT support, without replacing pkgs.networkmanager
# globally (which would cascade rebuilds across the entire system closure).
-6
View File
@@ -1,6 +0,0 @@
{config, lib, pkgs, modulesPath, ... }:
{
options.lumpiasty.pc = lib.mkEnableOption "Enable options specific to personal computers";
options.lumpiasty.laptop = lib.mkEnableOption "Enable options specific to laptops";
}
-2
View File
@@ -1,8 +1,6 @@
{ config, lib, pkgs, modulesPath, ... }:
{
options.lumpiasty.sshd = lib.mkEnableOption "Enable intel CPU";
config = lib.mkIf config.lumpiasty.sshd {
services.openssh = {
enable = true;
-6
View File
@@ -10,12 +10,6 @@ let
mkUser = import ../../lib/mkUser.nix { inherit lib; };
in
{
options.lumpiasty.users = {
user = lib.mkEnableOption "Create user \"user\"";
drugi = lib.mkEnableOption "Create user \"drugi\"";
};
config = {
# Install system-wide docker because rootless causes issues with binfmt
virtualisation.docker.enable = config.lumpiasty.pc;