mirror of
https://github.com/RichieCahill/dotfiles.git
synced 2026-04-21 06:39:09 -04:00
Compare commits
1 Commits
feature/cr
...
feature/im
| Author | SHA1 | Date | |
|---|---|---|---|
| c64d8da490 |
17
.github/workflows/build_systems copy.yml
vendored
17
.github/workflows/build_systems copy.yml
vendored
@@ -1,17 +0,0 @@
|
|||||||
name: build_systems
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
pull_request:
|
|
||||||
push:
|
|
||||||
branches: [main]
|
|
||||||
schedule:
|
|
||||||
- cron: "0 0 1 * *"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
name: build-installer-iso
|
|
||||||
runs-on: self-hosted
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Build default package
|
|
||||||
run: "nix build .#nixosConfigurations.installer.config.system.build.isoImage"
|
|
||||||
8
.github/workflows/build_systems.yml
vendored
8
.github/workflows/build_systems.yml
vendored
@@ -1,11 +1,9 @@
|
|||||||
name: build_systems
|
name: build_jeeves
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
pull_request:
|
pull_request:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
schedule:
|
|
||||||
- cron: "0 22 * * *"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -16,11 +14,9 @@ jobs:
|
|||||||
system:
|
system:
|
||||||
- "bob"
|
- "bob"
|
||||||
- "jeeves"
|
- "jeeves"
|
||||||
|
- "muninn"
|
||||||
- "rhapsody-in-green"
|
- "rhapsody-in-green"
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Build default package
|
- name: Build default package
|
||||||
run: "nixos-rebuild build --flake ./#${{ matrix.system }}"
|
run: "nixos-rebuild build --flake ./#${{ matrix.system }}"
|
||||||
- name: copy to nix-cache
|
|
||||||
run: nix copy --to ssh://jeeves .#nixosConfigurations.${{ matrix.system }}.config.system.build.toplevel
|
|
||||||
|
|
||||||
|
|||||||
15
.github/workflows/treefmt.yml
vendored
15
.github/workflows/treefmt.yml
vendored
@@ -1,15 +0,0 @@
|
|||||||
name: treefmt
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
pull_request:
|
|
||||||
push:
|
|
||||||
branches: [main]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
treefmt:
|
|
||||||
name: nix fmt
|
|
||||||
runs-on: self-hosted
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: runs treefmt
|
|
||||||
run: "treefmt --ci"
|
|
||||||
1
.github/workflows/update-flake-lock.yml
vendored
1
.github/workflows/update-flake-lock.yml
vendored
@@ -15,7 +15,6 @@ jobs:
|
|||||||
- name: Update flake.lock
|
- name: Update flake.lock
|
||||||
uses: DeterminateSystems/update-flake-lock@main
|
uses: DeterminateSystems/update-flake-lock@main
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GH_TOKEN_FOR_UPDATES }}
|
|
||||||
pr-title: "Update flake.lock"
|
pr-title: "Update flake.lock"
|
||||||
pr-labels: |
|
pr-labels: |
|
||||||
dependencies
|
dependencies
|
||||||
|
|||||||
7
.gitignore
vendored
7
.gitignore
vendored
@@ -162,9 +162,4 @@ cython_debug/
|
|||||||
#.idea/
|
#.idea/
|
||||||
|
|
||||||
test.*
|
test.*
|
||||||
|
secrets.*
|
||||||
# syncthing
|
|
||||||
.stfolder
|
|
||||||
|
|
||||||
# nixos build results
|
|
||||||
result
|
|
||||||
|
|||||||
17
.sops.yaml
17
.sops.yaml
@@ -1,17 +0,0 @@
|
|||||||
keys:
|
|
||||||
- &admin_richie age1u8zj599elqqvcmhxn8zuwrufsz8w8w366d3ayrljjejljt2q45kq8mxw9c # cspell:disable-line
|
|
||||||
|
|
||||||
- &system_bob age1q47vup0tjhulkg7d6xwmdsgrw64h4ax3la3evzqpxyy4adsmk9fs56qz3y # cspell:disable-line
|
|
||||||
- &system_jeeves age13lmqgc3jvkyah5e3vcwmj4s5wsc2akctcga0lpc0x8v8du3fxprqp4ldkv # cspell:disable-line
|
|
||||||
- &system_router age1xzxryqq63x65yuza9lmmkud7crjjxpnkdew070yhx6xn7xe4tdws5twxsv # cspell:disable-line
|
|
||||||
- &system_rhapsody age1ufnewppysaq2wwcl4ugngjz8pfzc5a35yg7luq0qmuqvctajcycs5lf6k4 # cspell:disable-line
|
|
||||||
|
|
||||||
creation_rules:
|
|
||||||
- path_regex: users/secrets\.yaml$
|
|
||||||
key_groups:
|
|
||||||
- age:
|
|
||||||
- *admin_richie
|
|
||||||
- *system_bob
|
|
||||||
- *system_jeeves
|
|
||||||
- *system_router
|
|
||||||
- *system_rhapsody
|
|
||||||
47
.vscode/settings.json
vendored
47
.vscode/settings.json
vendored
@@ -6,9 +6,7 @@
|
|||||||
"advplyr",
|
"advplyr",
|
||||||
"ahci",
|
"ahci",
|
||||||
"aioesphomeapi",
|
"aioesphomeapi",
|
||||||
"aiounifi",
|
|
||||||
"alsa",
|
"alsa",
|
||||||
"apiclient",
|
|
||||||
"archlinux",
|
"archlinux",
|
||||||
"ashift",
|
"ashift",
|
||||||
"asrouter",
|
"asrouter",
|
||||||
@@ -19,44 +17,36 @@
|
|||||||
"auditd",
|
"auditd",
|
||||||
"autofetch",
|
"autofetch",
|
||||||
"autologin",
|
"autologin",
|
||||||
"automations",
|
|
||||||
"autopull",
|
"autopull",
|
||||||
"autotrim",
|
"autotrim",
|
||||||
"autoupdate",
|
|
||||||
"azuretools",
|
"azuretools",
|
||||||
"bantime",
|
"bantime",
|
||||||
"bazarr",
|
"bazarr",
|
||||||
"bgwriter",
|
|
||||||
"binhex",
|
"binhex",
|
||||||
"bitwarden",
|
"bitwarden",
|
||||||
"blkdiscard",
|
"blkdiscard",
|
||||||
"breakpad",
|
"breakpad",
|
||||||
|
"bredr",
|
||||||
"btop",
|
"btop",
|
||||||
"cachix",
|
"cachix",
|
||||||
"canmount",
|
"canmount",
|
||||||
"captivedetect",
|
"captivedetect",
|
||||||
"cgroupdriver",
|
"cgroupdriver",
|
||||||
"charliermarsh",
|
"charliermarsh",
|
||||||
"Checkpointing",
|
|
||||||
"cloudflared",
|
"cloudflared",
|
||||||
"codellama",
|
|
||||||
"codezombiech",
|
"codezombiech",
|
||||||
"compactmode",
|
"compactmode",
|
||||||
"Compat",
|
"Compat",
|
||||||
"contentblocking",
|
"contentblocking",
|
||||||
"cookiebanners",
|
"cookiebanners",
|
||||||
"createdb",
|
|
||||||
"createrole",
|
|
||||||
"crlite",
|
"crlite",
|
||||||
"cryptsetup",
|
"cryptsetup",
|
||||||
"cuda",
|
|
||||||
"darkreader",
|
"darkreader",
|
||||||
"datareporting",
|
"datareporting",
|
||||||
"davidanson",
|
"davidanson",
|
||||||
"dconf",
|
"dconf",
|
||||||
"dearrow",
|
"dearrow",
|
||||||
"debugpy",
|
"debugpy",
|
||||||
"deepseek",
|
|
||||||
"dialout",
|
"dialout",
|
||||||
"diffie",
|
"diffie",
|
||||||
"direnv",
|
"direnv",
|
||||||
@@ -64,16 +54,12 @@
|
|||||||
"dnodesize",
|
"dnodesize",
|
||||||
"dotfiles",
|
"dotfiles",
|
||||||
"drawio",
|
"drawio",
|
||||||
"duckdns",
|
|
||||||
"eamodio",
|
"eamodio",
|
||||||
"ehci",
|
|
||||||
"emerg",
|
|
||||||
"endlessh",
|
"endlessh",
|
||||||
"errorlens",
|
"errorlens",
|
||||||
"esbenp",
|
"esbenp",
|
||||||
"esphome",
|
"esphome",
|
||||||
"extest",
|
"extest",
|
||||||
"fadvise",
|
|
||||||
"fastforwardteam",
|
"fastforwardteam",
|
||||||
"FASTFOX",
|
"FASTFOX",
|
||||||
"ffmpegthumbnailer",
|
"ffmpegthumbnailer",
|
||||||
@@ -85,7 +71,6 @@
|
|||||||
"fmask",
|
"fmask",
|
||||||
"fontconfig",
|
"fontconfig",
|
||||||
"formfill",
|
"formfill",
|
||||||
"forwardfor",
|
|
||||||
"foxundermoon",
|
"foxundermoon",
|
||||||
"FULLSCREEN",
|
"FULLSCREEN",
|
||||||
"fwupd",
|
"fwupd",
|
||||||
@@ -98,7 +83,6 @@
|
|||||||
"globalprivacycontrol",
|
"globalprivacycontrol",
|
||||||
"gparted",
|
"gparted",
|
||||||
"gtts",
|
"gtts",
|
||||||
"gutenprint",
|
|
||||||
"hass",
|
"hass",
|
||||||
"healthreport",
|
"healthreport",
|
||||||
"Heatsink",
|
"Heatsink",
|
||||||
@@ -108,9 +92,7 @@
|
|||||||
"hmac",
|
"hmac",
|
||||||
"homeassistant",
|
"homeassistant",
|
||||||
"HPKP",
|
"HPKP",
|
||||||
"hplip",
|
|
||||||
"htmlaboutaddons",
|
"htmlaboutaddons",
|
||||||
"httpchk",
|
|
||||||
"hurlenko",
|
"hurlenko",
|
||||||
"hwloc",
|
"hwloc",
|
||||||
"INITDB",
|
"INITDB",
|
||||||
@@ -118,19 +100,16 @@
|
|||||||
"ioit",
|
"ioit",
|
||||||
"iperf",
|
"iperf",
|
||||||
"isal",
|
"isal",
|
||||||
"jellyfin",
|
|
||||||
"jnoortheen",
|
"jnoortheen",
|
||||||
"jsbc",
|
"jsbc",
|
||||||
"kagi",
|
"kagi",
|
||||||
"kuma",
|
"kuma",
|
||||||
"lazer",
|
|
||||||
"levelname",
|
"levelname",
|
||||||
"libglvnd",
|
"libglvnd",
|
||||||
"libmysqlclient",
|
"libmysqlclient",
|
||||||
"libsodium",
|
"libsodium",
|
||||||
"libssh",
|
"libssh",
|
||||||
"libvirtd",
|
"libvirtd",
|
||||||
"llms",
|
|
||||||
"localtime",
|
"localtime",
|
||||||
"louislam",
|
"louislam",
|
||||||
"lsnew",
|
"lsnew",
|
||||||
@@ -138,8 +117,6 @@
|
|||||||
"lynis",
|
"lynis",
|
||||||
"mangohud",
|
"mangohud",
|
||||||
"markdownlint",
|
"markdownlint",
|
||||||
"maxconn",
|
|
||||||
"maxpages",
|
|
||||||
"maxretry",
|
"maxretry",
|
||||||
"maxtime",
|
"maxtime",
|
||||||
"mechatroner",
|
"mechatroner",
|
||||||
@@ -151,6 +128,7 @@
|
|||||||
"mountpoints",
|
"mountpoints",
|
||||||
"mousewheel",
|
"mousewheel",
|
||||||
"mtxr",
|
"mtxr",
|
||||||
|
"muninn",
|
||||||
"ncdu",
|
"ncdu",
|
||||||
"nemo",
|
"nemo",
|
||||||
"neofetch",
|
"neofetch",
|
||||||
@@ -160,27 +138,22 @@
|
|||||||
"Networkd",
|
"Networkd",
|
||||||
"networkmanager",
|
"networkmanager",
|
||||||
"newtabpage",
|
"newtabpage",
|
||||||
"nixfmt",
|
|
||||||
"nixos",
|
"nixos",
|
||||||
"nixpkgs",
|
"nixpkgs",
|
||||||
"nmap",
|
"nmap",
|
||||||
"noauto",
|
"noauto",
|
||||||
"nodev",
|
|
||||||
"noecho",
|
"noecho",
|
||||||
"nonsponsored",
|
"nonsponsored",
|
||||||
"Noto",
|
"Noto",
|
||||||
"nprt",
|
|
||||||
"nvme",
|
"nvme",
|
||||||
"OCSP",
|
"OCSP",
|
||||||
"oderwat",
|
"oderwat",
|
||||||
"ollama",
|
|
||||||
"oneshot",
|
"oneshot",
|
||||||
"optimise",
|
"optimise",
|
||||||
"optoutstudies",
|
"optoutstudies",
|
||||||
"overalljails",
|
"overalljails",
|
||||||
"overscroll",
|
"overscroll",
|
||||||
"overseerr",
|
"overseerr",
|
||||||
"partitionwise",
|
|
||||||
"pbmode",
|
"pbmode",
|
||||||
"pciutils",
|
"pciutils",
|
||||||
"pcscd",
|
"pcscd",
|
||||||
@@ -188,6 +161,7 @@
|
|||||||
"peerconnection",
|
"peerconnection",
|
||||||
"PESKYFOX",
|
"PESKYFOX",
|
||||||
"PGID",
|
"PGID",
|
||||||
|
"photoprism",
|
||||||
"pipewire",
|
"pipewire",
|
||||||
"pkgs",
|
"pkgs",
|
||||||
"plugdev",
|
"plugdev",
|
||||||
@@ -197,7 +171,6 @@
|
|||||||
"prismlauncher",
|
"prismlauncher",
|
||||||
"privatebrowsing",
|
"privatebrowsing",
|
||||||
"PRIVOXY",
|
"PRIVOXY",
|
||||||
"protontricks",
|
|
||||||
"prowlarr",
|
"prowlarr",
|
||||||
"proxychains",
|
"proxychains",
|
||||||
"prusa",
|
"prusa",
|
||||||
@@ -205,10 +178,8 @@
|
|||||||
"PUID",
|
"PUID",
|
||||||
"pulseaudio",
|
"pulseaudio",
|
||||||
"punycode",
|
"punycode",
|
||||||
"pychromecast",
|
|
||||||
"pylance",
|
"pylance",
|
||||||
"pymetno",
|
"pymetno",
|
||||||
"pyownet",
|
|
||||||
"qbit",
|
"qbit",
|
||||||
"qbittorrent",
|
"qbittorrent",
|
||||||
"qbittorrentvpn",
|
"qbittorrentvpn",
|
||||||
@@ -216,16 +187,12 @@
|
|||||||
"quicksuggest",
|
"quicksuggest",
|
||||||
"radarr",
|
"radarr",
|
||||||
"readahead",
|
"readahead",
|
||||||
"receiveencrypted",
|
|
||||||
"recordsize",
|
|
||||||
"Redistributable",
|
"Redistributable",
|
||||||
"referer",
|
"referer",
|
||||||
"REFERERS",
|
"REFERERS",
|
||||||
"relatime",
|
"relatime",
|
||||||
"Rhosts",
|
"Rhosts",
|
||||||
"ripgrep",
|
"ripgrep",
|
||||||
"roboto",
|
|
||||||
"rokuecp",
|
|
||||||
"routable",
|
"routable",
|
||||||
"rspace",
|
"rspace",
|
||||||
"rtkit",
|
"rtkit",
|
||||||
@@ -247,7 +214,6 @@
|
|||||||
"sponsorblock",
|
"sponsorblock",
|
||||||
"sqltools",
|
"sqltools",
|
||||||
"ssdp",
|
"ssdp",
|
||||||
"SSHOPTS",
|
|
||||||
"stdenv",
|
"stdenv",
|
||||||
"subresource",
|
"subresource",
|
||||||
"substituters",
|
"substituters",
|
||||||
@@ -255,24 +221,19 @@
|
|||||||
"sysstat",
|
"sysstat",
|
||||||
"tabmanager",
|
"tabmanager",
|
||||||
"tamasfe",
|
"tamasfe",
|
||||||
"TCPIP",
|
|
||||||
"tiktok",
|
"tiktok",
|
||||||
"timonwong",
|
"timonwong",
|
||||||
"titlebar",
|
|
||||||
"tmmworkshop",
|
"tmmworkshop",
|
||||||
"Tmpfs",
|
"Tmpfs",
|
||||||
"topsites",
|
"topsites",
|
||||||
"topstories",
|
"topstories",
|
||||||
"torrenting",
|
"torrenting",
|
||||||
"treefmt",
|
|
||||||
"twimg",
|
"twimg",
|
||||||
"uaccess",
|
"uaccess",
|
||||||
"ublock",
|
"ublock",
|
||||||
"uiprotect",
|
|
||||||
"uitour",
|
"uitour",
|
||||||
"unrar",
|
"unrar",
|
||||||
"unsubmitted",
|
"unsubmitted",
|
||||||
"uptimekuma",
|
|
||||||
"urlbar",
|
"urlbar",
|
||||||
"urlclassifier",
|
"urlclassifier",
|
||||||
"usbhid",
|
"usbhid",
|
||||||
@@ -284,11 +245,9 @@
|
|||||||
"virt",
|
"virt",
|
||||||
"virtualisation",
|
"virtualisation",
|
||||||
"vpnpromourl",
|
"vpnpromourl",
|
||||||
"wakeonlan",
|
|
||||||
"webchannel",
|
"webchannel",
|
||||||
"WEBRTC",
|
"WEBRTC",
|
||||||
"WEBUI",
|
"WEBUI",
|
||||||
"wireplumber",
|
|
||||||
"wireshark",
|
"wireshark",
|
||||||
"Workqueues",
|
"Workqueues",
|
||||||
"xattr",
|
"xattr",
|
||||||
|
|||||||
6
build.sh
Normal file
6
build.sh
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
nixos-rebuild build --flake /home/richie/projects/dotfiles#bob
|
||||||
|
nixos-rebuild build --flake /home/richie/projects/dotfiles#jeeves
|
||||||
|
nixos-rebuild build --flake /home/richie/projects/dotfiles#muninn
|
||||||
|
nixos-rebuild build --flake /home/richie/projects/dotfiles#rhapsody-in-green
|
||||||
@@ -8,7 +8,6 @@
|
|||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
inputs.sops-nix.nixosModules.sops
|
|
||||||
./fail2ban.nix
|
./fail2ban.nix
|
||||||
./fonts.nix
|
./fonts.nix
|
||||||
./libs.nix
|
./libs.nix
|
||||||
@@ -23,7 +22,7 @@
|
|||||||
boot = {
|
boot = {
|
||||||
tmp.useTmpfs = true;
|
tmp.useTmpfs = true;
|
||||||
kernelPackages = lib.mkDefault pkgs.linuxPackages_6_12;
|
kernelPackages = lib.mkDefault pkgs.linuxPackages_6_12;
|
||||||
zfs.package = lib.mkDefault pkgs.zfs_2_3;
|
zfs.package = lib.mkDefault pkgs.zfs;
|
||||||
};
|
};
|
||||||
|
|
||||||
hardware.enableRedistributableFirmware = true;
|
hardware.enableRedistributableFirmware = true;
|
||||||
@@ -31,32 +30,23 @@
|
|||||||
home-manager = {
|
home-manager = {
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
useUserPackages = true;
|
useUserPackages = true;
|
||||||
extraSpecialArgs = { inherit inputs outputs; };
|
extraSpecialArgs = {inherit inputs outputs;};
|
||||||
backupFileExtension = "backup";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
overlays = builtins.attrValues outputs.overlays;
|
overlays = builtins.attrValues outputs.overlays;
|
||||||
config.allowUnfree = true;
|
config = {
|
||||||
};
|
allowUnfree = true;
|
||||||
|
|
||||||
services = {
|
|
||||||
# firmware update
|
|
||||||
fwupd.enable = true;
|
|
||||||
|
|
||||||
snapshot_manager.enable = lib.mkDefault true;
|
|
||||||
|
|
||||||
zfs = {
|
|
||||||
trim.enable = lib.mkDefault true;
|
|
||||||
autoScrub.enable = lib.mkDefault true;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.fwupd.enable = true;
|
||||||
|
|
||||||
programs.zsh.enable = true;
|
programs.zsh.enable = true;
|
||||||
|
|
||||||
security.auditd.enable = lib.mkDefault true;
|
security.auditd.enable = lib.mkDefault true;
|
||||||
|
|
||||||
users.mutableUsers = lib.mkDefault false;
|
users.mutableUsers = lib.mkDefault true;
|
||||||
|
|
||||||
zramSwap = {
|
zramSwap = {
|
||||||
enable = lib.mkDefault true;
|
enable = lib.mkDefault true;
|
||||||
|
|||||||
@@ -2,11 +2,9 @@
|
|||||||
inputs,
|
inputs,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let
|
|
||||||
flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs;
|
flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
nix = {
|
nix = {
|
||||||
settings = {
|
settings = {
|
||||||
trusted-users = [
|
trusted-users = [
|
||||||
@@ -39,7 +37,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Add each flake input as a registry and nix_path
|
# Add each flake input as a registry and nix_path
|
||||||
registry = lib.mapAttrs (_: flake: { inherit flake; }) flakeInputs;
|
registry = lib.mapAttrs (_: flake: {inherit flake;}) flakeInputs;
|
||||||
nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs;
|
nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,4 @@
|
|||||||
{
|
{ inputs, pkgs, lib, config, ... }:
|
||||||
inputs,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
cfg = config.services.snapshot_manager;
|
cfg = config.services.snapshot_manager;
|
||||||
in
|
in
|
||||||
|
|||||||
@@ -2,17 +2,9 @@
|
|||||||
{
|
{
|
||||||
boot = {
|
boot = {
|
||||||
kernelPackages = pkgs.linuxPackages_6_12;
|
kernelPackages = pkgs.linuxPackages_6_12;
|
||||||
zfs.package = pkgs.zfs_2_3;
|
zfs.package = pkgs.zfs;
|
||||||
};
|
};
|
||||||
|
|
||||||
hardware.bluetooth = {
|
|
||||||
enable = true;
|
|
||||||
powerOnBoot = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
# rtkit is optional but recommended for pipewire
|
|
||||||
security.rtkit.enable = true;
|
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
displayManager.sddm = {
|
displayManager.sddm = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -29,8 +21,6 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
pulseaudio.enable = false;
|
|
||||||
|
|
||||||
pipewire = {
|
pipewire = {
|
||||||
enable = true;
|
enable = true;
|
||||||
alsa.enable = true;
|
alsa.enable = true;
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
services.printing = {
|
|
||||||
enable = true;
|
|
||||||
drivers = with pkgs; [
|
|
||||||
gutenprint
|
|
||||||
hplip
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,9 +1,6 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [mangohud steam-run];
|
||||||
mangohud
|
|
||||||
steam-run
|
|
||||||
];
|
|
||||||
hardware.steam-hardware.enable = true;
|
hardware.steam-hardware.enable = true;
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
@@ -14,7 +11,7 @@
|
|||||||
remotePlay.openFirewall = true;
|
remotePlay.openFirewall = true;
|
||||||
localNetworkGameTransfers.openFirewall = true;
|
localNetworkGameTransfers.openFirewall = true;
|
||||||
protontricks.enable = true;
|
protontricks.enable = true;
|
||||||
extraCompatPackages = with pkgs; [ proton-ge-bin ];
|
extraCompatPackages = with pkgs; [proton-ge-bin];
|
||||||
extest.enable = true;
|
extest.enable = true;
|
||||||
};
|
};
|
||||||
gamescope = {
|
gamescope = {
|
||||||
|
|||||||
@@ -6,7 +6,8 @@
|
|||||||
overrideFolders = true;
|
overrideFolders = true;
|
||||||
dataDir = "/home/richie/Syncthing";
|
dataDir = "/home/richie/Syncthing";
|
||||||
configDir = "/home/richie/.config/syncthing";
|
configDir = "/home/richie/.config/syncthing";
|
||||||
settings.devices = {
|
settings = {
|
||||||
|
devices = {
|
||||||
phone.id = "LTGPLAE-M4ZDJTM-TZ3DJGY-SLLAVWF-CQDVEVS-RGCS75T-GAPZYK3-KUM6LA5"; # cspell:disable-line
|
phone.id = "LTGPLAE-M4ZDJTM-TZ3DJGY-SLLAVWF-CQDVEVS-RGCS75T-GAPZYK3-KUM6LA5"; # cspell:disable-line
|
||||||
jeeves.id = "ICRHXZW-ECYJCUZ-I4CZ64R-3XRK7CG-LL2HAAK-FGOHD22-BQA4AI6-5OAL6AG"; # cspell:disable-line
|
jeeves.id = "ICRHXZW-ECYJCUZ-I4CZ64R-3XRK7CG-LL2HAAK-FGOHD22-BQA4AI6-5OAL6AG"; # cspell:disable-line
|
||||||
ipad.id = "KI76T3X-SFUGV2L-VSNYTKR-TSIUV5L-SHWD3HE-GQRGRCN-GY4UFMD-CW6Z6AX"; # cspell:disable-line
|
ipad.id = "KI76T3X-SFUGV2L-VSNYTKR-TSIUV5L-SHWD3HE-GQRGRCN-GY4UFMD-CW6Z6AX"; # cspell:disable-line
|
||||||
@@ -14,4 +15,5 @@
|
|||||||
rhapsody-in-green.id = "ASL3KC4-3XEN6PA-7BQBRKE-A7JXLI6-DJT43BY-Q4WPOER-7UALUAZ-VTPQ6Q4"; # cspell:disable-line
|
rhapsody-in-green.id = "ASL3KC4-3XEN6PA-7BQBRKE-A7JXLI6-DJT43BY-Q4WPOER-7UALUAZ-VTPQ6Q4"; # cspell:disable-line
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,32 @@
|
|||||||
|
{ lib, pkgs, ... }:
|
||||||
{
|
{
|
||||||
|
systemd = {
|
||||||
|
services."autopull@dotfiles" = {
|
||||||
|
requires = [ "multi-user.target" ];
|
||||||
|
after = [ "multi-user.target" ];
|
||||||
|
description = "Pull the latest data for dotfiles";
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
User = "root";
|
||||||
|
WorkingDirectory = /root/dotfiles;
|
||||||
|
ExecStart = "${pkgs.git}/bin/git pull --all --prune";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
timers."autopull@dotfiles" = {
|
||||||
|
wantedBy = [ "timers.target" ];
|
||||||
|
timerConfig = {
|
||||||
|
OnBootSec = "1h";
|
||||||
|
OnUnitActiveSec = "1h";
|
||||||
|
Unit = "autopull@dotfiles.service";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
system.autoUpgrade = {
|
system.autoUpgrade = {
|
||||||
enable = true;
|
enable = lib.mkDefault true;
|
||||||
flags = [ "--accept-flake-config" ];
|
flags = [ "--accept-flake-config" ];
|
||||||
randomizedDelaySec = "1h";
|
randomizedDelaySec = "1h";
|
||||||
persistent = true;
|
persistent = true;
|
||||||
flake = "github:RichieCahill/dotfiles";
|
flake = "github:RAD-Development/nix-dotfiles";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
129
flake.lock
generated
129
flake.lock
generated
@@ -9,11 +9,11 @@
|
|||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"dir": "pkgs/firefox-addons",
|
"dir": "pkgs/firefox-addons",
|
||||||
"lastModified": 1739396257,
|
"lastModified": 1735099403,
|
||||||
"narHash": "sha256-E+xGh25fyBLNo2FYxP4uHkTh4yh1C0AIyYpcVdW3CL0=",
|
"narHash": "sha256-22NF70bxkMY7/IY2NG0pC7WzgJ0bI67FGSUP37d2mQ8=",
|
||||||
"owner": "rycee",
|
"owner": "rycee",
|
||||||
"repo": "nur-expressions",
|
"repo": "nur-expressions",
|
||||||
"rev": "f61927ae7c2b28ee9d426114a06f185f4dea4301",
|
"rev": "5b2c380332cf5a3022fde931d0346e2b868b544e",
|
||||||
"type": "gitlab"
|
"type": "gitlab"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -23,6 +23,22 @@
|
|||||||
"type": "gitlab"
|
"type": "gitlab"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"flake-compat": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1717312683,
|
||||||
|
"narHash": "sha256-FrlieJH50AuvagamEvWMIE6D2OAnERuDboFDYAED/dE=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"rev": "38fd3954cf65ce6faf3d0d45cd26059e059f07ea",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"flake-utils": {
|
"flake-utils": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1629284811,
|
"lastModified": 1629284811,
|
||||||
@@ -63,11 +79,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1739381933,
|
"lastModified": 1735053786,
|
||||||
"narHash": "sha256-4gvobxITgcrNGfwsVG5a46QzQCX89btIYw23p0ilbcc=",
|
"narHash": "sha256-Gm+0DcbUS338vvkwyYWms5jsWlx8z8MeQBzcnIDuIkw=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "15b59d4191b993ebdfcb1f61b834fced217882ba",
|
"rev": "35b98d20ca8f4ca1f6a2c30b8a2c8bb305a36d84",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -98,13 +114,36 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixos-cosmic": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-compat": "flake-compat",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"nixpkgs-stable": "nixpkgs-stable",
|
||||||
|
"rust-overlay": "rust-overlay"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1735090583,
|
||||||
|
"narHash": "sha256-Tm+BsKXJS/EdJd9DvLxDbw+chPI1o7A9RHKIFxho36I=",
|
||||||
|
"owner": "lilyinstarlight",
|
||||||
|
"repo": "nixos-cosmic",
|
||||||
|
"rev": "847b93e3b63bcea9a477dd86bb4b56ce7e051f0e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "lilyinstarlight",
|
||||||
|
"repo": "nixos-cosmic",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixos-hardware": {
|
"nixos-hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1738816619,
|
"lastModified": 1734954597,
|
||||||
"narHash": "sha256-5yRlg48XmpcX5b5HesdGMOte+YuCy9rzQkJz+imcu6I=",
|
"narHash": "sha256-QIhd8/0x30gEv8XEE1iAnrdMlKuQ0EzthfDR7Hwl+fk=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixos-hardware",
|
"repo": "nixos-hardware",
|
||||||
"rev": "2eccff41bab80839b1d25b303b53d339fbb07087",
|
"rev": "def1d472c832d77885f174089b0d34854b007198",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -116,11 +155,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1739214665,
|
"lastModified": 1734649271,
|
||||||
"narHash": "sha256-26L8VAu3/1YRxS8MHgBOyOM8xALdo6N0I04PgorE7UM=",
|
"narHash": "sha256-4EVBRhOjMDuGtMaofAIqzJbg4Ql7Ai0PSeuVZTHjyKQ=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "64e75cd44acf21c7933d61d7721e812eac1b5a0a",
|
"rev": "d70bd19e0a38ad4790d3913bf08fcbfc9eeca507",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -132,11 +171,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-master": {
|
"nixpkgs-master": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1739399097,
|
"lastModified": 1735170897,
|
||||||
"narHash": "sha256-5U1YLh8bENPGtC6j6493qs3lK0PrzZw4omMvJUFOhEI=",
|
"narHash": "sha256-O1OXa12dHaObowGsfiM8pgphWfSXJj5v8sTxFoPXR0A=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "154a2c1abcea99a98f8b9344dfaba019a28162bd",
|
"rev": "138326d6e9841ab9e6161730d40e09cedd670c40",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -148,11 +187,27 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-stable": {
|
"nixpkgs-stable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1735563628,
|
"lastModified": 1734875076,
|
||||||
"narHash": "sha256-OnSAY7XDSx7CtDoqNh8jwVwh4xNL/2HaJxGjryLWzX8=",
|
"narHash": "sha256-Pzyb+YNG5u3zP79zoi8HXYMs15Q5dfjDgwCdUI5B0nY=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "1807c2b91223227ad5599d7067a61665c52d1295",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-24.11",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs-stable_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1734835170,
|
||||||
|
"narHash": "sha256-JG6n9tQET7ZLjvwjH9BdYE6pES/Alcduxv2FDXliuBM=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "b134951a4c9f3c995fd7be05f3243f8ecd65d798",
|
"rev": "6df924734e1b626efd70925545de844b1c25246f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -177,11 +232,11 @@
|
|||||||
"treefmt-nix": "treefmt-nix"
|
"treefmt-nix": "treefmt-nix"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1736884309,
|
"lastModified": 1731205797,
|
||||||
"narHash": "sha256-eiCqmKl0BIRiYk5/ZhZozwn4/7Km9CWTbc15Cv+VX5k=",
|
"narHash": "sha256-F7N1mxH1VrkVNHR3JGNMRvp9+98KYO4b832KS8Gl2xI=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "poetry2nix",
|
"repo": "poetry2nix",
|
||||||
"rev": "75d0515332b7ca269f6d7abfd2c44c47a7cbca7b",
|
"rev": "f554d27c1544d9c56e5f1f8e2b8aff399803674e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -194,32 +249,33 @@
|
|||||||
"inputs": {
|
"inputs": {
|
||||||
"firefox-addons": "firefox-addons",
|
"firefox-addons": "firefox-addons",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
|
"nixos-cosmic": "nixos-cosmic",
|
||||||
"nixos-hardware": "nixos-hardware",
|
"nixos-hardware": "nixos-hardware",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"nixpkgs-master": "nixpkgs-master",
|
"nixpkgs-master": "nixpkgs-master",
|
||||||
"nixpkgs-stable": "nixpkgs-stable",
|
"nixpkgs-stable": "nixpkgs-stable_2",
|
||||||
"sops-nix": "sops-nix",
|
|
||||||
"system_tools": "system_tools",
|
"system_tools": "system_tools",
|
||||||
"systems": "systems_3"
|
"systems": "systems_3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sops-nix": {
|
"rust-overlay": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
"nixos-cosmic",
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1739262228,
|
"lastModified": 1735007320,
|
||||||
"narHash": "sha256-7JAGezJ0Dn5qIyA2+T4Dt/xQgAbhCglh6lzCekTVMeU=",
|
"narHash": "sha256-NdhUgB9BkLGW9I+Q1GyUUCc3CbDgsg7HLWjG7WZBR5Q=",
|
||||||
"owner": "Mic92",
|
"owner": "oxalica",
|
||||||
"repo": "sops-nix",
|
"repo": "rust-overlay",
|
||||||
"rev": "07af005bb7d60c7f118d9d9f5530485da5d1e975",
|
"rev": "fb5fdba697ee9a2391ca9ceea3b853b4e3ce37a5",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "Mic92",
|
"owner": "oxalica",
|
||||||
"repo": "sops-nix",
|
"repo": "rust-overlay",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -232,11 +288,11 @@
|
|||||||
"poetry2nix": "poetry2nix"
|
"poetry2nix": "poetry2nix"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1739664204,
|
"lastModified": 1733083480,
|
||||||
"narHash": "sha256-uzT5hQstNHJvdPPqdSiznxPXL3qCaKQ+DmMnx6IpIYk=",
|
"narHash": "sha256-B13faNyBbA3MeI7Jp6pFVbp58rI2Rx5Uvd83csW2p48=",
|
||||||
"owner": "RichieCahill",
|
"owner": "RichieCahill",
|
||||||
"repo": "system_tools",
|
"repo": "system_tools",
|
||||||
"rev": "b36dd59fedeba140175590bfcab2ba22049dfc93",
|
"rev": "bc357d8fabd83c1423611829091e5b1d86dd913c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -270,9 +326,8 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nix-systems",
|
"id": "systems",
|
||||||
"repo": "default",
|
"type": "indirect"
|
||||||
"type": "github"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"systems_3": {
|
"systems_3": {
|
||||||
|
|||||||
55
flake.nix
55
flake.nix
@@ -8,10 +8,10 @@
|
|||||||
"https://nix-community.cachix.org/?priority=10&want-mass-query=true"
|
"https://nix-community.cachix.org/?priority=10&want-mass-query=true"
|
||||||
];
|
];
|
||||||
extra-trusted-public-keys = [
|
extra-trusted-public-keys = [
|
||||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" # cspell:disable-line
|
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||||
"cache.tmmworkshop.com:jHffkpgbmEdstQPoihJPYW9TQe6jnQbWR2LqkNGV3iA=" # cspell:disable-line
|
"cache.tmmworkshop.com:jHffkpgbmEdstQPoihJPYW9TQe6jnQbWR2LqkNGV3iA="
|
||||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" # cspell:disable-line
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
"cache-nix-dot:Od9KN34LXc6Lu7y1ozzV1kIXZa8coClozgth/SYE7dU=" # cspell:disable-line
|
"cache-nix-dot:Od9KN34LXc6Lu7y1ozzV1kIXZa8coClozgth/SYE7dU="
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -38,22 +38,20 @@
|
|||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
sops-nix = {
|
nixos-cosmic = {
|
||||||
url = "github:Mic92/sops-nix";
|
url = "github:lilyinstarlight/nixos-cosmic";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs = {
|
||||||
{
|
|
||||||
self,
|
self,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
home-manager,
|
home-manager,
|
||||||
systems,
|
systems,
|
||||||
sops-nix,
|
nixos-cosmic,
|
||||||
...
|
...
|
||||||
}@inputs:
|
} @ inputs: let
|
||||||
let
|
|
||||||
inherit (self) outputs;
|
inherit (self) outputs;
|
||||||
lib = nixpkgs.lib // home-manager.lib;
|
lib = nixpkgs.lib // home-manager.lib;
|
||||||
forEachSystem = f: lib.genAttrs (import systems) (system: f pkgsFor.${system});
|
forEachSystem = f: lib.genAttrs (import systems) (system: f pkgsFor.${system});
|
||||||
@@ -64,38 +62,29 @@
|
|||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
inherit lib;
|
inherit lib;
|
||||||
overlays = import ./overlays { inherit inputs outputs; };
|
overlays = import ./overlays {inherit inputs outputs;};
|
||||||
|
|
||||||
devShells = forEachSystem (pkgs: import ./shell.nix { inherit pkgs; });
|
devShells = forEachSystem (pkgs: import ./shell.nix {inherit pkgs;});
|
||||||
formatter = forEachSystem (pkgs: pkgs.treefmt);
|
formatter = forEachSystem (pkgs: pkgs.alejandra);
|
||||||
|
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
bob = lib.nixosSystem {
|
bob = lib.nixosSystem {
|
||||||
modules = [
|
modules = [./systems/bob];
|
||||||
./systems/bob
|
specialArgs = {inherit inputs outputs;};
|
||||||
];
|
|
||||||
specialArgs = { inherit inputs outputs; };
|
|
||||||
};
|
};
|
||||||
jeeves = lib.nixosSystem {
|
jeeves = lib.nixosSystem {
|
||||||
modules = [
|
modules = [./systems/jeeves];
|
||||||
./systems/jeeves
|
specialArgs = {inherit inputs outputs;};
|
||||||
];
|
|
||||||
specialArgs = { inherit inputs outputs; };
|
|
||||||
};
|
};
|
||||||
rhapsody-in-green = lib.nixosSystem {
|
rhapsody-in-green = lib.nixosSystem {
|
||||||
modules = [
|
modules = [./systems/rhapsody-in-green];
|
||||||
./systems/rhapsody-in-green
|
specialArgs = {inherit inputs outputs;};
|
||||||
];
|
|
||||||
specialArgs = { inherit inputs outputs; };
|
|
||||||
};
|
};
|
||||||
installer = lib.nixosSystem {
|
muninn = lib.nixosSystem {
|
||||||
modules = [
|
modules = [./systems/muninn];
|
||||||
./systems/installer
|
specialArgs = {inherit inputs outputs;};
|
||||||
];
|
|
||||||
specialArgs = { inherit inputs outputs; };
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
{ inputs, ... }:
|
{inputs, ...}: {
|
||||||
{
|
|
||||||
# When applied, the stable nixpkgs set (declared in the flake inputs) will be accessible through 'pkgs.stable'
|
# When applied, the stable nixpkgs set (declared in the flake inputs) will be accessible through 'pkgs.stable'
|
||||||
stable = final: _prev: {
|
stable = final: _prev: {
|
||||||
stable = import inputs.nixpkgs-stable {
|
stable = import inputs.nixpkgs-stable {
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
{
|
{pkgs ? import <nixpkgs> {}, ...}: {
|
||||||
pkgs ? import <nixpkgs> { },
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
default = pkgs.mkShell {
|
default = pkgs.mkShell {
|
||||||
NIX_CONFIG = "extra-experimental-features = nix-command flakes ca-derivations";
|
NIX_CONFIG = "extra-experimental-features = nix-command flakes ca-derivations";
|
||||||
nativeBuildInputs = with pkgs; [
|
nativeBuildInputs = with pkgs; [
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../../users/richie
|
../../users/richie
|
||||||
../../users/gaming
|
|
||||||
../../common/global
|
../../common/global
|
||||||
../../common/optional/desktop.nix
|
../../common/optional/desktop.nix
|
||||||
../../common/optional/docker.nix
|
../../common/optional/docker.nix
|
||||||
@@ -9,14 +8,11 @@
|
|||||||
../../common/optional/steam.nix
|
../../common/optional/steam.nix
|
||||||
../../common/optional/syncthing_base.nix
|
../../common/optional/syncthing_base.nix
|
||||||
../../common/optional/systemd-boot.nix
|
../../common/optional/systemd-boot.nix
|
||||||
../../common/optional/update.nix
|
|
||||||
../../common/optional/yubikey.nix
|
../../common/optional/yubikey.nix
|
||||||
../../common/optional/zerotier.nix
|
../../common/optional/zerotier.nix
|
||||||
../../common/optional/nvidia.nix
|
|
||||||
./hardware.nix
|
./hardware.nix
|
||||||
|
./nvidia.nix
|
||||||
./syncthing.nix
|
./syncthing.nix
|
||||||
./games.nix
|
|
||||||
./llms.nix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
@@ -26,17 +22,28 @@
|
|||||||
networkmanager.enable = true;
|
networkmanager.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
services = {
|
hardware = {
|
||||||
displayManager = {
|
pulseaudio.enable = false;
|
||||||
enable = true;
|
bluetooth = {
|
||||||
autoLogin = {
|
|
||||||
user = "gaming";
|
|
||||||
enable = true;
|
enable = true;
|
||||||
|
powerOnBoot = true;
|
||||||
};
|
};
|
||||||
defaultSession = "plasma";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
|
||||||
|
services = {
|
||||||
|
|
||||||
openssh.ports = [ 262 ];
|
openssh.ports = [ 262 ];
|
||||||
|
|
||||||
|
printing.enable = true;
|
||||||
|
|
||||||
|
snapshot_manager.enable = true;
|
||||||
|
|
||||||
|
zfs = {
|
||||||
|
trim.enable = true;
|
||||||
|
autoScrub.enable = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
system.stateVersion = "24.05";
|
system.stateVersion = "24.05";
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
osu-lazer-bin
|
|
||||||
jellyfin-media-player
|
|
||||||
];
|
|
||||||
}
|
|
||||||
@@ -26,8 +26,6 @@
|
|||||||
device = "/dev/disk/by-id/nvme-Samsung_SSD_990_PRO_with_Heatsink_1TB_S73JNJ0X114418B-part2";
|
device = "/dev/disk/by-id/nvme-Samsung_SSD_990_PRO_with_Heatsink_1TB_S73JNJ0X114418B-part2";
|
||||||
bypassWorkqueues = true;
|
bypassWorkqueues = true;
|
||||||
allowDiscards = true;
|
allowDiscards = true;
|
||||||
keyFileSize = 4096;
|
|
||||||
keyFile = "/dev/disk/by-id/usb-Samsung_Flash_Drive_FIT_0374620080067131-0:0";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
kernelModules = [ "kvm-amd" ];
|
kernelModules = [ "kvm-amd" ];
|
||||||
|
|||||||
@@ -1,24 +0,0 @@
|
|||||||
{
|
|
||||||
services = {
|
|
||||||
ollama = {
|
|
||||||
enable = true;
|
|
||||||
loadModels = [
|
|
||||||
"codellama:7b"
|
|
||||||
"deepseek-r1:1.5b"
|
|
||||||
"deepseek-r1:7b"
|
|
||||||
"deepseek-r1:8b"
|
|
||||||
"deepseek-r1:14b"
|
|
||||||
"deepseek-r1:32b"
|
|
||||||
"llama3.2:3b"
|
|
||||||
"mistral-nemo:12b"
|
|
||||||
];
|
|
||||||
acceleration = "cuda";
|
|
||||||
openFirewall = true;
|
|
||||||
};
|
|
||||||
open-webui = {
|
|
||||||
enable = true;
|
|
||||||
openFirewall = true;
|
|
||||||
host = "192.168.90.25";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
{
|
{
|
||||||
services.syncthing.settings.folders = {
|
services.syncthing.settings.folders = {
|
||||||
"dotfiles" = {
|
"notes" = {
|
||||||
path = "/home/richie/dotfiles";
|
id = "l62ul-lpweo"; # cspell:disable-line
|
||||||
|
path = "/home/richie/notes";
|
||||||
devices = [
|
devices = [
|
||||||
"jeeves"
|
"jeeves"
|
||||||
"rhapsody-in-green"
|
"rhapsody-in-green"
|
||||||
@@ -29,5 +30,29 @@
|
|||||||
];
|
];
|
||||||
fsWatcherEnabled = true;
|
fsWatcherEnabled = true;
|
||||||
};
|
};
|
||||||
|
"projects" = {
|
||||||
|
id = "vyma6-lqqrz"; # cspell:disable-line
|
||||||
|
path = "/home/richie/projects";
|
||||||
|
devices = [
|
||||||
|
"jeeves"
|
||||||
|
"rhapsody-in-green"
|
||||||
|
];
|
||||||
|
fsWatcherEnabled = true;
|
||||||
|
};
|
||||||
|
"temp" = {
|
||||||
|
id = "bob_temp";
|
||||||
|
path = "/home/richie/temp";
|
||||||
|
devices = [
|
||||||
|
"jeeves"
|
||||||
|
];
|
||||||
|
fsWatcherEnabled = true;
|
||||||
|
};
|
||||||
|
"vault" = {
|
||||||
|
path = "/home/richie/vault";
|
||||||
|
devices = [
|
||||||
|
"rhapsody-in-green"
|
||||||
|
];
|
||||||
|
fsWatcherEnabled = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,24 +0,0 @@
|
|||||||
{
|
|
||||||
inputs,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
modulesPath,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
imports = [ (modulesPath + "/installer/cd-dvd/installation-cd-minimal.nix") ];
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
git
|
|
||||||
python313
|
|
||||||
inputs.system_tools.packages.x86_64-linux.default
|
|
||||||
];
|
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
||||||
|
|
||||||
systemd.services.sshd.wantedBy = pkgs.lib.mkForce [ "multi-user.target" ];
|
|
||||||
|
|
||||||
users.users.root.openssh.authorizedKeys.keys = [
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJYZFsc9CSH03ZUP7y81AHwSyjLwFmcshVFCyxDcYhBT rhapsody-in-green" # cspell:disable-line
|
|
||||||
];
|
|
||||||
}
|
|
||||||
@@ -1,3 +1,6 @@
|
|||||||
|
let
|
||||||
|
vars = import ./vars.nix;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../../users/richie
|
../../users/richie
|
||||||
@@ -7,11 +10,12 @@
|
|||||||
../../common/optional/syncthing_base.nix
|
../../common/optional/syncthing_base.nix
|
||||||
../../common/optional/zerotier.nix
|
../../common/optional/zerotier.nix
|
||||||
./docker
|
./docker
|
||||||
./services
|
|
||||||
./hardware.nix
|
./hardware.nix
|
||||||
|
./home_assistant.nix
|
||||||
./networking.nix
|
./networking.nix
|
||||||
./programs.nix
|
./programs.nix
|
||||||
./runners
|
./runner.nix
|
||||||
|
./services.nix
|
||||||
./syncthing.nix
|
./syncthing.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -24,9 +28,31 @@
|
|||||||
services = {
|
services = {
|
||||||
openssh.ports = [ 629 ];
|
openssh.ports = [ 629 ];
|
||||||
|
|
||||||
|
nix-serve = {
|
||||||
|
enable = true;
|
||||||
|
secretKeyFile = "${vars.storage_secrets}/services/nix-cache/cache-priv-key.pem";
|
||||||
|
openFirewall = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
plex = {
|
||||||
|
enable = true;
|
||||||
|
dataDir = vars.media_plex;
|
||||||
|
openFirewall = true;
|
||||||
|
};
|
||||||
|
|
||||||
smartd.enable = true;
|
smartd.enable = true;
|
||||||
|
|
||||||
snapshot_manager.path = ./snapshot_config.toml;
|
snapshot_manager = {
|
||||||
|
enable = true;
|
||||||
|
path = ./snapshot_config.toml;
|
||||||
|
};
|
||||||
|
|
||||||
|
sysstat.enable = true;
|
||||||
|
|
||||||
|
zfs = {
|
||||||
|
trim.enable = true;
|
||||||
|
autoScrub.enable = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
system.stateVersion = "24.05";
|
system.stateVersion = "24.05";
|
||||||
|
|||||||
19
systems/jeeves/docker/audiobookshelf.nix
Normal file
19
systems/jeeves/docker/audiobookshelf.nix
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
let
|
||||||
|
vars = import ../vars.nix;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
virtualisation.oci-containers.containers.audiobookshelf = {
|
||||||
|
image = "ghcr.io/advplyr/audiobookshelf:latest";
|
||||||
|
volumes = [
|
||||||
|
"${vars.media_docker_configs}/audiobookshelf:/config"
|
||||||
|
"${vars.media_docker_configs}/audiobookshelf:/metadata"
|
||||||
|
"${vars.storage_library}/audiobooks:/audiobooks"
|
||||||
|
"${vars.storage_library}/books:/books"
|
||||||
|
];
|
||||||
|
environment = {
|
||||||
|
TZ = "America/New_York";
|
||||||
|
};
|
||||||
|
extraOptions = [ "--network=web" ];
|
||||||
|
autoStart = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
15
systems/jeeves/docker/filebrowser.nix
Normal file
15
systems/jeeves/docker/filebrowser.nix
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
let
|
||||||
|
vars = import ../vars.nix;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
virtualisation.oci-containers.containers.filebrowser = {
|
||||||
|
image = "hurlenko/filebrowser:latest";
|
||||||
|
extraOptions = [ "--network=web" ];
|
||||||
|
volumes = [
|
||||||
|
"/zfs:/data"
|
||||||
|
"${vars.media_docker_configs}/filebrowser:/config"
|
||||||
|
];
|
||||||
|
autoStart = true;
|
||||||
|
user = "1000:users";
|
||||||
|
};
|
||||||
|
}
|
||||||
12
systems/jeeves/docker/grafana.nix
Normal file
12
systems/jeeves/docker/grafana.nix
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
let
|
||||||
|
vars = import ../vars.nix;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
virtualisation.oci-containers.containers.grafana = {
|
||||||
|
image = "grafana/grafana-enterprise:latest";
|
||||||
|
volumes = [ "${vars.media_docker_configs}/grafana:/var/lib/grafana" ];
|
||||||
|
user = "600:600";
|
||||||
|
extraOptions = [ "--network=web" ];
|
||||||
|
autoStart = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -21,53 +21,51 @@ defaults
|
|||||||
|
|
||||||
#Application Setup
|
#Application Setup
|
||||||
frontend ContentSwitching
|
frontend ContentSwitching
|
||||||
bind *:80 v4v6
|
bind *:80
|
||||||
bind *:443 v4v6 ssl crt /zfs/storage/secrets/docker/cloudflare.pem
|
bind *:443 ssl crt /etc/ssl/certs/cloudflare.pem
|
||||||
mode http
|
mode http
|
||||||
# tmmworkshop.com
|
# tmmworkshop.com
|
||||||
acl host_audiobookshelf hdr(host) -i audiobookshelf.tmmworkshop.com
|
acl host_audiobookshelf hdr(host) -i audiobookshelf.tmmworkshop.com
|
||||||
acl host_cache hdr(host) -i cache.tmmworkshop.com
|
acl host_cache hdr(host) -i cache.tmmworkshop.com
|
||||||
acl host_filebrowser hdr(host) -i filebrowser.tmmworkshop.com
|
acl host_filebrowser hdr(host) -i filebrowser.tmmworkshop.com
|
||||||
|
acl host_grafana hdr(host) -i grafana.tmmworkshop.com
|
||||||
acl host_homeassistant hdr(host) -i homeassistant.tmmworkshop.com
|
acl host_homeassistant hdr(host) -i homeassistant.tmmworkshop.com
|
||||||
acl host_jellyfin hdr(host) -i jellyfin.tmmworkshop.com
|
acl host_photoprism hdr(host) -i photoprism.tmmworkshop.com
|
||||||
acl host_share hdr(host) -i share.tmmworkshop.com
|
|
||||||
acl host_uptime_kuma hdr(host) -i uptimekuma-jeeves.tmmworkshop.com
|
acl host_uptime_kuma hdr(host) -i uptimekuma-jeeves.tmmworkshop.com
|
||||||
|
|
||||||
use_backend audiobookshelf_nodes if host_audiobookshelf
|
use_backend audiobookshelf_nodes if host_audiobookshelf
|
||||||
use_backend cache_nodes if host_cache
|
use_backend cache_nodes if host_cache
|
||||||
use_backend filebrowser_nodes if host_filebrowser
|
use_backend filebrowser_nodes if host_filebrowser
|
||||||
|
use_backend grafana_nodes if host_grafana
|
||||||
use_backend homeassistant_nodes if host_homeassistant
|
use_backend homeassistant_nodes if host_homeassistant
|
||||||
use_backend jellyfin if host_jellyfin
|
use_backend photoprism_nodes if host_photoprism
|
||||||
use_backend share_nodes if host_share
|
|
||||||
use_backend uptime_kuma_nodes if host_uptime_kuma
|
use_backend uptime_kuma_nodes if host_uptime_kuma
|
||||||
|
|
||||||
backend audiobookshelf_nodes
|
backend audiobookshelf_nodes
|
||||||
mode http
|
mode http
|
||||||
server server 127.0.0.1:8000
|
server server audiobookshelf:80
|
||||||
|
|
||||||
backend cache_nodes
|
backend cache_nodes
|
||||||
mode http
|
mode http
|
||||||
server server 127.0.0.1:5000
|
server server 192.168.90.40:5000
|
||||||
|
|
||||||
|
backend grafana_nodes
|
||||||
|
mode http
|
||||||
|
server server grafana:3000
|
||||||
|
|
||||||
backend filebrowser_nodes
|
backend filebrowser_nodes
|
||||||
mode http
|
mode http
|
||||||
server server 127.0.0.1:8080
|
server server filebrowser:8080
|
||||||
|
|
||||||
backend homeassistant_nodes
|
backend homeassistant_nodes
|
||||||
mode http
|
mode http
|
||||||
server server 127.0.0.1:8123
|
server server 192.168.95.14:8123
|
||||||
|
|
||||||
backend jellyfin
|
backend photoprism_nodes
|
||||||
option httpchk
|
|
||||||
option forwardfor
|
|
||||||
http-check send meth GET uri /health
|
|
||||||
http-check expect string Healthy
|
|
||||||
server jellyfin 127.0.0.1:8096
|
|
||||||
|
|
||||||
backend share_nodes
|
|
||||||
mode http
|
mode http
|
||||||
server server 127.0.0.1:8091
|
server server photoprism:2342
|
||||||
|
|
||||||
backend uptime_kuma_nodes
|
backend uptime_kuma_nodes
|
||||||
mode http
|
mode http
|
||||||
server server 127.0.0.1:3001
|
server server uptime_kuma:3001
|
||||||
|
|
||||||
53
systems/jeeves/docker/photoprism.nix
Normal file
53
systems/jeeves/docker/photoprism.nix
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
let
|
||||||
|
vars = import ../vars.nix;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
virtualisation.oci-containers.containers.photoprism = {
|
||||||
|
image = "photoprism/photoprism:latest";
|
||||||
|
volumes = [
|
||||||
|
"${vars.media_docker_configs}/photoprism:/photoprism/storage"
|
||||||
|
"${vars.storage_photos}/originals:/photoprism/originals"
|
||||||
|
"${vars.storage_photos}/import:/photoprism/import"
|
||||||
|
];
|
||||||
|
environment = {
|
||||||
|
PHOTOPRISM_ADMIN_USER="admin";
|
||||||
|
PHOTOPRISM_AUTH_MODE="password";
|
||||||
|
PHOTOPRISM_DISABLE_TLS="false";
|
||||||
|
PHOTOPRISM_DEFAULT_TLS="true";
|
||||||
|
PHOTOPRISM_ORIGINALS_LIMIT="30000";
|
||||||
|
PHOTOPRISM_HTTP_COMPRESSION="gzip";
|
||||||
|
PHOTOPRISM_LOG_LEVEL="info";
|
||||||
|
PHOTOPRISM_READONLY="false";
|
||||||
|
PHOTOPRISM_EXPERIMENTAL="false";
|
||||||
|
PHOTOPRISM_DISABLE_CHOWN="false";
|
||||||
|
PHOTOPRISM_DISABLE_WEBDAV="false";
|
||||||
|
PHOTOPRISM_DISABLE_SETTINGS="false";
|
||||||
|
PHOTOPRISM_DISABLE_TENSORFLOW="false";
|
||||||
|
PHOTOPRISM_DISABLE_FACES="false";
|
||||||
|
PHOTOPRISM_DISABLE_CLASSIFICATION="false";
|
||||||
|
PHOTOPRISM_DISABLE_VECTORS="false";
|
||||||
|
PHOTOPRISM_DISABLE_RAW="false";
|
||||||
|
PHOTOPRISM_RAW_PRESETS="false";
|
||||||
|
PHOTOPRISM_SIDECAR_YAML="true";
|
||||||
|
PHOTOPRISM_BACKUP_ALBUMS="true";
|
||||||
|
PHOTOPRISM_BACKUP_DATABASE="true";
|
||||||
|
PHOTOPRISM_BACKUP_SCHEDULE="daily";
|
||||||
|
PHOTOPRISM_INDEX_SCHEDULE="";
|
||||||
|
PHOTOPRISM_AUTO_INDEX="300";
|
||||||
|
PHOTOPRISM_AUTO_IMPORT= "-1";
|
||||||
|
PHOTOPRISM_DETECT_NSFW="false";
|
||||||
|
PHOTOPRISM_UPLOAD_NSFW="true";
|
||||||
|
PHOTOPRISM_DATABASE_DRIVER="sqlite";
|
||||||
|
PHOTOPRISM_SITE_CAPTION="AI-Powered Photos App";
|
||||||
|
PHOTOPRISM_SITE_DESCRIPTION="";
|
||||||
|
PHOTOPRISM_SITE_AUTHOR="";
|
||||||
|
PHOTOPRISM_UID="600";
|
||||||
|
PHOTOPRISM_GID="600";
|
||||||
|
# PHOTOPRISM_UMASK: 0000
|
||||||
|
};
|
||||||
|
environmentFiles = ["${vars.storage_secrets}/docker/photoprism"];
|
||||||
|
autoStart = true;
|
||||||
|
extraOptions = [ "--network=web" ];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
32
systems/jeeves/docker/postgresql.nix
Normal file
32
systems/jeeves/docker/postgresql.nix
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
let
|
||||||
|
vars = import ../vars.nix;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
users = {
|
||||||
|
users.postgres = {
|
||||||
|
isSystemUser = true;
|
||||||
|
group = "postgres";
|
||||||
|
uid = 999;
|
||||||
|
};
|
||||||
|
groups.postgres = {
|
||||||
|
gid = 999;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
virtualisation.oci-containers.containers = {
|
||||||
|
postgres = {
|
||||||
|
image = "postgres:17";
|
||||||
|
ports = [ "5432:5432" ];
|
||||||
|
volumes = [ "${vars.media_database}/postgres:/var/lib/postgresql/data" ];
|
||||||
|
environment = {
|
||||||
|
POSTGRES_USER = "admin";
|
||||||
|
POSTGRES_DB = "archive";
|
||||||
|
POSTGRES_INITDB_ARGS = "--auth-host=scram-sha-256";
|
||||||
|
};
|
||||||
|
environmentFiles = [ "${vars.storage_secrets}/docker/postgres" ];
|
||||||
|
autoStart = true;
|
||||||
|
user = "postgres:postgres";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
@@ -3,15 +3,8 @@ let
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
networking.firewall = {
|
networking.firewall = {
|
||||||
allowedTCPPorts = [
|
allowedTCPPorts = [ 6881 8082 29432 ];
|
||||||
6881
|
allowedUDPPorts = [ 6881 29432 ];
|
||||||
8082
|
|
||||||
29432
|
|
||||||
];
|
|
||||||
allowedUDPPorts = [
|
|
||||||
6881
|
|
||||||
29432
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
virtualisation.oci-containers.containers.qbit = {
|
virtualisation.oci-containers.containers.qbit = {
|
||||||
image = "ghcr.io/linuxserver/qbittorrent:5.0.2";
|
image = "ghcr.io/linuxserver/qbittorrent:5.0.2";
|
||||||
|
|||||||
@@ -3,11 +3,7 @@ let
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
networking.firewall = {
|
networking.firewall = {
|
||||||
allowedTCPPorts = [
|
allowedTCPPorts = [ 6882 8081 8118 ];
|
||||||
6882
|
|
||||||
8081
|
|
||||||
8118
|
|
||||||
];
|
|
||||||
allowedUDPPorts = [ 6882 ];
|
allowedUDPPorts = [ 6882 ];
|
||||||
};
|
};
|
||||||
virtualisation.oci-containers.containers.qbitvpn = {
|
virtualisation.oci-containers.containers.qbitvpn = {
|
||||||
@@ -40,7 +36,7 @@ in
|
|||||||
DELUGE_DAEMON_LOG_LEVEL = "debug";
|
DELUGE_DAEMON_LOG_LEVEL = "debug";
|
||||||
DELUGE_WEB_LOG_LEVEL = "debug";
|
DELUGE_WEB_LOG_LEVEL = "debug";
|
||||||
};
|
};
|
||||||
environmentFiles = [ "${vars.storage_secrets}/docker/qbitvpn" ];
|
environmentFiles = ["${vars.storage_secrets}/docker/qbitvpn"];
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
39
systems/jeeves/docker/reverse_proxy.nix
Normal file
39
systems/jeeves/docker/reverse_proxy.nix
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
let
|
||||||
|
vars = import ../vars.nix;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
virtualisation.oci-containers.containers = {
|
||||||
|
haproxy = {
|
||||||
|
image = "haproxy:latest";
|
||||||
|
user = "600:600";
|
||||||
|
environment = {
|
||||||
|
TZ = "Etc/EST";
|
||||||
|
};
|
||||||
|
volumes = [
|
||||||
|
"${vars.storage_secrets}/docker/cloudflare.pem:/etc/ssl/certs/cloudflare.pem"
|
||||||
|
"${./haproxy.cfg}:/usr/local/etc/haproxy/haproxy.cfg"
|
||||||
|
];
|
||||||
|
dependsOn = [
|
||||||
|
"audiobookshelf"
|
||||||
|
"filebrowser"
|
||||||
|
"grafana"
|
||||||
|
"photoprism"
|
||||||
|
"uptime_kuma"
|
||||||
|
];
|
||||||
|
extraOptions = [ "--network=web" ];
|
||||||
|
autoStart = true;
|
||||||
|
};
|
||||||
|
cloud_flare_tunnel = {
|
||||||
|
image = "cloudflare/cloudflared:latest";
|
||||||
|
user = "600:600";
|
||||||
|
cmd = [
|
||||||
|
"tunnel"
|
||||||
|
"run"
|
||||||
|
];
|
||||||
|
environmentFiles = ["${vars.storage_secrets}/docker/cloud_flare_tunnel"];
|
||||||
|
dependsOn = [ "haproxy" ];
|
||||||
|
extraOptions = [ "--network=web" ];
|
||||||
|
autoStart = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
let
|
|
||||||
vars = import ../vars.nix;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
virtualisation.oci-containers.containers.share = {
|
|
||||||
image = "ubuntu/apache2:2.4-22.04_beta";
|
|
||||||
ports = [ "8091:80" ];
|
|
||||||
volumes = [
|
|
||||||
"${../../../common/docker_templates}/file_server/sites/:/etc/apache2/sites-enabled/"
|
|
||||||
"${vars.media_share}:/data"
|
|
||||||
];
|
|
||||||
extraOptions = [ "--network=web" ];
|
|
||||||
autoStart = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -4,8 +4,7 @@ in
|
|||||||
{
|
{
|
||||||
virtualisation.oci-containers.containers = {
|
virtualisation.oci-containers.containers = {
|
||||||
uptime_kuma = {
|
uptime_kuma = {
|
||||||
ports = [ "3001:3001" ];
|
image = "louislam/uptime-kuma:latest";
|
||||||
image = "louislam/uptime-kuma:1.23.16-debian";
|
|
||||||
volumes = [
|
volumes = [
|
||||||
"${vars.media_docker_configs}/uptime_kuma:/app/data"
|
"${vars.media_docker_configs}/uptime_kuma:/app/data"
|
||||||
"/var/run/docker.sock:/var/run/docker.sock"
|
"/var/run/docker.sock:/var/run/docker.sock"
|
||||||
|
|||||||
@@ -1,11 +1,6 @@
|
|||||||
|
{ config, lib, modulesPath, ... }:
|
||||||
{
|
{
|
||||||
config,
|
imports =[ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
lib,
|
|
||||||
modulesPath,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
loader = {
|
loader = {
|
||||||
@@ -93,32 +88,22 @@
|
|||||||
bypassWorkqueues = true;
|
bypassWorkqueues = true;
|
||||||
allowDiscards = true;
|
allowDiscards = true;
|
||||||
};
|
};
|
||||||
"luks-storage_pool-wwn-0x5000cca23bc438dd-part1".device =
|
"luks-storage_pool-wwn-0x5000cca23bc438dd-part1".device = "/dev/disk/by-id/wwn-0x5000cca23bc438dd-part1";
|
||||||
"/dev/disk/by-id/wwn-0x5000cca23bc438dd-part1";
|
"luks-storage_pool-wwn-0x5000cca23bd035f5-part1".device = "/dev/disk/by-id/wwn-0x5000cca23bd035f5-part1";
|
||||||
"luks-storage_pool-wwn-0x5000cca23bd035f5-part1".device =
|
"luks-storage_pool-wwn-0x5000cca23bd00ad6-part1".device = "/dev/disk/by-id/wwn-0x5000cca23bd00ad6-part1";
|
||||||
"/dev/disk/by-id/wwn-0x5000cca23bd035f5-part1";
|
"luks-storage_pool-wwn-0x5000cca23bcf313e-part1".device = "/dev/disk/by-id/wwn-0x5000cca23bcf313e-part1";
|
||||||
"luks-storage_pool-wwn-0x5000cca23bd00ad6-part1".device =
|
"luks-storage_pool-wwn-0x5000cca23bcdf3b8-part1".device = "/dev/disk/by-id/wwn-0x5000cca23bcdf3b8-part1";
|
||||||
"/dev/disk/by-id/wwn-0x5000cca23bd00ad6-part1";
|
"luks-storage_pool-wwn-0x5000cca23bd02746-part1".device = "/dev/disk/by-id/wwn-0x5000cca23bd02746-part1";
|
||||||
"luks-storage_pool-wwn-0x5000cca23bcf313e-part1".device =
|
"luks-storage_pool-wwn-0x5000cca23bcf9f89-part1".device = "/dev/disk/by-id/wwn-0x5000cca23bcf9f89-part1";
|
||||||
"/dev/disk/by-id/wwn-0x5000cca23bcf313e-part1";
|
"luks-storage_pool-wwn-0x5000cca23bd00ae9-part1".device = "/dev/disk/by-id/wwn-0x5000cca23bd00ae9-part1";
|
||||||
"luks-storage_pool-wwn-0x5000cca23bcdf3b8-part1".device =
|
|
||||||
"/dev/disk/by-id/wwn-0x5000cca23bcdf3b8-part1";
|
|
||||||
"luks-storage_pool-wwn-0x5000cca23bd02746-part1".device =
|
|
||||||
"/dev/disk/by-id/wwn-0x5000cca23bd02746-part1";
|
|
||||||
"luks-storage_pool-wwn-0x5000cca23bcf9f89-part1".device =
|
|
||||||
"/dev/disk/by-id/wwn-0x5000cca23bcf9f89-part1";
|
|
||||||
"luks-storage_pool-wwn-0x5000cca23bd00ae9-part1".device =
|
|
||||||
"/dev/disk/by-id/wwn-0x5000cca23bd00ae9-part1";
|
|
||||||
# Torrenting pool
|
# Torrenting pool
|
||||||
"luks-torrenting_pool-wwn-0x500a0751e6c3c01e-part1" = {
|
"luks-torrenting_pool-wwn-0x500a0751e6c3c01e-part1" = {
|
||||||
device = "/dev/disk/by-id/wwn-0x500a0751e6c3c01e-part1";
|
device = "/dev/disk/by-id/wwn-0x500a0751e6c3c01e-part1";
|
||||||
bypassWorkqueues = true;
|
bypassWorkqueues = true;
|
||||||
allowDiscards = true;
|
allowDiscards = true;
|
||||||
};
|
};
|
||||||
"luks-torrenting_pool-wwn-0x5000cca264f080a3-part1".device =
|
"luks-torrenting_pool-wwn-0x5000cca264f080a3-part1".device = "/dev/disk/by-id/wwn-0x5000cca264f080a3-part1";
|
||||||
"/dev/disk/by-id/wwn-0x5000cca264f080a3-part1";
|
"luks-torrenting_pool-wwn-0x5000cca298c33ae5-part1".device = "/dev/disk/by-id/wwn-0x5000cca298c33ae5-part1";
|
||||||
"luks-torrenting_pool-wwn-0x5000cca298c33ae5-part1".device =
|
|
||||||
"/dev/disk/by-id/wwn-0x5000cca298c33ae5-part1";
|
|
||||||
# cspell:enable
|
# cspell:enable
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -137,8 +122,8 @@
|
|||||||
fsType = "zfs";
|
fsType = "zfs";
|
||||||
};
|
};
|
||||||
|
|
||||||
"/nix" = {
|
"/nix" =
|
||||||
device = "root_pool/nix";
|
{ device = "root_pool/nix";
|
||||||
fsType = "zfs";
|
fsType = "zfs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
57
systems/jeeves/home_assistant.nix
Normal file
57
systems/jeeves/home_assistant.nix
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
let
|
||||||
|
vars = import ./vars.nix;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
services.home-assistant = {
|
||||||
|
enable = true;
|
||||||
|
openFirewall = true;
|
||||||
|
configDir = vars.media_home_assistant;
|
||||||
|
config = {
|
||||||
|
http = {
|
||||||
|
server_port = 8123;
|
||||||
|
server_host = [
|
||||||
|
"192.168.95.14"
|
||||||
|
"192.168.90.40"
|
||||||
|
"192.168.98.4"
|
||||||
|
];
|
||||||
|
use_x_forwarded_for = true;
|
||||||
|
trusted_proxies = "172.18.0.0/24";
|
||||||
|
};
|
||||||
|
homeassistant = {
|
||||||
|
time_zone = "America/New_York";
|
||||||
|
unit_system = "imperial";
|
||||||
|
temperature_unit = "F";
|
||||||
|
};
|
||||||
|
assist_pipeline = { };
|
||||||
|
backup = { };
|
||||||
|
bluetooth = { };
|
||||||
|
config = { };
|
||||||
|
dhcp = { };
|
||||||
|
energy = { };
|
||||||
|
history = { };
|
||||||
|
homeassistant_alerts = { };
|
||||||
|
image_upload = { };
|
||||||
|
logbook = { };
|
||||||
|
media_source = { };
|
||||||
|
mobile_app = { };
|
||||||
|
ssdp = { };
|
||||||
|
sun = { };
|
||||||
|
webhook = { };
|
||||||
|
zeroconf = { };
|
||||||
|
automation = "!include automations.yaml";
|
||||||
|
script = "!include scripts.yaml";
|
||||||
|
scene = "!include scenes.yaml";
|
||||||
|
group = "!include groups.yaml";
|
||||||
|
};
|
||||||
|
extraPackages =
|
||||||
|
python3Packages: with python3Packages; [
|
||||||
|
psycopg2
|
||||||
|
gtts
|
||||||
|
aioesphomeapi
|
||||||
|
esphome-dashboard-api
|
||||||
|
bleak-esphome
|
||||||
|
pymetno
|
||||||
|
];
|
||||||
|
extraComponents = [ "isal" ];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -7,12 +7,25 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
systemd.network = {
|
systemd.network = {
|
||||||
|
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
netdevs = {
|
||||||
|
"20-ioit-vlan" = {
|
||||||
|
netdevConfig = {
|
||||||
|
Kind = "vlan";
|
||||||
|
Name = "ioit-vlan";
|
||||||
|
};
|
||||||
|
vlanConfig.Id = 20;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
networks = {
|
networks = {
|
||||||
"10-1GB_Primary" = {
|
"10-1GB_Primary" = {
|
||||||
matchConfig.Name = "enp98s0f0";
|
matchConfig.Name = "enp98s0f0";
|
||||||
address = [ "192.168.95.14/24" ];
|
address = [ "192.168.95.14/24" ];
|
||||||
routes = [ { Gateway = "192.168.95.1"; } ];
|
routes = [{ Gateway = "192.168.95.1"; }];
|
||||||
|
vlan = [ "ioit-vlan" ];
|
||||||
linkConfig.RequiredForOnline = "routable";
|
linkConfig.RequiredForOnline = "routable";
|
||||||
};
|
};
|
||||||
"10-1GB_Secondary" = {
|
"10-1GB_Secondary" = {
|
||||||
@@ -28,6 +41,15 @@
|
|||||||
matchConfig.Name = "enp97s0f1np1";
|
matchConfig.Name = "enp97s0f1np1";
|
||||||
DHCP = "yes";
|
DHCP = "yes";
|
||||||
};
|
};
|
||||||
|
"40-ioit-vlan" = {
|
||||||
|
matchConfig.Name = "ioit-vlan";
|
||||||
|
DHCP = "yes";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.zerotierone = {
|
||||||
|
enable = true;
|
||||||
|
joinNetworks = [ "e4da7455b2ae64ca" ];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
29
systems/jeeves/runner.nix
Normal file
29
systems/jeeves/runner.nix
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
let
|
||||||
|
vars = import ./vars.nix;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
users = {
|
||||||
|
users.github-runners = {
|
||||||
|
isSystemUser = true;
|
||||||
|
group = "github-runners";
|
||||||
|
uid = 601;
|
||||||
|
};
|
||||||
|
groups.github-runners = {
|
||||||
|
gid = 601;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.github-runners.nix_builder = {
|
||||||
|
enable = true;
|
||||||
|
replace = true;
|
||||||
|
workDir = "/zfs/media/github-runners/nix_builder/";
|
||||||
|
url = "https://github.com/RichieCahill/dotfiles";
|
||||||
|
extraLabels = [ "nixos" ];
|
||||||
|
tokenFile = "${vars.storage_secrets}/services/github_runners/nix_builder";
|
||||||
|
user = "github-runners";
|
||||||
|
group = "github-runners";
|
||||||
|
extraPackages = [ pkgs.nixos-rebuild ];
|
||||||
|
# extraEnvironment
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
imports = [ ./nix_builder.nix ];
|
|
||||||
|
|
||||||
users = {
|
|
||||||
users.github-runners = {
|
|
||||||
shell = pkgs.bash;
|
|
||||||
isSystemUser = true;
|
|
||||||
group = "github-runners";
|
|
||||||
uid = 601;
|
|
||||||
openssh.authorizedKeys.keys = [
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA/S8i+BNX/12JNKg+5EKGX7Aqimt5KM+ve3wt/SyWuO github-runners" # cspell:disable-line
|
|
||||||
];
|
|
||||||
};
|
|
||||||
groups.github-runners.gid = 601;
|
|
||||||
};
|
|
||||||
|
|
||||||
services.nix_builder.containers = {
|
|
||||||
nix-builder-0.enable = true;
|
|
||||||
nix-builder-1.enable = true;
|
|
||||||
nix-builder-2.enable = true;
|
|
||||||
nix-builder-3.enable = true;
|
|
||||||
nix-builder-4.enable = true;
|
|
||||||
nix-builder-5.enable = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,101 +0,0 @@
|
|||||||
{ config, lib, ... }:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
let
|
|
||||||
vars = import ../vars.nix;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.services.nix_builder.containers = mkOption {
|
|
||||||
type = types.attrsOf (
|
|
||||||
types.submodule (
|
|
||||||
{ name, ... }:
|
|
||||||
{
|
|
||||||
options.enable = mkEnableOption "GitHub runner container";
|
|
||||||
}
|
|
||||||
)
|
|
||||||
);
|
|
||||||
default = { };
|
|
||||||
description = "GitHub runner container configurations";
|
|
||||||
};
|
|
||||||
|
|
||||||
config.containers = mapAttrs (
|
|
||||||
name: cfg:
|
|
||||||
mkIf cfg.enable {
|
|
||||||
autoStart = true;
|
|
||||||
bindMounts = {
|
|
||||||
"/storage" = {
|
|
||||||
mountPoint = "/zfs/media/github-runners/${name}";
|
|
||||||
isReadOnly = false;
|
|
||||||
};
|
|
||||||
"/secrets".mountPoint = "${vars.storage_secrets}/services/github-runners/${name}";
|
|
||||||
"ssh-keys".mountPoint = "${vars.storage_secrets}/services/github-runners/id_ed25519_github-runners";
|
|
||||||
};
|
|
||||||
config =
|
|
||||||
{
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
nix.settings = {
|
|
||||||
trusted-substituters = [
|
|
||||||
"https://cache.nixos.org"
|
|
||||||
"https://cache.tmmworkshop.com"
|
|
||||||
"https://nix-community.cachix.org"
|
|
||||||
];
|
|
||||||
substituters = [
|
|
||||||
"https://cache.nixos.org/?priority=2&want-mass-query=true"
|
|
||||||
"https://cache.tmmworkshop.com/?priority=2&want-mass-query=true"
|
|
||||||
"https://nix-community.cachix.org/?priority=10&want-mass-query=true"
|
|
||||||
];
|
|
||||||
trusted-public-keys = [
|
|
||||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
|
||||||
"cache.tmmworkshop.com:jHffkpgbmEdstQPoihJPYW9TQe6jnQbWR2LqkNGV3iA="
|
|
||||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
|
||||||
];
|
|
||||||
experimental-features = [
|
|
||||||
"flakes"
|
|
||||||
"nix-command"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
programs.ssh.extraConfig = ''
|
|
||||||
Host jeeves
|
|
||||||
Port 629
|
|
||||||
User github-runners
|
|
||||||
HostName 192.168.95.14
|
|
||||||
IdentityFile ${vars.storage_secrets}/services/github-runners/id_ed25519_github-runners
|
|
||||||
StrictHostKeyChecking no
|
|
||||||
UserKnownHostsFile /dev/null
|
|
||||||
'';
|
|
||||||
services.github-runners.${name} = {
|
|
||||||
enable = true;
|
|
||||||
replace = true;
|
|
||||||
workDir = "/zfs/media/github-runners/${name}";
|
|
||||||
url = "https://github.com/RichieCahill/dotfiles";
|
|
||||||
extraLabels = [ "nixos" ];
|
|
||||||
tokenFile = "${vars.storage_secrets}/services/github-runners/${name}";
|
|
||||||
user = "github-runners";
|
|
||||||
group = "github-runners";
|
|
||||||
extraPackages = with pkgs; [
|
|
||||||
nixfmt-rfc-style
|
|
||||||
nixos-rebuild
|
|
||||||
openssh
|
|
||||||
treefmt
|
|
||||||
];
|
|
||||||
};
|
|
||||||
users = {
|
|
||||||
users.github-runners = {
|
|
||||||
shell = pkgs.bash;
|
|
||||||
isSystemUser = true;
|
|
||||||
group = "github-runners";
|
|
||||||
uid = 601;
|
|
||||||
};
|
|
||||||
groups.github-runners.gid = 601;
|
|
||||||
};
|
|
||||||
system.stateVersion = "24.11";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
) config.services.nix_builder.containers;
|
|
||||||
}
|
|
||||||
@@ -19,11 +19,11 @@ sudo zpool add torrenting -o ashift=12 special
|
|||||||
sudo zfs create -o compression=zstd-9 media/docker
|
sudo zfs create -o compression=zstd-9 media/docker
|
||||||
sudo zfs create -o recordsize=1M -o compression=zstd-19 media/library
|
sudo zfs create -o recordsize=1M -o compression=zstd-19 media/library
|
||||||
sudo zfs create -o compression=zstd-9 -o sync=disabled media/github-runners
|
sudo zfs create -o compression=zstd-9 -o sync=disabled media/github-runners
|
||||||
|
sudo zfs create -o exec=off media/minio
|
||||||
sudo zfs create -o copies=3 media/notes
|
sudo zfs create -o copies=3 media/notes
|
||||||
|
sudo zfs create -o recordsize=16k -o primarycache=metadata -o mountpoint=/zfs/media/database/photoprism_mariadb media/photoprism_mariadb
|
||||||
sudo zfs create -o compression=zstd-9 media/plex
|
sudo zfs create -o compression=zstd-9 media/plex
|
||||||
sudo zfs create -o compression=zstd-9 media/services
|
|
||||||
sudo zfs create -o compression=zstd-19 media/home_assistant
|
sudo zfs create -o compression=zstd-19 media/home_assistant
|
||||||
sudo zfs create -o exec=off media/share
|
|
||||||
sudo zfs create -o recordsize=16k -o primarycache=metadata -o mountpoint=/zfs/media/database/postgres media/postgres
|
sudo zfs create -o recordsize=16k -o primarycache=metadata -o mountpoint=/zfs/media/database/postgres media/postgres
|
||||||
|
|
||||||
# storage datasets
|
# storage datasets
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
vars = import ../vars.nix;
|
vars = import ./vars.nix;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
systemd = {
|
systemd = {
|
||||||
@@ -13,7 +13,7 @@ in
|
|||||||
description = "maintains /zfs/storage/plex permissions";
|
description = "maintains /zfs/storage/plex permissions";
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
ExecStart = "${pkgs.bash}/bin/bash ${../scripts/plex_permission.sh}";
|
ExecStart = "${pkgs.bash}/bin/bash ${./scripts/plex_permission.sh}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
startup_validation = {
|
startup_validation = {
|
||||||
@@ -25,7 +25,7 @@ in
|
|||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
EnvironmentFile = "${vars.storage_secrets}/services/server-validation";
|
EnvironmentFile = "${vars.storage_secrets}/services/server-validation";
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
ExecStart = "${inputs.system_tools.packages.x86_64-linux.default}/bin/validate_system --config-file='${./validate_system.toml}'";
|
ExecStart = "${inputs.system_tools.packages.x86_64-linux.default}/bin/validate_jeeves";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
{ lib, ... }:
|
|
||||||
let
|
|
||||||
vars = import ../vars.nix;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
services.audiobookshelf.enable = true;
|
|
||||||
systemd.services.audiobookshelf.serviceConfig.WorkingDirectory =
|
|
||||||
lib.mkForce "${vars.media_docker_configs}/audiobookshelf";
|
|
||||||
users.users.audiobookshelf.home = lib.mkForce "${vars.media_docker_configs}/audiobookshelf";
|
|
||||||
}
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
{ pkgs, ... }:
|
|
||||||
let
|
|
||||||
vars = import ../vars.nix;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
systemd.services.cloud_flare_tunnel = {
|
|
||||||
description = "cloud_flare_tunnel proxy's traffic through cloudflare";
|
|
||||||
after = [ "network.target" ];
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
serviceConfig = {
|
|
||||||
Type = "simple";
|
|
||||||
EnvironmentFile = "${vars.storage_secrets}/docker/cloud_flare_tunnel";
|
|
||||||
ExecStart = "${pkgs.cloudflared}/bin/cloudflared --no-autoupdate tunnel run";
|
|
||||||
Restart = "on-failure";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{ lib, ... }:
|
|
||||||
{
|
|
||||||
imports =
|
|
||||||
let
|
|
||||||
files = builtins.attrNames (builtins.readDir ./.);
|
|
||||||
nixFiles = builtins.filter (name: lib.hasSuffix ".nix" name && name != "default.nix") files;
|
|
||||||
in
|
|
||||||
map (file: ./. + "/${file}") nixFiles;
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
let
|
|
||||||
vars = import ../vars.nix;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
services.duckdns = {
|
|
||||||
enable = true;
|
|
||||||
tokenFile = "${vars.storage_secrets}/services/duckdns/token";
|
|
||||||
domainsFile = "${vars.storage_secrets}/services/duckdns/domains";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
{
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
vars = import ../vars.nix;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
systemd.services.filebrowser = {
|
|
||||||
description = "filebrowser";
|
|
||||||
after = [ "network.target" ];
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
serviceConfig = {
|
|
||||||
Type = "simple";
|
|
||||||
User = "richie";
|
|
||||||
Group = "users";
|
|
||||||
ExecStart = "${pkgs.filebrowser}/bin/filebrowser --root=/zfs --address=0.0.0.0 --database=${vars.media_docker_configs}/filebrowser/filebrowser.db";
|
|
||||||
Restart = "on-failure";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
{
|
|
||||||
networking.firewall.allowedTCPPorts = [
|
|
||||||
80
|
|
||||||
443
|
|
||||||
];
|
|
||||||
|
|
||||||
services.haproxy = {
|
|
||||||
enable = true;
|
|
||||||
config = builtins.readFile ./haproxy.cfg;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,70 +0,0 @@
|
|||||||
let
|
|
||||||
vars = import ../vars.nix;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
services = {
|
|
||||||
home-assistant = {
|
|
||||||
enable = true;
|
|
||||||
openFirewall = true;
|
|
||||||
configDir = vars.media_home_assistant;
|
|
||||||
config = {
|
|
||||||
http = {
|
|
||||||
server_port = 8123;
|
|
||||||
server_host = [
|
|
||||||
"192.168.95.14"
|
|
||||||
"192.168.90.40"
|
|
||||||
"127.0.0.1"
|
|
||||||
];
|
|
||||||
use_x_forwarded_for = true;
|
|
||||||
trusted_proxies = "127.0.0.1";
|
|
||||||
};
|
|
||||||
homeassistant = {
|
|
||||||
time_zone = "America/New_York";
|
|
||||||
unit_system = "us_customary";
|
|
||||||
temperature_unit = "F";
|
|
||||||
};
|
|
||||||
assist_pipeline = { };
|
|
||||||
backup = { };
|
|
||||||
bluetooth = { };
|
|
||||||
config = { };
|
|
||||||
dhcp = { };
|
|
||||||
energy = { };
|
|
||||||
history = { };
|
|
||||||
homeassistant_alerts = { };
|
|
||||||
image_upload = { };
|
|
||||||
logbook = { };
|
|
||||||
media_source = { };
|
|
||||||
mobile_app = { };
|
|
||||||
ssdp = { };
|
|
||||||
sun = { };
|
|
||||||
webhook = { };
|
|
||||||
zeroconf = { };
|
|
||||||
automation = "!include automations.yaml";
|
|
||||||
script = "!include scripts.yaml";
|
|
||||||
scene = "!include scenes.yaml";
|
|
||||||
group = "!include groups.yaml";
|
|
||||||
};
|
|
||||||
extraPackages =
|
|
||||||
python3Packages: with python3Packages; [
|
|
||||||
aioesphomeapi
|
|
||||||
aiounifi
|
|
||||||
bleak-esphome
|
|
||||||
esphome-dashboard-api
|
|
||||||
gtts
|
|
||||||
jellyfin-apiclient-python
|
|
||||||
psycopg2
|
|
||||||
pymetno
|
|
||||||
pyownet
|
|
||||||
rokuecp
|
|
||||||
uiprotect
|
|
||||||
wakeonlan
|
|
||||||
];
|
|
||||||
extraComponents = [ "isal" ];
|
|
||||||
};
|
|
||||||
esphome = {
|
|
||||||
enable = true;
|
|
||||||
openFirewall = true;
|
|
||||||
address = "192.168.90.40";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
let
|
|
||||||
vars = import ../vars.nix;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
services.jellyfin = {
|
|
||||||
enable = true;
|
|
||||||
openFirewall = true;
|
|
||||||
dataDir = "${vars.media_services}/jellyfin";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
let
|
|
||||||
vars = import ../vars.nix;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
services.nix-serve = {
|
|
||||||
enable = true;
|
|
||||||
secretKeyFile = "${vars.storage_secrets}/services/nix-cache/cache-priv-key.pem";
|
|
||||||
openFirewall = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,127 +0,0 @@
|
|||||||
{ pkgs, ... }:
|
|
||||||
let
|
|
||||||
vars = import ../vars.nix;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
networking.firewall.allowedTCPPorts = [ 5432 ];
|
|
||||||
|
|
||||||
services.postgresql = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.postgresql_17_jit;
|
|
||||||
enableTCPIP = true;
|
|
||||||
enableJIT = true;
|
|
||||||
dataDir = "${vars.media_database}/postgres";
|
|
||||||
|
|
||||||
authentication = pkgs.lib.mkOverride 10 ''
|
|
||||||
|
|
||||||
#type database DBuser origin-address auth-method
|
|
||||||
local all all trust
|
|
||||||
|
|
||||||
# ipv4
|
|
||||||
host all all 127.0.0.1/32 trust
|
|
||||||
host all all 192.168.90.1/24 trust
|
|
||||||
|
|
||||||
# ipv6
|
|
||||||
host all all ::1/128 trust
|
|
||||||
'';
|
|
||||||
|
|
||||||
identMap = ''
|
|
||||||
# ArbitraryMapName systemUser DBUser
|
|
||||||
superuser_map root postgres
|
|
||||||
superuser_map postgres postgres
|
|
||||||
# Let other names login as themselves
|
|
||||||
superuser_map richie postgres
|
|
||||||
'';
|
|
||||||
ensureUsers = [
|
|
||||||
{
|
|
||||||
name = "postgres";
|
|
||||||
ensureClauses = {
|
|
||||||
superuser = true;
|
|
||||||
login = true;
|
|
||||||
createrole = true;
|
|
||||||
createdb = true;
|
|
||||||
replication = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "richie";
|
|
||||||
ensureClauses = {
|
|
||||||
superuser = true;
|
|
||||||
login = true;
|
|
||||||
createrole = true;
|
|
||||||
createdb = true;
|
|
||||||
replication = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
# Thank you NotAShelf
|
|
||||||
# https://github.com/NotAShelf/nyx/blob/d407b4d6e5ab7f60350af61a3d73a62a5e9ac660/modules/core/roles/server/system/services/databases/postgresql.nix#L74
|
|
||||||
settings = {
|
|
||||||
# Connectivity;
|
|
||||||
max_connections = 100;
|
|
||||||
superuser_reserved_connections = 3;
|
|
||||||
|
|
||||||
# Memory Settings;
|
|
||||||
shared_buffers = "1024 MB";
|
|
||||||
work_mem = "32 MB";
|
|
||||||
maintenance_work_mem = "320 MB";
|
|
||||||
huge_pages = "off";
|
|
||||||
effective_cache_size = "2 GB";
|
|
||||||
effective_io_concurrency = 100; # concurrent IO only really activated if OS supports posix_fadvise function;
|
|
||||||
random_page_cost = 1.25; # speed of random disk access relative to sequential access (1.0);
|
|
||||||
|
|
||||||
# Monitoring;
|
|
||||||
shared_preload_libraries = "pg_stat_statements,auto_explain"; # per statement resource usage stats & log explain statements for slow queries
|
|
||||||
track_io_timing = "on"; # measure exact block IO times;
|
|
||||||
track_functions = "pl"; # track execution times of pl-language procedures if any;
|
|
||||||
# Replication;
|
|
||||||
wal_level = "replica"; # consider using at least "replica";
|
|
||||||
max_wal_senders = 0;
|
|
||||||
synchronous_commit = "on";
|
|
||||||
|
|
||||||
# Checkpointing: ;
|
|
||||||
checkpoint_timeout = "15 min";
|
|
||||||
checkpoint_completion_target = 0.9;
|
|
||||||
max_wal_size = "1024 MB";
|
|
||||||
min_wal_size = "512 MB";
|
|
||||||
|
|
||||||
# WAL writing;
|
|
||||||
wal_compression = "on";
|
|
||||||
wal_buffers = -1; # auto-tuned by Postgres till maximum of segment size (16MB by default);
|
|
||||||
wal_writer_delay = "200ms";
|
|
||||||
wal_writer_flush_after = "1MB";
|
|
||||||
|
|
||||||
# Background writer;
|
|
||||||
bgwriter_delay = "200ms";
|
|
||||||
bgwriter_lru_maxpages = 100;
|
|
||||||
bgwriter_lru_multiplier = 2.0;
|
|
||||||
bgwriter_flush_after = 0;
|
|
||||||
|
|
||||||
# Parallel queries: ;
|
|
||||||
max_worker_processes = 6;
|
|
||||||
max_parallel_workers_per_gather = 3;
|
|
||||||
max_parallel_maintenance_workers = 3;
|
|
||||||
max_parallel_workers = 6;
|
|
||||||
parallel_leader_participation = "on";
|
|
||||||
|
|
||||||
# Advanced features ;
|
|
||||||
enable_partitionwise_join = "on";
|
|
||||||
enable_partitionwise_aggregate = "on";
|
|
||||||
jit = "on";
|
|
||||||
|
|
||||||
jit_above_cost = 100000;
|
|
||||||
jit_inline_above_cost = 150000;
|
|
||||||
jit_optimize_above_cost = 500000;
|
|
||||||
|
|
||||||
# log slow queries
|
|
||||||
log_min_duration_statement = 100;
|
|
||||||
"auto_explain.log_min_duration" = 100;
|
|
||||||
|
|
||||||
# logging configuration
|
|
||||||
log_connections = true;
|
|
||||||
log_statement = "all";
|
|
||||||
logging_collector = true;
|
|
||||||
log_disconnections = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
zpool = ["root_pool", "storage", "torrenting", "media"]
|
|
||||||
services = [
|
|
||||||
"audiobookshelf",
|
|
||||||
"cloud_flare_tunnel",
|
|
||||||
"haproxy",
|
|
||||||
"docker-qbit",
|
|
||||||
"docker-qbitvpn",
|
|
||||||
"docker-uptime_kuma",
|
|
||||||
"docker",
|
|
||||||
"filebrowser",
|
|
||||||
"home-assistant",
|
|
||||||
"jellyfin",
|
|
||||||
]
|
|
||||||
@@ -2,18 +2,13 @@ let
|
|||||||
vars = import ./vars.nix;
|
vars = import ./vars.nix;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
networking.firewall.allowedTCPPorts = [ 8384 ];
|
|
||||||
|
|
||||||
services.syncthing = {
|
services.syncthing = {
|
||||||
guiAddress = "192.168.90.40:8384";
|
guiAddress = "192.168.90.40:8384";
|
||||||
settings = {
|
settings.folders = {
|
||||||
devices.davids-server.id = "7GXTDGR-AOXFW2O-K6J7NM3-XYZNRRW-AKHAFWM-GBOWUPQ-OA6JIWD-ER7RDQL"; # cspell:disable-line
|
"bob_temp" = {
|
||||||
folders = {
|
path = "${vars.storage_syncthing}/bob_temp";
|
||||||
"dotfiles" = {
|
|
||||||
path = "/home/richie/dotfiles";
|
|
||||||
devices = [
|
devices = [
|
||||||
"bob"
|
"jeeves"
|
||||||
"rhapsody-in-green"
|
|
||||||
];
|
];
|
||||||
fsWatcherEnabled = true;
|
fsWatcherEnabled = true;
|
||||||
};
|
};
|
||||||
@@ -21,8 +16,8 @@ in
|
|||||||
id = "l62ul-lpweo"; # cspell:disable-line
|
id = "l62ul-lpweo"; # cspell:disable-line
|
||||||
path = vars.media_notes;
|
path = vars.media_notes;
|
||||||
devices = [
|
devices = [
|
||||||
|
"bob"
|
||||||
"rhapsody-in-green"
|
"rhapsody-in-green"
|
||||||
"davids-server"
|
|
||||||
];
|
];
|
||||||
fsWatcherEnabled = true;
|
fsWatcherEnabled = true;
|
||||||
};
|
};
|
||||||
@@ -51,6 +46,7 @@ in
|
|||||||
id = "vyma6-lqqrz"; # cspell:disable-line
|
id = "vyma6-lqqrz"; # cspell:disable-line
|
||||||
path = "${vars.storage_syncthing}/projects";
|
path = "${vars.storage_syncthing}/projects";
|
||||||
devices = [
|
devices = [
|
||||||
|
"bob"
|
||||||
"rhapsody-in-green"
|
"rhapsody-in-green"
|
||||||
];
|
];
|
||||||
fsWatcherEnabled = true;
|
fsWatcherEnabled = true;
|
||||||
@@ -62,68 +58,6 @@ in
|
|||||||
];
|
];
|
||||||
fsWatcherEnabled = true;
|
fsWatcherEnabled = true;
|
||||||
};
|
};
|
||||||
"vault" = {
|
|
||||||
path = "/home/richie/vault";
|
|
||||||
devices = [
|
|
||||||
"rhapsody-in-green"
|
|
||||||
"davids-server"
|
|
||||||
];
|
|
||||||
fsWatcherEnabled = true;
|
|
||||||
};
|
|
||||||
"backup" = {
|
|
||||||
path = "${vars.storage_syncthing}/backup";
|
|
||||||
devices = [
|
|
||||||
"davids-server"
|
|
||||||
];
|
|
||||||
fsWatcherEnabled = true;
|
|
||||||
};
|
|
||||||
#
|
|
||||||
"davids-backup1" = {
|
|
||||||
id = "8229p-8z3tm"; # cspell:disable-line
|
|
||||||
path = "${vars.storage_syncthing}/davids_backups/1";
|
|
||||||
devices = [
|
|
||||||
"davids-server"
|
|
||||||
];
|
|
||||||
fsWatcherEnabled = true;
|
|
||||||
type = "receiveencrypted";
|
|
||||||
};
|
|
||||||
"davids-backup2" = {
|
|
||||||
id = "iciw3-dp6ao"; # cspell:disable-line
|
|
||||||
path = "${vars.storage_syncthing}/davids_backups/2";
|
|
||||||
devices = [
|
|
||||||
"davids-server"
|
|
||||||
];
|
|
||||||
fsWatcherEnabled = true;
|
|
||||||
type = "receiveencrypted";
|
|
||||||
};
|
|
||||||
"davids-backup3" = {
|
|
||||||
id = "9si6m-bnkjb"; # cspell:disable-line
|
|
||||||
path = "${vars.storage_syncthing}/davids_backups/3";
|
|
||||||
devices = [
|
|
||||||
"davids-server"
|
|
||||||
];
|
|
||||||
fsWatcherEnabled = true;
|
|
||||||
type = "receiveencrypted";
|
|
||||||
};
|
|
||||||
"davids-backup4" = {
|
|
||||||
id = "qjyfy-uupj4"; # cspell:disable-line
|
|
||||||
path = "${vars.storage_syncthing}/davids_backups/4";
|
|
||||||
devices = [
|
|
||||||
"davids-server"
|
|
||||||
];
|
|
||||||
fsWatcherEnabled = true;
|
|
||||||
type = "receiveencrypted";
|
|
||||||
};
|
|
||||||
"davids-backup5" = {
|
|
||||||
id = "fm4h5-emsu2"; # cspell:disable-line
|
|
||||||
path = "${vars.storage_syncthing}/davids_backups/5";
|
|
||||||
devices = [
|
|
||||||
"davids-server"
|
|
||||||
];
|
|
||||||
fsWatcherEnabled = true;
|
|
||||||
type = "receiveencrypted";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,8 +10,6 @@ in
|
|||||||
media_docker = "${zfs_media}/docker";
|
media_docker = "${zfs_media}/docker";
|
||||||
media_docker_configs = "${zfs_media}/docker/configs";
|
media_docker_configs = "${zfs_media}/docker/configs";
|
||||||
media_mirror = "${zfs_media}/mirror";
|
media_mirror = "${zfs_media}/mirror";
|
||||||
media_share = "${zfs_media}/share";
|
|
||||||
media_services = "${zfs_media}/services";
|
|
||||||
media_notes = "${zfs_media}/notes";
|
media_notes = "${zfs_media}/notes";
|
||||||
media_plex = "${zfs_media}/plex";
|
media_plex = "${zfs_media}/plex";
|
||||||
media_home_assistant = "${zfs_media}/home_assistant";
|
media_home_assistant = "${zfs_media}/home_assistant";
|
||||||
|
|||||||
62
systems/muninn/default.nix
Normal file
62
systems/muninn/default.nix
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
{ inputs, pkgs, ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
../../users/gaming
|
||||||
|
../../users/richie
|
||||||
|
../../common/global
|
||||||
|
../../common/optional/desktop.nix
|
||||||
|
../../common/optional/steam.nix
|
||||||
|
../../common/optional/systemd-boot.nix
|
||||||
|
../../common/optional/update.nix
|
||||||
|
./hardware.nix
|
||||||
|
inputs.nixos-hardware.nixosModules.framework-11th-gen-intel
|
||||||
|
];
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
plex-media-player
|
||||||
|
];
|
||||||
|
|
||||||
|
networking = {
|
||||||
|
hostName = "muninn";
|
||||||
|
hostId = "a43179c5";
|
||||||
|
firewall.enable = true;
|
||||||
|
networkmanager.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
hardware = {
|
||||||
|
pulseaudio.enable = false;
|
||||||
|
bluetooth = {
|
||||||
|
enable = true;
|
||||||
|
powerOnBoot = true;
|
||||||
|
settings.General.ControllerMode = "bredr";
|
||||||
|
};
|
||||||
|
firmware = [ pkgs.sof-firmware ];
|
||||||
|
};
|
||||||
|
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
|
||||||
|
services = {
|
||||||
|
displayManager = {
|
||||||
|
enable = true;
|
||||||
|
autoLogin = {
|
||||||
|
user = "gaming";
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
defaultSession = "steam";
|
||||||
|
# defaultSession = "plasma";
|
||||||
|
};
|
||||||
|
|
||||||
|
openssh.ports = [ 295 ];
|
||||||
|
|
||||||
|
printing.enable = true;
|
||||||
|
|
||||||
|
snapshot_manager.enable = true;
|
||||||
|
|
||||||
|
zfs = {
|
||||||
|
trim.enable = true;
|
||||||
|
autoScrub.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
system.stateVersion = "24.05";
|
||||||
|
}
|
||||||
63
systems/muninn/hardware.nix
Normal file
63
systems/muninn/hardware.nix
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
{ config, lib, modulesPath, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
|
|
||||||
|
boot = {
|
||||||
|
initrd = {
|
||||||
|
availableKernelModules = [
|
||||||
|
"nvme"
|
||||||
|
"xhci_pci"
|
||||||
|
"thunderbolt"
|
||||||
|
"usb_storage"
|
||||||
|
"sd_mod"
|
||||||
|
];
|
||||||
|
kernelModules = [ ];
|
||||||
|
luks.devices."luks-root-pool-nvme-INTEL_SSDPEKKW256G7_BTPY63820XBH256D-part2" = {
|
||||||
|
device = "/dev/disk/by-id/nvme-INTEL_SSDPEKKW256G7_BTPY63820XBH256D-part2";
|
||||||
|
bypassWorkqueues = true;
|
||||||
|
allowDiscards = true;
|
||||||
|
keyFileSize = 4096;
|
||||||
|
keyFile = "/dev/disk/by-id/usb-SanDisk_Ultra_T_C_4C530001020919102244-0:0";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
kernelModules = [ "kvm-intel" ];
|
||||||
|
extraModulePackages = [ ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems = {
|
||||||
|
"/" = lib.mkDefault {
|
||||||
|
device = "root_pool/root";
|
||||||
|
fsType = "zfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
"/home" = {
|
||||||
|
device = "root_pool/home";
|
||||||
|
fsType = "zfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
"/nix" = {
|
||||||
|
device = "root_pool/nix";
|
||||||
|
fsType = "zfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
"/var" = {
|
||||||
|
device = "root_pool/var";
|
||||||
|
fsType = "zfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
"/boot" = {
|
||||||
|
device = "/dev/disk/by-uuid/12CE-A600";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = [
|
||||||
|
"fmask=0077"
|
||||||
|
"dmask=0077"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [ ];
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
||||||
@@ -22,8 +22,28 @@
|
|||||||
networkmanager.enable = true;
|
networkmanager.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
hardware = {
|
||||||
|
pulseaudio.enable = false;
|
||||||
|
bluetooth = {
|
||||||
|
enable = true;
|
||||||
|
powerOnBoot = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
|
|
||||||
openssh.ports = [ 922 ];
|
openssh.ports = [ 922 ];
|
||||||
|
|
||||||
|
printing.enable = true;
|
||||||
|
|
||||||
|
snapshot_manager.enable = true;
|
||||||
|
|
||||||
|
zfs = {
|
||||||
|
trim.enable = true;
|
||||||
|
autoScrub.enable = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
system.stateVersion = "24.05";
|
system.stateVersion = "24.05";
|
||||||
|
|||||||
@@ -1,9 +1,4 @@
|
|||||||
{
|
{ config, lib, modulesPath, ... }:
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
modulesPath,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
{
|
||||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +1,10 @@
|
|||||||
{
|
{
|
||||||
services.syncthing.settings.folders = {
|
services.syncthing.settings.folders = {
|
||||||
"dotfiles" = {
|
|
||||||
path = "/home/richie/dotfiles";
|
|
||||||
devices = [
|
|
||||||
"jeeves"
|
|
||||||
"bob"
|
|
||||||
];
|
|
||||||
fsWatcherEnabled = true;
|
|
||||||
};
|
|
||||||
"notes" = {
|
"notes" = {
|
||||||
id = "l62ul-lpweo"; # cspell:disable-line
|
id = "l62ul-lpweo"; # cspell:disable-line
|
||||||
path = "/home/richie/notes";
|
path = "/home/richie/notes";
|
||||||
devices = [
|
devices = [
|
||||||
|
"bob"
|
||||||
"jeeves"
|
"jeeves"
|
||||||
];
|
];
|
||||||
fsWatcherEnabled = true;
|
fsWatcherEnabled = true;
|
||||||
@@ -41,6 +34,7 @@
|
|||||||
id = "vyma6-lqqrz"; # cspell:disable-line
|
id = "vyma6-lqqrz"; # cspell:disable-line
|
||||||
path = "/home/richie/projects";
|
path = "/home/richie/projects";
|
||||||
devices = [
|
devices = [
|
||||||
|
"bob"
|
||||||
"jeeves"
|
"jeeves"
|
||||||
];
|
];
|
||||||
fsWatcherEnabled = true;
|
fsWatcherEnabled = true;
|
||||||
@@ -56,7 +50,7 @@
|
|||||||
"vault" = {
|
"vault" = {
|
||||||
path = "/home/richie/vault";
|
path = "/home/richie/vault";
|
||||||
devices = [
|
devices = [
|
||||||
"jeeves"
|
"bob"
|
||||||
];
|
];
|
||||||
fsWatcherEnabled = true;
|
fsWatcherEnabled = true;
|
||||||
};
|
};
|
||||||
|
|||||||
229
tools/installer.py
Normal file
229
tools/installer.py
Normal file
@@ -0,0 +1,229 @@
|
|||||||
|
"""Install NixOS on a ZFS pool."""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import logging
|
||||||
|
import sys
|
||||||
|
from os import getenv
|
||||||
|
from pathlib import Path
|
||||||
|
from random import getrandbits
|
||||||
|
from subprocess import PIPE, Popen, run
|
||||||
|
from time import sleep
|
||||||
|
from typing import TYPE_CHECKING
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from collections.abc import Sequence
|
||||||
|
|
||||||
|
|
||||||
|
def configure_logger(level: str = "INFO") -> None:
|
||||||
|
"""Configure the logger.
|
||||||
|
Args:
|
||||||
|
level (str, optional): The logging level. Defaults to "INFO".
|
||||||
|
"""
|
||||||
|
logging.basicConfig(
|
||||||
|
level=level,
|
||||||
|
datefmt="%Y-%m-%dT%H:%M:%S%z",
|
||||||
|
format="%(asctime)s %(levelname)s %(filename)s:%(lineno)d - %(message)s",
|
||||||
|
handlers=[logging.StreamHandler(sys.stdout)],
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def bash_wrapper(command: str) -> str:
|
||||||
|
"""Execute a bash command and capture the output.
|
||||||
|
Args:
|
||||||
|
command (str): The bash command to be executed.
|
||||||
|
Returns:
|
||||||
|
Tuple[str, int]: A tuple containing the output of the command (stdout) as a string,
|
||||||
|
the error output (stderr) as a string (optional), and the return code as an integer.
|
||||||
|
"""
|
||||||
|
logging.debug(f"running {command=}")
|
||||||
|
# This is a acceptable risk
|
||||||
|
process = Popen(command.split(), stdout=PIPE, stderr=PIPE) # noqa: S603
|
||||||
|
output, _ = process.communicate()
|
||||||
|
if process.returncode != 0:
|
||||||
|
error = f"Failed to run command {command=} return code {process.returncode=}"
|
||||||
|
raise RuntimeError(error)
|
||||||
|
|
||||||
|
return output.decode()
|
||||||
|
|
||||||
|
|
||||||
|
def partition_disk(disk: str, swap_size: int, reserve: int = 0) -> None:
|
||||||
|
"""Partition a disk.
|
||||||
|
Args:
|
||||||
|
disk (str): The disk to partition.
|
||||||
|
swap_size (int): The size of the swap partition in GB.
|
||||||
|
minimum value is 1.
|
||||||
|
reserve (int, optional): The size of the reserve partition in GB. Defaults to 0.
|
||||||
|
minimum value is 0.
|
||||||
|
"""
|
||||||
|
logging.info(f"partitioning {disk=}")
|
||||||
|
swap_size = max(swap_size, 1)
|
||||||
|
reserve = max(reserve, 0)
|
||||||
|
|
||||||
|
bash_wrapper(f"blkdiscard -f {disk}")
|
||||||
|
|
||||||
|
if reserve > 0:
|
||||||
|
msg = f"Creating swap partition on {disk=} with size {swap_size=}GiB and reserve {reserve=}GiB"
|
||||||
|
logging.info(msg)
|
||||||
|
|
||||||
|
swap_start = swap_size + reserve
|
||||||
|
swap_partition = f"mkpart swap -{swap_start}GiB -{reserve}GiB "
|
||||||
|
else:
|
||||||
|
logging.info(f"Creating swap partition on {disk=} with size {swap_size=}GiB")
|
||||||
|
swap_start = swap_size
|
||||||
|
swap_partition = f"mkpart swap -{swap_start}GiB 100% "
|
||||||
|
|
||||||
|
logging.debug(f"{swap_partition=}")
|
||||||
|
|
||||||
|
create_partitions = (
|
||||||
|
f"parted --script --align=optimal {disk} -- "
|
||||||
|
"mklabel gpt "
|
||||||
|
"mkpart EFI 1MiB 4GiB "
|
||||||
|
f"mkpart root_pool 4GiB -{swap_start}GiB "
|
||||||
|
f"{swap_partition}"
|
||||||
|
"set 1 esp on"
|
||||||
|
)
|
||||||
|
bash_wrapper(create_partitions)
|
||||||
|
|
||||||
|
logging.info(f"{disk=} successfully partitioned")
|
||||||
|
|
||||||
|
|
||||||
|
def create_zfs_pool(pool_disks: Sequence[str], mnt_dir: str) -> None:
|
||||||
|
"""Create a ZFS pool.
|
||||||
|
Args:
|
||||||
|
disks (Sequence[str]): A tuple of disks to use for the pool.
|
||||||
|
mnt_dir (str): The mount directory.
|
||||||
|
"""
|
||||||
|
if len(pool_disks) <= 0:
|
||||||
|
error = "disks must be a tuple of at least length 1"
|
||||||
|
raise ValueError(error)
|
||||||
|
|
||||||
|
zpool_create = (
|
||||||
|
"zpool create "
|
||||||
|
"-o ashift=12 "
|
||||||
|
"-o autotrim=on "
|
||||||
|
f"-R {mnt_dir} "
|
||||||
|
"-O acltype=posixacl "
|
||||||
|
"-O canmount=off "
|
||||||
|
"-O dnodesize=auto "
|
||||||
|
"-O normalization=formD "
|
||||||
|
"-O relatime=on "
|
||||||
|
"-O xattr=sa "
|
||||||
|
"-O mountpoint=none "
|
||||||
|
"root_pool "
|
||||||
|
)
|
||||||
|
if len(pool_disks) == 1:
|
||||||
|
zpool_create += pool_disks[0]
|
||||||
|
else:
|
||||||
|
zpool_create += "mirror "
|
||||||
|
zpool_create += " ".join(pool_disks)
|
||||||
|
|
||||||
|
bash_wrapper(zpool_create)
|
||||||
|
zpools = bash_wrapper("zpool list -o name")
|
||||||
|
if "root_pool" not in zpools.splitlines():
|
||||||
|
logging.critical("Failed to create root_pool")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
|
def create_zfs_datasets() -> None:
|
||||||
|
"""Create ZFS datasets."""
|
||||||
|
default_options = "-o compression=zstd -o atime=off -o mountpoint=legacy"
|
||||||
|
|
||||||
|
bash_wrapper(f"zfs create {default_options} -o canmount=noauto root_pool/root")
|
||||||
|
for dataset in ("home", "var"):
|
||||||
|
bash_wrapper(f"zfs create {default_options} root_pool/{dataset}")
|
||||||
|
|
||||||
|
datasets = bash_wrapper("zfs list -o name")
|
||||||
|
|
||||||
|
expected_datasets = {"root_pool/root", "root_pool/home", "root_pool/var"}
|
||||||
|
missing_datasets = expected_datasets.difference(datasets.splitlines())
|
||||||
|
if missing_datasets:
|
||||||
|
logging.critical(f"Failed to create pools {missing_datasets}")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
|
def install_nixos(mnt_dir: str, disks: Sequence[str], encrypt: bool) -> None:
|
||||||
|
"""Install NixOS."""
|
||||||
|
bash_wrapper(f"mount -o X-mount.mkdir -t zfs root_pool/root {mnt_dir}")
|
||||||
|
bash_wrapper(f"mount -o X-mount.mkdir -t zfs root_pool/home {mnt_dir}/home")
|
||||||
|
bash_wrapper(f"mount -o X-mount.mkdir -t zfs root_pool/var {mnt_dir}/var")
|
||||||
|
|
||||||
|
for disk in disks:
|
||||||
|
bash_wrapper(f"mkfs.vfat -n EFI {disk}-part1")
|
||||||
|
|
||||||
|
# set up mirroring afterwards if more than one disk
|
||||||
|
boot_partition = f"mount -t vfat -o fmask=0077,dmask=0077,iocharset=iso8859-1,X-mount.mkdir {disks[0]}-part1 {mnt_dir}/boot"
|
||||||
|
bash_wrapper(boot_partition)
|
||||||
|
|
||||||
|
bash_wrapper(f"nixos-generate-config --root {mnt_dir}")
|
||||||
|
|
||||||
|
host_id = format(getrandbits(32), "08x")
|
||||||
|
|
||||||
|
nix_hardware = Path(f"{mnt_dir}/etc/nixos/hardware-configuration.nix").read_text()
|
||||||
|
nix_hardware = nix_hardware.replace(
|
||||||
|
";\n}", f';\n networking.hostId = "{host_id}";' "\n}"
|
||||||
|
)
|
||||||
|
|
||||||
|
if encrypt:
|
||||||
|
test = [
|
||||||
|
f' "luks-root-pool-{disk.split("/")[-1]}-part2".device = "{disk}-part2";\n'
|
||||||
|
for disk in disks
|
||||||
|
]
|
||||||
|
|
||||||
|
encrypted_disks = (
|
||||||
|
";\n boot.initrd.luks.devices = {\n" f"{''.join(test)}" " };\n" "}"
|
||||||
|
)
|
||||||
|
nix_hardware = nix_hardware.replace(";\n}", encrypted_disks)
|
||||||
|
|
||||||
|
Path(f"{mnt_dir}/etc/nixos/hardware-configuration.nix").write_text(nix_hardware)
|
||||||
|
|
||||||
|
run(("nixos-install", "--root", mnt_dir), check=True) # noqa: S603
|
||||||
|
|
||||||
|
|
||||||
|
def main() -> None:
|
||||||
|
"""Main."""
|
||||||
|
configure_logger("DEBUG")
|
||||||
|
|
||||||
|
logging.info("Starting installation")
|
||||||
|
|
||||||
|
disks = ("/dev/disk/by-id/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",)
|
||||||
|
|
||||||
|
# Set swap size in GB, set to 1 if you don't want swap to take up too much space
|
||||||
|
swap_size = 1
|
||||||
|
reserve = 0
|
||||||
|
|
||||||
|
encrypt_key = getenv("ENCRYPT_KEY")
|
||||||
|
|
||||||
|
for disk in disks:
|
||||||
|
partition_disk(disk, swap_size, reserve)
|
||||||
|
|
||||||
|
if encrypt_key:
|
||||||
|
sleep(1)
|
||||||
|
for command in (
|
||||||
|
f'printf "{encrypt_key}" | cryptsetup luksFormat --type luks2 {disk}-part2 -',
|
||||||
|
f'printf "{encrypt_key}" | cryptsetup luksOpen {disk}-part2 luks-root-pool-{disk.split("/")[-1]}-part2 -',
|
||||||
|
):
|
||||||
|
run(command, shell=True, check=True)
|
||||||
|
|
||||||
|
mnt_dir = "/tmp/nix_install" # noqa: S108
|
||||||
|
|
||||||
|
Path(mnt_dir).mkdir(parents=True, exist_ok=True)
|
||||||
|
|
||||||
|
if encrypt_key:
|
||||||
|
pool_disks = [
|
||||||
|
f'/dev/mapper/luks-root-pool-{disk.split("/")[-1]}-part2' for disk in disks
|
||||||
|
]
|
||||||
|
else:
|
||||||
|
pool_disks = [f"{disk}-part2" for disk in disks]
|
||||||
|
|
||||||
|
create_zfs_pool(pool_disks, mnt_dir)
|
||||||
|
|
||||||
|
create_zfs_datasets()
|
||||||
|
|
||||||
|
install_nixos(mnt_dir, disks, encrypt_key)
|
||||||
|
|
||||||
|
logging.info("Installation complete")
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
14
treefmt.toml
14
treefmt.toml
@@ -1,14 +0,0 @@
|
|||||||
# One CLI to format the code tree - https://github.com/numtide/treefmt
|
|
||||||
|
|
||||||
[global]
|
|
||||||
# Glob patterns of files to exclude
|
|
||||||
excludes = [".git/"]
|
|
||||||
|
|
||||||
|
|
||||||
[formatter.nixfmt]
|
|
||||||
# Formatter to run
|
|
||||||
command = "nixfmt"
|
|
||||||
# Command-line arguments for the command
|
|
||||||
#options = []
|
|
||||||
# Glob pattern of files to include
|
|
||||||
includes = ["*.nix"]
|
|
||||||
@@ -4,19 +4,13 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
sops.secrets.gaming_password = {
|
|
||||||
sopsFile = ../secrets.yaml;
|
|
||||||
neededForUsers = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
users = {
|
users = {
|
||||||
users.gaming = {
|
users.gaming = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
hashedPasswordFile = "${config.sops.secrets.gaming_password.path}";
|
|
||||||
|
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
group = "gaming";
|
group = "gaming";
|
||||||
extraGroups = [
|
extraGroups =
|
||||||
|
[
|
||||||
"audio"
|
"audio"
|
||||||
"video"
|
"video"
|
||||||
"users"
|
"users"
|
||||||
|
|||||||
@@ -18,6 +18,8 @@
|
|||||||
order = [ "Google" ];
|
order = [ "Google" ];
|
||||||
};
|
};
|
||||||
settings = {
|
settings = {
|
||||||
|
# Makes Firefox use the PlayStation 5 user agent
|
||||||
|
"general.useragent.override" = "Mozilla/5.0 (PlayStation; PlayStation 5/10.01) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Safari/605.1.15,gzip(gfe),gzip(gfe)";
|
||||||
|
|
||||||
# SECTION: FASTFOX
|
# SECTION: FASTFOX
|
||||||
# GENERAL
|
# GENERAL
|
||||||
@@ -137,8 +139,7 @@
|
|||||||
"permissions.default.desktop-notification" = 0; # allow websites to ask
|
"permissions.default.desktop-notification" = 0; # allow websites to ask
|
||||||
# PREF: allow websites to ask you for your location
|
# PREF: allow websites to ask you for your location
|
||||||
"permissions.default.geo" = 0;
|
"permissions.default.geo" = 0;
|
||||||
"geo.provider.network.url" =
|
"geo.provider.network.url" = "https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%";
|
||||||
"https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%";
|
|
||||||
"permissions.manager.defaultsUrl" = "";
|
"permissions.manager.defaultsUrl" = "";
|
||||||
"webchannel.allowObject.urlWhitelist" = "";
|
"webchannel.allowObject.urlWhitelist" = "";
|
||||||
|
|
||||||
|
|||||||
@@ -13,5 +13,8 @@
|
|||||||
username = "gaming";
|
username = "gaming";
|
||||||
homeDirectory = "/home/${config.home.username}";
|
homeDirectory = "/home/${config.home.username}";
|
||||||
stateVersion = "24.05";
|
stateVersion = "24.05";
|
||||||
|
sessionVariables = {
|
||||||
|
FLAKE = "$HOME/Projects/dotfiles";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
chromium
|
wget
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,26 +2,15 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let
|
|
||||||
ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups;
|
ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups;
|
||||||
in
|
in {
|
||||||
{
|
users.users.richie = {
|
||||||
|
|
||||||
sops.secrets.richie_password = {
|
|
||||||
sopsFile = ../secrets.yaml;
|
|
||||||
neededForUsers = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
users = {
|
|
||||||
users.richie = {
|
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
|
|
||||||
hashedPasswordFile = "${config.sops.secrets.richie_password.path}";
|
|
||||||
|
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
group = "richie";
|
group = "richie";
|
||||||
openssh.authorizedKeys.keys = [
|
openssh.authorizedKeys.keys = [
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIPtuYhiJHRTYhNaDmTcJOqJASk7D8mIn6u3F1IN5AFJ bob" # cspell:disable-line
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJYZFsc9CSH03ZUP7y81AHwSyjLwFmcshVFCyxDcYhBT rhapsody-in-green" # cspell:disable-line
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJYZFsc9CSH03ZUP7y81AHwSyjLwFmcshVFCyxDcYhBT rhapsody-in-green" # cspell:disable-line
|
||||||
];
|
];
|
||||||
extraGroups =
|
extraGroups =
|
||||||
@@ -45,7 +34,8 @@ in
|
|||||||
uid = 1000;
|
uid = 1000;
|
||||||
};
|
};
|
||||||
|
|
||||||
groups.richie.gid = 1000;
|
users.groups.richie = {
|
||||||
|
gid = 1000;
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users.richie = import ./systems/${config.networking.hostName}.nix;
|
home-manager.users.richie = import ./systems/${config.networking.hostName}.nix;
|
||||||
|
|||||||
@@ -3,10 +3,5 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
userEmail = "Richie@tmmworkshop.com";
|
userEmail = "Richie@tmmworkshop.com";
|
||||||
userName = "Richie Cahill";
|
userName = "Richie Cahill";
|
||||||
extraConfig = {
|
|
||||||
pull.rebase = true;
|
|
||||||
color.ui = true;
|
|
||||||
};
|
|
||||||
lfs.enable = true;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,14 +18,17 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
|
"sgc" = "sudo git -C /root/dotfiles";
|
||||||
|
|
||||||
|
## Utilities
|
||||||
"lrt" = "eza --icons -lsnew";
|
"lrt" = "eza --icons -lsnew";
|
||||||
"ls" = "eza";
|
"ls" = "eza";
|
||||||
"ll" = "eza --long --group";
|
"ll" = "eza --long --group";
|
||||||
"la" = "eza --all";
|
"la" = "eza --all";
|
||||||
|
|
||||||
"rspace" = "'for f in *\ *; do mv \"$f\" \"\${f// /_}\"; done'";
|
"rspace" = "'for f in *\ *; do mv \"$f\" \"\${f// /_}\"; done'";
|
||||||
"rebuild" = "sudo nixos-rebuild switch --flake /home/richie/dotfiles#$HOST";
|
"rebuild" = "sudo nixos-rebuild switch --flake /home/richie/projects/dotfiles#$HOST";
|
||||||
"build_iso" = "nix build .#nixosConfigurations.installer.config.system.build.isoImage";
|
"nix-test" = "nixos-rebuild test --flake /home/richie/projects/dotfiles";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
homeDirectory = "/home/${config.home.username}";
|
homeDirectory = "/home/${config.home.username}";
|
||||||
stateVersion = "24.05";
|
stateVersion = "24.05";
|
||||||
sessionVariables = {
|
sessionVariables = {
|
||||||
FLAKE = "$HOME/dotfiles";
|
FLAKE = "$HOME/Projects/dotfiles";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
candy-icons
|
candy-icons
|
||||||
chromium
|
|
||||||
discord-canary
|
discord-canary
|
||||||
gimp
|
gimp
|
||||||
gparted
|
gparted
|
||||||
|
|||||||
@@ -17,11 +17,7 @@
|
|||||||
search = {
|
search = {
|
||||||
force = true;
|
force = true;
|
||||||
default = "kagi";
|
default = "kagi";
|
||||||
order = [
|
order = [ "kagi" "DuckDuckGo" "Google" ];
|
||||||
"kagi"
|
|
||||||
"DuckDuckGo"
|
|
||||||
"Google"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
settings = {
|
settings = {
|
||||||
# SECTION: FASTFOX
|
# SECTION: FASTFOX
|
||||||
@@ -142,8 +138,7 @@
|
|||||||
"permissions.default.desktop-notification" = 0; # allow websites to ask
|
"permissions.default.desktop-notification" = 0; # allow websites to ask
|
||||||
# PREF: allow websites to ask you for your location
|
# PREF: allow websites to ask you for your location
|
||||||
"permissions.default.geo" = 0;
|
"permissions.default.geo" = 0;
|
||||||
"geo.provider.network.url" =
|
"geo.provider.network.url" = "https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%";
|
||||||
"https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%";
|
|
||||||
"permissions.manager.defaultsUrl" = "";
|
"permissions.manager.defaultsUrl" = "";
|
||||||
"webchannel.allowObject.urlWhitelist" = "";
|
"webchannel.allowObject.urlWhitelist" = "";
|
||||||
|
|
||||||
|
|||||||
@@ -47,21 +47,6 @@
|
|||||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||||
definedAliases = [ "@n" ];
|
definedAliases = [ "@n" ];
|
||||||
};
|
};
|
||||||
"Nix Packages pr-tracker" = {
|
|
||||||
urls = [
|
|
||||||
{
|
|
||||||
template = "https://nixpk.gs/pr-tracker.html?";
|
|
||||||
params = [
|
|
||||||
{
|
|
||||||
name = "pr";
|
|
||||||
value = "{searchTerms}";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
|
||||||
definedAliases = [ "@nprt" ];
|
|
||||||
};
|
|
||||||
"kagi" = {
|
"kagi" = {
|
||||||
urls = [
|
urls = [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
{
|
|
||||||
programs.kitty = {
|
programs.kitty = {
|
||||||
enable = true;
|
enable = true;
|
||||||
font.name = "IntoneMono Nerd Font";
|
font.name = "IntoneMono Nerd Font";
|
||||||
|
|||||||
@@ -4,10 +4,8 @@ let
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
# mutable symlinks to key binds and settings
|
# mutable symlinks to key binds and settings
|
||||||
xdg.configFile."Code/User/settings.json".source =
|
xdg.configFile."Code/User/settings.json".source = config.lib.file.mkOutOfStoreSymlink "${vscode_dir}/settings.json";
|
||||||
config.lib.file.mkOutOfStoreSymlink "${vscode_dir}/settings.json";
|
xdg.configFile."Code/User/keybindings.json".source = config.lib.file.mkOutOfStoreSymlink "${vscode_dir}/keybindings.json";
|
||||||
xdg.configFile."Code/User/keybindings.json".source =
|
|
||||||
config.lib.file.mkOutOfStoreSymlink "${vscode_dir}/keybindings.json";
|
|
||||||
|
|
||||||
home.packages = with pkgs; [ nil ];
|
home.packages = with pkgs; [ nil ];
|
||||||
|
|
||||||
|
|||||||
@@ -30,20 +30,6 @@
|
|||||||
"announcement": "off"
|
"announcement": "off"
|
||||||
},
|
},
|
||||||
|
|
||||||
// database settings
|
|
||||||
"sqltools.connections": [
|
|
||||||
{
|
|
||||||
"previewLimit": 50,
|
|
||||||
"server": "192.168.90.40",
|
|
||||||
"port": 5432,
|
|
||||||
"askForPassword": true,
|
|
||||||
"driver": "PostgreSQL",
|
|
||||||
"name": "main",
|
|
||||||
"database": "postgres",
|
|
||||||
"username": "richie"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
|
|
||||||
// formatters
|
// formatters
|
||||||
"[html]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
|
"[html]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
|
||||||
"[jsonc]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
|
"[jsonc]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
|
||||||
|
|||||||
@@ -50,8 +50,7 @@
|
|||||||
nix-output-monitor
|
nix-output-monitor
|
||||||
nix-prefetch
|
nix-prefetch
|
||||||
nix-tree
|
nix-tree
|
||||||
nixfmt-rfc-style
|
nixpkgs-fmt
|
||||||
treefmt
|
|
||||||
inputs.system_tools.packages.x86_64-linux.default
|
inputs.system_tools.packages.x86_64-linux.default
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,13 @@
|
|||||||
identityFile = "~/.ssh/id_ed25519";
|
identityFile = "~/.ssh/id_ed25519";
|
||||||
port = 2222;
|
port = 2222;
|
||||||
};
|
};
|
||||||
|
jeevesjr = {
|
||||||
|
hostname = "192.168.90.35";
|
||||||
|
user = "richie";
|
||||||
|
identityFile = "~/.ssh/id_ed25519";
|
||||||
|
port = 352;
|
||||||
|
dynamicForwards = [ { port = 9050; } ];
|
||||||
|
};
|
||||||
bob = {
|
bob = {
|
||||||
hostname = "192.168.90.25";
|
hostname = "192.168.90.25";
|
||||||
user = "richie";
|
user = "richie";
|
||||||
@@ -29,6 +36,12 @@
|
|||||||
identityFile = "~/.ssh/id_ed25519";
|
identityFile = "~/.ssh/id_ed25519";
|
||||||
port = 922;
|
port = 922;
|
||||||
};
|
};
|
||||||
|
muninn = {
|
||||||
|
hostname = "192.168.98.52";
|
||||||
|
user = "richie";
|
||||||
|
identityFile = "~/.ssh/id_ed25519";
|
||||||
|
port = 295;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
6
users/richie/systems/muninn.nix
Normal file
6
users/richie/systems/muninn.nix
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
imports = [
|
||||||
|
../home/global.nix
|
||||||
|
../home/gui
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -1,58 +0,0 @@
|
|||||||
richie_password: ENC[AES256_GCM,data:DMi3M8aqrQ60APIofr8wJMh+VZ14hLRxz6jWZgzswr0pV/QVSX53ShBFr90ruO3mucOLYv0l+bI31covfqMAhXWBJp9wUgtC2Q==,iv:qgtn30hZfIL4dBnQSLkjbo7zPJA4m9TR0f52sTFc0v4=,tag:ydLbcGyXjv0fE+4b5ECX5w==,type:str]
|
|
||||||
gaming_password: ENC[AES256_GCM,data:i692UsQaCOjE4V1y9d8yYDlK+TRMIprCHJkhl1UBZRMqe9a2LTUtmbbn/xlCYQd2tADJvn+dkx1jLfV4CqaqWOj5YSUFfpgsEw==,iv:3Y7hXQcmpzNN7hF+BDvO52uFB4o5D0dHvxemJ0ZoSIM=,tag:zzLGNDVAMCs2GPMqXp2BtQ==,type:str]
|
|
||||||
sops:
|
|
||||||
kms: []
|
|
||||||
gcp_kms: []
|
|
||||||
azure_kv: []
|
|
||||||
hc_vault: []
|
|
||||||
age:
|
|
||||||
- recipient: age1u8zj599elqqvcmhxn8zuwrufsz8w8w366d3ayrljjejljt2q45kq8mxw9c
|
|
||||||
enc: |
|
|
||||||
-----BEGIN AGE ENCRYPTED FILE-----
|
|
||||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBqR1lUREVMR3hyTTFNZ3U0
|
|
||||||
NkFkY202RGtMS0taTjRnOEd4OGlsZ1VORUhFCnIxUlV1eS81N0U1NXpOcWYxSUU0
|
|
||||||
WER1cFY3a2lWU01tTUQ2Vk5VK2JmSDAKLS0tIHUxL3F5UWZ2aUwxd2JXZG5ybE9w
|
|
||||||
d29oZ1poZU5ZTlgxMmlsVWpoMUtFYjAKdRoXdqxfxyOL++pP0izdUuZngMcF24ne
|
|
||||||
OJ6kVJexJF9Hu9InwPeDtRboMhMi01gt6L5a47hOX5FUsi+4HbeVLQ==
|
|
||||||
-----END AGE ENCRYPTED FILE-----
|
|
||||||
- recipient: age1q47vup0tjhulkg7d6xwmdsgrw64h4ax3la3evzqpxyy4adsmk9fs56qz3y
|
|
||||||
enc: |
|
|
||||||
-----BEGIN AGE ENCRYPTED FILE-----
|
|
||||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBBWmJZWDZtWFJaTCtmdVNG
|
|
||||||
QkNiK1hFdWlnVFp0ZG01V1A3cFdtU2xGN1NBCm1oeXlLT3NYMC9lZDlHSnJGQUc1
|
|
||||||
RnppNjc0QnBqSW5XTWUxZExBMHhORDQKLS0tIHpJNDJBU25COGR2dlg5em5YcGZB
|
|
||||||
VTBqRjhZWkdmdVdoa0V0VmIzdm5hbTgKEa9hW6jU538meU2Sm//b7OUBqqjAHHL5
|
|
||||||
rluVCSMcrcoVtui0mB8vMoKeh6/n/qRLe38a/puvAj0q/PolN9ZEhA==
|
|
||||||
-----END AGE ENCRYPTED FILE-----
|
|
||||||
- recipient: age13lmqgc3jvkyah5e3vcwmj4s5wsc2akctcga0lpc0x8v8du3fxprqp4ldkv
|
|
||||||
enc: |
|
|
||||||
-----BEGIN AGE ENCRYPTED FILE-----
|
|
||||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBBVlp4clVEb3Y4d0hzSEtW
|
|
||||||
dUMyb3V1aHlMS0Fvc0lGU3doRjE3SVFrNVdFCkpTQ1k2RTBIb2tzQ3UxajlPSWhY
|
|
||||||
ZzkwUWlDYWROZXpHMlFVaTM0MFlpMXcKLS0tIFNUN1QyRk41WkhPblZMbVFXNkZi
|
|
||||||
N1RkUVc0N0hIaUs3RXpXTWpDZTBOUXcKgOW6IV1mh3q8NT2Ky9EKlywWBaaCn5ML
|
|
||||||
bhfmmvt1Fndh2ys3poxODjNDiow34VxwhS+Ou0HsxsJ7zu7VvmPh0w==
|
|
||||||
-----END AGE ENCRYPTED FILE-----
|
|
||||||
- recipient: age1xzxryqq63x65yuza9lmmkud7crjjxpnkdew070yhx6xn7xe4tdws5twxsv
|
|
||||||
enc: |
|
|
||||||
-----BEGIN AGE ENCRYPTED FILE-----
|
|
||||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBnOXR6SWh2SlBWdjZVL3F1
|
|
||||||
ckd4N3JKNkkzYWtlRWN2QUFob3FJRkxQU1RNClllMDFMRE80ODROZDR3Y2g0Z2xs
|
|
||||||
aXJORTI1azEzbnhJMkZiNmNKZDBsOVUKLS0tIHZjV3BXaG9WVzNzVDZHYVdmOFdM
|
|
||||||
S3hZMkgvYkl5Ky9uYmpjVHpFUlMwYTgKIHxHRPMgEAgQNXg5lK2QkdBjMcamlxSp
|
|
||||||
HEoT/APYI/NN3V2l7mgfiH/fn2FXGdd3Ct5mqwp25GUYIp45zN3pqA==
|
|
||||||
-----END AGE ENCRYPTED FILE-----
|
|
||||||
- recipient: age1ufnewppysaq2wwcl4ugngjz8pfzc5a35yg7luq0qmuqvctajcycs5lf6k4
|
|
||||||
enc: |
|
|
||||||
-----BEGIN AGE ENCRYPTED FILE-----
|
|
||||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBXSnNxaDVSbUJ2Y1NSc0hV
|
|
||||||
TWhzNzNRWTNhV1BBMFhPeVQ5eHkzb3Bkams4Ck1YdDExcU1WdExEQ0M1VXZpUzBV
|
|
||||||
L0xSTENrOEZlOU1XUHNUbEtHbURSK1UKLS0tIEJkaE9QOUdzN1VDbWFTSWd6RkY4
|
|
||||||
UzQzWEFtSDJwR201cmZoeXh5T0RmSk0KWLOpw5cWbtnfVP/ISa7n1vZchoD+nxmn
|
|
||||||
7yr7igpEIro0Sd238KinOQYswVaT0NHB9p1dSW/mN+aGQliSNLzkDQ==
|
|
||||||
-----END AGE ENCRYPTED FILE-----
|
|
||||||
lastmodified: "2025-01-07T20:13:43Z"
|
|
||||||
mac: ENC[AES256_GCM,data:Q5fmv+MRVYGUQ4j+28CcGWHmgT1178N+haVS9xa0c99OKuPZdfSndAG0QVDhh/jYq+7zXs6zzLtBjB+egkoDfxJXfJOmg3E46UMO3vDHaEcIZD16ZbWJaz4Z/+yabqhDURKtgfGiu4xPv3OtGbwcP5kud17WcHNfY/LT+Y+LSD8=,iv:y3K3kCroIh+RTplUe4tM8B9rbLgIHCbE6FJawngam8Q=,tag:2VTIWlLp4cOwm18BfIlz5g==,type:str]
|
|
||||||
pgp: []
|
|
||||||
unencrypted_suffix: _unencrypted
|
|
||||||
version: 3.9.2
|
|
||||||
Reference in New Issue
Block a user