Compare commits

..

31 Commits

Author SHA1 Message Date
90dc514a46 setting up cleves for muninn 2024-11-16 13:28:36 -05:00
f004c7fc25 enabling fwupdmgr 2024-11-16 12:17:10 -05:00
55197d599c removed fish from global default.nix
this is unnecessarily increasing compile time and is not being used
2024-11-16 10:54:32 -05:00
f492e3a613 nix_flake_update_11-15-24 2024-11-15 21:29:07 -05:00
1c3ea5f270 moved zfs_unstable and linuxPackages_zen off nixos master 2024-11-15 21:29:07 -05:00
0874e79ac7 added github search engine 2024-11-15 20:11:56 -05:00
0d97c77ad9 adding muninn 2024-11-11 09:20:05 -05:00
75b19254aa fixed bug 2024-11-02 22:41:18 -04:00
6c760d4f84 moved kagi.png 2024-11-02 22:39:29 -04:00
9dde857047 created search_engines.nix and firefox dir 2024-11-02 22:38:25 -04:00
dea58e0413 testing kagi 2024-11-02 22:38:25 -04:00
af71cb796e removing Kernel Packages Update github action 2024-11-02 22:34:57 -04:00
9869f88a3e added nixpkgs-master 2024-11-02 22:34:57 -04:00
2d0c2baee4 removing default global kernel and moving desktop.nix to zfs unstable and linuxPackages_zen
Im testing this to allow jeeves to be stable and desktops stay on the latest kernel
2024-11-02 22:34:57 -04:00
436b9e7efd nix flake update 11-02-24 2024-11-02 22:34:57 -04:00
4c22c3e764 fixed typo in installer.py name 2024-11-01 21:31:12 -04:00
f887375c8d renamed datasets.sh to zfs.sh 2024-11-01 21:30:51 -04:00
2d5fbb8555 removed -O primarycache=metadata from installer 2024-11-01 21:30:07 -04:00
88fd69ab9f added compression= to zpool create commands 2024-11-01 21:29:09 -04:00
86025d17c4 moved fonts.nix to global setings 2024-10-31 14:48:26 -04:00
151e444a07 added fonts.nix 2024-10-31 14:48:26 -04:00
0f03542255 adding cli tools 2024-10-26 23:32:17 -04:00
10277825eb opened firewall for nix-serve 2024-10-26 19:45:51 -04:00
c1c0c28a13 adding prismlauncher 2024-10-26 19:41:36 -04:00
c72934fb3c removed firewall rules from reverse_proxy.nix 2024-10-26 17:38:16 -04:00
d99bf1b27b fixed photoprism 2024-10-26 17:38:16 -04:00
47e01ac591 split up web.nix 2024-10-26 17:38:16 -04:00
d706ca8fb3 sorted haproxy.cfg 2024-10-26 17:38:16 -04:00
366f7f2a7b enabled firewall on jeeves 2024-10-26 17:38:16 -04:00
5eb99e11a3 enabled firewall on rhapsody-in-green 2024-10-26 17:38:16 -04:00
e88d017014 enabled firewall on bob 2024-10-26 17:38:16 -04:00
28 changed files with 309 additions and 338 deletions

View File

