mirror of
https://github.com/srid/nixos-config.git
synced 2026-01-18 21:37:54 +08:00
Refactor mkHomeModule
This commit is contained in:
parent
ff61cd7cc1
commit
ff3313e030
2 changed files with 19 additions and 20 deletions
|
|
@ -61,7 +61,7 @@
|
|||
./systems/hetzner/ax41.nix
|
||||
./nixos/server/harden.nix
|
||||
# I share my Hetzner server with other people who need it.
|
||||
self.nixosModules.other-people
|
||||
self.nixosModules.guests
|
||||
];
|
||||
};
|
||||
# Configurations for my only[^1] macOS machine (using nix-darwin)
|
||||
|
|
|
|||
|
|
@ -1,27 +1,26 @@
|
|||
{ self, inputs, config, ... }:
|
||||
let
|
||||
mkHomeModule = name: extraModules: {
|
||||
users.users.${name}.isNormalUser = true;
|
||||
home-manager.users.${name} = {
|
||||
imports = [
|
||||
self.homeModules.common-linux
|
||||
../home/git.nix
|
||||
] ++ extraModules;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
# Configuration common to all Linux systems
|
||||
flake = {
|
||||
nixosModules = {
|
||||
other-people = {
|
||||
# Temporarily sharing with Uday.
|
||||
users.users.uday.isNormalUser = true;
|
||||
home-manager.users."uday" = {
|
||||
imports = [
|
||||
self.homeModules.common-linux
|
||||
../home/git.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
myself = {
|
||||
home-manager.users.${config.people.myself} = { pkgs, ... }: {
|
||||
imports = [
|
||||
self.homeModules.common-linux
|
||||
../home/shellcommon.nix
|
||||
../home/git.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
guests.imports = [
|
||||
# Temporarily sharing with Uday, until he gets better machine.
|
||||
(mkHomeModule "uday" [ ])
|
||||
];
|
||||
myself = mkHomeModule "srid" [
|
||||
../home/shellcommon.nix
|
||||
];
|
||||
default.imports = [
|
||||
self.nixosModules.home-manager
|
||||
self.nixosModules.myself
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue