add incus

This commit is contained in:
Joseph Hanson 2024-09-01 16:39:07 -05:00
parent eb7fdfc327
commit 81847253a0
6 changed files with 49 additions and 11 deletions

View file

@ -83,10 +83,12 @@
ghostty = { ghostty = {
url = "git+ssh://git@github.com/ghostty-org/ghostty"; url = "git+ssh://git@github.com/ghostty-org/ghostty";
}; };
vscode-server.url = "github:nix-community/nixos-vscode-server";
}; };
outputs = outputs =
{ self, nixpkgs, sops-nix, home-manager, nix-vscode-extensions, impermanence, disko, talhelper, lix-module, ghostty, ... } @ inputs: { self, nixpkgs, sops-nix, home-manager, nix-vscode-extensions, impermanence, disko, talhelper, lix-module, ghostty, vscode-server, ... } @ inputs:
let let
forAllSystems = nixpkgs.lib.genAttrs [ forAllSystems = nixpkgs.lib.genAttrs [
"aarch64-linux" "aarch64-linux"
@ -251,6 +253,8 @@
./nixos/profiles/hw-supermicro.nix ./nixos/profiles/hw-supermicro.nix
]; ];
profileModules = [ profileModules = [
vscode-server.nixosModules.default
./nixos/profiles/role-dev.nix
./nixos/profiles/role-server.nix ./nixos/profiles/role-server.nix
{ home-manager.users.jahanson = ./nixos/home/jahanson/server.nix; } { home-manager.users.jahanson = ./nixos/home/jahanson/server.nix; }
]; ];

View file

@ -1,4 +1,4 @@
{ pkgs, config, ... }: { pkgs, config, inputs, ... }:
with config; with config;
{ {
imports = [ imports = [
@ -40,6 +40,7 @@ with config;
unstable.peazip unstable.peazip
unstable.telegram-desktop unstable.telegram-desktop
unstable.tidal-hifi unstable.tidal-hifi
inputs.ghostty.packages.${pkgs.system}.default
vlc vlc
# cli # cli

View file

@ -31,6 +31,30 @@ in
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBROTzSefJGJeCNUgNLbE5l4sHHg2fHUO4sCwqvP+zAd root@Gollum" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBROTzSefJGJeCNUgNLbE5l4sHHg2fHUO4sCwqvP+zAd root@Gollum"
]; ];
# VSCode Compatibility Settings
programs.nix-ld.enable = true;
services.vscode-server = {
enable = true;
};
# Home Manager
home-manager.users.jahanson = {
# Git settings
# TODO: Move to config module.
programs.git = {
enable = true;
userName = "Joseph Hanson";
userEmail = "joe@veri.dev";
extraConfig = {
core.autocrlf = "input";
init.defaultBranch = "main";
pull.rebase = true;
rebase.autoStash = true;
};
};
};
# Network settings # Network settings
networking = { networking = {
hostName = "gandalf"; hostName = "gandalf";
@ -45,11 +69,11 @@ in
}; };
# For VMs # For VMs
bridges = { # bridges = {
"br0" = { # "br0" = {
interfaces = [ "enp130s0f1" ]; # interfaces = [ "enp130s0f1" ];
}; # };
}; # };
}; };
swapDevices = [ ]; swapDevices = [ ];
@ -82,6 +106,10 @@ in
purpose = "Production"; purpose = "Production";
system = { system = {
motd.networkInterfaces = [ "enp130s0f0" "enp130s0f1" ]; motd.networkInterfaces = [ "enp130s0f0" "enp130s0f1" ];
# Incus
incus = {
enable = true;
};
# ZFS # ZFS
zfs.enable = true; zfs.enable = true;
zfs.mountPoolsAtBoot = [ "eru" ]; zfs.mountPoolsAtBoot = [ "eru" ];

View file

@ -14,9 +14,14 @@ in
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
networking.firewall.interfaces.podman0 = { networking.firewall.interfaces = {
allowedTCPPorts = [ 8080 8443 8880 8843 ]; enp130s0f0 = {
allowedUDPPorts = [ 3478 ]; allowedTCPPorts = [ 8443 ];
};
podman0 = {
allowedTCPPorts = [ 8080 8443 8880 8843 ];
allowedUDPPorts = [ 3478 ];
};
}; };
virtualisation.oci-containers.containers.${app} = { virtualisation.oci-containers.containers.${app} = {
image = "ghcr.io/goofball222/unifi:${version}"; image = "ghcr.io/goofball222/unifi:${version}";

View file

@ -3,6 +3,7 @@
./borg ./borg
./fingerprint-laptop-lid.nix ./fingerprint-laptop-lid.nix
./impermanence.nix ./impermanence.nix
./incus
./motd ./motd
./nfs ./nfs
./nix.nix ./nix.nix

View file

@ -24,7 +24,6 @@ with config;
# bind # for dns utils like named-checkconf # bind # for dns utils like named-checkconf
inputs.nix-inspect.packages.${pkgs.system}.default inputs.nix-inspect.packages.${pkgs.system}.default
inputs.talhelper.packages.${pkgs.system}.default inputs.talhelper.packages.${pkgs.system}.default
inputs.ghostty.packages.${pkgs.system}.default
]; ];
programs.direnv = { programs.direnv = {