nixosModules: remove hoenn script

This commit is contained in:
Aly Raffauf 2024-06-28 19:39:27 -04:00
parent e59d580d37
commit e8f5b4bb19
4 changed files with 1 additions and 45 deletions

View file

@ -10,7 +10,6 @@ inputs: {
./containers ./containers
./desktop ./desktop
./options.nix ./options.nix
./scripts
./services ./services
./users ./users
]; ];

View file

@ -191,11 +191,7 @@
sway.enable = sway.enable =
lib.mkEnableOption "Sway wayland session."; lib.mkEnableOption "Sway wayland session.";
}; };
scripts.hoenn.enable = lib.mkOption {
description = "Hoenn system configuration script";
default = config.ar.base.enable;
type = lib.types.bool;
};
services = { services = {
binaryCache.enable = lib.mkEnableOption "nixpkgs cache server."; binaryCache.enable = lib.mkEnableOption "nixpkgs cache server.";
flatpak.enable = flatpak.enable =

View file

@ -1,8 +0,0 @@
{
pkgs,
lib,
config,
...
}: {
imports = [./hoenn];
}

View file

@ -1,31 +0,0 @@
{
pkgs,
lib,
config,
...
}: {
config = lib.mkIf config.ar.scripts.hoenn.enable {
environment.systemPackages = [
(pkgs.writeShellScriptBin "hoenn" ''
FLAKE=''${2:-"github:alyraffauf/nixcfg"}
HOST=''${HOST:-${config.networking.hostName}}
GIT=https://''${FLAKE//:/\.com\/}.git
if [ "$1" == "sync" ]; then
sudo ${lib.getExe pkgs.nixos-rebuild} switch --flake $FLAKE#$HOST
exit 0;
elif [ "$1" == "boot" ]; then
sudo ${lib.getExe pkgs.nixos-rebuild} boot --flake $FLAKE#$HOST
exit 0;
elif [ "$1" == "gc" ]; then
sudo ${lib.getExe' pkgs.nix "nix-collect-garbage"} -d
exit 0;
elif [ "$1" == "clone" ]; then
${lib.getExe pkgs.git} clone $GIT
cd nixcfg
exit 0;
fi
'')
];
};
}