mirror of
https://github.com/materusPL/nixos-config
synced 2026-07-02 12:46:42 +00:00
Init commit
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
{ inputs, materusFlake, ... }:
|
||||
let
|
||||
genHomes = import ./genHomes.nix { inherit inputs; inherit materusFlake; };
|
||||
in
|
||||
{ }
|
||||
// genHomes "materus"
|
||||
@@ -0,0 +1,44 @@
|
||||
{ inputs, materusFlake, ... }:
|
||||
let
|
||||
profiles = import ../profile;
|
||||
|
||||
hosts = builtins.attrNames materusFlake.nixosConfigurations;
|
||||
genHomes = username:
|
||||
let
|
||||
#Make host specific user profile "username@host"
|
||||
_list = builtins.map (host: username + "@" + host) hosts;
|
||||
_for = i: (
|
||||
let len = builtins.length hosts; in
|
||||
([{
|
||||
name = builtins.elemAt _list i;
|
||||
value = let host = builtins.elemAt hosts i; in
|
||||
inputs.home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = materusFlake.nixosConfigurations.${host}.pkgs;
|
||||
extraSpecialArgs = { inherit inputs; inherit materusFlake; };
|
||||
modules = [
|
||||
./${username}
|
||||
../host/${host}/extraHome.nix
|
||||
profiles.homeProfile
|
||||
inputs.private.homeModule
|
||||
|
||||
];
|
||||
};
|
||||
}]
|
||||
++ (if ((i + 1) < len) then _for (i + 1) else [ ]))
|
||||
);
|
||||
in
|
||||
(builtins.listToAttrs (_for 0)) // {
|
||||
#Make generic x86_64-linux user profile "username"
|
||||
${username} = inputs.home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = import inputs.nixpkgs { system = "x86_64-linux"; config = {allowUnfree = true;}; };
|
||||
extraSpecialArgs = { inherit inputs; inherit materusFlake; };
|
||||
modules = [
|
||||
./${username}
|
||||
profiles.homeProfile
|
||||
inputs.private.homeModule
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
in
|
||||
genHomes
|
||||
@@ -0,0 +1,10 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
|
||||
home.username = "materus";
|
||||
home.packages = [];
|
||||
|
||||
programs.git.signing.key = lib.mkDefault "28D140BCA60B4FD1";
|
||||
programs.git.userEmail = lib.mkDefault "materus@podkos.pl";
|
||||
programs.git.userName = lib.mkDefault "materus";
|
||||
}
|
||||
Reference in New Issue
Block a user