From 22bc76a0fc5eda6735fe7711a8afc330fe44e5ca Mon Sep 17 00:00:00 2001
From: Joel Grunbaum <joelgrun@gmail.com>
Date: Tue, 15 Jul 2025 10:42:32 +0000
Subject: [PATCH] Add smini nix config with modularised config

---
 smini/configuration.nix |   76 +++++++++-----------------------------
 1 files changed, 18 insertions(+), 58 deletions(-)

diff --git a/nixos/configuration.nix b/smini/configuration.nix
similarity index 63%
copy from nixos/configuration.nix
copy to smini/configuration.nix
index 49d0a8b..f805863 100644
--- a/nixos/configuration.nix
+++ b/smini/configuration.nix
@@ -5,20 +5,26 @@
 { config, pkgs, ... }:
 
 {
+  # local_configs = ../nixos;
   imports =
     [ # Include the results of the hardware scan.
-      /etc/nixos/hardware-configuration.nix
+      ./hardware-configuration.nix
+      ../nixos/user.nix
+      ../nixos/zsh.nix
+      ../nixos/ssh.nix
+      ../nixos/btrfs.nix
+      ../nixos/nginx.nix
+      ../nixos/home-assistant.nix
     ];
 
   # Bootloader.
   boot.loader.systemd-boot.enable = true;
   boot.loader.efi.canTouchEfiVariables = true;
 
-  boot.supportedFilesystems = [ "zfs" ];
-  boot.zfs.forceImportRoot = false;
-  networking.hostId = "31f59926";
+  # Use latest kernel.
+  boot.kernelPackages = pkgs.linuxPackages_latest;
 
-  networking.hostName = "wipi"; # Define your hostname.
+  networking.hostName = "smini"; # Define your hostname.
   # networking.wireless.enable = true;  # Enables wireless support via wpa_supplicant.
 
   # Configure network proxy if necessary
@@ -52,36 +58,22 @@
     variant = "";
   };
 
-  # Define a user account. Don't forget to set a password with ‘passwd’.
-  users.users.joel = {
-    isNormalUser = true;
-    description = "Joel Grunbaum";
-    shell = pkgs.zsh;
-    extraGroups = [ "networkmanager" "wheel" "docker" ];
-    openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIATFC5gWcw58fSBHwfn+3FoAnxZfJEJH1bCe5cQof0YN joelgrun@gmail.com" ];
-    packages = with pkgs; [];
-  };
-
   # Allow unfree packages
   nixpkgs.config.allowUnfree = true;
 
-  nix.settings = {
-    experimental-features = [ "nix-command" "flakes" ];
-  };
-
   # List packages installed in system profile. To search, run:
   # $ nix search wget
   environment.systemPackages = with pkgs; [
     vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
     wget
-    neofetch
     git
-    gnumake
-    zfs
-    tmux
     htop
+    gnumake
+    tmux
   ];
 
+  security.sudo.wheelNeedsPassword = false;
+
   # Some programs need SUID wrappers, can be configured further or are
   # started in user sessions.
   # programs.mtr.enable = true;
@@ -90,45 +82,13 @@
   #   enableSSHSupport = true;
   # };
 
-  security.sudo.wheelNeedsPassword = false;
-
   # List services that you want to enable:
 
-  # Enable the OpenSSH daemon.
-  services.openssh = {
-    enable = true;
-    ports = [ 22 ];
-    settings = {
-      PasswordAuthentication = false;
-      KbdInteractiveAuthentication = false;
-      PermitRootLogin = "no";
-    };
-  };
-
-  services.nginx = {
-    enable = true;
-  };
-
-  virtualisation.docker = {
-    enable = true;
-    daemon.settings = {
-      data-root = "/pool/docker/lib";
-      exec-root = "/pool/docker/run";
-    };
-  };
-
-  programs.zsh = {
-    enable = true;
-    enableCompletion = true;
-    #autosuggestion.enable = true;
-    syntaxHighlighting.enable = true;
-  };
-
   # Open ports in the firewall.
-  # networking.firewall.allowedTCPPorts = [ ... ];
+  networking.firewall.allowedTCPPorts = [ 80 443 8123 ];
   # networking.firewall.allowedUDPPorts = [ ... ];
   # Or disable the firewall altogether.
-  networking.firewall.enable = false;
+  # networking.firewall.enable = false;
 
   # This value determines the NixOS release from which the default
   # settings for stateful data, like file locations and database versions
@@ -136,6 +96,6 @@
   # this value at the release version of the first install of this system.
   # Before changing this value read the documentation for this option
   # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
-  system.stateVersion = "24.11"; # Did you read the comment?
+  system.stateVersion = "25.05"; # Did you read the comment?
 
 }

--
Gitblit v1.10.0