@@ -1,24 +0,0 @@
#!/bin/bash
# Update ZFS package to match the latest supported Linux kernel version
echo "geting latest ZFS version"
raw_zfs_max_kernel_version=$(curl -s https://raw.githubusercontent.com/openzfs/zfs/master/META | grep Linux-Maximum | cut -d" " -f2)
zfs_max_kernel_version="${raw_zfs_max_kernel_version//./_}"
echo "geting latest ZFS version"
if grep "linuxPackages_$zfs_max_kernel_version" systems/common/global/default.nix; then
echo "No changes needed"
exit 0
fi
sed -i "s/linuxPackages_6_[0-9]\+/linuxPackages_$zfs_max_kernel_version/" systems/common/global/default.nix
# Commit the changes
git config user.name "GitHub Actions Bot"
git config user.email "<>"
git add systems/common/global/default.nix
git commit -m "Update Linux kernel and ZFS packages"

View File

@@ -1,27 +0,0 @@
name: Kernel Packages Update
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
create-pull-request:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Make changes
run: bash ${GITHUB_WORKSPACE}/.github/workflows/kernel_packages_update.sh
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Base linuxPackages update
title: Base linuxPackages update
body: |
Update linuxPackages
branch: daily-update
delete-branch: true

View File

@@ -31,6 +31,7 @@
"captivedetect", "captivedetect",
"cgroupdriver", "cgroupdriver",
"charliermarsh", "charliermarsh",
"cleves",
"cloudflared", "cloudflared",
"codezombiech", "codezombiech",
"compactmode", "compactmode",
@@ -60,6 +61,7 @@
"extest", "extest",
"fastforwardteam", "fastforwardteam",
"FASTFOX", "FASTFOX",
"ffmpegthumbnailer",
"filebot", "filebot",
"filebrowser", "filebrowser",
"fileroller", "fileroller",
@@ -70,6 +72,7 @@
"formfill", "formfill",
"foxundermoon", "foxundermoon",
"FULLSCREEN", "FULLSCREEN",
"fwupd",
"fxaccounts", "fxaccounts",
"gamemode", "gamemode",
"gamescope", "gamescope",
@@ -97,6 +100,7 @@
"isal", "isal",
"jnoortheen", "jnoortheen",
"jsbc", "jsbc",
"kagi",
"kuma", "kuma",
"levelname", "levelname",
"libglvnd", "libglvnd",
@@ -122,6 +126,7 @@
"mountpoints", "mountpoints",
"mousewheel", "mousewheel",
"mtxr", "mtxr",
"muninn",
"ncdu", "ncdu",
"nemo", "nemo",
"neofetch", "neofetch",
@@ -158,8 +163,10 @@
"pipewire", "pipewire",
"pkgs", "pkgs",
"plugdev", "plugdev",
"poppler",
"posixacl", "posixacl",
"primarycache", "primarycache",
"prismlauncher",
"privatebrowsing", "privatebrowsing",
"PRIVOXY", "PRIVOXY",
"prowlarr", "prowlarr",
@@ -223,6 +230,7 @@
"uaccess", "uaccess",
"ublock", "ublock",
"uitour", "uitour",
"unrar",
"unsubmitted", "unsubmitted",
"urlbar", "urlbar",
"urlclassifier", "urlclassifier",
@@ -241,6 +249,7 @@
"Workqueues", "Workqueues",
"xattr", "xattr",
"xhci", "xhci",
"yazi",
"yubikey", "yubikey",
"yubioath", "yubioath",
"yzhang", "yzhang",

View File

@@ -2,7 +2,6 @@
inputs, inputs,
lib, lib,
outputs, outputs,
pkgs,
... ...
}: }:
{ {
@@ -10,6 +9,7 @@
inputs.home-manager.nixosModules.home-manager inputs.home-manager.nixosModules.home-manager
./docker.nix ./docker.nix
./fail2ban.nix ./fail2ban.nix
./fonts.nix
./libs.nix ./libs.nix
./locale.nix ./locale.nix
./nh.nix ./nh.nix
@@ -19,10 +19,7 @@
./snapshot_manager.nix ./snapshot_manager.nix
]; ];
boot = { boot.tmp.useTmpfs = true;
kernelPackages = lib.mkDefault pkgs.linuxPackages_6_10;
tmp.useTmpfs = true;
};
hardware.enableRedistributableFirmware = true; hardware.enableRedistributableFirmware = true;
@@ -32,13 +29,17 @@
extraSpecialArgs = {inherit inputs outputs;}; extraSpecialArgs = {inherit inputs outputs;};
}; };
nixpkgs.config.allowUnfree = true; nixpkgs = {
overlays = builtins.attrValues outputs.overlays;
programs = { config = {
zsh.enable = true; allowUnfree = true;
fish.enable = true; };
}; };
services.fwupd.enable = true;
programs.zsh.enable = true;
security.auditd.enable = lib.mkDefault true; security.auditd.enable = lib.mkDefault true;
users.mutableUsers = lib.mkDefault true; users.mutableUsers = lib.mkDefault true;

