Modularized Virtualisation
This commit is contained in:
parent
4c0f716232
commit
e87736fec6
1
.webui_secret_key
Normal file
1
.webui_secret_key
Normal file
@ -0,0 +1 @@
|
||||
kwFPhDwwopwPoXfz
|
||||
@ -57,18 +57,18 @@ in
|
||||
};
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
systemd.services.logid = {
|
||||
description = "Logitech Configuration Daemon";
|
||||
startLimitIntervalSec = 0;
|
||||
after = [ "multi-user.target" ];
|
||||
wants = [ "multi-user.target" ];
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
ExecStart = "/run/current-system/sw/bin/logid";
|
||||
User = "root";
|
||||
};
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
# systemd.services.logid = {
|
||||
# description = "Logitech Configuration Daemon";
|
||||
# startLimitIntervalSec = 0;
|
||||
# after = [ "multi-user.target" ];
|
||||
# wants = [ "multi-user.target" ];
|
||||
# serviceConfig = {
|
||||
# Type = "simple";
|
||||
# ExecStart = "/run/current-system/sw/bin/logid";
|
||||
# User = "root";
|
||||
# };
|
||||
# wantedBy = [ "multi-user.target" ];
|
||||
# };
|
||||
|
||||
# Install firefox.
|
||||
programs.firefox.enable = true;
|
||||
@ -83,19 +83,6 @@ in
|
||||
# gcc glib xorg.libXext
|
||||
# ];
|
||||
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
# enableNvidia = true; depreciated
|
||||
rootless = {
|
||||
enable = true;
|
||||
setSocketVariable = true;
|
||||
};
|
||||
daemon.settings = {
|
||||
userland-proxy = false;
|
||||
ipv6 = false;
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
printing.enable = true;
|
||||
ollama = {
|
||||
@ -104,6 +91,44 @@ in
|
||||
models = "/var/lib/ollama/models";
|
||||
environmentVariables = {};
|
||||
};
|
||||
open-webui = {
|
||||
enable = true;
|
||||
package = pkgs.open-webui;
|
||||
port = 4040;
|
||||
# host = "192.18.12.40";
|
||||
openFirewall = true;
|
||||
environment = {
|
||||
ANONYMIZED_TELEMETRY = "False";
|
||||
DO_NOT_TRACK = "True";
|
||||
SCARF_NO_ANALYTICS = "True";
|
||||
OLLAMA_API_BASE_URL = "http://127.0.0.1:11434/api";
|
||||
OLLAMA_BASE_URL = "http://127.0.0.1:11434";
|
||||
ENABLE_WEBSOCKET_SUPPORT = "True";
|
||||
WEBSOCKET_MANAGER= "redis";
|
||||
WEBSOCKET_REDIS_URL = "redis://127.0.0.1:6379/1";
|
||||
GLOBAL_LOG_LEVEL = "DEBUG";
|
||||
};
|
||||
};
|
||||
# comfyui = {
|
||||
# enable = true;
|
||||
# package = pkgs.comfyui-nvidia;
|
||||
# host = "0.0.0.0";
|
||||
# models = builtins.attrValues pkgs.nixified-ai.models;
|
||||
# customNodes = with comfyui.pkgs; [
|
||||
# comfyui-gguf
|
||||
# comfyui-impact-pack
|
||||
# ];
|
||||
# };
|
||||
redis = {
|
||||
package = pkgs.redis;
|
||||
vmOverCommit = true;
|
||||
servers = {
|
||||
bots = {
|
||||
enable = true;
|
||||
port = 6379;
|
||||
};
|
||||
};
|
||||
};
|
||||
input-remapper = {
|
||||
enable = true;
|
||||
enableUdevRules = true;
|
||||
@ -214,7 +239,8 @@ in
|
||||
kdePackages.qtpositioning kdePackages.qtlocation kdePackages.ark kdePackages.dolphin
|
||||
kdePackages.dolphin-plugins # kdePackages.kwallet kdePackages.kwalletmanager
|
||||
kdePackages.konsole
|
||||
kdePackages.qtwayland kdePackages.qtsvg kdePackages.kio kdePackages.kio-fuse kdePackages.kio-extras
|
||||
kdePackages.qtwayland kdePackages.qtsvg
|
||||
# kdePackages.kio kdePackages.kio-fuse kdePackages.kio-extras
|
||||
kdePackages.kdenetwork-filesharing
|
||||
kdePackages.kwallet kdePackages.kwalletmanager kdePackages.kwallet-pam
|
||||
# plasma5Packages.kwallet plasma5Packages.kwalletmanager plasma5Packages.kwallet-pam
|
||||
|
||||
78
flake.lock
generated
78
flake.lock
generated
@ -58,11 +58,11 @@
|
||||
"base16-vim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1740359818,
|
||||
"narHash": "sha256-Tbjclt9SnCMj+9Szk9M+xWZ6gbo14ylVT+YBvuzFadg=",
|
||||
"lastModified": 1742865606,
|
||||
"narHash": "sha256-pa/tL778j11FHzS6TTKA96q8EWxAEneeMeXG7kDO0/Q=",
|
||||
"owner": "tinted-theming",
|
||||
"repo": "base16-vim",
|
||||
"rev": "4dcc9a77d7aa19c063f0df00865ef60b7e99c8bd",
|
||||
"rev": "3bca166be9ad02e28934fd6e5c38c31f59cd28fe",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -202,14 +202,14 @@
|
||||
"nixpkgs-stable": "nixpkgs-stable",
|
||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||
"zig": "zig",
|
||||
"zig2nix": "zig2nix"
|
||||
"zon2nix": "zon2nix"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1741594465,
|
||||
"narHash": "sha256-8a/QIgNwV8VGn8JIiACmVVEdue+U3juiMSAO1DEUTC4=",
|
||||
"lastModified": 1744158770,
|
||||
"narHash": "sha256-2APOaRQd3ppQRgDPJAKluSu83XA78/b+0qghQp95kXU=",
|
||||
"owner": "ghostty-org",
|
||||
"repo": "ghostty",
|
||||
"rev": "95daca616db5c24d7bb37fd5a3ac2f8762bb4ead",
|
||||
"rev": "046e92865b4f2863815b7f7af52aab75d4bac63a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -246,11 +246,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1739757849,
|
||||
"narHash": "sha256-Gs076ot1YuAAsYVcyidLKUMIc4ooOaRGO0PqTY7sBzA=",
|
||||
"lastModified": 1744117652,
|
||||
"narHash": "sha256-t7dFCDl4vIOOUMhEZnJF15aAzkpaup9x4ZRGToDFYWI=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "9d3d080aec2a35e05a15cedd281c2384767c2cfe",
|
||||
"rev": "b4e98224ad1336751a2ac7493967a4c9f6d9cb3f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -345,11 +345,11 @@
|
||||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1738255539,
|
||||
"narHash": "sha256-hP2eOqhIO/OILW+3moNWO4GtdJFYCqAe9yJZgvlCoDQ=",
|
||||
"lastModified": 1741992157,
|
||||
"narHash": "sha256-nlIfTsTrMSksEJc1f7YexXiPVuzD1gOfeN1ggwZyUoc=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c3511a3b53b482aa7547c9d1626fd7310c1de1c5",
|
||||
"rev": "da4b122f63095ca1199bd4d526f9e26426697689",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -361,11 +361,11 @@
|
||||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1738136902,
|
||||
"narHash": "sha256-pUvLijVGARw4u793APze3j6mU1Zwdtz7hGkGGkD87qw=",
|
||||
"lastModified": 1741865919,
|
||||
"narHash": "sha256-4thdbnP6dlbdq+qZWTsm4ffAwoS8Tiq1YResB+RP6WE=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9a5db3142ce450045840cc8d832b13b8a2018e0c",
|
||||
"rev": "573c650e8a14b2faa0041645ab18aed7e60f0c9a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -377,11 +377,11 @@
|
||||
},
|
||||
"nixpkgs-unstable_2": {
|
||||
"locked": {
|
||||
"lastModified": 1741513245,
|
||||
"narHash": "sha256-7rTAMNTY1xoBwz0h7ZMtEcd8LELk9R5TzBPoHuhNSCk=",
|
||||
"lastModified": 1744098102,
|
||||
"narHash": "sha256-tzCdyIJj9AjysC3OuKA+tMD/kDEDAF9mICPDU7ix0JA=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "e3e32b642a31e6714ec1b712de8c91a3352ce7e1",
|
||||
"rev": "c8cd81426f45942bb2906d5ed2fe21d2f19d95b7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -409,11 +409,11 @@
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1741600792,
|
||||
"narHash": "sha256-yfDy6chHcM7pXpMF4wycuuV+ILSTG486Z/vLx/Bdi6Y=",
|
||||
"lastModified": 1744168086,
|
||||
"narHash": "sha256-S9M4HddBCxbbX1CKSyDYgZ8NCVyHcbKnBfoUXeRu2jQ=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "ebe2788eafd539477f83775ef93c3c7e244421d3",
|
||||
"rev": "60e405b241edb6f0573f3d9f944617fe33ac4a73",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -526,11 +526,11 @@
|
||||
"tt-schemes": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1741713929,
|
||||
"narHash": "sha256-XRwEa2+sau3jsVN4QcffFu7cWoxkKVs0oqysSu3Anxc=",
|
||||
"lastModified": 1742851696,
|
||||
"narHash": "sha256-sR4K+OVFKeUOvNIqcCr5Br7NLxOBEwoAgsIyjsZmb8s=",
|
||||
"owner": "tinted-theming",
|
||||
"repo": "schemes",
|
||||
"rev": "d4a7c5b683fb4d4150162d163889a7882625022e",
|
||||
"rev": "c37771c4ae8ff1667e27ddcf24991ebeb94a4e77",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -546,11 +546,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1741672271,
|
||||
"narHash": "sha256-uwzPVIiJUus20WRMhN7xVcHNaniYPEkXjeWoM3I5rQ0=",
|
||||
"lastModified": 1743912348,
|
||||
"narHash": "sha256-Ui+kUYOhkQ0wkoJbCPLN/LpYQGp+R5sNVsawZWZsEcQ=",
|
||||
"owner": "youwen5",
|
||||
"repo": "zen-browser-flake",
|
||||
"rev": "f9ed87557cb28ba557a15bb313f9b81554e90e0a",
|
||||
"rev": "75acddf6a50f3a4dd920a3a7220828605ba91090",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -574,11 +574,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1738239110,
|
||||
"narHash": "sha256-Y5i9mQ++dyIQr+zEPNy+KIbc5wjPmfllBrag3cHZgcE=",
|
||||
"lastModified": 1741825901,
|
||||
"narHash": "sha256-aeopo+aXg5I2IksOPFN79usw7AeimH1+tjfuMzJHFdk=",
|
||||
"owner": "mitchellh",
|
||||
"repo": "zig-overlay",
|
||||
"rev": "1a8fb6f3a04724519436355564b95fce5e272504",
|
||||
"rev": "0b14285e283f5a747f372fb2931835dd937c4383",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -587,7 +587,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"zig2nix": {
|
||||
"zon2nix": {
|
||||
"inputs": {
|
||||
"flake-utils": [
|
||||
"ghostty",
|
||||
@ -595,21 +595,21 @@
|
||||
],
|
||||
"nixpkgs": [
|
||||
"ghostty",
|
||||
"nixpkgs-stable"
|
||||
"nixpkgs-unstable"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1741368279,
|
||||
"narHash": "sha256-WTaC8HmnIq6O71iK0g9as404BbmS+YyEP5qS85m2JBY=",
|
||||
"lastModified": 1742104771,
|
||||
"narHash": "sha256-LhidlyEA9MP8jGe1rEnyjGFCzLLgCdDpYeWggibayr0=",
|
||||
"owner": "jcollie",
|
||||
"repo": "zig2nix",
|
||||
"rev": "672971b5b6911de21446ad4fc76dee677922eda0",
|
||||
"repo": "zon2nix",
|
||||
"rev": "56c159be489cc6c0e73c3930bd908ddc6fe89613",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "jcollie",
|
||||
"ref": "672971b5b6911de21446ad4fc76dee677922eda0",
|
||||
"repo": "zig2nix",
|
||||
"ref": "56c159be489cc6c0e73c3930bd908ddc6fe89613",
|
||||
"repo": "zon2nix",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
|
||||
@ -132,6 +132,8 @@ in
|
||||
# (import ../pkgs/app/editor/nvim.nix { pkgs = pkgs; })
|
||||
# (import ../pkgs/app/terminal/alacritty.nix { pkgs = pkgs; })
|
||||
# (import ../pkgs/app/audio/mopidy.nix { inherit pkgs; })
|
||||
(import ../pkgs/virtualisation/docker.nix { inherit pkgs; }) # This may have to go in config
|
||||
(import ../pkgs/virtualisation/vbox.nix { inherit pkgs; })
|
||||
];
|
||||
|
||||
nixpkgs = {
|
||||
|
||||
@ -3,6 +3,7 @@ with pkgs;
|
||||
[
|
||||
# LLM's
|
||||
lmstudio
|
||||
open-webui
|
||||
# aider-chat
|
||||
# (pkgs.python3.withPackages (ps: with ps; [
|
||||
# virtualenv
|
||||
|
||||
@ -413,6 +413,10 @@
|
||||
hostPath = "/home/wayne/dev/www/whc/2025/dashboard";
|
||||
isReadOnly = false;
|
||||
};
|
||||
"/var/www/budget" = {
|
||||
hostPath = "/home/wayne/dev/www/whc/2025/budget";
|
||||
isReadOnly = false;
|
||||
};
|
||||
};
|
||||
# Testing to see if this even works
|
||||
# forwardPorts = [
|
||||
@ -428,6 +432,7 @@
|
||||
};
|
||||
networking = {
|
||||
enableIPv6 = false;
|
||||
nameservers = [ "192.168.12.25" ];
|
||||
};
|
||||
|
||||
users = {
|
||||
|
||||
@ -9,4 +9,12 @@
|
||||
|
||||
in ["${automount_opts},credentials=/etc/nixos/smb-secrets,uid=1000,gid=100"];
|
||||
};
|
||||
fileSystems."/mnt/share/Backupsups" = {
|
||||
device = "//nas.local/Backups";
|
||||
fsType = "cifs";
|
||||
options = let
|
||||
automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s";
|
||||
|
||||
in ["${automount_opts},credentials=/etc/nixos/smb-secrets,uid=1000,gid=100"];
|
||||
};
|
||||
}
|
||||
@ -16,6 +16,7 @@
|
||||
"ai.cachix.org-1:N9dzRK+alWwoKXQlnn0H6aUx0lU/mspIoz8hMvGvbbc="
|
||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||
];
|
||||
allowed-users = *;
|
||||
trusted-users = [ "root" "wayne" ];
|
||||
cores = 12;
|
||||
max-jobs = 4; # Adjust this to your CPU core count or slightly below
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
};
|
||||
localVariables = {
|
||||
# aider-chat
|
||||
LD_LIBRARY_PATH = "${pkgs.stdenv.cc.cc.lib}/lib:${pkgs.zlib}/lib";
|
||||
# LD_LIBRARY_PATH = "${pkgs.stdenv.cc.cc.lib}/lib:${pkgs.zlib}/lib";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
17
pkgs/virtualisation/docker.nix
Normal file
17
pkgs/virtualisation/docker.nix
Normal file
@ -0,0 +1,17 @@
|
||||
{ pkgs, ...}:
|
||||
{
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
enableNvidia = true; # depreciated
|
||||
package = pkgs.docker;
|
||||
rootless = {
|
||||
enable = true;
|
||||
# setSocketVariable = true; # causes NVIDIA issues
|
||||
package = pkgs.docker;
|
||||
};
|
||||
daemon.settings = {
|
||||
userland-proxy = false;
|
||||
ipv6 = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
23
pkgs/virtualisation/vbox.nix
Normal file
23
pkgs/virtualisation/vbox.nix
Normal file
@ -0,0 +1,23 @@
|
||||
{ pkgs, ...}:
|
||||
{
|
||||
virtualisation.virtualbox = {
|
||||
host = {
|
||||
enable = true;
|
||||
package = pkgs.virtualbox;
|
||||
enableExtensionPack = true;
|
||||
enableWebService = true;
|
||||
addNetworkInterface = true;
|
||||
enableHardening = true;
|
||||
headless = false;
|
||||
enableKvm = false;
|
||||
};
|
||||
guest = {
|
||||
enable = true;
|
||||
seamless = true;
|
||||
dragAndDrop = true;
|
||||
clipboard = true;
|
||||
vboxsf = true;
|
||||
verbose = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@ -227,7 +227,7 @@
|
||||
"dbus-daemon --session --address=unix:path=$XDG_RUNTIME_DIR/bus"
|
||||
"dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
|
||||
"systemctl --user start plasma-polkit-agent"
|
||||
"/nix/store/vgj704dz4i60cj70cvq988g1c6yg33l9-kwallet-pam-6.2.5/libexec/pam_kwallet_init --no-startup-id"
|
||||
"/nix/store/vgj704dz4i60cj70cvq988g1c6yg33l9-kwallet-pam-6.2.5/libexec/pam_kwallet_init --no-startup-id" # Find a better path, changes on garbage collection
|
||||
"waybar &"
|
||||
# "hyprpaper &"
|
||||
"hypridle &"
|
||||
@ -239,12 +239,12 @@
|
||||
"${config.home.homeDirectory}/.config/hypr/scripts/start-keybase-gui.sh &"
|
||||
"input-remapper-control --command autoload &"
|
||||
|
||||
# "[workspace 4 silent] remmina -c rdp://wayne@xeon.local"
|
||||
"[workspace 4 silent] remmina -c rdp://wayne@xeon.local"
|
||||
|
||||
"[workspace 7 silent] sublime3"
|
||||
"[workspace 9 silent] keepassxc"
|
||||
"[workspace 9 silent] /home/wayne/.nix-profile/bin/nextcloud --background"
|
||||
"[workspace 9 silent] /home/wayne/.nix-profile/bin/keybase-gui %u &"
|
||||
"[workspace 9 silent] /home/wayne/.nix-profile/bin/keybase-gui %u"
|
||||
|
||||
# "/nix/store/r3fdp5rlxcihmqhpcgy91sj918wnrmrc-pyprland-2.3.4/bin/pypr --debug ~/tmp/pypr.log"
|
||||
];
|
||||
|
||||
@ -215,6 +215,7 @@
|
||||
},
|
||||
|
||||
"tray": {
|
||||
"show-passive-items": true,
|
||||
"icon-size": 31,
|
||||
"spacing": 10
|
||||
},
|
||||
|
||||
@ -19,7 +19,8 @@
|
||||
include = "~/system/pkgs/wm/waybar/default.json";
|
||||
modules-left = [ "custom/os_button" "hyprland/workspaces#roman" ];
|
||||
modules-center = [ "hyprland/window" "wlr/taskbar" ]; # replace wlr/taskbar
|
||||
modules-right = [ "custom/pavc" "cava" "pulseaudio/slider" "cpu" "temperature" "disk" "bluetooth" "tray" "clock" "custom/exit" ];
|
||||
modules-right = [ "custom/pavc" "cava" "pulseaudio/slider" "cpu" "temperature" "disk" "tray" "clock" "custom/exit" ];
|
||||
# modules-right = [ "custom/pavc" "cava" "pulseaudio/slider" "cpu" "temperature" "disk" "bluetooth" "tray" "clock" "custom/exit" ];
|
||||
|
||||
"custom/os_button" = {
|
||||
"format" = "";
|
||||
@ -44,9 +45,10 @@
|
||||
};
|
||||
rightBar = {
|
||||
layer = "top";
|
||||
position = "bottom";
|
||||
position = "top";
|
||||
height = 47;
|
||||
output = "DP-6";
|
||||
margin-bottom = 3;
|
||||
include = "~/system/pkgs/wm/waybar/default.json";
|
||||
modules-left = [ "systemd-failed-units" "jack" ];
|
||||
modules-center = [ "wlr/taskbar" ];
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user