many changes: prepare to allow multiple users

This commit is contained in:
Sean Kovacs 2026-04-02 19:36:49 -04:00
commit fab570dd29
Signed by: sckova
GPG key ID: 00F325187C68651A
42 changed files with 80 additions and 158 deletions

View file

@ -72,14 +72,6 @@
... ...
}: }:
let let
# All systems we want to support for the generic VM
# to run the vm:
# nixos-rebuild build-vm --flake ~/nix#$(nix eval --raw --impure --expr 'builtins.currentSystem')
supportedSystems = [
"x86_64-linux"
"aarch64-linux"
];
# Shared config for all package sets # Shared config for all package sets
pkgConfig = { pkgConfig = {
allowUnfree = true; allowUnfree = true;
@ -139,11 +131,6 @@
"root" "root"
"sckova" "sckova"
]; ];
# Increase file descriptor limit for builds
# sandbox = "relaxed";
# extra-sandbox-paths = [ ];
# build-users-group = "nixbld";
}; };
gc = { gc = {
@ -170,9 +157,10 @@
]; ];
}; };
} }
./options.nix
./system ./system
./system/searxng ./system/searxng
./system/torrenting ./system/games
./system/widevine ./system/widevine
./system/shell/fish.nix ./system/shell/fish.nix
./system/tailscale ./system/tailscale
@ -189,12 +177,13 @@
imports = [ imports = [
./home ./home
./options.nix ./options.nix
./home/apps ./home/sckova
./home/games ./home/sckova/apps
./home/hosts/${hostname} ./home/sckova/games
./home/services ./home/sckova/hosts/${hostname}
./home/terminal ./home/sckova/services
./home/tiling ./home/sckova/terminal
./home/sckova/tiling
]; ];
}; };
sharedModules = [ sharedModules = [
@ -238,8 +227,8 @@
home.username = user; home.username = user;
home.homeDirectory = "/home/${user}"; home.homeDirectory = "/home/${user}";
modules = [ modules = [
./home ./home/${user}
./home/hosts/${hostname}.nix ./home/${user}/hosts/${hostname}.nix
home-manager.homeModules.home-manager home-manager.homeModules.home-manager
niri.homeModules.default niri.homeModules.default
noctalia.homeModules.noctalia noctalia.homeModules.noctalia
@ -266,14 +255,7 @@
} }
]; ];
}; };
} };
// nixpkgs.lib.genAttrs supportedSystems (
system:
mkNixosSystem {
hostname = "vm-generic";
inherit system;
}
);
homeConfigurations = { homeConfigurations = {
peach = mkHomeConfig { peach = mkHomeConfig {
@ -286,14 +268,6 @@
hostname = "alien"; hostname = "alien";
system = "x86_64-linux"; system = "x86_64-linux";
}; };
} };
// nixpkgs.lib.genAttrs supportedSystems (
system:
mkHomeConfig {
user = "sckova";
hostname = "vm-generic";
inherit system;
}
);
}; };
} }

View file

@ -1,11 +0,0 @@
{
config,
pkgs,
...
}:
{
colors = {
scheme = "catppuccin-mocha";
accent = "base0B";
};
}

8
home/sckova/default.nix Normal file
View file

@ -0,0 +1,8 @@
{
# the user to activate
userOptions = {
name = "Sean Kovacs";
username = "sckova";
email = "kovacsmillio@gmail.com";
};
}

View file

