factorize home configuration in flake.nix

This commit is contained in:
Antoine Vaure 2025-09-03 16:24:14 +02:00
parent 1a0086f941
commit 210b1b435c
2 changed files with 50 additions and 86 deletions

132
flake.nix
View file

@ -32,97 +32,59 @@
./os/${name}/configuration.nix
];
};
homeConfig = modules: inputs.home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {
inherit pkgs-unstable;
inherit inputs;
};
inherit modules;
};
in
{
homeConfigurations."anvaure@Allegro23-12" = inputs.home-manager.lib.homeManagerConfiguration {
inherit pkgs;
homeConfigurations."anvaure@Allegro23-12" = homeConfig [
{ home.username = "anvaure"; }
./home/base.nix
./home/ui.nix
./home/gui-software.nix
./home/syncthing.nix
./home/allegro.nix
{ home.packages = [ nixgl.nixGLIntel ]; }
{ targets.genericLinux.enable = true; }
];
extraSpecialArgs = {
inherit pkgs-unstable;
};
homeConfigurations."ant@hs" = homeConfig [
{ home.username = "ant"; }
./home/base.nix
];
modules = [
{ home.username = "anvaure"; }
./home/base.nix
{ home.packages = [ nixgl.nixGLIntel ]; }
{ targets.genericLinux.enable = true; }
{ home.packages = [ inputs.st-flexipatch.packages.${system}.st ]; }
./home/syncthing.nix
./home/allegro.nix
homeConfigurations."ant@ks" = homeConfig [
{ home.username = "ant"; }
./home/base.nix
];
./home/ui.nix
./home/gui-software.nix
];
};
homeConfigurations."ant@basado" = homeConfig [
{ home.username = "ant"; }
./home/base.nix
./home/ui.nix
./home/gui-software.nix
./home/gaming.nix
./home/syncthing.nix
{ services.kdeconnect.enable = true; }
./home/basado.nix
];
homeConfigurations."ant@hs" = inputs.home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {
inherit pkgs-unstable;
};
modules = [
{ home.username = "ant"; }
./home/base.nix
];
};
homeConfigurations."ant@ks" = inputs.home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {
inherit pkgs-unstable;
};
modules = [
{ home.username = "ant"; }
./home/base.nix
];
};
homeConfigurations."ant@basado" = inputs.home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {
inherit pkgs-unstable;
inherit inputs;
};
modules = [
{ home.username = "ant"; }
./home/base.nix
{ home.packages = [ inputs.st-flexipatch.packages.${system}.st ]; }
./home/syncthing.nix
./home/basado.nix
./home/ui.nix
./home/gui-software.nix
./home/gaming.nix
{ services.kdeconnect.enable = true; }
];
};
homeConfigurations."ant@moon" = inputs.home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {
inherit pkgs-unstable;
inherit inputs;
};
modules = [
{ home.username = "ant"; }
./home/base.nix
{ home.packages = [ inputs.st-flexipatch.packages.${system}.st ]; }
./home/syncthing.nix
./home/moon.nix
./home/ui.nix
./home/gui-software.nix
{ services.kdeconnect.enable = true; }
];
};
homeConfigurations."ant@moon" = homeConfig [
{ home.username = "ant"; }
./home/base.nix
./home/ui.nix
./home/gui-software.nix
./home/syncthing.nix
{ services.kdeconnect.enable = true; }
./home/moon.nix
];
nixosConfigurations.basado = osConfig "basado";
nixosConfigurations.moon = osConfig "moon";

View file

@ -1,4 +1,4 @@
{ lib, config, options, pkgs, ... }:
{ lib, config, options, pkgs, inputs, ... }:
let
defaultTerminal = "st";
alacrittyLightTheme = "${pkgs.alacritty-theme}/night_owlish_light.toml";
@ -114,6 +114,8 @@ in
};
home.packages = with pkgs; [
inputs.st-flexipatch.packages.${system}.st
gentium
nerd-fonts.noto
nerd-fonts.hack