From 85b4ea58801233e9d6d3a64f63b10a42fae27f01 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Sun, 26 Jan 2025 16:19:59 +0100 Subject: [PATCH 1/5] minor home tweaks --- home/vinzenz/default.nix | 5 +++-- home/vinzenz/zsh.nix | 3 +-- modules/desktop-environment.nix | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/home/vinzenz/default.nix b/home/vinzenz/default.nix index d2bca38..6cd8b3a 100644 --- a/home/vinzenz/default.nix +++ b/home/vinzenz/default.nix @@ -39,10 +39,11 @@ inputs@{ pkgs, ... }: wireguard-tools wirelesstools - alejandra # nix formatter - kdiff3 jetbrains-toolbox + + blanket + vlc ]; home.file."policy.json" = { diff --git a/home/vinzenz/zsh.nix b/home/vinzenz/zsh.nix index 9a9f633..13ff561 100644 --- a/home/vinzenz/zsh.nix +++ b/home/vinzenz/zsh.nix @@ -11,8 +11,7 @@ my-apply = "sudo nixos-rebuild boot --flake"; my-switch = "sudo nixos-rebuild switch --flake"; my-update = "sudo nixos-rebuild boot --upgrade --flake"; - my-pull = "git -C ~/Repos/nixos-configuration pull --rebase"; - my-fmt = "alejandra ."; + my-pull = "git -C ~/Repos/nixos-configuration pull --rebase"; my-test = "sudo nixos-rebuild test"; my-direnvallow = "echo \"use nix\" > .envrc && direnv allow"; my-ip4 = "ip addr show | grep 192"; diff --git a/modules/desktop-environment.nix b/modules/desktop-environment.nix index cf860e5..b480f67 100644 --- a/modules/desktop-environment.nix +++ b/modules/desktop-environment.nix @@ -99,7 +99,7 @@ fonts = { enableDefaultPackages = true; fontconfig.defaultFonts.monospace = [ "FiraCode Nerd Font" ]; - packages = with pkgs; [ (nerdfonts.override { fonts = [ "FiraCode" ]; }) ]; + packages = with pkgs; [ (nerdfonts.override { fonts = [ "FiraCode" ]; }) roboto-mono ]; }; hardware.logitech.wireless = { From 5250e8552ec3103f81480ff72f2a97e4479ddc46 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Sun, 26 Jan 2025 16:23:22 +0100 Subject: [PATCH 2/5] add forgejo-runner-1 --- hosts/forgejo-runner-1/default.nix | 28 +++++++++++++ hosts/forgejo-runner-1/hardware.nix | 63 +++++++++++++++++++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 hosts/forgejo-runner-1/default.nix create mode 100644 hosts/forgejo-runner-1/hardware.nix diff --git a/hosts/forgejo-runner-1/default.nix b/hosts/forgejo-runner-1/default.nix new file mode 100644 index 0000000..4c2666e --- /dev/null +++ b/hosts/forgejo-runner-1/default.nix @@ -0,0 +1,28 @@ +{ nixpkgs, common-modules, ... }: +nixpkgs.lib.nixosSystem { + system = "aarch64-linux"; + modules = common-modules ++ [ + ./hardware.nix + ../../users/vinzenz.nix + { networking.hostName = "forgejo-runner-1"; } + { + # uncomment for build check on non arm system (requires --impure) + # nixpkgs.buildPlatform = builtins.currentSystem; + } + { + services.tailscale.useRoutingFeatures = "both"; + } + { + users.users = { + root.openssh.authorizedKeys.keys = [ + ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFCJUpbpB3KEKVoKWsKoar9J4RNah8gmQoSH6jQEw5dY vinzenz-pixel-JuiceSSH'' + ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO1CRn4yYTL4XUdCebE8Z4ZeuMujBjorTdWifg911EOv vinzenz-pc2 home roaming'' + ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPDNpLDmctyqGpow/ElQvdhY4BLBPS/sigDJ1QEcC7wC vinzenz-lpt2-roaming'' + ]; + }; + } + { + system.autoUpgrade.allowReboot = true; + } + ]; +} diff --git a/hosts/forgejo-runner-1/hardware.nix b/hosts/forgejo-runner-1/hardware.nix new file mode 100644 index 0000000..034ed88 --- /dev/null +++ b/hosts/forgejo-runner-1/hardware.nix @@ -0,0 +1,63 @@ +{ lib, modulesPath, ... }: +{ + imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; + + config = { + nixpkgs = { + hostPlatform = "aarch64-linux"; + system = "aarch64-linux"; + }; + + boot = { + tmp.cleanOnBoot = true; + kernelParams = [ "console=tty" ]; + loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + }; + initrd = { + availableKernelModules = [ + "xhci_pci" + "virtio_scsi" + "sr_mod" + "virtio_gpu" + ]; + kernelModules = [ ]; + }; + }; + + # fileSystems = { + # "/" = { + # device = "/dev/disk/by-uuid/3263489d-9819-433c-b198-9d2e732a94e4"; + # fsType = "ext4"; + # }; + # "/boot" = { + # device = "/dev/disk/by-uuid/6C25-6BDC"; + # fsType = "vfat"; + # options = [ + # "fmask=0077" + # "dmask=0077" + # ]; + # }; + # }; + + # swapDevices = [ + # { device = "/dev/disk/by-uuid/e147721d-86b5-40d7-a231-c6ea391c563d"; } + # ]; + + # networking.useNetworkd = true; + # systemd.network = { + # enable = true; + # networks."10-wan" = { + # matchConfig.Name = "enp1s0"; + # networkConfig.DHCP = "ipv4"; + # address = [ + # "2a01:4f8:c013:65dd::1/64" + # ]; + # routes = [ + # { Gateway = "fe80::1"; } + # ]; + # }; + # }; + }; +} From bca52c8bf68af556823dcfc52f6fd38896411db3 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Sun, 26 Jan 2025 17:23:36 +0100 Subject: [PATCH 3/5] hw config for forgejo-runner-1 --- hosts/forgejo-runner-1/hardware.nix | 62 ++++++++++++++--------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/hosts/forgejo-runner-1/hardware.nix b/hosts/forgejo-runner-1/hardware.nix index 034ed88..976b998 100644 --- a/hosts/forgejo-runner-1/hardware.nix +++ b/hosts/forgejo-runner-1/hardware.nix @@ -26,38 +26,38 @@ }; }; - # fileSystems = { - # "/" = { - # device = "/dev/disk/by-uuid/3263489d-9819-433c-b198-9d2e732a94e4"; - # fsType = "ext4"; - # }; - # "/boot" = { - # device = "/dev/disk/by-uuid/6C25-6BDC"; - # fsType = "vfat"; - # options = [ - # "fmask=0077" - # "dmask=0077" - # ]; - # }; - # }; + fileSystems = { + "/" = { + device = "/dev/disk/by-uuid/47bc77ff-12e1-4d39-bb5c-fb100ccd3aab"; + fsType = "ext4"; + }; + "/boot" = { + device = "/dev/disk/by-uuid/05F2-8F9A"; + fsType = "vfat"; + options = [ + "fmask=0077" + "dmask=0077" + ]; + }; + }; - # swapDevices = [ - # { device = "/dev/disk/by-uuid/e147721d-86b5-40d7-a231-c6ea391c563d"; } - # ]; + swapDevices = [ + { device = "/dev/disk/by-uuid/bbd18a70-b0bb-4e1a-b45b-3c1f8eccc0c10"; } + ]; - # networking.useNetworkd = true; - # systemd.network = { - # enable = true; - # networks."10-wan" = { - # matchConfig.Name = "enp1s0"; - # networkConfig.DHCP = "ipv4"; - # address = [ - # "2a01:4f8:c013:65dd::1/64" - # ]; - # routes = [ - # { Gateway = "fe80::1"; } - # ]; - # }; - # }; + networking.useNetworkd = true; + systemd.network = { + enable = true; + networks."10-wan" = { + matchConfig.Name = "enp1s0"; + networkConfig.DHCP = "ipv4"; + address = [ + "2a01:4f8:c013:a524::1/64" + ]; + routes = [ + { Gateway = "fe80::1"; } + ]; + }; + }; }; } From 9bc1566e8c6041d42f232e8a860c6134832d287b Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Sun, 26 Jan 2025 17:25:28 +0100 Subject: [PATCH 4/5] add host to flake --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index 80868de..195e98a 100644 --- a/flake.nix +++ b/flake.nix @@ -46,6 +46,7 @@ vinzenz-lpt2 = import ./hosts/vinzenz-lpt2 host-params; vinzenz-pc2 = import ./hosts/vinzenz-pc2 host-params; hetzner-vpn2 = import ./hosts/hetzner-vpn2 host-params; + forgejo-runner-1 = import ./hosts/forgejo-runner-1 host-params; ona-book = import ./hosts/ona-book host-params; }; From b143437c8942430494bfad2fafc29c4118de0426 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Sun, 26 Jan 2025 19:48:22 +0100 Subject: [PATCH 5/5] fix typo in uuid --- hosts/forgejo-runner-1/hardware.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosts/forgejo-runner-1/hardware.nix b/hosts/forgejo-runner-1/hardware.nix index 976b998..f7cb083 100644 --- a/hosts/forgejo-runner-1/hardware.nix +++ b/hosts/forgejo-runner-1/hardware.nix @@ -42,7 +42,7 @@ }; swapDevices = [ - { device = "/dev/disk/by-uuid/bbd18a70-b0bb-4e1a-b45b-3c1f8eccc0c10"; } + { device = "/dev/disk/by-uuid/bbd18a70-b0bb-4e1a-b45b-3c1f8ecc0c10"; } ]; networking.useNetworkd = true;