Boilerplate reduction (I understand strings in nix now!)

This commit is contained in:
Emmet 2023-06-22 14:53:10 -05:00
parent c7f3327147
commit b4a0d72a92
17 changed files with 136 additions and 144 deletions

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, blocklist-hosts, myName, myHostname, myTimezone, myLocale, myTheme, myBackgroundUrl, myBackgroundSha256, ... }:
{ config, lib, pkgs, blocklist-hosts, username, hostname, timezone, locale, ... }:
args@{ ... }:
@ -32,26 +32,26 @@ args@{ ... }:
boot.loader.efi.efiSysMountPoint = "/boot/efi";
# Networking
networking.hostName = myHostname; # Define your hostname.
networking.hostName = hostname; # Define your hostname.
networking.networkmanager.enable = true; # Use networkmanager
# Timezone and locale
time.timeZone = myTimezone; # time zone
i18n.defaultLocale = myLocale;
time.timeZone = timezone; # time zone
i18n.defaultLocale = locale;
i18n.extraLocaleSettings = {
LC_ADDRESS = myLocale;
LC_IDENTIFICATION = myLocale;
LC_MEASUREMENT = myLocale;
LC_MONETARY = myLocale;
LC_NAME = myLocale;
LC_NUMERIC = myLocale;
LC_PAPER = myLocale;
LC_TELEPHONE = myLocale;
LC_TIME = myLocale;
LC_ADDRESS = locale;
LC_IDENTIFICATION = locale;
LC_MEASUREMENT = locale;
LC_MONETARY = locale;
LC_NAME = locale;
LC_NUMERIC = locale;
LC_PAPER = locale;
LC_TELEPHONE = locale;
LC_TIME = locale;
};
# User account
users.users.${myName} = {
users.users.${username} = {
isNormalUser = true;
description = "Emmet";
extraGroups = [ "networkmanager" "wheel" ];

View file

@ -1,10 +1,10 @@
{ config, lib, pkgs, python3Packages, nix-doom-emacs, stylix, myName, myEmail, myHomeDir, myDotfilesDir, myTheme, ... }:
{ config, lib, pkgs, python3Packages, nix-doom-emacs, stylix, username, email, dotfilesDir, theme, ... }:
{
# Home Manager needs a bit of information about you and the paths it should
# manage.
home.username = myName;
home.homeDirectory = myHomeDir;
home.username = username;
home.homeDirectory = "/home/"+username;
programs.home-manager.enable = true;