aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorAria Shrimpton <me@aria.rip>2024-04-01 19:12:12 +0100
committerAria Shrimpton <me@aria.rip>2024-04-01 19:12:12 +0100
commita0c19f7f9dff15228490f37dbd5e6053e80cb05c (patch)
tree08d6ce3ad9c8dfbb092438797752b0d180b3f8c9 /flake.nix
parent8b7687ff151a0e57e5b0d9cf10258657e0d2b7c2 (diff)
more repro stuff
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix58
1 files changed, 39 insertions, 19 deletions
diff --git a/flake.nix b/flake.nix
index 2a82889..917e3aa 100644
--- a/flake.nix
+++ b/flake.nix
@@ -9,11 +9,16 @@
nixpkgs.follows = "nixpkgs";
};
};
+ nixos-generators = {
+ url = "github:nix-community/nixos-generators";
+ inputs.nixpkgs.follows = "nixpkgs";
+ };
};
outputs = inputs @ {
self,
nixpkgs,
+ nixos-generators,
crane,
rust-overlay,
}: let
@@ -24,33 +29,48 @@
};
tex-env = pkgs.callPackage ./nix/tex-env.nix inputs;
racket-env = pkgs.callPackage ./nix/racket-env.nix inputs;
+ rust-toolchain = pkgs.rust-bin.fromRustupToolchain ((builtins.fromTOML (builtins.readFile ./src/rust-toolchain.toml)).toolchain // {profile = "minimal";});
candelabra = pkgs.callPackage ./nix/candelabra.nix inputs;
in rec {
- devShells.${system}.default = pkgs.mkShell {
- buildInputs = [
- tex-env
- racket-env
+ devShells.${system} = {
+ minimal = pkgs.mkShell {
+ buildInputs = [
+ rust-toolchain
+ racket-env
+ pkgs.just # command runner
+ pkgs.inotify-tools
+ ];
+ };
+ full = pkgs.mkShell {
+ buildInputs = [
+ rust-toolchain
+ racket-env
+ pkgs.just # command runner
+ pkgs.inotify-tools
- pkgs.just # command runner
- pkgs.biber # bibliography backend
- pkgs.inotify-tools
+ tex-env
+ pkgs.biber # bibliography backend
- pkgs.livebook # datavis
- # god is dead
- pkgs.nodejs
- pkgs.nodePackages.vega-cli
- pkgs.nodePackages.vega-lite
- ];
+ pkgs.livebook # datavis
+ # god is dead
+ pkgs.nodejs
+ pkgs.nodePackages.vega-cli
+ pkgs.nodePackages.vega-lite
+ ];
+ };
};
- packages.${system}.default = candelabra;
+ packages.${system} = {
+ default = candelabra;
+ vm = nixos-generators.nixosGenerate {
+ inherit system;
+ specialArgs = {
+ inherit inputs tex-env racket-env candelabra;
+ };
+ modules = [./nix/configuration.nix];
- nixosConfigurations.default = nixpkgs.lib.nixosSystem {
- inherit system;
- specialArgs = {
- inherit inputs tex-env racket-env candelabra;
+ format = "vm";
};
- modules = [./nix/configuration.nix];
};
};
}