From c06b47ea5609ffac555c2a1efba2e0a1a987ab3f Mon Sep 17 00:00:00 2001 From: foglar Date: Sun, 15 Dec 2024 11:53:33 +0100 Subject: [PATCH] userSettings set --- leanix/home.nix | 6 +++--- nixos/home/packages/programming/git.nix | 4 ++-- nixos/system/packages/docker.nix | 4 ++-- nixos/system/packages/podman.nix | 4 ++-- nixos/system/packages/steam.nix | 4 ++-- nixos/system/settings/network.nix | 7 +++---- nixos/system/settings/printing.nix | 4 ++-- nixos/system/settings/style.nix | 3 ++- zenith/configuration.nix | 12 ++++++------ zenith/home.nix | 6 +++--- 10 files changed, 27 insertions(+), 27 deletions(-) diff --git a/leanix/home.nix b/leanix/home.nix index 4627bcd..19a5d6f 100644 --- a/leanix/home.nix +++ b/leanix/home.nix @@ -1,11 +1,11 @@ { pkgs-stable, - username, + userSettings, ... }: { # Home manager configuration - home.username = "${username}"; - home.homeDirectory = "/home/${username}"; + home.username = "${userSettings.username}"; + home.homeDirectory = "/home/${userSettings.username}"; home.stateVersion = "24.11"; # Please read the comment before changing. imports = [ diff --git a/nixos/home/packages/programming/git.nix b/nixos/home/packages/programming/git.nix index c6c4e68..f4394b2 100644 --- a/nixos/home/packages/programming/git.nix +++ b/nixos/home/packages/programming/git.nix @@ -2,7 +2,7 @@ pkgs, lib, config, - username, + userSettings, ... }: { @@ -13,7 +13,7 @@ config = lib.mkIf config.program.git.enable { programs.git = { enable = true; - userName = "${username}"; + userName = "${userSettings.username}"; userEmail = "kohout.fi.2023@skola.ssps.cz"; }; diff --git a/nixos/system/packages/docker.nix b/nixos/system/packages/docker.nix index 38669bb..4c67580 100644 --- a/nixos/system/packages/docker.nix +++ b/nixos/system/packages/docker.nix @@ -1,7 +1,7 @@ { lib, config, - username, + userSettings, ... }: { options = { @@ -17,6 +17,6 @@ }; }; - users.users.${username}.extraGroups = [ "docker" ]; + users.users.${userSettings.username}.extraGroups = [ "docker" ]; }; } diff --git a/nixos/system/packages/podman.nix b/nixos/system/packages/podman.nix index 656a247..62e173f 100644 --- a/nixos/system/packages/podman.nix +++ b/nixos/system/packages/podman.nix @@ -1,7 +1,7 @@ { lib, config, - username, + userSettings, ... }: { options = { @@ -18,7 +18,7 @@ }; }; - users.users.${username} = { + users.users.${userSettings.username} = { isNormalUser = true; extraGroups = ["podman"]; }; diff --git a/nixos/system/packages/steam.nix b/nixos/system/packages/steam.nix index ff0c328..cff66d7 100644 --- a/nixos/system/packages/steam.nix +++ b/nixos/system/packages/steam.nix @@ -2,7 +2,7 @@ lib, config, pkgs, - username, + userSettings, ... }: { options = { @@ -21,7 +21,7 @@ }; }) (lib.mkIf config.sys.desktop.steamdeck.enable { - services.getty.autologinUser = "${username}"; + services.getty.autologinUser = "${userSettings.username}"; environment = { systemPackages = [pkgs.mangohud]; loginShellInit = '' diff --git a/nixos/system/settings/network.nix b/nixos/system/settings/network.nix index 3c5e103..294a6ab 100644 --- a/nixos/system/settings/network.nix +++ b/nixos/system/settings/network.nix @@ -1,8 +1,7 @@ { lib, config, - hostname, - username, + userSettings, ... }: { options = { @@ -13,7 +12,7 @@ config = lib.mkMerge [ (lib.mkIf config.sys.network.enable { - networking.hostName = "${hostname}"; # Define your hostname. + networking.hostName = "${userSettings.hostname}"; # Define your hostname. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. # Configure network proxy if necessary @@ -22,7 +21,7 @@ # Enable networking networking.networkmanager.enable = true; - users.users.${username}.extraGroups = ["networkmanager"]; + users.users.${userSettings.username}.extraGroups = ["networkmanager"]; }) ( lib.mkIf config.sys.bluetooth.enable { diff --git a/nixos/system/settings/printing.nix b/nixos/system/settings/printing.nix index 5ef8fea..fdc7e29 100644 --- a/nixos/system/settings/printing.nix +++ b/nixos/system/settings/printing.nix @@ -2,7 +2,7 @@ lib, config, pkgs, - username, + userSettings, ... }: { options = { @@ -32,6 +32,6 @@ services.ipp-usb.enable = true; hardware.sane.extraBackends = [pkgs.hplipWithPlugin]; - users.users.${username}.extraGroups = ["lp" "scanner"]; + users.users.${userSettings.username}.extraGroups = ["lp" "scanner"]; }; } diff --git a/nixos/system/settings/style.nix b/nixos/system/settings/style.nix index 3318df7..fdfa052 100644 --- a/nixos/system/settings/style.nix +++ b/nixos/system/settings/style.nix @@ -2,6 +2,7 @@ lib, config, pkgs-stable, + userSettings, ... }: { options = { @@ -11,7 +12,7 @@ config = lib.mkIf config.sys.style.enable { stylix = { enable = true; - image = ../../../config/backgrounds/aurora_borealis.png; + image = ../../../config/backgrounds/${userSettings.background}; base16Scheme = "${pkgs-stable.base16-schemes}/share/themes/catppuccin-mocha.yaml"; #base16Scheme = "${pkgs.base16-schemes}/share/themes/onedark.yaml"; #base16Scheme = "${pkgs.base16-schemes}/share/themes/tokyo-night-dark.yaml"; diff --git a/zenith/configuration.nix b/zenith/configuration.nix index b096420..7148a31 100644 --- a/zenith/configuration.nix +++ b/zenith/configuration.nix @@ -2,7 +2,7 @@ inputs, pkgs, pkgs-stable, - username, + userSettings, ... }: { imports = [ @@ -17,18 +17,18 @@ # Home manager home-manager = { - extraSpecialArgs = {inherit inputs pkgs pkgs-stable username;}; + extraSpecialArgs = {inherit inputs pkgs pkgs-stable userSettings;}; backupFileExtension = "backup"; users = { - ${username} = import ./home.nix; + ${userSettings.username} = import ./home.nix; }; sharedModules = [inputs.plasma-manager.homeManagerModules.plasma-manager]; }; # User configuration - users.users.${username} = { + users.users.${userSettings.username} = { isNormalUser = true; - description = "${username}"; + description = "${userSettings.username}"; extraGroups = ["wheel"]; }; @@ -37,7 +37,7 @@ # Environment variables environment.sessionVariables = { - FLAKE = "/home/${username}/dotfiles"; + FLAKE = "/home/${userSettings.username}/dotfiles"; DEFAULT_BROWSER = "${pkgs.librewolf}/bin/librewolf"; }; diff --git a/zenith/home.nix b/zenith/home.nix index a383dde..8f0cc23 100644 --- a/zenith/home.nix +++ b/zenith/home.nix @@ -1,7 +1,7 @@ -{username, ...}: { +{userSettings, ...}: { # Home manager configuration - home.username = "${username}"; - home.homeDirectory = "/home/${username}"; + home.username = "${userSettings.username}"; + home.homeDirectory = "/home/${userSettings.username}"; home.stateVersion = "24.05"; # Please read the comment before changing. imports = [