From 8c57286c07334cee889d87929a43c145faf018dc Mon Sep 17 00:00:00 2001 From: Noa Aarts Date: Fri, 28 Jun 2024 08:25:21 +0200 Subject: [PATCH 1/5] add docker support --- hosts/server/configuration.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hosts/server/configuration.nix b/hosts/server/configuration.nix index 66a8a63..1588bce 100644 --- a/hosts/server/configuration.nix +++ b/hosts/server/configuration.nix @@ -137,6 +137,14 @@ }; }; + virtualisation.docker = { + enable = true; + rootless = { + enable = true; + setSocketVariable = true; + }; + }; + # Open ports in the firewall. # networking.firewall.allowedTCPPorts = [ ... ]; # networking.firewall.allowedUDPPorts = [ ... ]; From 6aab800aabde2228eccee3bb78012023ed2c9969 Mon Sep 17 00:00:00 2001 From: Noa Aarts Date: Fri, 28 Jun 2024 08:34:59 +0200 Subject: [PATCH 2/5] update locale --- hosts/server/configuration.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosts/server/configuration.nix b/hosts/server/configuration.nix index 1588bce..f5b6dd2 100644 --- a/hosts/server/configuration.nix +++ b/hosts/server/configuration.nix @@ -56,7 +56,7 @@ LC_NUMERIC = "nl_NL.UTF-8"; LC_PAPER = "nl_NL.UTF-8"; LC_TELEPHONE = "nl_NL.UTF-8"; - LC_TIME = "nl_NL.UTF-8"; + LC_TIME = "en_GB.UTF-8"; }; # Configure network proxy if necessary # networking.proxy.default = "http://user:password@proxy:port/"; From f69abba97ecdcdbd7980933b466a37ecc1dd0685 Mon Sep 17 00:00:00 2001 From: Noa Aarts Date: Fri, 28 Jun 2024 08:42:04 +0200 Subject: [PATCH 3/5] make locale common --- common/locale.nix | 17 +++++++++++++++++ hosts/default/configuration.nix | 17 ++--------------- hosts/server/configuration.nix | 16 ++-------------- 3 files changed, 21 insertions(+), 29 deletions(-) create mode 100644 common/locale.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..46a19d0 100644 --- a/hosts/default/configuration.nix +++ b/hosts/default/configuration.nix @@ -11,6 +11,8 @@ ../../modules/games/steam.nix ../../modules/websites ../../modules/plasma + + ../../common/locale.nix ]; 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 f5b6dd2..ba8a4dd 100644 --- a/hosts/server/configuration.nix +++ b/hosts/server/configuration.nix @@ -13,6 +13,8 @@ ./disk-config.nix (modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/profiles/qemu-guest.nix") + + ../../common/locale.nix ]; # Use the systemd-boot EFI boot loader. @@ -44,20 +46,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 = "en_GB.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"; From bc55f12776be0dcc40ba54a7b8c5ea1eda9e4037 Mon Sep 17 00:00:00 2001 From: Noa Aarts Date: Fri, 28 Jun 2024 08:46:20 +0200 Subject: [PATCH 4/5] chore: commonize bootloader --- common/boot.nix | 12 ++++++++++++ common/default.nix | 7 +++++++ hosts/default/configuration.nix | 2 +- hosts/server/configuration.nix | 6 +----- 4 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 common/boot.nix create mode 100644 common/default.nix 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/hosts/default/configuration.nix b/hosts/default/configuration.nix index 46a19d0..229ced6 100644 --- a/hosts/default/configuration.nix +++ b/hosts/default/configuration.nix @@ -12,7 +12,7 @@ ../../modules/websites ../../modules/plasma - ../../common/locale.nix + ../../common ]; boot = rec { diff --git a/hosts/server/configuration.nix b/hosts/server/configuration.nix index ba8a4dd..6614ebe 100644 --- a/hosts/server/configuration.nix +++ b/hosts/server/configuration.nix @@ -14,13 +14,9 @@ (modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/profiles/qemu-guest.nix") - ../../common/locale.nix + ../../common ]; - # Use the systemd-boot EFI boot loader. - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - # LOVE me some blob hardware.enableRedistributableFirmware = true; hardware.enableAllFirmware = true; From 58c4b4c5e50da069ccd2b69f3d6019725f0add7e Mon Sep 17 00:00:00 2001 From: Noa Aarts Date: Fri, 28 Jun 2024 08:55:56 +0200 Subject: [PATCH 5/5] allow ssh to server --- hosts/server/configuration.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hosts/server/configuration.nix b/hosts/server/configuration.nix index 6614ebe..04f1c08 100644 --- a/hosts/server/configuration.nix +++ b/hosts/server/configuration.nix @@ -130,8 +130,8 @@ }; # 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;