From 2f80e6b6bf3c38852303d3c69804fcc6b52452f3 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Fri, 22 Nov 2024 17:31:18 +0100 Subject: [PATCH] Add a profile for the server --- flake.nix | 1 + profiles/machines/manuel/server.nix | 72 +++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 profiles/machines/manuel/server.nix diff --git a/flake.nix b/flake.nix index 239007e4..cd5d34cb 100644 --- a/flake.nix +++ b/flake.nix @@ -45,6 +45,7 @@ valhalla = { DerGeret = import ./profiles/machines/manuel/DerGeret/Arch/config.nix; ManuSurface = import ./profiles/machines/manuel/ManuSurface/Arch/config.nix; + server = import ./profiles/machines/manuel/server.nix; }; }; } diff --git a/profiles/machines/manuel/server.nix b/profiles/machines/manuel/server.nix new file mode 100644 index 00000000..63870f7b --- /dev/null +++ b/profiles/machines/manuel/server.nix @@ -0,0 +1,72 @@ +{ lib, config, ... }: +let fs = import ../../../lib/modules/partition/fs.nix; +in { + imports = [ ./defaults.nix ]; + + config = { + valhalla = { + partition = { + os = { + partitions = { + Boot = { + index = 1; + type = "uefi"; + size = "+1G"; + format = fs.fat32; + mountPoint = config.valhalla.boot.efiMountPoint; + }; + + Swap = { + index = 2; + type = "swap"; + }; + + OS = { + index = 3; + label = lib.mkDefault config.valhalla.boot.label; + type = "linux"; + format = fs.ext4; + mountPoint = "/"; + }; + }; + }; + }; + + hostname = "nuth.ch"; + timeZone = "Europe/Zurich"; + keyMap = "de_CH-latin1"; + keyboardLayout = "ch"; + + i18n = { + localeSettings = let defaultLocale = "en_US.UTF-8"; + in { + LANG = "de_CH.UTF-8"; + LANGUAGE = defaultLocale; + LC_MESSAGE = defaultLocale; + }; + }; + + software = { + essential = true; + server = true; + }; + + programs.docker.enable = true; + + linux.programs = { + docker = { + services = { + drone.enable = true; + forgejo.enable = true; + minecraft.enable = true; + nextcloud.enable = true; + teamspeak.enable = true; + trackmania.enable = true; + vaultwarden.enable = true; + woodpecker.enable = true; + }; + }; + }; + }; + }; +}