This commit is contained in:
caandt 2024-10-27 01:36:51 -05:00
parent 6bc2250b59
commit 6d04251eb7
18 changed files with 36 additions and 30 deletions

View file

@ -19,31 +19,30 @@
system = "x86_64-linux"; system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
pkgs-stable = nixpkgs-stable.legacyPackages.${system}; pkgs-stable = nixpkgs-stable.legacyPackages.${system};
specialArgs = { in with builtins; with nixpkgs.lib.attrsets; {
inherit pkgs-stable; nixosConfigurations = mapAttrs' (host: _: {
inherit flake-programs-sqlite; name = host;
}; value = nixpkgs.lib.nixosSystem {
in {
nixosConfigurations = {
hyuganatsu = nixpkgs.lib.nixosSystem {
inherit system; inherit system;
inherit specialArgs; specialArgs = {
modules = [ system/hyuganatsu ]; inherit pkgs-stable;
inherit flake-programs-sqlite;
};
modules = [ (./hosts + "/${host}") ];
}; };
iyokan = nixpkgs.lib.nixosSystem { }) (readDir ./hosts);
inherit system; homeConfigurations = foldl' (a: b: a//b) {} (map (host: let users = ./hosts + "/${host}/users"; in
inherit specialArgs; if pathExists users
modules = [ system/iyokan ]; then mapAttrs' (user: _: {
}; name = "${user}@${host}";
}; value = home-manager.lib.homeManagerConfiguration {
homeConfigurations.ahnwuoa = home-manager.lib.homeManagerConfiguration { inherit pkgs;
inherit pkgs; extraSpecialArgs = {
extraSpecialArgs = rec { inherit pkgs-stable;
inherit pkgs-stable; };
username = "ahnwuoa"; modules = [ (users + "/${user}") ];
homeDirectory = "/home/${username}"; };}) (readDir users)
}; else {}
modules = [ ./user ]; ) (attrNames (readDir ./hosts)));
};
}; };
} }

View file

@ -2,7 +2,7 @@
{ {
imports = [ imports = [
../common ../../system
./hardware-configuration.nix ./hardware-configuration.nix
]; ];

View file

@ -0,0 +1,10 @@
{ config, ... }:
{
imports = [
../../../../user
];
home.username = "ahnwuoa";
home.homeDirectory = "/home/${config.home.username}";
}

View file

@ -1,9 +1,6 @@
{ config, pkgs, pkgs-stable, username, homeDirectory, ... }: { config, pkgs, pkgs-stable, ... }:
{ {
home.username = username;
home.homeDirectory = homeDirectory;
home.packages = with pkgs; [ home.packages = with pkgs; [
(pkgs.symlinkJoin { (pkgs.symlinkJoin {
name = "firefox"; name = "firefox";
@ -11,7 +8,7 @@
buildInputs = [ pkgs.makeWrapper ]; buildInputs = [ pkgs.makeWrapper ];
postBuild = '' postBuild = ''
wrapProgram $out/bin/firefox \ wrapProgram $out/bin/firefox \
--set HOME "${homeDirectory}/.local/share" --set HOME "${config.home.homeDirectory}/.local/share"
''; '';
}) })
alacritty alacritty