aboutsummaryrefslogtreecommitdiff
path: root/nix/modules
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2025-07-21 13:00:38 -0700
committerFranck Cuny <franck@fcuny.net>2025-07-21 13:00:38 -0700
commit40d6a40b1de18f28003c4aa5f36d9b4b0ef4afdd (patch)
tree45a0902743971b1789b1f5d03efde7390cc0e95e /nix/modules
parentmove user configurations to top-level (diff)
downloadinfra-40d6a40b1de18f28003c4aa5f36d9b4b0ef4afdd.tar.gz
move all profiles, modules, and flakes to top-level
Diffstat (limited to 'nix/modules')
-rw-r--r--nix/modules/default-darwin.nix7
-rw-r--r--nix/modules/default.nix7
-rw-r--r--nix/modules/fcuny-net.nix70
-rw-r--r--nix/modules/home.nix38
-rw-r--r--nix/modules/host-config.nix15
5 files changed, 0 insertions, 137 deletions
diff --git a/nix/modules/default-darwin.nix b/nix/modules/default-darwin.nix
deleted file mode 100644
index b42a079..0000000
--- a/nix/modules/default-darwin.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ ... }:
-{
- imports = [
- ./home.nix
- ./host-config.nix
- ];
-}
diff --git a/nix/modules/default.nix b/nix/modules/default.nix
deleted file mode 100644
index b42a079..0000000
--- a/nix/modules/default.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ ... }:
-{
- imports = [
- ./home.nix
- ./host-config.nix
- ];
-}
diff --git a/nix/modules/fcuny-net.nix b/nix/modules/fcuny-net.nix
deleted file mode 100644
index eb5bf95..0000000
--- a/nix/modules/fcuny-net.nix
+++ /dev/null
@@ -1,70 +0,0 @@
-{
- config,
- lib,
- pkgs,
- ...
-}:
-
-let
- cfg = config.services.fcuny-net;
-
- # Import your site - you'll need to adjust the path relative to this module
- fcunyNet = import ../../src/fcuny.net { inherit pkgs; };
-in
-{
- options.services.fcuny-net = {
- enable = lib.mkEnableOption "fcuny.net static site";
-
- domain = lib.mkOption {
- type = lib.types.str;
- default = "fcuny.net";
- description = "Domain name for the site";
- };
-
- port = lib.mkOption {
- type = lib.types.port;
- default = 80;
- description = "Port to serve the site on";
- };
-
- enableSSL = lib.mkOption {
- type = lib.types.bool;
- default = false;
- description = "Enable SSL/TLS with Let's Encrypt";
- };
- };
-
- config = lib.mkIf cfg.enable {
- services.nginx = {
- enable = true;
- virtualHosts.${cfg.domain} = {
- root = fcunyNet.site;
-
- # SSL configuration
- enableACME = cfg.enableSSL;
- forceSSL = cfg.enableSSL;
-
- locations."/" = {
- tryFiles = "$uri $uri/ =404";
- };
-
- extraConfig = ''
- # Cache static assets
- location ~* \.(css|js|png|jpg|jpeg|gif|ico|svg)$ {
- expires 1y;
- add_header Cache-Control "public, immutable";
- }
- '';
- };
- };
-
- # Open firewall
- networking.firewall.allowedTCPPorts = [ cfg.port ] ++ lib.optional cfg.enableSSL 443;
-
- # ACME/Let's Encrypt setup if SSL is enabled
- security.acme = lib.mkIf cfg.enableSSL {
- acceptTerms = true;
- defaults.email = "franck@fcuny.net";
- };
- };
-}
diff --git a/nix/modules/home.nix b/nix/modules/home.nix
deleted file mode 100644
index 6b6b518..0000000
--- a/nix/modules/home.nix
+++ /dev/null
@@ -1,38 +0,0 @@
-{
- userProfiles,
- lib,
- ...
-}:
-let
- inherit (lib) mkOption;
- inherit (lib.types)
- submodule
- listOf
- attrsOf
- str
- ;
-in
-{
- options = {
- home = mkOption {
- type = attrsOf (
- submodule (
- { name, ... }:
- {
- options = {
- name = mkOption {
- type = str;
- default = name;
- };
- profiles = mkOption {
- type = listOf str;
- apply = map (v: userProfiles.${v});
- };
- };
- }
- )
- );
- default = { };
- };
- };
-}
diff --git a/nix/modules/host-config.nix b/nix/modules/host-config.nix
deleted file mode 100644
index b10d85f..0000000
--- a/nix/modules/host-config.nix
+++ /dev/null
@@ -1,15 +0,0 @@
-{ lib, ... }:
-let
- inherit (lib) mkOption;
- inherit (lib.types)
- attrs
- ;
-in
-{
- options = {
- adminUser = mkOption {
- type = attrs;
- default = { };
- };
- };
-}