From 79b1d22cc9eb3752ae798d5ca9e6eeefeb86799e Mon Sep 17 00:00:00 2001 From: seth Date: Mon, 23 Jan 2023 15:44:04 -0500 Subject: chore: general cleanup + use `with` less --- hosts/common/default.nix | 1 + hosts/common/locale.nix | 13 +++++++++++++ hosts/common/security.nix | 4 +--- hosts/common/users.nix | 11 ++++------- 4 files changed, 19 insertions(+), 10 deletions(-) create mode 100644 hosts/common/locale.nix (limited to 'hosts') diff --git a/hosts/common/default.nix b/hosts/common/default.nix index 32dad83..9793191 100644 --- a/hosts/common/default.nix +++ b/hosts/common/default.nix @@ -2,5 +2,6 @@ imports = [ ./security.nix ./users.nix + ./locale.nix ]; } diff --git a/hosts/common/locale.nix b/hosts/common/locale.nix new file mode 100644 index 0000000..2699b3b --- /dev/null +++ b/hosts/common/locale.nix @@ -0,0 +1,13 @@ +{config, ...}: { + i18n = { + defaultLocale = "en_US.UTF-8"; + extraLocaleSettings = { + LC_MESSAGES = "en_US.UTF-8"; + LC_TIME = "en_US.UTF-8"; + }; + }; + + time = { + timeZone = "America/New_York"; + }; +} diff --git a/hosts/common/security.nix b/hosts/common/security.nix index 2d473be..a0825e7 100644 --- a/hosts/common/security.nix +++ b/hosts/common/security.nix @@ -2,9 +2,7 @@ lib, config, ... -}: -with builtins; -with lib; { +}: { security.sudo = { configFile = '' Defaults env_reset diff --git a/hosts/common/users.nix b/hosts/common/users.nix index 0d2681e..e2e845e 100644 --- a/hosts/common/users.nix +++ b/hosts/common/users.nix @@ -3,20 +3,17 @@ lib, pkgs, ... -}: -with config; -with lib; -with pkgs; { +}: { users = { - defaultUserShell = bash; + defaultUserShell = pkgs.bash; mutableUsers = false; users = { root = { home = "/root"; - uid = ids.uids.root; + uid = config.ids.uids.root; group = "root"; - initialHashedPassword = mkDefault "!"; + initialHashedPassword = lib.mkDefault "!"; }; }; }; -- cgit v1.2.3