This commit is contained in:
Polen 2026-02-18 11:07:01 -05:00
parent 143cd6c603
commit 36c73a41ff
17 changed files with 275 additions and 234 deletions

View file

@ -6,4 +6,4 @@ rebuild-pi:
NIX_SSHOPTS="-o IdentitiesOnly=yes -i ~/.ssh/id_rsa" nixos-rebuild switch --flake .#pi --target-host pi --build-host server --use-remote-sudo NIX_SSHOPTS="-o IdentitiesOnly=yes -i ~/.ssh/id_rsa" nixos-rebuild switch --flake .#pi --target-host pi --build-host server --use-remote-sudo
deploy-server: deploy-server:
nixos-rebuild switch --flake .#server --target-host server --build-host server --use-remote-sudo --ask-sudo-password nixos-rebuild switch --flake .#server --target-host server --build-host server --sudo --ask-sudo-password

View file

@ -1,12 +1,7 @@
# Edit this configuration file to define what should be installed on # Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page, on # your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`). # https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
{ { config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}: {
imports = [ imports = [
# Include the results of the hardware scan. # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
@ -32,19 +27,13 @@
services.desktopManager.cosmic.enable = true; services.desktopManager.cosmic.enable = true;
services.displayManager.cosmic-greeter.enable = true; services.displayManager.cosmic-greeter.enable = true;
nix.settings.experimental-features = ["nix-command" "flakes"]; nix.settings.experimental-features = [ "nix-command" "flakes" ];
# Define a user account. Don't forget to set a password with passwd. # Define a user account. Don't forget to set a password with passwd.
users.users.polen = { users.users.polen = {
isNormalUser = true; isNormalUser = true;
extraGroups = ["wheel"]; # Enable sudo for the user. extraGroups = [ "wheel" ]; # Enable sudo for the user.
packages = with pkgs; [ packages = with pkgs; [ neovim tree htop git ranger ];
neovim
tree
htop
git
ranger
];
}; };
# List packages installed in system profile. # List packages installed in system profile.
@ -73,7 +62,7 @@
}; };
# Open ports in the firewall. # Open ports in the firewall.
networking.firewall.allowedTCPPorts = [2283]; networking.firewall.allowedTCPPorts = [ 2283 ];
# networking.firewall.allowedUDPPorts = [ ... ]; # networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether. # Or disable the firewall altogether.
# networking.firewall.enable = false; # networking.firewall.enable = false;

View file

@ -4,34 +4,32 @@
{ config, lib, pkgs, modulesPath, ... }: { config, lib, pkgs, modulesPath, ... }:
{ {
imports = imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; boot.initrd.availableKernelModules =
[ "xhci_pci" "ehci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/50ea20bc-d9bb-40c7-8e4a-34e31da665b5"; device = "/dev/disk/by-uuid/50ea20bc-d9bb-40c7-8e4a-34e31da665b5";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/9267-2ED4"; device = "/dev/disk/by-uuid/9267-2ED4";
fsType = "vfat"; fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ]; options = [ "fmask=0077" "dmask=0077" ];
}; };
fileSystems."/data" = fileSystems."/data" = {
{ device = "/dev/disk/by-uuid/465aa01d-2cc4-4955-bebb-b44c21528e4f"; device = "/dev/disk/by-uuid/465aa01d-2cc4-4955-bebb-b44c21528e4f";
fsType = "ext4"; fsType = "ext4";
}; };
swapDevices = swapDevices =
[ { device = "/dev/disk/by-uuid/90dd6c81-79a7-45e2-b063-e263cabf1c28"; } [{ device = "/dev/disk/by-uuid/90dd6c81-79a7-45e2-b063-e263cabf1c28"; }];
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's # (the default) this is the recommended approach. When using systemd-networkd it's
@ -42,5 +40,6 @@
# networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.intel.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
} }

View file

@ -1,11 +1,7 @@
# Edit this configuration file to define what should be installed on # Edit this configuration file to define what should be installed on
# 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').
{ { config, pkgs, ... }: {
config,
pkgs,
...
}: {
imports = [ imports = [
# Include the results of the hardware scan. # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
@ -35,7 +31,7 @@
# networking.proxy.default = "http://user:password@proxy:port/"; # networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
nix.settings.experimental-features = ["nix-command" "flakes"]; nix.settings.experimental-features = [ "nix-command" "flakes" ];
#nix.settings.trusted-users = [ "polen" "polensky" ]; #nix.settings.trusted-users = [ "polen" "polensky" ];
#nix.settings.extra-platforms = config.boot.binfmt.emulatedSystems; #nix.settings.extra-platforms = config.boot.binfmt.emulatedSystems;
#boot.binfmt.emulatedSystems = ["aarch64-linux"]; #boot.binfmt.emulatedSystems = ["aarch64-linux"];
@ -98,7 +94,7 @@
users.users.polensky = { users.users.polensky = {
isNormalUser = true; isNormalUser = true;
description = "polensky"; description = "polensky";
extraGroups = ["networkmanager" "wheel"]; extraGroups = [ "networkmanager" "wheel" ];
shell = pkgs.zsh; shell = pkgs.zsh;
}; };
@ -109,13 +105,7 @@
# List packages installed in system profile. To search, run: # List packages installed in system profile. To search, run:
# $ nix search wget # $ nix search wget
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [ htop-vim ranger neovim wget git ];
htop-vim
ranger
neovim
wget
git
];
# Some programs need SUID wrappers, can be configured further or are # Some programs need SUID wrappers, can be configured further or are
# started in user sessions. # started in user sessions.

View file

@ -4,44 +4,52 @@
{ config, lib, pkgs, modulesPath, ... }: { config, lib, pkgs, modulesPath, ... }:
{ {
imports = imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ahci" "xhci_pci" "pata_marvell" "firewire_ohci" "usb_storage" "usbhid" "sd_mod" "sr_mod" ]; boot.initrd.availableKernelModules = [
"uhci_hcd"
"ehci_pci"
"ahci"
"xhci_pci"
"pata_marvell"
"firewire_ohci"
"usb_storage"
"usbhid"
"sd_mod"
"sr_mod"
];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/62a34abf-561a-410d-b913-eb2ad7ede6f5"; device = "/dev/disk/by-uuid/62a34abf-561a-410d-b913-eb2ad7ede6f5";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/9B7B-A012"; device = "/dev/disk/by-uuid/9B7B-A012";
fsType = "vfat"; fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ]; options = [ "fmask=0022" "dmask=0022" ];
}; };
fileSystems."/data" = fileSystems."/data" = {
{ device = "/dev/disk/by-uuid/b7de7b88-6239-4340-9e7a-6486814bbd83"; device = "/dev/disk/by-uuid/b7de7b88-6239-4340-9e7a-6486814bbd83";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/data1" = fileSystems."/data1" = {
{ device = "/dev/disk/by-uuid/86a239f2-50a5-4c26-9534-0636fb718fc8"; device = "/dev/disk/by-uuid/86a239f2-50a5-4c26-9534-0636fb718fc8";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/home" = fileSystems."/home" = {
{ device = "/dev/disk/by-uuid/5181dbcf-7e00-46d9-ac04-c22d4c4e9827"; device = "/dev/disk/by-uuid/5181dbcf-7e00-46d9-ac04-c22d4c4e9827";
fsType = "ext4"; fsType = "ext4";
}; };
swapDevices = swapDevices =
[ { device = "/dev/disk/by-uuid/29ac34a7-fa51-489b-b9da-8c5d02bdd2c4"; } [{ device = "/dev/disk/by-uuid/29ac34a7-fa51-489b-b9da-8c5d02bdd2c4"; }];
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's # (the default) this is the recommended approach. When using systemd-networkd it's
@ -52,5 +60,6 @@
# networking.interfaces.enp7s0.useDHCP = lib.mkDefault true; # networking.interfaces.enp7s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.intel.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
} }

View file

@ -1,11 +1,5 @@
{ { pkgs, inputs, system, config, ... }:
pkgs, let my-emacs = pkgs.emacsNativeComp;
inputs,
system,
config,
...
}: let
my-emacs = pkgs.emacsNativeComp;
in { in {
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
@ -24,7 +18,7 @@ in {
colima colima
git git
gnupg gnupg
(pass.withExtensions (exts: [exts.pass-otp])) (pass.withExtensions (exts: [ exts.pass-otp ]))
# emacs # emacs
my-emacs my-emacs
@ -90,9 +84,7 @@ in {
programs.direnv.enable = true; programs.direnv.enable = true;
programs.gnupg.agent.enable = true; programs.gnupg.agent.enable = true;
services.yabai = { services.yabai = { enable = true; };
enable = true;
};
services.skhd.enable = true; services.skhd.enable = true;
services.emacs = { services.emacs = {
@ -107,15 +99,13 @@ in {
system.defaults.dock = { system.defaults.dock = {
autohide = true; autohide = true;
persistent-apps = []; persistent-apps = [ ];
show-recents = false; show-recents = false;
static-only = true; static-only = true;
tilesize = 32; tilesize = 32;
}; };
system.defaults.menuExtraClock = { system.defaults.menuExtraClock = { Show24Hour = true; };
Show24Hour = true;
};
launchd.user.agents.remap-keys = { launchd.user.agents.remap-keys = {
serviceConfig = { serviceConfig = {
@ -123,7 +113,8 @@ in {
"/usr/bin/hidutil" "/usr/bin/hidutil"
"property" "property"
"--set" "--set"
'' { ''
{
"UserKeyMapping":[ "UserKeyMapping":[
{"HIDKeyboardModifierMappingSrc":0x700000039,"HIDKeyboardModifierMappingDst":0x7000000E7} {"HIDKeyboardModifierMappingSrc":0x700000039,"HIDKeyboardModifierMappingDst":0x7000000E7}
] ]

View file

@ -1,16 +1,11 @@
{ { inputs, config, pkgs, lib, ... }:
inputs, let
config,
pkgs,
lib,
...
}: let
user = "polen"; user = "polen";
hostname = "pi"; hostname = "pi";
in { in {
boot = { boot = {
kernelPackages = pkgs.linuxKernel.packages.linux_rpi3; kernelPackages = pkgs.linuxKernel.packages.linux_rpi3;
initrd.availableKernelModules = ["xhci_pci" "usbhid" "usb_storage"]; initrd.availableKernelModules = [ "xhci_pci" "usbhid" "usb_storage" ];
loader = { loader = {
grub.enable = false; grub.enable = false;
generic-extlinux-compatible.enable = true; generic-extlinux-compatible.enable = true;
@ -21,16 +16,14 @@ in {
"/" = { "/" = {
device = "/dev/disk/by-label/NIXOS_SD"; device = "/dev/disk/by-label/NIXOS_SD";
fsType = "ext4"; fsType = "ext4";
options = ["noatime"]; options = [ "noatime" ];
}; };
}; };
swapDevices = [ swapDevices = [{
{
device = "/var/lib/swapfile"; device = "/var/lib/swapfile";
size = 10 * 1024; size = 10 * 1024;
} }];
];
#sops.defaultSopsFile = ../../secrets/secrets.yaml; #sops.defaultSopsFile = ../../secrets/secrets.yaml;
#sops.defaultSopsFormat = "yaml"; #sops.defaultSopsFormat = "yaml";
@ -48,15 +41,9 @@ in {
node.openFirewall = true; node.openFirewall = true;
}; };
nix.settings.trusted-users = [user]; nix.settings.trusted-users = [ user ];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [ htop-vim neovim curl wget ranger ];
htop-vim
neovim
curl
wget
ranger
];
services.openssh.enable = true; services.openssh.enable = true;
@ -66,11 +53,9 @@ in {
"${user}" = { "${user}" = {
isNormalUser = true; isNormalUser = true;
#hashedPasswordFile = config.sops.secrets.pi_user_pass.path; #hashedPasswordFile = config.sops.secrets.pi_user_pass.path;
extraGroups = ["wheel"]; extraGroups = [ "wheel" ];
};
lauria = {
isNormalUser = true;
}; };
lauria = { isNormalUser = true; };
}; };
}; };

View file

@ -64,7 +64,8 @@ in {
openFirewall = true; # 11434 openFirewall = true; # 11434
host = "0.0.0.0"; host = "0.0.0.0";
syncModels = true; syncModels = true;
loadModels = [ "mistral:7b" "phi3.5:3.8b" ]; loadModels =
[ "qwen3:4b" "lfm2.5-thinking:1.2b" "ministral-3:8b" "ministral-3:3b" ];
}; };
}; };
@ -161,6 +162,7 @@ in {
9000 # mealie 9000 # mealie
8989 # sonarr 8989 # sonarr
10222 # taskchampion-sync-server 10222 # taskchampion-sync-server
18789 # openclaw
]; ];
firewall.allowedUDPPorts = [ firewall.allowedUDPPorts = [
5353 # mDNS 5353 # mDNS
@ -170,12 +172,15 @@ in {
time.timeZone = "America/Toronto"; time.timeZone = "America/Toronto";
users.users."${user}" = { users.users."${user}" = {
isNormalUser = true;
group = "polen";
extraGroups = [ "wheel" "transmission" "jellyfin" "polensky" "docker" ]; extraGroups = [ "wheel" "transmission" "jellyfin" "polensky" "docker" ];
shell = pkgs.zsh; shell = pkgs.zsh;
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC6O2MJqR+P/FwRyVSz1HWYhMtIwh16ozBU71Y2vf0oNDQ6DZ5T8Bvp5/4uSJgS8lOl3qYyNy0e0zJMIyfFVJnu89ycKBEdixA4HqWOUQGiyvn1C4s740jHolOzN1xNB24PDXFz0vHcVb+G5nU/xeKeaq0vrszrkK2zctqXshw94/x3ah0m3fr5CwM4S2RY/VODOdt11fllFEvN8HGE2mQTPn5sJzwtGW20npQ5iJ7ShugPbC4D1G2JU1R7MqkvWEpq9OFVb1prTpJM+i/lcqCn3lBv8XxpKKnD3q+48eeO1geosAsG/kgUWPDildbzcSfytgj7/TCTujx2ow4ZUfS4kWUrNaXM3M99SG61rFN7zLMAv14SOSsgegmX3q0ZAwOieUhCifqIqdfFr5QjEUP11ALofYRC6567X1YrEVXZFFnZSXMKGkBKpTxx0jaTTGnFSd6F49kDlI30cKJnVUgAK5nESissdEFn3UGRSFfxmjZkYvhY5l3LqtbO3kEutJU= polen@polen-xps" "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC6O2MJqR+P/FwRyVSz1HWYhMtIwh16ozBU71Y2vf0oNDQ6DZ5T8Bvp5/4uSJgS8lOl3qYyNy0e0zJMIyfFVJnu89ycKBEdixA4HqWOUQGiyvn1C4s740jHolOzN1xNB24PDXFz0vHcVb+G5nU/xeKeaq0vrszrkK2zctqXshw94/x3ah0m3fr5CwM4S2RY/VODOdt11fllFEvN8HGE2mQTPn5sJzwtGW20npQ5iJ7ShugPbC4D1G2JU1R7MqkvWEpq9OFVb1prTpJM+i/lcqCn3lBv8XxpKKnD3q+48eeO1geosAsG/kgUWPDildbzcSfytgj7/TCTujx2ow4ZUfS4kWUrNaXM3M99SG61rFN7zLMAv14SOSsgegmX3q0ZAwOieUhCifqIqdfFr5QjEUP11ALofYRC6567X1YrEVXZFFnZSXMKGkBKpTxx0jaTTGnFSd6F49kDlI30cKJnVUgAK5nESissdEFn3UGRSFfxmjZkYvhY5l3LqtbO3kEutJU= polen@polen-xps"
]; ];
}; };
users.groups.polen = { };
# Luna user for OpenClaw AI assistant # Luna user for OpenClaw AI assistant
users.users.luna = { users.users.luna = {
@ -197,16 +202,17 @@ in {
defaultSopsFile = ../../secrets/secrets.yaml; defaultSopsFile = ../../secrets/secrets.yaml;
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ]; age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
secrets = { secrets = {
luna-telegram-token = { luna_telegram_token = {
owner = "luna"; owner = "luna";
group = "luna"; group = "luna";
}; };
luna-gateway-token = { luna_gateway_token = {
owner = "luna"; owner = "luna";
group = "luna"; group = "luna";
}; };
}; };
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
neovim neovim
htop-vim htop-vim

View file

@ -1,30 +1,22 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ { config, lib, pkgs, modulesPath, ... }: {
config, imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = ["uhci_hcd" "ehci_pci" "hpsa" "usb_storage" "usbhid" "sd_mod"]; boot.initrd.availableKernelModules =
boot.initrd.kernelModules = []; [ "uhci_hcd" "ehci_pci" "hpsa" "usb_storage" "usbhid" "sd_mod" ];
boot.kernelModules = ["kvm-intel"]; boot.initrd.kernelModules = [ ];
boot.extraModulePackages = []; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" = { fileSystems."/" = {
device = "/dev/disk/by-uuid/a4ba3cce-bbdd-470d-9874-71f3aea9ea13"; device = "/dev/disk/by-uuid/a4ba3cce-bbdd-470d-9874-71f3aea9ea13";
fsType = "ext4"; fsType = "ext4";
}; };
swapDevices = [ swapDevices =
{device = "/dev/disk/by-uuid/6fc86a5b-ac4b-41ed-a7c9-56f734f5e711";} [{ device = "/dev/disk/by-uuid/6fc86a5b-ac4b-41ed-a7c9-56f734f5e711"; }];
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's # (the default) this is the recommended approach. When using systemd-networkd it's
@ -37,5 +29,6 @@
# networking.interfaces.enp4s0f1.useDHCP = lib.mkDefault true; # networking.interfaces.enp4s0f1.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.intel.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
} }

View file

@ -7,35 +7,105 @@
home.homeDirectory = "/var/lib/luna"; home.homeDirectory = "/var/lib/luna";
home.stateVersion = "25.05"; home.stateVersion = "25.05";
home.packages = with pkgs; [ xmlstarlet ];
programs.openclaw = { programs.openclaw = {
enable = true; enable = true;
documents = ./luna-documents;
config = { config = {
# Use local Ollama - auto-detected at 127.0.0.1:11434 models = {
agents.defaults.model = { providers = {
primary = "ollama/mistral:7b"; ollama = {
fallbacks = [ "ollama/phi3.5:3.8b" ]; baseUrl = "http://127.0.0.1:11434/v1";
apiKey = "ollama-local";
api = "openai-completions";
models = [ ];
};
};
};
agents = {
defaults = {
model = { primary = "github-copilot/gpt-5-mini"; };
workspace = "/var/lib/luna/.openclaw/workspace";
maxConcurrent = 4;
subagents = { maxConcurrent = 8; };
models = { "github-copilot/gpt-5-mini" = { }; };
};
};
commands = {
native = "auto";
nativeSkills = "auto";
};
channels = {
telegram = {
dmPolicy = "pairing";
tokenFile = "/run/secrets/luna_telegram_token";
groups = { "*" = { requireMention = true; }; };
allowFrom = [ 1268580775 ];
groupPolicy = "allowlist";
streamMode = "partial";
};
}; };
gateway = { gateway = {
mode = "local"; mode = "local";
auth = { tokenFile = "/run/secrets/luna-gateway-token"; }; auth = {
token =
"14db7eaede5f363bce5f5efd23baea45fd8c7984fd3d9234d9b98e1d52c88db7";
mode = "token";
};
port = 18789;
bind = "loopback";
tailscale = {
mode = "off";
resetOnExit = false;
};
}; };
channels.telegram = { plugins = { entries = { telegram = { enabled = true; }; }; };
tokenFile = "/run/secrets/luna-telegram-token";
allowFrom = [ messages = { ackReactionScope = "group-mentions"; };
1268580775
]; auth = {
groups = { "*" = { requireMention = true; }; }; profiles = {
"github-copilot:github" = {
provider = "github-copilot";
mode = "token";
};
};
};
hooks = {
internal = {
enabled = true;
entries = {
"boot-md" = { enabled = true; };
"command-logger" = { enabled = true; };
"session-memory" = { enabled = true; };
};
};
};
wizard = {
lastRunAt = "2026-02-10T18:36:29.457Z";
lastRunVersion = "2026.2.6-3";
lastRunCommand = "onboard";
lastRunMode = "local";
};
meta = {
lastTouchedVersion = "2026.2.6-3";
lastTouchedAt = "2026-02-10T18:36:29.472Z";
}; };
}; };
# Plugins useful for homelab Q&A # Plugins useful for homelab Q&A
bundledPlugins = { bundledPlugins = {
summarize.enable = true; # Summarize docs/web pages summarize.enable = true; # Summarize docs/web pages
oracle.enable = true; # Web search oracle.enable = false; # Web search
}; };
}; };

View file

@ -1,12 +1,7 @@
# Edit this configuration file to define what should be installed on # Edit this configuration file to define what should be installed on
# 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').
{ { config, pkgs, inputs, ... }: {
config,
pkgs,
inputs,
...
}: {
imports = [ imports = [
# Include the results of the hardware scan. # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
@ -29,14 +24,14 @@
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
boot.kernelModules = ["msr"]; boot.kernelModules = [ "msr" ];
networking.hostName = "xps13"; # Define your hostname. networking.hostName = "xps13"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
nix = { nix = {
settings.experimental-features = ["nix-command" "flakes"]; settings.experimental-features = [ "nix-command" "flakes" ];
settings.trusted-users = ["polen"]; settings.trusted-users = [ "polen" ];
settings.extra-platforms = config.boot.binfmt.emulatedSystems; settings.extra-platforms = config.boot.binfmt.emulatedSystems;
gc = { gc = {
automatic = true; automatic = true;
@ -44,7 +39,7 @@
options = "--delete-older-than 15d"; options = "--delete-older-than 15d";
}; };
}; };
boot.binfmt.emulatedSystems = ["aarch64-linux"]; boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
# Configure network proxy if necessary # Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/"; # networking.proxy.default = "http://user:password@proxy:port/";
@ -68,14 +63,14 @@
services.displayManager.sddm = { services.displayManager.sddm = {
enable = true; enable = true;
theme = "${import ./sddm-theme.nix {inherit pkgs;}}"; theme = "${import ./sddm-theme.nix { inherit pkgs; }}";
}; };
# Define a user account. Don't forget to set a password with 'passwd'. # Define a user account. Don't forget to set a password with 'passwd'.
users.users.polen = { users.users.polen = {
isNormalUser = true; isNormalUser = true;
description = "polen"; description = "polen";
extraGroups = ["networkmanager" "wheel"]; extraGroups = [ "networkmanager" "wheel" ];
shell = pkgs.zsh; shell = pkgs.zsh;
}; };
@ -134,7 +129,7 @@
programs.seahorse.enable = true; programs.seahorse.enable = true;
xdg.portal.enable = true; xdg.portal.enable = true;
xdg.portal.extraPortals = [pkgs.xdg-desktop-portal-gtk]; xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
environment.sessionVariables = { environment.sessionVariables = {
NIXOS_OZONE_WL = "1"; NIXOS_OZONE_WL = "1";

View file

@ -4,27 +4,26 @@
{ config, lib, pkgs, modulesPath, ... }: { config, lib, pkgs, modulesPath, ... }:
{ {
imports = imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; boot.initrd.availableKernelModules =
[ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/6faa62c9-8566-4ed7-b372-355e04ac4ca6"; device = "/dev/disk/by-uuid/6faa62c9-8566-4ed7-b372-355e04ac4ca6";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/A769-2F96"; device = "/dev/disk/by-uuid/A769-2F96";
fsType = "vfat"; fsType = "vfat";
}; };
fileSystems."/home" = fileSystems."/home" = {
{ device = "/dev/disk/by-uuid/8b28694c-3401-4545-9974-521674baa450"; device = "/dev/disk/by-uuid/8b28694c-3401-4545-9974-521674baa450";
fsType = "ext4"; fsType = "ext4";
}; };
@ -38,5 +37,6 @@
# networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true; # networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.intel.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
} }

View file

@ -1,7 +1,6 @@
{pkgs}: let { pkgs }:
image = ./assets/a_forest_of_trees_with_fog.jpg; let image = ./assets/a_forest_of_trees_with_fog.jpg;
in in pkgs.stdenv.mkDerivation {
pkgs.stdenv.mkDerivation {
name = "sddm-theme"; name = "sddm-theme";
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
owner = "MarianArlt"; owner = "MarianArlt";
@ -16,4 +15,4 @@ in
rm Background.jpg rm Background.jpg
cp -r ${image} $out/Background.jpg cp -r ${image} $out/Background.jpg
''; '';
} }

View file

@ -46,12 +46,15 @@
specialArgs = { inherit inputs; }; specialArgs = { inherit inputs; };
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [
{ nixpkgs.overlays = [ nix-openclaw.overlays.default ]; }
disko.nixosModules.disko disko.nixosModules.disko
sops-nix.nixosModules.sops sops-nix.nixosModules.sops
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
{ {
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.backupFileExtension = "backup";
home-manager.extraSpecialArgs = { inherit inputs; }; home-manager.extraSpecialArgs = { inherit inputs; };
home-manager.users.luna = import ./devices/server/luna.nix; home-manager.users.luna = import ./devices/server/luna.nix;
} }

View file

@ -1,5 +1 @@
{...}: { { ... }: { imports = [ ./pocketbase.nix ]; }
imports = [
./pocketbase.nix
];
}

View file

@ -1,10 +1,5 @@
{ { config, pkgs, lib, ... }:
config, let cfg = config.services.pocketbase;
pkgs,
lib,
...
}: let
cfg = config.services.pocketbase;
in { in {
options.services.pocketbase = { options.services.pocketbase = {
enable = lib.mkEnableOption "PocketBase backend"; enable = lib.mkEnableOption "PocketBase backend";
@ -12,7 +7,8 @@ in {
dataDir = lib.mkOption { dataDir = lib.mkOption {
type = lib.types.path; type = lib.types.path;
default = "/var/lib/pocketbase"; default = "/var/lib/pocketbase";
description = "Working directory containing the PocketBase binary and data."; description =
"Working directory containing the PocketBase binary and data.";
}; };
openFirewall = lib.mkOption { openFirewall = lib.mkOption {
@ -47,19 +43,18 @@ in {
description = "Log file used for both stdout and stderr."; description = "Log file used for both stdout and stderr.";
}; };
package = lib.mkPackageOption pkgs "pocketbase" {}; package = lib.mkPackageOption pkgs "pocketbase" { };
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
# Optional: ensure the directory exists with proper ownership # Optional: ensure the directory exists with proper ownership
systemd.tmpfiles.rules = [ systemd.tmpfiles.rules =
"d ${cfg.dataDir} 0700 ${cfg.user} ${cfg.group} -" [ "d ${cfg.dataDir} 0700 ${cfg.user} ${cfg.group} -" ];
];
systemd.services.pocketbase = { systemd.services.pocketbase = {
description = "PocketBase"; description = "PocketBase";
wantedBy = ["multi-user.target"]; wantedBy = [ "multi-user.target" ];
after = ["network.target"]; after = [ "network.target" ];
serviceConfig = { serviceConfig = {
Type = "simple"; Type = "simple";
@ -71,7 +66,11 @@ in {
WorkingDirectory = cfg.dataDir; WorkingDirectory = cfg.dataDir;
ExecStart = '' ExecStart = ''
${lib.getExe cfg.package} serve --dir ${cfg.dataDir}/pb_data --http=0.0.0.0:${toString cfg.port} ${
lib.getExe cfg.package
} serve --dir ${cfg.dataDir}/pb_data --http=0.0.0.0:${
toString cfg.port
}
''; '';
# Switch to systemd stdout/stderr logging by default # Switch to systemd stdout/stderr logging by default
@ -80,8 +79,7 @@ in {
StandardError = "append:${cfg.logFile}"; StandardError = "append:${cfg.logFile}";
}; };
}; };
networking.firewall = lib.mkIf cfg.openFirewall { networking.firewall =
allowedTCPPorts = [cfg.port]; lib.mkIf cfg.openFirewall { allowedTCPPorts = [ cfg.port ]; };
};
}; };
} }

View file

@ -6,11 +6,29 @@ sops:
- recipient: age1x8qsd7kxxjvan4psvnvua3r0emljsnq07agxnu6jqw56ky8z6faqyjq0e3 - recipient: age1x8qsd7kxxjvan4psvnvua3r0emljsnq07agxnu6jqw56ky8z6faqyjq0e3
enc: | enc: |
-----BEGIN AGE ENCRYPTED FILE----- -----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAxN2ZzTUpSeWRWejVxVm4y YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBzRy9DblE4WnhEc1kvcjcw
dzF3MU9DOTBTZUF0Y3I2SUVURGZCZDBqTVV3ClNwL29hejN2OFdVaHk2TEppNWFj ZVBEeVVoRUMxNUZ6Q09QZXdYcEZaSGp0UHpFCnc3UnZOZThLdDYwN05GUjJqYnhK
V3NYcEM4RHNyWUszWFlLa2pXa2FyVmsKLS0tIExOL254cGh4RkJDandqZzJ2RjRi Z0tZMXo2N0J4R2ZPLzRLcS83QVRBZncKLS0tICs3dDVIV0s2ZTRBQk5wMVE3WjVP
b3AxOTd2VmdHdXd5c3NNTkJoYW12bUUKbX199Z7jI6nornm0erzm7dSQ+XuxAnXb NENYZHlvR3U3Um5XWm90RW01eEM3eHMKewyXEa9TInEFz65LoDo8BHBdjibdYF4r
glw60TnUSnLUWIHTTx/jVSRR4uO5I6FzxUUfVJ2BMOn/eUNa5BJ70A== DGQtPlYF5yuVd8PVMATxMBhs/6hXJLfK2Y54NEeJo2gydyq11Lpm2Q==
-----END AGE ENCRYPTED FILE-----
- recipient: age1y2s7ah49jmhd8n05q7tw0gjcnv3390s0uxp3ewjqueekq7a7rvdqzytgd2
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBGMlBaWURCSTd6cjRYTTB1
VWQvTHBFaDgrMFRpb0crRld6ZjVOUXkrb0cwCnFpcE1nSERwUlowRW54SnEwTk9u
S2N1Rm9kUCtWM3pEWmh1aE1HU3oxT1UKLS0tIE5HSXdFT29XazloR0VjVDVqQWVq
RURoYXdtZFh2djVaem15Qjk4UFhBOEEKEjAuKJ8vpVKoBO8ioyH4EcXVmEkfwrQh
JtDzik9QwZgUNdamWu5BhDlNA1Jmu87VYchhR4CXIS5OG4ticUqr7g==
-----END AGE ENCRYPTED FILE-----
- recipient: age107mmu7nkjfpm7ygp25zpj69m06ftckc9gh7a37umkjq0y7ac34msd6uj3u
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBodExKajhTZzRZdWlXWG9n
V09sRDZrK0gvaDI4TmtzUmR0cUF0OFl1OGxJCmNUMk5aWkV3LzYzeTJJMDFlR0p4
Qlp0STk4dFN3WGswb05BRHlOQit2VGMKLS0tIGJTVkp0Y1Yrd2pqMm1yUlJaYkMy
TzlCMWpMQ1hRMTRObWNyN2Q0YWtsZmcKFHVmvu6U0Qw+EUsBEmdST2cyQ3rZyh6w
62vmALGxE2NWDYQmwtHJmYqeO14HHEDclUErQiCmUt+hLgOLF2MxwA==
-----END AGE ENCRYPTED FILE----- -----END AGE ENCRYPTED FILE-----
lastmodified: "2026-02-09T03:39:35Z" lastmodified: "2026-02-09T03:39:35Z"
mac: ENC[AES256_GCM,data:lVU+w4EOpNACzz1CjtBGwGcoB/huatCa97sJ4irzX/dNP8LYwMiRvm6axsyqNiBns76WyKHAS9r+drByQzNAFAIh+2EwJCk7Mm7Njy3+kL0GNd0RanMhI51WSHTbjHIqrGC81jgS4ydcsGDMDmZBOZHL5t/uTcrdn/SRjgDvHTA=,iv:F4kbFHvTFmG4mhvMIAUtNq6WCwXyILOlbYvIaFno6BI=,tag:JSYzsKF86cuJtApPeTVDTA==,type:str] mac: ENC[AES256_GCM,data:lVU+w4EOpNACzz1CjtBGwGcoB/huatCa97sJ4irzX/dNP8LYwMiRvm6axsyqNiBns76WyKHAS9r+drByQzNAFAIh+2EwJCk7Mm7Njy3+kL0GNd0RanMhI51WSHTbjHIqrGC81jgS4ydcsGDMDmZBOZHL5t/uTcrdn/SRjgDvHTA=,iv:F4kbFHvTFmG4mhvMIAUtNq6WCwXyILOlbYvIaFno6BI=,tag:JSYzsKF86cuJtApPeTVDTA==,type:str]