From 6559e6f1c752d90cf3d1c059c85ea1ff73893d09 Mon Sep 17 00:00:00 2001 From: waveringana Date: Mon, 7 Jul 2025 02:05:33 -0400 Subject: [PATCH] add baal --- flake.nix | 18 +++++++++++++- hosts/baal/default.nix | 29 ++++++++++++++++++++++ hosts/baal/hardware.nix | 55 +++++++++++++++++++++++++++++++++++++++++ hosts/baal/secrets.nix | 3 +++ 4 files changed, 104 insertions(+), 1 deletion(-) create mode 100644 hosts/baal/default.nix create mode 100644 hosts/baal/hardware.nix create mode 100644 hosts/baal/secrets.nix diff --git a/flake.nix b/flake.nix index 6f65292..9325fa1 100755 --- a/flake.nix +++ b/flake.nix @@ -101,6 +101,22 @@ { imports = builtins.attrValues nixosModules; } ]; }; + + baal = nixpkgs.lib.nixosSystem { + system = "aarch64-linux"; + specialArgs = { + inherit inputs; + system = "aarch64-linux"; + }; + modules = [ + ./hosts/baal + + agenix.nixosModules.default + + { imports = builtins.attrValues nixosModules; } + + ]; + }; }; }; -} \ No newline at end of file +} diff --git a/hosts/baal/default.nix b/hosts/baal/default.nix new file mode 100644 index 0000000..d60a9e5 --- /dev/null +++ b/hosts/baal/default.nix @@ -0,0 +1,29 @@ +{ config, lib, pkgs, modulesPath, inputs, ... }: +{ + imports = [ + ./hardware.nix + ./secrets.nix + + ../../common/system.nix + ../../common/users.nix + ../../common/services.nix + + ../../host-secrets.nix + ]; + + system.stateVersion = "24.11"; + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + + systemd.targets.multi-user.enable = true; + + networking = { + hostName = "baal"; + hostId = "193mdalf"; + networkmanager.enable = true; + }; + + virtualisation.docker = { + enable = true; + enableOnBoot = true; + }; +} diff --git a/hosts/baal/hardware.nix b/hosts/baal/hardware.nix new file mode 100644 index 0000000..0a5e8c0 --- /dev/null +++ b/hosts/baal/hardware.nix @@ -0,0 +1,55 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/profiles/qemu-guest.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "virtio_pci" "virtio_scsi" "usbhid" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + # 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 + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp0s6.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux"; + + 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/baal/secrets.nix b/hosts/baal/secrets.nix new file mode 100644 index 0000000..0db3279 --- /dev/null +++ b/hosts/baal/secrets.nix @@ -0,0 +1,3 @@ +{ + +}