diff options
| author | schererleander <leander@schererleander.de> | 2025-11-03 00:19:09 +0100 |
|---|---|---|
| committer | schererleander <leander@schererleander.de> | 2025-11-03 00:19:09 +0100 |
| commit | 03f03eee9f8417b540f0d1b0d1e8a4626d455ac3 (patch) | |
| tree | bf7b8a76461e8a469b37197d9b6a78cb16dd2fb8 /modules/system | |
| parent | 9e2849e72a9a46515a9141226a0145fdbb5090c8 (diff) | |
chore: reorganize modules into subcategories
Diffstat (limited to 'modules/system')
| -rw-r--r-- | modules/system/default.nix | 10 | ||||
| -rw-r--r-- | modules/system/localisation.nix | 23 | ||||
| -rw-r--r-- | modules/system/network.nix | 14 | ||||
| -rw-r--r-- | modules/system/nix-options.nix | 18 | ||||
| -rw-r--r-- | modules/system/users.nix | 22 |
5 files changed, 87 insertions, 0 deletions
diff --git a/modules/system/default.nix b/modules/system/default.nix new file mode 100644 index 0000000..a3e0fcd --- /dev/null +++ b/modules/system/default.nix @@ -0,0 +1,10 @@ +{ ... }: + +{ + imports = [ + ./localisation.nix + ./network.nix + ./nix-options.nix + ./users.nix + ]; +} diff --git a/modules/system/localisation.nix b/modules/system/localisation.nix new file mode 100644 index 0000000..ab8dfbf --- /dev/null +++ b/modules/system/localisation.nix @@ -0,0 +1,23 @@ +{ ... }: + +let + locale = "en_US.UTF-8"; +in +{ + # Set your time zone. + time.timeZone = "Europe/Berlin"; + + # Select internationalisation properties. + i18n.defaultLocale = locale; + i18n.extraLocaleSettings = { + 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; + }; +} diff --git a/modules/system/network.nix b/modules/system/network.nix new file mode 100644 index 0000000..383480b --- /dev/null +++ b/modules/system/network.nix @@ -0,0 +1,14 @@ +{ + host, + ... +}: + +{ + networking = { + hostName = host; + networkmanager.enable = true; + }; + + # Improve startup time + systemd.services.NetworkManager-wait-online.enable = false; +} diff --git a/modules/system/nix-options.nix b/modules/system/nix-options.nix new file mode 100644 index 0000000..e1d5e71 --- /dev/null +++ b/modules/system/nix-options.nix @@ -0,0 +1,18 @@ +{ ... }: + +{ + nix = { + settings = { + experimentalFeatures = [ + "nix-command" + "flakes" + ]; + auto-optimise-store = true; + }; + gc = { + automatic = true; + dates = "daily"; + options = "--delete-older-than 15d"; + }; + }; +} diff --git a/modules/system/users.nix b/modules/system/users.nix new file mode 100644 index 0000000..d42dac3 --- /dev/null +++ b/modules/system/users.nix @@ -0,0 +1,22 @@ +{ + config, + username, + pkgs, + lib, + ... +}: + +{ + users.users."${username}" = { + isNormalUser = true; + extraGroups = [ + "wheel" + "video" + "input" + (lib.mkIf config.networking.networkmanager.enable "networkmanager") + ]; + shell = pkgs.zsh; + ignoreShellProgramCheck = true; + }; + security.sudo.wheelNeedsPassword = false; +} |
