diff --git a/flake.lock b/flake.lock index 3d704ac..7e4c8ee 100644 --- a/flake.lock +++ b/flake.lock @@ -67,6 +67,48 @@ "type": "github" } }, + "disko": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1736864502, + "narHash": "sha256-ItkIZyebGvNH2dK9jVGzJHGPtb6BSWLN8Gmef16NeY0=", + "owner": "nix-community", + "repo": "disko", + "rev": "0141aabed359f063de7413f80d906e1d98c0c123", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "v1.11.0", + "repo": "disko", + "type": "github" + } + }, + "disko-stable": { + "inputs": { + "nixpkgs": [ + "nixpkgs-stable" + ] + }, + "locked": { + "lastModified": 1736864502, + "narHash": "sha256-ItkIZyebGvNH2dK9jVGzJHGPtb6BSWLN8Gmef16NeY0=", + "owner": "nix-community", + "repo": "disko", + "rev": "0141aabed359f063de7413f80d906e1d98c0c123", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "v1.11.0", + "repo": "disko", + "type": "github" + } + }, "flake-compat": { "flake": false, "locked": { @@ -111,16 +153,16 @@ ] }, "locked": { - "lastModified": 1747688870, - "narHash": "sha256-ypL9WAZfmJr5V70jEVzqGjjQzF0uCkz+AFQF7n9NmNc=", + "lastModified": 1748665073, + "narHash": "sha256-RMhjnPKWtCoIIHiuR9QKD7xfsKb3agxzMfJY8V9MOew=", "owner": "nix-community", "repo": "home-manager", - "rev": "d5f1f641b289553927b3801580598d200a501863", + "rev": "282e1e029cb6ab4811114fc85110613d72771dea", "type": "github" }, "original": { "owner": "nix-community", - "ref": "release-24.11", + "ref": "release-25.05", "repo": "home-manager", "type": "github" } @@ -195,16 +237,16 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1747676747, - "narHash": "sha256-LXkWBVqilgx7Pohwqu/ABxDVw+Cmi5/Mj2S2mpUH0Fw=", + "lastModified": 1748437600, + "narHash": "sha256-hYKMs3ilp09anGO7xzfGs3JqEgUqFMnZ8GMAqI6/k04=", "owner": "nixos", "repo": "nixpkgs", - "rev": "72841a4a8761d1aed92ef6169a636872c986c76d", + "rev": "7282cb574e0607e65224d33be8241eae7cfe0979", "type": "github" }, "original": { "owner": "nixos", - "ref": "nixos-24.11", + "ref": "nixos-25.05", "repo": "nixpkgs", "type": "github" } @@ -213,6 +255,8 @@ "inputs": { "agenix": "agenix", "deploy-rs": "deploy-rs", + "disko": "disko", + "disko-stable": "disko-stable", "home-manager": "home-manager_2", "home-manager-stable": "home-manager-stable", "impermanence": "impermanence", diff --git a/flake.nix b/flake.nix index fcf96a1..d0f2039 100644 --- a/flake.nix +++ b/flake.nix @@ -3,14 +3,23 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.11"; + nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-25.05"; home-manager = { url = "github:nix-community/home-manager/master"; inputs.nixpkgs.follows = "nixpkgs"; }; home-manager-stable = { - url = "github:nix-community/home-manager/release-24.11"; + url = "github:nix-community/home-manager/release-25.05"; + inputs.nixpkgs.follows = "nixpkgs-stable"; + }; + + disko = { + url = "github:nix-community/disko?ref=v1.11.0"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + disko-stable = { + url = "github:nix-community/disko?ref=v1.11.0"; inputs.nixpkgs.follows = "nixpkgs-stable"; }; @@ -36,6 +45,8 @@ nixpkgs-stable, home-manager, home-manager-stable, + disko, + disko-stable, agenix, deploy-rs, impermanence, @@ -55,6 +66,7 @@ let pkgs = if type == "server" then nixpkgs-stable else nixpkgs; hm = if type == "server" then home-manager-stable else home-manager; + diskoInput = if type == "server" then disko-stable else disko; hostTypeFlags = { isServer = type == "server"; isWorkstation = type == "workstation"; @@ -62,6 +74,7 @@ defaultModules = [ ./hosts/${hostname}.nix agenix.nixosModules.default + diskoInput.nixosModules.default hm.nixosModules.default impermanence.nixosModules.impermanence nix-flatpak.nixosModules.nix-flatpak @@ -106,6 +119,11 @@ hostname = "alexandria"; type = "server"; }; + trantor = mkHost { + hostname = "trantor"; + type = "server"; + system = "aarch64-linux"; + }; }; overlays = { @@ -137,6 +155,18 @@ }; }; + trantor = { + hostname = "trantor"; + profiles = { + system = { + user = "root"; + sshUser = "root"; + remoteBuild = true; + path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.alexandria; + }; + }; + }; + io = { hostname = "io"; profiles = { diff --git a/hosts/modules/alexandria/nextcloud.nix b/hosts/modules/alexandria/nextcloud.nix index 04d7407..456f88c 100644 --- a/hosts/modules/alexandria/nextcloud.nix +++ b/hosts/modules/alexandria/nextcloud.nix @@ -9,7 +9,7 @@ services = { nextcloud = { enable = true; - package = pkgs.nextcloud30; + package = pkgs.nextcloud31; datadir = "/data/nextcloud"; hostName = "cloud.baduhai.dev"; configureRedis = true; diff --git a/hosts/modules/trantor/boot.nix b/hosts/modules/trantor/boot.nix new file mode 100644 index 0000000..ceb6821 --- /dev/null +++ b/hosts/modules/trantor/boot.nix @@ -0,0 +1,8 @@ +{ ... }: + +{ + boot = { + loader.efi.efiSysMountPoint = "/boot"; + initrd.systemd.enable = true; + }; +} diff --git a/hosts/modules/trantor/default.nix b/hosts/modules/trantor/default.nix new file mode 100644 index 0000000..a23030f --- /dev/null +++ b/hosts/modules/trantor/default.nix @@ -0,0 +1,9 @@ +{ ... }: + +{ + imports = [ + ./boot.nix + ./disko.nix + ./hardware-configuration.nix + ]; +} diff --git a/hosts/modules/trantor/disko.nix b/hosts/modules/trantor/disko.nix new file mode 100644 index 0000000..39599f4 --- /dev/null +++ b/hosts/modules/trantor/disko.nix @@ -0,0 +1,32 @@ +{ + disko.devices = { + disk = { + main = { + type = "disk"; + device = "/dev/sda"; + content = { + type = "gpt"; + partitions = { + boot = { + size = "512M"; + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + }; + }; + root = { + size = "100%"; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/"; + }; + }; + }; + }; + }; + }; + }; +} diff --git a/hosts/modules/trantor/hardware-configuration.nix b/hosts/modules/trantor/hardware-configuration.nix new file mode 100644 index 0000000..d5cc31f --- /dev/null +++ b/hosts/modules/trantor/hardware-configuration.nix @@ -0,0 +1,27 @@ +{ + lib, + modulesPath, + ... +}: + +{ + imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; + + boot = { + kernelModules = [ ]; + extraModulePackages = [ ]; + initrd = { + availableKernelModules = [ + "xhci_pci" + "virtio_pci" + "virtio_scsi" + "usbhid" + ]; + kernelModules = [ ]; + }; + }; + + networking.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux"; +} diff --git a/hosts/trantor.nix b/hosts/trantor.nix new file mode 100644 index 0000000..4a02556 --- /dev/null +++ b/hosts/trantor.nix @@ -0,0 +1,13 @@ +{ ... }: + +{ + networking.hostName = "trantor"; + + imports = [ + ./modules/trantor + ./modules + ]; + + nix.nixPath = [ "nixos-config=${./trantor.nix}" ]; +} +