refactor: rename global from faucet
This commit is contained in:
parent
a28c7b9fb3
commit
95dd5cbd6c
|
@ -2,9 +2,9 @@
|
||||||
, lib
|
, lib
|
||||||
, config
|
, config
|
||||||
, ... }: with lib; let
|
, ... }: with lib; let
|
||||||
cfg = config.faucet.android;
|
cfg = config.global.android;
|
||||||
in {
|
in {
|
||||||
options.faucet.android = {
|
options.global.android = {
|
||||||
enable = mkEnableOption "android tools";
|
enable = mkEnableOption "android tools";
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
, lib
|
, lib
|
||||||
, config
|
, config
|
||||||
, ... }: with lib; let
|
, ... }: with lib; let
|
||||||
cfg = config.faucet.asusd;
|
cfg = config.global.asusd;
|
||||||
in {
|
in {
|
||||||
options.faucet.asusd = {
|
options.global.asusd = {
|
||||||
enable = mkEnableOption "ASUS laptop userland support daemon";
|
enable = mkEnableOption "ASUS laptop userland support daemon";
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,14 +2,14 @@
|
||||||
, lib
|
, lib
|
||||||
, config
|
, config
|
||||||
, ... }: with lib; let
|
, ... }: with lib; let
|
||||||
cfg = config.faucet.auth;
|
cfg = config.global.auth;
|
||||||
pub = lib.pipe ./pub [
|
pub = lib.pipe ./pub [
|
||||||
builtins.readDir
|
builtins.readDir
|
||||||
(lib.filterAttrs (n: ty: ty == "regular"))
|
(lib.filterAttrs (n: ty: ty == "regular"))
|
||||||
(lib.mapAttrsToList (n: _: builtins.readFile ./pub/${n}))
|
(lib.mapAttrsToList (n: _: builtins.readFile ./pub/${n}))
|
||||||
];
|
];
|
||||||
in {
|
in {
|
||||||
options.faucet.auth = {
|
options.global.auth = {
|
||||||
enable = mkEnableOption "identity authentication in various software" // { default = true; };
|
enable = mkEnableOption "identity authentication in various software" // { default = true; };
|
||||||
openssh = {
|
openssh = {
|
||||||
enable = mkEnableOption "openssh server";
|
enable = mkEnableOption "openssh server";
|
|
@ -2,9 +2,9 @@
|
||||||
, lib
|
, lib
|
||||||
, config
|
, config
|
||||||
, ... }: with lib; let
|
, ... }: with lib; let
|
||||||
cfg = config.faucet.boot;
|
cfg = config.global.boot;
|
||||||
in {
|
in {
|
||||||
options.faucet.boot = {
|
options.global.boot = {
|
||||||
enable = mkEnableOption "bootloader installation and maintenance" // { default = true; };
|
enable = mkEnableOption "bootloader installation and maintenance" // { default = true; };
|
||||||
systemd-boot = mkEnableOption "generation selection via systemd-boot" // { default = !cfg.lanzaboote; };
|
systemd-boot = mkEnableOption "generation selection via systemd-boot" // { default = !cfg.lanzaboote; };
|
||||||
lanzaboote = mkEnableOption "secure boot maintenance via lanzaboote";
|
lanzaboote = mkEnableOption "secure boot maintenance via lanzaboote";
|
|
@ -2,9 +2,9 @@
|
||||||
, lib
|
, lib
|
||||||
, config
|
, config
|
||||||
, ... }: with lib; let
|
, ... }: with lib; let
|
||||||
cfg = config.faucet.fs;
|
cfg = config.global.fs;
|
||||||
in {
|
in {
|
||||||
options.faucet.fs.btrfs = {
|
options.global.fs.btrfs = {
|
||||||
options = mkOption {
|
options = mkOption {
|
||||||
type = with types; listOf str;
|
type = with types; listOf str;
|
||||||
default = [ "noatime" "compress=zstd" ];
|
default = [ "noatime" "compress=zstd" ];
|
|
@ -2,7 +2,7 @@
|
||||||
, lib
|
, lib
|
||||||
, config
|
, config
|
||||||
, ... }: with lib; let
|
, ... }: with lib; let
|
||||||
cfg = config.faucet.fs;
|
cfg = config.global.fs;
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
./ext4.nix
|
./ext4.nix
|
||||||
|
@ -11,7 +11,7 @@ in {
|
||||||
./btrfs.nix
|
./btrfs.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
options.faucet.fs = {
|
options.global.fs = {
|
||||||
type = mkOption {
|
type = mkOption {
|
||||||
type = with types; enum [ "ext4" "xfs" "bcachefs" "btrfs" ];
|
type = with types; enum [ "ext4" "xfs" "bcachefs" "btrfs" ];
|
||||||
default = "bcachefs";
|
default = "bcachefs";
|
|
@ -1,7 +1,7 @@
|
||||||
{ lib
|
{ lib
|
||||||
, config
|
, config
|
||||||
, ... }: with lib; let
|
, ... }: with lib; let
|
||||||
cfg = config.faucet.fs;
|
cfg = config.global.fs;
|
||||||
in mkIf (cfg.type == "ext4") {
|
in mkIf (cfg.type == "ext4") {
|
||||||
fileSystems."/nix" =
|
fileSystems."/nix" =
|
||||||
{ device = "/dev/disk/by-uuid/${cfg.store}";
|
{ device = "/dev/disk/by-uuid/${cfg.store}";
|
|
@ -1,7 +1,7 @@
|
||||||
{ lib
|
{ lib
|
||||||
, config
|
, config
|
||||||
, ... }: with lib; let
|
, ... }: with lib; let
|
||||||
cfg = config.faucet.fs;
|
cfg = config.global.fs;
|
||||||
in mkIf (cfg.type == "xfs") {
|
in mkIf (cfg.type == "xfs") {
|
||||||
# NOTE: -m reflink=1
|
# NOTE: -m reflink=1
|
||||||
fileSystems."/nix" =
|
fileSystems."/nix" =
|
|
@ -2,7 +2,7 @@
|
||||||
, lib
|
, lib
|
||||||
, config
|
, config
|
||||||
, ... }: with lib; let
|
, ... }: with lib; let
|
||||||
cfg = config.faucet.gui;
|
cfg = config.global.gui;
|
||||||
|
|
||||||
intel = cfg.type == "intel" || (cfg.type == "prime" && config.hardware.nvidia.prime.intelBusId != "");
|
intel = cfg.type == "intel" || (cfg.type == "prime" && config.hardware.nvidia.prime.intelBusId != "");
|
||||||
amdgpu = cfg.type == "amdgpu" || (cfg.type == "prime" && config.hardware.nvidia.prime.amdgpuBusId != "");
|
amdgpu = cfg.type == "amdgpu" || (cfg.type == "prime" && config.hardware.nvidia.prime.amdgpuBusId != "");
|
||||||
|
@ -13,7 +13,7 @@ in {
|
||||||
./greetd.nix
|
./greetd.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
options.faucet.gui = {
|
options.global.gui = {
|
||||||
enable = mkEnableOption "various setup required for GUI and support software";
|
enable = mkEnableOption "various setup required for GUI and support software";
|
||||||
session = mkEnableOption "software required for a graphical session" // { default = true; };
|
session = mkEnableOption "software required for a graphical session" // { default = true; };
|
||||||
type = mkOption {
|
type = mkOption {
|
|
@ -2,7 +2,7 @@
|
||||||
, lib
|
, lib
|
||||||
, config
|
, config
|
||||||
, ... }: with lib; let
|
, ... }: with lib; let
|
||||||
cfg = config.faucet.gui;
|
cfg = config.global.gui;
|
||||||
in mkIf (cfg.enable && cfg.session) {
|
in mkIf (cfg.enable && cfg.session) {
|
||||||
programs.regreet = {
|
programs.regreet = {
|
||||||
enable = true;
|
enable = true;
|
|
@ -2,7 +2,7 @@
|
||||||
, lib
|
, lib
|
||||||
, config
|
, config
|
||||||
, ... }: with lib; let
|
, ... }: with lib; let
|
||||||
cfg = config.faucet.gui;
|
cfg = config.global.gui;
|
||||||
in mkIf cfg.enable {
|
in mkIf cfg.enable {
|
||||||
boot = {
|
boot = {
|
||||||
loader.timeout = lib.mkDefault 0;
|
loader.timeout = lib.mkDefault 0;
|
|
@ -2,9 +2,9 @@
|
||||||
, lib
|
, lib
|
||||||
, config
|
, config
|
||||||
, ... }: with lib; let
|
, ... }: with lib; let
|
||||||
cfg = config.faucet.id;
|
cfg = config.global.id;
|
||||||
in {
|
in {
|
||||||
options.faucet.id = mkOption {
|
options.global.id = mkOption {
|
||||||
type = with types; str;
|
type = with types; str;
|
||||||
description = "systemd machine id";
|
description = "systemd machine id";
|
||||||
};
|
};
|
|
@ -2,9 +2,9 @@
|
||||||
, lib
|
, lib
|
||||||
, config
|
, config
|
||||||
, ... }: with lib; let
|
, ... }: with lib; let
|
||||||
cfg = config.faucet.io;
|
cfg = config.global.io;
|
||||||
in {
|
in {
|
||||||
options.faucet.io = {
|
options.global.io = {
|
||||||
betaflight = mkEnableOption "betaflight udev rules" // { default = true; };
|
betaflight = mkEnableOption "betaflight udev rules" // { default = true; };
|
||||||
bluetooth = mkEnableOption "bluetooth daemons and state persistence" // { default = true; };
|
bluetooth = mkEnableOption "bluetooth daemons and state persistence" // { default = true; };
|
||||||
audio = mkEnableOption "pulseaudio server configuration" // { default = true; };
|
audio = mkEnableOption "pulseaudio server configuration" // { default = true; };
|
|
@ -2,9 +2,9 @@
|
||||||
, lib
|
, lib
|
||||||
, config
|
, config
|
||||||
, ... }: with lib; let
|
, ... }: with lib; let
|
||||||
cfg = config.faucet.kernel;
|
cfg = config.global.kernel;
|
||||||
in {
|
in {
|
||||||
options.faucet.kernel = {
|
options.global.kernel = {
|
||||||
enable = mkEnableOption "kernel version and configuration" // { default = true; };
|
enable = mkEnableOption "kernel version and configuration" // { default = true; };
|
||||||
lts = mkEnableOption "longterm kernel releases";
|
lts = mkEnableOption "longterm kernel releases";
|
||||||
sysctl = {
|
sysctl = {
|
|
@ -2,9 +2,9 @@
|
||||||
, lib
|
, lib
|
||||||
, config
|
, config
|
||||||
, ... }: with lib; let
|
, ... }: with lib; let
|
||||||
cfg = config.faucet.libvirt;
|
cfg = config.global.libvirt;
|
||||||
in {
|
in {
|
||||||
options.faucet.libvirt = {
|
options.global.libvirt = {
|
||||||
enable = mkEnableOption "libvirt virtualisation daemon" // { default = true; };
|
enable = mkEnableOption "libvirt virtualisation daemon" // { default = true; };
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
, lib
|
, lib
|
||||||
, config
|
, config
|
||||||
, ... }: with lib; let
|
, ... }: with lib; let
|
||||||
cfg = config.faucet.util;
|
cfg = config.global.util;
|
||||||
in {
|
in {
|
||||||
options.faucet.util = { };
|
options.global.util = { };
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
programs.zsh.enable = true;
|
programs.zsh.enable = true;
|
|
@ -2,6 +2,6 @@
|
||||||
, ... }: {
|
, ... }: {
|
||||||
# this module passes openssh public keys to home-manager
|
# this module passes openssh public keys to home-manager
|
||||||
users.homeModules = [ {
|
users.homeModules = [ {
|
||||||
passthrough.publicKeys = config.faucet.auth.openssh.publicKeys;
|
passthrough.publicKeys = config.global.auth.openssh.publicKeys;
|
||||||
} ];
|
} ];
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
, lib
|
, lib
|
||||||
, config
|
, config
|
||||||
, ... }: with lib; let
|
, ... }: with lib; let
|
||||||
gui = with config.faucet.gui; ( enable && session );
|
gui = with config.global.gui; ( enable && session );
|
||||||
in {
|
in {
|
||||||
users.home.persist.directories = mkIf gui [ ".config/google-chrome" ];
|
users.home.persist.directories = mkIf gui [ ".config/google-chrome" ];
|
||||||
security.chromiumSuidSandbox.enable = mkIf gui true;
|
security.chromiumSuidSandbox.enable = mkIf gui true;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
, lib
|
, lib
|
||||||
, config
|
, config
|
||||||
, ... }: with lib; let
|
, ... }: with lib; let
|
||||||
gui = with config.faucet.gui; ( enable && session );
|
gui = with config.global.gui; ( enable && session );
|
||||||
in {
|
in {
|
||||||
config = {
|
config = {
|
||||||
users.homeModules = [
|
users.homeModules = [
|
||||||
|
|
|
@ -72,7 +72,7 @@ in {
|
||||||
description = with opts; mkIf (description != null) description;
|
description = with opts; mkIf (description != null) description;
|
||||||
extraGroups = mkIf opts.admin cfg.adminGroups;
|
extraGroups = mkIf opts.admin cfg.adminGroups;
|
||||||
openssh.authorizedKeys.keys = mkIf (opts.sshLogin && config.services.openssh.enable)
|
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}";
|
hashedPasswordFile = "/nix/persist/shadow/${name}";
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
isNormalUser = mkIf (name != "root") true;
|
isNormalUser = mkIf (name != "root") true;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
, lib
|
, lib
|
||||||
, config
|
, config
|
||||||
, ... }: with lib; let
|
, ... }: with lib; let
|
||||||
gui = with config.faucet.gui; ( enable && session );
|
gui = with config.global.gui; ( enable && session );
|
||||||
in mkIf gui {
|
in mkIf gui {
|
||||||
services.xserver.displayManager.sessionPackages = [
|
services.xserver.displayManager.sessionPackages = [
|
||||||
(pkgs.writeTextFile {
|
(pkgs.writeTextFile {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
, lib
|
, lib
|
||||||
, config
|
, config
|
||||||
, ... }: with lib; let
|
, ... }: with lib; let
|
||||||
gui = with config.faucet.gui; ( enable && session );
|
gui = with config.global.gui; ( enable && session );
|
||||||
in {
|
in {
|
||||||
users.home.persist.directories = [ ] ++
|
users.home.persist.directories = [ ] ++
|
||||||
optionals gui [
|
optionals gui [
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
, lib
|
, lib
|
||||||
, config
|
, config
|
||||||
, ... }: with lib; let
|
, ... }: with lib; let
|
||||||
gui = with config.faucet.gui; ( enable && session );
|
gui = with config.global.gui; ( enable && session );
|
||||||
in mkIf gui {
|
in mkIf gui {
|
||||||
programs.virt-manager.enable = true;
|
programs.virt-manager.enable = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
faucet = {
|
global = {
|
||||||
id = "5d3c16fe58444e12ad621600039f10af";
|
id = "5d3c16fe58444e12ad621600039f10af";
|
||||||
fs.esp.uuid = "32A5-6257";
|
fs.esp.uuid = "32A5-6257";
|
||||||
fs.type = "xfs";
|
fs.type = "xfs";
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
specialArgs = inputs // { inherit inputs; };
|
specialArgs = inputs // { inherit inputs; };
|
||||||
modules = [
|
modules = [
|
||||||
../faucet
|
../global
|
||||||
../home/profile.nix
|
../home/profile.nix
|
||||||
../home/user.nix
|
../home/user.nix
|
||||||
./constant.nix
|
./constant.nix
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ lib
|
{ lib
|
||||||
, modulesPath
|
, modulesPath
|
||||||
, ... }: {
|
, ... }: {
|
||||||
faucet = {
|
global = {
|
||||||
id = "bc8036643fc24f04ab150ff6a38dcce7";
|
id = "bc8036643fc24f04ab150ff6a38dcce7";
|
||||||
auth.openssh.enable = true;
|
auth.openssh.enable = true;
|
||||||
libvirt.enable = false;
|
libvirt.enable = false;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ pkgs
|
{ pkgs
|
||||||
, lib
|
, lib
|
||||||
, ... }: {
|
, ... }: {
|
||||||
faucet = {
|
global = {
|
||||||
id = "bc8036643fc24f04ab150ff6a38dcce7";
|
id = "bc8036643fc24f04ab150ff6a38dcce7";
|
||||||
auth.openssh.enable = true;
|
auth.openssh.enable = true;
|
||||||
fs.esp.uuid = "B20E-5994";
|
fs.esp.uuid = "B20E-5994";
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
, lib
|
, lib
|
||||||
, modulesPath
|
, modulesPath
|
||||||
, ... }: {
|
, ... }: {
|
||||||
faucet = {
|
global = {
|
||||||
id = "bc8036643fc24f04ab150ff6a38dcce7";
|
id = "bc8036643fc24f04ab150ff6a38dcce7";
|
||||||
auth.openssh.enable = true;
|
auth.openssh.enable = true;
|
||||||
libvirt.enable = false;
|
libvirt.enable = false;
|
||||||
|
|
Loading…
Reference in a new issue