@ -348,7 +348,7 @@
animationDisabled = false; animationDisabled = false;
animationSpeed = 1; animationSpeed = 1;
autoStartAuth = false; autoStartAuth = false;
avatarImage = "/home/sckova/.face"; avatarImage = "/home/${config.userOptions.username}/.face";
boxRadiusRatio = 1; boxRadiusRatio = 1;
clockFormat = "hh\\nmm"; clockFormat = "hh\\nmm";
clockStyle = "custom"; clockStyle = "custom";
@ -559,7 +559,7 @@
wallpaper = { wallpaper = {
automationEnabled = false; automationEnabled = false;
directory = "/home/sckova/.local/share/wallpaper"; directory = "/home/${config.userOptions.username}/.local/share/wallpaper";
enableMultiMonitorDirectories = false; enableMultiMonitorDirectories = false;
enabled = false; enabled = false;
fillColor = "#1e1e2e"; fillColor = "#1e1e2e";

View file

@ -19,24 +19,24 @@
userOptions = { userOptions = {
name = lib.mkOption { name = lib.mkOption {
type = lib.types.str; type = lib.types.str;
readOnly = true; readOnly = false;
default = "Sean Kovacs"; default = "Sean Kovacs";
}; };
username = lib.mkOption { username = lib.mkOption {
type = lib.types.str; type = lib.types.str;
readOnly = true; readOnly = false;
default = "sckova"; default = "sckova";
}; };
email = lib.mkOption {
type = lib.types.str;
readOnly = false;
default = "kovacsmillio@gmail.com";
};
hostname = lib.mkOption { hostname = lib.mkOption {
type = lib.types.str; type = lib.types.str;
readOnly = true; readOnly = true;
default = config.system.name; default = config.system.name;
}; };
email = lib.mkOption {
type = lib.types.str;
readOnly = true;
default = "kovacsmillio@gmail.com";
};
fontSans = { fontSans = {
name = lib.mkOption { name = lib.mkOption {
type = lib.types.str; type = lib.types.str;

View file

@ -7,6 +7,13 @@
... ...
}: }:
{ {
# the user to activate
userOptions = {
name = "Sean Kovacs";
username = "sckova";
email = "kovacsmillio@gmail.com";
};
boot = { boot = {
plymouth.enable = true; plymouth.enable = true;
plymouth.logo = "${pkgs.nixos-icons}/share/icons/hicolor/64x64/apps/nix-snowflake-white.png"; plymouth.logo = "${pkgs.nixos-icons}/share/icons/hicolor/64x64/apps/nix-snowflake-white.png";
@ -49,19 +56,6 @@
}; };
programs = { programs = {
gamescope = {
enable = true;
capSysNice = false;
args = [
"--output-width 3840"
"--nested-width 3840"
"--output-height 2160"
"--nested-height 2160"
"--expose-wayland"
"--fullscreen"
];
};
gamemode.enable = true;
gnupg.agent = { gnupg.agent = {
enable = true; enable = true;
enableSSHSupport = true; enableSSHSupport = true;
@ -107,7 +101,7 @@
services = { services = {
displayManager = { displayManager = {
autoLogin.enable = true; autoLogin.enable = true;
autoLogin.user = "sckova"; autoLogin.user = config.userOptions.username;
defaultSession = "niri"; defaultSession = "niri";
sddm.enable = true; sddm.enable = true;
sddm.wayland.enable = true; sddm.wayland.enable = true;
@ -128,17 +122,6 @@
upower.enable = true; upower.enable = true;
power-profiles-daemon.enable = true; power-profiles-daemon.enable = true;
openssh.enable = true; openssh.enable = true;
ananicy = {
enable = true;
package = pkgs.ananicy-cpp;
rulesProvider = pkgs.ananicy-cpp;
extraRules = [
{
"name" = "gamescope";
"nice" = -20;
}
];
};
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

37
system/games/default.nix Normal file
View file

@ -0,0 +1,37 @@
{
config,
pkgs,
lib,
...
}:
{
programs = {
gamescope = {
enable = true;
capSysNice = false;
args = [
"--output-width 3840"
"--nested-width 3840"
"--output-height 2160"
"--nested-height 2160"
"--expose-wayland"
"--fullscreen"
];
};
gamemode.enable = true;
};
services = {
ananicy = {
enable = true;
package = pkgs.ananicy-cpp;
rulesProvider = pkgs.ananicy-cpp;
extraRules = [
{
"name" = "gamescope";
"nice" = -20;
}
];
};
};
}

View file

@ -17,7 +17,7 @@
]; ];
# enable ddcutil # enable ddcutil
users.users.sckova.extraGroups = [ "i2c" ]; users.users.${config.userOptions.username}.extraGroups = [ "i2c" ];
boot.extraModulePackages = [ config.boot.kernelPackages.ddcci-driver ]; boot.extraModulePackages = [ config.boot.kernelPackages.ddcci-driver ];
boot.kernelModules = [ boot.kernelModules = [
"i2c-dev" "i2c-dev"
@ -78,7 +78,7 @@
# i don't even remember what this does or why i added it # i don't even remember what this does or why i added it
systemd.tmpfiles.rules = [ systemd.tmpfiles.rules = [
"L+ /var/lib/qemu/firmware - - - - ${pkgs.qemu}/share/qemu/firmware" "L+ /var/lib/qemu/firmware - - - - ${pkgs.qemu}/share/qemu/firmware"
"d /mnt/storage 0775 sckova users - -" "d /mnt/storage 0775 ${config.userOptions.username} users - -"
]; ];
services.factorio = { services.factorio = {
@ -90,6 +90,6 @@
# bind = "[::]"; # support IPv6 # bind = "[::]"; # support IPv6
game-name = "kova's minecraft"; game-name = "kova's minecraft";
game-password = "ThisIsASuperSecurePasswordThatNobodyWillGuess"; game-password = "ThisIsASuperSecurePasswordThatNobodyWillGuess";
admins = [ "sckova" ]; admins = [ config.userOptions.username ];
}; };
} }

View file

@ -1,4 +1,5 @@
{ {
config,
pkgs, pkgs,
lib, lib,
... ...
@ -46,7 +47,7 @@ in
setSocketVariable = true; setSocketVariable = true;
}; };
}; };
users.users.sckova.extraGroups = [ "docker" ]; users.users.${config.userOptions.username}.extraGroups = [ "docker" ];
hardware.asahi = { hardware.asahi = {
enable = true; enable = true;

View file

@ -1,17 +0,0 @@
{ ... }:
{
home-manager.users.sckova = {
imports = [ ];
};
services.spice-vdagentd.enable = true;
virtualisation.vmVariant = {
virtualisation = {
memorySize = 8192;
cores = 6;
};
};
security.sudo.wheelNeedsPassword = false;
}

View file

@ -1,53 +0,0 @@
{
lib,
config,
pkgs,
...
}:
{
users.users.sckova.extraGroups = [ "qbittorrent" ];
services = {
qbittorrent = {
enable = false;
serverConfig = {
Preferences = {
Advanced.useSystemIconTheme = true;
General = {
CloseToTray = false;
CloseToTrayNotified = true;
ExitConfirm = false;
Locale = "en";
};
WebUI = {
Address = "*";
Enabled = true;
Port = 9697;
UseUPnP = false;
};
BitTorrent = {
SessionGlobalDLSpeedLimit = 0;
GlobalUPSpeedLimit = 0;
Port = 42578;
QueueingSystemEnabled = false;
SSL.Port = 63114;
StartPaused = false;
};
};
};
};
flaresolverr = {
enable = true;
port = 8191;
};
prowlarr = {
enable = true;
settings = {
server = {
urlbase = "localhost";
port = 9696;
bindaddress = "*";
};
};
};
};
}