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

View file

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

View file

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

1
packages/.envrc Normal file
View file

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

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