Compare commits

..

2 commits

Author SHA1 Message Date
53481414df feat: experimental k3s + nix-snapshotter snippet 2024-08-04 14:40:13 +02:00
7f8bf5c525 feat(toplevel): add x13s (proprietary) bluetooth and wifi firmware
this allows them to be reused more easily
2024-08-04 14:38:38 +02:00
4 changed files with 42 additions and 75 deletions

View file

@ -157,40 +157,7 @@
../../snippets/holo-zerotier.nix ../../snippets/holo-zerotier.nix
# experiment with k3s, nix-snapshotter, and nixos images ../../snippets/k3s-w-nix-snapshotter.nix
{
# (1) Import nixos module.
imports = [
nodeFlake.inputs.nix-snapshotter.nixosModules.default
];
# (2) Add overlay.
nixpkgs.overlays = [nodeFlake.inputs.nix-snapshotter.overlays.default];
# (3) Enable service.
virtualisation.containerd = {
enable = true;
k3sIntegration = false;
nixSnapshotterIntegration = true;
# TODO: understand if this has an influence on the systemd LoadCredential issue
settings.plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options.SystemdCgroup = lib.mkForce true;
};
services.nix-snapshotter = {
enable = true;
};
# (4) Add a containerd CLI like nerdctl.
environment.systemPackages = [
pkgs.nerdctl
nodeFlake.inputs.nix-snapshotter.packages.${system}.nix-snapshotter
];
services.k3s = {
enable = false;
setKubeConfig = true;
};
}
]; ];
networking.hostName = nodeName; networking.hostName = nodeName;

View file

@ -1,21 +1,5 @@
{ {
"nodes": { "nodes": {
"ath11k-firmware": {
"flake": false,
"locked": {
"lastModified": 1720482684,
"narHash": "sha256-p6ifwtRNUOyQ2FN2VhSXS6dcrvrtiFZawu/iVXQ4uR0=",
"ref": "refs/heads/main",
"rev": "bb527dcebac835c47ed4f5428a7687769fa9b1b2",
"revCount": 152,
"type": "git",
"url": "https://git.codelinaro.org/clo/ath-firmware/ath11k-firmware.git"
},
"original": {
"type": "git",
"url": "https://git.codelinaro.org/clo/ath-firmware/ath11k-firmware.git"
}
},
"crane": { "crane": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -178,22 +162,6 @@
"type": "github" "type": "github"
} }
}, },
"mobile-nixos": {
"flake": false,
"locked": {
"lastModified": 1722056346,
"narHash": "sha256-50fcuCppaLMfSOTFO4IkCBs4folToCwlhTgc6IdZFHg=",
"owner": "NixOS",
"repo": "mobile-nixos",
"rev": "717ce90cfadffa449480bae2e155185c651e9993",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "mobile-nixos",
"type": "github"
}
},
"mycelium": { "mycelium": {
"inputs": { "inputs": {
"crane": "crane", "crane": "crane",
@ -350,11 +318,9 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"ath11k-firmware": "ath11k-firmware",
"disko": "disko", "disko": "disko",
"get-flake": "get-flake", "get-flake": "get-flake",
"home-manager": "home-manager", "home-manager": "home-manager",
"mobile-nixos": "mobile-nixos",
"mycelium": "mycelium", "mycelium": "mycelium",
"nix-snapshotter": "nix-snapshotter", "nix-snapshotter": "nix-snapshotter",
"nixos-x13s": "nixos-x13s", "nixos-x13s": "nixos-x13s",

View file

@ -26,19 +26,12 @@
# url = "github:pdtpartners/nix-snapshotter"; # url = "github:pdtpartners/nix-snapshotter";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
nix-snapshotter = {
url = "github:yu-re-ka/nix-snapshotter";
# url = "github:pdtpartners/nix-snapshotter";
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
outputs = { outputs = {
self, self,
get-flake, get-flake,
nixpkgs, nixpkgs,
ath11k-firmware,
... ...
}: let }: let
targetPlatform = "aarch64-linux"; targetPlatform = "aarch64-linux";

View file

@ -0,0 +1,41 @@
# experiment with k3s, nix-snapshotter, and nixos images
{
nodeFlake,
nodeFlakeInputs',
pkgs,
lib,
system,
...
}: {
# (1) Import nixos module.
imports = [
nodeFlake.inputs.nix-snapshotter.nixosModules.default
];
# (2) Add overlay.
nixpkgs.overlays = [nodeFlake.inputs.nix-snapshotter.overlays.default];
# (3) Enable service.
virtualisation.containerd = {
enable = true;
k3sIntegration = false;
nixSnapshotterIntegration = true;
# TODO: understand if this has an influence on the systemd LoadCredential issue
settings.plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options.SystemdCgroup = lib.mkForce true;
};
services.nix-snapshotter = {
enable = true;
};
# (4) Add a containerd CLI like nerdctl.
environment.systemPackages = [
pkgs.nerdctl
nodeFlake.inputs.nix-snapshotter.packages.${system}.default
];
services.k3s = {
enable = false;
setKubeConfig = true;
};
}