From 9f446bc1f698ee46c260bbb8bca355b040ed80fc Mon Sep 17 00:00:00 2001 From: Joakim Repomaa Date: Sat, 8 Feb 2025 15:41:58 +0200 Subject: [PATCH] migrate freun.dev to arm server --- flake.nix | 3 ++- hosts/freun.dev/configuration.nix | 15 ++++-------- hosts/freun.dev/hardware-configuration.nix | 25 ++++++++++---------- hosts/freun.dev/services/workout-tracker.nix | 4 ++-- 4 files changed, 22 insertions(+), 25 deletions(-) diff --git a/flake.nix b/flake.nix index 8ba2005..61d1d0f 100644 --- a/flake.nix +++ b/flake.nix @@ -60,7 +60,8 @@ }; nixosConfigurations = { freun-dev = nixpkgs.lib.nixosSystem { - inherit system specialArgs; + inherit specialArgs; + system = "aarch64-linux"; modules = [ ./modules ./hosts/freun.dev ]; }; diff --git a/hosts/freun.dev/configuration.nix b/hosts/freun.dev/configuration.nix index b226226..b8f7d3c 100644 --- a/hosts/freun.dev/configuration.nix +++ b/hosts/freun.dev/configuration.nix @@ -17,13 +17,8 @@ }; }; - # Use the GRUB 2 boot loader. - boot.loader.grub.enable = true; - boot.loader.grub.efiSupport = false; - # boot.loader.grub.efiInstallAsRemovable = true; - # boot.loader.efi.efiSysMountPoint = "/boot/efi"; - # Define on which hard drive you want to install Grub. - boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; networking.hostName = "freun-dev"; # Define your hostname. networking.useDHCP = false; @@ -34,8 +29,8 @@ networks.static = { name = "enp1s0"; address = [ - "95.217.223.61/32" - "2a01:4f9:c012:5e97::1/64" + "65.21.145.150/32" + "2a01:4f9:c011:9ac1::1/64" ]; routes = [ { Gateway = "fe80::1"; } @@ -142,5 +137,5 @@ # this value at the release version of the first install of this system. # Before changing this value read the documentation for this option # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). - system.stateVersion = "23.05"; # Did you read the comment? + system.stateVersion = "24.11"; # Did you read the comment? } diff --git a/hosts/freun.dev/hardware-configuration.nix b/hosts/freun.dev/hardware-configuration.nix index 1778bd5..efbc139 100644 --- a/hosts/freun.dev/hardware-configuration.nix +++ b/hosts/freun.dev/hardware-configuration.nix @@ -5,29 +5,30 @@ { imports = - [ (modulesPath + "/profiles/qemu-guest.nix") + [ + (modulesPath + "/profiles/qemu-guest.nix") ]; - boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ]; + boot.initrd.availableKernelModules = [ "xhci_pci" "virtio_scsi" "sr_mod" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ ]; boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/8456c7de-2116-4cbe-8deb-76cafbd3e6dd"; - fsType = "btrfs"; - options = [ "subvol=@" ]; + { + device = "/dev/disk/by-uuid/f594ffbc-4553-42e4-8206-4d762c94b4c3"; + fsType = "ext4"; }; - fileSystems."/var" = - { device = "/dev/disk/by-uuid/8456c7de-2116-4cbe-8deb-76cafbd3e6dd"; - fsType = "btrfs"; - options = [ "subvol=@var" ]; + fileSystems."/boot" = + { + device = "/dev/disk/by-uuid/46F1-18E3"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; }; swapDevices = - [ { device = "/dev/disk/by-uuid/614a1b7f-04aa-478c-9011-8b81f133da98"; } - ]; + [{ device = "/dev/disk/by-uuid/d9955575-d4e0-4a49-a3c5-41f54110d12b"; }]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's @@ -36,5 +37,5 @@ networking.useDHCP = lib.mkDefault true; # networking.interfaces.enp1s0.useDHCP = lib.mkDefault true; - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux"; } diff --git a/hosts/freun.dev/services/workout-tracker.nix b/hosts/freun.dev/services/workout-tracker.nix index 76734b6..f57f068 100644 --- a/hosts/freun.dev/services/workout-tracker.nix +++ b/hosts/freun.dev/services/workout-tracker.nix @@ -11,8 +11,8 @@ in package = pkgs.stdenv.mkDerivation { name = "workout-tracker"; src = pkgs.fetchurl { - url = "https://github.com/jovandeginste/workout-tracker/releases/download/v${version}/workout-tracker-v${version}-linux-amd64.tar.gz"; - hash = "sha256-kcchO+7HQwmpYRXqrTtyHWDqy7DkKugO+PJRucboycE="; + url = "https://github.com/jovandeginste/workout-tracker/releases/download/v${version}/workout-tracker-v${version}-linux-arm64.tar.gz"; + hash = "sha256-k6Fq9emrUgGr29d5AaWJtyjGoftGN9IpTgdTOdvOE1o="; }; nativeBuildInputs = [ pkgs.autoPatchelfHook