From 1d69c0f87e0bbb25139608a53bd3427a168add5d Mon Sep 17 00:00:00 2001 From: Victor Fuentes Date: Fri, 28 Oct 2022 13:46:41 -0400 Subject: [PATCH] Remove module --- flake.nix | 8 -------- modules/default.nix | 40 ---------------------------------------- 2 files changed, 48 deletions(-) delete mode 100644 modules/default.nix diff --git a/flake.nix b/flake.nix index 79982bb..0fa6140 100644 --- a/flake.nix +++ b/flake.nix @@ -62,13 +62,5 @@ ]; RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}"; }; - - nixosModules.nix-software-center = ({ config, ... }: import ./modules/default.nix { - inherit pkgs; - inherit (pkgs) lib; - inherit config; - nix-software-center = defaultPackage; - }); - nixosModules.default = nixosModules.nix-software-center; }); } diff --git a/modules/default.nix b/modules/default.nix deleted file mode 100644 index b645202..0000000 --- a/modules/default.nix +++ /dev/null @@ -1,40 +0,0 @@ -{ config, lib, pkgs, nix-software-center, ... }: -with lib; -let - cfg = config.programs.nix-software-center; - jsonFormat = pkgs.formats.json { }; -in -{ - options = { - programs.nix-software-center = { - enable = mkEnableOption (lib.mdDoc "nix-software-center"); - systemconfig = mkOption { - type = with types; nullOr str; - default = null; - example = literalExpression ''"/etc/nixos/configuration.nix"''; - description = ''Where Nix Software Center looks for your system configuration.''; - }; - flake = mkOption { - type = with types; nullOr str; - default = null; - example = literalExpression ''"/etc/nixos/flake.nix"''; - description = ''Where Nix Software Center looks for your system flake file.''; - }; - flakearg = mkOption { - type = with types; nullOr str; - default = null; - example = literalExpression ''user''; - description = lib.mdDoc ''The flake argument to use when rebuilding the system. `nixos-rebuild switch --flake $\{programs.nix-software-center.flake}#$\{programs.nix-software-center.flakearg}`''; - }; - }; - }; - - config = mkMerge [ - (mkIf (cfg.enable || cfg.systemconfig != null || cfg.flake != null || cfg.flakearg != null) { - environment.etc."nix-software-center/config.json".source = jsonFormat.generate "config.json" cfg; - }) - (mkIf (cfg.enable) { - environment.systemPackages = [ nix-software-center ]; - }) - ]; -}