Compare commits

..

12 commits

Author SHA1 Message Date
c96522fdfc Add dig to cli essentials 2026-06-18 01:29:27 +02:00
4250c76fde Add vm busch-nixos-native 2026-06-18 01:28:44 +02:00
2945488b18 netbird: 0.7{1,2}.2 -> 0.72.4 2026-06-18 01:27:50 +02:00
f7a7a84e49 Remove pkgs.shadow for netbird client
This was incorporated in release 26.05.
2026-06-18 01:27:01 +02:00
e5757374d2 Make host and docker setupKeys optional for netbird-client module 2026-06-18 01:26:44 +02:00
8325d3d86a Remove pkgs-unstable as specialArgs in flake.nix 2026-06-18 01:25:19 +02:00
0fe9fc4950 Add qemu-guest module to vms 2026-06-18 01:24:55 +02:00
102ab7f419 Match hostname of busch vms to nixosConfiguration system name
Different hostnames broke auto upgrade.
2026-06-15 08:08:33 +02:00
9c993f204e Use netbird from nixpkgs stable again
Version in 26.05 is recent enough, so including unstable into the
closure is not necessary anymore.
2026-06-15 08:05:53 +02:00
87166601cd Enable lanzaboote on julius-framework 2026-06-14 01:09:03 +02:00
7d45fe1534 nixos: 25.11 -> 26.05 2026-06-14 01:08:20 +02:00
763960c0e6 Enable KSM on busch
This hopefully reduces RAM usage when having multiple VMs with the same
OS.
2026-06-13 23:44:14 +02:00
19 changed files with 176 additions and 59 deletions

42
flake.lock generated
View file

@ -65,11 +65,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1780290312, "lastModified": 1781152676,
"narHash": "sha256-eTAlX0CwgB84Ts3GaBd944A3DRXVMzgA0EqroZBISUo=", "narHash": "sha256-RxWs5ND31KzTG7wvMM+PMfUjyNpmIEr999lqNARaM5o=",
"owner": "nix-community", "owner": "nix-community",
"repo": "disko", "repo": "disko",
"rev": "115e5211780054d8a890b41f0b7734cafad54dfe", "rev": "ff8702b4de27f72b4c78573dfb89ec74e36abdf1",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -197,16 +197,16 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1779506708, "lastModified": 1781319724,
"narHash": "sha256-QOD/CNm196nCJRheux/URi4/HE66fthdOMqCJoPP1Y0=", "narHash": "sha256-ZGuxexEMo4Xv28KJ0dX/m/PHN4oZIOnxHZpNTyrvx4M=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "3ee51fbdac8c8bdfe1e7e1fcaba6520a563f394f", "rev": "8355f0a16b2dbb06a97959a918af5b239bbe05ae",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"ref": "release-25.11", "ref": "release-26.05",
"repo": "home-manager", "repo": "home-manager",
"type": "github" "type": "github"
} }
@ -261,11 +261,11 @@
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1780310866, "lastModified": 1781168557,
"narHash": "sha256-fPBRVf6A5xlACYcOI59shGrjURuvwu0lRsDoSCEXt/I=", "narHash": "sha256-LOnLQ2tpYF9gqIDDr3+j3DbpJJr/QCH6zPRT2GzEUOE=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "4ed851c979641e28597a05086332d75cdc9e395f", "rev": "6358ff76821101c178e3ab4919a62799bfe3652e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -338,11 +338,11 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1780243769, "lastModified": 1781074563,
"narHash": "sha256-x5UQuRsH3MqI0U9afaXSNqzTPSeZlRLvFAav2Ux1pNw=", "narHash": "sha256-md8WlXOlfnIeHeOScMTTHFyf2d6iaTwPl2apR5EQ3P4=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "331800de5053fcebacf6813adb5db9c9dca22a0c", "rev": "9ae611a455b90cf061d8f332b977e387bda8e1ca",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -354,16 +354,16 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1780511130, "lastModified": 1781216227,
"narHash": "sha256-2v9lT4ya59Lh1FqPeLnz1MoX9y/wz2huqfe9RtQZITk=", "narHash": "sha256-9mUW6gNwoN2SWc/l0fW4svPNOulXLl8ijqKyeSOGgJE=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "535f3e6942cb1cead3929c604320d3db54b542b9", "rev": "a0374025a863d007d98e3297f6aa46cc3141c2f0",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "nixos",
"ref": "nixos-25.11", "ref": "nixos-26.05",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
@ -476,11 +476,11 @@
"secrets": { "secrets": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1781207988, "lastModified": 1781738124,
"narHash": "sha256-ZsPqHeeUXDR1fksT4EGlizv8RHPHp42kusVNhnenzxo=", "narHash": "sha256-fff++SWoSeZJk9wwns/XzCHGU5ZOTDie821At68gH9I=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "53c5bdca5f2ff22b4e950c38b4d8bb96ee03c80d", "rev": "fdf7619e52d6bea25224f19da87b6946a6f23cf7",
"revCount": 40, "revCount": 41,
"type": "git", "type": "git",
"url": "ssh://git@git.jfreudenberger.de/JuliusFreudenberger/nix-private.git" "url": "ssh://git@git.jfreudenberger.de/JuliusFreudenberger/nix-private.git"
}, },

