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 = {
url = "git+ssh://git@github.com/ghostty-org/ghostty";
};
vscode-server.url = "github:nix-community/nixos-vscode-server";
};
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
forAllSystems = nixpkgs.lib.genAttrs [
"aarch64-linux"
@ -251,6 +253,8 @@
./nixos/profiles/hw-supermicro.nix
];
profileModules = [
vscode-server.nixosModules.default
./nixos/profiles/role-dev.nix
./nixos/profiles/role-server.nix
{ home-manager.users.jahanson = ./nixos/home/jahanson/server.nix; }
];

View file

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

View file

@ -31,6 +31,30 @@ in
"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
networking = {
hostName = "gandalf";
@ -45,11 +69,11 @@ in
};
# For VMs
bridges = {
"br0" = {
interfaces = [ "enp130s0f1" ];
};
};
# bridges = {
# "br0" = {
# interfaces = [ "enp130s0f1" ];
# };
# };
};
swapDevices = [ ];
@ -82,6 +106,10 @@ in
purpose = "Production";
system = {
motd.networkInterfaces = [ "enp130s0f0" "enp130s0f1" ];
# Incus
incus = {
enable = true;
};
# ZFS
zfs.enable = true;
zfs.mountPoolsAtBoot = [ "eru" ];

View file

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

View file

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

View file

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