summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Kreutz <mail@skreutz.com>2024-04-19 00:43:28 +0200
committerStefan Kreutz <mail@skreutz.com>2024-04-19 00:43:28 +0200
commitf3a65436999a3f69ee0b73e5039b3311f63c7caa (patch)
treefdc713ef0a4ca9bf467330007e60e36ee4fdfd21
parent190906161db8120a58bdc4a2ac8138c4f3e45823 (diff)
downloadtemp-postgres-f3a65436999a3f69ee0b73e5039b3311f63c7caa.tar
Use flake-utils
-rw-r--r--flake.lock22
-rw-r--r--flake.nix25
2 files changed, 32 insertions, 15 deletions
diff --git a/flake.lock b/flake.lock
index 7d29dda..f3856ec 100644
--- a/flake.lock
+++ b/flake.lock
@@ -1,5 +1,23 @@
{
"nodes": {
+ "flake-utils": {
+ "inputs": {
+ "systems": "systems"
+ },
+ "locked": {
+ "lastModified": 1710146030,
+ "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
+ "type": "github"
+ },
+ "original": {
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "type": "github"
+ }
+ },
"nixpkgs": {
"locked": {
"lastModified": 1713248628,
@@ -18,8 +36,8 @@
},
"root": {
"inputs": {
- "nixpkgs": "nixpkgs",
- "systems": "systems"
+ "flake-utils": "flake-utils",
+ "nixpkgs": "nixpkgs"
}
},
"systems": {
diff --git a/flake.nix b/flake.nix
index 386b141..73a59bc 100644
--- a/flake.nix
+++ b/flake.nix
@@ -1,21 +1,20 @@
-# Derived from https://github.com/ryantm/agenix/blob/1381a759b205dff7a6818733118d02253340fd5e/flake.nix
-
{
description = "A temporary PostgreSQL server";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
- systems.url = "github:nix-systems/default";
+ flake-utils.url = "github:numtide/flake-utils";
};
- outputs = { self, nixpkgs, systems }:
- let
- eachSystem = nixpkgs.lib.genAttrs (import systems);
- in {
- overlays.default = import ./overlay.nix;
- packages = eachSystem (system: {
- temp-postgres = nixpkgs.legacyPackages.${system}.callPackage ./temp-postgres.nix {};
- default = self.packages.${system}.temp-postgres;
- });
- };
+ outputs = { self, nixpkgs, flake-utils }:
+ flake-utils.lib.eachDefaultSystem (system:
+ let pkgs = nixpkgs.legacyPackages.${system};
+ in {
+ overlays.default = import ./overlay.nix;
+ packages = {
+ temp-postgres = pkgs.callPackage ./temp-postgres.nix {};
+ default = self.packages.${system}.temp-postgres;
+ };
+ }
+ );
}
Generated by cgit. See skreutz.com for my tech blog and contact information.