View file

@ -12,10 +12,10 @@
inputs = { inputs = {
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11"; nixpkgs.url = "github:nixos/nixpkgs/nixos-26.05";
nixos-hardware.url = "github:NixOS/nixos-hardware/master"; nixos-hardware.url = "github:NixOS/nixos-hardware/master";
home-manager = { home-manager = {
url = "github:nix-community/home-manager/release-25.11"; url = "github:nix-community/home-manager/release-26.05";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
auto-cpufreq = { auto-cpufreq = {
@ -88,14 +88,12 @@
specialArgs = { specialArgs = {
inherit inputs outputs username; inherit inputs outputs username;
pkgs-unstable = import nixpkgs-unstable {
inherit system;
};
}; };
modules = [ modules = [
nixos-hardware.nixosModules.framework-11th-gen-intel nixos-hardware.nixosModules.framework-11th-gen-intel
auto-cpufreq.nixosModules.default auto-cpufreq.nixosModules.default
lanzaboote.nixosModules.lanzaboote
./hosts/julius-framework ./hosts/julius-framework
./users/julius/nixos.nix ./users/julius/nixos.nix
@ -152,9 +150,6 @@
specialArgs = { specialArgs = {
inherit inputs outputs; inherit inputs outputs;
pkgs-unstable = import nixpkgs-unstable {
inherit system;
};
}; };
modules = [ modules = [
@ -169,9 +164,6 @@
specialArgs = { specialArgs = {
inherit inputs outputs; inherit inputs outputs;
pkgs-unstable = import nixpkgs-unstable {
inherit system;
};
}; };
modules = [ modules = [
@ -181,6 +173,20 @@
]; ];
}; };
busch-nixos-native = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
specialArgs = {
inherit inputs outputs;
};
modules = [
./hosts/busch-nixos-native
disko.nixosModules.disko
agenix.nixosModules.default
];
};
srv01-hf = nixpkgs.lib.nixosSystem rec { srv01-hf = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux"; system = "x86_64-linux";

View file

@ -6,5 +6,6 @@
name = "Arc"; name = "Arc";
package = pkgs.arc-icon-theme; package = pkgs.arc-icon-theme;
}; };
gtk4.theme = null;
}; };
} }

View file

@ -7,6 +7,8 @@
viAlias = true; viAlias = true;
vimdiffAlias = true; vimdiffAlias = true;
withNodeJs = true; withNodeJs = true;
withRuby = false;
withPython3 = false;
coc.enable = true; coc.enable = true;
plugins = with pkgs.vimPlugins; [ plugins = with pkgs.vimPlugins; [
vim-gitgutter vim-gitgutter

View file

@ -15,6 +15,9 @@
"text/calendar" = ["thunderbird.desktop"]; "text/calendar" = ["thunderbird.desktop"];
}; };
}; };
userDirs.enable = true; userDirs = {
enable = true;
setSessionVariables = false;
};
}; };
} }

View file

@ -26,6 +26,8 @@
history.size = 10000; history.size = 10000;
history.path = "$HOME/.zsh_history"; history.path = "$HOME/.zsh_history";
dotDir = config.home.homeDirectory;
initContent = lib.mkMerge [ beforeCompInit defaultInit ]; initContent = lib.mkMerge [ beforeCompInit defaultInit ];
}; };
} }

View file

