summaryrefslogtreecommitdiff
path: root/nix/systems
diff options
context:
space:
mode:
authorPreston Pan <ret2pop@gmail.com>2025-09-18 22:33:36 -0700
committerPreston Pan <ret2pop@gmail.com>2025-09-18 22:33:36 -0700
commitbb31a5a879154432e11a75e69070b58004ddc07b (patch)
tree4bd092f8808e32947629b75e708830699d4773dc /nix/systems
parentcae70df061d9fc4f33a2da66a21c86eb3eb1fa3b (diff)
big refactor
Diffstat (limited to 'nix/systems')
-rw-r--r--nix/systems/affinity/default.nix2
-rw-r--r--nix/systems/affinity/home.nix2
-rw-r--r--nix/systems/common.nix8
-rw-r--r--nix/systems/continuity/default.nix11
-rw-r--r--nix/systems/continuity/home.nix2
-rw-r--r--nix/systems/home-common.nix7
-rw-r--r--nix/systems/home.nix1
-rw-r--r--nix/systems/includes.nix7
-rw-r--r--nix/systems/installer/default.nix6
-rw-r--r--nix/systems/spontaneity/default.nix41
-rw-r--r--nix/systems/spontaneity/home.nix2
11 files changed, 57 insertions, 32 deletions
diff --git a/nix/systems/affinity/default.nix b/nix/systems/affinity/default.nix
index 17f140a..72057dd 100644
--- a/nix/systems/affinity/default.nix
+++ b/nix/systems/affinity/default.nix
@@ -1,7 +1,7 @@
{ config, lib, home-manager, ... }:
{
imports = [
- ../includes.nix
+ ../common.nix
../../disko/drive-simple.nix
];
config = {
diff --git a/nix/systems/affinity/home.nix b/nix/systems/affinity/home.nix
index 7b08138..7c8a119 100644
--- a/nix/systems/affinity/home.nix
+++ b/nix/systems/affinity/home.nix
@@ -1,7 +1,7 @@
{ lib, config, pkgs, ... }:
{
imports = [
- ../../modules/home/default.nix
+ ../home-common.nix
];
config.monorepo = {
profiles.cuda.enable = true;
diff --git a/nix/systems/common.nix b/nix/systems/common.nix
new file mode 100644
index 0000000..c122b0d
--- /dev/null
+++ b/nix/systems/common.nix
@@ -0,0 +1,8 @@
+{ config, lib, ... }:
+{
+ imports = [
+ ./home.nix
+ ../modules/default.nix
+ ];
+ # Put configuration (e.g. monorepo variable configuration) common to all configs here
+}
diff --git a/nix/systems/continuity/default.nix b/nix/systems/continuity/default.nix
index 5bd6517..e9efd34 100644
--- a/nix/systems/continuity/default.nix
+++ b/nix/systems/continuity/default.nix
@@ -2,10 +2,15 @@
{
imports = [
../../disko/drive-simple.nix
- ../includes.nix
+ ../common.nix
];
config = {
- # drive to install to
- monorepo.vars.device = "/dev/sda";
+ monorepo = {
+ profiles.impermanence.enable = true;
+ vars = {
+ device = "/dev/sda";
+ fileSystem = "btrfs";
+ };
+ };
};
}
diff --git a/nix/systems/continuity/home.nix b/nix/systems/continuity/home.nix
index fb4a0a7..2b133a5 100644
--- a/nix/systems/continuity/home.nix
+++ b/nix/systems/continuity/home.nix
@@ -1,7 +1,7 @@
{ lib, config, pkgs, ... }:
{
imports = [
- ../../modules/home/default.nix
+ ../home-common.nix
];
config.monorepo.profiles.workstation.enable = false;
}
diff --git a/nix/systems/home-common.nix b/nix/systems/home-common.nix
new file mode 100644
index 0000000..ba0e6f2
--- /dev/null
+++ b/nix/systems/home-common.nix
@@ -0,0 +1,7 @@
+{ lib, config, ... }:
+{
+ imports = [
+ ../modules/home/default.nix
+ ];
+ # Put configuration (e.g. monorepo variable configuration) common to all configs here
+}
diff --git a/nix/systems/home.nix b/nix/systems/home.nix
index 63c4150..c1252df 100644
--- a/nix/systems/home.nix
+++ b/nix/systems/home.nix
@@ -1,7 +1,6 @@
{ config, sops-nix, ... }:
{
home-manager = {
-
sharedModules = [
sops-nix.homeManagerModules.sops
];
diff --git a/nix/systems/includes.nix b/nix/systems/includes.nix
deleted file mode 100644
index 5122fb2..0000000
--- a/nix/systems/includes.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ config, lib, ... }:
-{
- imports = [
- ./home.nix
- ../modules/default.nix
- ];
-}
diff --git a/nix/systems/installer/default.nix b/nix/systems/installer/default.nix
index 4bda0d6..8fb9dfd 100644
--- a/nix/systems/installer/default.nix
+++ b/nix/systems/installer/default.nix
@@ -50,6 +50,10 @@ if [ "$(id -u)" -eq 0 ]; then
exit 1
fi
+gum style --border normal --margin "1" --padding "1 2" "Notice: if using full disk encryption, write to /tmp/secret.key first with your password."
+
+sleep 3
+
cd "$HOME"
ping -q -c1 google.com &>/dev/null && echo "online! Proceeding with the installation..." || nmtui
@@ -102,7 +106,7 @@ EOF
gum input --placeholder "Press Enter to continue" >/dev/null
vim "$HOME/monorepo/nix/systems/$SYSTEM/home.nix"
- sed -i "/# add hostnames here/i \ \"$1\"" "$HOME/monorepo/nix/flake.nix"
+ sed -i "/hostnames = \[/,/];/ s/];/ \"$1\"\n ];/" "$HOME/monorepo/nix/flake.nix"
if [ ! -f "$HOME/monorepo/nix/disko/$DRIVE" ]; then
cp "$HOME/monorepo/nix/disko/drive-simple.nix" "$HOME/monorepo/nix/disko/$DRIVE"
diff --git a/nix/systems/spontaneity/default.nix b/nix/systems/spontaneity/default.nix
index 3ab7a9e..5f3dc36 100644
--- a/nix/systems/spontaneity/default.nix
+++ b/nix/systems/spontaneity/default.nix
@@ -1,10 +1,15 @@
{ config, lib, ... }:
+let
+ ipv4addr = "66.42.84.130";
+ ipv6addr = "2001:19f0:5401:10d0:5400:5ff:fe4a:7794";
+in
{
imports = [
- ../includes.nix
+ ../common.nix
+ ../../disko/drive-bios.nix
+
# nixos-anywhere generates this file
./hardware-configuration.nix
- ../../disko/drive-bios.nix
];
config = {
monorepo = {
@@ -20,43 +25,47 @@
networking = {
interfaces.ens3.ipv6.addresses = [
{
- address = "2001:19f0:5401:10d0:5400:5ff:fe4a:7794";
+ address = ipv6addr;
prefixLength = 64;
}
];
firewall.allowedTCPPorts = [
80
+ 143
443
465
+ 587
993
- 8448
6697
6667
+ 8448
];
domains = {
enable = true;
baseDomains = {
"${config.monorepo.vars.remoteHost}" = {
- a.data = "66.42.84.130";
- aaaa.data = "2001:19f0:5401:10d0:5400:5ff:fe4a:7794";
+ a.data = ipv4addr;
+ aaaa.data = ipv6addr;
};
- "nullring.xyz" = {
- a.data = "66.42.84.130";
- aaaa.data = "2001:19f0:5401:10d0:5400:5ff:fe4a:7794";
+ "${config.monorepo.vars.orgHost}" = {
+ a.data = ipv4addr;
+ aaaa.data = ipv6addr;
};
};
subDomains = {
"${config.monorepo.vars.remoteHost}" = {};
"matrix.${config.monorepo.vars.remoteHost}" = {};
"www.${config.monorepo.vars.remoteHost}" = {};
- "mail.${config.monorepo.vars.remoteHost}" = {};
+ "mail.${config.monorepo.vars.remoteHost}" = {
+ mx.data = "10 mail.${config.monorepo.vars.remoteHost}.";
+ };
- "nullring.xyz" = {};
- "git.nullring.xyz" = {};
- "matrix.nullring.xyz" = {};
- "talk.nullring.xyz" = {};
- "mail.nullring.xyz" = {};
- "ret2pop.nullring.xyz" = {};
+ "${config.monorepo.vars.orgHost}" = {};
+ "git.${config.monorepo.vars.orgHost}" = {};
+ "matrix.${config.monorepo.vars.orgHost}" = {};
+ "talk.${config.monorepo.vars.orgHost}" = {};
+ "mail.${config.monorepo.vars.orgHost}" = {};
+ "${config.monorepo.vars.internetName}.${config.monorepo.vars.orgHost}" = {};
};
};
};
diff --git a/nix/systems/spontaneity/home.nix b/nix/systems/spontaneity/home.nix
index cc93b5d..205ea02 100644
--- a/nix/systems/spontaneity/home.nix
+++ b/nix/systems/spontaneity/home.nix
@@ -1,7 +1,7 @@
{ lib, config, pkgs, ... }:
{
imports = [
- ../../modules/home/default.nix
+ ../home-common.nix
];
config.monorepo.profiles.enable = false;
}