From 935b4094a29613c4b052f8efc6e416c3126a9760 Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Sun, 7 Apr 2024 16:54:36 +0200 Subject: [PATCH] Update options --- home/default.nix | 2 +- hosts/herugrim/default.nix | 2 +- hosts/vbox_nix/default.nix | 2 +- options/default.nix | 2 +- options/home/default.nix | 7 ++----- options/home/git.nix | 10 +++++----- options/{system.nix => system/default.nix} | 3 +++ 7 files changed, 14 insertions(+), 14 deletions(-) rename options/{system.nix => system/default.nix} (87%) diff --git a/home/default.nix b/home/default.nix index 9092308..fd6d208 100644 --- a/home/default.nix +++ b/home/default.nix @@ -4,7 +4,7 @@ let username = config.myOptions.system.username; in { - home-manager = lib.mkIf myHmConf.enabled { + home-manager = lib.mkIf myHmConf.enable { # Use verbose mode for home-manager verbose = true; diff --git a/hosts/herugrim/default.nix b/hosts/herugrim/default.nix index d6686ba..5f48536 100644 --- a/hosts/herugrim/default.nix +++ b/hosts/herugrim/default.nix @@ -29,7 +29,7 @@ cpu.type = "intel"; }; home-manager = { - enabled = true; + enable = true; stateVersion = "23.11"; git = { userName = "ItsDrike"; diff --git a/hosts/vbox_nix/default.nix b/hosts/vbox_nix/default.nix index 349df30..5422f7f 100644 --- a/hosts/vbox_nix/default.nix +++ b/hosts/vbox_nix/default.nix @@ -28,7 +28,7 @@ cpu.type = "amd"; }; home-manager = { - enabled = true; + enable = true; stateVersion = "23.11"; git = { userName = "ItsDrike"; diff --git a/options/default.nix b/options/default.nix index c2697b8..f7985c6 100644 --- a/options/default.nix +++ b/options/default.nix @@ -2,6 +2,6 @@ _: { imports = [ ./device ./home - ./system.nix + ./system ]; } diff --git a/options/home/default.nix b/options/home/default.nix index 2ed801c..f959229 100644 --- a/options/home/default.nix +++ b/options/home/default.nix @@ -1,4 +1,5 @@ { lib, ... }: with lib; let + inherit (lib) mkEnableOption mkOption; in { imports = [ @@ -6,11 +7,7 @@ in ]; options.myOptions.home-manager = { - enabled = mkOption { - type = types.bool; - default = false; - description = "Should home-manager be enabled for this host?"; - }; + enable = mkEnableOption "home-manager"; stateVersion = mkOption { type = types.str; diff --git a/options/home/git.nix b/options/home/git.nix index 2ff4d8b..f9d6b4c 100644 --- a/options/home/git.nix +++ b/options/home/git.nix @@ -1,4 +1,5 @@ { lib, ... }: with lib; let + inherit (lib) mkEnableOption mkOption; in { options.myOptions.home-manager.git = { @@ -14,11 +15,10 @@ in }; signing = { - enabled = mkOption { - type = types.bool; - default = true; - description = "Should commits and tags be sgined by default?"; - }; + enabled = mkEnableOption '' + git commit signing. + Requires `myOptions.home-manager.git.signing.key` to be set. + ''; key = mkOption { type = types.str; default = ""; diff --git a/options/system.nix b/options/system/default.nix similarity index 87% rename from options/system.nix rename to options/system/default.nix index d97a2b4..bf9869e 100644 --- a/options/system.nix +++ b/options/system/default.nix @@ -1,6 +1,9 @@ { lib, ... }: with lib; let + inherit (lib) mkOption; in { + imports = [ ]; + options.myOptions.system = { hostname = mkOption { type = types.str;