@ -1,4 +1,4 @@
{ inputs, outputs, config, lib, pkgs, pkgs-unstable, ... }: { inputs, outputs, config, lib, pkgs, ... }:
{ {
imports = imports =
@ -8,6 +8,7 @@
../../users/julius/nixos-server.nix ../../users/julius/nixos-server.nix
../../modules/nix.nix ../../modules/nix.nix
../../modules/qemu-guest.nix
../../modules/auto-upgrade.nix ../../modules/auto-upgrade.nix
../../modules/locale.nix ../../modules/locale.nix
../../modules/server-cli.nix ../../modules/server-cli.nix
@ -40,7 +41,7 @@
nixpkgs.config.nvidia.acceptLicense = true; nixpkgs.config.nvidia.acceptLicense = true;
services.xserver.videoDrivers = [ "nvidia" ]; services.xserver.videoDrivers = [ "nvidia" ];
networking.hostName = "docker-gpu"; # Define your hostname. networking.hostName = "busch-gpu-docker"; # Define your hostname.
services.netbird-client = { services.netbird-client = {
enable = true; enable = true;

View file

@ -1,4 +1,4 @@
{ inputs, outputs, config, lib, pkgs, pkgs-unstable, ... }: { inputs, outputs, config, lib, pkgs, ... }:
{ {
imports = imports =
@ -9,6 +9,7 @@
../../users/julius/nixos-server.nix ../../users/julius/nixos-server.nix
../../modules/nix.nix ../../modules/nix.nix
../../modules/auto-upgrade.nix ../../modules/auto-upgrade.nix
../../modules/qemu-guest.nix
../../modules/locale.nix ../../modules/locale.nix
../../modules/server-cli.nix ../../modules/server-cli.nix
../../modules/sshd.nix ../../modules/sshd.nix
@ -28,7 +29,7 @@
}; };
tmp.useTmpfs = true; tmp.useTmpfs = true;
}; };
networking.hostName = "docker-main"; # Define your hostname. networking.hostName = "busch-main-docker"; # Define your hostname.
services.netbird-client = { services.netbird-client = {
enable = true; enable = true;

View file

@ -0,0 +1,73 @@
{ inputs, outputs, config, lib, pkgs, ... }:
{
imports =
[
../../modules/disko/legacy-full-ext4.nix
./secrets.nix
../../users/julius/nixos-server.nix
../../modules/nix.nix
../../modules/auto-upgrade.nix
../../modules/qemu-guest.nix
../../modules/locale.nix
../../modules/server-cli.nix
../../modules/sshd.nix
../../modules/netbird-client.nix
"${inputs.secrets}/modules/opkssh.nix"
# Include the results of the hardware scan.
./hardware-configuration.nix
];
# Use the GRUB 2 boot loader.
boot = {
loader.grub = {
enable = true;
};
tmp.useTmpfs = true;
};
networking.hostName = "busch-nixos-native"; # Define your hostname.
services.netbird-client = {
enable = true;
managementUrl = "https://netbird.jfreudenberger.de";
host.setupKey = "E182754A-F338-4DAE-8036-03404033D30E";
};
services.beszel.agent = {
enable = true;
environment = {
HUB_URL = "https://beszel.jfreudenberger.de";
DISABLE_SSH = "true";
};
environmentFile = config.age.secrets.beszel.path;
};
services.renovate = {
enable = true;
credentials = {
RENOVATE_TOKEN = config.age.secrets.renovate-token.path;
RENOVATE_GITHUB_COM_TOKEN = config.age.secrets.renovate-github-com-token.path;
};
settings = {
gitAuthor = "Renovate Bot <renovate@jfreudenberger.de>";
platform = "forgejo";
endpoint = "https://git.jfreudenberger.de";
};
};
# This option defines the first version of NixOS you have installed on this particular machine,
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
# Most users should NEVER change this value after the initial install, for any reason,
# even if you've upgraded your system to a new NixOS release.
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
# so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
# to actually do that.
# This value being lower than the current NixOS release does NOT mean your system is
# out of date, out of support, or vulnerable.
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
# and migrated your data accordingly.
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
system.stateVersion = "25.05"; # Did you read the comment?
}

View file

@ -0,0 +1,17 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/profiles/qemu-guest.nix")
];
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}

View file

@ -0,0 +1,8 @@
{ inputs, ... }:
{
age.secrets = {
beszel.file = "${inputs.secrets}/secrets/busch-nixos-native/beszel";
renovate-token.file = "${inputs.secrets}/secrets/busch-nixos-native/renovate-token";
renovate-github-com-token.file = "${inputs.secrets}/secrets/busch-nixos-native/renovate-github-com-token";
};
}

View file

@ -87,6 +87,8 @@
memoryPercent = 50; memoryPercent = 50;
}; };
hardware.ksm.enable = true; # Linux kernel Same-Page Merging, useful when having multiple VMs with same OS
networking.useDHCP = false; networking.useDHCP = false;
systemd.network = { systemd.network = {

View file

@ -2,7 +2,7 @@
# your system. Help is available in the configuration.nix(5) man page # your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help). # and in the NixOS manual (accessible by running nixos-help).
{ inputs, outputs, config, pkgs, pkgs-unstable, ... }: { inputs, outputs, config, pkgs, ... }:
{ {
imports = imports =
@ -51,7 +51,6 @@
services.resolved.enable = true; services.resolved.enable = true;
services.netbird = { services.netbird = {
package = pkgs-unstable.netbird;
useRoutingFeatures = "client"; useRoutingFeatures = "client";
clients.wt0 = { clients.wt0 = {
hardened = true; hardened = true;
@ -75,10 +74,13 @@
loader = { loader = {
efi.canTouchEfiVariables = true; efi.canTouchEfiVariables = true;
systemd-boot = { systemd-boot = {
enable = true; enable = false; # Enabled by lanzaboote
editor = false;
}; };
}; };
lanzaboote = {
enable = true;
pkiBundle = "/var/lib/sbctl";
};
initrd = { initrd = {
systemd.enable = true; systemd.enable = true;
luks.devices = { luks.devices = {

View file

@ -7,8 +7,9 @@
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
wget wget
curl curl
dig
git git
neofetch fastfetch
bat bat
tealdeer tealdeer

View file

@ -15,10 +15,10 @@
pavucontrol pavucontrol
xed-editor xed-editor
mate.mate-calc mate-calc
xarchiver xarchiver
mate.engrampa engrampa
nemo-with-nextcloud-extensions nemo-with-nextcloud-extensions
]; ];

View file

@ -26,10 +26,10 @@
dex # autostart applications dex # autostart applications
xbindkeys # bind keys to commands xbindkeys # bind keys to commands
xclip xclip
xorg.xbacklight # control screen brightness xbacklight # control screen brightness
brightnessctl brightnessctl
numlockx numlockx
xorg.xdpyinfo # get screen information xdpyinfo # get screen information
sysstat # get system information sysstat # get system information
scrot scrot

View file

@ -1,6 +1,5 @@
{ {
pkgs, pkgs,
pkgs-unstable,
utils, utils,
config, config,
lib, lib,
@ -10,13 +9,14 @@ let
cfg = config.services.netbird-client; cfg = config.services.netbird-client;
clientVersion = "0.71.2"; clientVersion = "0.72.4";
clientConfiguration = lib.types.submodule { clientConfiguration = lib.types.submodule {
options = { options = {
setupKey = lib.mkOption { setupKey = lib.mkOption {
description = "Setup Key for this client"; description = "Setup Key for this client";
type = lib.types.str; type = lib.types.nullOr lib.types.str;
default = null;
}; };
}; };
}; };
@ -45,8 +45,7 @@ in {
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
services.netbird = { services.netbird = lib.mkIf (cfg.host.setupKey != null) {
package = pkgs-unstable.netbird;
useRoutingFeatures = "both"; useRoutingFeatures = "both";
clients.wt0 = { clients.wt0 = {
hardened = false; hardened = false;
@ -60,11 +59,10 @@ in {
}; };
}; };
}; };
systemd.services.${config.services.netbird.clients.wt0.service.name}.path = [ pkgs.shadow ];
services.resolved.enable = true; services.resolved.enable = lib.mkIf (cfg.host.setupKey != null) true;
virtualisation.oci-containers.containers = { virtualisation.oci-containers.containers = lib.mkIf (cfg.docker.setupKey != null) {
netbird = { netbird = {
image = "netbirdio/netbird:${clientVersion}-rootless"; image = "netbirdio/netbird:${clientVersion}-rootless";
autoStart = true; autoStart = true;
@ -83,7 +81,7 @@ in {
}; };
}; };
systemd.services."docker-netbird" = { systemd.services."docker-netbird" = lib.mkIf (cfg.docker.setupKey != null) {
after = [ after = [
"docker-network-webproxy.service" "docker-network-webproxy.service"
]; ];
@ -93,7 +91,7 @@ in {
}; };
systemd.services."docker-network-webproxy" = { systemd.services."docker-network-webproxy" = lib.mkIf (cfg.docker.setupKey != null) {
path = [ pkgs.docker_29 ]; path = [ pkgs.docker_29 ];
serviceConfig = { serviceConfig = {
Type = "oneshot"; Type = "oneshot";

View file

@ -10,7 +10,7 @@ let
cfg = config.services.netbird-docker; cfg = config.services.netbird-docker;
netbirdCfg = config.services.netbird; netbirdCfg = config.services.netbird;
serverVersion = "0.72.2"; serverVersion = "0.72.4";
dashboardVersion = "2.39.0"; dashboardVersion = "2.39.0";
in { in {

View file

@ -8,7 +8,7 @@
glib, glib,
gtk3, gtk3,
nemo, nemo,
mate, engrampa,
cinnamon-translations, cinnamon-translations,
}: }:
@ -44,7 +44,7 @@ stdenv.mkDerivation rec {
done done
popd popd
substituteInPlace src/nemo-engrampa.c \ substituteInPlace src/nemo-engrampa.c \
--replace-fail "file-roller" "${lib.getExe mate.engrampa}" \ --replace-fail "file-roller" "${lib.getExe engrampa}" \
--replace-fail "fileroller" "engrampa" \ --replace-fail "fileroller" "engrampa" \
--replace-fail "FileRoller" "Engrampa" \ --replace-fail "FileRoller" "Engrampa" \
--replace-quiet "GNOMELOCALEDIR" "${cinnamon-translations}/share/locale" --replace-quiet "GNOMELOCALEDIR" "${cinnamon-translations}/share/locale"