aboutsummaryrefslogtreecommitdiff
path: root/hosts/tower
diff options
context:
space:
mode:
authorIsabella Bastaja <isabella@sorre.xyz>2026-08-20 22:14:48 +0200
committerIsabella Bastaja <isabella@sorre.xyz>2026-08-20 22:14:57 +0200
commit1f077d4411f9e77410f12dbc1067d89faff7e96f (patch)
treece029f542cb53474d70bcc21abc3f45f913b2630 /hosts/tower
parentdcd2c4c4d71161301a956b7e4777b499f5010e74 (diff)
tower: fix bootloader, prune some stuff
Diffstat (limited to 'hosts/tower')
-rw-r--r--hosts/tower/auto-update.nix80
-rw-r--r--hosts/tower/default.nix16
2 files changed, 2 insertions, 94 deletions
diff --git a/hosts/tower/auto-update.nix b/hosts/tower/auto-update.nix
deleted file mode 100644
index 2afa4b9..0000000
--- a/hosts/tower/auto-update.nix
+++ /dev/null
@@ -1,80 +0,0 @@
-{ pkgs, ... }:
-let
- configRepoSource = "file:///var/lib/git/repos/isabella/nixos-config";
-in
-{
- systemd.timers.auto-update-nixos = {
- enable = false;
- description = "Fetch and update the NixOS config every minute";
- timerConfig = {
- Unit = "update-nixos.service";
- OnUnitActiveSec = "60s";
- };
- wantedBy = [ "multi-user.target" ];
- };
-
- systemd.services.update-nixos = {
- enable = false;
- description = "Fetches and update the NixOS config";
- serviceConfig = {
- Type = "oneshot";
- User = "root";
- StandardOutput = "journal";
- StandardError = "journal";
- };
- path = [
- pkgs.gitMinimal
- pkgs.nixos-rebuild-ng
- ];
- # we need root privileges for a system update anyway
- confinement.enable = false;
-
- enableStrictShellChecks = true;
- script = ''
- #!/bin/sh
- set -eu
-
- SRC_REPO="$1"
- if [ -z "$SRC_REPO" ]; then
- echo "Error: git repository source was not provided." >&2
- exit 1
- fi
-
- TEMP_DIR="$(mktemp --directory)"
- git clone --depth 1 "$SRC_REPO" "$TEMP_DIR"
-
- pushd "$TEMP_DIR"
-
- TAGS="$(git tag --sort tag --list 'v*')"
- LATEST_TAG="$(echo "$TAGS" | tail --lines 1)"
-
- if [ -z "$LATEST_TAG" ]; then
- echo "Error: no release tags defined." >&2
- exit 1
- fi
-
- git fetch "$SRC_REPO" "$LATEST_TAG"
- git checkout FETCH_HEAD
-
- CURRENT_REV="$(git rev-parse HEAD)"
- STATE_DIR="/var/lib/auto-update"
- [ -d "$STATE_DIR" ] || mkdir -p "$STATE_DIR"
-
- if [ -e "$STATE_DIR/last-commit" ]; then
- LAST_REV="$(cat "$STATE_DIR/last-commit")"
- if [ "$CURRENT_REV" = "$LAST_REV" ]; then
- echo "System is already up to date. Exiting." >&2
- exit 0
- fi
- fi
- echo -n "$CURRENT_REV" > "$STATE_DIR/last-commit"
-
- nixos-rebuild switch --flake .#
-
- popd
-
- rm -rf "$TEMP_DIR"
- '';
- scriptArgs = "${configRepoSource}";
- };
-}
diff --git a/hosts/tower/default.nix b/hosts/tower/default.nix
index 4fe610f..9b8f652 100644
--- a/hosts/tower/default.nix
+++ b/hosts/tower/default.nix
@@ -6,19 +6,12 @@
./ssh.nix
./web
./network.nix
- ./auto-update.nix
];
- boot.loader.grub.device = "/dev/sda";
+ boot.loader.systemd-boot.enable = true;
+ boot.loader.efi.canTouchEfiVariables = true;
time.timeZone = "Europe/Zagreb";
- virtualisation.podman = {
- enable = true;
- autoPrune.enable = true;
- dockerCompat = true;
- dockerSocket.enable = true;
- };
-
# Set the max amount of space used for logs
services.journald.extraConfig = ''
SystemMaxUse=100M
@@ -38,11 +31,6 @@
LC_TIME = "hr_HR.UTF-8";
};
- programs.gnupg.agent = {
- enable = true;
- enableSSHSupport = true;
- };
-
users.users = {
isabella = {
isNormalUser = true;