rename plusultra to metacfg

Signed-off-by: Harald Hoyer <harald@hoyer.xyz>
This commit is contained in:
Harald Hoyer 2024-03-20 08:58:05 +01:00
parent b22607a4df
commit 04f08d679e
48 changed files with 149 additions and 149 deletions

View file

@ -1,16 +1,16 @@
{ options, config, pkgs, lib, inputs, ... }:
with lib;
with lib.plusultra;
with lib.metacfg;
let
cfg = config.plusultra.home;
cfg = config.metacfg.home;
in
{
# imports = with inputs; [
# home-manager.darwinModules.home-manager
# ];
options.plusultra.home = with types; {
options.metacfg.home = with types; {
file = mkOpt attrs { }
"A set of files to be managed by home-manager's <option>home.file</option>.";
configFile = mkOpt attrs { }
@ -20,21 +20,21 @@ in
};
config = {
plusultra.home.extraOptions = {
metacfg.home.extraOptions = {
home.stateVersion = mkDefault "23.11";
home.file = mkAliasDefinitions options.plusultra.home.file;
home.file = mkAliasDefinitions options.metacfg.home.file;
xdg.enable = true;
xdg.configFile = mkAliasDefinitions options.plusultra.home.configFile;
xdg.configFile = mkAliasDefinitions options.metacfg.home.configFile;
};
snowfallorg.users.${config.plusultra.user.name}.home.config = mkAliasDefinitions options.plusultra.home.extraOptions;
snowfallorg.users.${config.metacfg.user.name}.home.config = mkAliasDefinitions options.metacfg.home.extraOptions;
home-manager = {
useUserPackages = true;
useGlobalPkgs = true;
# users.${config.plusultra.user.name} = args:
# mkAliasDefinitions options.plusultra.home.extraOptions;
# users.${config.metacfg.user.name} = args:
# mkAliasDefinitions options.metacfg.home.extraOptions;
};
};
}

View file

@ -5,11 +5,11 @@
, ...
}:
with lib;
with lib.plusultra; let
cfg = config.plusultra.nix;
with lib.metacfg; let
cfg = config.metacfg.nix;
in
{
options.plusultra.nix = with types; {
options.metacfg.nix = with types; {
enable = mkBoolOpt true "Whether or not to manage nix configuration.";
package = mkOpt package pkgs.nixUnstable "Which nix package to use.";
};
@ -24,7 +24,7 @@ in
nix =
let
users = [ "root" config.plusultra.user.name ];
users = [ "root" config.metacfg.user.name ];
in
{
package = cfg.package;
@ -53,7 +53,7 @@ in
extra-nix-path = "nixpkgs=flake:nixpkgs";
build-users-group = "nixbld";
};
#// (lib.optionalAttrs config.plusultra.tools.direnv.enable {
#// (lib.optionalAttrs config.metacfg.tools.direnv.enable {
# keep-outputs = true;
# keep-derivations = true;
#});
@ -62,7 +62,7 @@ in
automatic = true;
interval = { Day = 7; };
options = "--delete-older-than 30d";
user = config.plusultra.user.name;
user = config.metacfg.user.name;
};
# flake-utils-plus

View file

@ -2,11 +2,11 @@
let
inherit (lib) types mkEnableOption mkIf;
inherit (lib.plusultra) mkOpt;
inherit (lib.metacfg) mkOpt;
cfg = config.plusultra.security.gpg;
gpg = config.plusultra.security.gpg;
user = config.plusultra.user;
cfg = config.metacfg.security.gpg;
gpg = config.metacfg.security.gpg;
user = config.metacfg.user;
gpgConf = "${inputs.gpg-base-conf}/gpg.conf";
gpgAgentConf = ''
@ -43,7 +43,7 @@ let
'';
in
{
options.plusultra.security.gpg = {
options.metacfg.security.gpg = {
enable = mkEnableOption "GPG";
agentTimeout = mkOpt types.int 5 "The amount of time to wait before continuing with shell init.";
};
@ -72,7 +72,7 @@ in
enableSSHSupport = true;
};
plusultra.home.file = {
metacfg.home.file = {
".gnupg/.keep".text = "";
".gnupg/yubikey-guide.md".source = guide;

View file

@ -2,12 +2,12 @@
let
inherit (lib) types mkIf;
inherit (lib.plusultra) mkOpt enabled;
inherit (lib.metacfg) mkOpt enabled;
cfg = config.plusultra.services.nix-daemon;
cfg = config.metacfg.services.nix-daemon;
in
{
options.plusultra.services.nix-daemon = {
options.metacfg.services.nix-daemon = {
enable = mkOpt types.bool true "Whether to enable the Nix daemon.";
};

View file

@ -1,19 +1,19 @@
{ options, config, lib, pkgs, ... }:
with lib;
with lib.plusultra;
with lib.metacfg;
let
cfg = config.plusultra.suites.common;
cfg = config.metacfg.suites.common;
in
{
options.plusultra.suites.common = with types; {
options.metacfg.suites.common = with types; {
enable = mkBoolOpt false "Whether or not to enable common configuration.";
};
config = mkIf cfg.enable {
programs.fish = enabled;
plusultra = {
metacfg = {
nix = enabled;
system = {

View file

@ -1,11 +1,11 @@
{ options, config, pkgs, lib, ... }:
with lib;
with lib.plusultra;
let cfg = config.plusultra.system.fonts;
with lib.metacfg;
let cfg = config.metacfg.system.fonts;
in
{
options.plusultra.system.fonts = with types; {
options.metacfg.system.fonts = with types; {
enable = mkBoolOpt false "Whether or not to manage fonts.";
fonts = mkOpt (listOf package) [ ] "Custom font packages to install.";
};

View file

@ -1,11 +1,11 @@
{ options, config, pkgs, lib, ... }:
with lib;
with lib.plusultra;
let cfg = config.plusultra.system.interface;
with lib.metacfg;
let cfg = config.metacfg.system.interface;
in
{
options.plusultra.system.interface = with types; {
options.metacfg.system.interface = with types; {
enable = mkEnableOption "macOS interface";
};
@ -24,6 +24,6 @@ in
};
};
plusultra.home.file.".hushlogin".text = "";
metacfg.home.file.".hushlogin".text = "";
};
}

View file

@ -5,15 +5,15 @@
}:
let
inherit (lib) types mkIf mkDefault;
inherit (lib.plusultra) mkOpt;
inherit (lib.metacfg) mkOpt;
cfg = config.plusultra.user;
cfg = config.metacfg.user;
is-linux = pkgs.stdenv.isLinux;
is-darwin = pkgs.stdenv.isDarwin;
in
{
options.plusultra.user = {
options.metacfg.user = {
name = mkOpt types.str "harald" "The user account.";
fullName = mkOpt types.str "Harald Hoyer" "The full name of the user.";
@ -26,11 +26,11 @@ in
users.users.${cfg.name} = {
# NOTE: Setting the uid here is required for another
# module to evaluate successfully since it reads
# `users.users.${plusultra.user.name}.uid`.
# `users.users.${metacfg.user.name}.uid`.
uid = mkIf (cfg.uid != null) cfg.uid;
};
snowfallorg.users.${config.plusultra.user.name}.home.config = {
snowfallorg.users.${config.metacfg.user.name}.home.config = {
home = {
file = {
".profile".text = ''