add persistence to gid/uid services of microvm and set vsock.cid

This commit is contained in:
2026-04-25 17:38:42 +02:00
parent f7035e0daf
commit f50a5caee5
11 changed files with 322 additions and 318 deletions

View File

@@ -1,43 +1,19 @@
#
# Specific system configuration settings for desktop
#
# flake.nix
# ├─ ./hosts
# │ └─ ./laptop
# │ ├─ default.nix *
# │ └─ hardware-configuration.nix
# └─ ./modules
# ├─ ./desktop
# │ └─ ./hyprland
# │ └─ hyprland.nix
# ├─ ./modules
# │ └─ ./programs
# │ └─ waybar.nix
# └─ ./hardware
# └─ default.nix
# Jupiter — NAS server configuration
#
{ config, pkgs, inputs, user, ... }:
{
imports = # For now, if applying to other ssystem, swap files
[(import ./hardware-configuration.nix)] ++ # Current system hardware config @ /etc/nixos/hardware-configuration.nix
#(import ../../modules/wm/virtualisation) ++ # Docker
(import ../../modules/services/nas) ++ # Server Services
(import ../../modules/hardware); # Hardware devices
imports = [
./hardware-configuration.nix
../../modules/server
] ++ (import ../../modules/services/nas);
boot = { # Boot options
kernelPackages = pkgs.linuxPackages_latest;
# ── Server module options ───────────────────────────────────────────────
# No virtualisation on the NAS
loader = { # EFI Boot
systemd-boot.enable = true;
efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/boot";
};
timeout = 1; # Grub auto select time
};
};
# ── Host-specific settings ──────────────────────────────────────────────
# Example: host-specific overlay — only jupiter gets these packages in its pkgs.
# nixpkgs.overlays = [
@@ -46,35 +22,36 @@
# firefox = inputs.nixpkgs-unstable.legacyPackages.${prev.system}.firefox;
# })
# ];
#
# environment = {
# systemPackages = with pkgs; [
# corosync-qdevice
# ];
# };
boot = {
kernelPackages = pkgs.linuxPackages_latest;
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
efi.efiSysMountPoint = "/boot";
timeout = 1;
};
};
programs = {
zsh.enable = true;
ssh.startAgent = false;
gnupg.agent = {
enable = false;
enable = false;
enableSSHSupport = true;
pinentryPackage = pkgs.pinentry-curses;
pinentryPackage = pkgs.pinentry-curses;
};
};
services = {
qemuGuest.enable = true;
avahi = { # Needed to find wireless printer
enable = true;
avahi = {
enable = true;
nssmdns4 = true;
publish = { # Needed for detecting the scanner
enable = true;
addresses = true;
publish = {
enable = true;
addresses = true;
userServices = true;
};
};
};
}