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

View file

@ -2,7 +2,7 @@
{
imports = [
../common
../../system
./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; [
(pkgs.symlinkJoin {
name = "firefox";
@ -11,7 +8,7 @@
buildInputs = [ pkgs.makeWrapper ];
postBuild = ''
wrapProgram $out/bin/firefox \
--set HOME "${homeDirectory}/.local/share"
--set HOME "${config.home.homeDirectory}/.local/share"
'';
})
alacritty