aboutsummaryrefslogtreecommitdiff
path: root/machines
diff options
context:
space:
mode:
Diffstat (limited to 'machines')
-rw-r--r--machines/argonath.nix7
-rw-r--r--machines/bree.nix12
-rw-r--r--machines/iso.nix7
-rw-r--r--machines/mba-personal.nix16
-rw-r--r--machines/mbp-work.nix16
-rw-r--r--machines/rivendell.nix14
6 files changed, 40 insertions, 32 deletions
diff --git a/machines/argonath.nix b/machines/argonath.nix
index 29d78ae..0c141dc 100644
--- a/machines/argonath.nix
+++ b/machines/argonath.nix
@@ -1,4 +1,4 @@
-{ ... }:
+{ adminUser, ... }:
{
imports = [
../profiles/acme.nix
@@ -11,14 +11,15 @@
../profiles/reverse-proxy.nix
../profiles/server.nix
../profiles/wireguard.nix
- ../profiles/users/fcuny.nix
+ ../profiles/users/home-manager.nix
+ ../profiles/users/admin-user.nix
];
networking.hostName = "argonath";
system.stateVersion = "25.05"; # Did you read the comment?
- home-manager.users.fcuny = {
+ home-manager.users.${adminUser.name} = {
imports = [
../home/profiles/minimal.nix
];
diff --git a/machines/bree.nix b/machines/bree.nix
index d779ce3..a633997 100644
--- a/machines/bree.nix
+++ b/machines/bree.nix
@@ -1,4 +1,9 @@
-{ lib, config, ... }:
+{
+ adminUser,
+ lib,
+ config,
+ ...
+}:
{
imports = [
../profiles/cgroups.nix
@@ -8,7 +13,8 @@
../profiles/hardware/synology-vm.nix
../profiles/home-manager.nix
../profiles/server.nix
- ../profiles/users/fcuny.nix
+ ../profiles/users/admin-user.nix
+ ../profiles/users/home-manager.nix
../profiles/wireguard.nix
];
@@ -30,7 +36,7 @@
system.stateVersion = "23.11"; # Did you read the comment?
- home-manager.users.fcuny = {
+ home-manager.users.${adminUser.name} = {
imports = [
../home/profiles/minimal.nix
];
diff --git a/machines/iso.nix b/machines/iso.nix
index a636508..4d54054 100644
--- a/machines/iso.nix
+++ b/machines/iso.nix
@@ -1,11 +1,12 @@
-{ modulesPath, ... }:
+{ adminUser, modulesPath, ... }:
{
# run `nix build .#nixosConfigurations.iso.config.system.build.isoImage` to build the image
imports = [
"${modulesPath}/installer/cd-dvd/channel.nix"
"${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix"
../profiles/home-manager.nix
- ../profiles/users/fcuny.nix
+ ../profiles/users/admin-user.nix
+ ../profiles/users/home-manager.nix
];
boot.loader.grub.efiSupport = true;
@@ -16,7 +17,7 @@
programs.fish.enable = true;
- home-manager.users.fcuny = {
+ home-manager.users.${adminUser.name} = {
imports = [
../home/profiles/minimal.nix
];
diff --git a/machines/mba-personal.nix b/machines/mba-personal.nix
index 0804043..5b0487c 100644
--- a/machines/mba-personal.nix
+++ b/machines/mba-personal.nix
@@ -1,4 +1,4 @@
-{ pkgs, ... }:
+{ adminUser, pkgs, ... }:
{
age.secrets.ssh-remote-builder.file = ../secrets/ssh-remote-builder.age;
@@ -13,22 +13,18 @@
networking.hostName = "mba-m2";
- users.users.fcuny = {
- home = "/Users/fcuny";
+ users.users.${adminUser.name} = {
+ home = "/Users/${adminUser.name}";
shell = pkgs.fish;
};
- home-manager.users.fcuny = {
+ home-manager.users.${adminUser.name} = {
home.stateVersion = "23.05";
- home.username = "fcuny";
- home.homeDirectory = "/Users/fcuny";
+ home.homeDirectory = "/Users/${adminUser.name}";
imports = [
../home/profiles/darwin.nix
../home/profiles/personal.nix
];
- userinfo = {
- email = "franck@fcuny.net";
- fullName = "Franck Cuny";
- };
+ inherit (adminUser) userinfo;
};
}
diff --git a/machines/mbp-work.nix b/machines/mbp-work.nix
index 8050987..b0541ac 100644
--- a/machines/mbp-work.nix
+++ b/machines/mbp-work.nix
@@ -1,26 +1,22 @@
-{ pkgs, ... }:
+{ adminUser, pkgs, ... }:
{
imports = [
../profiles/darwin.nix
../profiles/home-manager.nix
+ ../profiles/users/home-manager.nix
];
- users.users.fcuny = {
- home = "/Users/fcuny";
+ users.users.${adminUser.name} = {
+ home = "/Users/${adminUser.name}";
shell = pkgs.fish;
};
- home-manager.users.fcuny = {
+ home-manager.users.${adminUser.name} = {
home.stateVersion = "23.05";
- home.username = "fcuny";
- home.homeDirectory = "/Users/fcuny";
+ home.homeDirectory = "/Users/${adminUser.name}";
imports = [
../home/profiles/mac.nix
../home/profiles/work.nix
];
- userinfo = {
- email = "fcuny@roblox.com";
- fullName = "Franck Cuny";
- };
};
}
diff --git a/machines/rivendell.nix b/machines/rivendell.nix
index c295d24..33fe6f8 100644
--- a/machines/rivendell.nix
+++ b/machines/rivendell.nix
@@ -1,4 +1,9 @@
-{ lib, config, ... }:
+{
+ adminUser,
+ lib,
+ config,
+ ...
+}:
{
imports = [
../profiles/authelia.nix
@@ -17,7 +22,8 @@
../profiles/server.nix
../profiles/storage-media.nix
../profiles/users/builder.nix
- ../profiles/users/fcuny.nix
+ ../profiles/users/admin-user.nix
+ ../profiles/users/home-manager.nix
../profiles/wireguard.nix
];
@@ -76,5 +82,7 @@
system.stateVersion = "23.11";
- home-manager.users.fcuny.imports = [ ../home/profiles/minimal.nix ];
+ home-manager.users.${adminUser.name} = {
+ imports = [ ../home/profiles/minimal.nix ];
+ };
}