🔧 add devenv
This commit is contained in:
parent
07fe82964b
commit
6abad2d5a6
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
/.direnv
|
||||
/result
|
||||
/result
|
||||
/.pre-commit-config.yaml
|
||||
|
26
flake.nix
26
flake.nix
@ -87,16 +87,26 @@
|
||||
(system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
darwin-local = pkgs.writeScriptBin "darwin-local" ''
|
||||
#!${pkgs.stdenv.shell}
|
||||
nix build .#darwinConfigurations.$(hostname -s).system
|
||||
./result/sw/bin/darwin-rebuild switch --flake .
|
||||
'';
|
||||
in
|
||||
{
|
||||
devShells.default = pkgs.mkShell {
|
||||
name = "athens";
|
||||
buildInputs = [ darwin-local deploy-rs.packages.${system}.deploy-rs pkgs.nixpkgs-fmt pkgs.rnix-lsp pkgs.sops ];
|
||||
devShells.default = devenv.lib.mkShell {
|
||||
inherit inputs pkgs;
|
||||
modules = [
|
||||
{
|
||||
packages = [ deploy-rs.packages.${system}.deploy-rs pkgs.sops ];
|
||||
|
||||
scripts.darwin-local.exec = ''
|
||||
nix build .#darwinConfigurations.$(hostname -s).system
|
||||
./result/sw/bin/darwin-rebuild switch --flake .
|
||||
'';
|
||||
|
||||
languages.nix.enable = true;
|
||||
|
||||
pre-commit.hooks = {
|
||||
nixpkgs-fmt.enable = true;
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
formatter = pkgs.nixpkgs-fmt;
|
||||
|
Loading…
x
Reference in New Issue
Block a user