repo: refactor to remove home/profiles

Removed the profiles directory in home, as I thought it was redundant:
they had the same name as my hostnames, as all my machines are
single-user only. Therefore, everything is now under its own
hosts/{hostname}, and flake.nix just has to import hosts/default.nix
like it did before.
This commit is contained in:
Anthony Rodriguez 2024-10-21 15:34:23 +02:00
parent b88bf7f7e9
commit aa46aa0762
Signed by: nezia
GPG key ID: EE3BE97C040A86CE
7 changed files with 102 additions and 117 deletions

View file

@ -1,10 +0,0 @@
{
vamos = [
../.
./vamos
];
solaire = [
../.
./solaire
];
}

View file

@ -1,11 +0,0 @@
{self, ...}: {
imports = [
"${self}/home/services/udiskie.nix"
"${self}/home/programs"
"${self}/home/terminal/emulators/foot.nix"
"${self}/home/programs/editors/neovim.nix"
"${self}/home/programs/editors/helix.nix"
];
}

View file

@ -1,19 +0,0 @@
{self, ...}: {
imports = [
"${self}/home/services/udiskie.nix"
"${self}/home/programs"
"${self}/home/programs/niri"
"${self}/home/programs/ags"
"${self}/home/programs/fuzzel.nix"
"${self}/home/programs/swaybg.nix"
"${self}/home/programs/swaylock.nix"
"${self}/home/programs/swayidle.nix"
"${self}/home/terminal/emulators/foot.nix"
"${self}/home/programs/editors/neovim.nix"
"${self}/home/programs/editors/helix.nix"
];
}

View file

@ -5,25 +5,14 @@
}: {
flake.nixosConfigurations = let
inherit (inputs.nixpkgs.lib) nixosSystem;
homeImports = import "${self}/home/profiles";
mod = "${self}/system";
inherit (import mod) laptop desktop;
specialArgs = {
inherit inputs self;
};
in {
vamos = nixosSystem {
inherit specialArgs;
modules =
laptop
++ [
modules = [
./vamos
"${mod}/core/lanzaboote.nix"
"${mod}/services/greetd.nix"
"${mod}/programs/niri"
"${mod}/services/gnome.nix"
"${mod}/services/mail.nix"
self.nixosModules.style
@ -38,12 +27,6 @@
inherit wallpaper;
};
})
{
home-manager = {
users.nezia.imports = homeImports.vamos;
extraSpecialArgs = specialArgs;
};
}
inputs.nixos-hardware.nixosModules.framework-13-7040-amd
];
@ -51,16 +34,8 @@
solaire = nixosSystem {
inherit specialArgs;
modules =
desktop
++ [
modules = [
./solaire
"${mod}/programs/gnome.nix"
"${mod}/hardware/nvidia.nix"
"${mod}/programs/games.nix"
self.nixosModules.style
{
style = {
@ -68,12 +43,6 @@
wallpaper = ../wallpapers/lucy-edgerunners-wallpaper.jpg;
};
}
{
home-manager = {
users.nezia.imports = homeImports.solaire;
extraSpecialArgs = specialArgs;
};
}
];
};
};

View file

@ -1,7 +1,35 @@
{pkgs, ...}: {
{
self,
specialArgs,
...
}: let
mod = "${self}/system";
in {
imports = [
./hardware-configuration.nix
"${mod}"
"${mod}/hardware/uni-sync.nix"
"${mod}/programs/gnome.nix"
"${mod}/programs/games.nix"
"${mod}/hardware/nvidia.nix"
];
home-manager = {
users.nezia.imports = [
"${self}/home"
"${self}/home/services/udiskie.nix"
"${self}/home/programs"
"${self}/home/terminal/emulators/foot.nix"
"${self}/home/programs/editors/neovim.nix"
"${self}/home/programs/editors/helix.nix"
];
extraSpecialArgs = specialArgs;
};
networking.hostName = "solaire";
environment.variables.FLAKE = "/home/nezia/.dotfiles";
}

View file

@ -1,7 +1,51 @@
{lib, ...}: {
{
self,
specialArgs,
...
}: let
mod = "${self}/system";
in {
imports = [
./hardware-configuration.nix
"${mod}"
"${mod}/core/lanzaboote.nix"
"${mod}/hardware/fprintd.nix"
"${mod}/services/power.nix"
"${mod}/services/brightness.nix"
"${mod}/services/keyd.nix"
"${mod}/services/logind.nix"
"${mod}/services/greetd.nix"
"${mod}/programs/niri"
"${mod}/services/gnome.nix"
"${mod}/services/mail.nix"
];
home-manager = {
users.nezia.imports = [
"${self}/home"
"${self}/home/services/udiskie.nix"
"${self}/home/programs"
"${self}/home/programs/niri"
"${self}/home/programs/ags"
"${self}/home/programs/fuzzel.nix"
"${self}/home/programs/swaybg.nix"
"${self}/home/programs/swaylock.nix"
"${self}/home/programs/swayidle.nix"
"${self}/home/terminal/emulators/foot.nix"
"${self}/home/programs/editors/neovim.nix"
"${self}/home/programs/editors/helix.nix"
];
extraSpecialArgs = specialArgs;
};
networking.hostName = "vamos";
environment.variables.FLAKE = "/home/nezia/.dotfiles";
}

View file

@ -1,6 +1,7 @@
let
common = [
{
imports = [
./core
./hardware/printing.nix
./hardware/fwupd.nix
@ -10,21 +11,4 @@ let
./services
];
desktop =
common
++ [
./hardware/uni-sync.nix
];
laptop =
common
++ [
./hardware/fprintd.nix
./services/power.nix
./services/brightness.nix
./services/keyd.nix
./services/logind.nix
];
in {
inherit desktop laptop;
}