From 3e911973cb4ec3d97b83393db8e440c11d28b9c1 Mon Sep 17 00:00:00 2001 From: maralorn Date: Thu, 2 Feb 2023 05:55:06 +0100 Subject: [PATCH] Split shells --- flake.lock | 39 ++++++++++++++++----------------------- flake.nix | 30 ++++++++++++++++++------------ nixos/configurations.nix | 1 - packages/.envrc | 1 + private | 2 +- 5 files changed, 36 insertions(+), 37 deletions(-) create mode 100644 packages/.envrc diff --git a/flake.lock b/flake.lock index 8d8c54ad..cd0ebff1 100644 --- a/flake.lock +++ b/flake.lock @@ -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" }, diff --git a/flake.nix b/flake.nix index 37e7bd16..96c0095d 100644 --- a/flake.nix +++ b/flake.nix @@ -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" {} '' diff --git a/nixos/configurations.nix b/nixos/configurations.nix index e0a133bd..f05ea8d5 100644 --- a/nixos/configurations.nix +++ b/nixos/configurations.nix @@ -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; diff --git a/packages/.envrc b/packages/.envrc new file mode 100644 index 00000000..8e44d2ba --- /dev/null +++ b/packages/.envrc @@ -0,0 +1 @@ +use flake ..#haskell diff --git a/private b/private index 027ebd2c..a2b507c0 160000 --- a/private +++ b/private @@ -1 +1 @@ -Subproject commit 027ebd2cadf06f984916534a44414e9d8581965c +Subproject commit a2b507c00439a75e10b314018ff1e74c7f06f514