mirror of
https://github.com/librephoenix/nixos-config
synced 2025-07-06 06:52:13 +05:30
Boilerplate reduction (I understand strings in nix now!)
This commit is contained in:
parent
c7f3327147
commit
b4a0d72a92
17 changed files with 136 additions and 144 deletions
|
@ -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" ];
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ config, lib, pkgs, blocklist-hosts, myName, myHostname, myTimezone, myLocale, myTheme, myBackgroundUrl, myBackgroundSha256, ... }:
|
||||
{ config, lib, pkgs, blocklist-hosts, username, name, hostname, timezone, locale, wm, theme, ... }:
|
||||
{
|
||||
imports =
|
||||
[ ../work/configuration.nix # Personal is essentially work system + games
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ config, lib, pkgs, blocklist-hosts, myName, myHostname, myTimezone, myLocale, systemWMNixPath, myTheme, myBackgroundUrl, myBackgroundSha256, ... }:
|
||||
{ config, lib, pkgs, blocklist-hosts, username, name, hostname, timezone, locale, wm, theme, ... }:
|
||||
{
|
||||
imports =
|
||||
[ ../../system/hardware-configuration.nix
|
||||
|
@ -10,7 +10,7 @@
|
|||
../../system/hardware/opengl.nix
|
||||
../../system/hardware/printing.nix
|
||||
../../system/hardware/bluetooth.nix
|
||||
systemWMNixPath # My window manager selected from flake
|
||||
(./. + "../../../system/wm"+("/"+wm)+".nix") # My window manager
|
||||
../../system/app/flatpak.nix
|
||||
../../system/security/doas.nix
|
||||
../../system/security/gpg.nix
|
||||
|
@ -41,28 +41,28 @@
|
|||
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";
|
||||
description = name;
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
packages = with pkgs; [];
|
||||
uid = 1000;
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
{ config, lib, pkgs, python3Packages, nix-doom-emacs, stylix, myName, myEmail, myHomeDir, myDotfilesDir, myTheme, userWMNixPath, ... }:
|
||||
{ config, lib, pkgs, python3Packages, nix-doom-emacs, stylix, username, email, dotfilesDir, theme, wm, ... }:
|
||||
|
||||
{
|
||||
# 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;
|
||||
|
||||
imports = [
|
||||
nix-doom-emacs.hmModule
|
||||
stylix.homeManagerModules.stylix
|
||||
userWMNixPath # My window manager selected from flake
|
||||
(./. + "../../../user/wm"+("/"+wm+"/"+wm)+".nix") # My window manager selected from flake
|
||||
../../user/shell/sh.nix # My zsh and bash config
|
||||
../../user/shell/cli-collection.nix # Useful CLI apps
|
||||
../../user/bin/phoenix.nix # My nix command wrapper
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue