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,76 +5,45 @@
}: { }: {
flake.nixosConfigurations = let flake.nixosConfigurations = let
inherit (inputs.nixpkgs.lib) nixosSystem; inherit (inputs.nixpkgs.lib) nixosSystem;
homeImports = import "${self}/home/profiles";
mod = "${self}/system";
inherit (import mod) laptop desktop;
specialArgs = { specialArgs = {
inherit inputs self; inherit inputs self;
}; };
in { in {
vamos = nixosSystem { vamos = nixosSystem {
inherit specialArgs; inherit specialArgs;
modules = modules = [
laptop ./vamos
++ [
./vamos
"${mod}/core/lanzaboote.nix"
"${mod}/services/greetd.nix" self.nixosModules.style
"${mod}/programs/niri"
"${mod}/services/gnome.nix"
"${mod}/services/mail.nix"
self.nixosModules.style ({pkgs, ...}: {
style = let
({pkgs, ...}: { wallpaper = pkgs.fetchurl {
style = let url = "https://raw.githubusercontent.com/NixOS/nixos-artwork/e0cf0eb237dc5baba86661a3572b20a6183c1876/wallpapers/nix-wallpaper-nineish-catppuccin-frappe.png?raw=true";
wallpaper = pkgs.fetchurl { hash = "sha256-/HAtpGwLxjNfJvX5/4YZfM8jPNStaM3gisK8+ImRmQ4=";
url = "https://raw.githubusercontent.com/NixOS/nixos-artwork/e0cf0eb237dc5baba86661a3572b20a6183c1876/wallpapers/nix-wallpaper-nineish-catppuccin-frappe.png?raw=true";
hash = "sha256-/HAtpGwLxjNfJvX5/4YZfM8jPNStaM3gisK8+ImRmQ4=";
};
in {
gtk.enable = true;
inherit wallpaper;
}; };
}) in {
{ gtk.enable = true;
home-manager = { inherit wallpaper;
users.nezia.imports = homeImports.vamos; };
extraSpecialArgs = specialArgs; })
};
}
inputs.nixos-hardware.nixosModules.framework-13-7040-amd inputs.nixos-hardware.nixosModules.framework-13-7040-amd
]; ];
}; };
solaire = nixosSystem { solaire = nixosSystem {
inherit specialArgs; inherit specialArgs;
modules = modules = [
desktop ./solaire
++ [ self.nixosModules.style
./solaire {
style = {
"${mod}/programs/gnome.nix" gtk.enable = false;
wallpaper = ../wallpapers/lucy-edgerunners-wallpaper.jpg;
"${mod}/hardware/nvidia.nix" };
"${mod}/programs/games.nix" }
];
self.nixosModules.style
{
style = {
gtk.enable = false;
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 = [ imports = [
./hardware-configuration.nix ./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"; networking.hostName = "solaire";
environment.variables.FLAKE = "/home/nezia/.dotfiles"; environment.variables.FLAKE = "/home/nezia/.dotfiles";
} }

View file

@ -1,7 +1,51 @@
{lib, ...}: { {
self,
specialArgs,
...
}: let
mod = "${self}/system";
in {
imports = [ imports = [
./hardware-configuration.nix ./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"; networking.hostName = "vamos";
environment.variables.FLAKE = "/home/nezia/.dotfiles"; environment.variables.FLAKE = "/home/nezia/.dotfiles";
} }

View file

@ -1,6 +1,7 @@
let {
common = [ imports = [
./core ./core
./hardware/printing.nix ./hardware/printing.nix
./hardware/fwupd.nix ./hardware/fwupd.nix
@ -10,21 +11,4 @@ let
./services ./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;
} }