nix/shell.nix

27 lines
696 B
Nix
Raw Normal View History

2023-08-15 12:29:23 +09:00
# shell.nix
2023-09-19 17:52:43 +09:00
# A nixpkgs instance that is grabbed from the pinned nixpkgs commit in the lock file
# Useful to avoid using channels when using legacy nix commands
2023-09-19 18:19:59 +09:00
{
2023-09-19 20:52:23 +09:00
pkgs ? (import ./lib/nixpkgs.nix ) { },
2023-09-19 18:19:59 +09:00
sops-nix ? (import ./lib/sops-nix.nix) { }
}: {
2023-09-19 17:54:33 +09:00
default = pkgs.mkShell {
2023-09-19 17:52:43 +09:00
NIX_CONFIG = "experimental-features = nix-command flakes";
# imports all files ending in .asc/.gpg
sopsPGPKeyDirs = [
2023-09-23 09:05:32 +09:00
"keys/hosts"
"keys/users"
2023-09-19 17:52:43 +09:00
];
2023-09-19 21:03:06 +09:00
2023-09-19 17:52:43 +09:00
nativeBuildInputs = [
pkgs.nix
pkgs.home-manager
pkgs.git
2023-09-21 21:07:25 +09:00
pkgs.vim
2023-09-22 17:40:12 +09:00
pkgs.alejandra
pkgs.nixfmt
2023-09-22 21:09:37 +09:00
pkgs.ssh-to-pgp
2023-09-19 21:03:06 +09:00
(pkgs.callPackage sops-nix {}).sops-import-keys-hook
2023-09-19 17:52:43 +09:00
];
2023-09-19 17:54:50 +09:00
};
2023-08-15 12:29:23 +09:00
}