Remove module

This commit is contained in:
Victor Fuentes 2022-10-28 13:46:41 -04:00
parent 7f340068e3
commit 1d69c0f87e
No known key found for this signature in database
GPG Key ID: 0A88B68D6A9ACAE0
2 changed files with 0 additions and 48 deletions

View File

@ -62,13 +62,5 @@
]; ];
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}"; 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;
}); });
} }

View File

@ -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 ];
})
];
}