cerulean/cerulean/nixos/home-manager.nix

50 lines
1.2 KiB
Nix
Raw Normal View History

2026-02-19 14:38:52 +10:00
# Copyright 2025-2026 _cry64 (Emile Clark-Boman)
2026-02-13 03:55:47 +10:00
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{
root,
config,
lib,
_cerulean,
2026-02-13 03:55:47 +10:00
...
2026-02-13 19:32:22 +10:00
} @ args: let
inherit
(builtins)
attrNames
filter
pathExists
;
in {
2026-02-20 02:08:04 +10:00
imports = [
_cerulean.homeManager.nixosModules.default
];
2026-02-18 17:24:28 +10:00
home-manager = {
users =
config.users.users
|> attrNames
|> filter (x: pathExists (root + "/homes/${x}"))
|> (x:
lib.genAttrs x (y:
import (root + "/homes/${y}")));
2026-02-13 03:55:47 +10:00
2026-02-18 17:24:28 +10:00
extraSpecialArgs = _cerulean.specialArgs;
sharedModules = [
# user configuration
(import (root + "/nixpkgs.nix"))
# options declarations
(import ./nixpkgs.nix (args // {contextName = "homes";}))
];
2026-02-13 03:55:47 +10:00
};
}