From 2ee9db3ce65740a5e12d7e966dbb61307326d447 Mon Sep 17 00:00:00 2001 From: Don Harper Date: Sun, 19 Oct 2025 20:01:32 -0500 Subject: [PATCH] enabling aarch64-linux on all hosts... --- hosts/loki/default.nix | 12 ++++-- hosts/server/default.nix | 81 ++++++++++++++++++++--------------- hosts/workstation/default.nix | 1 + 3 files changed, 57 insertions(+), 37 deletions(-) diff --git a/hosts/loki/default.nix b/hosts/loki/default.nix index 9947c33..ad0a609 100644 --- a/hosts/loki/default.nix +++ b/hosts/loki/default.nix @@ -1,4 +1,11 @@ -{ inputs, outputs, lib, config, pkgs, ... }: { +{ + inputs, + outputs, + lib, + config, + pkgs, + ... +}: { imports = [ inputs.nixos-hardware.nixosModules.framework-amd-ai-300-series ./hardware-configuration.nix @@ -6,7 +13,6 @@ ../workstation ]; networking.hostName = "loki"; - boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; variables.address = "100.72.0.1"; variables.swayScale = "1.2"; @@ -20,5 +26,5 @@ gnome-calendar.enable = true; }; primary.enable = true; - wm = { sway.enable = true; }; + wm = {sway.enable = true;}; } diff --git a/hosts/server/default.nix b/hosts/server/default.nix index 4fed04d..924a369 100644 --- a/hosts/server/default.nix +++ b/hosts/server/default.nix @@ -1,5 +1,11 @@ -{ inputs, outputs, lib, config, pkgs, ... }: -let +{ + inputs, + outputs, + lib, + config, + pkgs, + ... +}: let my-python-packages = python-packages: with python-packages; [ pip @@ -12,10 +18,10 @@ let in { nix = { settings = { - experimental-features = [ "nix-command" "flakes" ]; + experimental-features = ["nix-command" "flakes"]; warn-dirty = false; auto-optimise-store = true; - trusted-users = [ "root" "don" ]; + trusted-users = ["root" "don"]; }; gc = { automatic = true; @@ -49,14 +55,15 @@ in { inputMethod = { enable = true; type = "fcitx5"; - fcitx5.addons = with pkgs; [ fcitx5-mozc fcitx5-gtk ]; + fcitx5.addons = with pkgs; [fcitx5-mozc fcitx5-gtk]; }; }; # Bootloader. boot = { + binfmt.emulatedSystems = ["aarch64-linux"]; kernelPackages = pkgs.linuxPackages_latest; - kernelParams = [ "consoleblank=60" ]; + kernelParams = ["consoleblank=60"]; #loader = { #systemd-boot = { #enable = true; @@ -66,34 +73,36 @@ in { #efiSysMountPoint = "/boot"; #}; #}; - plymouth = { enable = true; }; - kernel = { sysctl = { "vm.swappiness" = 10; }; }; + plymouth = {enable = true;}; + kernel = {sysctl = {"vm.swappiness" = 10;};}; }; security = { - polkit = { enable = true; }; + polkit = {enable = true;}; sudo.enable = false; doas = { enable = true; - extraRules = [{ - users = [ "don" ]; - keepEnv = true; - noPass = true; - }]; + extraRules = [ + { + users = ["don"]; + keepEnv = true; + noPass = true; + } + ]; }; }; services = { - pcscd = { enable = true; }; - beszel-agent = { enable = true; }; + pcscd = {enable = true;}; + beszel-agent = {enable = true;}; avahi = { enable = true; nssmdns4 = true; }; - printing = { enable = true; }; - udisks2 = { enable = true; }; - nscd = { enableNsncd = true; }; - tailscale = { enable = true; }; + printing = {enable = true;}; + udisks2 = {enable = true;}; + nscd = {enableNsncd = true;}; + tailscale = {enable = true;}; locate = { enable = true; package = pkgs.mlocate; @@ -179,8 +188,8 @@ in { ]; programs = { - dconf = { enable = true; }; - mtr = { enable = true; }; + dconf = {enable = true;}; + mtr = {enable = true;}; gnupg = { agent = { enable = true; @@ -192,25 +201,29 @@ in { nixpkgs.overlays = [ (final: super: { - khal = super.khal.overridePythonAttrs (_: { doCheck = false; }); + khal = super.khal.overridePythonAttrs (_: {doCheck = false;}); }) ]; # Open ports in the firewall. networking.firewall = { enable = true; - trustedInterfaces = [ "tailscale0" ]; + trustedInterfaces = ["tailscale0"]; checkReversePath = "loose"; - allowedUDPPorts = [ config.services.tailscale.port ]; - allowedTCPPortRanges = [{ - from = 1714; - to = 1764; - }]; - allowedUDPPortRanges = [{ - from = 1714; - to = 1764; - }]; - allowedTCPPorts = [ 22 ]; + allowedUDPPorts = [config.services.tailscale.port]; + allowedTCPPortRanges = [ + { + from = 1714; + to = 1764; + } + ]; + allowedUDPPortRanges = [ + { + from = 1714; + to = 1764; + } + ]; + allowedTCPPorts = [22]; }; # This value determines the NixOS release from which the default diff --git a/hosts/workstation/default.nix b/hosts/workstation/default.nix index 3241b8b..765952a 100644 --- a/hosts/workstation/default.nix +++ b/hosts/workstation/default.nix @@ -99,6 +99,7 @@ in { # Bootloader. boot = { + binfmt.emulatedSystems = ["aarch64-linux"]; # kernelPackages = pkgs.linuxPackages_latest; kernelPackages = pkgs.linuxPackages_zen; kernelParams = ["consoleblank=60" "mem_sleep_default=deep"];