Compare commits
61 Commits
8791432964
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 383c7bb15e | |||
| a4bb91e68e | |||
| 13f301c4fb | |||
| 114a1ae125 | |||
| 9a4ab98506 | |||
| bf0d4a11d2 | |||
| 0950758532 | |||
| 31907ff47b | |||
| a985e8a0da | |||
| 8add79d14c | |||
| 93523c54f2 | |||
| c07dfe4259 | |||
| 978b7ac2b7 | |||
| d1ccaa1c57 | |||
| 1c098a032b | |||
| b951779a92 | |||
| 889d0b1057 | |||
| 64cac2b167 | |||
| 2f278b5ecb | |||
| a0448def04 | |||
| edb0f18989 | |||
| cfde735570 | |||
| 9bbb4aa2dc | |||
| 9818771f7c | |||
| f7af96c497 | |||
| 499b0f4334 | |||
| 879ad11d96 | |||
| 640eaec8a1 | |||
| 898e1bdde0 | |||
| a6d4c40beb | |||
| a13e8cea19 | |||
| 3b8e38e702 | |||
| 05c001081e | |||
| 3e2e3aca21 | |||
| 1837a545a4 | |||
| 5c7649d3df | |||
| 3bb9ebf875 | |||
| ee3b7c2c53 | |||
| 746e31dca2 | |||
| 9a59e60044 | |||
| 646221721e | |||
| 554b2863f3 | |||
| 5829dc294e | |||
| 0645912626 | |||
| 430a041724 | |||
| 80512c29ea | |||
| 392d6fe537 | |||
| 6d1e715d9c | |||
| 94b8065dba | |||
| ea902faf43 | |||
| 3d3fa1ed68 | |||
| cd4367e252 | |||
| cf4d54ebfd | |||
| 3b46856b66 | |||
| 1d1702bd9b | |||
| 8a566715db | |||
| 19d8c5c097 | |||
| b3c6e951ee | |||
| 44ac6ce262 | |||
| 1c2cd59f1f | |||
| ca4d4d714c |
22
flake.lock
generated
22
flake.lock
generated
@@ -7,32 +7,32 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1750792728,
|
||||
"narHash": "sha256-Lh3dopA8DdY+ZoaAJPrtkZOZaFEJGSYjOdAYYgOPgE4=",
|
||||
"lastModified": 1767910483,
|
||||
"narHash": "sha256-MOU5YdVu4DVwuT5ztXgQpPuRRBjSjUGIdUzOQr9iQOY=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "366f00797b1efb70f2882d3da485e3c10fd3d557",
|
||||
"rev": "82fb7dedaad83e5e279127a38ef410bcfac6d77c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-25.05",
|
||||
"ref": "release-25.11",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1750969886,
|
||||
"narHash": "sha256-zW/OFnotiz/ndPFdebpo3X0CrbVNf22n4DjN2vxlb58=",
|
||||
"lastModified": 1767799921,
|
||||
"narHash": "sha256-r4GVX+FToWVE2My8VVZH4V0pTIpnu2ZE8/Z4uxGEMBE=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "a676066377a2fe7457369dd37c31fd2263b662f4",
|
||||
"rev": "d351d0653aeb7877273920cd3e823994e7579b0b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-25.05",
|
||||
"ref": "nixos-25.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
@@ -51,11 +51,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1750119275,
|
||||
"narHash": "sha256-Rr7Pooz9zQbhdVxux16h7URa6mA80Pb/G07T4lHvh0M=",
|
||||
"lastModified": 1767826491,
|
||||
"narHash": "sha256-WSBENPotD2MIhZwolL6GC9npqgaS5fkM7j07V2i/Ur8=",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "77c423a03b9b2b79709ea2cb63336312e78b72e2",
|
||||
"rev": "ea3adcb6d2a000d9a69d0e23cad1f2cacb3a9fbe",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
22
flake.nix
22
flake.nix
@@ -2,11 +2,9 @@
|
||||
description = "System Configuration";
|
||||
|
||||
inputs = {
|
||||
nixpkgs = {
|
||||
url = "github:nixos/nixpkgs?ref=nixos-25.05";
|
||||
};
|
||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-25.11";
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager?ref=release-25.05";
|
||||
url = "github:nix-community/home-manager?ref=release-25.11";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
sops-nix = {
|
||||
@@ -16,7 +14,11 @@
|
||||
};
|
||||
|
||||
outputs =
|
||||
{ self, nixpkgs, ... }@inputs:
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
...
|
||||
}@inputs:
|
||||
let
|
||||
local = import ./lib;
|
||||
mkNixosConfig =
|
||||
@@ -31,11 +33,13 @@
|
||||
modules = [
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.extraSpecialArgs = {
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
extraSpecialArgs = {
|
||||
inherit inputs local;
|
||||
};
|
||||
};
|
||||
}
|
||||
path
|
||||
];
|
||||
@@ -57,7 +61,7 @@
|
||||
};
|
||||
};
|
||||
features = {
|
||||
development = (import ./home-manager/features/development/development.nix);
|
||||
development = import ./home-manager/features/development/development.nix;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -8,7 +8,11 @@
|
||||
discord = {
|
||||
name = "Discord";
|
||||
# Custom options to reduce flickering under wayland.
|
||||
exec = "discord --enable-features=UseOzonePlatform --ozone-platform=wayland --disable-gpu";
|
||||
exec = "env ELECTRON_OZONE_PLATFORM_HINT= discord --enable-features=UseOzonePlatform --ozone-platform=wayland --disable-gpu";
|
||||
};
|
||||
};
|
||||
wayland.windowManager.hyprland.settings.bind = [
|
||||
# Pass Mouse4 through to discord
|
||||
# ", mouse:275, pass, class:^discord$"
|
||||
];
|
||||
}
|
||||
|
||||
64
home-manager/features/3d-printing.nix
Normal file
64
home-manager/features/3d-printing.nix
Normal file
@@ -0,0 +1,64 @@
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
freecad-wrapped = pkgs.symlinkJoin {
|
||||
name = "freecad-wrapped";
|
||||
paths = [ pkgs.freecad ];
|
||||
buildInputs = [ pkgs.makeWrapper ];
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/freecad \
|
||||
--prefix MESA_LOADER_DRIVER_OVERRIDE : zink \
|
||||
--prefix __EGL_VENDOR_LIBRARY_FILENAMES : ${pkgs.mesa}/share/glvnd/egl_vendor.d/50_mesa.json
|
||||
'';
|
||||
};
|
||||
|
||||
bambu-studio-wrapped = pkgs.symlinkJoin {
|
||||
name = "bambu-studio-wrapped";
|
||||
paths = [ pkgs.bambu-studio ];
|
||||
buildInputs = [ pkgs.makeWrapper ];
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/bambu-studio \
|
||||
--prefix MESA_LOADER_DRIVER_OVERRIDE : zink \
|
||||
--prefix __EGL_VENDOR_LIBRARY_FILENAMES : ${pkgs.mesa}/share/glvnd/egl_vendor.d/50_mesa.json
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
|
||||
home.packages = with pkgs; [
|
||||
bambu-studio-wrapped
|
||||
LycheeSlicer
|
||||
orca-slicer
|
||||
|
||||
blender
|
||||
|
||||
freecad-wrapped
|
||||
openscad
|
||||
];
|
||||
|
||||
xdg.desktopEntries.orynt3d =
|
||||
let
|
||||
orynt3d-appimage = pkgs.fetchurl {
|
||||
name = "orynt3d-appimage";
|
||||
url = "https://files.orynt3d.com/client/Orynt3D-0.15.3.AppImage";
|
||||
sha256 = "0j10myj06ff4frsd4yv7z3lb3qgw3ha70hc5hdc9idbryica801y";
|
||||
};
|
||||
in
|
||||
{
|
||||
name = "Orynt3D";
|
||||
exec = "env __EGL_VENDOR_LIBRARY_FILENAMES=/run/opengl-driver/share/glvnd/egl_vendor.d/10_nvidia.json ${pkgs.appimage-run}/bin/appimage-run ${orynt3d-appimage}";
|
||||
terminal = false;
|
||||
type = "Application";
|
||||
# icon = "";
|
||||
comment = "3D model viewer and organizer";
|
||||
categories = [
|
||||
"Science"
|
||||
"Development"
|
||||
];
|
||||
};
|
||||
|
||||
# Options to get Bambu Studio to run:
|
||||
# __GLX_VENDOR_LIBRARY_NAME=mesa __EGL_VENDOR_LIBRARY_FILENAMES=/nix/store/js9cfbjvlsls14nddk39fw74vyvlhz4l-mesa-25.0.7/share/glvnd/egl_vendor.d/50_mesa.json MESA_LOADER_DRIVER_OVERRIDE=zink GALLIUM_DRIVER=zink WEBKIT_DISABLE_DMABUF_RENDERER=1 bambu-studio
|
||||
}
|
||||
8
home-manager/features/astronomy.nix
Normal file
8
home-manager/features/astronomy.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
stellarium
|
||||
kstars
|
||||
celestia
|
||||
];
|
||||
}
|
||||
@@ -1,7 +1,41 @@
|
||||
{ pkgs, ... }:
|
||||
with pkgs;
|
||||
let
|
||||
# A script that runs as long as media is playing.
|
||||
isMediaPlaying = writeShellApplication {
|
||||
name = "isMediaPlaying";
|
||||
runtimeInputs = [
|
||||
playerctl
|
||||
];
|
||||
text = ''
|
||||
set -e
|
||||
|
||||
while [ "$(playerctl status)" = "Playing" ]; do
|
||||
echo -n "."
|
||||
sleep 1
|
||||
done
|
||||
'';
|
||||
};
|
||||
# A script that prevents the system from going to sleep while media is playing
|
||||
mediaCaffeine = writeShellApplication {
|
||||
name = "media-caffeine";
|
||||
runtimeInputs = [
|
||||
isMediaPlaying
|
||||
systemd
|
||||
];
|
||||
text = ''
|
||||
set -e
|
||||
|
||||
systemd-inhibit --what=sleep --why="Media is playing" --mode=block isMediaPlaying
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
pulseaudio # for pactl and other tools
|
||||
pavucontrol # GUI volume control with lots of options
|
||||
|
||||
mediaCaffeine
|
||||
];
|
||||
|
||||
}
|
||||
|
||||
11
home-manager/features/chat.nix
Normal file
11
home-manager/features/chat.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
../apps/element.nix
|
||||
../apps/discord.nix
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
signal-desktop
|
||||
];
|
||||
}
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
nixfmt-rfc-style # Formatter
|
||||
nil # Language Server
|
||||
statix # Lints and suggestions for Nix
|
||||
];
|
||||
|
||||
home.shellAliases = {
|
||||
@@ -14,4 +15,3 @@
|
||||
rebuild-boot = "sudo nixos-rebuild boot --flake ~/system-config --show-trace --print-build-logs --verbose";
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -3,5 +3,4 @@
|
||||
(include "./primary-statusbar.yuck")
|
||||
(include "./secondary-statusbar.yuck")
|
||||
(include "./system-monitor.yuck")
|
||||
(include "./launcher.yuck")
|
||||
(include "./vertical-statusbar.yuck")
|
||||
|
||||
@@ -1,74 +0,0 @@
|
||||
(defwindow launcher
|
||||
:monitor '[ "<primary>", "DP-2", 0 ]'
|
||||
:geometry (geometry
|
||||
:x "100px"
|
||||
:y "100px"
|
||||
:anchor "top left"
|
||||
)
|
||||
:stacking "bottom"
|
||||
:exclusive false
|
||||
:focusable false
|
||||
(box
|
||||
:class "launcher-window stand-alone"
|
||||
:orientation "v"
|
||||
:spacing 4
|
||||
:visible { arraylength(jq(workspaces-json-dp2, "map(select(.active and (.has_windows | not)))")) > 0 }
|
||||
(box
|
||||
:orientation "v"
|
||||
:halign "start"
|
||||
:spacing 4
|
||||
:space-evenly false
|
||||
(label
|
||||
:text "Apps"
|
||||
:halign "start"
|
||||
)
|
||||
(box
|
||||
:orientation "h"
|
||||
:halign "start"
|
||||
:spacing 4
|
||||
:space-evenly false
|
||||
(button
|
||||
:onclick "firefox"
|
||||
(image
|
||||
:class "launcher-icon"
|
||||
:icon "firefox"
|
||||
:icon-size "dialog"
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(box
|
||||
:orientation "v"
|
||||
:halign "start"
|
||||
:spacing 4
|
||||
:space-evenly false
|
||||
(label
|
||||
:text "Games"
|
||||
:halign "start"
|
||||
)
|
||||
(box
|
||||
:orientation "h"
|
||||
:halign "start"
|
||||
:spacing 4
|
||||
:space-evenly false
|
||||
(button
|
||||
;; :onclick "env LUTRIS_SKIP_INIT=1 lutris lutris:rungameid/1"
|
||||
:onclick "/home/drew/.local/bin/wow.sh >/tmp/wow.log 2>&1"
|
||||
(image
|
||||
:class "launcher-icon"
|
||||
:image-width 48
|
||||
:path "/home/drew/.local/share/icons/hicolor/128x128/apps/lutris_battlenet.png"
|
||||
)
|
||||
)
|
||||
;; (button
|
||||
;; :onclick "steam steam://rungameid/1145350"
|
||||
;; (image
|
||||
;; :class "launcher-icon"
|
||||
;; :icon "steam_icon_1145350"
|
||||
;; :icon-size "dialog"
|
||||
;; )
|
||||
;;)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -16,7 +16,7 @@ let
|
||||
# '';
|
||||
warcraftLogsUploader = pkgs.fetchurl {
|
||||
name = "warcraftlogs-client";
|
||||
url = "https://github.com/RPGLogs/Uploaders-warcraftlogs/releases/download/v8.16.56/warcraftlogs-v8.16.56.AppImage";
|
||||
url = "https://github.com/RPGLogs/Uploaders-warcraftlogs/releases/download/v8.17.47/warcraftlogs-v8.17.47.AppImage";
|
||||
sha256 = "1aypr3ffy6lq0qj64d48c7n54nfs72404xb2kpxsw5slqh66imw6";
|
||||
};
|
||||
warcraftLogsIcon = pkgs.fetchurl {
|
||||
@@ -27,7 +27,7 @@ let
|
||||
raiderioClient = pkgs.fetchurl {
|
||||
name = "raiderio-client";
|
||||
url = "https://raider.io/client/download/linux";
|
||||
sha256 = "1iny8zhp12x40mnxxr7p6kbyyvxf16373d2qa8idxs3hw5fz7gnx";
|
||||
sha256 = "0wcw53bgr9dr02x1ci2jlnc5irpiqxqxgs2hpbrsnj67q50nvlm9";
|
||||
};
|
||||
raiderioIcon = pkgs.fetchurl {
|
||||
name = "raiderio-icon";
|
||||
@@ -47,10 +47,14 @@ in
|
||||
})
|
||||
protonup-ng
|
||||
protonplus
|
||||
protontricks
|
||||
vulkan-tools # useful for debugging Vulkan issues
|
||||
|
||||
# WoW addon updater
|
||||
wowup-cf
|
||||
|
||||
# Nexus Mod Manager
|
||||
nexusmods-app-unfree
|
||||
];
|
||||
|
||||
# xdg.dataFile."applications/wowup-cf.desktop" = {
|
||||
@@ -81,7 +85,7 @@ in
|
||||
categories = [ "Game" ];
|
||||
};
|
||||
|
||||
xdg.desktopEntries.raiderio = local.electronDesktopEntry {
|
||||
xdg.desktopEntries.raiderio = {
|
||||
name = "Raider.io";
|
||||
exec = "${pkgs.appimage-run}/bin/appimage-run ${raiderioClient}";
|
||||
terminal = false;
|
||||
@@ -100,11 +104,16 @@ in
|
||||
|
||||
# Make sure WoW spawns on the right monitor and that Battlenet floats so it renders correctly
|
||||
"monitor 1,title:^World of Warcraft$"
|
||||
"fullscreen,title:^World of Warcraft$"
|
||||
"monitor 1,title:^Battle.net$"
|
||||
"float,title:^Battle.net$"
|
||||
|
||||
# Make Balatro into a regular window.
|
||||
"monitor 1,title:^Balatro$"
|
||||
"tile,title:^Balatro$"
|
||||
|
||||
# Load Cyberpunk 2077 on the right monitor.
|
||||
"monitor 1,class:steam_app_1091500"
|
||||
"fullscreen,class:steam_app_1091500"
|
||||
];
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
"$terminal" = "foot";
|
||||
"$menu" = "rofi -show combi -combi-modes drun,ssh,run -theme ~/.config/rofi/launcher/style.rasi";
|
||||
"$browser" = "librewolf";
|
||||
"$browser" = "firefox --new-window";
|
||||
|
||||
exec-once = [
|
||||
"nm-applet"
|
||||
@@ -287,6 +287,7 @@
|
||||
"$mainMod, B, exec, $browser"
|
||||
"$mainMod, D, exec, $menu"
|
||||
"$mainMod + SHIFT, S, exec, hyprshot -m region --clipboard-only"
|
||||
"$mainMod + CTRL + SHIFT, S, exec, hyprshot -m region -o ~/Pictures"
|
||||
"$mainMod, C, exec, swaync-client -t"
|
||||
|
||||
"$mainMod + L_CONTROL, Q, exec, /home/drew/.config/rofi/powermenu/powermenu.sh"
|
||||
|
||||
7
home-manager/features/image-editing.nix
Normal file
7
home-manager/features/image-editing.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
gimp3
|
||||
inkscape
|
||||
];
|
||||
}
|
||||
@@ -13,7 +13,6 @@
|
||||
home = {
|
||||
packages = with pkgs; [
|
||||
# Desktop Applications
|
||||
signal-desktop
|
||||
gimp3
|
||||
|
||||
# Common utilities
|
||||
@@ -51,8 +50,8 @@
|
||||
programs = {
|
||||
# browsers
|
||||
firefox.enable = true;
|
||||
qutebrowser.enable = true;
|
||||
librewolf.enable = true;
|
||||
chromium.enable = true;
|
||||
};
|
||||
|
||||
# GTK settings
|
||||
@@ -89,13 +88,13 @@
|
||||
xdg.mimeApps = {
|
||||
enable = true;
|
||||
defaultApplications = {
|
||||
"text/html" = [ "librewolf.desktop" ];
|
||||
"default-web-browser" = [ "librewolf.desktop" ];
|
||||
"x-scheme-handler/http" = [ "librewolf.desktop" ];
|
||||
"x-scheme-handler/https" = [ "librewolf.desktop" ];
|
||||
"x-scheme-handler/about" = [ "librewolf.desktop" ];
|
||||
"x-scheme-handler/unknown" = [ "librewolf.desktop" ];
|
||||
"text/html" = [ "firefox.desktop" ];
|
||||
"default-web-browser" = [ "firefox.desktop" ];
|
||||
"x-scheme-handler/http" = [ "firefox.desktop" ];
|
||||
"x-scheme-handler/https" = [ "firefox.desktop" ];
|
||||
"x-scheme-handler/about" = [ "firefox.desktop" ];
|
||||
"x-scheme-handler/unknown" = [ "firefox.desktop" ];
|
||||
};
|
||||
};
|
||||
home.sessionVariables.DEFAULT_BROWSER = "${pkgs.librewolf}/bin/librewolf";
|
||||
home.sessionVariables.DEFAULT_BROWSER = "${pkgs.firefox}/bin/firefox";
|
||||
}
|
||||
|
||||
18
home-manager/features/neovim/config/lazyvim.json
Normal file
18
home-manager/features/neovim/config/lazyvim.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"extras": [
|
||||
"lazyvim.plugins.extras.coding.mini-comment",
|
||||
"lazyvim.plugins.extras.coding.mini-surround",
|
||||
"lazyvim.plugins.extras.editor.snacks_picker",
|
||||
"lazyvim.plugins.extras.lang.astro",
|
||||
"lazyvim.plugins.extras.lang.haskell",
|
||||
"lazyvim.plugins.extras.lang.json",
|
||||
"lazyvim.plugins.extras.lang.markdown",
|
||||
"lazyvim.plugins.extras.lang.nix",
|
||||
"lazyvim.plugins.extras.lang.rust",
|
||||
"lazyvim.plugins.extras.lang.tailwind",
|
||||
"lazyvim.plugins.extras.lang.toml",
|
||||
"lazyvim.plugins.extras.lang.typescript"
|
||||
],
|
||||
"install_version": 8,
|
||||
"version": 8
|
||||
}
|
||||
@@ -31,7 +31,7 @@ return {
|
||||
cmp.show()
|
||||
end,
|
||||
},
|
||||
["<C-enter>"] = { "select_and_accept" },
|
||||
["<Tab>"] = { "select_and_accept", "snippet_forward", "fallback" },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
return {
|
||||
{
|
||||
"zbirenbaum/copilot.lua",
|
||||
opts = {
|
||||
filetypes = {
|
||||
markdown = false,
|
||||
help = false,
|
||||
},
|
||||
suggestion = {
|
||||
enabled = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
return {
|
||||
-- Maeson installs it's own binaries that are incompatible with NixOS.
|
||||
{ "williamboman/mason.nvim", enabled = false },
|
||||
{ "williamboman/mason-lspconfig.nvim", enabled = false },
|
||||
{ "mason-org/mason.nvim", enabled = false },
|
||||
{ "mason-org/mason-lspconfig.nvim", enabled = false },
|
||||
}
|
||||
|
||||
@@ -3,9 +3,14 @@ return {
|
||||
"neovim/nvim-lspconfig",
|
||||
opts = {
|
||||
servers = {
|
||||
-- Lua
|
||||
lua_ls = {},
|
||||
-- Nix
|
||||
nil_ls = {},
|
||||
-- Typescript
|
||||
vtsls = {},
|
||||
-- Haskell
|
||||
hls = {},
|
||||
},
|
||||
codelens = {
|
||||
enable = true,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
-- https://github.com/MeanderingProgrammer/render-markdown.nvim?tab=readme-ov-file#setup
|
||||
return {
|
||||
"MeanderingProgrammer/render-markdown.nvim",
|
||||
opts = {
|
||||
|
||||
@@ -1,10 +1,38 @@
|
||||
return {
|
||||
{
|
||||
"echasnovski/mini.surround",
|
||||
"nvim-mini/mini.surround",
|
||||
enable = true,
|
||||
keys = function(_, keys)
|
||||
-- Populate the keys based on the user's options
|
||||
local opts = LazyVim.opts("mini.surround")
|
||||
local mappings = {
|
||||
{ opts.mappings.add, desc = "Add Surrounding", mode = { "n", "v" } },
|
||||
{ opts.mappings.delete, desc = "Delete Surrounding" },
|
||||
{ opts.mappings.find, desc = "Find Right Surrounding" },
|
||||
{ opts.mappings.find_left, desc = "Find Left Surrounding" },
|
||||
{ opts.mappings.highlight, desc = "Highlight Surrounding" },
|
||||
{ opts.mappings.replace, desc = "Replace Surrounding" },
|
||||
{ opts.mappings.update_n_lines, desc = "Update `MiniSurround.config.n_lines`" },
|
||||
}
|
||||
mappings = vim.tbl_filter(function(m)
|
||||
return m[1] and #m[1] > 0
|
||||
end, mappings)
|
||||
return vim.list_extend(mappings, keys)
|
||||
end,
|
||||
opts = {
|
||||
mappings = {
|
||||
add = "gsa", -- Add surrounding in Normal and Visual modes
|
||||
delete = "gsd", -- Delete surrounding
|
||||
find = "gsf", -- Find surrounding (to the right)
|
||||
find_left = "gsF", -- Find surrounding (to the left)
|
||||
highlight = "gsh", -- Highlight surrounding
|
||||
replace = "gsr", -- Replace surrounding
|
||||
update_n_lines = "gsn", -- Update `n_lines`
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"echasnovski/mini.comment",
|
||||
"nvim-mini/mini.comment",
|
||||
enable = true,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,22 +1,7 @@
|
||||
return {
|
||||
"epwalsh/obsidian.nvim",
|
||||
"obsidian-nvim/obsidian.nvim",
|
||||
version = "*", -- recommended, use latest release instead of latest commit
|
||||
lazy = true,
|
||||
ft = "markdown",
|
||||
-- Replace the above line with this if you only want to load obsidian.nvim for markdown files in your vault:
|
||||
-- event = {
|
||||
-- -- If you want to use the home shortcut '~' here you need to call 'vim.fn.expand'.
|
||||
-- -- E.g. "BufReadPre " .. vim.fn.expand "~" .. "/my-vault/*.md"
|
||||
-- -- refer to `:h file-pattern` for more examples
|
||||
-- "BufReadPre path/to/my-vault/*.md",
|
||||
-- "BufNewFile path/to/my-vault/*.md",
|
||||
-- },
|
||||
dependencies = {
|
||||
-- Required.
|
||||
"nvim-lua/plenary.nvim",
|
||||
-- For the picker
|
||||
"nvim-telescope/telescope.nvim",
|
||||
},
|
||||
opts = {
|
||||
workspaces = {
|
||||
{
|
||||
@@ -80,5 +65,9 @@ return {
|
||||
end
|
||||
end
|
||||
end,
|
||||
|
||||
follow_url_func = function(url)
|
||||
vim.ui.open(url) -- Use the built-in open, need Neovim 0.10.0+
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
return {
|
||||
"folke/snacks.nvim",
|
||||
---@type snacks.Config
|
||||
opts = {
|
||||
opts = function(_, opts)
|
||||
vim.tbl_deep_extend("force", opts, {
|
||||
picker = {
|
||||
smart = {
|
||||
-- Remove the "recent" picker so we don't get things from other directories.
|
||||
@@ -15,286 +15,51 @@ return {
|
||||
cwd_bonus = true,
|
||||
-- Give more weight to files that are more recent
|
||||
history_bonus = true,
|
||||
-- Give more weight to places where the filename is part of the match
|
||||
filename_bonus = true,
|
||||
},
|
||||
},
|
||||
sources = {
|
||||
explorer = {
|
||||
layout = { layout = { position = "right" } },
|
||||
},
|
||||
},
|
||||
-- This only supports the Kitty graphics protocol.
|
||||
-- See
|
||||
-- https://github.com/folke/snacks.nvim/blob/main/docs/image.md
|
||||
-- https://github.com/obsidian-nvim/obsidian.nvim/wiki/Images
|
||||
-- image = {
|
||||
-- resolve = function(path, src)
|
||||
-- if require("obsidian.api").path_is_note(path) then
|
||||
-- return require("obsidian.api").resolve_image_path(src)
|
||||
-- end
|
||||
-- end,
|
||||
-- },
|
||||
},
|
||||
})
|
||||
Snacks.toggle({
|
||||
name = "Color Column",
|
||||
get = function()
|
||||
return vim.o.colorcolumn == "80"
|
||||
end,
|
||||
set = function(state)
|
||||
if state then
|
||||
vim.o.colorcolumn = "80"
|
||||
vim.cmd([[highlight ColorColumn guibg=#202020]])
|
||||
else
|
||||
vim.o.colorcolumn = ""
|
||||
vim.cmd([[highlight ColorColumn guibg=None]])
|
||||
end
|
||||
end,
|
||||
}):map("<leader>ut", { desc = "Toggle Color Column" })
|
||||
end,
|
||||
keys = {
|
||||
{
|
||||
"<leader><space>",
|
||||
function()
|
||||
Snacks.picker.smart({
|
||||
-- Remove the "recent" picker so we don't get things from other directories.
|
||||
multi = { "buffers", "files" },
|
||||
matcher = {
|
||||
-- sort even when the search string is empty
|
||||
sort_empty = false,
|
||||
-- Enable frecensy for matchers. This puts more common files near
|
||||
-- the top This includes files that aren't open and can put files I
|
||||
-- am done with above open files, so it's off.
|
||||
frecency = false,
|
||||
-- Make sure files in the current directory are prioritized
|
||||
cwd_bonus = true,
|
||||
-- Give more weight to files that are more recent
|
||||
history_bonus = true,
|
||||
-- Give more weight to places where the filename is part of the match
|
||||
filename_bonus = true,
|
||||
},
|
||||
})
|
||||
Snacks.picker.smart()
|
||||
end,
|
||||
desc = "Smart Find Files",
|
||||
},
|
||||
|
||||
-- The rest of these are just default bindings. Setting the one binding above seems to override the others.
|
||||
{
|
||||
"<leader>,",
|
||||
function()
|
||||
Snacks.picker.buffers()
|
||||
end,
|
||||
desc = "Buffers",
|
||||
},
|
||||
{ "<leader>/", LazyVim.pick("grep"), desc = "Grep (Root Dir)" },
|
||||
{
|
||||
"<leader>:",
|
||||
function()
|
||||
Snacks.picker.command_history()
|
||||
end,
|
||||
desc = "Command History",
|
||||
},
|
||||
{
|
||||
"<leader>n",
|
||||
function()
|
||||
Snacks.picker.notifications()
|
||||
end,
|
||||
desc = "Notification History",
|
||||
},
|
||||
-- find
|
||||
{
|
||||
"<leader>fb",
|
||||
function()
|
||||
Snacks.picker.buffers()
|
||||
end,
|
||||
desc = "Buffers",
|
||||
},
|
||||
{
|
||||
"<leader>fB",
|
||||
function()
|
||||
Snacks.picker.buffers({ hidden = true, nofile = true })
|
||||
end,
|
||||
desc = "Buffers (all)",
|
||||
},
|
||||
{ "<leader>fc", LazyVim.pick.config_files(), desc = "Find Config File" },
|
||||
{ "<leader>ff", LazyVim.pick("files"), desc = "Find Files (Root Dir)" },
|
||||
{ "<leader>fF", LazyVim.pick("files", { root = false }), desc = "Find Files (cwd)" },
|
||||
{
|
||||
"<leader>fg",
|
||||
function()
|
||||
Snacks.picker.git_files()
|
||||
end,
|
||||
desc = "Find Files (git-files)",
|
||||
},
|
||||
{ "<leader>fr", LazyVim.pick("oldfiles"), desc = "Recent" },
|
||||
{
|
||||
"<leader>fR",
|
||||
function()
|
||||
Snacks.picker.recent({ filter = { cwd = true } })
|
||||
end,
|
||||
desc = "Recent (cwd)",
|
||||
},
|
||||
{
|
||||
"<leader>fp",
|
||||
function()
|
||||
Snacks.picker.projects()
|
||||
end,
|
||||
desc = "Projects",
|
||||
},
|
||||
-- git
|
||||
{
|
||||
"<leader>gd",
|
||||
function()
|
||||
Snacks.picker.git_diff()
|
||||
end,
|
||||
desc = "Git Diff (hunks)",
|
||||
},
|
||||
{
|
||||
"<leader>gs",
|
||||
function()
|
||||
Snacks.picker.git_status()
|
||||
end,
|
||||
desc = "Git Status",
|
||||
},
|
||||
{
|
||||
"<leader>gS",
|
||||
function()
|
||||
Snacks.picker.git_stash()
|
||||
end,
|
||||
desc = "Git Stash",
|
||||
},
|
||||
-- Grep
|
||||
{
|
||||
"<leader>sb",
|
||||
function()
|
||||
Snacks.picker.lines()
|
||||
end,
|
||||
desc = "Buffer Lines",
|
||||
},
|
||||
{
|
||||
"<leader>sB",
|
||||
function()
|
||||
Snacks.picker.grep_buffers()
|
||||
end,
|
||||
desc = "Grep Open Buffers",
|
||||
},
|
||||
{ "<leader>sg", LazyVim.pick("live_grep"), desc = "Grep (Root Dir)" },
|
||||
{ "<leader>sG", LazyVim.pick("live_grep", { root = false }), desc = "Grep (cwd)" },
|
||||
{
|
||||
"<leader>sp",
|
||||
function()
|
||||
Snacks.picker.lazy()
|
||||
end,
|
||||
desc = "Search for Plugin Spec",
|
||||
},
|
||||
{ "<leader>sw", LazyVim.pick("grep_word"), desc = "Visual selection or word (Root Dir)", mode = { "n", "x" } },
|
||||
{
|
||||
"<leader>sW",
|
||||
LazyVim.pick("grep_word", { root = false }),
|
||||
desc = "Visual selection or word (cwd)",
|
||||
mode = { "n", "x" },
|
||||
},
|
||||
-- search
|
||||
{
|
||||
'<leader>s"',
|
||||
function()
|
||||
Snacks.picker.registers()
|
||||
end,
|
||||
desc = "Registers",
|
||||
},
|
||||
{
|
||||
"<leader>s/",
|
||||
function()
|
||||
Snacks.picker.search_history()
|
||||
end,
|
||||
desc = "Search History",
|
||||
},
|
||||
{
|
||||
"<leader>sa",
|
||||
function()
|
||||
Snacks.picker.autocmds()
|
||||
end,
|
||||
desc = "Autocmds",
|
||||
},
|
||||
{
|
||||
"<leader>sc",
|
||||
function()
|
||||
Snacks.picker.command_history()
|
||||
end,
|
||||
desc = "Command History",
|
||||
},
|
||||
{
|
||||
"<leader>sC",
|
||||
function()
|
||||
Snacks.picker.commands()
|
||||
end,
|
||||
desc = "Commands",
|
||||
},
|
||||
{
|
||||
"<leader>sd",
|
||||
function()
|
||||
Snacks.picker.diagnostics()
|
||||
end,
|
||||
desc = "Diagnostics",
|
||||
},
|
||||
{
|
||||
"<leader>sD",
|
||||
function()
|
||||
Snacks.picker.diagnostics_buffer()
|
||||
end,
|
||||
desc = "Buffer Diagnostics",
|
||||
},
|
||||
{
|
||||
"<leader>sh",
|
||||
function()
|
||||
Snacks.picker.help()
|
||||
end,
|
||||
desc = "Help Pages",
|
||||
},
|
||||
{
|
||||
"<leader>sH",
|
||||
function()
|
||||
Snacks.picker.highlights()
|
||||
end,
|
||||
desc = "Highlights",
|
||||
},
|
||||
{
|
||||
"<leader>si",
|
||||
function()
|
||||
Snacks.picker.icons()
|
||||
end,
|
||||
desc = "Icons",
|
||||
},
|
||||
{
|
||||
"<leader>sj",
|
||||
function()
|
||||
Snacks.picker.jumps()
|
||||
end,
|
||||
desc = "Jumps",
|
||||
},
|
||||
{
|
||||
"<leader>sk",
|
||||
function()
|
||||
Snacks.picker.keymaps()
|
||||
end,
|
||||
desc = "Keymaps",
|
||||
},
|
||||
{
|
||||
"<leader>sl",
|
||||
function()
|
||||
Snacks.picker.loclist()
|
||||
end,
|
||||
desc = "Location List",
|
||||
},
|
||||
{
|
||||
"<leader>sM",
|
||||
function()
|
||||
Snacks.picker.man()
|
||||
end,
|
||||
desc = "Man Pages",
|
||||
},
|
||||
{
|
||||
"<leader>sm",
|
||||
function()
|
||||
Snacks.picker.marks()
|
||||
end,
|
||||
desc = "Marks",
|
||||
},
|
||||
{
|
||||
"<leader>sR",
|
||||
function()
|
||||
Snacks.picker.resume()
|
||||
end,
|
||||
desc = "Resume",
|
||||
},
|
||||
{
|
||||
"<leader>sq",
|
||||
function()
|
||||
Snacks.picker.qflist()
|
||||
end,
|
||||
desc = "Quickfix List",
|
||||
},
|
||||
{
|
||||
"<leader>su",
|
||||
function()
|
||||
Snacks.picker.undo()
|
||||
end,
|
||||
desc = "Undotree",
|
||||
},
|
||||
-- ui
|
||||
{
|
||||
"<leader>uC",
|
||||
function()
|
||||
Snacks.picker.colorschemes()
|
||||
end,
|
||||
desc = "Colorschemes",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
-- https://www.lazyvim.org/extras/coding/mini-surround#minisurround
|
||||
return {
|
||||
"echasnovski/mini.surround",
|
||||
keys = function(_, keys)
|
||||
-- Populate the keys based on the user's options
|
||||
local opts = LazyVim.opts("mini.surround")
|
||||
local mappings = {
|
||||
{ opts.mappings.add, desc = "Add Surrounding", mode = { "n", "v" } },
|
||||
{ opts.mappings.delete, desc = "Delete Surrounding" },
|
||||
{ opts.mappings.find, desc = "Find Right Surrounding" },
|
||||
{ opts.mappings.find_left, desc = "Find Left Surrounding" },
|
||||
{ opts.mappings.highlight, desc = "Highlight Surrounding" },
|
||||
{ opts.mappings.replace, desc = "Replace Surrounding" },
|
||||
{ opts.mappings.update_n_lines, desc = "Update `MiniSurround.config.n_lines`" },
|
||||
}
|
||||
mappings = vim.tbl_filter(function(m)
|
||||
return m[1] and #m[1] > 0
|
||||
end, mappings)
|
||||
return vim.list_extend(mappings, keys)
|
||||
end,
|
||||
opts = {
|
||||
mappings = {
|
||||
add = "gsa", -- Add surrounding in Normal and Visual modes
|
||||
delete = "gsd", -- Delete surrounding
|
||||
find = "gsf", -- Find surrounding (to the right)
|
||||
find_left = "gsF", -- Find surrounding (to the left)
|
||||
highlight = "gsh", -- Highlight surrounding
|
||||
replace = "gsr", -- Replace surrounding
|
||||
update_n_lines = "gsn", -- Update `n_lines`
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
extraPackages = with pkgs; [
|
||||
gcc # For treesitter complation
|
||||
tree-sitter # For treesitter binaries
|
||||
ripgrep # Search support
|
||||
wayclip # Clipboard support
|
||||
fd # finder for telescope
|
||||
|
||||
@@ -4,6 +4,10 @@
|
||||
obsidian
|
||||
];
|
||||
|
||||
home.shellAliases = {
|
||||
"notes" = "(cd ~/Documents/Notes && nvim)";
|
||||
};
|
||||
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
tray = {
|
||||
@@ -21,6 +25,7 @@
|
||||
"altair"
|
||||
"mcp"
|
||||
"vega"
|
||||
"proxima"
|
||||
];
|
||||
};
|
||||
};
|
||||
@@ -52,6 +57,14 @@
|
||||
];
|
||||
compression = "always";
|
||||
};
|
||||
proxima = {
|
||||
id = "NWZL6LY-ULJQMZE-EWY3MQU-XPDAFQB-LTIBZV7-GPKIABJ-WBJE36F-SK6LVAY";
|
||||
name = "Proxima";
|
||||
addresses = [
|
||||
"relay://syncthing.blazestar.net:22067"
|
||||
];
|
||||
compression = "always";
|
||||
};
|
||||
};
|
||||
options = {
|
||||
localAnnounceEnabled = false;
|
||||
|
||||
@@ -15,17 +15,19 @@
|
||||
htop
|
||||
btop
|
||||
neofetch
|
||||
killall
|
||||
psmisc # fuser, killal, pstree
|
||||
|
||||
# Files
|
||||
# Archives
|
||||
zip
|
||||
xz
|
||||
unzip
|
||||
p7zip
|
||||
unrar-wrapper
|
||||
|
||||
# File manipulation
|
||||
file
|
||||
tree
|
||||
yazi # File manager
|
||||
ueberzugpp # for image previews
|
||||
w3m # terminal browser for image previews
|
||||
dysk # better disk info
|
||||
ripgrep # better grep
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
nerd-fonts.jetbrains-mono
|
||||
|
||||
libsixel # For working with images in terminals
|
||||
ueberzugpp # for image previews
|
||||
];
|
||||
|
||||
# Allow Home Manager to set fonts.
|
||||
|
||||
@@ -12,8 +12,10 @@ offen:
|
||||
secret: ENC[AES256_GCM,data:sH2siPc/QH1O2M7ZlJwqhqlHRIeLIG9r,iv:eD29ALx2ji0rm1t9j6RulTZT3f6VLK7dxpPOze3qDKA=,tag:zqJTgT2UeA/ecBS4VremUw==,type:str]
|
||||
smtp-token: ENC[AES256_GCM,data:ZTfe65g3JykPvG2l0AN8UQ==,iv:GTruGo/vcP+imfJyqB3NX9ic8dz5jvTEh6SF+OeqMDM=,tag:kgwd59pG/WUt8OAaVzi39Q==,type:str]
|
||||
traefik:
|
||||
oauth2-client-secret: ENC[AES256_GCM,data:gV9/yBCqWPcNG/m7S0PRE3TduKzqRD1ii3RGGjNprQM=,iv:jmwBYWhPQJMZWHZine6Eb+7fdW44QOvkK52LQ6ISK4s=,tag:yNWRJ1IdPcxn6e0DXQe7Cw==,type:str]
|
||||
oauth2-client-secret: ENC[AES256_GCM,data:p7/6OsN2ytBj8mQiK0YL7J6NYLtMHOXIIs/6+bIDpsU=,iv:k6jLZifJEFLYKSFMkyn/kA7iBE+EFB8O/3/3fyTh1SY=,tag:6s49O2+tdlZoXyAGEamuMQ==,type:str]
|
||||
oauth2-plugin-secret: ENC[AES256_GCM,data:sArqwKHAdW35o5kD7DGfXSYCXFUXqvKQdoVnXutsNLw=,iv:qWf597QS3BqkVQkeAb99HbpDB0kUhdD+qKdpUPZEB0o=,tag:vXnb93npaklItWkMZ+/M9Q==,type:str]
|
||||
protonvpn:
|
||||
private_key: ENC[AES256_GCM,data:41pfbR1klj1F24v3HlCCA4ofW2sCEnyE5TH8iX4Ug8D+kmwstTaj5RG2Zz8=,iv:P6XyQnDVoOmdkP8ilBR9DyfqPZA6GsQ6VUwY/tSGhx4=,tag:Bzgdv29lbk/gYlADPZMGVA==,type:str]
|
||||
deploy-key:
|
||||
mcp: ENC[AES256_GCM,data:eQcX8xdz5qZ6nU8ISOvZo+ZtP4Z/ePd+/ZZReX1BKvTUqGQPPFxConbLMwFzvzpD6xAUbA1MLkcR/bT98QbNx6LJYlhbofuDUg2DI79RB0fcrAcj/wUV0YPhmgofUdYYDaimH5A2PSvtmKfB3CtKKuA5HNeLymoXeLEpFzbckkGhzPee/CHiUmxayogp6za6btsDJsiT8hdHbrzyD2S6fhMJrzX+PlRzT32M/6eaFuFWE8EUO1gbkRlNfKPXw/EM2GXWJfR4qXfN2YKIKigqrtlAAoxnrUbp5EBrn/hGHS2ZYZXeRUFr3avFjcI0bLX423PWRHAylfQCPxgYVEtbcRv11CAFmq4rfFl0ZdvnAKbTLNmWcrQNijBATZPaAdQzgKPDHs8pwPUFR9Tcg8pZNbzw0mK9kPolniAOL2PBKUHv6LP/uEkB1E6Pxc7yms0kGpeJyo7hrFVOiVAckCey+SI9dpbJMSB3md070I1xk6Ik7PywrWh2QDeUtOU1U28UkYgnJ/9MJelWsNlUX9SR,iv:oCNeanaV/7UZ3dhmq4ZmJUZ5hb61AnHpHCfskM2Jsm8=,tag:F2uJKN5beM/rfiBMSyUP7w==,type:str]
|
||||
matrix:
|
||||
@@ -21,6 +23,10 @@ matrix:
|
||||
db-password: ENC[AES256_GCM,data:N/IO0k/2BZpmaDTbKZmSgZNzmdk=,iv:p0jGjJ9mTCh5FPM/Oe1vxusYvlyg14UeggE5ynpDVL8=,tag:tZbddwxJf6wSH6L1QRUQVg==,type:str]
|
||||
secret: ENC[AES256_GCM,data:KZjYxjUxGgkY1I5jGF7XMEhkHK+khDaQzxugoKxpLsROmVs722tFfbUAxhp71llam55gy9+eUWGxIPlmvOySlw==,iv:OoThGcT08Z11kpnAMQ7w59wj5JheNFGEk1jfFENsmy0=,tag:8EeKT7dh2/a52Amf6LsL1w==,type:str]
|
||||
blazestar-registration-token: ENC[AES256_GCM,data:TB3bR+E4H4c2l9pRcEOAZr35+vBVaJUcuCs9K0Pjd0aW+M35x5LgZ8+F99Y=,iv:e28sie6LSI5UX41BPb+yN+3n+Yw9Ssfsqe4zppwbPkU=,tag:cQPgZcRFbYSiZnmPVtZxHg==,type:str]
|
||||
tandoor:
|
||||
secret_key: ENC[AES256_GCM,data:nl7S2fS1wENrT5k2iZfLEAGc99lCUktgwR5L5KklF69BNVKQkW1rUgb3aIv50VpXZa+3OxV/vdPmG9NhKMy96I5+Dno=,iv:FFyGQBARz0B5zrONZELzUMsOIn8TWrDNTKGsAHPlS7w=,tag:/c4MnDfLXQpBZDqVxZ0DTg==,type:str]
|
||||
immich:
|
||||
database: ENC[AES256_GCM,data:1fjOQsLZcq/T+r+AkzomWwCQWw==,iv:c4pn2rC+3xkxLJ7uAdhnTE6zVTRQkfuKK3tjUyDhfAw=,tag:kvk7DOv6X/+RDxfPxVak7w==,type:str]
|
||||
sops:
|
||||
age:
|
||||
- recipient: age1yvdzvuvu5wqztcx6ll2xk6x547uuyqy735tjjdd7zftkz53jsf9qf5ahue
|
||||
@@ -41,7 +47,7 @@ sops:
|
||||
by9aNFY4dXNxaWxnTXFTQS9reHhuQWMKh5rZ93nFtBV9EpFVRp+E+GXZ6xzVy2Jw
|
||||
vFh4deGcAb60q4odSaeWfk1Dr7L9Ua69oK9omjbCNUt+P7Kwlfca7Q==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2025-06-25T22:38:40Z"
|
||||
mac: ENC[AES256_GCM,data:2/rVuLHtxtiAW5H80vPYc+2QOFSA5nQRONOxbIPeg/KNgre0imaykFPFVXKidvod/QuHnoszKS6Js/HCXLKlesOjxVN4r7lLlGpOE9qkceaDOa5Fv/pwIWjYwovZEsjuJz2Uq7ouB0lBhuTinvP0uNV/LphAZDymeSv+FUkt6hU=,iv:Z48SytML7WgusUMzgWmQkWHwg5WJITj591+MFTWVwag=,tag:ENJWrbmjZMMZ4P9F0Im9bQ==,type:str]
|
||||
lastmodified: "2026-02-25T00:28:13Z"
|
||||
mac: ENC[AES256_GCM,data:hDmqObrtfoVkQqz8JPkqlyXMbiuyBophjdZNLvTFrZw3pAVNCuzsH4zxFBOaxJttkzLc65DWDHDeEIBY5YZam1GLFFXUQ5E3Dxno7hnyzOoM2ipgDTOacI0gbKJAWgGUF3LNDdqVoREA9LC91LoNUJoNmzpTSFtuLb7ORuwCrH4=,iv:8+W3n1Cr6woEiPU9ECaMYM64HNmFHr2AIw6UohCJi00=,tag:7drkZiPAUHaEx5PagXA9JQ==,type:str]
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.10.2
|
||||
version: 3.11.0
|
||||
|
||||
5
system/features/android-dev.nix
Normal file
5
system/features/android-dev.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{ ... }:
|
||||
{
|
||||
programs.adb.enable = true;
|
||||
users.users.drew.extraGroups = [ "adbusers" ];
|
||||
}
|
||||
@@ -3,13 +3,18 @@
|
||||
virtualisation = {
|
||||
docker = {
|
||||
enable = true;
|
||||
rootless = {
|
||||
enable = true;
|
||||
setSocketVariable = true;
|
||||
};
|
||||
# rootless = {
|
||||
# enable = true;
|
||||
# setSocketVariable = true;
|
||||
# };
|
||||
};
|
||||
|
||||
# Do not use Podman in Wayland/Hyperland. It will crash the session. Very annoying.
|
||||
# podman.enable = true;
|
||||
};
|
||||
|
||||
hardware.nvidia-container-toolkit.enable = true;
|
||||
|
||||
home-manager.users.drew =
|
||||
{ ... }:
|
||||
{
|
||||
|
||||
12
system/features/flatpak.nix
Normal file
12
system/features/flatpak.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
services.flatpak.enable = true;
|
||||
|
||||
systemd.services.flatpak-repo = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
path = [ pkgs.flatpak ];
|
||||
script = ''
|
||||
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||
'';
|
||||
};
|
||||
}
|
||||
21
system/features/printing.nix
Normal file
21
system/features/printing.nix
Normal file
@@ -0,0 +1,21 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
services.printing = {
|
||||
enable = true;
|
||||
drivers = [ pkgs.brlaser ];
|
||||
};
|
||||
hardware.printers = {
|
||||
ensurePrinters = [
|
||||
{
|
||||
name = "Brother_HL-L2370DW_series";
|
||||
location = "Home";
|
||||
deviceUri = "dnssd://Brother%20HL-L2370DW%20series._ipp._tcp.local/?uuid=e3248000-80ce-11db-8000-3c2af4f28c38";
|
||||
model = "drv:///brlaser.drv/brl2370d.ppd";
|
||||
ppdOptions = {
|
||||
PageSize = "Letter";
|
||||
};
|
||||
}
|
||||
];
|
||||
ensureDefaultPrinter = "Brother_HL-L2370DW_series";
|
||||
};
|
||||
}
|
||||
@@ -79,7 +79,7 @@
|
||||
}:
|
||||
let
|
||||
fqn = "${hostname}.${domain}";
|
||||
serviceName = lib.strings.replaceChars [ "." ] [ "-" ] fqn;
|
||||
serviceName = builtins.replaceStrings [ "." ] [ "-" ] fqn;
|
||||
routerRule = if public then hostRule hostname domain else localHostRule hostname domain;
|
||||
homepageLabels =
|
||||
if homepageOpts == { } then
|
||||
@@ -109,10 +109,11 @@
|
||||
extraOptions
|
||||
;
|
||||
autoStart = true;
|
||||
labels =
|
||||
{
|
||||
labels = {
|
||||
"traefik.enable" = "true";
|
||||
"traefik.http.routers.${serviceName}.rule" = "${routerRule}";
|
||||
"traefik.http.routers.${serviceName}.service" = "${serviceName}";
|
||||
"traefik.http.routers.${serviceName}.entrypoints" = "web,websecure";
|
||||
"traefik.http.services.${serviceName}.loadbalancer.server.port" = "${toString port}";
|
||||
}
|
||||
// oauthLabels
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
../../features/gc.nix
|
||||
../../features/gui.nix
|
||||
../../features/container-dev.nix
|
||||
../../features/android-dev.nix
|
||||
../../features/flatpak.nix
|
||||
];
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
@@ -8,6 +8,8 @@ in
|
||||
{
|
||||
imports =
|
||||
map (x: ../../../home-manager + x) [
|
||||
"/features/astronomy.nix"
|
||||
"/features/chat.nix"
|
||||
"/features/development/development.nix"
|
||||
"/features/development/docker.nix"
|
||||
"/features/development/haskell.nix"
|
||||
@@ -16,8 +18,10 @@ in
|
||||
"/features/development/vscode.nix"
|
||||
"/features/eww"
|
||||
"/features/gaming.nix"
|
||||
"/features/image-editing.nix"
|
||||
"/features/linux-desktop.nix"
|
||||
"/features/notes.nix"
|
||||
"/features/3d-printing.nix"
|
||||
]
|
||||
++ [
|
||||
(import ../../../home-manager/features/wallpaper.nix monitors)
|
||||
@@ -39,13 +43,15 @@ in
|
||||
userEmail = "drew.haven@gmail.com";
|
||||
};
|
||||
|
||||
# Set up eww here because it's based on the monitor configuration
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
exec-once = [
|
||||
"sleep 2 && eww open-many primary-statusbar secondary-statusbar launcher"
|
||||
# Set up eww here because it's based on the monitor configuration
|
||||
"sleep 2 && eww open-many primary-statusbar secondary-statusbar"
|
||||
# Set DP-2 as the primary monitor, otherwise it defaults to DP-1 because it's first in the list.
|
||||
"xrandr --output DP-2 --primary"
|
||||
];
|
||||
windowrulev2 = [
|
||||
# Rofi doesn't center properly when I have the two asymetric monitors
|
||||
# Rofi doesn't center properly when I have the two asymetric monitors, so we need hyprland to manage it.
|
||||
"center, class:Rofi"
|
||||
];
|
||||
};
|
||||
|
||||
@@ -13,10 +13,14 @@
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot = {
|
||||
loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
initrd = {
|
||||
availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"nvme"
|
||||
@@ -24,16 +28,19 @@
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
kernelModules = [ ];
|
||||
};
|
||||
kernelModules = [ "kvm-intel" ];
|
||||
extraModulePackages = [ ];
|
||||
};
|
||||
|
||||
fileSystems."/" = {
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "/dev/disk/by-uuid/343c0ac5-3973-49b3-964a-6ad90c36b89c";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-uuid/5F99-043D";
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
@@ -42,10 +49,11 @@
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/home" = {
|
||||
"/home" = {
|
||||
device = "/dev/disk/by-uuid/28f4fb41-9414-4504-a767-c2e8bf5eb2c8";
|
||||
fsType = "ext4";
|
||||
};
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
@@ -58,17 +66,26 @@
|
||||
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
|
||||
# Graphics settings
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
|
||||
hardware.nvidia = {
|
||||
hardware = {
|
||||
cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
nvidia = {
|
||||
# Other options include:
|
||||
# stable - Current stable
|
||||
# production - Same as stable
|
||||
# latest - Bleeding edge
|
||||
# beta - latest beta
|
||||
#
|
||||
# See https://nixos.wiki/wiki/Nvidia
|
||||
#
|
||||
# Current versions can be found in https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/os-specific/linux/nvidia-x11/default.nix
|
||||
#
|
||||
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||
|
||||
modesetting.enable = true;
|
||||
@@ -90,6 +107,7 @@
|
||||
# Enable the nvidia-settings menu?
|
||||
nvidiaSettings = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Add a udev rule to prevent the mouse from waking the system. Note that it
|
||||
# has two entries depending on whether it's plugged in or not.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./vars.nix
|
||||
@@ -16,9 +16,6 @@
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
# Set the kernel to be compatible with ZFS
|
||||
boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
|
||||
|
||||
networking.hostName = "mcp"; # Define your hostname.
|
||||
networking.hostId = "5e292f2d"; # Define a host ID for ZFS with `head -c 8 /etc/machine-id`
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
@@ -160,10 +160,10 @@
|
||||
"-l=homepage.widget.type=scrutiny"
|
||||
"-l=homepage.widget.url=http://scrutiny:8080"
|
||||
"--cap-add=SYS_RAWIO"
|
||||
"--device=/dev/sda:/dev/sda"
|
||||
"--device=/dev/sdb:/dev/sdb"
|
||||
"--device=/dev/sdc:/dev/sdc"
|
||||
"--device=/dev/sdd:/dev/sdd"
|
||||
"--device=/dev/disk/by-id/wwn-0x5000cca26fca1aed:/dev/disk/by-id/wwn-0x5000cca26fca1aed"
|
||||
"--device=/dev/disk/by-id/wwn-0x5000cca26fef696c:/dev/disk/by-id/wwm-0x5000cca26fef696c"
|
||||
"--device=/dev/disk/by-id/wwn-0x5000cca270db1d0e:/dev/disk/by-id/wwn-0x5000cca270db1d0e"
|
||||
# "--device=/dev/sdd:/dev/sdd" Removing this one while the disk is down
|
||||
];
|
||||
volumes = [
|
||||
"/run/udev:/run/udev:ro"
|
||||
|
||||
@@ -17,12 +17,14 @@ in
|
||||
TUWUNEL_REGISTRATION_TOKEN=${config.sops.placeholder."matrix/blazestar-registration-token"}
|
||||
'';
|
||||
|
||||
# This isn't using any of my usual helpers because I wanted to set a custom
|
||||
# serviceName in Traefik that is different from the hostname to avoid
|
||||
# conflicts with the havenisms.com server.
|
||||
virtualisation.oci-containers.containers."${serviceName}" = {
|
||||
# The 1.1.0 version has an issue with the compression being incorrectly tagged.
|
||||
# See: https://github.com/matrix-construct/tuwunel/issues/79
|
||||
image = "ghcr.io/matrix-construct/tuwunel:v1.0.0-release-all-x86_64-linux-gnu";
|
||||
autoStart = true;
|
||||
hostname = "${matrixHost}.${blazestar}";
|
||||
volumes = [
|
||||
"matrix-blazestar-net-db:${dbPath}"
|
||||
];
|
||||
|
||||
@@ -2,5 +2,6 @@
|
||||
{
|
||||
imports = [
|
||||
./chat.nix
|
||||
./uptime.nix
|
||||
];
|
||||
}
|
||||
|
||||
15
system/hosts/mcp/containers/blazestar.net/uptime.nix
Normal file
15
system/hosts/mcp/containers/blazestar.net/uptime.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{ config, ... }:
|
||||
let
|
||||
inherit (import ../lib.nix config) blazestar;
|
||||
in
|
||||
{
|
||||
virtualisation.web-containers.containers.uptime = {
|
||||
image = "louislam/uptime-kuma:1";
|
||||
hostname = "uptime";
|
||||
domain = blazestar;
|
||||
port = 3001;
|
||||
volumes = [
|
||||
"uptime-kuma:/app/data"
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -100,7 +100,7 @@ in
|
||||
"dm-companion-pocketbase"
|
||||
];
|
||||
volumes = [
|
||||
"/tank/web/dm.terakoda.com/dist:/usr/share/nginx/html:ro"
|
||||
"/tank/web/dm.terakoda.com/deployed:/usr/share/nginx/html:ro"
|
||||
"${nginxConf}:/etc/nginx/nginx.conf:ro"
|
||||
];
|
||||
};
|
||||
|
||||
@@ -2,5 +2,10 @@
|
||||
{
|
||||
imports = [
|
||||
./chat.nix
|
||||
# Currently disabled because it doesn't start up properly
|
||||
# ./immich.nix
|
||||
./storyden.nix
|
||||
./tandoor.nix
|
||||
./wallabag.nix
|
||||
];
|
||||
}
|
||||
|
||||
73
system/hosts/mcp/containers/havenisms.com/immich.nix
Normal file
73
system/hosts/mcp/containers/havenisms.com/immich.nix
Normal file
@@ -0,0 +1,73 @@
|
||||
{ config, ... }:
|
||||
let
|
||||
inherit (import ../lib.nix config) havenisms mkPostgresContainer;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
(mkPostgresContainer {
|
||||
# Immich wants a custom build of postgres with the vectors extensions.
|
||||
image = "ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0@sha256:c44be5f2871c59362966d71eab4268170eb6f5653c0e6170184e72b38ffdf107";
|
||||
name = "immich";
|
||||
directory = "/tank/immich/db";
|
||||
uid = config.users.users.immich.uid;
|
||||
gid = config.users.groups.immich.gid;
|
||||
passwordSecret = "immich/database";
|
||||
})
|
||||
];
|
||||
|
||||
sops.secrets = {
|
||||
"immich/database" = {
|
||||
restartUnits = [
|
||||
"${config.local.container-backend}-immich-db.service"
|
||||
];
|
||||
mode = "0400";
|
||||
owner = config.users.users.immich.name;
|
||||
};
|
||||
};
|
||||
|
||||
sops.templates."immich.env" = {
|
||||
restartUnits = [ "${config.local.container-backend}-immich.service" ];
|
||||
owner = config.users.users.immich.name;
|
||||
content = ''
|
||||
DB_HOSTNAME=immich-postgres
|
||||
DB_PASSWORD=${config.sops.placeholder."immich/database"}
|
||||
DB_USERNAME=immich
|
||||
DB_DATABASE_NAME=immich
|
||||
REDIS_HOSTNAME=immich-redis
|
||||
IMMICH_LOG_LEVEL=verbose
|
||||
'';
|
||||
};
|
||||
|
||||
virtualisation.web-containers.containers.immich = {
|
||||
image = "ghcr.io/immich-app/immich-server:release";
|
||||
hostname = "immich";
|
||||
domain = havenisms;
|
||||
port = 2283;
|
||||
volumes = [
|
||||
"/tank/photos/immich:/data"
|
||||
"/etc/localtime:/etc/localtime:ro"
|
||||
];
|
||||
dependsOn = [
|
||||
"immich-redis"
|
||||
"immich-postgres"
|
||||
];
|
||||
environmentFiles = [
|
||||
"${config.sops.templates."immich.env".path}"
|
||||
];
|
||||
};
|
||||
|
||||
virtualisation.oci-containers.containers = {
|
||||
"immich-redis" = {
|
||||
image = "docker.io/valkey/valkey";
|
||||
};
|
||||
"immich-machine-learning" = {
|
||||
image = "ghcr.io/immich-app/immich-machine-learning:release";
|
||||
volumes = [
|
||||
"model-cache:/cache"
|
||||
];
|
||||
environmentFiles = [
|
||||
"${config.sops.templates."immich.env".path}"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
17
system/hosts/mcp/containers/havenisms.com/storyden.nix
Normal file
17
system/hosts/mcp/containers/havenisms.com/storyden.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{ config, ... }:
|
||||
let
|
||||
inherit (import ../lib.nix config) havenisms;
|
||||
in
|
||||
{
|
||||
|
||||
virtualisation.web-containers.containers.storyden = {
|
||||
image = "ghcr.io/southclaws/storyden";
|
||||
port = 8000;
|
||||
hostname = "storyden";
|
||||
domain = havenisms;
|
||||
environment = {
|
||||
PUBLIC_WEB_ADDRESS = "https://storyden.${havenisms}";
|
||||
PUBLIC_API_ADDRESS = "https://storyden.${havenisms}";
|
||||
};
|
||||
};
|
||||
}
|
||||
30
system/hosts/mcp/containers/havenisms.com/tandoor.nix
Normal file
30
system/hosts/mcp/containers/havenisms.com/tandoor.nix
Normal file
@@ -0,0 +1,30 @@
|
||||
{ config, ... }:
|
||||
let
|
||||
inherit (import ../lib.nix config) havenisms;
|
||||
in
|
||||
{
|
||||
sops.secrets = {
|
||||
"tandoor/secret_key" = {
|
||||
restartUnits = [ "${config.local.container-backend}-tandoor.service" ];
|
||||
};
|
||||
};
|
||||
|
||||
sops.templates."tandoor.env".content = ''
|
||||
SECRET_KEY="${config.sops.placeholder."tandoor/secret_key"}"
|
||||
DB_ENGINE=django.db.backends.sqlite3
|
||||
'';
|
||||
|
||||
virtualisation.web-containers.containers.tandoor = {
|
||||
image = "vabene1111/recipes";
|
||||
hostname = "recipes";
|
||||
domain = havenisms;
|
||||
port = 80;
|
||||
volumes = [
|
||||
"/tank/tandoor-recipes/mediafiles:/opt/recipes/mediafiles"
|
||||
"/tank/tandoor-recipes/staticfiles:/opt/recipes/staticfiles"
|
||||
];
|
||||
environmentFiles = [
|
||||
config.sops.templates."tandoor.env".path
|
||||
];
|
||||
};
|
||||
}
|
||||
19
system/hosts/mcp/containers/havenisms.com/wallabag.nix
Normal file
19
system/hosts/mcp/containers/havenisms.com/wallabag.nix
Normal file
@@ -0,0 +1,19 @@
|
||||
{ config, ... }:
|
||||
let
|
||||
inherit (import ../lib.nix config) havenisms;
|
||||
in
|
||||
{
|
||||
virtualisation.web-containers.containers.wallabag = {
|
||||
image = "wallabag/wallabag";
|
||||
hostname = "wallabag";
|
||||
domain = havenisms;
|
||||
port = 80;
|
||||
volumes = [
|
||||
"wallabag-data:/var/www/wallabag/data"
|
||||
"wallabag-images:/var/www/wallabag/web/assets/images"
|
||||
];
|
||||
environment = {
|
||||
SYMFONY__ENV__DOMAIN_NAME = "https://wallabag.${havenisms}";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -70,8 +70,7 @@ in
|
||||
extraOptions
|
||||
;
|
||||
autoStart = true;
|
||||
labels =
|
||||
{
|
||||
labels = {
|
||||
"traefik.enable" = "true";
|
||||
"traefik.http.routers.${hostName}.rule" = "${routerRule}";
|
||||
"traefik.http.services.${hostName}.loadbalancer.server.port" = "${toString port}";
|
||||
@@ -127,11 +126,12 @@ in
|
||||
containerName ? "${name}-postgres",
|
||||
databaseName ? name,
|
||||
username ? name,
|
||||
image ? "postgres",
|
||||
}:
|
||||
{ config, ... }:
|
||||
{
|
||||
virtualisation.oci-containers.containers."${containerName}" = {
|
||||
image = "postgres";
|
||||
inherit image;
|
||||
autoStart = true;
|
||||
volumes = [
|
||||
# Note that data must be mounted at this location to persist.
|
||||
|
||||
@@ -6,12 +6,45 @@ let
|
||||
havenisms
|
||||
mkContainer
|
||||
;
|
||||
gluetun_env = "gluetun-proton-vpn-wireguard.env";
|
||||
in
|
||||
{
|
||||
|
||||
sops.secrets = {
|
||||
"protonvpn/private_key" = {
|
||||
restartUnits = [ "${config.local.container-backend}-gluetun.service" ];
|
||||
};
|
||||
};
|
||||
|
||||
# Example Wireguard config file:
|
||||
# # Key for MCP Wireguard
|
||||
# # Bouncing = 13
|
||||
# # NetShield = 1
|
||||
# # Moderate NAT = off
|
||||
# # NAT-PMP (Port Forwarding) = on
|
||||
# # VPN Accelerator = on
|
||||
# PrivateKey = ${config.sops.placeholder."protonvpn/private_key"}
|
||||
# Address = 10.2.0.2/32
|
||||
# DNS = 10.2.0.1
|
||||
#
|
||||
# [Peer]
|
||||
# # US-CA#906
|
||||
# PublicKey = 2xvxhMK0AalXOMq6Dh0QMVJ0Cl3WQTmWT5tdeb8SpR0=
|
||||
# AllowedIPs = 0.0.0.0/0, ::/0
|
||||
# Endpoint = 79.127.185.166:51820
|
||||
#
|
||||
# PersistentKeepalive = 25
|
||||
sops.templates.${gluetun_env}.content = ''
|
||||
VPN_SERVICE_PROVIDER=protonvpn
|
||||
VPN_TYPE=wireguard
|
||||
WIREGUARD_PRIVATE_KEY="${config.sops.placeholder."protonvpn/private_key"}"
|
||||
SERVER_COUNTRIES="United States,United Kingdom,Netherlands,Switzerland,Sweden"
|
||||
VPN_PORT_FORWARDING=on
|
||||
'';
|
||||
|
||||
virtualisation.oci-containers.containers = {
|
||||
jellyfin = {
|
||||
image = "lscr.io/linuxserver/jellyfin";
|
||||
image = "lscr.io/linuxserver/jellyfin:10.11.6";
|
||||
autoStart = true;
|
||||
extraOptions = [
|
||||
"--device=/dev/dri:/dev/dri"
|
||||
@@ -110,12 +143,8 @@ in
|
||||
"127.0.0.1:8083:8000"
|
||||
];
|
||||
environmentFiles = [
|
||||
"/tank/config/gluetun/vpn.env"
|
||||
config.sops.templates.${gluetun_env}.path
|
||||
];
|
||||
environment = {
|
||||
VPN_SERVICE_PROVIDER = "protonvpn";
|
||||
UMASK = "002";
|
||||
};
|
||||
};
|
||||
prowlarr = {
|
||||
image = "lscr.io/linuxserver/prowlarr";
|
||||
|
||||
@@ -4,7 +4,7 @@ let
|
||||
in
|
||||
{
|
||||
virtualisation.oci-containers.containers.nextcloud = {
|
||||
image = "docker.io/library/nextcloud:latest";
|
||||
image = "docker.io/library/nextcloud:31";
|
||||
extraOptions = [
|
||||
"-l=traefik.enable=true"
|
||||
"-l=traefik.http.routers.nextcloud.rule=${hostRule "cloud" havenisms}"
|
||||
@@ -20,13 +20,5 @@ in
|
||||
volumes = [
|
||||
"/tank/nextcloud:/var/www/html"
|
||||
];
|
||||
environment = {
|
||||
POSTGRES_HOST = "db";
|
||||
POSTGRES_DB = "nextcloud";
|
||||
POSTGRES_USER = "nextcloud";
|
||||
# TODO: Secrets
|
||||
POSTGRES_PASSWORD = "nextcloud123";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -10,9 +10,22 @@ let
|
||||
{
|
||||
host,
|
||||
dir ? "public",
|
||||
redirectWww ? true,
|
||||
}:
|
||||
let
|
||||
cleanHost = lib.strings.stringAsChars (c: if c == "." then "-" else c) host;
|
||||
wwwLabels =
|
||||
if redirectWww then
|
||||
{
|
||||
"traefik.http.routers.${cleanHost}.middlewares" = "${cleanHost}-add-www@docker";
|
||||
"traefik.http.middlewares.${cleanHost}-add-www.redirectregex.regex" = "^https://${host}/(.*)";
|
||||
"traefik.http.middlewares.${cleanHost}-add-www.redirectregex.replacement" =
|
||||
"https://www.${host}/\${1}";
|
||||
"traefik.http.middlewares.${cleanHost}-add-www.redirectregex.permanent" = "true";
|
||||
|
||||
}
|
||||
else
|
||||
{ };
|
||||
in
|
||||
{
|
||||
"${cleanHost}-static" = {
|
||||
@@ -24,13 +37,8 @@ let
|
||||
labels = {
|
||||
"traefik.enable" = "true";
|
||||
"traefik.http.routers.${cleanHost}.rule" = "Host(`${host}`) || Host(`www.${host}`)";
|
||||
"traefik.http.routers.${cleanHost}.middlewares" = "${cleanHost}-add-www@docker";
|
||||
"traefik.http.services.${cleanHost}.loadbalancer.server.port" = "80";
|
||||
"traefik.http.middlewares.${cleanHost}-add-www.redirectregex.regex" = "^https://${host}/(.*)";
|
||||
"traefik.http.middlewares.${cleanHost}-add-www.redirectregex.replacement" =
|
||||
"https://www.${host}/\${1}";
|
||||
"traefik.http.middlewares.${cleanHost}-add-www.redirectregex.permanent" = "true";
|
||||
};
|
||||
} // wwwLabels;
|
||||
};
|
||||
};
|
||||
in
|
||||
@@ -38,11 +46,16 @@ in
|
||||
virtualisation.oci-containers.containers =
|
||||
mkStaticSite {
|
||||
host = terakoda;
|
||||
dir = "dist";
|
||||
dir = "deployed";
|
||||
}
|
||||
// mkStaticSite {
|
||||
host = blazestar;
|
||||
dir = "dist";
|
||||
dir = "deployed";
|
||||
}
|
||||
// mkStaticSite {
|
||||
host = "wow.${blazestar}";
|
||||
dir = "deployed";
|
||||
redirectWww = false;
|
||||
}
|
||||
// mkStaticSite {
|
||||
host = havenisms;
|
||||
|
||||
@@ -25,14 +25,28 @@ in
|
||||
oidc-auth:
|
||||
plugin:
|
||||
traefik-oidc-auth:
|
||||
LogLevel: DEBUG
|
||||
Secret: "${config.sops.placeholder."traefik/oauth2-plugin-secret"}"
|
||||
CallbackUri: "https://auth.blazestar.net/oidc/callback"
|
||||
# Omitting the Callback URL means it will use the current domain for the callback.
|
||||
# CallbackUri: "https://oidc.blazestar.net/oidc/callback"
|
||||
Provider:
|
||||
Url: "https://auth.blazestar.net/"
|
||||
ClientId: "3e3f7d9a-a684-4412-866c-ea7281954a9f"
|
||||
ClientSecret: "${config.sops.placeholder."traefik/oauth2-client-secret"}"
|
||||
TokenValidation: "IdToken"
|
||||
UsePkce: false
|
||||
Scopes: ["openid", "profile", "email"]
|
||||
Headers:
|
||||
- Name: "X-Oidc-Username"
|
||||
Value: "{{`{{ .claims.preferred_username }}`}}"
|
||||
- Name: "X-Oidc-Email"
|
||||
Value: "{{`{{ .claims.email }}`}}"
|
||||
- Name: "X-Oidc-Subject"
|
||||
Value: "sub"
|
||||
- Name: "Authorization"
|
||||
Value: "{{`Bearer {{ .accessToken }}`}}"
|
||||
- Name: "IdToken"
|
||||
Value: "{{`Bearer {{ .idToken }}`}}"
|
||||
'';
|
||||
|
||||
virtualisation.oci-containers.containers.traefik = mkContainer {
|
||||
|
||||
@@ -46,9 +46,11 @@ metrics:
|
||||
entryPoint: "metrics"
|
||||
|
||||
# Plugins must be defined in static config
|
||||
# Configuration of the plugin is in traefik.nix because it contains secrets.
|
||||
# TODO: Convert this whole file to a template in Nix
|
||||
experimental:
|
||||
plugins:
|
||||
traefik-oidc-auth:
|
||||
moduleName: "github.com/sevensolutions/traefik-oidc-auth"
|
||||
version: "v0.11.0"
|
||||
version: "v0.13.0"
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{ pkgs, ... }: let
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
systemUsers = {
|
||||
gitea = {
|
||||
uid = 2001;
|
||||
@@ -19,6 +20,7 @@
|
||||
home = "/tank/web";
|
||||
packages = [ pkgs.git ];
|
||||
};
|
||||
immich = 2009;
|
||||
};
|
||||
|
||||
mkUser = name: value: {
|
||||
@@ -32,20 +34,25 @@
|
||||
home = value.home or "/var/empty";
|
||||
packages = value.packages or [ ];
|
||||
};
|
||||
mkGroup = name: value: let
|
||||
mkGroup =
|
||||
name: value:
|
||||
let
|
||||
# 1. Value if int
|
||||
# 2. "gid" if present
|
||||
# 3. "uid"
|
||||
gid =
|
||||
if builtins.isInt value
|
||||
then value
|
||||
else if builtins.hasAttr "gid" value
|
||||
then value.gid
|
||||
else value.uid;
|
||||
in {
|
||||
if builtins.isInt value then
|
||||
value
|
||||
else if builtins.hasAttr "gid" value then
|
||||
value.gid
|
||||
else
|
||||
value.uid;
|
||||
in
|
||||
{
|
||||
inherit gid;
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
users.users = builtins.mapAttrs mkUser systemUsers;
|
||||
users.groups = (builtins.mapAttrs mkGroup systemUsers) // {
|
||||
# Legacy groups.
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
../../authorized-keys.nix
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
../../features/gc.nix
|
||||
../../features/printing.nix
|
||||
];
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
@@ -8,10 +8,11 @@ let
|
||||
writeShellScript "migrate-pocketbase" ''
|
||||
set -e
|
||||
|
||||
id
|
||||
pwd
|
||||
echo "Migrating in $(pwd) as $(id)"
|
||||
|
||||
${pkgs.pocketbase}/bin/pocketbase migrate up
|
||||
|
||||
echo "Migration complete"
|
||||
'';
|
||||
deployNpmApp =
|
||||
with pkgs;
|
||||
@@ -22,11 +23,16 @@ let
|
||||
gitFull
|
||||
nodejs_22
|
||||
bashNonInteractive
|
||||
rsync
|
||||
];
|
||||
text = ''
|
||||
set -e
|
||||
id
|
||||
pwd
|
||||
|
||||
echo "Deploying in $(pwd) as $(id)"
|
||||
|
||||
OUTPUT_DIR="./$(date --utc --iso-8601=seconds)"
|
||||
|
||||
echo "Deploying into $OUTPUT_DIR"
|
||||
|
||||
export GIT_SSH_COMMAND='ssh -v -o "UserKnownHostsFile ${gitKnownHosts}" -i "${
|
||||
config.sops.secrets."deploy-key/mcp".path
|
||||
@@ -43,7 +49,12 @@ let
|
||||
|
||||
# Use a local cache with --cache .npm
|
||||
npm ci --cache .npm
|
||||
npm run build
|
||||
npm run build -- --outDir "$OUTPUT_DIR"
|
||||
|
||||
echo "Activating $OUTPUT_DIR"
|
||||
# Trailing slash on source to only copy contents, not the directory itself
|
||||
rsync --archive --delete "$OUTPUT_DIR"/ deployed
|
||||
echo "Deployment complete"
|
||||
'';
|
||||
};
|
||||
in
|
||||
@@ -124,6 +135,15 @@ in
|
||||
trigger-rule-mismatch-http-response-code = 400;
|
||||
inherit trigger-rule;
|
||||
};
|
||||
"deploy-wow-blazestar-net" = {
|
||||
id = "deploy-wow-blazestar-net";
|
||||
http-methods = [ "POST" ];
|
||||
command-working-directory = "/tank/web/wow.blazestar.net";
|
||||
include-command-output-in-response-on-error = true;
|
||||
execute-command = "${deployNpmApp}/bin/build-npm-app";
|
||||
trigger-rule-mismatch-http-response-code = 400;
|
||||
inherit trigger-rule;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -107,10 +107,16 @@
|
||||
};
|
||||
|
||||
# Enable flakes
|
||||
nix.settings.experimental-features = [
|
||||
nix = {
|
||||
# Binary caches for Reflex FRP
|
||||
binaryCaches = [ "https://nixcache.reflex-frp.org" ];
|
||||
binaryCachePublicKeys = [ "ryantrinkle.com-1:JJiAKaRv9mWgpVAz8dwewnZe0AzzEAzPkagE9SP5NWI=" ];
|
||||
|
||||
settings.experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
};
|
||||
|
||||
services.openssh.enable = true;
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
{ pkgs, lib, ... }:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
imports =
|
||||
map (x: ../../../home-manager + x) [
|
||||
"/features/chat.nix"
|
||||
"/features/development/development.nix"
|
||||
"/features/development/docker.nix"
|
||||
"/features/development/haskell.nix"
|
||||
@@ -9,6 +10,7 @@
|
||||
"/features/development/typescript.nix"
|
||||
"/features/development/vscode.nix"
|
||||
"/features/eww"
|
||||
"/features/image-editing.nix"
|
||||
"/features/linux-desktop.nix"
|
||||
"/features/notes.nix"
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user