1
0
Fork 0

Install nvd

This commit is contained in:
Malte Brandy 2021-04-17 18:12:20 +02:00
parent 3ec533ec3b
commit 2605cc1015
No known key found for this signature in database
GPG key ID: 226A2D41EF5378C9
4 changed files with 24 additions and 3 deletions

View file

@ -7,6 +7,7 @@
./unlock.nix
./mpclient.nix
./neovim
./nvd.nix
];
nixpkgs.overlays = import ../../overlays { inherit lib; };

View file

@ -0,0 +1,9 @@
{ config, pkgs, lib, ... }:
with lib;
let
dag = config.lib.dag;
nvd = import pkgs.sources.nvd { inherit pkgs; };
in
{
home.activation.report-changes = dag.entryAnywhere "${nvd}/bin/nvd $oldGenPath $newGenPath";
}

View file

@ -1,9 +1,11 @@
{ pkgs, nixos-rebuild }:
let configPath = "/etc/nixos";
in {
let
configPath = "/etc/nixos";
in
{
update-system = pkgs.writeHaskellScript {
name = "update-system";
bins = [ nixos-rebuild pkgs.nix-output-monitor ];
bins = [ nixos-rebuild pkgs.nix-output-monitor (import pkgs.sources.nvd { inherit pkgs; }) ];
} ''
main = do
paths <- myNixPath "${configPath}"
@ -11,6 +13,9 @@ in {
setEnv "WITH_SECRETS" "false"
nom_build (paths ++ buildSystemParams ++ ["--no-out-link"] ++ remoteBuildParams ++ fmap toString args)
setEnv "WITH_SECRETS" "true"
oldSystem <- readlink "-f" "/run/current-system" |> captureTrim
nixos_rebuild (paths ++ ["switch"] ++ fmap toString args) &!> StdOut |> nom
newSystem <- readlink "-f" "/run/current-system" |> captureTrim
nvd oldSystem newSystem
'';
}

View file

@ -99,6 +99,12 @@
"url": "https://github.com/NixOS/nixpkgs/archive/294d1925af6462e55c76b49624b983036f0093b9.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"nvd": {
"branch": "master",
"repo": "https://gitlab.com/khumba/nvd.git",
"rev": "7cdaa6d818119bd7a51930d990fded5d594c6623",
"type": "git"
},
"obelisk": {
"branch": "master",
"description": "Obelisk provides an easy way to develop and deploy your Reflex project for web and mobile",