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

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;
}