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 = {

View file

@ -1,4 +1,4 @@
{ inputs, pkgs, username, ... }: let
{ config, inputs, pkgs, ... }: let
sqlite_lib = if builtins.elem pkgs.stdenv.hostPlatform.system [
"aarch64-darwin"
"x86_64-darwin"
@ -166,7 +166,7 @@ in {
};
nh = {
enable = true;
flake = "/Users/${username}/repos/dots";
flake = "${config.home.homeDirectory}/repos/dots";
};
oh-my-posh = {
enable = true;
@ -353,14 +353,14 @@ in {
home.file = {
".config/nvim/lua/config" = {
source = ./files/nvim/lua/config;
source = ../../files/nvim/lua/config;
recursive = true;
};
".config/nvim/lua/plugins" = {
source = ./files/nvim/lua/plugins;
source = ../../files/nvim/lua/plugins;
recursive = true;
};
".config/powershell/Microsoft.PowerShell_profile.ps1".source = ./files/Microsoft.PowerShell_profile.ps1;
".config/powershell/Microsoft.VSCode_profile.ps1".source = ./files/Microsoft.PowerShell_profile.ps1;
".config/powershell/Microsoft.PowerShell_profile.ps1".source = ../../files/Microsoft.PowerShell_profile.ps1;
".config/powershell/Microsoft.VSCode_profile.ps1".source = ../../files/Microsoft.PowerShell_profile.ps1;
};
}

View file

@ -19,7 +19,7 @@
};
home.file = {
".config/tilix/schemes/Beanbag-Mathias.json".source = ../../files/tilix/Beanbag-Mathias.json;
".config/tilix/schemes/Beanbag-Mathias.json".source = ../../../files/tilix/Beanbag-Mathias.json;
".config/tilix/schemes/Catppuccin-Frappe.json".source = (pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "tilix";

View file

@ -1,13 +1,13 @@
{ pkgs, ... }: {
home.file = {
".config/waybar/config".source = ../../files/waybar/config;
".config/waybar/config".source = ../../../files/waybar/config;
".config/waybar/frappe.css".source = (pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "waybar";
rev = "f74ab1eecf2dcaf22569b396eed53b2b2fbe8aff";
hash = "sha256-WLJMA2X20E5PCPg0ZPtSop0bfmu+pLImP9t8A8V4QK8=";
} + "/themes/frappe.css");
".config/waybar/style.css".source = ../../files/waybar/style.css;
".config/waybar/style.css".source = ../../../files/waybar/style.css;
};
programs = {

View file

@ -1,6 +1,6 @@
{ ... }: {
home.file = {
".config/xfce4/terminal/accels.scm".source = ../../files/xfce4/terminal/accels.scm;
".config/xfce4/terminal/accels.scm".source = ../../../files/xfce4/terminal/accels.scm;
};
xfconf.settings = {