rename plusultra to metacfg
Signed-off-by: Harald Hoyer <harald@hoyer.xyz>
This commit is contained in:
parent
b22607a4df
commit
04f08d679e
48 changed files with 149 additions and 149 deletions
|
@ -1,11 +1,11 @@
|
|||
{ options, config, pkgs, lib, inputs, ... }:
|
||||
|
||||
with lib;
|
||||
with lib.plusultra;
|
||||
let cfg = config.plusultra.home;
|
||||
with lib.metacfg;
|
||||
let cfg = config.metacfg.home;
|
||||
in
|
||||
{
|
||||
options.plusultra.home = with types; {
|
||||
options.metacfg.home = with types; {
|
||||
file = mkOpt attrs { }
|
||||
(mdDoc "A set of files to be managed by home-manager's `home.file`.");
|
||||
configFile = mkOpt attrs { }
|
||||
|
@ -14,19 +14,19 @@ in
|
|||
};
|
||||
|
||||
config = {
|
||||
plusultra.home.extraOptions = {
|
||||
metacfg.home.extraOptions = {
|
||||
home.stateVersion = config.system.stateVersion;
|
||||
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;
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
useUserPackages = true;
|
||||
useGlobalPkgs = true;
|
||||
|
||||
users.${config.plusultra.user.name} =
|
||||
mkAliasDefinitions options.plusultra.home.extraOptions;
|
||||
users.${config.metacfg.user.name} =
|
||||
mkAliasDefinitions options.metacfg.home.extraOptions;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
{ options, config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
with lib.plusultra;
|
||||
let cfg = config.plusultra.nix-ld;
|
||||
with lib.metacfg;
|
||||
let cfg = config.metacfg.nix-ld;
|
||||
in
|
||||
{
|
||||
options.plusultra.nix-ld = with types; {
|
||||
options.metacfg.nix-ld = with types; {
|
||||
enable = mkBoolOpt false "Whether or not to enable nix-ld.";
|
||||
};
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{ options, config, pkgs, lib, inputs, ... }:
|
||||
|
||||
with lib;
|
||||
with lib.plusultra;
|
||||
with lib.metacfg;
|
||||
let
|
||||
cfg = config.plusultra.nix;
|
||||
cfg = config.metacfg.nix;
|
||||
|
||||
substituters-submodule = types.submodule ({ name, ... }: {
|
||||
options = with types; {
|
||||
|
@ -12,7 +12,7 @@ let
|
|||
});
|
||||
in
|
||||
{
|
||||
options.plusultra.nix = with types; {
|
||||
options.metacfg.nix = with types; {
|
||||
enable = mkBoolOpt false "Whether or not to manage nix configuration.";
|
||||
package = mkOpt package pkgs.nix "Which nix package to use.";
|
||||
|
||||
|
@ -28,13 +28,13 @@ in
|
|||
assertions = mapAttrsToList
|
||||
(name: value: {
|
||||
assertion = value.key != null;
|
||||
message = "plusultra.nix.extra-substituters.${name}.key must be set";
|
||||
message = "metacfg.nix.extra-substituters.${name}.key must be set";
|
||||
})
|
||||
cfg.extra-substituters;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
plusultra.nixos-revision
|
||||
(plusultra.nixos-hosts.override {
|
||||
metacfg.nixos-revision
|
||||
(metacfg.nixos-hosts.override {
|
||||
hosts = inputs.self.nixosConfigurations;
|
||||
})
|
||||
deploy-rs
|
||||
|
@ -46,7 +46,7 @@ in
|
|||
|
||||
nix =
|
||||
let
|
||||
users = [ "root" config.plusultra.user.name ] ++
|
||||
users = [ "root" config.metacfg.user.name ] ++
|
||||
optional config.services.hydra.enable "hydra";
|
||||
extra-substituters = cfg.extra-substituters // {
|
||||
"https://nixsgx.cachix.org".key = "nixsgx.cachix.org-1:tGi36DlY2joNsIXOlGnSgWW0+E094V6hW0umQRo/KoE=";
|
||||
|
@ -74,7 +74,7 @@ in
|
|||
++
|
||||
(mapAttrsToList (name: value: value.key) extra-substituters);
|
||||
|
||||
} // (lib.optionalAttrs config.plusultra.tools.direnv.enable {
|
||||
} // (lib.optionalAttrs config.metacfg.tools.direnv.enable {
|
||||
keep-outputs = true;
|
||||
keep-derivations = true;
|
||||
});
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
{ options, config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
with lib.plusultra;
|
||||
let cfg = config.plusultra.base;
|
||||
with lib.metacfg;
|
||||
let cfg = config.metacfg.base;
|
||||
in
|
||||
{
|
||||
options.plusultra.base = with types; {
|
||||
options.metacfg.base = with types; {
|
||||
enable = mkBoolOpt false "Whether or not to enable the base config.";
|
||||
|
||||
};
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
{ options, config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
with lib.plusultra;
|
||||
let cfg = config.plusultra.gui;
|
||||
with lib.metacfg;
|
||||
let cfg = config.metacfg.gui;
|
||||
in
|
||||
{
|
||||
options.plusultra.gui = with types; {
|
||||
options.metacfg.gui = with types; {
|
||||
enable = mkBoolOpt false "Whether or not to enable a GUI.";
|
||||
};
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
{ options, config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
with lib.plusultra;
|
||||
let cfg = config.plusultra.podman;
|
||||
with lib.metacfg;
|
||||
let cfg = config.metacfg.podman;
|
||||
in
|
||||
{
|
||||
options.plusultra.podman = with types; {
|
||||
options.metacfg.podman = with types; {
|
||||
enable = mkBoolOpt false "Whether or not to enable podman.";
|
||||
};
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
{ options, config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
with lib.plusultra;
|
||||
let cfg = config.plusultra.secureboot;
|
||||
with lib.metacfg;
|
||||
let cfg = config.metacfg.secureboot;
|
||||
in
|
||||
{
|
||||
options.plusultra.secureboot = with types; {
|
||||
options.metacfg.secureboot = with types; {
|
||||
enable = mkBoolOpt false "Whether or not to enable secureboot.";
|
||||
};
|
||||
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
{ options, config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
with lib.plusultra;
|
||||
with lib.metacfg;
|
||||
let
|
||||
cfg = config.plusultra.pccs;
|
||||
cfg_podman = config.plusultra.podman;
|
||||
cfg = config.metacfg.pccs;
|
||||
cfg_podman = config.metacfg.podman;
|
||||
in
|
||||
{
|
||||
options.plusultra.pccs = with types; {
|
||||
options.metacfg.pccs = with types; {
|
||||
enable = mkBoolOpt false "Whether or not to enable a SGX-DCAP.";
|
||||
secret = mkOption {
|
||||
type = with types; nullOr path;
|
||||
|
@ -29,7 +29,7 @@ in
|
|||
}
|
||||
];
|
||||
|
||||
plusultra = {
|
||||
metacfg = {
|
||||
nix.extra-substituters = {
|
||||
"https://nixsgx.cachix.org".key = "nixsgx.cachix.org-1:tGi36DlY2joNsIXOlGnSgWW0+E094V6hW0umQRo/KoE=";
|
||||
};
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
{ options, config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
with lib.plusultra;
|
||||
let cfg = config.plusultra.tools.direnv;
|
||||
with lib.metacfg;
|
||||
let cfg = config.metacfg.tools.direnv;
|
||||
in
|
||||
{
|
||||
options.plusultra.tools.direnv = with types; {
|
||||
options.metacfg.tools.direnv = with types; {
|
||||
enable = mkBoolOpt false "Whether or not to enable direnv.";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
plusultra.home.extraOptions = {
|
||||
metacfg.home.extraOptions = {
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv = enabled;
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
{ options, config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
with lib.plusultra;
|
||||
with lib.metacfg;
|
||||
let
|
||||
cfg = config.plusultra.tools.git;
|
||||
gpg = config.plusultra.security.gpg;
|
||||
user = config.plusultra.user;
|
||||
cfg = config.metacfg.tools.git;
|
||||
gpg = config.metacfg.security.gpg;
|
||||
user = config.metacfg.user;
|
||||
in
|
||||
{
|
||||
options.plusultra.tools.git = with types; {
|
||||
options.metacfg.tools.git = with types; {
|
||||
enable = mkBoolOpt false "Whether or not to install and configure git.";
|
||||
userName = mkOpt types.str user.fullName "The name to configure git with.";
|
||||
userEmail = mkOpt types.str user.email "The email to configure git with.";
|
||||
|
@ -19,7 +19,7 @@ in
|
|||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [ git ];
|
||||
|
||||
plusultra.home.extraOptions = {
|
||||
metacfg.home.extraOptions = {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
inherit (cfg) userName userEmail;
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
, ...
|
||||
}:
|
||||
with lib;
|
||||
with lib.plusultra; let
|
||||
cfg = config.plusultra.user;
|
||||
with lib.metacfg; let
|
||||
cfg = config.metacfg.user;
|
||||
defaultIconFileName = "profile.jpg";
|
||||
defaultIcon = pkgs.stdenvNoCC.mkDerivation {
|
||||
name = "default-icon";
|
||||
|
@ -24,14 +24,14 @@ with lib.plusultra; let
|
|||
pkgs.runCommandNoCC "propagated-icon"
|
||||
{ passthru = { fileName = cfg.icon.fileName; }; }
|
||||
''
|
||||
local target="$out/share/plusultra-icons/user/${cfg.name}"
|
||||
local target="$out/share/metacfg-icons/user/${cfg.name}"
|
||||
mkdir -p "$target"
|
||||
|
||||
cp ${cfg.icon} "$target/${cfg.icon.fileName}"
|
||||
'';
|
||||
in
|
||||
{
|
||||
options.plusultra.user = with types; {
|
||||
options.metacfg.user = with types; {
|
||||
name = mkOpt str "harald" "The name to use for the user account.";
|
||||
fullName = mkOpt str "Harald Hoyer" "The full name of the user.";
|
||||
email = mkOpt str "harald@hoyer.xyz" "The email of the user.";
|
||||
|
@ -58,7 +58,7 @@ in
|
|||
environment.systemPackages = with pkgs; [
|
||||
];
|
||||
|
||||
plusultra.home = {
|
||||
metacfg.home = {
|
||||
file = {
|
||||
"Desktop/.keep".text = "";
|
||||
"Documents/.keep".text = "";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue