Compare commits

...

7 Commits

Author SHA1 Message Date
David Crompton
349c74888d Merge branch 'main' of https://git.syzygial.cc/Syzygial/NixMachines 2025-04-26 17:17:34 +00:00
David Crompton
4ad1613d45 Pericyte: enable basic k3s 2025-04-18 03:27:55 +00:00
David Crompton
56367f0e9c Pericyte: package: add btop 2025-04-01 18:52:30 +00:00
David Crompton
22701fb35a Pericyte: Microvm config 2025-04-01 18:51:49 +00:00
David Crompton
d24f3fc198 Flake: add microvm 2025-04-01 18:51:28 +00:00
David Crompton
d5e663c6d8 Pericyte: Headless/Minimal Profiles 2025-04-01 02:25:50 +00:00
David Crompton
65750629d3 Machines: add machine pericyte 2025-03-31 23:59:01 +00:00
6 changed files with 147 additions and 1 deletions

72
flake.lock generated
View File

@@ -36,6 +36,24 @@
"type": "github"
}
},
"flake-utils_3": {
"inputs": {
"systems": "systems_3"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flakey-profile": {
"locked": {
"lastModified": 1712898590,
@@ -127,6 +145,28 @@
"url": "https://git.syzygial.cc/Syzygial/EmacsConfig.git"
}
},
"microvm": {
"inputs": {
"flake-utils": "flake-utils_3",
"nixpkgs": [
"nixpkgs"
],
"spectrum": "spectrum"
},
"locked": {
"lastModified": 1743083165,
"narHash": "sha256-Fz7AiCJWtoWZ2guJwO3B1h3RuJxYWaCzFIqY0Kmkyrs=",
"owner": "astro",
"repo": "microvm.nix",
"rev": "773d5a04e2e10ca7b412270dea11276a496e1b61",
"type": "github"
},
"original": {
"owner": "astro",
"repo": "microvm.nix",
"type": "github"
}
},
"nix-darwin": {
"inputs": {
"nixpkgs": [
@@ -185,6 +225,7 @@
"home-manager": "home-manager",
"lix-module": "lix-module",
"me-emacs": "me-emacs",
"microvm": "microvm",
"nix-darwin": "nix-darwin",
"nixpkgs": "nixpkgs",
"sops-nix": "sops-nix"
@@ -208,6 +249,22 @@
"type": "github"
}
},
"spectrum": {
"flake": false,
"locked": {
"lastModified": 1733308308,
"narHash": "sha256-+RcbMAjSxV1wW5UpS9abIG1lFZC8bITPiFIKNnE7RLs=",
"ref": "refs/heads/main",
"rev": "80c9e9830d460c944c8f730065f18bb733bc7ee2",
"revCount": 792,
"type": "git",
"url": "https://spectrum-os.org/git/spectrum"
},
"original": {
"type": "git",
"url": "https://spectrum-os.org/git/spectrum"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
@@ -237,6 +294,21 @@
"repo": "default",
"type": "github"
}
},
"systems_3": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",

View File

@@ -12,9 +12,11 @@
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.92.0.tar.gz";
inputs.nixpkgs.follows = "nixpkgs";
};
microvm.url = "github:astro/microvm.nix";
microvm.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, sops-nix, me-emacs, nix-darwin, home-manager, lix-module }@inputs: let
outputs = { self, nixpkgs, sops-nix, me-emacs, nix-darwin, home-manager, lix-module, microvm }@inputs: let
overlays = import ./overlays/default.nix inputs;
modules = import ./modules/default.nix inputs;
@@ -63,6 +65,14 @@
lix-module.nixosModules.default
];
};
pericyte = nixosSystem' {
modules = [
./machines/pericyte/configuration.nix
modules.sops
# lix-module.nixosModules.default
microvm.nixosModules.host
];
};
};
darwinConfigurations = {
UniverseAir = darwinSystem' {

View File

@@ -0,0 +1,25 @@
{ pkgs, inputs, ... }: {
imports = [
./hardware-configuration.nix
"${inputs.nixpkgs}/nixos/modules/profiles/headless.nix"
"${inputs.nixpkgs}/nixos/modules/profiles/minimal.nix"
./microvm-configuration.nix
./k3s.nix
];
nix.settings.experimental-features = [ "nix-command" "flakes" ];
environment.systemPackages = with pkgs; [
git
btop
];
boot.tmp.cleanOnBoot = true;
zramSwap.enable = true;
networking.hostName = "pericyte";
networking.domain = "";
services.openssh.enable = true;
users.users.root.openssh.authorizedKeys.keys = [''ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDOaNNSV/wurGA8D7bT+WX4UlHdKqd9SFfVXvSalvHag5qYDPUIsGGkqSNj1dcong9qxrC8y7G7ybWhwRKTKXInXrq6EO4JkVkCSbVqrq8gIv66upsKltvmf0esiOdrpRgHoiup8JKaX93aUT27rykReT39mFwkJZDoD4ViNiK7QmbgDC/9pyGDSJykreSnBoxtczox8Zi+pwN8XMI4nRVdV9hppXMpj38/O3Qaq+oXdHJ2MVNy9D+TqxYofstFbzpJpEb2xA4QYnq/VVJFk8VaZlg3qxelwBJ1GNZO8TMkLA+6b07D3aISyEIQAONviNktPwRPiw903hsDyeKDunDx ssh-key-2025-03-31'' ];
system.stateVersion = "25.05";
}

View File

@@ -0,0 +1,14 @@
{ modulesPath, ... }:
{
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
boot.loader.grub = {
efiSupport = true;
efiInstallAsRemovable = true;
device = "nodev";
};
fileSystems."/boot" = { device = "/dev/disk/by-uuid/FCE4-1F46"; fsType = "vfat"; };
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "xen_blkfront" "vmw_pvscsi" ];
boot.initrd.kernelModules = [ "nvme" ];
fileSystems."/" = { device = "/dev/sda1"; fsType = "ext4"; };
}

19
machines/pericyte/k3s.nix Normal file
View File

@@ -0,0 +1,19 @@
{ pkgs, ... }: {
networking.firewall = {
allowedTCPPorts = [
6443 # k3s: required so that pods can reach the API server (running on port 6443 by default)
# 2379 # k3s, etcd clients: required if using a "High Availability Embedded etcd" configuration
# 2380 # k3s, etcd peers: required if using a "High Availability Embedded etcd" configuration
];
allowedUDPPorts = [
# 8472 # k3s, flannel: required if using multi-node for inter-node networking
];
};
services.k3s = {
enable = true;
role = "server";
extraFlags = toString [
# "--debug" # Optionally add additional args to k3s
];
};
}

View File

@@ -0,0 +1,6 @@
{ pkgs, ... }: {
microvm.autostart = [
"vm-starbot"
"vm-starbot-dev"
];
}