1
0
Fork 0

Split shells

This commit is contained in:
Malte 2023-02-02 05:55:06 +01:00
parent 4bb6fff887
commit 3e911973cb
5 changed files with 36 additions and 37 deletions

View file

@ -4,7 +4,8 @@
"inputs": {
"darwin": "darwin",
"nixpkgs": [
"nixos-unstable"
"secrets",
"nixpkgs"
]
},
"locked": {
@ -24,6 +25,7 @@
"darwin": {
"inputs": {
"nixpkgs": [
"secrets",
"agenix",
"nixpkgs"
]
@ -116,7 +118,9 @@
},
"hexa-nur-packages": {
"inputs": {
"nixpkgs": "nixpkgs"
"nixpkgs": [
"nixos-unstable"
]
},
"locked": {
"lastModified": 1675199516,
@ -178,22 +182,6 @@
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1624561540,
"narHash": "sha256-izJ2PYZMGMsSkg+e7c9A1x3t/yOLT+qzUM6WQsc2tqo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c6a049a3d32293b24c0f894a840872cf67fd7c11",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"pre-commit-hooks-nix": {
"inputs": {
"flake-compat": "flake-compat",
@ -222,7 +210,6 @@
},
"root": {
"inputs": {
"agenix": "agenix",
"flake-parts": "flake-parts",
"hexa-nur-packages": "hexa-nur-packages",
"nixos-hardware": "nixos-hardware",
@ -236,12 +223,18 @@
}
},
"secrets": {
"inputs": {
"agenix": "agenix",
"nixpkgs": [
"nixos-unstable"
]
},
"locked": {
"lastModified": 1675311984,
"narHash": "sha256-QCTEDcDxycWrKUUN+pjvF1/zA/l3znWMbKWjcfZ0UTw=",
"lastModified": 1675313356,
"narHash": "sha256-3LkUMhFfB8A+2kfS5HE5Gs3+KuU+pYXw3WbNyYW8k24=",
"ref": "refs/heads/main",
"rev": "027ebd2cadf06f984916534a44414e9d8581965c",
"revCount": 174,
"rev": "a2b507c00439a75e10b314018ff1e74c7f06f514",
"revCount": 175,
"type": "git",
"url": "ssh://git@hera.m-0.eu/config-secrets"
},

View file

@ -5,16 +5,18 @@
};
inputs = {
secrets.url = "git+ssh://git@hera.m-0.eu/config-secrets";
agenix = {
url = "github:ryantm/agenix";
secrets = {
url = "git+ssh://git@hera.m-0.eu/config-secrets";
inputs.nixpkgs.follows = "nixos-unstable";
};
nixos-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
nixos-stable.url = "github:nixos/nixpkgs/nixos-22.11";
nixpkgs.follows = "nixos-unstable";
flake-parts.inputs.nixpkgs-lib.follows = "nixos-unstable";
hexa-nur-packages.url = "github:mweinelt/nur-packages";
hexa-nur-packages = {
url = "github:mweinelt/nur-packages";
inputs.nixpkgs.follows = "nixos-unstable";
};
pre-commit-hooks-nix = {
url = "github:cachix/pre-commit-hooks.nix";
inputs = {
@ -49,14 +51,18 @@
overrides = inputs.self.overlays.haskellPackages;
};
in {
devShells.default = hpkgs.shellFor {
packages = hpkgs: (builtins.attrValues (selectHaskellPackages hpkgs));
shellHook = config.pre-commit.installationScript;
buildInputs = [
hpkgs.haskell-language-server
pkgs.cabal-install
inputs'.agenix.packages.default
];
devShells = {
default = pkgs.mkShell {
shellHook = config.pre-commit.installationScript;
};
haskell = hpkgs.shellFor {
packages = hpkgs: (builtins.attrValues (selectHaskellPackages hpkgs));
shellHook = config.pre-commit.installationScript;
buildInputs = [
hpkgs.haskell-language-server
pkgs.cabal-install
];
};
};
checks = {
system-checks = pkgs.runCommand "system-checks" {} ''

View file

@ -28,7 +28,6 @@ flake-inputs: let
[
(import (./. + "/machines/${name}/configuration.nix") flake-inputs)
flake-inputs.secrets.nixosModules.secrets
flake-inputs.agenix.nixosModules.default
(_: {config._module.args.flake-inputs = flake-inputs // {inherit modules;};})
]
++ modules;

1
packages/.envrc Normal file
View file

@ -0,0 +1 @@
use flake ..#haskell

@ -1 +1 @@
Subproject commit 027ebd2cadf06f984916534a44414e9d8581965c
Subproject commit a2b507c00439a75e10b314018ff1e74c7f06f514