~rhaenys/infra-essos

110e13b8beac0b80eabc50e63b9a2a84478711f5 — rhaenys 5 days ago 3cda9d7 main
feat: major refact, proxmox -> libvirtd
5 files changed, 22 insertions(+), 14 deletions(-)

A .gitignore
M flake.lock
M flake.nix
M nixos/essos/configuration.nix
M nixos/essos/hypervisor.nix
A .gitignore => .gitignore +1 -0
@@ 0,0 1,1 @@
/result

M flake.lock => flake.lock +4 -6
@@ 107,15 107,13 @@
      "locked": {
        "lastModified": 1730963029,
        "narHash": "sha256-+jlyA9jROgLjHKHXTLgJWmhQ0xK95LjKXQaRe2gxP7A=",
        "owner": "5aaee9",
        "repo": "proxmox-nixos",
        "path": "/nix/store/kfmzrbg9zpsq2wrmfgrb0lw3h16jj2zy-source",
        "rev": "31e7e10c75d43313db000ff9834e7befebe6eb01",
        "type": "github"
        "type": "path"
      },
      "original": {
        "owner": "5aaee9",
        "repo": "proxmox-nixos",
        "type": "github"
        "id": "proxmox-nixos",
        "type": "indirect"
      }
    },
    "root": {

M flake.nix => flake.nix +0 -3
@@ 3,8 3,6 @@

  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
    #proxmox-nixos.url = "github:SaumonNet/proxmox-nixos";
    proxmox-nixos.url = "github:5aaee9/proxmox-nixos";
  };

  outputs = { nixpkgs, proxmox-nixos, ... }@inputs: let


@@ 16,7 14,6 @@
      essos = nixosSystem {
        system = "x86_64-linux";
        modules = [ 
          proxmox-nixos.nixosModules.proxmox-ve
          ./nixos/essos/configuration.nix 
          ./nixos/common.nix 
        ];

M nixos/essos/configuration.nix => nixos/essos/configuration.nix +1 -4
@@ 44,7 44,7 @@
  users.users = {
    elise = {
      isNormalUser = true;
      extraGroups = [ "wheel" ];
      extraGroups = [ "wheel" "libvirtd" ];
      shell = pkgs.zsh;
    };
  };


@@ 65,8 65,5 @@
    logind.lidSwitch = "ignore";
  };

  services.proxmox-ve.enable = true;
  nixpkgs.overlays = [ inputs.proxmox-nixos.overlays.x86_64-linux ];

  system.stateVersion = "22.11";
}

M nixos/essos/hypervisor.nix => nixos/essos/hypervisor.nix +16 -1
@@ 8,6 8,21 @@
  #  };
  #};

  virtualisation.libvirtd = {
    enable = true;
    qemu = {
      package = pkgs.qemu_kvm;
      runAsRoot = false;
    };
    extraConfig = ''
      listen_tls = 1
      listen_tcp = 1
    '';
  };

  systemd.sockets."libvirtd-tcp".enable = true;
  systemd.sockets."libvirtd-tls".enable = true;

  systemd.network.enable = true;

  systemd.network.netdevs."wlan-ap0" = {


@@ 76,7 91,7 @@

  networking.resolvconf.enable = false;

  networking.firewall.allowedTCPPorts = [ 53 ];
  networking.firewall.allowedTCPPorts = [ 53 16514 16509 ];
  networking.firewall.allowedUDPPorts = [ 53 ];

  services.hostapd = {