flake: add nix-std library

This commit is contained in:
Jez Cope 2023-06-25 12:07:41 +01:00
parent ec9ade3603
commit b08d5717f4
3 changed files with 22 additions and 2 deletions

View File

@ -60,6 +60,21 @@
"type": "github" "type": "github"
} }
}, },
"nix-std": {
"locked": {
"lastModified": 1685917625,
"narHash": "sha256-2manVKofCZrCToVDnDYNvtYUFBYOM5JhdDoNGVY4fq4=",
"owner": "chessai",
"repo": "nix-std",
"rev": "e20af8822b5739434b875643bfc61fe0195ea2fb",
"type": "github"
},
"original": {
"owner": "chessai",
"repo": "nix-std",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1685931219, "lastModified": 1685931219,
@ -110,6 +125,7 @@
"inputs": { "inputs": {
"emacs-overlay": "emacs-overlay", "emacs-overlay": "emacs-overlay",
"home-manager": "home-manager", "home-manager": "home-manager",
"nix-std": "nix-std",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"nur": "nur" "nur": "nur"
} }

View File

@ -7,18 +7,21 @@
home-manager.url = "github:nix-community/home-manager"; home-manager.url = "github:nix-community/home-manager";
nur.url = "github:nix-community/NUR"; nur.url = "github:nix-community/NUR";
emacs-overlay.url = "github:nix-community/emacs-overlay"; emacs-overlay.url = "github:nix-community/emacs-overlay";
nix-std.url = "github:chessai/nix-std";
home-manager.inputs.nixpkgs.follows = "nixpkgs"; home-manager.inputs.nixpkgs.follows = "nixpkgs";
emacs-overlay.inputs.nixpkgs.follows = "nixpkgs"; emacs-overlay.inputs.nixpkgs.follows = "nixpkgs";
}; };
outputs = { self, nixpkgs, home-manager, nur, emacs-overlay, ... }@inputs: outputs =
{ self, nixpkgs, home-manager, nur, emacs-overlay, nix-std, ... }@inputs:
let let
inherit (nixpkgs.lib) genAttrs nixosSystem; inherit (nixpkgs.lib) genAttrs nixosSystem;
system = "x86_64-linux"; system = "x86_64-linux";
hosts = [ "arianrhod" "gwydion" ]; hosts = [ "arianrhod" "gwydion" ];
overlay = import ./overlay.nix; overlay = import ./overlay.nix;
std = nix-std.lib;
in { in {
inherit overlay; inherit overlay;
@ -41,6 +44,7 @@
useGlobalPkgs = true; useGlobalPkgs = true;
useUserPackages = true; useUserPackages = true;
users.jez = import ./home; users.jez = import ./home;
extraSpecialArgs = { inherit std; };
}; };
} }
]; ];

View File

@ -1,4 +1,4 @@
{ config, pkgs, lib, nixosConfig, ... }: { config, pkgs, lib, nixosConfig, std, ... }:
with builtins; with builtins;
let let