diff --git a/common/boot.nix b/common/boot.nix new file mode 100644 index 0000000..718d776 --- /dev/null +++ b/common/boot.nix @@ -0,0 +1,12 @@ +{lib,...}: +{ + boot.loader = { + timeout = lib.mkDefault 0; + efi.canTouchEfiVariables = true; + systemd-boot = { + enable = true; + editor = false; + configurationLimit = 100; + }; + }; +} diff --git a/common/default.nix b/common/default.nix new file mode 100644 index 0000000..8adc809 --- /dev/null +++ b/common/default.nix @@ -0,0 +1,7 @@ +{...}: +{ + imports = [ + ./locale.nix + ./boot.nix + ]; +} diff --git a/common/locale.nix b/common/locale.nix new file mode 100644 index 0000000..846b530 --- /dev/null +++ b/common/locale.nix @@ -0,0 +1,17 @@ +{...}: +{ + # Select internationalisation properties. + i18n.defaultLocale = "en_US.UTF-8"; + + i18n.extraLocaleSettings = { + LC_ADDRESS = "nl_NL.UTF-8"; + LC_IDENTIFICATION = "nl_NL.UTF-8"; + LC_MEASUREMENT = "nl_NL.UTF-8"; + LC_MONETARY = "nl_NL.UTF-8"; + LC_NAME = "nl_NL.UTF-8"; + LC_NUMERIC = "nl_NL.UTF-8"; + LC_PAPER = "nl_NL.UTF-8"; + LC_TELEPHONE = "nl_NL.UTF-8"; + LC_TIME = "en_GB.UTF-8"; + }; +} diff --git a/hosts/default/configuration.nix b/hosts/default/configuration.nix index ef2d34e..229ced6 100644 --- a/hosts/default/configuration.nix +++ b/hosts/default/configuration.nix @@ -11,6 +11,8 @@ ../../modules/games/steam.nix ../../modules/websites ../../modules/plasma + + ../../common ]; boot = rec { @@ -119,21 +121,6 @@ # Set your time zone. time.timeZone = "Europe/Amsterdam"; - # Select internationalisation properties. - i18n.defaultLocale = "en_US.UTF-8"; - - i18n.extraLocaleSettings = { - LC_ADDRESS = "nl_NL.UTF-8"; - LC_IDENTIFICATION = "nl_NL.UTF-8"; - LC_MEASUREMENT = "nl_NL.UTF-8"; - LC_MONETARY = "nl_NL.UTF-8"; - LC_NAME = "nl_NL.UTF-8"; - LC_NUMERIC = "nl_NL.UTF-8"; - LC_PAPER = "nl_NL.UTF-8"; - LC_TELEPHONE = "nl_NL.UTF-8"; - LC_TIME = "nl_NL.UTF-8"; - }; - # Configure console keymap console.keyMap = "us-acentos"; diff --git a/hosts/server/configuration.nix b/hosts/server/configuration.nix index 66a8a63..04f1c08 100644 --- a/hosts/server/configuration.nix +++ b/hosts/server/configuration.nix @@ -13,11 +13,9 @@ ./disk-config.nix (modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/profiles/qemu-guest.nix") - ]; - # Use the systemd-boot EFI boot loader. - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; + ../../common + ]; # LOVE me some blob hardware.enableRedistributableFirmware = true; @@ -44,20 +42,6 @@ # Set your time zone. time.timeZone = "Europe/Amsterdam"; - # Select internationalisation properties. - i18n.defaultLocale = "en_US.UTF-8"; - - i18n.extraLocaleSettings = { - LC_ADDRESS = "nl_NL.UTF-8"; - LC_IDENTIFICATION = "nl_NL.UTF-8"; - LC_MEASUREMENT = "nl_NL.UTF-8"; - LC_MONETARY = "nl_NL.UTF-8"; - LC_NAME = "nl_NL.UTF-8"; - LC_NUMERIC = "nl_NL.UTF-8"; - LC_PAPER = "nl_NL.UTF-8"; - LC_TELEPHONE = "nl_NL.UTF-8"; - LC_TIME = "nl_NL.UTF-8"; - }; # Configure network proxy if necessary # networking.proxy.default = "http://user:password@proxy:port/"; # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; @@ -137,9 +121,17 @@ }; }; + virtualisation.docker = { + enable = true; + rootless = { + enable = true; + setSocketVariable = true; + }; + }; + # Open ports in the firewall. - # networking.firewall.allowedTCPPorts = [ ... ]; - # networking.firewall.allowedUDPPorts = [ ... ]; + networking.firewall.allowedTCPPorts = [ 22 ]; + networking.firewall.allowedUDPPorts = [ 22 ]; # Or disable the firewall altogether. # networking.firewall.enable = false;