From ff9c26b03df892596431750ecd8e74ec9b9122eb Mon Sep 17 00:00:00 2001 From: colin Date: Tue, 29 Nov 2022 02:20:18 +0000 Subject: [PATCH] servo: port to Ryzen/x86 machine --- flake.nix | 3 +-- hosts/servo/default.nix | 7 +------ hosts/servo/fs.nix | 33 +++++++++++++++------------------ 3 files changed, 17 insertions(+), 26 deletions(-) diff --git a/flake.nix b/flake.nix index c8a5357e..95e22d36 100644 --- a/flake.nix +++ b/flake.nix @@ -94,7 +94,7 @@ # - `nixos-rebuild --flake './#' switch` img = nixosConfiguration.config.system.build.img; }; - hosts.servo = decl-bootable-host { name = "servo"; local = "aarch64-linux"; target = "aarch64-linux"; }; + hosts.servo = decl-bootable-host { name = "servo"; local = "x86_64-linux"; target = "x86_64-linux"; }; hosts.desko = decl-bootable-host { name = "desko"; local = "x86_64-linux"; target = "x86_64-linux"; }; hosts.lappy = decl-bootable-host { name = "lappy"; local = "x86_64-linux"; target = "x86_64-linux"; }; hosts.moby = decl-bootable-host { name = "moby"; local = "aarch64-linux"; target = "aarch64-linux"; }; @@ -102,7 +102,6 @@ # note that these *do* produce different store paths, because the closure for the tools used to cross compile # v.s. emulate differ. # so deploying foo-cross and then foo incurs some rebuilding. - hosts.servo-cross = decl-bootable-host { name = "servo"; local = "x86_64-linux"; target = "aarch64-linux"; }; hosts.moby-cross = decl-bootable-host { name = "moby"; local = "x86_64-linux"; target = "aarch64-linux"; }; hosts.rescue = decl-bootable-host { name = "rescue"; local = "x86_64-linux"; target = "x86_64-linux"; }; in { diff --git a/hosts/servo/default.nix b/hosts/servo/default.nix index 5f0b9e0e..4f51bbe0 100644 --- a/hosts/servo/default.nix +++ b/hosts/servo/default.nix @@ -3,7 +3,6 @@ { imports = [ ./fs.nix - ./hardware.nix ./net.nix ./users.nix ./services @@ -13,18 +12,14 @@ # for administering services pkgs.matrix-synapse pkgs.freshrss - pkgs.libraspberrypi ]; sane.impermanence.enable = true; # sane.services.duplicity.enable = true; # TODO: re-enable after HW upgrade sane.services.nixserve.enable = true; sane.services.nixserve.sopsFile = ../../secrets/servo.yaml; - # TODO: look into the EFI stuff - boot.loader.grub.enable = false; - boot.loader.generic-extlinux-compatible.enable = true; boot.loader.efi.canTouchEfiVariables = false; - sane.image.extraBootFiles = [ pkgs.bootpart-u-boot-rpi-aarch64 ]; + sane.image.extraBootFiles = [ pkgs.bootpart-uefi-x86_64 ]; sops.secrets.duplicity_passphrase = { sopsFile = ../../secrets/servo.yaml; diff --git a/hosts/servo/fs.nix b/hosts/servo/fs.nix index 09d2e07d..4d210b6f 100644 --- a/hosts/servo/fs.nix +++ b/hosts/servo/fs.nix @@ -16,32 +16,29 @@ device = "none"; fsType = "tmpfs"; options = [ - "size=40G" "mode=777" "defaults" ]; }; fileSystems."/nix" = { - device = "/dev/disk/by-uuid/aa272cff-0fcc-498e-a4cb-0d95fb60631b"; + device = "/dev/disk/by-uuid/cc81cca0-3cc7-4d82-a00c-6243af3e7776"; fsType = "btrfs"; + options = [ + "compress=zstd" + "defaults" + ]; }; fileSystems."/boot" = { - device = "/dev/disk/by-uuid/31D3-40CB"; + device = "/dev/disk/by-uuid/6EE3-4171"; fsType = "vfat"; }; - - # fileSystems."/var/lib/pleroma" = { - # device = "/opt/pleroma"; - # options = [ "bind" ]; - # }; - # in-memory compressed RAM (seems to be dynamically sized) - zramSwap = { - enable = true; - }; + # zramSwap = { + # enable = true; + # }; # btrfs doesn't easily support swapfiles # swapDevices = [ @@ -59,11 +56,11 @@ # 19 # set part type to Linux swap # w # write changes # mkswap -L swap - swapDevices = [ - { - label = "swap"; - # TODO: randomEncryption.enable = true; - } - ]; + # swapDevices = [ + # { + # label = "swap"; + # # TODO: randomEncryption.enable = true; + # } + # ]; }