one config for each host

This commit is contained in:
Antoine Vaure 2025-05-12 14:14:15 +02:00 committed by ant
parent e3b990c590
commit 3051fd8593
3 changed files with 49 additions and 23 deletions

View file

@ -1,4 +1,4 @@
{ lib, config, pkgs, variant, username, ... }: { { lib, config, pkgs, variant, ... }: {
home.packages = with pkgs; [ home.packages = with pkgs; [
material-design-icons material-design-icons
@ -25,7 +25,7 @@
enable = true; enable = true;
# systemd.enable = true; # systemd.enable = true;
settings = { settings = {
bar = { bar = let username = config.home.username; in {
"reload_style_on_change" = true; "reload_style_on_change" = true;
layer = "top"; layer = "top";
position = "bottom"; position = "bottom";

View file

@ -21,26 +21,52 @@
pkgs = inputs.nixpkgs.legacyPackages.${system}; pkgs = inputs.nixpkgs.legacyPackages.${system};
pkgs-unstable = inputs.unstable.legacyPackages.${system}; pkgs-unstable = inputs.unstable.legacyPackages.${system};
nixgl = inputs.nixgl.packages.${system}; nixgl = inputs.nixgl.packages.${system};
config = import ./config.nix;
in { in {
homeConfigurations.${config.username} = inputs.home-manager.lib.homeManagerConfiguration { homeConfigurations."anvaure@Allegro23-12" =
inputs.home-manager.lib.homeManagerConfiguration {
inherit pkgs; inherit pkgs;
extraSpecialArgs = { extraSpecialArgs = {
inherit pkgs-unstable; inherit pkgs-unstable;
inherit (config) username variant; variant = "allegro";
inherit nixgl;
}; };
modules = [ modules = [
{ home.username = "anvaure"; }
./home.nix ./home.nix
{ { home.packages = [ nixgl.nixGLIntel ]; }
home.packages = [ nixgl.nixGLIntel ]; { home.packages = [ inputs.st-flexipatch.packages.${system}.st ]; }
} ];
{ };
home.packages = [ inputs.st-flexipatch.packages.${system}.st ];
} homeConfigurations."ant@hs" =
inputs.home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {
inherit pkgs-unstable;
variant = "hs";
};
modules = [
{ home.username = "ant"; }
./home.nix
];
};
homeConfigurations."ant@nixos" =
inputs.home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {
inherit pkgs-unstable;
variant = "default";
};
modules = [
{ home.username = "ant"; }
./home.nix
{ home.packages = [ inputs.st-flexipatch.packages.${system}.st ]; }
]; ];
}; };
}; };

View file

@ -1,4 +1,4 @@
{ inputs, config, lib, pkgs, username, variant, ... }: { inputs, config, lib, pkgs, variant, ... }:
{ {
imports = [ imports = [
@ -16,9 +16,9 @@
# Home Manager needs a bit of information about you and the paths it should # Home Manager needs a bit of information about you and the paths it should
# manage. # manage.
home.username = username;
home.homeDirectory = "/home/${config.home.username}"; home.homeDirectory = "/home/${config.home.username}";
home.stateVersion = "23.05"; # Please read the comment before changing. home.stateVersion = "23.05"; # Please read the comment before changing.
home.packages = with pkgs; [ home.packages = with pkgs; [
@ -152,7 +152,7 @@
XCURSOR_SIZE = "24"; XCURSOR_SIZE = "24";
CCACHE_MAXSIZE = "40Gi"; CCACHE_MAXSIZE = "40Gi";
} // (if variant == "allegro" then { } // (if variant == "allegro" then {
TMPDIR = "/home/${username}/tmp"; TMPDIR = "/home/${config.home.username}/tmp";
GSETTINGS_SCHEMA_DIR = "${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/gsettings-desktop-schemas-47.1/glib-2.0/schemas"; GSETTINGS_SCHEMA_DIR = "${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/gsettings-desktop-schemas-47.1/glib-2.0/schemas";
} else {}); } else {});