fix: add readme and fix installer apps

This commit is contained in:
Noah Masur 2022-08-07 18:32:11 -06:00
parent 79f8e621e6
commit 99f1777827
3 changed files with 23 additions and 4 deletions

View File

@ -5,7 +5,7 @@
type = "app";
program = pkgs.writeShellScriptBin "installer" ''
program = builtins.toString (pkgs.writeShellScript "installer" ''
#!${pkgs.stdenv.shell}
set -e
@ -39,6 +39,6 @@
mount /dev/disk/by-label/boot /mnt/boot
nixos-install --flake github:nmasur/dotfiles#''${FLAKE}
'';
'');
}

11
apps/readme.nix Normal file
View File

@ -0,0 +1,11 @@
{ pkgs, ... }: {
type = "app";
program = builtins.toString (pkgs.writeShellScript "readme" ''
#!${pkgs.stdenv.shell}
${pkgs.glow}/bin/glow ${builtins.toString ../README.md}
'');
}

View File

@ -69,10 +69,18 @@
};
};
# Format and install from nothing
apps = forAllSystems (system:
let pkgs = import nixpkgs { inherit system; };
in { installer = import ./apps/installer.nix { inherit pkgs; }; });
in rec {
default = readme;
# Format and install from nothing
installer = import ./apps/installer.nix { inherit pkgs; };
# Display the readme for this repository
readme = import ./apps/readme.nix { inherit pkgs; };
});
# Used to run commands and edit files in this repo
devShells = forAllSystems (system: