Home

nfr @main - refs - log -
-
https://git.jolheiser.com/nfr.git
Nix flake repository
nfr / repos.nu
- raw
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
let repos = [
  "blog",
  "gist",
  "git-age",
  "gomodinit",
  "helix.drv",
  "jolheiser.com",
  "nixfig",
  "resume",
  "tailwind-ctp",
  "tailwind-ctp-intellisense",
  "tmpl",
  "ugit",
]

let inputs = $repos | each {|repo| $'"($repo)".url = "git+https://git.jolheiser.com/($repo).git";'}
let follows = $repos | each {|repo| $'"($repo)".inputs.nixpkgs.follows = "nixpkgs";'}
let outputs = $repos | each {|repo| $'packages.x86_64-linux."($repo)" = inputs."($repo)".packages.x86_64-linux.default;'}

let output = $'{
  description = "Nix flake repository";

  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
    ($inputs | str join "\n    ")
    ($follows | str join "\n    ")
  };

  outputs = {...} @ inputs: {
    ($outputs | str join "\n    ")
  };
}
'

$output | save --force flake.nix