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"; type = "app";
program = pkgs.writeShellScriptBin "installer" '' program = builtins.toString (pkgs.writeShellScript "installer" ''
#!${pkgs.stdenv.shell} #!${pkgs.stdenv.shell}
set -e set -e
@ -39,6 +39,6 @@
mount /dev/disk/by-label/boot /mnt/boot mount /dev/disk/by-label/boot /mnt/boot
nixos-install --flake github:nmasur/dotfiles#''${FLAKE} 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: apps = forAllSystems (system:
let pkgs = import nixpkgs { inherit 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 # Used to run commands and edit files in this repo
devShells = forAllSystems (system: devShells = forAllSystems (system: