refactor: moved modules to legacy-modules
This commit is contained in:
parent
d646b954ac
commit
db7ac35613
233 changed files with 5 additions and 5 deletions
9
legacy-modules/nixos-modules/home-manager/default.nix
Normal file
9
legacy-modules/nixos-modules/home-manager/default.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# modules in this folder are to adapt home-manager modules configs to nixos-module configs
|
||||
{...}: {
|
||||
imports = [
|
||||
./flipperzero.nix
|
||||
./i18n.nix
|
||||
./openssh.nix
|
||||
./steam.nix
|
||||
];
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
home-users = lib.attrsets.mapAttrsToList (_: user: user) config.home-manager.users;
|
||||
in {
|
||||
hardware.flipperzero.enable = lib.lists.any (home-user: home-user.hardware.flipperzero.enable) home-users;
|
||||
}
|
||||
26
legacy-modules/nixos-modules/home-manager/i18n.nix
Normal file
26
legacy-modules/nixos-modules/home-manager/i18n.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
home-users = lib.attrsets.mapAttrsToList (_: user: user) config.home-manager.users;
|
||||
in {
|
||||
config = {
|
||||
i18n.supportedLocales =
|
||||
lib.unique
|
||||
(builtins.map (l: (lib.replaceStrings ["utf8" "utf-8" "UTF8"] ["UTF-8" "UTF-8" "UTF-8"] l) + "/UTF-8") (
|
||||
[
|
||||
"C.UTF-8"
|
||||
"en_US.UTF-8"
|
||||
config.i18n.defaultLocale
|
||||
]
|
||||
++ (lib.attrValues (lib.filterAttrs (n: v: n != "LANGUAGE") config.i18n.extraLocaleSettings))
|
||||
++ (
|
||||
map (user-config: user-config.i18n.defaultLocale) home-users
|
||||
)
|
||||
++ (lib.lists.flatten (
|
||||
map (user-config: lib.attrValues (lib.filterAttrs (n: v: n != "LANGUAGE") user-config.i18n.extraLocaleSettings)) home-users
|
||||
))
|
||||
));
|
||||
};
|
||||
}
|
||||
11
legacy-modules/nixos-modules/home-manager/openssh.nix
Normal file
11
legacy-modules/nixos-modules/home-manager/openssh.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
users.users =
|
||||
lib.attrsets.mapAttrs (name: value: {
|
||||
openssh.authorizedKeys.keys = value.programs.openssh.authorizedKeys;
|
||||
})
|
||||
config.home-manager.users;
|
||||
}
|
||||
18
legacy-modules/nixos-modules/home-manager/steam.nix
Normal file
18
legacy-modules/nixos-modules/home-manager/steam.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
setupSteam =
|
||||
lib.lists.any
|
||||
(value: value)
|
||||
(lib.attrsets.mapAttrsToList (name: value: value.programs.steam.enable) config.home-manager.users);
|
||||
in {
|
||||
config = lib.mkIf setupSteam {
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
# TODO: figure out how to not install steam here
|
||||
# package = lib.mkDefault pkgs.emptyFile;
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue