summaryrefslogtreecommitdiff
path: root/nixos
diff options
context:
space:
mode:
Diffstat (limited to 'nixos')
-rw-r--r--nixos/hosts/ev/default.nix8
-rw-r--r--nixos/hosts/hamac/default.nix9
-rw-r--r--nixos/hosts/tente/default.nix4
-rw-r--r--nixos/profiles/common/basics.nix (renamed from nixos/parts/basics.nix)0
-rw-r--r--nixos/profiles/common/default.nix8
-rw-r--r--nixos/profiles/common/nixpkgs/config.nix (renamed from nixos/nixpkgs/config.nix)0
-rw-r--r--nixos/profiles/common/nixpkgs/overlays.nix (renamed from nixos/nixpkgs/overlays.nix)0
-rw-r--r--nixos/profiles/common/sanix.nix (renamed from nixos/sanix.nix)5
-rw-r--r--nixos/profiles/server/default.nix (renamed from nixos/parts/server.nix)4
-rw-r--r--nixos/profiles/workstation/create.nix (renamed from nixos/parts/create.nix)0
-rw-r--r--nixos/profiles/workstation/default.nix20
-rw-r--r--nixos/profiles/workstation/dev.nix (renamed from nixos/parts/dev.nix)5
-rw-r--r--nixos/profiles/workstation/graphical.nix (renamed from nixos/parts/graphical.nix)5
-rwxr-xr-xnixos/profiles/workstation/scripts/deploy-dir (renamed from nixos/parts/scripts/deploy-dir)0
-rw-r--r--nixos/profiles/workstation/scripts/reset-bg (renamed from nixos/parts/scripts/reset-bg)0
-rw-r--r--nixos/profiles/workstation/scripts/set-bg (renamed from nixos/parts/scripts/set-bg)0
-rwxr-xr-xnixos/rebuild2
-rw-r--r--nixos/shared/basics-physical.nix (renamed from nixos/parts/basics-physical.nix)0
-rw-r--r--nixos/shared/tailscale.nix (renamed from nixos/parts/tailscale.nix)0
19 files changed, 39 insertions, 31 deletions
diff --git a/nixos/hosts/ev/default.nix b/nixos/hosts/ev/default.nix
index d8b4b24..ec2ed86 100644
--- a/nixos/hosts/ev/default.nix
+++ b/nixos/hosts/ev/default.nix
@@ -8,11 +8,9 @@
{
imports = [
./hardware-configuration.nix
- ../../sanix.nix
- ../../parts/server.nix
- ../../parts/tailscale.nix
- ../../parts/basics.nix
- ../../parts/basics-physical.nix
+ <top/profiles/server>
+ <top/shared/tailscale.nix>
+ <top/shared/basics-physical.nix>
];
boot.loader.systemd-boot.enable = true;
diff --git a/nixos/hosts/hamac/default.nix b/nixos/hosts/hamac/default.nix
index c8f40e1..594d70c 100644
--- a/nixos/hosts/hamac/default.nix
+++ b/nixos/hosts/hamac/default.nix
@@ -6,13 +6,8 @@
{
imports = [
./hardware-configuration.nix
- ../../sanix.nix
- ../../parts/basics.nix
- ../../parts/basics-physical.nix
- ../../parts/graphical.nix
- ../../parts/tailscale.nix
- ../../parts/dev.nix
- ../../parts/create.nix
+ <top/profiles/workstation>
+ <top/shared/tailscale.nix>
];
# Bootloader.
diff --git a/nixos/hosts/tente/default.nix b/nixos/hosts/tente/default.nix
index b38d1ea..7885ff4 100644
--- a/nixos/hosts/tente/default.nix
+++ b/nixos/hosts/tente/default.nix
@@ -21,9 +21,7 @@ in
{
imports = [
./hardware-configuration.nix
- ../../sanix.nix
- ../../parts/server.nix
- ../../parts/basics.nix
+ <top/profiles/server>
];
# Use the GRUB 2 boot loader.
diff --git a/nixos/parts/basics.nix b/nixos/profiles/common/basics.nix
index aa6eff9..aa6eff9 100644
--- a/nixos/parts/basics.nix
+++ b/nixos/profiles/common/basics.nix
diff --git a/nixos/profiles/common/default.nix b/nixos/profiles/common/default.nix
new file mode 100644
index 0000000..de4499a
--- /dev/null
+++ b/nixos/profiles/common/default.nix
@@ -0,0 +1,8 @@
+{ config, pkgs, ... }:
+
+{
+ imports = [
+ ./sanix.nix
+ ./basics.nix
+ ];
+}
diff --git a/nixos/nixpkgs/config.nix b/nixos/profiles/common/nixpkgs/config.nix
index b53485a..b53485a 100644
--- a/nixos/nixpkgs/config.nix
+++ b/nixos/profiles/common/nixpkgs/config.nix
diff --git a/nixos/nixpkgs/overlays.nix b/nixos/profiles/common/nixpkgs/overlays.nix
index 613338f..613338f 100644
--- a/nixos/nixpkgs/overlays.nix
+++ b/nixos/profiles/common/nixpkgs/overlays.nix
diff --git a/nixos/sanix.nix b/nixos/profiles/common/sanix.nix
index 02d9ed5..a20db24 100644
--- a/nixos/sanix.nix
+++ b/nixos/profiles/common/sanix.nix
@@ -1,9 +1,4 @@
{ lib, pkgs, config, ... }: {
- environment.systemPackages = with pkgs; [
- # We're using npins to manage the systems Nixpkgs version, install it globally for ease
- npins
- ];
-
# Use the Nixpkgs config and overlays from the local files for this NixOS build
nixpkgs = {
config = import ./nixpkgs/config.nix;
diff --git a/nixos/parts/server.nix b/nixos/profiles/server/default.nix
index 3d94985..4ccef67 100644
--- a/nixos/parts/server.nix
+++ b/nixos/profiles/server/default.nix
@@ -1,6 +1,10 @@
{ config, pkgs, ... }:
{
+ imports = [
+ ../common
+ ];
+
services = {
openssh = {
enable = true;
diff --git a/nixos/parts/create.nix b/nixos/profiles/workstation/create.nix
index 1fc7a28..1fc7a28 100644
--- a/nixos/parts/create.nix
+++ b/nixos/profiles/workstation/create.nix
diff --git a/nixos/profiles/workstation/default.nix b/nixos/profiles/workstation/default.nix
new file mode 100644
index 0000000..ddc9a8c
--- /dev/null
+++ b/nixos/profiles/workstation/default.nix
@@ -0,0 +1,20 @@
+{ config, pkgs, ... }:
+
+{
+ imports = [
+ ../common
+ <top/shared/basics-physical.nix>
+ ./graphical.nix
+ ./dev.nix
+ ./create.nix
+ ];
+
+ environment.systemPackages = with pkgs; [
+ npins
+ ];
+
+ environment.sessionVariables = {
+ # Tell .zshrc to source zshrc-workstation.sh.
+ MYNIX_PROFILE = "workstation";
+ };
+}
diff --git a/nixos/parts/dev.nix b/nixos/profiles/workstation/dev.nix
index 0d258b4..1e04b4c 100644
--- a/nixos/parts/dev.nix
+++ b/nixos/profiles/workstation/dev.nix
@@ -1,11 +1,6 @@
{ config, pkgs, ... }:
{
- environment.sessionVariables = {
- # Tell .zshrc to source zshrc-dev.sh.
- MYNIX_DEV = "true";
- };
-
environment.systemPackages = with pkgs; [
rustup
python313
diff --git a/nixos/parts/graphical.nix b/nixos/profiles/workstation/graphical.nix
index d459c33..d79ed97 100644
--- a/nixos/parts/graphical.nix
+++ b/nixos/profiles/workstation/graphical.nix
@@ -12,11 +12,6 @@
[[ "$(tty)" == /dev/tty1 ]] && exec sway
'';
- environment.sessionVariables = {
- # Tell .zshrc to source zshrc-graphical.sh.
- MYNIX_GRAPHICAL = "true";
- };
-
environment.systemPackages = with pkgs; [
swaylock
diff --git a/nixos/parts/scripts/deploy-dir b/nixos/profiles/workstation/scripts/deploy-dir
index bb7dfdf..bb7dfdf 100755
--- a/nixos/parts/scripts/deploy-dir
+++ b/nixos/profiles/workstation/scripts/deploy-dir
diff --git a/nixos/parts/scripts/reset-bg b/nixos/profiles/workstation/scripts/reset-bg
index 5aa20f6..5aa20f6 100644
--- a/nixos/parts/scripts/reset-bg
+++ b/nixos/profiles/workstation/scripts/reset-bg
diff --git a/nixos/parts/scripts/set-bg b/nixos/profiles/workstation/scripts/set-bg
index e78afdc..e78afdc 100644
--- a/nixos/parts/scripts/set-bg
+++ b/nixos/profiles/workstation/scripts/set-bg
diff --git a/nixos/rebuild b/nixos/rebuild
index 978dc87..80a52cd 100755
--- a/nixos/rebuild
+++ b/nixos/rebuild
@@ -28,4 +28,4 @@ nixpkgsPath=$(nix-eval --argstr channel "$channel" --expr '{channel}: (import ./
# nixos-rebuild always reads Nixpkgs from the NIX_PATH,
# so we need to set it explicitly to our pinned version
-exec nixos-rebuild "$@" -I nixpkgs="$nixpkgsPath" -I nixos-config="$configPath"
+exec nixos-rebuild "$@" -I nixpkgs="$nixpkgsPath" -I nixos-config="$configPath" -I top="$(pwd)"
diff --git a/nixos/parts/basics-physical.nix b/nixos/shared/basics-physical.nix
index 683c3b2..683c3b2 100644
--- a/nixos/parts/basics-physical.nix
+++ b/nixos/shared/basics-physical.nix
diff --git a/nixos/parts/tailscale.nix b/nixos/shared/tailscale.nix
index 5d5a99c..5d5a99c 100644
--- a/nixos/parts/tailscale.nix
+++ b/nixos/shared/tailscale.nix