Skip to content

Commit

Permalink
refactor: update system manager scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
mirkolenz committed Jan 26, 2024
1 parent 6b0b466 commit 333e597
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions flake-modules/scripts.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,27 @@
self,
...
}: {
perSystem = {pkgs, ...}: {
perSystem = {
pkgs,
config,
...
}: let
manager = lib.getExe' pkgs.system-manager "system-manager";
in {
packages = {
manager = lib.getExe pkgs.system-manager;
manager = pkgs.system-manager;
install = pkgs.writeShellApplication {
name = "system-manager-rebuild";
text = ''
set -x #echo on
exec ${lib.getExe pkgs.system-manager} "''${1:-switch}" --flake ${self} "''${@:2}"
exec ${manager} "''${1:-switch}" --flake ${self} "''${@:2}"
'';
};
uninstall = pkgs.writeShellApplication {
name = "system-manager-uninstall";
text = ''
set -x #echo on
exec ${lib.getExe pkgs.system-manager} deactivate "''$@"
exec ${manager} deactivate "''$@"
'';
};
setup = pkgs.writeShellApplication {
Expand Down

0 comments on commit 333e597

Please sign in to comment.