Avunu / nixos-k3s

Flake-based NixOS K3s deployment.
MIT License
0 stars 1 forks source link

Evaluate plausibility of auto-updates against nixpkgs. #8

Closed batonac closed 1 month ago

batonac commented 1 month ago

This probably has some major pitfalls, but just thinking that it could be cool to allow rolling-release updates against the latest nixpkgs automatically without needing to update this flake manually. Probably a bad idea... but there's at least the safety-net of autoupgrades not switching to any configuration that fails to apply.

It would seem to require:

{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";

    nixos-k3s = {
      url = "github:Avunu/nixos-k3s";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };

 outputs = { self, nixpkgs, nixos-k3s }:
  {
    nixosConfigurations = {
      ${builtins.readFile "/etc/hostname"} = nixpkgs.lib.nixosSystem {
        system = "x86_64-linux";
        modules = [
          nixos-k3s.nixosModules.agent
        ];
      };
    };
  };
}
batonac commented 1 month ago

done in f6561adec63d32f026da048b26394df5dfd5625f