Skip to content

Commit

Permalink
home-manager: 19.03 -> 19.09
Browse files Browse the repository at this point in the history
home.stateVersion is now specified.

[meta] diff.jq: Easier to run

[private] Migrate to private-home.nix

private-home.nix is a cleaner private.nix replacement, taking advantage
of how normal NixOS imports work.

[nur] Cleaning & experimental syntax

nur-bb010g continues to try to figure out how it'll work long-term.

The experimental nix-community/NUR#51
`nur.{lib,modules,overlays,pkgs}.${repo}` layout is now supported to see
how it feels with mostly my repo. Seems not have any issues for now.

[packages] ipscan: disabled until Nixpkgs upstreaming is figured out

[programs] beets: Cleaner config

[programs] redshift: Cleaner config

[sources] update (6)

firefox-nightly: 2019-10-19 -> 2019-10-30
lorri: 2019-08-20 -> 2019-10-30
lorri-unstable: 2019-10-07 -> 2019-10-30
niv: 2019-09-23 -> 2019-10-30
nixpkgs: 19.03 -> 19.09 (2019-10-07 -> 2019-10-27)
nixpkgs-unstable: 2019-09-25 -> 2019-10-23
  • Loading branch information
bb010g committed Oct 30, 2019
1 parent eff2ba2 commit eb88be7
Show file tree
Hide file tree
Showing 6 changed files with 188 additions and 212 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
private.nix
displays.nix
private*.nix
50 changes: 27 additions & 23 deletions config-nur.nix
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
{ pkgs
, nur-local ? trace "config-nur nur-local default" ~/nix/nur
, nur-remote ? trace "config-nur nur-remote fetch default"
(builtins.fetchTarball
"https://github.com/nix-community/NUR/archive/master.tar.gz")
, repoOverrides' ? trace "config-nur tryRepoOverrides default" [
, nur-local ? ~/nix/nur
, nur-remote ? builtins.fetchTarball
"https://github.com/nix-community/NUR/archive/master.tar.gz"
, repoOverrides' ? [
"bb010g"
"mozilla"
"nexromancers"
]
, repoOverrides ? trace "config-nur repoOverrides default" {
, repoOverrides ? {
}
, trace ? _: e2: e2
}:

let
inherit (builtins) pathExists;
inherit (builtins) mapAttrs pathExists;
mapAttrs' = builtins.mapAttrs' or (f: set:
builtins.listToAttrs
(builtins.map (attr: f attr set.${attr}) (builtins.attrNames set)));
traceMsg' = sep: msg1: msg2: trace (toString msg1 + sep + toString msg2);
traceMsg = traceMsg' " ";
traceVal = msg: e: traceMsg msg e e;

nur-path = if nur-local != null && pathExists nur-local then
trace "nur-local ${toString nur-local}" nur-local
nur-local
else
trace "nur-remote" nur-remote;
passedArgs = { inherit pkgs; inherit trace; };
nur-remote;
passedArgs = {
inherit pkgs;
inherit trace;
enablePkgsCompat = false;
};

nur-manifest =
(builtins.fromJSON (builtins.readFile (nur-path + "/repos.json"))).repos;
Expand All @@ -36,19 +36,23 @@ let
(builtins.map
(repo: { name = repo; value = ~/nix + "/nur-${repo}"; })
repoOverrides')) // repoOverrides;
in trace "importing nur" (import nur-path ({
pkgs = trace "nur arg pkgs" pkgs;
repoOverrides = mapAttrs' (n: v: traceMsg "override" n (let
p = traceVal "override path"
(v + ("/" + ((nur-manifest.${n} or { }).file or "")));
in let nur = import nur-path ({
inherit pkgs;
repoOverrides = mapAttrs'
(n: v: let
p = v + ("/" + ((nur-manifest.${n} or { }).file or ""));
in {
name = traceMsg "override pathExists" p
(if pathExists p then n else null);
name = if pathExists p then n else null;
value = let
e = traceMsg "override imported" p (import p);
e = import p;
in e (builtins.intersectAttrs (builtins.functionArgs e) passedArgs);
}))
})
repoOverrides'';
}))
}); in nur // {
lib = mapAttrs (_: r: r.lib) nur.repos;
modules = mapAttrs (_: r: r.modules) nur.repos;
overlays = mapAttrs (_: r: r.overlays) nur.repos;
pkgs = mapAttrs (_: r: r.pkgs) nur.repos;
}

# vim:et:sw=2:tw=78
7 changes: 6 additions & 1 deletion diff.jq
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#!/usr/bin/env bash
# Copyright 2019 bb010g \
exec jq -nr --slurpfile orig <(git show HEAD:nix/sources.json) --slurpfile new nix/sources.json -f "$0"
# SPDX-License-Identifier: ISC OR Apache-2.0

def zip(f; g; default):
. as $xs |
to_entries as $xs_entries |
Expand Down Expand Up @@ -83,4 +88,4 @@ $new[0] as $new |
)
))

# vim:et:sw=2:tw=78
# vim:ft=jq:et:sw=2:tw=78
Loading

0 comments on commit eb88be7

Please sign in to comment.