From 95dd5cbd6cdcb6d10fa67fe4e972343ceb7309ff Mon Sep 17 00:00:00 2001 From: 514fpv Date: Sun, 7 Jan 2024 22:01:31 +0800 Subject: [PATCH] refactor: rename global from faucet --- {faucet => global}/android/default.nix | 4 ++-- {faucet => global}/asusd/default.nix | 4 ++-- {faucet => global}/auth/default.nix | 4 ++-- {faucet => global}/auth/pub/chireiden.pub | 0 {faucet => global}/auth/pub/diag.pub | 0 {faucet => global}/boot/default.nix | 4 ++-- {faucet => global}/default.nix | 0 {faucet => global}/fs/btrfs.nix | 4 ++-- {faucet => global}/fs/default.nix | 4 ++-- {faucet => global}/fs/ext4.nix | 2 +- {faucet => global}/fs/xfs.nix | 2 +- {faucet => global}/gui/default.nix | 4 ++-- {faucet => global}/gui/greetd.nix | 2 +- {faucet => global}/gui/plymouth.nix | 2 +- {faucet => global}/id/default.nix | 4 ++-- {faucet => global}/io/default.nix | 4 ++-- {faucet => global}/kernel/default.nix | 4 ++-- {faucet => global}/libvirt/default.nix | 4 ++-- {faucet => global}/util/default.nix | 4 ++-- home/auth/nixos.nix | 2 +- home/chrome/nixos.nix | 2 +- home/gui/nixos.nix | 2 +- home/profile.nix | 2 +- home/sway/nixos.nix | 2 +- home/util/nixos.nix | 2 +- home/virt-manager/nixos.nix | 2 +- spec/chireiden/default.nix | 2 +- spec/default.nix | 2 +- spec/incinerator/default.nix | 2 +- spec/koumakyou/default.nix | 2 +- spec/library/default.nix | 2 +- 31 files changed, 40 insertions(+), 40 deletions(-) rename {faucet => global}/android/default.nix (80%) rename {faucet => global}/asusd/default.nix (83%) rename {faucet => global}/auth/default.nix (96%) rename {faucet => global}/auth/pub/chireiden.pub (100%) rename {faucet => global}/auth/pub/diag.pub (100%) rename {faucet => global}/boot/default.nix (93%) rename {faucet => global}/default.nix (100%) rename {faucet => global}/fs/btrfs.nix (87%) rename {faucet => global}/fs/default.nix (98%) rename {faucet => global}/fs/ext4.nix (86%) rename {faucet => global}/fs/xfs.nix (87%) rename {faucet => global}/gui/default.nix (97%) rename {faucet => global}/gui/greetd.nix (95%) rename {faucet => global}/gui/plymouth.nix (93%) rename {faucet => global}/id/default.nix (80%) rename {faucet => global}/io/default.nix (96%) rename {faucet => global}/kernel/default.nix (93%) rename {faucet => global}/libvirt/default.nix (92%) rename {faucet => global}/util/default.nix (72%) diff --git a/faucet/android/default.nix b/global/android/default.nix similarity index 80% rename from faucet/android/default.nix rename to global/android/default.nix index a9d46612..a7f94c17 100644 --- a/faucet/android/default.nix +++ b/global/android/default.nix @@ -2,9 +2,9 @@ , lib , config , ... }: with lib; let - cfg = config.faucet.android; + cfg = config.global.android; in { - options.faucet.android = { + options.global.android = { enable = mkEnableOption "android tools"; }; diff --git a/faucet/asusd/default.nix b/global/asusd/default.nix similarity index 83% rename from faucet/asusd/default.nix rename to global/asusd/default.nix index 8654b37a..00b4af2e 100644 --- a/faucet/asusd/default.nix +++ b/global/asusd/default.nix @@ -2,9 +2,9 @@ , lib , config , ... }: with lib; let - cfg = config.faucet.asusd; + cfg = config.global.asusd; in { - options.faucet.asusd = { + options.global.asusd = { enable = mkEnableOption "ASUS laptop userland support daemon"; }; diff --git a/faucet/auth/default.nix b/global/auth/default.nix similarity index 96% rename from faucet/auth/default.nix rename to global/auth/default.nix index 1c433054..aaad15f3 100644 --- a/faucet/auth/default.nix +++ b/global/auth/default.nix @@ -2,14 +2,14 @@ , lib , config , ... }: with lib; let - cfg = config.faucet.auth; + cfg = config.global.auth; pub = lib.pipe ./pub [ builtins.readDir (lib.filterAttrs (n: ty: ty == "regular")) (lib.mapAttrsToList (n: _: builtins.readFile ./pub/${n})) ]; in { - options.faucet.auth = { + options.global.auth = { enable = mkEnableOption "identity authentication in various software" // { default = true; }; openssh = { enable = mkEnableOption "openssh server"; diff --git a/faucet/auth/pub/chireiden.pub b/global/auth/pub/chireiden.pub similarity index 100% rename from faucet/auth/pub/chireiden.pub rename to global/auth/pub/chireiden.pub diff --git a/faucet/auth/pub/diag.pub b/global/auth/pub/diag.pub similarity index 100% rename from faucet/auth/pub/diag.pub rename to global/auth/pub/diag.pub diff --git a/faucet/boot/default.nix b/global/boot/default.nix similarity index 93% rename from faucet/boot/default.nix rename to global/boot/default.nix index 7c197629..7da95ebe 100644 --- a/faucet/boot/default.nix +++ b/global/boot/default.nix @@ -2,9 +2,9 @@ , lib , config , ... }: with lib; let - cfg = config.faucet.boot; + cfg = config.global.boot; in { - options.faucet.boot = { + options.global.boot = { enable = mkEnableOption "bootloader installation and maintenance" // { default = true; }; systemd-boot = mkEnableOption "generation selection via systemd-boot" // { default = !cfg.lanzaboote; }; lanzaboote = mkEnableOption "secure boot maintenance via lanzaboote"; diff --git a/faucet/default.nix b/global/default.nix similarity index 100% rename from faucet/default.nix rename to global/default.nix diff --git a/faucet/fs/btrfs.nix b/global/fs/btrfs.nix similarity index 87% rename from faucet/fs/btrfs.nix rename to global/fs/btrfs.nix index f8252be3..66d53090 100644 --- a/faucet/fs/btrfs.nix +++ b/global/fs/btrfs.nix @@ -2,9 +2,9 @@ , lib , config , ... }: with lib; let - cfg = config.faucet.fs; + cfg = config.global.fs; in { - options.faucet.fs.btrfs = { + options.global.fs.btrfs = { options = mkOption { type = with types; listOf str; default = [ "noatime" "compress=zstd" ]; diff --git a/faucet/fs/default.nix b/global/fs/default.nix similarity index 98% rename from faucet/fs/default.nix rename to global/fs/default.nix index 084e6177..f5b718cf 100644 --- a/faucet/fs/default.nix +++ b/global/fs/default.nix @@ -2,7 +2,7 @@ , lib , config , ... }: with lib; let - cfg = config.faucet.fs; + cfg = config.global.fs; in { imports = [ ./ext4.nix @@ -11,7 +11,7 @@ in { ./btrfs.nix ]; - options.faucet.fs = { + options.global.fs = { type = mkOption { type = with types; enum [ "ext4" "xfs" "bcachefs" "btrfs" ]; default = "bcachefs"; diff --git a/faucet/fs/ext4.nix b/global/fs/ext4.nix similarity index 86% rename from faucet/fs/ext4.nix rename to global/fs/ext4.nix index aeaafb18..9a6f990c 100644 --- a/faucet/fs/ext4.nix +++ b/global/fs/ext4.nix @@ -1,7 +1,7 @@ { lib , config , ... }: with lib; let - cfg = config.faucet.fs; + cfg = config.global.fs; in mkIf (cfg.type == "ext4") { fileSystems."/nix" = { device = "/dev/disk/by-uuid/${cfg.store}"; diff --git a/faucet/fs/xfs.nix b/global/fs/xfs.nix similarity index 87% rename from faucet/fs/xfs.nix rename to global/fs/xfs.nix index 03025993..ec7de391 100644 --- a/faucet/fs/xfs.nix +++ b/global/fs/xfs.nix @@ -1,7 +1,7 @@ { lib , config , ... }: with lib; let - cfg = config.faucet.fs; + cfg = config.global.fs; in mkIf (cfg.type == "xfs") { # NOTE: -m reflink=1 fileSystems."/nix" = diff --git a/faucet/gui/default.nix b/global/gui/default.nix similarity index 97% rename from faucet/gui/default.nix rename to global/gui/default.nix index e80226fa..f6f95f85 100644 --- a/faucet/gui/default.nix +++ b/global/gui/default.nix @@ -2,7 +2,7 @@ , lib , config , ... }: with lib; let - cfg = config.faucet.gui; + cfg = config.global.gui; intel = cfg.type == "intel" || (cfg.type == "prime" && config.hardware.nvidia.prime.intelBusId != ""); amdgpu = cfg.type == "amdgpu" || (cfg.type == "prime" && config.hardware.nvidia.prime.amdgpuBusId != ""); @@ -13,7 +13,7 @@ in { ./greetd.nix ]; - options.faucet.gui = { + options.global.gui = { enable = mkEnableOption "various setup required for GUI and support software"; session = mkEnableOption "software required for a graphical session" // { default = true; }; type = mkOption { diff --git a/faucet/gui/greetd.nix b/global/gui/greetd.nix similarity index 95% rename from faucet/gui/greetd.nix rename to global/gui/greetd.nix index ef6143ef..7a208862 100644 --- a/faucet/gui/greetd.nix +++ b/global/gui/greetd.nix @@ -2,7 +2,7 @@ , lib , config , ... }: with lib; let - cfg = config.faucet.gui; + cfg = config.global.gui; in mkIf (cfg.enable && cfg.session) { programs.regreet = { enable = true; diff --git a/faucet/gui/plymouth.nix b/global/gui/plymouth.nix similarity index 93% rename from faucet/gui/plymouth.nix rename to global/gui/plymouth.nix index fc96c061..a588206c 100644 --- a/faucet/gui/plymouth.nix +++ b/global/gui/plymouth.nix @@ -2,7 +2,7 @@ , lib , config , ... }: with lib; let - cfg = config.faucet.gui; + cfg = config.global.gui; in mkIf cfg.enable { boot = { loader.timeout = lib.mkDefault 0; diff --git a/faucet/id/default.nix b/global/id/default.nix similarity index 80% rename from faucet/id/default.nix rename to global/id/default.nix index 075efe43..c225845e 100644 --- a/faucet/id/default.nix +++ b/global/id/default.nix @@ -2,9 +2,9 @@ , lib , config , ... }: with lib; let - cfg = config.faucet.id; + cfg = config.global.id; in { - options.faucet.id = mkOption { + options.global.id = mkOption { type = with types; str; description = "systemd machine id"; }; diff --git a/faucet/io/default.nix b/global/io/default.nix similarity index 96% rename from faucet/io/default.nix rename to global/io/default.nix index 381554db..d7fb8dbe 100644 --- a/faucet/io/default.nix +++ b/global/io/default.nix @@ -2,9 +2,9 @@ , lib , config , ... }: with lib; let - cfg = config.faucet.io; + cfg = config.global.io; in { - options.faucet.io = { + options.global.io = { betaflight = mkEnableOption "betaflight udev rules" // { default = true; }; bluetooth = mkEnableOption "bluetooth daemons and state persistence" // { default = true; }; audio = mkEnableOption "pulseaudio server configuration" // { default = true; }; diff --git a/faucet/kernel/default.nix b/global/kernel/default.nix similarity index 93% rename from faucet/kernel/default.nix rename to global/kernel/default.nix index 9a3e7e08..9617608b 100644 --- a/faucet/kernel/default.nix +++ b/global/kernel/default.nix @@ -2,9 +2,9 @@ , lib , config , ... }: with lib; let - cfg = config.faucet.kernel; + cfg = config.global.kernel; in { - options.faucet.kernel = { + options.global.kernel = { enable = mkEnableOption "kernel version and configuration" // { default = true; }; lts = mkEnableOption "longterm kernel releases"; sysctl = { diff --git a/faucet/libvirt/default.nix b/global/libvirt/default.nix similarity index 92% rename from faucet/libvirt/default.nix rename to global/libvirt/default.nix index 48dacbbf..1de52ea4 100644 --- a/faucet/libvirt/default.nix +++ b/global/libvirt/default.nix @@ -2,9 +2,9 @@ , lib , config , ... }: with lib; let - cfg = config.faucet.libvirt; + cfg = config.global.libvirt; in { - options.faucet.libvirt = { + options.global.libvirt = { enable = mkEnableOption "libvirt virtualisation daemon" // { default = true; }; }; diff --git a/faucet/util/default.nix b/global/util/default.nix similarity index 72% rename from faucet/util/default.nix rename to global/util/default.nix index 6f3b29f5..feb08b7b 100644 --- a/faucet/util/default.nix +++ b/global/util/default.nix @@ -2,9 +2,9 @@ , lib , config , ... }: with lib; let - cfg = config.faucet.util; + cfg = config.global.util; in { - options.faucet.util = { }; + options.global.util = { }; config = { programs.zsh.enable = true; diff --git a/home/auth/nixos.nix b/home/auth/nixos.nix index d57ea2e3..55984071 100644 --- a/home/auth/nixos.nix +++ b/home/auth/nixos.nix @@ -2,6 +2,6 @@ , ... }: { # this module passes openssh public keys to home-manager users.homeModules = [ { - passthrough.publicKeys = config.faucet.auth.openssh.publicKeys; + passthrough.publicKeys = config.global.auth.openssh.publicKeys; } ]; } diff --git a/home/chrome/nixos.nix b/home/chrome/nixos.nix index 7726bc31..a432134b 100644 --- a/home/chrome/nixos.nix +++ b/home/chrome/nixos.nix @@ -2,7 +2,7 @@ , lib , config , ... }: with lib; let - gui = with config.faucet.gui; ( enable && session ); + gui = with config.global.gui; ( enable && session ); in { users.home.persist.directories = mkIf gui [ ".config/google-chrome" ]; security.chromiumSuidSandbox.enable = mkIf gui true; diff --git a/home/gui/nixos.nix b/home/gui/nixos.nix index 35370e5a..a5e5efdf 100644 --- a/home/gui/nixos.nix +++ b/home/gui/nixos.nix @@ -2,7 +2,7 @@ , lib , config , ... }: with lib; let - gui = with config.faucet.gui; ( enable && session ); + gui = with config.global.gui; ( enable && session ); in { config = { users.homeModules = [ diff --git a/home/profile.nix b/home/profile.nix index 70b425ce..cc26dfb6 100644 --- a/home/profile.nix +++ b/home/profile.nix @@ -72,7 +72,7 @@ in { description = with opts; mkIf (description != null) description; extraGroups = mkIf opts.admin cfg.adminGroups; openssh.authorizedKeys.keys = mkIf (opts.sshLogin && config.services.openssh.enable) - config.faucet.auth.openssh.publicKeys; + config.global.auth.openssh.publicKeys; hashedPasswordFile = "/nix/persist/shadow/${name}"; shell = pkgs.zsh; isNormalUser = mkIf (name != "root") true; diff --git a/home/sway/nixos.nix b/home/sway/nixos.nix index 8c01337b..7bf782f5 100644 --- a/home/sway/nixos.nix +++ b/home/sway/nixos.nix @@ -2,7 +2,7 @@ , lib , config , ... }: with lib; let - gui = with config.faucet.gui; ( enable && session ); + gui = with config.global.gui; ( enable && session ); in mkIf gui { services.xserver.displayManager.sessionPackages = [ (pkgs.writeTextFile { diff --git a/home/util/nixos.nix b/home/util/nixos.nix index c93ca39a..694b0f7f 100644 --- a/home/util/nixos.nix +++ b/home/util/nixos.nix @@ -2,7 +2,7 @@ , lib , config , ... }: with lib; let - gui = with config.faucet.gui; ( enable && session ); + gui = with config.global.gui; ( enable && session ); in { users.home.persist.directories = [ ] ++ optionals gui [ diff --git a/home/virt-manager/nixos.nix b/home/virt-manager/nixos.nix index 30ff9fbf..ab11e6f5 100644 --- a/home/virt-manager/nixos.nix +++ b/home/virt-manager/nixos.nix @@ -2,7 +2,7 @@ , lib , config , ... }: with lib; let - gui = with config.faucet.gui; ( enable && session ); + gui = with config.global.gui; ( enable && session ); in mkIf gui { programs.virt-manager.enable = true; } diff --git a/spec/chireiden/default.nix b/spec/chireiden/default.nix index b57d1459..3a4265bb 100644 --- a/spec/chireiden/default.nix +++ b/spec/chireiden/default.nix @@ -1,5 +1,5 @@ { - faucet = { + global = { id = "5d3c16fe58444e12ad621600039f10af"; fs.esp.uuid = "32A5-6257"; fs.type = "xfs"; diff --git a/spec/default.nix b/spec/default.nix index 15dbcba6..67555689 100644 --- a/spec/default.nix +++ b/spec/default.nix @@ -4,7 +4,7 @@ system = "x86_64-linux"; specialArgs = inputs // { inherit inputs; }; modules = [ - ../faucet + ../global ../home/profile.nix ../home/user.nix ./constant.nix diff --git a/spec/incinerator/default.nix b/spec/incinerator/default.nix index 2e916a17..b68d0b77 100644 --- a/spec/incinerator/default.nix +++ b/spec/incinerator/default.nix @@ -1,7 +1,7 @@ { lib , modulesPath , ... }: { - faucet = { + global = { id = "bc8036643fc24f04ab150ff6a38dcce7"; auth.openssh.enable = true; libvirt.enable = false; diff --git a/spec/koumakyou/default.nix b/spec/koumakyou/default.nix index 0c6a973c..73ed21aa 100644 --- a/spec/koumakyou/default.nix +++ b/spec/koumakyou/default.nix @@ -1,7 +1,7 @@ { pkgs , lib , ... }: { - faucet = { + global = { id = "bc8036643fc24f04ab150ff6a38dcce7"; auth.openssh.enable = true; fs.esp.uuid = "B20E-5994"; diff --git a/spec/library/default.nix b/spec/library/default.nix index c3b00584..6616d4c1 100644 --- a/spec/library/default.nix +++ b/spec/library/default.nix @@ -2,7 +2,7 @@ , lib , modulesPath , ... }: { - faucet = { + global = { id = "bc8036643fc24f04ab150ff6a38dcce7"; auth.openssh.enable = true; libvirt.enable = false;