From cd3ee3e393a845bf06d291a1839ecbbf890dde18 Mon Sep 17 00:00:00 2001 From: ska Date: Fri, 19 Dec 2025 15:41:30 +0000 Subject: [PATCH] Update configuration.nix --- configuration.nix | 39 ++++++++++----------------------------- 1 file changed, 10 insertions(+), 29 deletions(-) diff --git a/configuration.nix b/configuration.nix index 89ccc62..1ed80c9 100644 --- a/configuration.nix +++ b/configuration.nix @@ -1,6 +1,3 @@ -# NixOS USB system with auto-update from public Git repo -# Repo: https://git.skarockoi.de/ska/nixos-production.git - { config, pkgs, ... }: let @@ -9,8 +6,7 @@ let in { - imports = - [ ./hardware-configuration.nix ]; + imports = [ ./hardware-configuration.nix ]; boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; @@ -61,38 +57,23 @@ in nixpkgs.config.allowUnfree = true; environment.systemPackages = with pkgs; [ - git - curl - wget - vim - openssh - obsidian - libreoffice - keepassxc - thunderbird - tor-browser - inkscape - gimp - pdfarranger - epiphany - shortwave - gnomeExtensions.gsconnect - gnomeExtensions.dash-to-dock + git vim curl wget openssh + obsidian libreoffice keepassxc thunderbird tor-browser inkscape gimp pdfarranger + epiphany gnomeExtensions.gsconnect gnomeExtensions.dash-to-dock ]; programs.firefox.enable = true; - # === Auto-update script with proper NIX_PATH for systemd === + # Auto-update script with correct NIX_PATH environment.etc."update-nixos-config.sh".text = '' #!/run/current-system/sw/bin/bash set -e - # Critical: set NIX_PATH so nixos-rebuild can find - export NIX_PATH="nixpkgs=/run/current-system/nixos" - export PATH="/run/current-system/sw/bin:/nix/var/nix/profiles/default/bin" + # Use the standard NixOS channel path for nixpkgs + export NIX_PATH="nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos" - LOCAL_PATH="${gitLocalPath}" - REPO_URL="${gitRepoUrl}" + LOCAL_PATH="/var/lib/nixos-config" + REPO_URL="https://git.skarockoi.de/ska/nixos-production.git" if [ ! -d "$LOCAL_PATH/.git" ]; then mkdir -p "$LOCAL_PATH" @@ -117,7 +98,7 @@ in ''; environment.etc."update-nixos-config.sh".mode = "0700"; - # === Systemd timer: boot + hourly === + # Simple systemd service — no 'path', no 'environment' systemd.services.nixos-git-update = { description = "Update NixOS from public Git config"; script = "/etc/update-nixos-config.sh";