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
# 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
pkgConfig = {
allowUnfree = true;
@ -139,11 +131,6 @@
"root"
"sckova"
];
# Increase file descriptor limit for builds
# sandbox = "relaxed";
# extra-sandbox-paths = [ ];
# build-users-group = "nixbld";
};
gc = {
@ -170,9 +157,10 @@
];
};
}
./options.nix
./system
./system/searxng
./system/torrenting
./system/games
./system/widevine
./system/shell/fish.nix
./system/tailscale
@ -189,12 +177,13 @@
imports = [
./home
./options.nix
./home/apps
./home/games
./home/hosts/${hostname}
./home/services
./home/terminal
./home/tiling
./home/sckova
./home/sckova/apps
./home/sckova/games
./home/sckova/hosts/${hostname}
./home/sckova/services
./home/sckova/terminal
./home/sckova/tiling
];
};
sharedModules = [
@ -238,8 +227,8 @@
home.username = user;
home.homeDirectory = "/home/${user}";
modules = [
./home
./home/hosts/${hostname}.nix
./home/${user}
./home/${user}/hosts/${hostname}.nix
home-manager.homeModules.home-manager
niri.homeModules.default
noctalia.homeModules.noctalia
@ -266,14 +255,7 @@
}
];
};
}
// nixpkgs.lib.genAttrs supportedSystems (
system:
mkNixosSystem {
hostname = "vm-generic";
inherit system;
}
);
};
homeConfigurations = {
peach = mkHomeConfig {
@ -286,14 +268,6 @@
hostname = "alien";
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;
animationSpeed = 1;
autoStartAuth = false;
avatarImage = "/home/sckova/.face";
avatarImage = "/home/${config.userOptions.username}/.face";
boxRadiusRatio = 1;
clockFormat = "hh\\nmm";
clockStyle = "custom";
@ -559,7 +559,7 @@
wallpaper = {
automationEnabled = false;
directory = "/home/sckova/.local/share/wallpaper";
directory = "/home/${config.userOptions.username}/.local/share/wallpaper";
enableMultiMonitorDirectories = false;
enabled = false;
fillColor = "#1e1e2e";

View file

@ -19,24 +19,24 @@
userOptions = {
name = lib.mkOption {
type = lib.types.str;
readOnly = true;
readOnly = false;
default = "Sean Kovacs";
};
username = lib.mkOption {
type = lib.types.str;
readOnly = true;
readOnly = false;
default = "sckova";
};
email = lib.mkOption {
type = lib.types.str;
readOnly = false;
default = "kovacsmillio@gmail.com";
};
hostname = lib.mkOption {
type = lib.types.str;
readOnly = true;
default = config.system.name;
};
email = lib.mkOption {
type = lib.types.str;
readOnly = true;
default = "kovacsmillio@gmail.com";
};
fontSans = {
name = lib.mkOption {
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 = {
plymouth.enable = true;
plymouth.logo = "${pkgs.nixos-icons}/share/icons/hicolor/64x64/apps/nix-snowflake-white.png";
@ -49,19 +56,6 @@
};
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 = {
enable = true;
enableSSHSupport = true;
@ -107,7 +101,7 @@
services = {
displayManager = {
autoLogin.enable = true;
autoLogin.user = "sckova";
autoLogin.user = config.userOptions.username;
defaultSession = "niri";
sddm.enable = true;
sddm.wayland.enable = true;
@ -128,17 +122,6 @@
upower.enable = true;
power-profiles-daemon.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; [

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
users.users.sckova.extraGroups = [ "i2c" ];
users.users.${config.userOptions.username}.extraGroups = [ "i2c" ];
boot.extraModulePackages = [ config.boot.kernelPackages.ddcci-driver ];
boot.kernelModules = [
"i2c-dev"
@ -78,7 +78,7 @@
# i don't even remember what this does or why i added it
systemd.tmpfiles.rules = [
"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 = {
@ -90,6 +90,6 @@
# bind = "[::]"; # support IPv6
game-name = "kova's minecraft";
game-password = "ThisIsASuperSecurePasswordThatNobodyWillGuess";
admins = [ "sckova" ];
admins = [ config.userOptions.username ];
};
}

View file

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