From de53a268196d1caad93f7b3edd3eb5bd07c262b1 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Thu, 18 Sep 2025 17:24:56 -0600 Subject: [PATCH] format nix --- configuration.nix | 224 ++++++++++--------- desktops/cosmic.nix | 10 +- desktops/gnome.nix | 17 +- desktops/herbstluftwm.nix | 13 +- desktops/pantheon.nix | 15 +- desktops/plasma.nix | 26 +-- desktops/sway.nix | 10 +- dev/rust/shell.nix | 31 ++- dev/yocto/shell.nix | 58 ++--- flake.nix | 240 ++++++++++---------- home.nix | 29 +-- homelab/ahoneybun-net/default.nix | 19 +- homelab/audiobookshelf/default.nix | 9 +- homelab/cloudflared/default.nix | 9 +- homelab/forgejo/default.nix | 13 +- homelab/gatus/default.nix | 9 +- homelab/glance/default.nix | 273 ++++++++++++----------- homelab/gollum/default.nix | 21 +- homelab/home-assistant/default.nix | 17 +- homelab/homepage-dashboard/default.nix | 48 ++-- homelab/honeyfetch-app/default.nix | 19 +- homelab/hydra/default.nix | 13 +- homelab/jellyfin/default.nix | 11 +- homelab/kavita/default.nix | 11 +- homelab/komga/default.nix | 9 +- homelab/minecraft/default.nix | 16 +- homelab/navidrome/default.nix | 9 +- homelab/nextcloud/default.nix | 13 +- homelab/photoprism/default.nix | 50 +++-- homelab/transmission/default.nix | 25 ++- homelab/wastebin/default.nix | 13 +- hosts/aarch64/drack/configuration.nix | 23 +- hosts/aarch64/jaal/configuration.nix | 17 +- hosts/aarch64/lexi/configuration.nix | 54 ++--- hosts/aarch64/peebee/configuration.nix | 62 ++--- hosts/aarch64/vetra/bk-config.nix | 71 +++--- hosts/aarch64/vetra/configuration.nix | 58 ++--- hosts/aarch64/vetra/flake.nix | 21 +- hosts/aarch64/vetra/rpi4-example.nix | 35 +-- hosts/flake.nix | 44 ++-- hosts/vm.nix | 12 +- hosts/x86_64/edi/configuration.nix | 76 +++---- hosts/x86_64/garrus/configuration.nix | 16 +- hosts/x86_64/harbinger.nix | 44 ++-- hosts/x86_64/harbinger/configuration.nix | 48 ++-- hosts/x86_64/harbinger/flake.nix | 139 ++++++------ hosts/x86_64/joker/flake.nix | 50 +++-- hosts/x86_64/misc/macbook-intel.nix | 16 +- hosts/x86_64/misc/pixel-slate.nix | 18 +- hosts/x86_64/shepard/configuration.nix | 38 ++-- hosts/x86_64/shepard/flake.nix | 190 ++++++++-------- hosts/x86_64/sovereign/configuration.nix | 68 +++--- hosts/x86_64/sovereign/flake.nix | 164 +++++++------- hosts/x86_64/vm/configuration.nix | 12 +- partitions/luks-btrfs-subvolumes.nix | 10 +- partitions/luks-lvm.nix | 4 +- partitions/simple-efi-swap.nix | 2 +- software/backrest/package.nix | 43 ++-- software/gaming/BAR/shell.nix | 20 +- standalone-home.nix | 28 +-- web/ahoneybun-net.nix | 29 +-- web/cloud-ahoneybun-net.nix | 48 ++-- web/hydra-ahoneybun-net.nix | 61 ++--- web/lamp.nix | 57 ++--- web/mc-ahoneybun-net.nix | 48 ++-- web/nginx-owncast.nix | 12 +- web/rockymtnlug-org.nix | 29 +-- web/stoners-space.nix | 9 +- web/tildecafe-com.nix | 29 +-- 69 files changed, 1585 insertions(+), 1400 deletions(-) diff --git a/configuration.nix b/configuration.nix index 3f4f1f2..8390716 100644 --- a/configuration.nix +++ b/configuration.nix @@ -1,132 +1,134 @@ -{ config, pkgs, lib, inputs, ... }: - { - imports = - [ - ./hardware-configuration.nix - ]; + config, + pkgs, + lib, + inputs, + ... +}: { + imports = [ + ./hardware-configuration.nix + ]; - # Latest kernel -# boot.kernelPackages = pkgs.linuxPackages_latest; + # Latest kernel + # boot.kernelPackages = pkgs.linuxPackages_latest; - boot.loader = { - systemd-boot.enable = true; - systemd-boot.consoleMode = "0"; - systemd-boot.configurationLimit = 5; - }; + boot.loader = { + systemd-boot.enable = true; + systemd-boot.consoleMode = "0"; + systemd-boot.configurationLimit = 5; + }; - boot.plymouth.enable = true; - boot.initrd.systemd.enable = true; - boot.kernelParams = [ "quiet" ]; + boot.plymouth.enable = true; + boot.initrd.systemd.enable = true; + boot.kernelParams = ["quiet"]; - #nix.settings.auto-optimise-store = true; - nix.settings.experimental-features = [ "nix-command" "flakes" ]; + #nix.settings.auto-optimise-store = true; + nix.settings.experimental-features = ["nix-command" "flakes"]; - nix.gc = { - automatic = true; - dates = "weekly"; - options = "--delete-older-than 1w"; - }; + nix.gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 1w"; + }; - swapDevices = [ { - device = "/var/lib/swapfile"; - size = 16*1024; - } ]; + swapDevices = [ + { + device = "/var/lib/swapfile"; + size = 16 * 1024; + } + ]; - zramSwap.enable = true; + zramSwap.enable = true; - networking.networkmanager.enable = true; + networking.networkmanager.enable = true; - # Set your time zone. - time.timeZone = "America/Denver"; + # Set your time zone. + time.timeZone = "America/Denver"; - # Enter keyboard layout - services.xserver.xkb.layout = "us"; + # Enter keyboard layout + services.xserver.xkb.layout = "us"; - # Define user accounts - users.users.aaronh = { - description = "Aaron Honeycutt"; - home = "/home/aaronh"; - extraGroups = [ "wheel" "networkmanager" "adm"]; - isNormalUser = true; - hashedPassword = "$6$aAcbLtqiqzySifls$jdKMOQjoWITHD/dWNNZVUH/qNc6aoJ7v4zYofi0U7IJSVTbmOfChS3mzaJbp57AodjdPNKPrnrip8Nlh2Qanx."; + # Define user accounts + users.users.aaronh = { + description = "Aaron Honeycutt"; + home = "/home/aaronh"; + extraGroups = ["wheel" "networkmanager" "adm"]; + isNormalUser = true; + hashedPassword = "$6$aAcbLtqiqzySifls$jdKMOQjoWITHD/dWNNZVUH/qNc6aoJ7v4zYofi0U7IJSVTbmOfChS3mzaJbp57AodjdPNKPrnrip8Nlh2Qanx."; + }; - }; - - # Allow Unfree - nixpkgs.config.allowUnfree = true; + # Allow Unfree + nixpkgs.config.allowUnfree = true; - # Install some packages - environment.systemPackages = - with pkgs; - [ - # nixpkgs CLI tools - avahi - dmidecode - freshfetch - git - git-lfs - helix - libcamera - lshw - restic - unzip - wget - xz - zellij - zlib - - # GUI tools - firefox - zed-editor + # Install some packages + environment.systemPackages = with pkgs; [ + # nixpkgs CLI tools + avahi + dmidecode + freshfetch + git + git-lfs + helix + libcamera + lshw + restic + unzip + wget + xz + zellij + zlib - # Flake CLI tools - inputs.pinix.packages.${system}.default - inputs.nixpkgs-ahoneybun.packages.${system}.honeyfetch - inputs.nixpkgs-ahoneybun.packages.${system}.naviterm - ]; - - # Enable/Disable hardware - ## Turn off PulseAudio - #services.pulseaudio.enable = false; + # GUI tools + firefox + zed-editor - # Enable Pipewire - security.rtkit.enable = true; - services.pipewire = { + # Flake CLI tools + inputs.pinix.packages.${system}.default + inputs.nixpkgs-ahoneybun.packages.${system}.honeyfetch + inputs.nixpkgs-ahoneybun.packages.${system}.naviterm + ]; + + # Enable/Disable hardware + ## Turn off PulseAudio + #services.pulseaudio.enable = false; + + # Enable Pipewire + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + }; + + # Enable Bluetooth + hardware.bluetooth.enable = true; + + # Enable services + services.fwupd.enable = true; + services.printing.enable = true; + services.openssh.enable = true; + + services.avahi = { + enable = true; + #nssmdns4 = true; + openFirewall = true; + # Needed for detecting scanners + publish = { enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - }; + addresses = true; + userServices = true; + }; + }; - # Enable Bluetooth - hardware.bluetooth.enable = true; + # Scanner support + hardware.sane.enable = true; + hardware.sane.extraBackends = [pkgs.sane-airscan]; + services.ipp-usb.enable = true; - # Enable services - services.fwupd.enable = true; - services.printing.enable = true; - services.openssh.enable = true; + services.hardware.bolt.enable = true; - services.avahi = { - enable = true; - #nssmdns4 = true; - openFirewall = true; - # Needed for detecting scanners - publish = { - enable = true; - addresses = true; - userServices = true; - }; - }; - - # Scanner support - hardware.sane.enable = true; - hardware.sane.extraBackends = [ pkgs.sane-airscan ]; - services.ipp-usb.enable = true; - - services.hardware.bolt.enable = true; - - # System - system.stateVersion = "25.05"; - system.autoUpgrade.enable = true; + # System + system.stateVersion = "25.05"; + system.autoUpgrade.enable = true; } diff --git a/desktops/cosmic.nix b/desktops/cosmic.nix index 16d6fda..ca487cd 100644 --- a/desktops/cosmic.nix +++ b/desktops/cosmic.nix @@ -1,6 +1,8 @@ -{ config, pkgs, ... }: - { + config, + pkgs, + ... +}: { # COSMIC services = { displayManager.cosmic-greeter.enable = true; @@ -8,7 +10,7 @@ }; # Add community COSMIC packages - environment.systemPackages = (with pkgs; [ + environment.systemPackages = with pkgs; [ cosmic-ext-tweaks - ]); + ]; } diff --git a/desktops/gnome.nix b/desktops/gnome.nix index 13d5302..17f3191 100644 --- a/desktops/gnome.nix +++ b/desktops/gnome.nix @@ -1,6 +1,8 @@ -{ config, pkgs, ... }: - { + config, + pkgs, + ... +}: { # GNOME services.xserver = { enable = true; @@ -9,23 +11,22 @@ }; # Add GNOME packages - environment.systemPackages = (with pkgs; [ + environment.systemPackages = with pkgs; [ dconf-editor gedit loupe - ]); + ]; # Remove GNOME packages - environment.gnome.excludePackages = (with pkgs; [ + environment.gnome.excludePackages = with pkgs; [ epiphany # web browser geary gnome-software gnome-connections gnome-photos gnome-tour - ]); + ]; # Services - services.udev.packages = with pkgs; [ gnome-settings-daemon ]; - + services.udev.packages = with pkgs; [gnome-settings-daemon]; } diff --git a/desktops/herbstluftwm.nix b/desktops/herbstluftwm.nix index fd88d14..c94b8f5 100644 --- a/desktops/herbstluftwm.nix +++ b/desktops/herbstluftwm.nix @@ -1,6 +1,8 @@ -{ config, pkgs, ... }: - { + config, + pkgs, + ... +}: { # Start herbstluftwm services.xserver = { enable = true; @@ -8,11 +10,8 @@ windowManager.herbstluftwm.enable = true; }; - environment.systemPackages = (with pkgs; [ + environment.systemPackages = with pkgs; [ polybar # status bar rofi # launcher - ]); + ]; } - - - diff --git a/desktops/pantheon.nix b/desktops/pantheon.nix index bfdf652..fe86753 100644 --- a/desktops/pantheon.nix +++ b/desktops/pantheon.nix @@ -1,15 +1,16 @@ -{ config, pkgs, ... }: - { + config, + pkgs, + ... +}: { # Desktop services.xserver = { enable = true; desktopManager.pantheon.enable = true; }; - - # Remove Pantheon packages - environment.pantheon.excludePackages = (with pkgs; [ - pantheon.appcenter # AppCenter as it can't be used on NixOS - ]); + # Remove Pantheon packages + environment.pantheon.excludePackages = with pkgs; [ + pantheon.appcenter # AppCenter as it can't be used on NixOS + ]; } diff --git a/desktops/plasma.nix b/desktops/plasma.nix index 35a8b93..f5050e6 100644 --- a/desktops/plasma.nix +++ b/desktops/plasma.nix @@ -1,16 +1,16 @@ -{ config, pkgs, ... }: - { - # Plasma - services.displayManager.sddm.enable = true; - services.desktopManager.plasma6.enable = true; + config, + pkgs, + ... +}: { + # Plasma + services.displayManager.sddm.enable = true; + services.desktopManager.plasma6.enable = true; - # Install some packages - environment.systemPackages = - with pkgs; - [ - kdePackages.dragon - kdePackages.merkuro -# kdePackages.neochat # disable due to insecure issue with olm - ]; + # Install some packages + environment.systemPackages = with pkgs; [ + kdePackages.dragon + kdePackages.merkuro + # kdePackages.neochat # disable due to insecure issue with olm + ]; } diff --git a/desktops/sway.nix b/desktops/sway.nix index 70af95b..89d141f 100644 --- a/desktops/sway.nix +++ b/desktops/sway.nix @@ -1,13 +1,15 @@ -{ config, pkgs, ... }: - { + config, + pkgs, + ... +}: { environment.systemPackages = with pkgs; [ alacritty # gpu accelerated terminal sway wayland xdg-utils # for openning default programms when clicking links glib # gsettings - gnome3.adwaita-icon-theme # default gnome cursors + gnome3.adwaita-icon-theme # default gnome cursors swaylock swayidle grim # screenshot functionality @@ -23,7 +25,7 @@ enable = true; wlr.enable = true; # gtk portal needed to make gtk apps happy - extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; + extraPortals = [pkgs.xdg-desktop-portal-gtk]; }; # enable sway window manager diff --git a/dev/rust/shell.nix b/dev/rust/shell.nix index 758ea0b..50d9c4c 100644 --- a/dev/rust/shell.nix +++ b/dev/rust/shell.nix @@ -1,21 +1,20 @@ -{ pkgs ? import {} }: +{pkgs ? import {}}: +pkgs.mkShell { + packages = with pkgs; [ + # Rust + cargo + rustc - pkgs.mkShell { - packages = with pkgs; [ - # Rust - cargo - rustc + # System + pkg-config + util-linux + ]; - # System - pkg-config - util-linux - ]; + #inputsFrom = with pkgs; [ bat ]; - #inputsFrom = with pkgs; [ bat ]; - - RUST_BACKTRACE = 1; + RUST_BACKTRACE = 1; - shellHook = '' - echo "Ready to make some Rust!" - ''; + shellHook = '' + echo "Ready to make some Rust!" + ''; } diff --git a/dev/yocto/shell.nix b/dev/yocto/shell.nix index f8713f0..e21a208 100644 --- a/dev/yocto/shell.nix +++ b/dev/yocto/shell.nix @@ -1,30 +1,30 @@ -{ pkgs ? import {} }: - pkgs.mkShell { - nativeBuildInputs = with pkgs; [ - chrpath - cpio - debianutils - diffstat - file - gawk - git - glibcLocales - gnat - gnumake - iputils - lz4 - # Python 3.12 and packages for it - python312 - python312Packages.jinja2 - python312Packages.gitpython - python312Packages.pexpect - python312Packages.pip - python312Packages.subunit - socat - texinfo - unzip - wget - xz - zstd - ]; +{pkgs ? import {}}: +pkgs.mkShell { + nativeBuildInputs = with pkgs; [ + chrpath + cpio + debianutils + diffstat + file + gawk + git + glibcLocales + gnat + gnumake + iputils + lz4 + # Python 3.12 and packages for it + python312 + python312Packages.jinja2 + python312Packages.gitpython + python312Packages.pexpect + python312Packages.pip + python312Packages.subunit + socat + texinfo + unzip + wget + xz + zstd + ]; } diff --git a/flake.nix b/flake.nix index 1dfb168..b873052 100644 --- a/flake.nix +++ b/flake.nix @@ -1,123 +1,131 @@ { - description = "Generic System Flake file"; + description = "Generic System Flake file"; - inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/release-25.05"; - home-manager = { - url = "github:nix-community/home-manager/release-25.05"; - inputs.nixpkgs.follows = "nixpkgs"; + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/release-25.05"; + home-manager = { + url = "github:nix-community/home-manager/release-25.05"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + nixos-hardware.url = "github:NixOS/nixos-hardware/master"; + helix.url = "github:helix-editor/helix/refs/tags/25.07.1"; + cosmic-unstable.url = "github:ninelore/nixpkgs-cosmic-unstable/main"; + nixpkgs-ahoneybun.url = "gitlab:ahoneybun/nixpkgs/main"; + }; + + outputs = inputs @ { + self, + nixpkgs, + home-manager, + nixos-hardware, + helix, + cosmic-unstable, + nixpkgs-ahoneybun, + ... + }: { + nixosConfigurations = { + "nixos" = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = {inherit inputs;}; + modules = [ + ./gnome.nix + ./configuration.nix + ./hardware-configuration.nix + ]; }; - nixos-hardware.url = "github:NixOS/nixos-hardware/master"; - helix.url = "github:helix-editor/helix/refs/tags/25.07.1"; - cosmic-unstable.url = "github:ninelore/nixpkgs-cosmic-unstable/main"; - nixpkgs-ahoneybun.url = "gitlab:ahoneybun/nixpkgs/main"; - }; - outputs = inputs@{ self, nixpkgs, home-manager, nixos-hardware, helix, cosmic-unstable, nixpkgs-ahoneybun, ... }: { - nixosConfigurations = { - "nixos" = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - specialArgs = { inherit inputs; }; - modules = [ - ./gnome.nix - ./configuration.nix - ./hardware-configuration.nix + "shepard" = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = {inherit inputs;}; + modules = [ + ./gnome.nix + ./shepard.nix + ./configuration.nix + ./hardware-configuration.nix + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.aaronh = import ./home.nix; + } + { + nixpkgs.overlays = [ + (final: prev: { + helix = inputs.helix.packages.${prev.system}.default; + }) ]; - }; - - "shepard" = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - specialArgs = { inherit inputs; }; - modules = [ - ./gnome.nix - ./shepard.nix - ./configuration.nix - ./hardware-configuration.nix - home-manager.nixosModules.home-manager - { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.users.aaronh = import ./home.nix; - } - { - nixpkgs.overlays = [ - (final: prev: { - helix = inputs.helix.packages.${prev.system}.default; - }) - ]; - } - ]; - }; - - "edi" = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - specialArgs = { inherit inputs; }; - modules = [ - ./edi.nix - ./configuration.nix - ./hardware-configuration.nix - ]; - }; - - "garrus" = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - specialArgs = { inherit inputs; }; - modules = [ - ./garrus.nix - #./gnome.nix - ./cosmic.nix - ./configuration.nix - nixos-hardware.nixosModules.system76 - home-manager.nixosModules.home-manager - { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.users.aaronh = import ./home.nix; - } - { - nixpkgs.overlays = [ - (final: prev: { - helix = inputs.helix.packages.${prev.system}.default; - }) - ]; - } - ]; - }; - - "pixel-slate" = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - specialArgs = { inherit inputs; }; - modules = [ - ./pixel-slate.nix - ./configuration.nix - ]; - }; - - "drack" = nixpkgs.lib.nixosSystem { - system = "aarch64-linux"; - specialArgs = { inherit inputs; }; - modules = [ - ./drack.nix - ./gnome.nix - ./configuration.nix - home-manager.nixosModules.home-manager - { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.users.aaronh = import ./home.nix; - } - ]; - }; - - "vm" = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - modules = [ - ./vm.nix - ./configuration.nix - ./hardware-configuration.nix - ]; - }; - + } + ]; }; - }; + + "edi" = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = {inherit inputs;}; + modules = [ + ./edi.nix + ./configuration.nix + ./hardware-configuration.nix + ]; + }; + + "garrus" = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = {inherit inputs;}; + modules = [ + ./garrus.nix + #./gnome.nix + ./cosmic.nix + ./configuration.nix + nixos-hardware.nixosModules.system76 + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.aaronh = import ./home.nix; + } + { + nixpkgs.overlays = [ + (final: prev: { + helix = inputs.helix.packages.${prev.system}.default; + }) + ]; + } + ]; + }; + + "pixel-slate" = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = {inherit inputs;}; + modules = [ + ./pixel-slate.nix + ./configuration.nix + ]; + }; + + "drack" = nixpkgs.lib.nixosSystem { + system = "aarch64-linux"; + specialArgs = {inherit inputs;}; + modules = [ + ./drack.nix + ./gnome.nix + ./configuration.nix + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.aaronh = import ./home.nix; + } + ]; + }; + + "vm" = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + ./vm.nix + ./configuration.nix + ./hardware-configuration.nix + ]; + }; + }; + }; } diff --git a/home.nix b/home.nix index 1af93f2..dd1a82f 100644 --- a/home.nix +++ b/home.nix @@ -1,6 +1,8 @@ -{ config, pkgs, ... }: - { + config, + pkgs, + ... +}: { home = { username = "aaronh"; homeDirectory = "/home/aaronh"; @@ -15,7 +17,7 @@ signal-desktop # CLI ]; - + home.sessionVariables = { EDITOR = "hx"; VISUAL = "hx"; @@ -38,24 +40,24 @@ userName = "Aaron Honeycutt"; userEmail = "aaronhoneycutt@protonmail.com"; aliases = { - undo = "rebase -i HEAD~2"; - amend = "commit -a --amend"; - force = "push -f"; + undo = "rebase -i HEAD~2"; + amend = "commit -a --amend"; + force = "push -f"; }; extraConfig = { color = { - ui = "auto"; + ui = "auto"; }; color.status = { - added = "green bold"; - changed = "yellow bold"; - untracked = "red bold"; + added = "green bold"; + changed = "yellow bold"; + untracked = "red bold"; }; push = { - autoSetupRemote = "true"; + autoSetupRemote = "true"; }; init = { - defaultBranch = "main"; + defaultBranch = "main"; }; core.editor = "hx"; }; @@ -71,7 +73,7 @@ programs.helix = { enable = true; settings = { - theme = "ferra"; + theme = "ferra"; }; }; @@ -81,5 +83,4 @@ # Let Home Manager install and manage itself. programs.home-manager.enable = true; - } diff --git a/homelab/ahoneybun-net/default.nix b/homelab/ahoneybun-net/default.nix index 98f8cc5..0a0cc72 100644 --- a/homelab/ahoneybun-net/default.nix +++ b/homelab/ahoneybun-net/default.nix @@ -1,6 +1,9 @@ -{ config, pkgs, lib, ... }: - { + config, + pkgs, + lib, + ... +}: { services.nginx = { enable = true; virtualHosts."ahoneybun.net" = { @@ -24,14 +27,14 @@ serviceConfig = { ExecStart = "/run/current-system/sw/bin/zola -r /mnt/DATA/Website/ahoneybun-net build"; }; - wantedBy = [ "default.target" ]; + wantedBy = ["default.target"]; }; systemd.user.timers."website-zola-build" = { - wantedBy = [ "timers.target" ]; - timerConfig = { - OnBootSec = "2h"; - OnUnitActiveSec = "7h"; - }; + wantedBy = ["timers.target"]; + timerConfig = { + OnBootSec = "2h"; + OnUnitActiveSec = "7h"; + }; }; } diff --git a/homelab/audiobookshelf/default.nix b/homelab/audiobookshelf/default.nix index b410422..10e8815 100644 --- a/homelab/audiobookshelf/default.nix +++ b/homelab/audiobookshelf/default.nix @@ -1,8 +1,11 @@ -{ config, pkgs, lib, ... }: - { + config, + pkgs, + lib, + ... +}: { services.audiobookshelf = { enable = true; openFirewall = true; }; -} \ No newline at end of file +} diff --git a/homelab/cloudflared/default.nix b/homelab/cloudflared/default.nix index 3770c1d..da0d61f 100644 --- a/homelab/cloudflared/default.nix +++ b/homelab/cloudflared/default.nix @@ -1,6 +1,9 @@ -{ config, pkgs, lib, ... }: - { + config, + pkgs, + lib, + ... +}: { services = { cloudflared = { enable = true; @@ -9,7 +12,7 @@ credentialsFile = "{{/path/to/UUID.json}}"; default = "http_status:404"; ingress = { - "honeycutt.family" = "http://localhost:5678"; # Glances homepage + "honeycutt.family" = "http://localhost:5678"; # Glances homepage "www.honeycutt.family" = "http://localhost:5678"; # Glances homepage "aaron.honeycutt.family" = "http://localhost:80"; # Zola (personal site) "home.honeycutt.family" = "http://10.0.0.200:8123"; # Home Assistant diff --git a/homelab/forgejo/default.nix b/homelab/forgejo/default.nix index a27d434..233a7f7 100644 --- a/homelab/forgejo/default.nix +++ b/homelab/forgejo/default.nix @@ -1,9 +1,12 @@ -{ lib, pkgs, config, ... }: -let +{ + lib, + pkgs, + config, + ... +}: let cfg = config.services.forgejo; srv = cfg.settings.server; -in -{ +in { services.forgejo = { enable = true; database.type = "postgres"; @@ -20,4 +23,4 @@ in service.DISABLE_REGISTRATION = true; }; }; -} \ No newline at end of file +} diff --git a/homelab/gatus/default.nix b/homelab/gatus/default.nix index bb5bd92..1930c54 100644 --- a/homelab/gatus/default.nix +++ b/homelab/gatus/default.nix @@ -1,6 +1,9 @@ -{ config, pkgs, lib, ... }: - { + config, + pkgs, + lib, + ... +}: { services.gatus = { enable = true; openFirewall = true; @@ -61,4 +64,4 @@ ]; }; }; -} \ No newline at end of file +} diff --git a/homelab/glance/default.nix b/homelab/glance/default.nix index 4629eeb..97c928a 100644 --- a/homelab/glance/default.nix +++ b/homelab/glance/default.nix @@ -1,6 +1,9 @@ -{ config, pkgs, lib, ... }: - -{ +{ + config, + pkgs, + lib, + ... +}: { services.glance = { enable = true; openFirewall = true; @@ -9,138 +12,140 @@ host = "0.0.0.0"; port = 5678; }; - theme = { - background-color = "270 5 17"; - primary-color = "21 97 85"; - negative-color = "358 100 68"; - contrast-multiplier = 1.2; + theme = { + background-color = "270 5 17"; + primary-color = "21 97 85"; + negative-color = "358 100 68"; + contrast-multiplier = 1.2; }; - pages = [{ - name = "Home"; - hide-desktop-navigation = true; - center-vertically = true; - columns = [ - { - size = "small"; - widgets = [ - { - type = "clock"; - hour-format = "24h"; - timezones = [ - { - timezone = "Asia/Tokyo"; - label = "Tokyo"; - } - { - timezone = "Europe/Dublin"; - label = "Dublin"; - } - ]; - } - { - type = "calendar"; - } - { - type = "weather"; - units = "imperial"; - hour-format = "24h"; - location = "Aurora, Colorado, United States"; - } - ]; - } - { - size = "full"; - widgets = [ - { - type = "search"; - search-engine = "duckduckgo"; - new-tab = true; - } - { - type = "bookmarks"; - groups = [ - { - title = "Media"; - color = "17 100 74"; - links = [ - { - title = "Music"; - url = "https://music.ahoneybun.net/"; - } - { - title = "Videos"; - url = "https://videos.ahoneybun.net/"; - } - { - title = "Photos"; - url = "https://photos.ahoneybun.net/"; - } - { - title = "Audiobooks"; - url = "https://audiobookshelf.ahoneybun.net/"; - } - { - title = "Books & Comics"; - url = "https://books.ahoneybun.net/"; - } - ]; - } - { - title = "Infrastructure"; - color = "355 65 65"; - links = [ - { - title = "Forgejo"; - url = "https://git.ahoneybun.net/"; - } - ]; - } - { - title = "Knowledge"; - color = "240 19 85"; - links = [ - { - title = "Personal Wiki"; - url = "https://wiki.ahoneybun.net/"; - } - ]; - } - ]; - } - { - type = "monitor"; - title = "Services"; - sites = [ - { - title = "Navidrome"; - url = "https://music.ahoneybun.net/"; - } - { - title = "Jellyfin"; - url = "https://videos.ahoneybun.net/"; - } - { - title = "Immich"; - url = "https://photos.ahoneybun.net/"; - } - { - title = "Forgejo"; - url = "https://git.ahoneybun.net"; - } - { - title = "Gollum"; - url = "https://wiki.ahoneybun.net"; - } - { - title = "Wastebin"; - url = "https://bin.ahoneybun.net"; - } - ]; - } - ]; - } - ]; - }]; + pages = [ + { + name = "Home"; + hide-desktop-navigation = true; + center-vertically = true; + columns = [ + { + size = "small"; + widgets = [ + { + type = "clock"; + hour-format = "24h"; + timezones = [ + { + timezone = "Asia/Tokyo"; + label = "Tokyo"; + } + { + timezone = "Europe/Dublin"; + label = "Dublin"; + } + ]; + } + { + type = "calendar"; + } + { + type = "weather"; + units = "imperial"; + hour-format = "24h"; + location = "Aurora, Colorado, United States"; + } + ]; + } + { + size = "full"; + widgets = [ + { + type = "search"; + search-engine = "duckduckgo"; + new-tab = true; + } + { + type = "bookmarks"; + groups = [ + { + title = "Media"; + color = "17 100 74"; + links = [ + { + title = "Music"; + url = "https://music.ahoneybun.net/"; + } + { + title = "Videos"; + url = "https://videos.ahoneybun.net/"; + } + { + title = "Photos"; + url = "https://photos.ahoneybun.net/"; + } + { + title = "Audiobooks"; + url = "https://audiobookshelf.ahoneybun.net/"; + } + { + title = "Books & Comics"; + url = "https://books.ahoneybun.net/"; + } + ]; + } + { + title = "Infrastructure"; + color = "355 65 65"; + links = [ + { + title = "Forgejo"; + url = "https://git.ahoneybun.net/"; + } + ]; + } + { + title = "Knowledge"; + color = "240 19 85"; + links = [ + { + title = "Personal Wiki"; + url = "https://wiki.ahoneybun.net/"; + } + ]; + } + ]; + } + { + type = "monitor"; + title = "Services"; + sites = [ + { + title = "Navidrome"; + url = "https://music.ahoneybun.net/"; + } + { + title = "Jellyfin"; + url = "https://videos.ahoneybun.net/"; + } + { + title = "Immich"; + url = "https://photos.ahoneybun.net/"; + } + { + title = "Forgejo"; + url = "https://git.ahoneybun.net"; + } + { + title = "Gollum"; + url = "https://wiki.ahoneybun.net"; + } + { + title = "Wastebin"; + url = "https://bin.ahoneybun.net"; + } + ]; + } + ]; + } + ]; + } + ]; }; }; } diff --git a/homelab/gollum/default.nix b/homelab/gollum/default.nix index 938544c..6aa6018 100644 --- a/homelab/gollum/default.nix +++ b/homelab/gollum/default.nix @@ -1,26 +1,29 @@ -{ config, pkgs, lib, ... }: - { + config, + pkgs, + lib, + ... +}: { services.gollum = { enable = true; no-edit = true; stateDir = "/mnt/DATA/Wiki"; }; - + systemd.user.services."wiki-git-update" = { enable = true; description = "wiki-git-update runs git to pull latest wiki changes"; serviceConfig = { ExecStart = "/run/current-system/sw/bin/git -C /mnt/DATA/knowledge-base pull"; }; - wantedBy = [ "default.target" ]; + wantedBy = ["default.target"]; }; systemd.user.timers."wiki-git-update" = { - wantedBy = [ "timers.target" ]; - timerConfig = { - OnBootSec = "1h"; - OnUnitActiveSec = "6h"; - }; + wantedBy = ["timers.target"]; + timerConfig = { + OnBootSec = "1h"; + OnUnitActiveSec = "6h"; + }; }; } diff --git a/homelab/home-assistant/default.nix b/homelab/home-assistant/default.nix index 998b8a4..498fd3c 100644 --- a/homelab/home-assistant/default.nix +++ b/homelab/home-assistant/default.nix @@ -1,6 +1,9 @@ -{ config, pkgs, lib, ... }: - { + config, + pkgs, + lib, + ... +}: { services.home-assistant = { enable = true; extraComponents = [ @@ -24,11 +27,11 @@ # https://www.home-assistant.io/integrations/default_config/ default_config = {}; homeassistant = { - unit_system = "imperial"; - temperature_unit = "F"; - time_zone = "America/Denver"; + unit_system = "imperial"; + temperature_unit = "F"; + time_zone = "America/Denver"; }; - feedreader.urls = [ "https://nixos.org/blogs.xml" ]; + feedreader.urls = ["https://nixos.org/blogs.xml"]; }; }; -} \ No newline at end of file +} diff --git a/homelab/homepage-dashboard/default.nix b/homelab/homepage-dashboard/default.nix index 88d982e..57f9fb7 100644 --- a/homelab/homepage-dashboard/default.nix +++ b/homelab/homepage-dashboard/default.nix @@ -8,14 +8,34 @@ color = "neutral"; headerStyle = "boxed"; layout = { - media = { style = "row"; columns = 4; }; - infra = { style = "row"; columns = 2; }; - games = { style = "row"; columns = 1; }; + media = { + style = "row"; + columns = 4; + }; + infra = { + style = "row"; + columns = 2; + }; + games = { + style = "row"; + columns = 1; + }; }; }; widgets = [ - { resources = { label = "system"; cpu = true; memory = true; }; } - { resources = { label = "storage"; disk = [ "/mnt/DATA" ]; }; } + { + resources = { + label = "system"; + cpu = true; + memory = true; + }; + } + { + resources = { + label = "storage"; + disk = ["/mnt/DATA"]; + }; + } ]; services = [ { @@ -69,14 +89,14 @@ } { Audiobookshelf = { - icon = "audiobookshelf.png"; - href = "https://audiobookshelf.ahoneybun.net"; - description = "audiobook player"; - widget = { - type = "audiobookshelf"; - url = "https://audiobookshelf.ahoneybun.net"; - key = ""; - }; + icon = "audiobookshelf.png"; + href = "https://audiobookshelf.ahoneybun.net"; + description = "audiobook player"; + widget = { + type = "audiobookshelf"; + url = "https://audiobookshelf.ahoneybun.net"; + key = ""; + }; }; } ]; @@ -116,4 +136,4 @@ } ]; }; -} \ No newline at end of file +} diff --git a/homelab/honeyfetch-app/default.nix b/homelab/honeyfetch-app/default.nix index 442e5f2..a91a40b 100644 --- a/homelab/honeyfetch-app/default.nix +++ b/homelab/honeyfetch-app/default.nix @@ -1,6 +1,9 @@ -{ config, pkgs, lib, ... }: - { + config, + pkgs, + lib, + ... +}: { services.nginx = { enable = true; virtualHosts."honeyfetch.app" = { @@ -30,14 +33,14 @@ serviceConfig = { ExecStart = "/run/current-system/sw/bin/zola -r /mnt/DATA/honeyfetch-website build"; }; - wantedBy = [ "default.target" ]; + wantedBy = ["default.target"]; }; systemd.user.timers."honeyfetch-website-zola-build" = { - wantedBy = [ "timers.target" ]; - timerConfig = { - OnBootSec = "2h"; - OnUnitActiveSec = "7h"; - }; + wantedBy = ["timers.target"]; + timerConfig = { + OnBootSec = "2h"; + OnUnitActiveSec = "7h"; + }; }; } diff --git a/homelab/hydra/default.nix b/homelab/hydra/default.nix index e6c46ba..8f65416 100644 --- a/homelab/hydra/default.nix +++ b/homelab/hydra/default.nix @@ -1,10 +1,13 @@ -{ config, pkgs, lib, ... }: - { + config, + pkgs, + lib, + ... +}: { services.hydra = { enable = true; hydraURL = "localhost:3000"; - buildMachinesFiles = [ "/etc/nix/machines" ]; + buildMachinesFiles = ["/etc/nix/machines"]; notificationSender = "hydra@localhost"; useSubstitutes = true; }; @@ -13,8 +16,8 @@ { hostName = "localhost"; protocol = null; -# system = "x86_64-linux"; - systems = [ "x86_64-linux" "aarch64-linux" ]; + # system = "x86_64-linux"; + systems = ["x86_64-linux" "aarch64-linux"]; supportedFeatures = ["kvm" "nixos-test" "big-parallel" "benchmark"]; maxJobs = 8; } diff --git a/homelab/jellyfin/default.nix b/homelab/jellyfin/default.nix index 687e4f1..5aa81c2 100644 --- a/homelab/jellyfin/default.nix +++ b/homelab/jellyfin/default.nix @@ -1,9 +1,12 @@ -{ config, pkgs, lib, ... }: - { + config, + pkgs, + lib, + ... +}: { services.jellyfin = { - enable = true; - user = "aaronh"; + enable = true; + user = "aaronh"; }; environment.systemPackages = with pkgs; [ jellyfin diff --git a/homelab/kavita/default.nix b/homelab/kavita/default.nix index f9a2727..9f95a56 100644 --- a/homelab/kavita/default.nix +++ b/homelab/kavita/default.nix @@ -1,8 +1,11 @@ -{ config, pkgs, lib, ... }: - { + config, + pkgs, + lib, + ... +}: { services.kavita = { - enable = true; - # tokenKeyFile = "/home/aaronh/TokenKey"; # Update depending on the setup + enable = true; + # tokenKeyFile = "/home/aaronh/TokenKey"; # Update depending on the setup }; } diff --git a/homelab/komga/default.nix b/homelab/komga/default.nix index 0f9fe3b..bfb0b31 100644 --- a/homelab/komga/default.nix +++ b/homelab/komga/default.nix @@ -1,8 +1,11 @@ -{ config, pkgs, lib, ... }: - { + config, + pkgs, + lib, + ... +}: { services.komga = { enable = true; openFirewall = true; }; -} \ No newline at end of file +} diff --git a/homelab/minecraft/default.nix b/homelab/minecraft/default.nix index 7e75c0d..eaae53f 100644 --- a/homelab/minecraft/default.nix +++ b/homelab/minecraft/default.nix @@ -1,10 +1,12 @@ -{ config, pkgs, lib, ... }: - { + config, + pkgs, + lib, + ... +}: { services.minecraft-server = { - enable = true; - eula = true; - openFirewall = true; + enable = true; + eula = true; + openFirewall = true; }; - -} \ No newline at end of file +} diff --git a/homelab/navidrome/default.nix b/homelab/navidrome/default.nix index 5ab96f4..6c92e72 100644 --- a/homelab/navidrome/default.nix +++ b/homelab/navidrome/default.nix @@ -1,6 +1,9 @@ -{ config, pkgs, lib, ... }: - { + config, + pkgs, + lib, + ... +}: { services.navidrome = { enable = true; user = "aaronh"; @@ -11,4 +14,4 @@ MusicFolder = "/mnt/DATA/Media/Music"; }; }; -} \ No newline at end of file +} diff --git a/homelab/nextcloud/default.nix b/homelab/nextcloud/default.nix index c3d3d60..d7db6b1 100644 --- a/homelab/nextcloud/default.nix +++ b/homelab/nextcloud/default.nix @@ -1,6 +1,9 @@ -{ config, pkgs, lib, ... }: - { + config, + pkgs, + lib, + ... +}: { environment.etc."nextcloud-admin-pass".text = "test123"; services.nextcloud = { enable = true; @@ -8,8 +11,8 @@ package = pkgs.nextcloud28; hostName = "localhost"; config = { - adminpassFile = "/etc/nextcloud-admin-pass"; + adminpassFile = "/etc/nextcloud-admin-pass"; }; - settings.trusted_domains = [ "10.0.0.10*" ]; + settings.trusted_domains = ["10.0.0.10*"]; }; -} \ No newline at end of file +} diff --git a/homelab/photoprism/default.nix b/homelab/photoprism/default.nix index 82d79c8..567b4f6 100644 --- a/homelab/photoprism/default.nix +++ b/homelab/photoprism/default.nix @@ -1,20 +1,23 @@ -{ config, pkgs, lib, ... }: - { + config, + pkgs, + lib, + ... +}: { services.photoprism = { - enable = true; - port = 2342; - originalsPath = "/mnt/DATA/Media/Photos"; - address = "0.0.0.0"; - settings = { - PHOTOPRISM_ADMIN_USER = "admin"; - PHOTOPRISM_ADMIN_PASSWORD = "admin"; - PHOTOPRISM_DEFAULT_LOCALE = "en"; - PHOTOPRISM_DATABASE_DRIVER = "mysql"; - PHOTOPRISM_DATABASE_NAME = "photoprism"; - PHOTOPRISM_DATABASE_SERVER = "/var/run/mysqld/mysqld.sock"; - PHOTOPRISM_DATABASE_USER = "photoprism"; - }; + enable = true; + port = 2342; + originalsPath = "/mnt/DATA/Media/Photos"; + address = "0.0.0.0"; + settings = { + PHOTOPRISM_ADMIN_USER = "admin"; + PHOTOPRISM_ADMIN_PASSWORD = "admin"; + PHOTOPRISM_DEFAULT_LOCALE = "en"; + PHOTOPRISM_DATABASE_DRIVER = "mysql"; + PHOTOPRISM_DATABASE_NAME = "photoprism"; + PHOTOPRISM_DATABASE_SERVER = "/var/run/mysqld/mysqld.sock"; + PHOTOPRISM_DATABASE_USER = "photoprism"; + }; }; # MySQL @@ -22,13 +25,14 @@ enable = true; dataDir = "/var/lib/mysql"; package = pkgs.mariadb; - ensureDatabases = [ "photoprism" ]; - ensureUsers = [ { - name = "photoprism"; - ensurePermissions = { - "photoprism.*" = "ALL PRIVILEGES"; - }; - } ]; + ensureDatabases = ["photoprism"]; + ensureUsers = [ + { + name = "photoprism"; + ensurePermissions = { + "photoprism.*" = "ALL PRIVILEGES"; + }; + } + ]; }; - } diff --git a/homelab/transmission/default.nix b/homelab/transmission/default.nix index 36ae441..c09712d 100644 --- a/homelab/transmission/default.nix +++ b/homelab/transmission/default.nix @@ -1,14 +1,17 @@ -{ config, pkgs, lib, ... }: - { + config, + pkgs, + lib, + ... +}: { services.transmission = { - enable = true; - openFirewall = true; - settings = { - download-dir = "/mnt/DATA/Downloads"; - rpc-bind-address = "0.0.0.0"; - rpc-host-whitelist-enabled = false; - rpc-whitelist-enabled = false; - }; + enable = true; + openFirewall = true; + settings = { + download-dir = "/mnt/DATA/Downloads"; + rpc-bind-address = "0.0.0.0"; + rpc-host-whitelist-enabled = false; + rpc-whitelist-enabled = false; + }; }; -} \ No newline at end of file +} diff --git a/homelab/wastebin/default.nix b/homelab/wastebin/default.nix index afa16c7..e97df39 100644 --- a/homelab/wastebin/default.nix +++ b/homelab/wastebin/default.nix @@ -1,8 +1,11 @@ -{ config, pkgs, lib, ... }: - { + config, + pkgs, + lib, + ... +}: { services.wastebin = { - enable = true; - settings.WASTEBIN_BASE_URL = "https://bin.ahoneybun.net"; + enable = true; + settings.WASTEBIN_BASE_URL = "https://bin.ahoneybun.net"; }; -} \ No newline at end of file +} diff --git a/hosts/aarch64/drack/configuration.nix b/hosts/aarch64/drack/configuration.nix index 79ff763..4f8633e 100644 --- a/hosts/aarch64/drack/configuration.nix +++ b/hosts/aarch64/drack/configuration.nix @@ -1,13 +1,15 @@ -{ config, pkgs, lib, ... }: - { - imports = - [ - ./hardware-configuration.nix - ]; + config, + pkgs, + lib, + ... +}: { + imports = [ + ./hardware-configuration.nix + ]; - boot.kernelParams = [ - "console=tty0" + boot.kernelParams = [ + "console=tty0" "clk_ignore_unused" "pd_ignore_unused" "arm64.nopauth" @@ -43,10 +45,10 @@ "msm" # USB (required for installation from USB) - "qcom_q6v5_pas" # This module loads a lot of FW blobs + "qcom_q6v5_pas" # This module loads a lot of FW blobs "usb_storage" "uas" - ]; + ]; networking.hostName = "drack"; @@ -56,5 +58,4 @@ # Set wifi MAC on X13s SUBSYSTEM=="net", ACTION=="add", ATTRS{vendor}=="0x17cb", ATTRS{device}=="0x1103", PROGRAM="/usr/share/ubuntu-x13s-settings/set-wifi-mac-addr %k" ''; - } diff --git a/hosts/aarch64/jaal/configuration.nix b/hosts/aarch64/jaal/configuration.nix index 2e7640e..f2f37fd 100644 --- a/hosts/aarch64/jaal/configuration.nix +++ b/hosts/aarch64/jaal/configuration.nix @@ -1,13 +1,14 @@ -{ config, pkgs, lib, ... }: - { - imports = - [ - ./hardware-configuration.nix - ]; + config, + pkgs, + lib, + ... +}: { + imports = [ + ./hardware-configuration.nix + ]; - boot.kernelParams = [ "console=tty0" ]; + boot.kernelParams = ["console=tty0"]; networking.hostName = "jaal"; - } diff --git a/hosts/aarch64/lexi/configuration.nix b/hosts/aarch64/lexi/configuration.nix index 47aa27f..aa51b3f 100644 --- a/hosts/aarch64/lexi/configuration.nix +++ b/hosts/aarch64/lexi/configuration.nix @@ -1,8 +1,11 @@ -{ config, lib, pkgs, ... }: - { + config, + lib, + pkgs, + ... +}: { imports = [ - (import { device = "oneplus-fajita"; }) + (import {device = "oneplus-fajita";}) ./hardware-configuration.nix ]; @@ -11,7 +14,7 @@ # boot.kernelPackages = pkgs.linuxPackages_latest; nix.settings.auto-optimise-store = true; - nix.settings.experimental-features = [ "nix-command" "flakes" ]; + nix.settings.experimental-features = ["nix-command" "flakes"]; nix.gc = { automatic = true; @@ -23,24 +26,24 @@ networking.wireless.enable = false; networking.networkmanager.enable = true; networking.hostName = "lexi"; - + # SSH services.openssh = { enable = true; - }; + }; # Use PulseAudio hardware.pulseaudio.enable = true; - + # Enable Bluetooth hardware.bluetooth.enable = true; - + # Bluetooth audio hardware.pulseaudio.package = pkgs.pulseaudioFull; - + # Enable power management options powerManagement.enable = true; - + # It's recommended to keep enabled on these constrained devices zramSwap.enable = true; @@ -50,7 +53,7 @@ }; time.timeZone = "America/Denver"; - + users.users."aaronh" = { isNormalUser = true; description = "Aaron Honeycutt"; @@ -63,23 +66,24 @@ "wheel" ]; - # GUI - packages = with pkgs; [ - portfolio-filemanager + # GUI + packages = with pkgs; [ + portfolio-filemanager - # CLI - grim + # CLI + grim ]; - }; + }; # Remove GNOME packages - environment.gnome.excludePackages = (with pkgs; [ - gnome-photos - gnome-tour - ]); + environment.gnome.excludePackages = with pkgs; [ + gnome-photos + gnome-tour + ]; - environment.systemPackages = (with pkgs; [ - # rest of your packages - ]); + environment.systemPackages = with pkgs; [ + # rest of your packages + ]; - system.stateVersion = "23.11"; + system.stateVersion = "25.05"; +} diff --git a/hosts/aarch64/peebee/configuration.nix b/hosts/aarch64/peebee/configuration.nix index 6bb0749..d837772 100644 --- a/hosts/aarch64/peebee/configuration.nix +++ b/hosts/aarch64/peebee/configuration.nix @@ -1,22 +1,25 @@ -{ config, lib, pkgs, ... }: - { + config, + lib, + pkgs, + ... +}: { imports = [ - (import { device = "pine64-pinephone"; }) + (import {device = "pine64-pinephone";}) ./hardware-configuration.nix ]; - fileSystems."/mnt/ExtraDrive" = - { device = "/dev/disk/by-uuid/631d2b85-2e0b-4740-8b45-6147cf15193f"; - fsType = "ext4"; - }; + fileSystems."/mnt/ExtraDrive" = { + device = "/dev/disk/by-uuid/631d2b85-2e0b-4740-8b45-6147cf15193f"; + fsType = "ext4"; + }; # Kernel changes # boot.kernelPackages = pkgs.linuxPackages_latest; nix.settings.auto-optimise-store = true; - nix.settings.experimental-features = [ "nix-command" "flakes" ]; + nix.settings.experimental-features = ["nix-command" "flakes"]; nix.gc = { automatic = true; @@ -28,24 +31,24 @@ networking.wireless.enable = false; networking.networkmanager.enable = true; networking.hostName = "peebee"; - + # SSH services.openssh = { enable = true; - }; + }; # Use PulseAudio hardware.pulseaudio.enable = true; - + # Enable Bluetooth hardware.bluetooth.enable = true; - + # Bluetooth audio hardware.pulseaudio.package = pkgs.pulseaudioFull; - + # Enable power management options powerManagement.enable = true; - + # It's recommended to keep enabled on these constrained devices zramSwap.enable = true; @@ -55,7 +58,7 @@ }; time.timeZone = "America/Denver"; - + users.users."aaronh" = { isNormalUser = true; description = "Aaron Honeycutt"; @@ -68,23 +71,24 @@ "wheel" ]; - # GUI - packages = with pkgs; [ - portfolio-filemanager + # GUI + packages = with pkgs; [ + portfolio-filemanager - # CLI - grim + # CLI + grim ]; - }; + }; # Remove GNOME packages - environment.gnome.excludePackages = (with pkgs; [ - gnome-photos - gnome-tour - ]); + environment.gnome.excludePackages = with pkgs; [ + gnome-photos + gnome-tour + ]; - environment.systemPackages = (with pkgs; [ - # rest of your packages - ]); + environment.systemPackages = with pkgs; [ + # rest of your packages + ]; - system.stateVersion = "23.11"; + system.stateVersion = "25.05"; +} diff --git a/hosts/aarch64/vetra/bk-config.nix b/hosts/aarch64/vetra/bk-config.nix index fc8f66b..d49e759 100644 --- a/hosts/aarch64/vetra/bk-config.nix +++ b/hosts/aarch64/vetra/bk-config.nix @@ -1,32 +1,33 @@ -{ config, pkgs, lib, ... }: - { + config, + pkgs, + lib, + ... +}: { imports = [ -# ./gnome.nix - ]; + # ./gnome.nix + ]; boot = { kernelPackages = pkgs.linuxKernel.packages.linux_rpi4; - initrd.availableKernelModules = [ "xhci_pci" "usbhid" "usb_storage" ]; + initrd.availableKernelModules = ["xhci_pci" "usbhid" "usb_storage"]; loader = { - grub.enable = false; generic-extlinux-compatible.enable = true; - }; }; -# boot.kernelPackages = pkgs.linuxPackages_latest; + # boot.kernelPackages = pkgs.linuxPackages_latest; - nix.settings.experimental-features = [ "nix-command" "flakes" ]; + nix.settings.experimental-features = ["nix-command" "flakes"]; fileSystems = { "/" = { device = "/dev/disk/by-label/NIXOS_SD"; fsType = "ext4"; - options = [ "noatime" ]; + options = ["noatime"]; }; }; @@ -38,33 +39,31 @@ # Set your time zone. time.timeZone = "America/Denver"; - environment.systemPackages = - with pkgs; - [ - git - neofetch - restic - wget - ]; + environment.systemPackages = with pkgs; [ + git + neofetch + restic + wget + ]; # Define user accounts - users.users.aaronh = { - description = "Aaron Honeycutt"; - home = "/home/aaronh"; - extraGroups = [ "wheel" "networkmanager" "adm"]; - isNormalUser = true; - hashedPassword = "$6$aAcbLtqiqzySifls$jdKMOQjoWITHD/dWNNZVUH/qNc6aoJ7v4zYofi0U7IJSVTbmOfChS3mzaJbp57AodjdPNKPrnrip8Nlh2Qanx."; - }; + users.users.aaronh = { + description = "Aaron Honeycutt"; + home = "/home/aaronh"; + extraGroups = ["wheel" "networkmanager" "adm"]; + isNormalUser = true; + hashedPassword = "$6$aAcbLtqiqzySifls$jdKMOQjoWITHD/dWNNZVUH/qNc6aoJ7v4zYofi0U7IJSVTbmOfChS3mzaJbp57AodjdPNKPrnrip8Nlh2Qanx."; + }; # Enable Pipewire - security.rtkit.enable = true; - services.pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - }; - + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + }; + # Turn off PulseAudio hardware.pulseaudio.enable = false; @@ -76,7 +75,7 @@ # Enable CUPS services.printing.enable = true; - + # Allow Unfree nixpkgs.config.allowUnfree = true; @@ -87,8 +86,8 @@ buildMachinesFiles = []; useSubstitutes = true; }; - - # System + + # System system.stateVersion = "24.05"; system.autoUpgrade.enable = true; } diff --git a/hosts/aarch64/vetra/configuration.nix b/hosts/aarch64/vetra/configuration.nix index f2ad7c5..09e278a 100644 --- a/hosts/aarch64/vetra/configuration.nix +++ b/hosts/aarch64/vetra/configuration.nix @@ -1,13 +1,17 @@ -{ config, pkgs, lib, inputs, ... }: - { + config, + pkgs, + lib, + inputs, + ... +}: { imports = [ -# ./gnome.nix + # ./gnome.nix ]; boot = { kernelPackages = pkgs.linuxKernel.packages.linux_rpi4; - initrd.availableKernelModules = [ "xhci_pci" "usbhid" "usb_storage" ]; + initrd.availableKernelModules = ["xhci_pci" "usbhid" "usb_storage"]; loader = { grub.enable = false; @@ -15,13 +19,13 @@ }; }; - nix.settings.experimental-features = [ "nix-command" "flakes" ]; + nix.settings.experimental-features = ["nix-command" "flakes"]; fileSystems = { "/" = { device = "/dev/disk/by-label/NIXOS_SD"; fsType = "ext4"; - options = [ "noatime" ]; + options = ["noatime"]; }; }; @@ -33,33 +37,31 @@ # Set your time zone. time.timeZone = "America/Denver"; - environment.systemPackages = - with pkgs; - [ - git - restic - wget + environment.systemPackages = with pkgs; [ + git + restic + wget - inputs.nixpkgs-ahoneybun.packages.${system}.honeyfetch - ]; + inputs.nixpkgs-ahoneybun.packages.${system}.honeyfetch + ]; # Define user accounts - users.users.aaronh = { - description = "Aaron Honeycutt"; - home = "/home/aaronh"; - extraGroups = [ "wheel" "networkmanager" "adm"]; - isNormalUser = true; - hashedPassword = "$6$aAcbLtqiqzySifls$jdKMOQjoWITHD/dWNNZVUH/qNc6aoJ7v4zYofi0U7IJSVTbmOfChS3mzaJbp57AodjdPNKPrnrip8Nlh2Qanx."; - }; + users.users.aaronh = { + description = "Aaron Honeycutt"; + home = "/home/aaronh"; + extraGroups = ["wheel" "networkmanager" "adm"]; + isNormalUser = true; + hashedPassword = "$6$aAcbLtqiqzySifls$jdKMOQjoWITHD/dWNNZVUH/qNc6aoJ7v4zYofi0U7IJSVTbmOfChS3mzaJbp57AodjdPNKPrnrip8Nlh2Qanx."; + }; # Enable Pipewire - security.rtkit.enable = true; - services.pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - }; + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + }; # Turn off PulseAudio hardware.pulseaudio.enable = false; diff --git a/hosts/aarch64/vetra/flake.nix b/hosts/aarch64/vetra/flake.nix index ffa883a..ee27aa4 100644 --- a/hosts/aarch64/vetra/flake.nix +++ b/hosts/aarch64/vetra/flake.nix @@ -11,16 +11,23 @@ nixpkgs-ahoneybun.url = "gitlab:ahoneybun-nix/nixpkgs/main"; }; - outputs = inputs@{ self, nixpkgs, home-manager, nixos-hardware, nixpkgs-ahoneybun, ... }: { + outputs = inputs @ { + self, + nixpkgs, + home-manager, + nixos-hardware, + nixpkgs-ahoneybun, + ... + }: { nixosConfigurations = { "vetra" = nixpkgs.lib.nixosSystem { system = "aarch64-linux"; - specialArgs = { inherit inputs; }; + specialArgs = {inherit inputs;}; modules = [ - nixos-hardware.nixosModules.raspberry-pi-4 + nixos-hardware.nixosModules.raspberry-pi-4 ./configuration.nix - ]; - }; - }; - }; + ]; + }; + }; + }; } diff --git a/hosts/aarch64/vetra/rpi4-example.nix b/hosts/aarch64/vetra/rpi4-example.nix index 1903f87..ebe1285 100644 --- a/hosts/aarch64/vetra/rpi4-example.nix +++ b/hosts/aarch64/vetra/rpi4-example.nix @@ -1,47 +1,50 @@ -{ config, pkgs, lib, ... }: - -let +{ + config, + pkgs, + lib, + ... +}: let SSID = "Honeycutt-5G"; SSIDpassword = "Frappe92"; interface = "wlan0"; hostname = "NixOS"; in { - imports = ["${fetchTarball "https://github.com/NixOS/nixos-hardware/archive/936e4649098d6a5e0762058cb7687be1b2d90550.tar.gz" }/raspberry-pi/4"]; + imports = ["${fetchTarball "https://github.com/NixOS/nixos-hardware/archive/936e4649098d6a5e0762058cb7687be1b2d90550.tar.gz"}/raspberry-pi/4"]; fileSystems = { "/" = { device = "/dev/disk/by-label/NIXOS_SD"; fsType = "ext4"; - options = [ "noatime" ]; + options = ["noatime"]; }; }; networking = { - hostName = "NixOS"; - networkmanager.enable = true; + hostName = "NixOS"; + networkmanager.enable = true; wireless = { enable = true; networks."${SSID}".psk = SSIDpassword; - interfaces = [ interface ]; + interfaces = [interface]; }; }; # Set your time zone. time.timeZone = "America/Denver"; - environment.systemPackages = with pkgs; [ vim ]; + environment.systemPackages = with pkgs; [vim]; services.openssh.enable = true; # Define user accounts - users.extraUsers.aaronh = { - description = "Aaron Honeycutt"; - home = "/home/aaronh"; - extraGroups = [ "wheel" "networkmanager" "adm"]; - isNormalUser = true; - hashedPassword = "$6$aAcbLtqiqzySifls$jdKMOQjoWITHD/dWNNZVUH/qNc6aoJ7v4zYofi0U7IJSVTbmOfChS3mzaJbp57AodjdPNKPrnrip8Nlh2Qanx."; - }; + users.extraUsers.aaronh = { + description = "Aaron Honeycutt"; + home = "/home/aaronh"; + extraGroups = ["wheel" "networkmanager" "adm"]; + isNormalUser = true; + hashedPassword = "$6$aAcbLtqiqzySifls$jdKMOQjoWITHD/dWNNZVUH/qNc6aoJ7v4zYofi0U7IJSVTbmOfChS3mzaJbp57AodjdPNKPrnrip8Nlh2Qanx."; + }; # Enable GPU acceleration hardware.raspberry-pi."4".fkms-3d.enable = true; diff --git a/hosts/flake.nix b/hosts/flake.nix index 9025db0..846fdec 100644 --- a/hosts/flake.nix +++ b/hosts/flake.nix @@ -4,37 +4,45 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/release-23.11"; disko = { - url = github:nix-community/disko; - inputs.nixpkgs.follows = "nixpkgs"; + url = github:nix-community/disko; + inputs.nixpkgs.follows = "nixpkgs"; }; }; - outputs = { self, nixpkgs, disko, ... }@inputs: { + outputs = { + self, + nixpkgs, + disko, + ... + } @ inputs: { nixosConfigurations = { "vm" = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ - # Import the configuration.nix we used before, so that the old configuration file can still take effect. + # Import the configuration.nix we used before, so that the old configuration file can still take effect. # Note: /etc/nixos/configuration.nix itself is also a Nix Module, so you can import it directly here -# ./configuration.nix - disko.nixosModules.disko - ./disko-config.nix - { - _module.args.disks = [ "/dev/vda" ]; - } + # ./configuration.nix + disko.nixosModules.disko + ./disko-config.nix + { + _module.args.disks = ["/dev/vda"]; + } ./hardware-configuration.nix - ({config, pkgs, ...}: { + ({ + config, + pkgs, + ... + }: { nix = { settings.auto-optimise-store = true; - settings.experimental-features = [ "nix-command" "flakes" ]; - + settings.experimental-features = ["nix-command" "flakes"]; + gc = { automatic = true; dates = "weekly"; options = "--delete-older-than 30d"; }; - }; boot = { @@ -44,9 +52,8 @@ systemd-boot.enable = true; systemd-boot.consoleMode = "0"; }; - }; - + networking = { hostName = "vm"; networkmanager.enable = true; @@ -54,7 +61,7 @@ users.users.aaronh = { isNormalUser = true; - extraGroups = [ "wheel" "networkmanager" ]; # Enable ‘sudo’ for the user. + extraGroups = ["wheel" "networkmanager"]; # Enable ‘sudo’ for the user. packages = with pkgs; [ cargo git @@ -69,7 +76,7 @@ tree wget ]; - + services.openssh = { enable = true; settings.PermitRootLogin = "no"; @@ -85,4 +92,3 @@ }; }; } - diff --git a/hosts/vm.nix b/hosts/vm.nix index 7d9979c..9cf810e 100644 --- a/hosts/vm.nix +++ b/hosts/vm.nix @@ -1,8 +1,10 @@ -{ config, pkgs, ... }: - { - # Add kernel parameters for virtual machines - boot.kernelParams = [ "vfio-pci.ids=8086:9b41" "qxl" "bochs_drm"]; + config, + pkgs, + ... +}: { + # Add kernel parameters for virtual machines + boot.kernelParams = ["vfio-pci.ids=8086:9b41" "qxl" "bochs_drm"]; - networking.hostName = "vm"; + networking.hostName = "vm"; } diff --git a/hosts/x86_64/edi/configuration.nix b/hosts/x86_64/edi/configuration.nix index 926f91a..81f1ae9 100644 --- a/hosts/x86_64/edi/configuration.nix +++ b/hosts/x86_64/edi/configuration.nix @@ -1,10 +1,13 @@ -{ config, pkgs, lib, inputs, ... }: - { - imports = - [ - ./hardware-configuration.nix - ]; + config, + pkgs, + lib, + inputs, + ... +}: { + imports = [ + ./hardware-configuration.nix + ]; boot.loader = { systemd-boot.enable = true; @@ -15,26 +18,26 @@ # Change the UUID for the new RAID setup boot.swraid = { - enable = true; - mdadmConf = '' - ARRAY /dev/md/edi:DATA metadata=1.2 UUID=f0384881:84c12f70:3dcad802:653ccc30 - MAILADDR root - ''; + enable = true; + mdadmConf = '' + ARRAY /dev/md/edi:DATA metadata=1.2 UUID=f0384881:84c12f70:3dcad802:653ccc30 + MAILADDR root + ''; }; - boot.kernelParams = [ "console=tty0" ]; - boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; + boot.kernelParams = ["console=tty0"]; + boot.binfmt.emulatedSystems = ["aarch64-linux"]; fileSystems = { - "/mnt/DATA" = { - device = "/dev/md127"; - }; + "/mnt/DATA" = { + device = "/dev/md127"; + }; }; nix.settings = { - experimental-features = [ "nix-command" "flakes" ]; - extra-platforms = [ "aarch64-linux" ]; - trusted-users = [ "aaronh" ]; + experimental-features = ["nix-command" "flakes"]; + extra-platforms = ["aarch64-linux"]; + trusted-users = ["aaronh"]; }; nix.gc = { @@ -52,7 +55,7 @@ users.users.aaronh = { description = "Aaron Honeycutt"; home = "/home/aaronh"; - extraGroups = [ "wheel" "networkmanager" "adm" "video" "docker" ]; + extraGroups = ["wheel" "networkmanager" "adm" "video" "docker"]; isNormalUser = true; hashedPassword = "$6$aAcbLtqiqzySifls$jdKMOQjoWITHD/dWNNZVUH/qNc6aoJ7v4zYofi0U7IJSVTbmOfChS3mzaJbp57AodjdPNKPrnrip8Nlh2Qanx."; openssh.authorizedKeys.keys = [ @@ -68,21 +71,19 @@ }; # Install some packages - environment.systemPackages = - with pkgs; - [ - bottom - busybox - cloudflared - docker - docker-compose - ffmpeg-full - git - git-lfs - helix - restic - zola - ]; + environment.systemPackages = with pkgs; [ + bottom + busybox + cloudflared + docker + docker-compose + ffmpeg-full + git + git-lfs + helix + restic + zola + ]; hardware.graphics = { enable = true; @@ -94,7 +95,7 @@ # 8384 = Syncthing # 9999 = crab-hole # 25565 = Minecraft - allowedTCPPorts = [ 80 443 2342 5000 8384 9000 9091 9999 25565 ]; + allowedTCPPorts = [80 443 2342 5000 8384 9000 9091 9999 25565]; }; nixpkgs.config.permittedInsecurePackages = [ @@ -109,8 +110,7 @@ services.tailscale.enable = true; - # System + # System system.stateVersion = "25.05"; system.autoUpgrade.enable = true; - } diff --git a/hosts/x86_64/garrus/configuration.nix b/hosts/x86_64/garrus/configuration.nix index 378dd80..c0f64b9 100644 --- a/hosts/x86_64/garrus/configuration.nix +++ b/hosts/x86_64/garrus/configuration.nix @@ -1,16 +1,18 @@ -{ config, pkgs, ... }: - { + config, + pkgs, + ... +}: { # Latest kernel needed for best support #boot.kernelPackages = pkgs.linuxPackages_6_15; boot.kernelPackages = pkgs.linuxPackages_latest; - boot.kernelModules = [ "sg" ]; # sg is for makemkv - + boot.kernelModules = ["sg"]; # sg is for makemkv + # Name your host machine - networking.hostName = "garrus"; + networking.hostName = "garrus"; hardware.system76.enableAll = true; - + environment.systemPackages = with pkgs; [ system76-keyboard-configurator firmware-manager @@ -19,6 +21,6 @@ protonvpn-gui gimp ]; - + services.tailscale.enable = true; } diff --git a/hosts/x86_64/harbinger.nix b/hosts/x86_64/harbinger.nix index 6d376dd..d5cae6c 100644 --- a/hosts/x86_64/harbinger.nix +++ b/hosts/x86_64/harbinger.nix @@ -1,20 +1,22 @@ -{ config, pkgs, ... }: - { - imports = - [ # Include the results of the hardware scan. - ./hardware-configuration.nix -# ./unstable.nix - ./ahoneybun-net.nix - ./tildecafe-com.nix - ./rockymtnlug-org.nix - ]; + config, + pkgs, + ... +}: { + imports = [ + # Include the results of the hardware scan. + ./hardware-configuration.nix + # ./unstable.nix + ./ahoneybun-net.nix + ./tildecafe-com.nix + ./rockymtnlug-org.nix + ]; boot.kernelPackages = pkgs.linuxPackages_latest; - boot.kernelParams = [ "console=ttyS0,19200n8" ]; - + boot.kernelParams = ["console=ttyS0,19200n8"]; + nix.settings.auto-optimise-store = true; - nix.settings.experimental-features = [ "nix-command" "flakes" ]; + nix.settings.experimental-features = ["nix-command" "flakes"]; nix.gc = { automatic = true; @@ -35,17 +37,16 @@ networking.firewall = { enable = true; - allowedTCPPorts = [ 80 443 ]; + allowedTCPPorts = [80 443]; }; - networking.extraHosts = - '' - 23.32.241.51 r3.o.lencr.org - ''; + networking.extraHosts = '' + 23.32.241.51 r3.o.lencr.org + ''; security.acme.acceptTerms = true; security.acme.defaults.email = "aaronhoneycutt@proton.me"; - + networking.hostName = "harbinger"; # Pick only one of the below networking options. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. @@ -71,7 +72,7 @@ # Define a user account. Don't forget to set a password with ‘passwd’. users.users.aaronh = { isNormalUser = true; - extraGroups = [ "wheel" "networkmanager" ]; # Enable ‘sudo’ for the user. + extraGroups = ["wheel" "networkmanager"]; # Enable ‘sudo’ for the user. packages = with pkgs; [ cargo git @@ -87,7 +88,7 @@ mtr neofetch rubyPackages.webrick - rubyPackages.jekyll-feed + rubyPackages.jekyll-feed rubyPackages.jekyll-redirect-from sysstat tree @@ -125,5 +126,4 @@ # system.copySystemConfiguration = true; system.stateVersion = "22.11"; # Did you read the comment? - } diff --git a/hosts/x86_64/harbinger/configuration.nix b/hosts/x86_64/harbinger/configuration.nix index 04a6f1d..fca7b53 100644 --- a/hosts/x86_64/harbinger/configuration.nix +++ b/hosts/x86_64/harbinger/configuration.nix @@ -1,23 +1,25 @@ -{ config, pkgs, ... }: - { - imports = - [ # Include the results of the hardware scan. - ./hardware-configuration.nix -# ./unstable.nix - ./ahoneybun-net.nix - ./mc-ahoneybun-net.nix -# ./nextcloud.nix - ./tildecafe-com.nix - ./rockymtnlug-org.nix -# ./chat-rockymtnlug-org.nix - ]; + config, + pkgs, + ... +}: { + imports = [ + # Include the results of the hardware scan. + ./hardware-configuration.nix + # ./unstable.nix + ./ahoneybun-net.nix + ./mc-ahoneybun-net.nix + # ./nextcloud.nix + ./tildecafe-com.nix + ./rockymtnlug-org.nix + # ./chat-rockymtnlug-org.nix + ]; boot.kernelPackages = pkgs.linuxPackages_latest; - boot.kernelParams = [ "console=ttyS0,19200n8" ]; - + boot.kernelParams = ["console=ttyS0,19200n8"]; + nix.settings.auto-optimise-store = true; - nix.settings.experimental-features = [ "nix-command" "flakes" ]; + nix.settings.experimental-features = ["nix-command" "flakes"]; nix.gc = { automatic = true; @@ -37,17 +39,16 @@ networking.firewall = { enable = true; - allowedTCPPorts = [ 80 443 ]; + allowedTCPPorts = [80 443]; }; - networking.extraHosts = - '' - 23.32.241.51 r3.o.lencr.org - ''; + networking.extraHosts = '' + 23.32.241.51 r3.o.lencr.org + ''; security.acme.acceptTerms = true; security.acme.defaults.email = "aaronhoneycutt@proton.me"; - + networking.hostName = "harbinger"; # Pick only one of the below networking options. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. @@ -73,7 +74,7 @@ # Define a user account. Don't forget to set a password with ‘passwd’. users.users.aaronh = { isNormalUser = true; - extraGroups = [ "wheel" "networkmanager" ]; # Enable ‘sudo’ for the user. + extraGroups = ["wheel" "networkmanager"]; # Enable ‘sudo’ for the user. packages = with pkgs; [ cargo git @@ -120,4 +121,3 @@ system.stateVersion = "22.11"; # Did you read the comment? system.autoUpgrade.enable = true; } - diff --git a/hosts/x86_64/harbinger/flake.nix b/hosts/x86_64/harbinger/flake.nix index 64dc310..4110099 100644 --- a/hosts/x86_64/harbinger/flake.nix +++ b/hosts/x86_64/harbinger/flake.nix @@ -5,92 +5,99 @@ nixpkgs.url = "github:NixOS/nixpkgs/release-23.05"; }; - outputs = { self, nixpkgs, ... }@inputs: { + outputs = { + self, + nixpkgs, + ... + } @ inputs: { nixosConfigurations = { "harbinger" = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ - # Import the configuration.nix we used before, so that the old configuration file can still take effect. + # Import the configuration.nix we used before, so that the old configuration file can still take effect. # Note: /etc/nixos/configuration.nix itself is also a Nix Module, so you can import it directly here -# ./configuration.nix + # ./configuration.nix ./hardware-configuration.nix ./ahoneybun-net.nix ./tildecafe-com.nix ./rockymtnlug-org.nix - ({config, pkgs, ...}: { - nix = { - settings.auto-optimise-store = true; - settings.experimental-features = [ "nix-command" "flakes" ]; - - gc = { - automatic = true; - dates = "weekly"; - options = "--delete-older-than 30d"; - }; - }; + ({ + config, + pkgs, + ... + }: { + nix = { + settings.auto-optimise-store = true; + settings.experimental-features = ["nix-command" "flakes"]; - boot = { - kernelPackages = pkgs.linuxPackages_latest; - kernelParams = [ "console=ttyS0,1920n8" ]; + gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 30d"; + }; + }; - loader.grub.enable = true; - loader.grub.extraConfig = '' - serial --speed=19200 --unit=0 --word=8 --parity=no --stop=1; - terminal_input serial; - terminal_output serial - ''; - loader.grub.device = "nodev"; # or "nodev" for efi only - loader.timeout = 10; - }; - - networking = { - hostName = "harbinger"; + boot = { + kernelPackages = pkgs.linuxPackages_latest; + kernelParams = ["console=ttyS0,1920n8"]; - firewall = { - enable = true; - allowedTCPPorts = [ 80 443 ]; - }; - - usePredictableInterfaceNames = false; - useDHCP = false; - interfaces.eth0.useDHCP = true; + loader.grub.enable = true; + loader.grub.extraConfig = '' + serial --speed=19200 --unit=0 --word=8 --parity=no --stop=1; + terminal_input serial; + terminal_output serial + ''; + loader.grub.device = "nodev"; # or "nodev" for efi only + loader.timeout = 10; + }; - }; + networking = { + hostName = "harbinger"; - users.users.aaronh = { - isNormalUser = true; - extraGroups = [ "wheel" "networkmanager" ]; # Enable ‘sudo’ for the user. - packages = with pkgs; [ - cargo - git - git-lfs - ]; - }; + firewall = { + enable = true; + allowedTCPPorts = [80 443]; + }; - environment.systemPackages = with pkgs; [ - acme-sh + usePredictableInterfaceNames = false; + useDHCP = false; + interfaces.eth0.useDHCP = true; + }; + + users.users.aaronh = { + isNormalUser = true; + extraGroups = ["wheel" "networkmanager"]; # Enable ‘sudo’ for the user. + packages = with pkgs; [ + cargo git git-lfs - mtr - neofetch - sysstat - tree - wget - ]; + ]; + }; - security.acme.acceptTerms = true; - security.acme.defaults.email = "aaronhoneycutt@proton.me"; - - services.openssh = { - enable = true; - settings.PermitRootLogin = "no"; - }; + environment.systemPackages = with pkgs; [ + acme-sh + git + git-lfs + mtr + neofetch + sysstat + tree + wget + ]; - system = { - stateVersion = "23.05"; - autoUpgrade.enable = true; - }; + security.acme.acceptTerms = true; + security.acme.defaults.email = "aaronhoneycutt@proton.me"; + + services.openssh = { + enable = true; + settings.PermitRootLogin = "no"; + }; + + system = { + stateVersion = "23.05"; + autoUpgrade.enable = true; + }; }) ]; }; diff --git a/hosts/x86_64/joker/flake.nix b/hosts/x86_64/joker/flake.nix index 62cd867..d20bd2c 100644 --- a/hosts/x86_64/joker/flake.nix +++ b/hosts/x86_64/joker/flake.nix @@ -5,21 +5,29 @@ nixpkgs.url = "github:NixOS/nixpkgs/release-23.11"; }; - outputs = { self, nixpkgs, ... }@inputs: { + outputs = { + self, + nixpkgs, + ... + } @ inputs: { nixosConfigurations = { "thelio-b1" = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ - # Import the configuration.nix we used before, so that the old configuration file can still take effect. + # Import the configuration.nix we used before, so that the old configuration file can still take effect. # Note: /etc/nixos/configuration.nix itself is also a Nix Module, so you can import it directly here -# ./configuration.nix + # ./configuration.nix ./hardware-configuration.nix - ({config, pkgs, ...}: { + ({ + config, + pkgs, + ... + }: { nix = { settings.auto-optimise-store = true; - settings.experimental-features = [ "nix-command" "flakes" ]; - + settings.experimental-features = ["nix-command" "flakes"]; + gc = { automatic = true; dates = "weekly"; @@ -27,23 +35,23 @@ }; }; - nixpkgs.config.allowUnfree = true; + nixpkgs.config.allowUnfree = true; boot = { initrd.luks.devices = { - root = { - device = "/dev/nvme0n1p2"; - preLVM = true; + root = { + device = "/dev/nvme0n1p2"; + preLVM = true; }; }; - + # kernelPackages = pkgs.linuxPackages_latest; # kernelParams = [ "console=ttyS0,1920n8" ]; loader.systemd-boot.enable = true; loader.systemd-boot.consoleMode = "0"; }; - + networking = { hostName = "thelio-b1"; networkmanager.enable = true; @@ -54,7 +62,7 @@ home = "/home/aaronh"; isNormalUser = true; shell = pkgs.fish; - extraGroups = [ "wheel" "networkmanager" ]; # Enable ‘sudo’ for the user. + extraGroups = ["wheel" "networkmanager"]; # Enable ‘sudo’ for the user. packages = with pkgs; [ cargo git @@ -64,7 +72,7 @@ restic roboto-slab rustc - + # GUI signal-desktop youtube-music @@ -85,7 +93,7 @@ tree unzip wget - + gnome.dconf-editor ]; @@ -97,20 +105,20 @@ }; # Remove GNOME packages - environment.gnome.excludePackages = (with pkgs; [ + environment.gnome.excludePackages = with pkgs; [ epiphany # web browser gnome.geary gnome.gnome-software gnome-connections gnome-photos gnome-tour - ]); + ]; # Services - services.udev.packages = with pkgs; [ gnome.gnome-settings-daemon ]; + services.udev.packages = with pkgs; [gnome.gnome-settings-daemon]; hardware.pulseaudio.enable = false; - + security.rtkit.enable = true; services.pipewire = { enable = true; @@ -124,13 +132,13 @@ printing.enable = true; openssh.enable = true; }; - + services.avahi = { enable = true; nssmdns = true; openFirewall = true; }; - + system = { stateVersion = "23.11"; autoUpgrade.enable = true; diff --git a/hosts/x86_64/misc/macbook-intel.nix b/hosts/x86_64/misc/macbook-intel.nix index b87a9e0..8a6ed28 100644 --- a/hosts/x86_64/misc/macbook-intel.nix +++ b/hosts/x86_64/misc/macbook-intel.nix @@ -1,10 +1,12 @@ -{ config, pkgs, ... }: - { - boot.kernelModules = [ "wl" ]; - boot.extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ]; - boot.blacklistedKernelModules = [ "b43" "bcma" ]; + config, + pkgs, + ... +}: { + boot.kernelModules = ["wl"]; + boot.extraModulePackages = [config.boot.kernelPackages.broadcom_sta]; + boot.blacklistedKernelModules = ["b43" "bcma"]; - # Name your host machine - networking.hostName = "macbook"; + # Name your host machine + networking.hostName = "macbook"; } diff --git a/hosts/x86_64/misc/pixel-slate.nix b/hosts/x86_64/misc/pixel-slate.nix index 568162b..919fa0e 100644 --- a/hosts/x86_64/misc/pixel-slate.nix +++ b/hosts/x86_64/misc/pixel-slate.nix @@ -1,10 +1,12 @@ -{ config, pkgs, ... }: - { - # Name your host machine - networking.hostName = "pixel-slate"; + config, + pkgs, + ... +}: { + # Name your host machine + networking.hostName = "pixel-slate"; - # Enable Lomiri since this is a tablet - services.desktopManager.lomiri.enable = true; - services.displayManager.defaultSession = "lomiri"; -} \ No newline at end of file + # Enable Lomiri since this is a tablet + services.desktopManager.lomiri.enable = true; + services.displayManager.defaultSession = "lomiri"; +} diff --git a/hosts/x86_64/shepard/configuration.nix b/hosts/x86_64/shepard/configuration.nix index 6d020d0..5b62fb8 100644 --- a/hosts/x86_64/shepard/configuration.nix +++ b/hosts/x86_64/shepard/configuration.nix @@ -1,25 +1,25 @@ -{ config, pkgs, ... }: - { - # Name your host machine - networking.hostName = "shepard"; + config, + pkgs, + ... +}: { + # Name your host machine + networking.hostName = "shepard"; - # Enable binfmt emulation of aarch64-linux. - boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; + # Enable binfmt emulation of aarch64-linux. + boot.binfmt.emulatedSystems = ["aarch64-linux"]; - # Allow Unfree - nixpkgs.config.allowUnfree = true; + # Allow Unfree + nixpkgs.config.allowUnfree = true; - programs.steam = { - enable = true; - remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play - dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server - localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfer0s - }; + programs.steam = { + enable = true; + remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play + dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server + localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfer0s + }; - environment.systemPackages = - with pkgs; - [ - hello - ]; + environment.systemPackages = with pkgs; [ + hello + ]; } diff --git a/hosts/x86_64/shepard/flake.nix b/hosts/x86_64/shepard/flake.nix index 4b26bab..e648822 100644 --- a/hosts/x86_64/shepard/flake.nix +++ b/hosts/x86_64/shepard/flake.nix @@ -2,128 +2,136 @@ description = "Shepard"; inputs = { -# nixpkgs.url = "github:NixOS/nixpkgs/release-23.05"; + # nixpkgs.url = "github:NixOS/nixpkgs/release-23.05"; nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; nixos-hardware.url = "github:NixOS/nixos-hardware/master"; }; - outputs = { self, nixpkgs-unstable, nixos-hardware, ... }@inputs: { + outputs = { + self, + nixpkgs-unstable, + nixos-hardware, + ... + } @ inputs: { nixosConfigurations = { "shepard" = nixpkgs-unstable.lib.nixosSystem { system = "x86_64-linux"; - specialArgs = { inherit inputs; }; + specialArgs = {inherit inputs;}; modules = [ - # Import the configuration.nix we used before, so that the old configuration file can still take effect. + # Import the configuration.nix we used before, so that the old configuration file can still take effect. # Note: /etc/nixos/configuration.nix itself is also a Nix Module, so you can import it directly here -# nixos-hardware.nixosModules.raspberry-pi-4 -# ./configuration.nix + # nixos-hardware.nixosModules.raspberry-pi-4 + # ./configuration.nix ./hardware-configuration.nix ./gnome.nix - ({config, pkgs, ...}: { + ({ + config, + pkgs, + ... + }: { + # Latest kernel + boot.kernelPackages = pkgs.linuxPackages_latest; - # Latest kernel - boot.kernelPackages = pkgs.linuxPackages_latest; - - boot.loader = { - systemd-boot.enable = true; - systemd-boot.consoleMode = "0"; - }; + boot.loader = { + systemd-boot.enable = true; + systemd-boot.consoleMode = "0"; + }; - boot.initrd.luks.devices = { - root = { + boot.initrd.luks.devices = { + root = { device = "/dev/nvme1n1p2"; - preLVM = true; - }; - }; + preLVM = true; + }; + }; - nix = { - settings.auto-optimise-store = true; - settings.experimental-features = [ "nix-command" "flakes" ]; - - gc = { + nix = { + settings.auto-optimise-store = true; + settings.experimental-features = ["nix-command" "flakes"]; + + gc = { automatic = true; dates = "weekly"; options = "--delete-older-than 30d"; - }; - }; + }; + }; - networking = { - hostName = "shepard"; - networkmanager.enable = true; - }; + networking = { + hostName = "shepard"; + networkmanager.enable = true; + }; - time.timeZone = "America/Denver"; + time.timeZone = "America/Denver"; - # Stable - environment.systemPackages = with pkgs; [ - avahi - cargo - cosmic-edit - dmidecode - fire - firefox - fish - git - git-lfs - libcamera - lshw - roboto-slab - neofetch - restic - unzip - wget - xz - ]; + # Stable + environment.systemPackages = with pkgs; [ + avahi + cargo + cosmic-edit + dmidecode + fire + firefox + fish + git + git-lfs + libcamera + lshw + roboto-slab + neofetch + restic + unzip + wget + xz + ]; - users.users.aaronh = { - description = "Aaron Honeycutt"; - home = "/home/aaronh"; - extraGroups = [ "wheel" "networkmanager" "adm" ]; - isNormalUser = true; - shell = pkgs.fish; - hashedPassword = "$6$aAcbLtqiqzySifls$jdKMOQjoWITHD/dWNNZVUH/qNc6aoJ7v4zYofi0U7IJSVTbmOfChS3mzaJbp57AodjdPNKPrnrip8Nlh2Qanx."; + users.users.aaronh = { + description = "Aaron Honeycutt"; + home = "/home/aaronh"; + extraGroups = ["wheel" "networkmanager" "adm"]; + isNormalUser = true; + shell = pkgs.fish; + hashedPassword = "$6$aAcbLtqiqzySifls$jdKMOQjoWITHD/dWNNZVUH/qNc6aoJ7v4zYofi0U7IJSVTbmOfChS3mzaJbp57AodjdPNKPrnrip8Nlh2Qanx."; - packages = with pkgs; [ + packages = with pkgs; [ signal-desktop youtube-music - ]; - }; + ]; + }; - programs.fish.enable = true; + programs.fish.enable = true; - # Enable Pipewire - security.rtkit.enable = true; - services.pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - }; - - # Turn off PulseAudio - hardware.pulseaudio.enable = false; + # Enable Pipewire + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + }; - # Enable Bluetooth - hardware.bluetooth.enable = true; + # Turn off PulseAudio + hardware.pulseaudio.enable = false; - # Enable SSH - services.openssh.enable = true; + # Enable Bluetooth + hardware.bluetooth.enable = true; - # Enable CUPS - services.printing.enable = true; + # Enable SSH + services.openssh.enable = true; - # Allow Unfree - nixpkgs.config.allowUnfree = true; + # Enable CUPS + services.printing.enable = true; - # System - system = { - stateVersion = "23.11"; - autoUpgrade.enable = true; - }; - }) - ]; - }; - }; - }; + # Allow Unfree + nixpkgs.config.allowUnfree = true; + + # System + system = { + stateVersion = "23.11"; + autoUpgrade.enable = true; + }; + }) + ]; + }; + }; + }; } diff --git a/hosts/x86_64/sovereign/configuration.nix b/hosts/x86_64/sovereign/configuration.nix index 02e5160..e36d464 100644 --- a/hosts/x86_64/sovereign/configuration.nix +++ b/hosts/x86_64/sovereign/configuration.nix @@ -1,31 +1,37 @@ -{ config, pkgs, ... }: - { - imports = - [ # Include the results of the hardware scan. - ./hardware-configuration.nix -# ./unstable.nix - ./stoners-space.nix - ]; + config, + pkgs, + ... +}: { + imports = [ + # Include the results of the hardware scan. + ./hardware-configuration.nix + # ./unstable.nix + ./stoners-space.nix + ]; boot.kernelPackages = pkgs.linuxPackages_latest; - boot.kernelParams = [ "console=ttyS0,19200n8" ]; - - boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; + boot.kernelParams = ["console=ttyS0,19200n8"]; - nix.settings.extra-platforms = [ "aarch64-linux" ]; + boot.binfmt.emulatedSystems = ["aarch64-linux"]; + + nix.settings.extra-platforms = ["aarch64-linux"]; nix.settings.auto-optimise-store = true; - nix.settings.experimental-features = [ "nix-command" "flakes" ]; + nix.settings.experimental-features = ["nix-command" "flakes"]; - nix.buildMachines = [{ - hostName = "localhost"; - systems = ["x86_64-linux" - "aarch64-linux" - "x86_64-darwin" - "aarch64-darwin"]; - supportedFeatures = ["kvm" "nixos-test" "big-parallel" "benchmark"]; - maxJobs = 8; - }]; + nix.buildMachines = [ + { + hostName = "localhost"; + systems = [ + "x86_64-linux" + "aarch64-linux" + "x86_64-darwin" + "aarch64-darwin" + ]; + supportedFeatures = ["kvm" "nixos-test" "big-parallel" "benchmark"]; + maxJobs = 8; + } + ]; nix.gc = { automatic = true; @@ -45,13 +51,12 @@ networking.firewall = { enable = true; - allowedTCPPorts = [ 80 443 ]; + allowedTCPPorts = [80 443]; }; - networking.extraHosts = - '' - 23.32.241.51 r3.o.lencr.org - ''; + networking.extraHosts = '' + 23.32.241.51 r3.o.lencr.org + ''; # fileSystems."/mnt/swapfile" = # { device = "/dev/disk/by-uuid/82672991-fe8a-485a-8dcf-7c8ae1282b6c"; @@ -67,7 +72,7 @@ security.acme.acceptTerms = true; security.acme.defaults.email = "aaronhoneycutt@proton.me"; - + networking.hostName = "sovereign"; # Set your time zone. @@ -80,7 +85,7 @@ # Define a user account. Don't forget to set a password with ‘passwd’. users.users.aaronh = { isNormalUser = true; - extraGroups = [ "wheel" "networkmanager" ]; # Enable ‘sudo’ for the user. + extraGroups = ["wheel" "networkmanager"]; # Enable ‘sudo’ for the user. packages = with pkgs; [ cargo git @@ -90,9 +95,9 @@ users.users.builder = { isNormalUser = true; - extraGroups = [ "wheel" ]; + extraGroups = ["wheel"]; packages = with pkgs; [ - neofetch + neofetch ]; }; @@ -120,4 +125,3 @@ system.stateVersion = "22.11"; # Did you read the comment? system.autoUpgrade.enable = true; } - diff --git a/hosts/x86_64/sovereign/flake.nix b/hosts/x86_64/sovereign/flake.nix index 8e4eff1..bf7f3c7 100644 --- a/hosts/x86_64/sovereign/flake.nix +++ b/hosts/x86_64/sovereign/flake.nix @@ -5,104 +5,114 @@ nixpkgs.url = "github:NixOS/nixpkgs/release-23.05"; }; - outputs = { self, nixpkgs, ... }@inputs: { + outputs = { + self, + nixpkgs, + ... + } @ inputs: { nixosConfigurations = { "sovereign" = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ - # Import the configuration.nix we used before, so that the old configuration file can still take effect. + # Import the configuration.nix we used before, so that the old configuration file can still take effect. # Note: /etc/nixos/configuration.nix itself is also a Nix Module, so you can import it directly here -# ./configuration.nix + # ./configuration.nix ./hardware-configuration.nix ./stoners-space.nix - ({config, pkgs, ...}: { - nix = { - settings.auto-optimise-store = true; - settings.experimental-features = [ "nix-command" "flakes" ]; - settings.extra-platforms = [ "aarch64-linux" ]; - - gc = { - automatic = true; - dates = "weekly"; - options = "--delete-older-than 30d"; - }; + ({ + config, + pkgs, + ... + }: { + nix = { + settings.auto-optimise-store = true; + settings.experimental-features = ["nix-command" "flakes"]; + settings.extra-platforms = ["aarch64-linux"]; - buildMachines = [{ - hostName = "localhost"; - systems = [ "x86_64-linux" - "aarch64-linux" - "x86_64-darwin" - "aarch64-darwin" ]; - supportedFeatures = [ "kvm" "nixos-test" "big-parallel" "benchmark" ]; - maxJobs = 8; - }]; + gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 30d"; + }; - }; + buildMachines = [ + { + hostName = "localhost"; + systems = [ + "x86_64-linux" + "aarch64-linux" + "x86_64-darwin" + "aarch64-darwin" + ]; + supportedFeatures = ["kvm" "nixos-test" "big-parallel" "benchmark"]; + maxJobs = 8; + } + ]; + }; - boot = { - kernelPackages = pkgs.linuxPackages_latest; - kernelParams = [ "console=ttyS0,1920n8" ]; + boot = { + kernelPackages = pkgs.linuxPackages_latest; + kernelParams = ["console=ttyS0,1920n8"]; - binfmt.emulatedSystems = [ "aarch64-linux" ]; + binfmt.emulatedSystems = ["aarch64-linux"]; - loader.grub.enable = true; - loader.grub.extraConfig = '' - serial --speed=19200 --unit=0 --word=8 --parity=no --stop=1; - terminal_input serial; - terminal_output serial - ''; - loader.grub.device = "nodev"; # or "nodev" for efi only - loader.timeout = 10; - }; - - networking = { - hostName = "sovereign"; + loader.grub.enable = true; + loader.grub.extraConfig = '' + serial --speed=19200 --unit=0 --word=8 --parity=no --stop=1; + terminal_input serial; + terminal_output serial + ''; + loader.grub.device = "nodev"; # or "nodev" for efi only + loader.timeout = 10; + }; - firewall = { - enable = true; - allowedTCPPorts = [ 80 443 ]; - }; - - usePredictableInterfaceNames = false; - useDHCP = false; - interfaces.eth0.useDHCP = true; + networking = { + hostName = "sovereign"; - }; + firewall = { + enable = true; + allowedTCPPorts = [80 443]; + }; - users.users.aaronh = { - isNormalUser = true; - extraGroups = [ "wheel" "networkmanager" ]; # Enable ‘sudo’ for the user. - packages = with pkgs; [ - cargo - git - git-lfs - ]; - }; + usePredictableInterfaceNames = false; + useDHCP = false; + interfaces.eth0.useDHCP = true; + }; - environment.systemPackages = with pkgs; [ - acme-sh + users.users.aaronh = { + isNormalUser = true; + extraGroups = ["wheel" "networkmanager"]; # Enable ‘sudo’ for the user. + packages = with pkgs; [ + cargo git git-lfs - mtr - neofetch - sysstat - tree - wget - ]; + ]; + }; - security.acme.acceptTerms = true; - security.acme.defaults.email = "aaronhoneycutt@proton.me"; - - services.openssh = { - enable = true; - settings.PermitRootLogin = "no"; - }; + environment.systemPackages = with pkgs; [ + acme-sh + git + git-lfs + mtr + neofetch + sysstat + tree + wget + ]; - system = { - stateVersion = "23.05"; - autoUpgrade.enable = true; - }; + security.acme.acceptTerms = true; + security.acme.defaults.email = "aaronhoneycutt@proton.me"; + + services.openssh = { + enable = true; + settings.PermitRootLogin = "no"; + }; + + system = { + stateVersion = "23.05"; + autoUpgrade.enable = true; + }; }) ]; }; diff --git a/hosts/x86_64/vm/configuration.nix b/hosts/x86_64/vm/configuration.nix index 7d9979c..9cf810e 100644 --- a/hosts/x86_64/vm/configuration.nix +++ b/hosts/x86_64/vm/configuration.nix @@ -1,8 +1,10 @@ -{ config, pkgs, ... }: - { - # Add kernel parameters for virtual machines - boot.kernelParams = [ "vfio-pci.ids=8086:9b41" "qxl" "bochs_drm"]; + config, + pkgs, + ... +}: { + # Add kernel parameters for virtual machines + boot.kernelParams = ["vfio-pci.ids=8086:9b41" "qxl" "bochs_drm"]; - networking.hostName = "vm"; + networking.hostName = "vm"; } diff --git a/partitions/luks-btrfs-subvolumes.nix b/partitions/luks-btrfs-subvolumes.nix index 4775237..cb1a022 100644 --- a/partitions/luks-btrfs-subvolumes.nix +++ b/partitions/luks-btrfs-subvolumes.nix @@ -14,7 +14,7 @@ type = "filesystem"; format = "vfat"; mountpoint = "/boot"; - mountOptions = [ "umask=0077" ]; + mountOptions = ["umask=0077"]; }; }; luks = { @@ -31,19 +31,19 @@ #additionalKeyFiles = [ "/tmp/additionalSecret.key" ]; content = { type = "btrfs"; - extraArgs = [ "-f" ]; + extraArgs = ["-f"]; subvolumes = { "/root" = { mountpoint = "/"; - mountOptions = [ "compress=zstd:10" "noatime" "commit=120"]; + mountOptions = ["compress=zstd:10" "noatime" "commit=120"]; }; "/home" = { mountpoint = "/home"; - mountOptions = [ "compress=zstd:10" "noatime" "commit=120"]; + mountOptions = ["compress=zstd:10" "noatime" "commit=120"]; }; "/nix" = { mountpoint = "/nix"; - mountOptions = [ "compress=zstd:10" "noatime" "commit=120"]; + mountOptions = ["compress=zstd:10" "noatime" "commit=120"]; }; }; }; diff --git a/partitions/luks-lvm.nix b/partitions/luks-lvm.nix index 596dcf1..61e3ee0 100644 --- a/partitions/luks-lvm.nix +++ b/partitions/luks-lvm.nix @@ -14,7 +14,7 @@ type = "filesystem"; format = "vfat"; mountpoint = "/boot"; - mountOptions = [ "umask=0077" ]; + mountOptions = ["umask=0077"]; }; }; luks = { @@ -22,7 +22,7 @@ content = { type = "luks"; name = "crypted"; - extraOpenArgs = [ ]; + extraOpenArgs = []; settings = { # if you want to use the key for interactive login be sure there is no trailing newline # for example use `echo -n "password" > /tmp/secret.key` diff --git a/partitions/simple-efi-swap.nix b/partitions/simple-efi-swap.nix index fbeb2f8..ab260f7 100644 --- a/partitions/simple-efi-swap.nix +++ b/partitions/simple-efi-swap.nix @@ -14,7 +14,7 @@ type = "filesystem"; format = "vfat"; mountpoint = "/boot"; - mountOptions = [ "umask=0077" ]; + mountOptions = ["umask=0077"]; }; }; root = { diff --git a/software/backrest/package.nix b/software/backrest/package.nix index 747c0a4..e43c165 100644 --- a/software/backrest/package.nix +++ b/software/backrest/package.nix @@ -1,30 +1,31 @@ -{ pkgs, lib }: - +{ + pkgs, + lib, +}: # Thanks to Aires! # https://aires.fyi/blog/installing-a-custom-package-with-nix/ - pkgs.stdenv.mkDerivation rec { - pname = "backrest"; - version = "v0.11.0"; + pname = "backrest"; + version = "v0.11.0"; - src = builtins.fetchurl { - url = "https://github.com/garethgeorge/backrest/releases/download/v0.11.0/backrest_Linux_x86_64.tar.gz"; - sha256 = "fd6c05339b6855f0acad001c2243d871f4621def04cef9eb3b452110fe175d49"; - }; + src = builtins.fetchurl { + url = "https://github.com/garethgeorge/backrest/releases/download/v0.11.0/backrest_Linux_x86_64.tar.gz"; + sha256 = "fd6c05339b6855f0acad001c2243d871f4621def04cef9eb3b452110fe175d49"; + }; - doCheck = false; + doCheck = false; - dontUnpack = true; + dontUnpack = true; - installPhase = '' - tar -xf backrest_Darwin_x86_64.tar.gz - install -D $src $out/backrest - chmod a+x $out/backrest - ''; + installPhase = '' + tar -xf backrest_Darwin_x86_64.tar.gz + install -D $src $out/backrest + chmod a+x $out/backrest + ''; - meta = with lib; { - homepage = "https://github.com/garethgeorge/backrest"; - description = "Backrest is a web UI and orchestrator for restic backup."; - platforms = platforms.linux ++ platforms.darwin; - }; + meta = with lib; { + homepage = "https://github.com/garethgeorge/backrest"; + description = "Backrest is a web UI and orchestrator for restic backup."; + platforms = platforms.linux ++ platforms.darwin; + }; } diff --git a/software/gaming/BAR/shell.nix b/software/gaming/BAR/shell.nix index aa8d822..5bb9a88 100644 --- a/software/gaming/BAR/shell.nix +++ b/software/gaming/BAR/shell.nix @@ -1,11 +1,11 @@ -{ pkgs ? import {} }: - pkgs.mkShell { - buildInputs = with pkgs; [ - appimage-run - openal - ]; - shellHook = '' - export LD_LIBRARY_PATH="${pkgs.openal}/lib:$LD_LIBRARY_PATH" - appimage-run Beyond-All-Reason-1.2988.0.AppImage - ''; +{pkgs ? import {}}: +pkgs.mkShell { + buildInputs = with pkgs; [ + appimage-run + openal + ]; + shellHook = '' + export LD_LIBRARY_PATH="${pkgs.openal}/lib:$LD_LIBRARY_PATH" + appimage-run Beyond-All-Reason-1.2988.0.AppImage + ''; } diff --git a/standalone-home.nix b/standalone-home.nix index c1a5d0f..883562c 100644 --- a/standalone-home.nix +++ b/standalone-home.nix @@ -1,7 +1,8 @@ -{ config, pkgs, ... }: - { - + config, + pkgs, + ... +}: { home.username = "aaron"; home.homeDirectory = "/home/aaron"; home.stateVersion = "25.05"; @@ -39,32 +40,32 @@ userName = "Aaron Honeycutt"; userEmail = "aaronhoneycutt@protonmail.com"; aliases = { - undo = "rebase -i HEAD~2"; - amend = "commit -a --amend"; + undo = "rebase -i HEAD~2"; + amend = "commit -a --amend"; }; extraConfig = { core.editor = "hx"; color = { - ui = "auto"; + ui = "auto"; }; color.status = { - added = "green bold"; - changed = "yellow bold"; - untracked = "red bold"; + added = "green bold"; + changed = "yellow bold"; + untracked = "red bold"; }; push = { - autoSetupRemote = "true"; + autoSetupRemote = "true"; }; init = { - defaultBranch = "main"; + defaultBranch = "main"; }; }; }; programs.helix = { enable = true; - settings = { - theme = "ferra"; + settings = { + theme = "ferra"; }; }; @@ -75,5 +76,4 @@ # Let Home Manager install and manage itself. programs.home-manager.enable = false; - } diff --git a/web/ahoneybun-net.nix b/web/ahoneybun-net.nix index 3df668a..e17eca3 100644 --- a/web/ahoneybun-net.nix +++ b/web/ahoneybun-net.nix @@ -1,17 +1,18 @@ -{ config, pkgs, ... }: - { - services.nginx = { - enable = true; - virtualHosts = { + config, + pkgs, + ... +}: { + services.nginx = { + enable = true; + virtualHosts = { "ahoneybun.net" = { - forceSSL = true; - enableACME = true; - locations."/" = { - root = "/var/www/ahoneybun-net/_site"; - }; - }; - }; - }; - + forceSSL = true; + enableACME = true; + locations."/" = { + root = "/var/www/ahoneybun-net/_site"; + }; + }; + }; + }; } diff --git a/web/cloud-ahoneybun-net.nix b/web/cloud-ahoneybun-net.nix index d2ed43b..107f586 100644 --- a/web/cloud-ahoneybun-net.nix +++ b/web/cloud-ahoneybun-net.nix @@ -1,28 +1,28 @@ -{config, pkgs, ...}: - { - -services.nextcloud = { - enable = true; - package = pkgs.nextcloud25; - extraApps = with pkgs.nextcloud25Packages.apps; { - inherit mail news contacts; + config, + pkgs, + ... +}: { + services.nextcloud = { + enable = true; + package = pkgs.nextcloud25; + extraApps = with pkgs.nextcloud25Packages.apps; { + inherit mail news contacts; + }; + extraAppsEnable = true; + config = { + # config.adminpassFile = "${pkgs.writeText "adminpass" "test123"}"; + # adminpassFile = "${pkgs.writeText "adminpass" "test123"}"; + adminpassFile = "/var/nextcloud-admin-pass"; + adminuser = "admin"; + defaultPhoneRegion = "US"; + }; + hostName = "cloud.ahoneybun.net"; + https = true; }; - extraAppsEnable = true; - config = { -# config.adminpassFile = "${pkgs.writeText "adminpass" "test123"}"; -# adminpassFile = "${pkgs.writeText "adminpass" "test123"}"; - adminpassFile = "/var/nextcloud-admin-pass"; - adminuser = "admin"; - defaultPhoneRegion = "US"; + + services.nginx.virtualHosts.${config.services.nextcloud.hostName} = { + forceSSL = true; + enableACME = true; }; - hostName = "cloud.ahoneybun.net"; - https = true; -}; - -services.nginx.virtualHosts.${config.services.nextcloud.hostName} = { - forceSSL = true; - enableACME = true; -}; - } diff --git a/web/hydra-ahoneybun-net.nix b/web/hydra-ahoneybun-net.nix index 5eb563d..09974ae 100644 --- a/web/hydra-ahoneybun-net.nix +++ b/web/hydra-ahoneybun-net.nix @@ -1,6 +1,8 @@ -{ config, pkgs, ... }: - { + config, + pkgs, + ... +}: { security.acme.acceptTerms = true; security.acme.defaults.email = "aaronhoneycutt@proton.me"; @@ -13,39 +15,38 @@ virtualHosts = { "hydra.ahoneybun.net" = { - forceSSL = true; - enableACME = true; - locations."/" = { - proxyPass = "http://127.0.0.1:3000"; + forceSSL = true; + enableACME = true; + locations."/" = { + proxyPass = "http://127.0.0.1:3000"; - extraConfig = '' - etag on; - gzip on; + extraConfig = '' + etag on; + gzip on; - add_header 'Access-Control-Allow-Origin' '*' always; - add_header 'Access-Control-Allow-Methods' 'POST, PUT, DELETE, GET, PATCH, OPTIONS' always; - add_header 'Access-Control-Allow-Headers' 'Authorization, Content-Type, Idempotency-Key' always; - add_header 'Access-Control-Expose-Headers' 'Link, X-RateLimit-Reset, X-RateLimit-Limit, X-RateLimit-Remaining, X-Request-Id' alway> - if ($request_method = OPTIONS) { - return 204; - } - add_header X-XSS-Protection "1; mode=block"; - add_header X-Permitted-Cross-Domain-Policies none; - add_header X-Frame-Options DENY; - add_header X-Content-Type-Options nosniff; - add_header Referrer-Policy same-origin; - add_header X-Download-Options noopen; - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - proxy_set_header Host $host; + add_header 'Access-Control-Allow-Origin' '*' always; + add_header 'Access-Control-Allow-Methods' 'POST, PUT, DELETE, GET, PATCH, OPTIONS' always; + add_header 'Access-Control-Allow-Headers' 'Authorization, Content-Type, Idempotency-Key' always; + add_header 'Access-Control-Expose-Headers' 'Link, X-RateLimit-Reset, X-RateLimit-Limit, X-RateLimit-Remaining, X-Request-Id' alway> + if ($request_method = OPTIONS) { + return 204; + } + add_header X-XSS-Protection "1; mode=block"; + add_header X-Permitted-Cross-Domain-Policies none; + add_header X-Frame-Options DENY; + add_header X-Content-Type-Options nosniff; + add_header Referrer-Policy same-origin; + add_header X-Download-Options noopen; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_set_header Host $host; - client_max_body_size 16m; - # NOTE: increase if users need to upload very big files - ''; + client_max_body_size 16m; + # NOTE: increase if users need to upload very big files + ''; }; }; }; }; - } diff --git a/web/lamp.nix b/web/lamp.nix index 56bc176..20cdcda 100644 --- a/web/lamp.nix +++ b/web/lamp.nix @@ -1,31 +1,34 @@ -{ config, pkgs, ... }: { - -services.nginx = { - enable = true; - virtualHosts."127.0.0.1" = { - root = "/var/www/html"; - locations."~ \.php$".extraConfig = '' - fastcgi_pass unix:${config.services.phpfpm.pools.mypool.socket}; - fastcgi_index index.php; - ''; +{ + config, + pkgs, + ... +}: { + services.nginx = { + enable = true; + virtualHosts."127.0.0.1" = { + root = "/var/www/html"; + locations."~ \.php$".extraConfig = '' + fastcgi_pass unix:${config.services.phpfpm.pools.mypool.socket}; + fastcgi_index index.php; + ''; + }; }; -}; -services.mysql = { - enable = true; - package = pkgs.mariadb; -}; + services.mysql = { + enable = true; + package = pkgs.mariadb; + }; -services.phpfpm.pools.mypool = { - user = "nobody"; - settings = { - pm = "dynamic"; - "listen.owner" = config.services.nginx.user; - "pm.max_children" = 5; - "pm.start_servers" = 2; - "pm.min_spare_servers" = 1; - "pm.max_spare_servers" = 3; - "pm.max_requests" = 500; - }; - }; + services.phpfpm.pools.mypool = { + user = "nobody"; + settings = { + pm = "dynamic"; + "listen.owner" = config.services.nginx.user; + "pm.max_children" = 5; + "pm.start_servers" = 2; + "pm.min_spare_servers" = 1; + "pm.max_spare_servers" = 3; + "pm.max_requests" = 500; + }; + }; } diff --git a/web/mc-ahoneybun-net.nix b/web/mc-ahoneybun-net.nix index 1761e68..d12c7ac 100644 --- a/web/mc-ahoneybun-net.nix +++ b/web/mc-ahoneybun-net.nix @@ -1,29 +1,31 @@ -{ config, pkgs, ... }: - { - services.minecraft-server = { - enable = true; - eula = true; - openFirewall = true; - declarative = true; + config, + pkgs, + ... +}: { + services.minecraft-server = { + enable = true; + eula = true; + openFirewall = true; + declarative = true; # see here for more info: https://minecraft.gamepedia.com/Server.properties#server.properties - serverProperties = { - server-port = 25565; - gamemode = "survival"; - motd = "NixOS Minecraft server"; - max-players = 5; - enable-rcon = true; - enable-query = true; - # This password can be used to administer your minecraft server. - # Exact details as to how will be explained later. If you want - # you can replace this with another password. -# rcon.password = "hunter2"; -# query.port = 25565; - level-seed = "10292992"; - }; + serverProperties = { + server-port = 25565; + gamemode = "survival"; + motd = "NixOS Minecraft server"; + max-players = 5; + enable-rcon = true; + enable-query = true; + # This password can be used to administer your minecraft server. + # Exact details as to how will be explained later. If you want + # you can replace this with another password. + # rcon.password = "hunter2"; + # query.port = 25565; + level-seed = "10292992"; }; + }; - # enable closed source packages such as the minecraft server - nixpkgs.config.allowUnfree = true; + # enable closed source packages such as the minecraft server + nixpkgs.config.allowUnfree = true; } diff --git a/web/nginx-owncast.nix b/web/nginx-owncast.nix index 9019a69..b84b9d2 100644 --- a/web/nginx-owncast.nix +++ b/web/nginx-owncast.nix @@ -1,5 +1,10 @@ - virtualHosts = { - "cast.ahoneybun.net" = { +{ + config, + pkgs, + ... +}: { + virtualHosts = { + "cast.ahoneybun.net" = { forceSSL = true; enableACME = true; locations."/" = { @@ -17,6 +22,7 @@ proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; ''; - }; }; }; + }; +} diff --git a/web/rockymtnlug-org.nix b/web/rockymtnlug-org.nix index 7ee9c49..90e3d69 100644 --- a/web/rockymtnlug-org.nix +++ b/web/rockymtnlug-org.nix @@ -1,17 +1,18 @@ -{ config, pkgs, ... }: - { - services.nginx = { - enable = true; - virtualHosts = { + config, + pkgs, + ... +}: { + services.nginx = { + enable = true; + virtualHosts = { "rockymountainlinuxfest.org" = { - forceSSL = true; - enableACME = true; - locations."/" = { - root = "/var/www/RMFest-website"; - }; - }; - }; - }; - + forceSSL = true; + enableACME = true; + locations."/" = { + root = "/var/www/RMFest-website"; + }; + }; + }; + }; } diff --git a/web/stoners-space.nix b/web/stoners-space.nix index dc5cf68..0763e77 100644 --- a/web/stoners-space.nix +++ b/web/stoners-space.nix @@ -1,6 +1,8 @@ -{ config, pkgs, ... }: - { + config, + pkgs, + ... +}: { services.mastodon = { enable = true; localDomain = "stoners.space"; # Replace with your own domain @@ -10,7 +12,6 @@ services.postgresqlBackup = { enable = true; - databases = [ "mastodon" ]; + databases = ["mastodon"]; }; - } diff --git a/web/tildecafe-com.nix b/web/tildecafe-com.nix index f499108..a5490c9 100644 --- a/web/tildecafe-com.nix +++ b/web/tildecafe-com.nix @@ -1,17 +1,18 @@ -{ config, pkgs, ... }: - { - services.nginx = { - enable = true; - virtualHosts = { + config, + pkgs, + ... +}: { + services.nginx = { + enable = true; + virtualHosts = { "tildecafe.com" = { - forceSSL = true; - enableACME = true; - locations."/" = { - root = "/var/www/tildecafe"; - }; - }; - }; - }; - + forceSSL = true; + enableACME = true; + locations."/" = { + root = "/var/www/tildecafe"; + }; + }; + }; + }; }