10
common/global/fonts.nix Normal file
View File

@@ -0,0 +1,10 @@
{ pkgs, ... }:
{
fonts = {
fontconfig.enable = true;
enableDefaultPackages = true;
packages = with pkgs; [
nerdfonts
];
};
}

View File

@@ -1,4 +1,9 @@
{ lib, pkgs, ... }:
{ {
boot = {
kernelPackages = lib.mkDefault pkgs.linuxPackages_zen;
zfs.package = pkgs.zfs_unstable;
};
services = { services = {
desktopManager.plasma6.enable = true; desktopManager.plasma6.enable = true;
xserver = { xserver = {

71
flake.lock generated
View File

@@ -9,11 +9,11 @@
}, },
"locked": { "locked": {
"dir": "pkgs/firefox-addons", "dir": "pkgs/firefox-addons",
"lastModified": 1729414746, "lastModified": 1731643390,
"narHash": "sha256-B7wGWFjIL6/BllPaTXyp31srxG7+4I0hlsBkL6S8pIM=", "narHash": "sha256-ckIrZY5i+b7UrxolO54pSRO9dKW7GnMYQ1uQLeWEBsU=",
"owner": "rycee", "owner": "rycee",
"repo": "nur-expressions", "repo": "nur-expressions",
"rev": "7bd3068e495e1f430e1a640b5f9ee683e4e5e616", "rev": "f0fa120121e9ea5c16c7b2c578fbebe37fbcab55",
"type": "gitlab" "type": "gitlab"
}, },
"original": { "original": {
@@ -79,11 +79,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1729414726, "lastModified": 1731604581,
"narHash": "sha256-Dtmm1OU8Ymiy9hVWn/a2B8DhRYo9Eoyx9veERdOBR4o=", "narHash": "sha256-Qq2YZZaDTB3FZLWU/Hgh1uuWlUBl3cMLGB99bm7rFUM=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "fe56302339bb28e3471632379d733547caec8103", "rev": "1d0862ee2d7c6f6cd720d6f32213fa425004be10",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -124,11 +124,11 @@
"rust-overlay": "rust-overlay" "rust-overlay": "rust-overlay"
}, },
"locked": { "locked": {
"lastModified": 1729388162, "lastModified": 1731712317,
"narHash": "sha256-ARCVRKnANfAb1iwGVpNOujXTXsTdyHz80ocFxjpswv8=", "narHash": "sha256-NpkSAwLFTFRZx+C2yL0JCBnjnZQRs8PsWRqZ0S08Bc8=",
"owner": "lilyinstarlight", "owner": "lilyinstarlight",
"repo": "nixos-cosmic", "repo": "nixos-cosmic",
"rev": "1bfff37ff0178721ff4c0a7ed2fb39689b8db796", "rev": "0b0e62252fb3b4e6b0a763190413513be499c026",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -139,11 +139,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1729417461, "lastModified": 1731403644,
"narHash": "sha256-p0j/sUs7noqZw0W+SEuZXskzOfgOH7yY80ksIM0fCi4=", "narHash": "sha256-T9V7CTucjRZ4Qc6pUEV/kpgNGzQbHWfGcfK6JJLfUeI=",
"owner": "nixos", "owner": "nixos",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "8f38d8a4754cf673c2609c4ed399630db87e678b", "rev": "f6581f1c3b137086e42a08a906bdada63045f991",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -155,11 +155,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1729256560, "lastModified": 1731319897,
"narHash": "sha256-/uilDXvCIEs3C9l73JTACm4quuHUsIHcns1c+cHUJwA=", "narHash": "sha256-PbABj4tnbWFMfBp6OcUK5iGy1QY+/Z96ZcLpooIbuEI=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "4c2fcb090b1f3e5b47eaa7bd33913b574a11e0a0", "rev": "dc460ec76cbff0e66e269457d7b728432263166c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -169,13 +169,29 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-master": {
"locked": {
"lastModified": 1731716707,
"narHash": "sha256-ykrD4v5e/i2eweFAnamAXXkk/jzhNNwPiDc9yu4MbZs=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "3af4d5583961833ab0439b64626190951839c0bc",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "master",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1729181673, "lastModified": 1731386116,
"narHash": "sha256-LDiPhQ3l+fBjRATNtnuDZsBS7hqoBtPkKBkhpoBHv3I=", "narHash": "sha256-lKA770aUmjPHdTaJWnP3yQ9OI1TigenUqVC3wweqZuI=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "4eb33fe664af7b41a4c446f87d20c9a0a6321fa3", "rev": "689fed12a013f56d4c4d3f612489634267d86529",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -187,11 +203,11 @@
}, },
"nixpkgs-stable_2": { "nixpkgs-stable_2": {
"locked": { "locked": {
"lastModified": 1729181673, "lastModified": 1731386116,
"narHash": "sha256-LDiPhQ3l+fBjRATNtnuDZsBS7hqoBtPkKBkhpoBHv3I=", "narHash": "sha256-lKA770aUmjPHdTaJWnP3yQ9OI1TigenUqVC3wweqZuI=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "4eb33fe664af7b41a4c446f87d20c9a0a6321fa3", "rev": "689fed12a013f56d4c4d3f612489634267d86529",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -236,6 +252,7 @@
"nixos-cosmic": "nixos-cosmic", "nixos-cosmic": "nixos-cosmic",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"nixpkgs-master": "nixpkgs-master",
"nixpkgs-stable": "nixpkgs-stable_2", "nixpkgs-stable": "nixpkgs-stable_2",
"system_tools": "system_tools", "system_tools": "system_tools",
"systems": "systems_3" "systems": "systems_3"
@@ -249,11 +266,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1729304879, "lastModified": 1731551344,
"narHash": "sha256-H7KGGJUU9BcDNnfXiATBGgs6FJKWQdfftNJS+/v2aMU=", "narHash": "sha256-wr8OOqgw7M1pWfe4W7WA5lErzOVMg3zvrrxx/dy/nPo=",
"owner": "oxalica", "owner": "oxalica",
"repo": "rust-overlay", "repo": "rust-overlay",
"rev": "b259ef799b5ac014604da71ecd92d4a52603ed2d", "rev": "27570abfd3461875f11fc07c9b01c141a6332b4f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -271,11 +288,11 @@
"poetry2nix": "poetry2nix" "poetry2nix": "poetry2nix"
}, },
"locked": { "locked": {
"lastModified": 1729435836, "lastModified": 1729617389,
"narHash": "sha256-wDhbznFihvVh8sm93HUAeFDw0t8hoe9RGEyWBMkB4yw=", "narHash": "sha256-Q05Nhw84FprGiuQHd1ahOhKKIbxzp1rpeCqddjXUSVM=",
"owner": "RichieCahill", "owner": "RichieCahill",
"repo": "system_tools", "repo": "system_tools",
"rev": "84f9ef479e6561fe1daac304cddf195303d855dc", "rev": "2a2aa711fcf67ed5e4db484e507a4a511b9b4230",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -18,6 +18,7 @@
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.05"; nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.05";
nixpkgs-master.url = "github:nixos/nixpkgs/master";
systems.url = "github:nix-systems/default-linux"; systems.url = "github:nix-systems/default-linux";
nixos-hardware.url = "github:nixos/nixos-hardware/master"; nixos-hardware.url = "github:nixos/nixos-hardware/master";
@@ -81,6 +82,10 @@
modules = [./systems/rhapsody-in-green]; modules = [./systems/rhapsody-in-green];
specialArgs = {inherit inputs outputs;}; specialArgs = {inherit inputs outputs;};
}; };
muninn = lib.nixosSystem {
modules = [./systems/muninn];
specialArgs = {inherit inputs outputs;};
};
}; };
}; };
} }

View File

@@ -6,4 +6,11 @@
config.allowUnfree = true; config.allowUnfree = true;
}; };
}; };
# When applied, the master nixpkgs set (declared in the flake inputs) will be accessible through 'pkgs.master'
master = final: _prev: {
master = import inputs.nixpkgs-master {
system = final.system;
config.allowUnfree = true;
};
};
} }

