From e47856a88ad428e94ebefceb6dae0c856fe19b64 Mon Sep 17 00:00:00 2001 From: Jeremy Janella Date: Mon, 27 Jul 2026 13:26:12 -0400 Subject: [PATCH 1/4] gitea configs --- .gitignore | 2 + ...figuration.nix => client-configuration.nix | 1 - flake.nix | 19 ++- predator-hardware-configuration.nix | 33 ++++++ server-configuration.nix | 111 ++++++++++++++++++ 5 files changed, 163 insertions(+), 3 deletions(-) create mode 100644 .gitignore rename default-configuration.nix => client-configuration.nix (99%) create mode 100644 predator-hardware-configuration.nix create mode 100644 server-configuration.nix diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7a15953 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.env +.gitea-actions-runner-token diff --git a/default-configuration.nix b/client-configuration.nix similarity index 99% rename from default-configuration.nix rename to client-configuration.nix index 3f3b304..c04d7c4 100644 --- a/default-configuration.nix +++ b/client-configuration.nix @@ -254,7 +254,6 @@ xwayland-satellite # xwayland support fuzzel # menu networkmanagerapplet - wireless-regdb ]; diff --git a/flake.nix b/flake.nix index 8f9d4ea..062defa 100644 --- a/flake.nix +++ b/flake.nix @@ -18,7 +18,7 @@ nixosConfigurations."alien" = nixpkgs.lib.nixosSystem { specialArgs = { inherit inputs; }; modules = [ - ./default-configuration.nix + ./client-configuration.nix ./alien-hardware-configuration.nix home-manager.nixosModules.home-manager { @@ -33,7 +33,7 @@ nixosConfigurations."thinkpad" = nixpkgs.lib.nixosSystem { specialArgs = { inherit inputs; }; modules = [ - ./default-configuration.nix + ./client-configuration.nix ./thinkpad-hardware-configuration.nix home-manager.nixosModules.home-manager { @@ -45,5 +45,20 @@ } ]; }; + nixosConfigurations."predator" = nixpkgs.lib.nixosSystem { + specialArgs = { inherit inputs; }; + modules = [ + ./server-configuration.nix + ./predator-hardware-configuration.nix + home-manager.nixosModules.home-manager + { + nixpkgs.overlays = [ + (final: prev: { + ollama = nixpkgs-unstable.legacyPackages.${prev.system}.ollama; + }) + ]; + } + ]; + }; }; } diff --git a/predator-hardware-configuration.nix b/predator-hardware-configuration.nix new file mode 100644 index 0000000..5c868aa --- /dev/null +++ b/predator-hardware-configuration.nix @@ -0,0 +1,33 @@ +# 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 + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + networking.hostName = "predator"; + services.logind.lidSwitch = "ignore"; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/f4c64434-432c-436b-85b5-168350b33724"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/9566-B0E9"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + swapDevices = [ ]; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/server-configuration.nix b/server-configuration.nix new file mode 100644 index 0000000..bc23d30 --- /dev/null +++ b/server-configuration.nix @@ -0,0 +1,111 @@ + +{ config, lib, pkgs, ... }: + +{ + imports = []; + # Use the systemd-boot EFI boot loader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + nix.settings.experimental-features = [ "nix-command" "flakes" ]; + + networking.networkmanager.enable = true; + networking.firewall.allowedTCPPorts = [22 42069]; + services.openssh = { + enable = true; + ports = [22]; + settings.X11Forwarding = true; + }; + + systemd.services."gitea-runner-homelab".serviceConfig = { + ReadWritePaths = [ "/servers/site" ]; + DynamicUser = lib.mkForce false; + User = lib.mkForce "gitea-runner"; + }; + + environment.binsh = "${pkgs.bash}/bin/bash"; + services.gitea-actions-runner.instances."homelab" = { + enable = true; + url = "https://git.jeremyjanella.com"; + tokenFile = "/servers/gitea/runner-token"; + name = "predator"; + labels = [ "homelab:host" "nixos:host" "predator:host" ]; + settings = { + container.network = "host"; + }; + }; + + time.timeZone = "America/Toronto"; + + virtualisation.docker.enable = true; + + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + backupFileExtension = "not-nix"; # Add this line + users.jeremy = { pkgs, ... }: { + home.stateVersion = "25.11"; + programs.neovim = { # Configure nvim + enable = true; + extraConfig = '' + set number relativenumber + set tabstop=2 + set softtabstop=2 + set shiftwidth=2 + set expandtab + set cc=80 + ''; + }; + }; + }; + + users.users.jeremy = { + isNormalUser = true; + extraGroups = [ "wheel" "docker" "networkmanager" ]; + shell = pkgs.bash; + home = "/home/jeremy"; + createHome = true; + packages = with pkgs; [ + nixfmt # nix file formatting + direnv # develop projects in custom environments + ]; + }; + + users.users.gitea-runner = { + isSystemUser = true; + group = "gitea-runner"; + }; + users.groups.gitea-runner = {}; + + # Use https://search.nixos.org/ to find more packages (and options). + environment.systemPackages = with pkgs; [ + gcc + htop + neovim + wget + ncdu + nmap + git + unzip + bluez # Bluetooth support + bluez-tools # Bluetooth tools + polkit_gnome + usbutils # for lsusb + networkmanagerapplet + wireguard-tools + typst + ]; + + environment.sessionVariables = { + SUDO_EDITOR = "nvim"; + }; + + hardware.bluetooth = { + enable = true; + powerOnBoot = true; + }; + + system.stateVersion = "25.11"; + +} + From a29b3994a3a5ae5fb1edca328d731ca621e9e49b Mon Sep 17 00:00:00 2001 From: Jeremy Janella Date: Mon, 27 Jul 2026 13:30:06 -0400 Subject: [PATCH 2/4] removed contradictiory typst definition --- server-configuration.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/server-configuration.nix b/server-configuration.nix index bc23d30..306761a 100644 --- a/server-configuration.nix +++ b/server-configuration.nix @@ -93,7 +93,6 @@ usbutils # for lsusb networkmanagerapplet wireguard-tools - typst ]; environment.sessionVariables = { From 8fd41b93607e8b27200e10300918e486762fd01c Mon Sep 17 00:00:00 2001 From: jjanella <1+jjanella@noreply.localhost> Date: Mon, 27 Jul 2026 13:31:41 -0400 Subject: [PATCH 3/4] Update server-configuration.nix --- server-configuration.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server-configuration.nix b/server-configuration.nix index 306761a..5545a4f 100644 --- a/server-configuration.nix +++ b/server-configuration.nix @@ -1,4 +1,3 @@ - { config, lib, pkgs, ... }: { @@ -93,6 +92,7 @@ usbutils # for lsusb networkmanagerapplet wireguard-tools + inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.typst # bleeding edge html exports for typst ]; environment.sessionVariables = { From 7c68d3e0d3fed63bdddb71cb160f8a65ef6f1c41 Mon Sep 17 00:00:00 2001 From: jjanella <1+jjanella@noreply.localhost> Date: Mon, 27 Jul 2026 13:32:44 -0400 Subject: [PATCH 4/4] Update server-configuration.nix --- server-configuration.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server-configuration.nix b/server-configuration.nix index 5545a4f..7061d75 100644 --- a/server-configuration.nix +++ b/server-configuration.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ config, lib, pkgs, inputs, ... }: { imports = [];