feat(configurations): add enable to meta

Disable old `darwin` configurations (`apavel-a01` and `limontozu`)
This commit is contained in:
reo101 2024-09-01 17:36:20 +03:00
parent 2c7ba766fe
commit 479c86c003
Signed by: reo101
GPG key ID: 675AA7EF13964ACB
3 changed files with 18 additions and 4 deletions

View file

@ -1,3 +1,4 @@
{
system = "x86_64-darwin";
enable = false;
}

View file

@ -1,3 +1,4 @@
{
system = "x86_64-darwin";
enable = false;
}

View file

@ -294,12 +294,15 @@ in
# TODO: put in a more visible place
default = {
nixos = {
predicate = ({ root, host, configurationFiles, ... }:
predicate = ({ root, host, configurationFiles, ... }: let
meta = import "${root}/meta.nix";
in
and [
(! (host == "__template__"))
(hasFiles
[ "configuration.nix" "meta.nix" ]
configurationFiles)
(meta.enable or true)
]);
mkHost = ({ root, host, configurationFiles, ... }: let
meta = import "${root}/meta.nix" // {
@ -320,12 +323,15 @@ in
});
};
nix-on-droid = {
predicate = ({ root, host, configurationFiles, ... }:
predicate = ({ root, host, configurationFiles, ... }: let
meta = import "${root}/meta.nix";
in
and [
(! (host == "__template__"))
(hasFiles
[ "configuration.nix" "home.nix" "meta.nix" ]
configurationFiles)
(meta.enable or true)
]);
mkHost = ({ root, host, configurationFiles, ... }: let
meta = import "${root}/meta.nix" // {
@ -340,7 +346,9 @@ in
nix-darwin = {
hostsName = "darwinHosts";
configurationsName = "darwinConfigurations";
predicate = ({ root, host, configurationFiles, ... }:
predicate = ({ root, host, configurationFiles, ... }: let
meta = import "${root}/meta.nix";
in
and [
(! (host == "__template__"))
(hasFiles
@ -349,6 +357,7 @@ in
(hasDirectories
[ "home" ]
configurationFiles)
(meta.enable or true)
]);
mkHost = ({ root, host, configurationFiles, ... }: let
meta = import "${root}/meta.nix" // {
@ -371,12 +380,15 @@ in
home-manager = {
hostsName = "homeHosts";
configurationsName = "homeConfigurations";
predicate = ({ root, host, configurationFiles, ... }:
predicate = ({ root, host, configurationFiles, ... }: let
meta = import "${root}/meta.nix";
in
and [
(! (host == "__template__"))
(hasFiles
[ "home.nix" "meta.nix" ]
configurationFiles)
(meta.enable or true)
]);
mkHost = ({ root, host, configurationFiles, ... }: let
meta = import "${root}/meta.nix" // {