Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 22 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@
];
};
mkHomeConfig =
system: username: homeDirectory: identity:
system: username: homeDirectory: identity: profile:
assert builtins.elem profile [
"personal"
"work"
];
home-manager.lib.homeManagerConfiguration {
pkgs = mkPkgs system;
modules = [
Expand All @@ -67,6 +71,7 @@
username
homeDirectory
identity
profile
takt
;
};
Expand Down Expand Up @@ -100,6 +105,7 @@
email = "39003544+rito528@users.noreply.github.com";
gpgKey = "F4022307254812F8";
};
profile = "personal";
};
testuser = {
system = "x86_64-linux";
Expand All @@ -110,6 +116,7 @@
email = "testuser@example.com";
gpgKey = "";
};
profile = "personal";
};
# aarch64-darwin 向け評価確認用。実 Mac 上の Unix ユーザー名は testuser のまま。
testuser-darwin = {
Expand All @@ -121,13 +128,26 @@
email = "testuser@example.com";
gpgKey = "";
};
profile = "personal";
};
# profile 配線確認用。実マシンではない。
testuser-work = {
system = "x86_64-linux";
username = "testuser";
homeDirectory = "/home/testuser";
identity = {
name = "testuser";
email = "testuser@example.com";
gpgKey = "";
};
profile = "work";
};
};
in
{
packages.x86_64-linux = npmPackages;
homeConfigurations = builtins.mapAttrs (
_: cfg: mkHomeConfig cfg.system cfg.username cfg.homeDirectory cfg.identity
_: cfg: mkHomeConfig cfg.system cfg.username cfg.homeDirectory cfg.identity cfg.profile
) machines;
templates = {
seichi-assist = {
Expand Down