diff --git a/README.md b/README.md index 6166feb..5baf86d 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,6 @@ To install it 1. first add the module to the nixOS system connfiguration 2. set `config-manager.flakePath = ` -3. set `config-manager.system = ` 4. run `nixos-rebuild switch --flake .#` after that `cm` will be available on `$PATH`. diff --git a/config-manager/default.nix b/config-manager/default.nix index e5943e2..f0ecdde 100644 --- a/config-manager/default.nix +++ b/config-manager/default.nix @@ -2,17 +2,14 @@ let flakePath = config.config-manager.flakePath; nixosConfiguration = config.config-manager.nixosConfiguration; - system = config.config-manager.system; - nh = inputs.nh.packages."${system}".default; + nh = inputs.nh.packages."${pkgs.system}".default; config-manager = if flakePath == "" then throw "'config-manager.flakePath' cannot be empty" else if nixosConfiguration == "" then throw "'config-manager.nixosConfiguration' cannot be empty" - else if system == "" then - throw "'config-manager.system' cannot be empty" else pkgs.writeShellScriptBin "cm" '' help() { @@ -60,12 +57,6 @@ in default = config.networking.hostName; description = "what nixosConfiguration to use"; }; - - system = lib.mkOption { - type = lib.types.str; - default = ""; - description = "what system the host is (x86_64-linux, aarch64-linux)"; - }; }; }; diff --git a/hosts/pinwheel/configuration.nix b/hosts/pinwheel/configuration.nix index a874864..69cb3b5 100644 --- a/hosts/pinwheel/configuration.nix +++ b/hosts/pinwheel/configuration.nix @@ -71,7 +71,6 @@ config-manager = { flakePath = "/home/alex/config"; - system=pkgs.system; }; mod = { diff --git a/hosts/pinwheel/modules/age/default.nix b/hosts/pinwheel/modules/age/default.nix index c82a11e..6c70fbb 100644 --- a/hosts/pinwheel/modules/age/default.nix +++ b/hosts/pinwheel/modules/age/default.nix @@ -1,7 +1,4 @@ -{ inputs, config, ... }: -let - system = config.config-manager.system; -in +{ inputs, pkgs, ... }: { age = { identityPaths = [ @@ -11,6 +8,6 @@ in }; environment.systemPackages = [ - inputs.agenix.packages."${system}".default + inputs.agenix.packages."${pkgs.system}".default ]; } diff --git a/hosts/pinwheel/modules/screenshot/default.nix b/hosts/pinwheel/modules/screenshot/default.nix index fa8dae1..08a9f8b 100644 --- a/hosts/pinwheel/modules/screenshot/default.nix +++ b/hosts/pinwheel/modules/screenshot/default.nix @@ -1,10 +1,8 @@ { inputs, pkgs, lib, config, ...}: let - system = config.config-manager.system; - hyprlandEnabled = config.mod.hyprland.enable; - grimblast = inputs.hyprland-contrib.packages.${system}.grimblast; + grimblast = inputs.hyprland-contrib.packages.${pkgs.system}.grimblast; area = "${pkgs.libnotify}/bin/notify-send 'ps: selected area' && ${grimblast}/bin/grimblast copy area"; screen = "${pkgs.libnotify}/bin/notify-send 'ps: selected screen' &&${grimblast}/bin/grimblast copy output"; in diff --git a/hosts/sombrero/configuration.nix b/hosts/sombrero/configuration.nix index e9b1d71..caad42f 100644 --- a/hosts/sombrero/configuration.nix +++ b/hosts/sombrero/configuration.nix @@ -76,7 +76,6 @@ config-manager = { flakePath = "/home/alex/config"; - system = pkgs.system; }; mod = { diff --git a/hosts/sombrero/modules/age/default.nix b/hosts/sombrero/modules/age/default.nix index 91137d1..18ae1bd 100644 --- a/hosts/sombrero/modules/age/default.nix +++ b/hosts/sombrero/modules/age/default.nix @@ -1,13 +1,10 @@ -{ inputs, config, ... }: -let - system = config.config-manager.system; -in +{ inputs, pkgs, ... }: { age = { identityPaths = [ "/etc/ssh/sombrero" ]; }; environment.systemPackages = [ - inputs.agenix.packages."${system}".default + inputs.agenix.packages."${pkgs.system}".default ]; }