Restructure modules/shared and update all imports

- Rename modules/hosts/common to modules/shared
- Split shared into home/general, home/linux, and nixos subdirectories
- Update all import paths in lib/ and modules/hosts/
- Fix hardcoded /Users/ path to use config.home.homeDirectory
- Update .sops.yaml path for secrets
This commit is contained in:
Gene Liverman 2026-03-14 00:10:30 -04:00
parent 14fbadd9aa
commit 5047d93b86
No known key found for this signature in database
77 changed files with 44 additions and 359 deletions

View file

@ -10,8 +10,8 @@
{
imports = [ # Include the results of the hardware scan.
./hardware-configuration.nix
../../common/linux/flatpaks.nix
../../common/linux/ripping.nix
../../../shared/nixos/flatpaks.nix
../../../shared/nixos/ripping.nix
];
system.stateVersion = "24.11"; # Did you read the comment?

View file

@ -1,9 +1,9 @@
{ ... }: {
home.stateVersion = "24.05";
imports = [
../../common/all-gui.nix
../../common/linux/apps/tilix.nix
../../common/linux/apps/xfce4-terminal.nix
../../../shared/home/general/all-gui.nix
../../../shared/home/linux/apps/tilix.nix
../../../shared/home/linux/apps/xfce4-terminal.nix
];
programs = {

View file

@ -1,6 +1,6 @@
{ hostname, pkgs, username, ... }: {
imports = [
../common/linux/internationalisation.nix
../shared/nixos/internationalisation.nix
];
environment = {

View file

@ -1,6 +1,6 @@
{ inputs, pkgs, username, ... }: {
imports = [
../../common/linux/nixroutes.nix
../../../shared/nixos/nixroutes.nix
./disk-config.nix
./hardware-configuration.nix
./post-install

View file

@ -3,8 +3,8 @@
restic_backup_time = "01:00";
in {
imports = [
../../../common/linux/lets-encrypt.nix
../../../common/linux/restic.nix
../../../../shared/nixos/lets-encrypt.nix
../../../../shared/nixos/restic.nix
./containers/emqx.nix
./matrix-synapse.nix
./monitoring.nix

View file

@ -120,7 +120,7 @@ in {
vmagent_push_pw = {
owner = "vmagent";
restartUnits = ["vmagent.service"];
sopsFile = ../../../common/secrets.yaml;
sopsFile = ../../../../shared/secrets.yaml;
};
};
};

View file

@ -1,6 +1,6 @@
{ inputs, pkgs, username, ... }: {
imports = [
../../common/linux/nixroutes.nix
../../../shared/nixos/nixroutes.nix
./disk-config.nix
./hardware-configuration.nix
./post-install

View file

@ -1,6 +1,6 @@
{ config, username, ... }: {
imports = [
../../../common/linux/lets-encrypt.nix
../../../../shared/nixos/lets-encrypt.nix
./monitoring.nix
./nginx.nix
];

View file

@ -120,7 +120,7 @@ in {
vmagent_push_pw = {
owner = "vmagent";
restartUnits = ["vmagent.service"];
sopsFile = ../../../common/secrets.yaml;
sopsFile = ../../../../shared/secrets.yaml;
};
};
};

View file

@ -97,7 +97,7 @@
path = "${config.users.users.${username}.home}/.private-env";
};
wifi_creds = {
sopsFile = ../../common/secrets.yaml;
sopsFile = ../../../shared/secrets.yaml;
restartUnits = [
"wpa_supplicant.service"
];

View file

@ -120,7 +120,7 @@ in {
vmagent_push_pw = {
owner = "vmagent";
restartUnits = ["vmagent.service"];
sopsFile = ../../../common/secrets.yaml;
sopsFile = ../../../../shared/secrets.yaml;
};
};
};

View file

@ -90,7 +90,7 @@
path = "${config.users.users.${username}.home}/.private-env";
};
wifi_creds = {
sopsFile = ../../common/secrets.yaml;
sopsFile = ../../../shared/secrets.yaml;
restartUnits = [
"wpa_supplicant.service"
];

View file

@ -2,7 +2,7 @@
imports = [
./disk-config.nix
./hardware-configuration.nix
../../../system/common/linux/restic.nix
../../../shared/nixos/restic.nix
];
system.stateVersion = "24.05";

View file

@ -11,8 +11,8 @@ in {
./containers/mountain-mesh-bot-discord.nix
./containers/psitransfer.nix
./monitoring-stack.nix
../../common/linux/lets-encrypt.nix
../../common/linux/restic.nix
../../../shared/nixos/lets-encrypt.nix
../../../shared/nixos/restic.nix
];
system.stateVersion = "23.11";

View file

@ -363,7 +363,7 @@ in {
uptimekuma_grafana_api_key = {
owner = "vmagent";
restartUnits = ["vmagent.service"];
sopsFile = ../../common/secrets.yaml;
sopsFile = ../../../shared/secrets.yaml;
};
};
};

View file

@ -1,8 +1,8 @@
{ inputs, config, pkgs, username, ... }: {
imports = [
./hardware-configuration.nix
../../common/linux/flatpaks.nix
../../common/linux/ripping.nix
../../../shared/nixos/flatpaks.nix
../../../shared/nixos/ripping.nix
];
system.stateVersion = "23.05";

View file

@ -1,12 +1,12 @@
{ pkgs, ... }: {
home.stateVersion = "23.11";
imports = [
../../common/all-gui.nix
../../common/linux/apps/hexchat.nix
../../common/linux/apps/pidgin.nix
../../common/linux/apps/tilix.nix
../../common/linux/apps/waybar.nix
../../common/linux/apps/xfce4-terminal.nix
../../../shared/home/general/all-gui.nix
../../../shared/home/linux/apps/hexchat.nix
../../../shared/home/linux/apps/pidgin.nix
../../../shared/home/linux/apps/tilix.nix
../../../shared/home/linux/apps/waybar.nix
../../../shared/home/linux/apps/xfce4-terminal.nix
];
home.file = {