View File

@@ -30,6 +30,7 @@ in
nix-serve = { nix-serve = {
enable = true; enable = true;
secretKeyFile = "${vars.storage_secrets}/services/nix-cache/cache-priv-key.pem"; secretKeyFile = "${vars.storage_secrets}/services/nix-cache/cache-priv-key.pem";
openFirewall = true;
}; };
plex = { plex = {

View 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;
};
}

View 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;
};
}

View File

@@ -47,7 +47,6 @@ in
}; };
environmentFiles = ["${vars.storage_secrets}/docker/photoprism"]; environmentFiles = ["${vars.storage_secrets}/docker/photoprism"];
autoStart = true; autoStart = true;
dependsOn = [ "photoprism_mariadb" ];
extraOptions = [ "--network=web" ]; extraOptions = [ "--network=web" ];
}; };
} }

View File

@@ -2,9 +2,7 @@ let
vars = import ../vars.nix; vars = import ../vars.nix;
in in
{ {
networking.firewall = { networking.firewall.allowedTCPPorts = [ 9696 ];
allowedTCPPorts = [ 9696 ];
};
virtualisation.oci-containers.containers.prowlarr = { virtualisation.oci-containers.containers.prowlarr = {
image = "ghcr.io/linuxserver/prowlarr:latest"; image = "ghcr.io/linuxserver/prowlarr:latest";
ports = [ "9696:9696" ]; ports = [ "9696:9696" ];

View File

@@ -3,27 +3,6 @@ let
in in
{ {
virtualisation.oci-containers.containers = { 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;
};
grafana = {
image = "grafana/grafana-enterprise:latest";
volumes = [ "${vars.media_docker_configs}/grafana:/var/lib/grafana" ];
user = "600:600";
extraOptions = [ "--network=web" ];
autoStart = true;
};
haproxy = { haproxy = {
image = "haproxy:latest"; image = "haproxy:latest";
user = "600:600"; user = "600:600";
@@ -39,6 +18,7 @@ in
"audiobookshelf" "audiobookshelf"
"filebrowser" "filebrowser"
"grafana" "grafana"
"photoprism"
"uptime_kuma" "uptime_kuma"
]; ];
extraOptions = [ "--network=web" ]; extraOptions = [ "--network=web" ];

View File

@@ -3,16 +3,16 @@
# zpools # zpools
# media # media
sudo zpool create -o ashift=12 -O acltype=posixacl -O atime=off -O dnodesize=auto -O xattr=sa -O zstd -m /zfs/media media mirror sudo zpool create -o ashift=12 -O acltype=posixacl -O atime=off -O dnodesize=auto -O xattr=sa -O compression=zstd -m /zfs/media media mirror
sudo zpool add media -o ashift=12 special mirror sudo zpool add media -o ashift=12 special mirror
# storage # storage
sudo zpool create -o ashift=12 -O acltype=posixacl -O atime=off -O dnodesize=auto -O xattr=sa -O zstd -m /zfs/storage storage sudo zpool create -o ashift=12 -O acltype=posixacl -O atime=off -O dnodesize=auto -O xattr=sa -O compression=zstd -m /zfs/storage storage
sudo zpool add storage -o ashift=12 special mirror sudo zpool add storage -o ashift=12 special mirror
sudo zpool add storage -o ashift=12 logs mirror sudo zpool add storage -o ashift=12 logs mirror
# torrenting # torrenting
sudo zpool create -o ashift=12 -O acltype=posixacl -O atime=off -O dnodesize=auto -O xattr=sa -O zstd -m /zfs/torrenting torrenting sudo zpool create -o ashift=12 -O acltype=posixacl -O atime=off -O dnodesize=auto -O xattr=sa -O compression=zstd -m /zfs/torrenting torrenting
sudo zpool add torrenting -o ashift=12 special sudo zpool add torrenting -o ashift=12 special
# media datasets # media datasets

View File

@@ -0,0 +1,52 @@
{
imports = [
../../users/richie
../../common/global
../../common/optional/desktop.nix
../../common/optional/steam.nix
../../common/optional/systemd-boot.nix
./hardware.nix
];
networking = {
hostName = "muninn";
hostId = "a43179c5";
firewall.enable = true;
networkmanager.enable = true;
};
hardware = {
pulseaudio.enable = false;
bluetooth = {
enable = true;
powerOnBoot = true;
};
};
security.rtkit.enable = true;
services = {
displayManager.sddm.enable = true;
openssh.ports = [ 262 ];
printing.enable = true;
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
snapshot_manager.enable = true;
zfs = {
trim.enable = true;
autoScrub.enable = true;
};
};
system.stateVersion = "24.05";
}

View File

@@ -1,12 +1,4 @@
# Do not modify this file! It was generated by nixos-generate-config { config, lib, modulesPath, ... }:
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{
config,
lib,
modulesPath,
...
}:
{ {
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
@@ -16,19 +8,22 @@
availableKernelModules = [ availableKernelModules = [
"nvme" "nvme"
"xhci_pci" "xhci_pci"
"ahci" "thunderbolt"
"usbhid"
"usb_storage" "usb_storage"
"sd_mod" "sd_mod"
]; ];
clevis = {
enable = true;
devices."luks-root-pool-nvme-INTEL_SSDPEKKW256G7_BTPY63820XBH256D-part2".secretFile = /root/key.jwe;
};
kernelModules = [ ]; kernelModules = [ ];
luks.devices."luks-root-pool-nvme-Samsung_SSD_990_PRO_with_Heatsink_1TB_S73JNJ0X114418B-part2" = { luks.devices."luks-root-pool-nvme-INTEL_SSDPEKKW256G7_BTPY63820XBH256D-part2" = {
device = "/dev/disk/by-id/nvme-Samsung_SSD_990_PRO_with_Heatsink_1TB_S73JNJ0X114418B-part2"; device = "/dev/disk/by-id/nvme-INTEL_SSDPEKKW256G7_BTPY63820XBH256D-part2";
bypassWorkqueues = true; bypassWorkqueues = true;
allowDiscards = true; allowDiscards = true;
}; };
}; };
kernelModules = [ "kvm-amd" ]; kernelModules = [ "kvm-intel" ];
extraModulePackages = [ ]; extraModulePackages = [ ];
}; };
@@ -43,13 +38,18 @@
fsType = "zfs"; fsType = "zfs";
}; };
"/nix" = {
device = "root_pool/nix";
fsType = "zfs";
};
"/var" = { "/var" = {
device = "root_pool/var"; device = "root_pool/var";
fsType = "zfs"; fsType = "zfs";
}; };
"/boot" = { "/boot" = {
device = "/dev/disk/by-uuid/609D-FF29"; device = "/dev/disk/by-uuid/12CE-A600";
fsType = "vfat"; fsType = "vfat";
options = [ options = [
"fmask=0077" "fmask=0077"
@@ -60,8 +60,6 @@
swapDevices = [ ]; swapDevices = [ ];
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
} }

View File

@@ -1,147 +0,0 @@
# https://github.com/ghostbuster91/blogposts/blob/a2374f0039f8cdf4faddeaaa0347661ffc2ec7cf/router2023-part2/main.md
# https://francis.begyn.be/blog/nixos-home-router
{
imports = [
../../users/richie
../../common/global
../../common/optional/zerotier.nix
./docker
./hardware.nix
];
boot.kernel = {
sysctl = {
"net.ipv4.conf.all.forwarding" = true;
"net.ipv6.conf.all.forwarding" = false;
};
};
systemd.network = {
wait-online.anyInterface = true;
networks = {
"30-lan0" = {
matchConfig.Name = "lan0";
linkConfig.RequiredForOnline = "enslaved";
networkConfig = {
ConfigureWithoutCarrier = true;
};
};
# lan1 and lan2 look analogical
"30-lan3" = {
matchConfig.Name = "lan3";
linkConfig.RequiredForOnline = "enslaved";
networkConfig = {
ConfigureWithoutCarrier = true;
};
};
"10-wan" = {
matchConfig.Name = "wan";
networkConfig = {
# start a DHCP Client for IPv4 Addressing/Routing
DHCP = "ipv4";
DNSOverTLS = true;
DNSSEC = true;
IPv6PrivacyExtensions = false;
IPForward = true;
};
# make routing on this interface a dependency for network-online.target
linkConfig.RequiredForOnline = "routable";
};
};
};
networking = {
hostName = "surfer";
useNetworkd = true;
useDHCP = false;
# No local firewall.
nat.enable = false;
firewall.enable = false;
nftables = {
enable = true;
ruleset = ''
table inet filter {
chain input {
type filter hook input priority 0; policy drop;
iifname { "br-lan" } accept comment "Allow local network to access the router"
iifname "wan" ct state { established, related } accept comment "Allow established traffic"
iifname "wan" icmp type { echo-request, destination-unreachable, time-exceeded } counter accept comment "Allow select ICMP"
iifname "wan" counter drop comment "Drop all other unsolicited traffic from wan"
iifname "lo" accept comment "Accept everything from loopback interface"
}
chain forward {
type filter hook forward priority filter; policy drop;
iifname { "br-lan" } oifname { "wan" } accept comment "Allow trusted LAN to WAN"
iifname { "wan" } oifname { "br-lan" } ct state { established, related } accept comment "Allow established back to LANs"
}
}
table ip nat {
chain postrouting {
type nat hook postrouting priority 100; policy accept;
oifname "wan" masquerade
}
}
'';
};
};
services.dnsmasq = {
enable = true;
settings = {
# upstream DNS servers
server = [ "9.9.9.9" "8.8.8.8" "1.1.1.1" ];
# sensible behaviours
domain-needed = true;
bogus-priv = true;
no-resolv = true;
# Cache dns queries.
cache-size = 1000;
dhcp-range = [ "br-lan,192.168.10.50,192.168.10.254,24h" ];
interface = "br-lan";
dhcp-host = "192.168.10.1";
# local domains
local = "/lan/";
domain = "lan";
expand-hosts = true;
# don't use /etc/hosts as this would advertise surfer as localhost
no-hosts = true;
address = "/surfer.lan/192.168.10.1";
};
};
boot.kernel = {
sysctl = {
"net.ipv4.conf.default.rp_filter" = 1;
"net.ipv4.conf.wan.rp_filter" = 1;
"net.ipv4.conf.br-lan.rp_filter" = 0;
};
};
services = {
openssh.ports = [ 629 ];
smartd.enable = true;
snapshot_manager = {
enable = true;
path = ./snapshot_config.toml;
};
sysstat.enable = true;
zfs = {
trim.enable = true;
autoScrub.enable = true;
};
};
system.stateVersion = "24.05";
}

View File

@@ -110,7 +110,6 @@ def create_zfs_pool(pool_disks: Sequence[str], mnt_dir: str) -> None:
"-O relatime=on " "-O relatime=on "
"-O xattr=sa " "-O xattr=sa "
"-O mountpoint=none " "-O mountpoint=none "
"-O primarycache=metadata "
"root_pool " "root_pool "
) )
if len(pool_disks) == 1: if len(pool_disks) == 1:

View File

@@ -1,8 +1,8 @@
{ {
imports = [ imports = [
./direnv.nix
./git.nix ./git.nix
./zsh.nix ./zsh.nix
./direnv.nix
]; ];
programs.starship.enable = true; programs.starship.enable = true;

View File

@@ -1,7 +1,7 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
imports = [ imports = [
./firefox.nix ./firefox
./vscode ./vscode
]; ];
@@ -15,6 +15,7 @@
nemo-fileroller nemo-fileroller
obs-studio obs-studio
obsidian obsidian
prismlauncher
proxychains proxychains
prusa-slicer prusa-slicer
signal-desktop signal-desktop

View File

@@ -1,9 +1,7 @@
{ inputs, ... }:
{ {
pkgs, imports = [ ./search_engines.nix ];
inputs,
...
}:
{
programs.firefox = { programs.firefox = {
enable = true; enable = true;
profiles.richie = { profiles.richie = {
@@ -16,55 +14,11 @@
sponsorblock sponsorblock
ublock-origin ublock-origin
]; ];
search.engines = { search = {
"Nix Options" = { force = true;
urls = [ default = "kagi";
{ order = [ "kagi" "DuckDuckGo" "Google" ];
template = "https://search.nixos.org/options";
params = [
{
name = "type";
value = "packages";
}
{
name = "channel";
value = "unstable";
}
{
name = "query";
value = "{searchTerms}";
}
];
}
];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@o" ];
};
"Nix Packages" = {
urls = [
{
template = "https://search.nixos.org/packages";
params = [
{
name = "type";
value = "packages";
}
{
name = "channel";
value = "unstable";
}
{
name = "query";
value = "{searchTerms}";
}
];
}
];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@n" ];
};
}; };
search.force = true;
settings = { settings = {
# SECTION: FASTFOX # SECTION: FASTFOX
# GENERAL # GENERAL

View File

@@ -0,0 +1,3 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M16 0C7.16 0 0 7.16 0 16C0 23.08 4.58 29.06 10.94 31.18C11.74 31.32 12.04 30.84 12.04 30.42C12.04 30.04 12.02 28.78 12.02 27.44C8 28.18 6.96 26.46 6.64 25.56C6.46 25.1 5.68 23.68 5 23.3C4.44 23 3.64 22.26 4.98 22.24C6.24 22.22 7.14 23.4 7.44 23.88C8.88 26.3 11.18 25.62 12.1 25.2C12.24 24.16 12.66 23.46 13.12 23.06C9.56 22.66 5.84 21.28 5.84 15.16C5.84 13.42 6.46 11.98 7.48 10.86C7.32 10.46 6.76 8.82 7.64 6.62C7.64 6.62 8.98 6.2 12.04 8.26C13.32 7.9 14.68 7.72 16.04 7.72C17.4 7.72 18.76 7.9 20.04 8.26C23.1 6.18 24.44 6.62 24.44 6.62C25.32 8.82 24.76 10.46 24.6 10.86C25.62 11.98 26.24 13.4 26.24 15.16C26.24 21.3 22.5 22.66 18.94 23.06C19.52 23.56 20.02 24.52 20.02 26.02C20.02 28.16 20 29.88 20 30.42C20 30.84 20.3 31.34 21.1 31.18C27.42 29.06 32 23.06 32 16C32 7.16 24.84 0 16 0V0Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 957 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 924 B

View File

@@ -0,0 +1,84 @@
{ pkgs, ... }:
{
programs.firefox.profiles.richie.search.engines = {
"Nix Options" = {
urls = [
{
template = "https://search.nixos.org/options";
params = [
{
name = "type";
value = "packages";
}
{
name = "channel";
value = "unstable";
}
{
name = "query";
value = "{searchTerms}";
}
];
}
];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@o" ];
};
"Nix Packages" = {
urls = [
{
template = "https://search.nixos.org/packages";
params = [
{
name = "type";
value = "packages";
}
{
name = "channel";
value = "unstable";
}
{
name = "query";
value = "{searchTerms}";
}
];
}
];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@n" ];
};
"kagi" = {
urls = [
{
template = "https://kagi.com/search?";
params = [
{
name = "q";
value = "{searchTerms}";
}
];
}
];
icon = ./kagi.png;
};
github = {
urls = [
{
template = "https://github.com/search?";
params = [
{
name = "q";
value = "{searchTerms}";
}
{
name = "type";
value = "code";
}
];
}
];
icon = ./github.svg;
definedAliases = [ "@n" ];
};
};
}

View File

@@ -5,14 +5,23 @@
bat bat
btop btop
eza eza
fd
ffmpegthumbnailer
fzf
git git
gnupg gnupg
imagemagick
jq
ncdu ncdu
neofetch neofetch
p7zip
poppler
rar rar
ripgrep ripgrep
starship starship
tmux tmux
unzip
yazi
zoxide zoxide
# system info # system info
hwloc hwloc

View File

@@ -0,0 +1,6 @@
{
imports = [
../home/global.nix
../home/gui
];
}