hosts: group shared modules under hosts/default.nix

This commit is contained in:
Anthony Rodriguez 2024-12-30 19:28:50 +01:00
parent fe83d5f557
commit d83faa96c4
Signed by: nezia
GPG key ID: EE3BE97C040A86CE
4 changed files with 109 additions and 134 deletions

View file

@ -6,10 +6,6 @@ in {
./networking.nix # generated at runtime by nixos-infect
inputs.agenix.nixosModules.default
"${system}/services/forgejo.nix"
"${system}/services/searx.nix"
"${system}/services/portfolio.nix"
];
boot.tmp.cleanOnBoot = true;

View file

@ -5,23 +5,103 @@
specialArgs = {inherit inputs lib';};
modules = [../shared/nixosModules] ++ (args.modules or []);
};
base = [
../config/nixos
../config/nixos/core/home-manager.nix
../config/nixos/services/logind.nix
../config/nixos/services/greetd.nix
../config/nixos/services/documentation.nix
../config/nixos/services/location.nix
({
config,
specialArgs,
...
}: {
home-manager = {
users.${config.local.systemVars.username}.imports = [
../config/home-manager
../config/home-manager/services/udiskie.nix
../config/home-manager/services/syncthing.nix
];
extraSpecialArgs = specialArgs;
};
})
];
graphical = [
../config/nixos/programs/hyprland.nix
../config/nixos/services/gnome.nix
({config, ...}: {
home-manager.users.${config.local.systemVars.username}.imports = [
../config/home-manager/programs/waybar
../config/home-manager/programs/fuzzel.nix
../config/home-manager/programs/hypr
../config/home-manager/programs/wlogout.nix
../config/home-manager/services/swaync
../config/home-manager/terminal/emulators/foot.nix
../config/home-manager/services/gammastep.nix
];
})
];
gaming = [
../config/nixos/programs/games.nix
({config, ...}: {
home-manager.users.${config.local.systemVars.username}.imports = [
../config/home-manager/programs/games
../config/home-manager/services/flatpak.nix
];
})
];
laptop = [
../config/nixos/core/lanzaboote.nix
../config/nixos/hardware/fprintd.nix
../config/nixos/services/kanata.nix
../config/nixos/services/power.nix
../config/nixos/services/brightness.nix
../config/nixos/hardware/mcuxpresso.nix
];
in {
vamos = mkSystem {
modules = [
./vamos
inputs.nixos-hardware.nixosModules.framework-13-7040-amd
];
modules =
[
./vamos
inputs.nixos-hardware.nixosModules.framework-13-7040-amd
]
++ base
++ graphical
++ laptop;
};
solaire = mkSystem {
modules = [
./solaire
];
modules =
[
./solaire
]
++ base
++ graphical
++ gaming;
};
anastacia = mkSystem {
modules = [
./anastacia
../config/nixos/services/forgejo.nix
../config/nixos/services/searx.nix
../config/nixos/services/portfolio.nix
];
};
}

View file

@ -1,65 +1,15 @@
{
inputs,
specialArgs,
...
}: let
nixos = "${inputs.self}/config/nixos";
hm = "${inputs.self}/config/home-manager";
in {
local.systemVars = {
hostName = "solaire";
username = "nezia";
};
_: {
imports = [./hardware-configuration.nix ./config/theme.nix ./config/nvidia.nix];
local.homeVars = {
fullName = "Anthony Rodriguez";
email = "anthony@nezia.dev";
};
imports = [
./hardware-configuration.nix
./config/nvidia.nix
./config/theme.nix
nixos
"${nixos}/core/home-manager.nix"
"${nixos}/hardware/uni-sync.nix"
"${nixos}/services/logind.nix"
"${nixos}/services/greetd.nix"
"${nixos}/programs/hyprland.nix"
"${nixos}/services/gnome.nix"
"${nixos}/programs/games.nix"
"${nixos}/services/documentation.nix"
"${nixos}/services/flatpak.nix"
"${nixos}/services/location.nix"
];
home-manager = {
users.nezia.imports = [
hm
"${hm}/services/udiskie.nix"
"${hm}/programs/games"
"${hm}/programs/waybar"
"${hm}/programs/fuzzel.nix"
"${hm}/programs/hypr"
"${hm}/services/swaync"
"${hm}/programs/hypr/paper.nix"
"${hm}/terminal/emulators/foot.nix"
"${hm}/services/flatpak.nix"
"${hm}/services/syncthing.nix"
"${hm}/services/gammastep.nix"
];
extraSpecialArgs = specialArgs;
local = {
systemVars = {
hostName = "solaire";
username = "nezia";
};
homeVars = {
fullName = "Anthony Rodriguez";
email = "anthony@nezia.dev";
};
};
environment.variables.FLAKE = "/home/nezia/.dotfiles";

View file

@ -1,67 +1,16 @@
{
inputs,
specialArgs,
...
}: let
nixos = "${inputs.self}/config/nixos";
hm = "${inputs.self}/config/home-manager";
in {
local.systemVars = {
hostName = "vamos";
username = "nezia";
};
_: {
imports = [./hardware-configuration.nix ./config/theme.nix];
local.homeVars = {
fullName = "Anthony Rodriguez";
email = "anthony@nezia.dev";
};
local = {
systemVars = {
hostName = "vamos";
username = "nezia";
};
imports = [
./hardware-configuration.nix
./config/theme.nix
"${nixos}"
"${nixos}/core/lanzaboote.nix"
"${nixos}/core/home-manager.nix"
"${nixos}/hardware/fprintd.nix"
"${nixos}/hardware/mcuxpresso.nix"
"${nixos}/services/power.nix"
"${nixos}/services/brightness.nix"
"${nixos}/services/logind.nix"
"${nixos}/services/greetd.nix"
"${nixos}/services/kanata.nix"
"${nixos}/programs/hyprland.nix"
"${nixos}/services/gnome.nix"
"${nixos}/services/mail.nix"
"${nixos}/services/documentation.nix"
"${nixos}/services/location.nix"
];
home-manager = {
users.nezia.imports = [
"${hm}"
"${hm}/services/udiskie.nix"
"${hm}/programs/hypr"
"${hm}/programs/waybar"
"${hm}/programs/fuzzel.nix"
"${hm}/services/swaync"
"${hm}/programs/hypr/paper.nix"
"${hm}/programs/wlogout.nix"
"${hm}/services/syncthing.nix"
"${hm}/terminal/emulators/foot.nix"
"${hm}/services/gammastep.nix"
];
extraSpecialArgs = specialArgs;
homeVars = {
fullName = "Anthony Rodriguez";
email = "anthony@nezia.dev";
};
};
environment.variables.FLAKE = "/home/nezia/.dotfiles";