From 4e9b865e334fe1770670d55aea77ee74a5187289 Mon Sep 17 00:00:00 2001 From: James Patrick Date: Sat, 16 Jul 2022 19:07:34 -0400 Subject: [PATCH] de-pluralized systems -> system This was not being used consistently. --- hosts/nil.nix | 2 +- modules/profiles/laptop.nix | 3 +-- modules/system/boot.nix | 4 ++-- modules/system/displaymanager.nix | 4 ++-- modules/system/flatpak.nix | 4 ++-- modules/system/yubikey.nix | 4 ++-- modules/system/zfs.nix | 4 ++-- 7 files changed, 12 insertions(+), 13 deletions(-) diff --git a/hosts/nil.nix b/hosts/nil.nix index b519495..a290cd2 100644 --- a/hosts/nil.nix +++ b/hosts/nil.nix @@ -34,7 +34,7 @@ (modulesPath + "/installer/scan/not-detected.nix") ]; - this.systems = { + this.system = { zfs.enable = true; yubikey.enable = true; }; diff --git a/modules/profiles/laptop.nix b/modules/profiles/laptop.nix index 6072560..7603126 100644 --- a/modules/profiles/laptop.nix +++ b/modules/profiles/laptop.nix @@ -1,7 +1,6 @@ { config, lib, pkgs, ... }: { imports = [ ./graphical.nix ]; - - this.systems.boot.enable = true; + this.system.boot.enable = true; networking.networkmanager.enable = true; users.users.james.extraGroups = [ "networkmanager" ]; } diff --git a/modules/system/boot.nix b/modules/system/boot.nix index 9bd3c30..eb485c8 100644 --- a/modules/system/boot.nix +++ b/modules/system/boot.nix @@ -1,7 +1,7 @@ { config, lib, pkgs, ... }: -let cfg = config.this.systems.boot; +let cfg = config.this.system.boot; in with lib; { - options.this.systems.boot.enable = mkOption { + options.this.system.boot.enable = mkOption { default = true; type = with types; bool; description = "Is there a physical power button?"; diff --git a/modules/system/displaymanager.nix b/modules/system/displaymanager.nix index 7496965..f9464a7 100644 --- a/modules/system/displaymanager.nix +++ b/modules/system/displaymanager.nix @@ -1,10 +1,10 @@ { config, lib, pkgs, ... }: let - cfg = config.systems.displaymanager; + cfg = config.system.displaymanager; graphical = config.this.graphical; in with lib; { options = { - systems.displaymanager.enable = mkOption { + system.displaymanager.enable = mkOption { default = graphical.enable; type = with types; bool; }; diff --git a/modules/system/flatpak.nix b/modules/system/flatpak.nix index f65c7c1..a02fcec 100644 --- a/modules/system/flatpak.nix +++ b/modules/system/flatpak.nix @@ -1,10 +1,10 @@ { config, lib, pkgs, ... }: let - cfg = config.systems.flatpak; + cfg = config.system.flatpak; graphical = config.this.graphical; in with lib; { options = { - systems.flatpak.enable = mkOption { + system.flatpak.enable = mkOption { default = graphical.enable; type = with types; bool; }; diff --git a/modules/system/yubikey.nix b/modules/system/yubikey.nix index 075304b..3e41dc4 100644 --- a/modules/system/yubikey.nix +++ b/modules/system/yubikey.nix @@ -1,9 +1,9 @@ { config, lib, pkgs, ... }: let - cfg = config.this.systems.yubikey; + cfg = config.this.system.yubikey; graphical = config.this.graphical; in with lib; { - options.this.systems.yubikey.enable = mkEnableOption "Yubikey"; + options.this.system.yubikey.enable = mkEnableOption "Yubikey"; config = mkIf cfg.enable { services.udev.packages = with pkgs; [ yubikey-personalization ]; diff --git a/modules/system/zfs.nix b/modules/system/zfs.nix index 7ddf8a6..2e87148 100644 --- a/modules/system/zfs.nix +++ b/modules/system/zfs.nix @@ -1,7 +1,7 @@ { config, lib, pkgs, ... }: -let cfg = config.this.systems.zfs; +let cfg = config.this.system.zfs; in with lib; { - options.this.systems.zfs.enable = mkEnableOption "zfs"; + options.this.system.zfs.enable = mkEnableOption "zfs"; config = mkIf cfg.enable { boot = {