Refactor.
This commit is contained in:
@@ -1,13 +1,8 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
# DEPRECATED: Use cluster-node.nix for cluster nodes or minimal-node.nix for minimal systems
|
||||
# This file is kept for backward compatibility with existing configurations
|
||||
imports = [
|
||||
./cifs-client.nix
|
||||
./consul.nix
|
||||
./glusterfs-client.nix
|
||||
./impermanence.nix
|
||||
./sshd.nix
|
||||
./user-ppetru.nix
|
||||
./unattended-encryption.nix
|
||||
./systemd-boot.nix
|
||||
./cluster-node.nix
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
# Cloud node: Minimal system with Consul for cloud deployments
|
||||
imports = [
|
||||
./minimal-node.nix
|
||||
./consul.nix
|
||||
./impermanence.nix
|
||||
./sshd.nix
|
||||
./user-ppetru.nix
|
||||
./systemd-boot.nix
|
||||
];
|
||||
}
|
||||
|
||||
13
common/cluster-node.nix
Normal file
13
common/cluster-node.nix
Normal file
@@ -0,0 +1,13 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
# Cluster node configuration
|
||||
# Extends minimal-node with cluster-specific services (Consul, GlusterFS, CIFS)
|
||||
# Used by: compute nodes (c1, c2, c3)
|
||||
imports = [
|
||||
./minimal-node.nix
|
||||
./unattended-encryption.nix
|
||||
./cifs-client.nix
|
||||
./consul.nix
|
||||
./glusterfs-client.nix
|
||||
];
|
||||
}
|
||||
@@ -1,7 +1,9 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
# Compute node: Cluster node with Nomad, GlusterFS server, and Syncthing
|
||||
# Used by: c1, c2, c3
|
||||
imports = [
|
||||
./base-node.nix
|
||||
./cluster-node.nix
|
||||
./glusterfs.nix
|
||||
./nomad.nix
|
||||
./syncthing-data.nix
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
{ lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
./impermanence.nix # TODO: find a way to avoid needing this here
|
||||
];
|
||||
|
||||
boot.isContainer = true;
|
||||
custom.impermanence.enable = false;
|
||||
custom.tailscale.enable = false;
|
||||
networking.useDHCP = lib.mkForce false;
|
||||
}
|
||||
@@ -1,5 +1,11 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
# Desktop profile: Graphical desktop with Hyprland
|
||||
# Extends workstation-node with desktop environment
|
||||
imports = [
|
||||
./workstation-node.nix
|
||||
];
|
||||
|
||||
# Enable Hyprland (Wayland compositor)
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
|
||||
12
common/minimal-node.nix
Normal file
12
common/minimal-node.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
# Minimal base configuration for all NixOS systems
|
||||
# Provides: SSH access, user management, boot, impermanence
|
||||
# Note: unattended-encryption is NOT included by default - add it explicitly where needed
|
||||
imports = [
|
||||
./impermanence.nix
|
||||
./sshd.nix
|
||||
./user-ppetru.nix
|
||||
./systemd-boot.nix
|
||||
];
|
||||
}
|
||||
14
common/server-node.nix
Normal file
14
common/server-node.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
# Server profile: Cluster-enabled system for server deployments
|
||||
# Extends cluster-node with server-specific configurations
|
||||
# Future: Add bare NixOS services here (mysql, postgres, etc.) when migrating from Nomad
|
||||
imports = [
|
||||
./cluster-node.nix
|
||||
];
|
||||
|
||||
# Server-specific configurations can be added here
|
||||
# Example (for future use):
|
||||
# services.mysql.enable = lib.mkDefault false;
|
||||
# services.postgresql.enable = lib.mkDefault false;
|
||||
}
|
||||
@@ -1,5 +1,12 @@
|
||||
{ pkgs, inputs, ... }:
|
||||
{
|
||||
# Workstation profile: Development workstation configuration
|
||||
# Extends server-node with development tools and emulation
|
||||
imports = [
|
||||
./server-node.nix
|
||||
./unattended-encryption.nix
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
wget
|
||||
deploy-rs
|
||||
Reference in New Issue
Block a user