diff --git a/inventories/default.nix b/inventories/default.nix index 396b31b..1493635 100644 --- a/inventories/default.nix +++ b/inventories/default.nix @@ -3,7 +3,10 @@ inventory = { tags = { - glom = [ "vega" ]; + glom = [ + "vega" + "ramus" + ]; b4l = [ "rigel" ]; w = [ "sirius" ]; fax-bridge = [ ]; diff --git a/machines/ramus/configuration.nix b/machines/ramus/configuration.nix new file mode 100644 index 0000000..641c010 --- /dev/null +++ b/machines/ramus/configuration.nix @@ -0,0 +1,6 @@ +{ config, ... }: +{ + system.stateVersion = "25.11"; + clan.core.sops.defaultGroups = [ "admins" ]; + clan.core.networking.targetHost = "root@[${config.clan.core.vars.generators.zerotier.files.zerotier-ip.value}]"; +} diff --git a/machines/ramus/disko.nix b/machines/ramus/disko.nix new file mode 100644 index 0000000..b23936d --- /dev/null +++ b/machines/ramus/disko.nix @@ -0,0 +1,84 @@ +{ ... }: +let + hashDisk = disk: "os-${builtins.substring 0 5 (builtins.hashString "sha256" disk)}"; + os = "/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_107266387"; +in +{ + + boot.loader = { + systemd-boot = { + enable = true; + }; + efi = { + canTouchEfiVariables = true; + }; + }; + + disko.devices = { + disk = { + "os-${hashDisk os}" = { + type = "disk"; + device = os; + content = { + type = "gpt"; + partitions = { + ESP = { + size = "1G"; + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = [ "nofail" ]; + }; + }; + system = { + size = "100%"; + content = { + type = "zfs"; + pool = "zroot"; + }; + }; + }; + }; + }; + }; + zpool = { + zroot = { + type = "zpool"; + rootFsOptions = { + mountpoint = "none"; + compression = "lz4"; + acltype = "posixacl"; + xattr = "sa"; + "com.sun:auto-snapshot" = "true"; + }; + options.ashift = "12"; + datasets = { + "root" = { + type = "zfs_fs"; + options.mountpoint = "none"; + }; + "root/nixos" = { + type = "zfs_fs"; + options.mountpoint = "/"; + mountpoint = "/"; + }; + "root/home" = { + type = "zfs_fs"; + options.mountpoint = "/home"; + mountpoint = "/home"; + }; + "root/tmp" = { + type = "zfs_fs"; + mountpoint = "/tmp"; + options = { + mountpoint = "/tmp"; + sync = "disabled"; + }; + }; + }; + }; + }; + }; +}