1
0
Fork 0

deployment: Improvements

This commit is contained in:
Daniel Kempkens 2023-05-15 20:34:08 +02:00
parent e245f02aa8
commit 2c707e14cb
Signed by: daniel
SSH key fingerprint: SHA256:Ks/MyhQYcPRQiwMKLAKquWCdCPe3JXlb1WttgnAoSeM
8 changed files with 49 additions and 38 deletions

View file

@ -11,11 +11,11 @@
]
},
"locked": {
"lastModified": 1683866323,
"narHash": "sha256-M2bEuh2jr0Ec13GnP5f8unD8q0AcPt2fHSUynOZJ8No=",
"lastModified": 1684153753,
"narHash": "sha256-PVbWt3qrjYAK+T5KplFcO+h7aZWfEj1UtyoKlvcDxh0=",
"owner": "ryantm",
"repo": "agenix",
"rev": "92197270a1eedd142a4aff853e4cc6d1e838c22f",
"rev": "db5637d10f797bb251b94ef9040b237f4702cde3",
"type": "github"
},
"original": {
@ -85,11 +85,11 @@
]
},
"locked": {
"lastModified": 1683754942,
"narHash": "sha256-L+Bj8EL4XLmODRIuOkk9sI6FDECVzK+C8jeZFv7q6eY=",
"lastModified": 1684148371,
"narHash": "sha256-CEVaArsziqantqU418XXruNDjPZN/HC3x1rqr2D4g+o=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "252541bd05a7f55f3704a3d014ad1badc1e3360d",
"rev": "0dbf1c2fb1a5a0372a324eff1ba44f9da66febd2",
"type": "github"
},
"original": {
@ -228,11 +228,11 @@
]
},
"locked": {
"lastModified": 1684061181,
"narHash": "sha256-EJpZ+Drpt3aHpowddpsQFBWsqLSJHyP6dnremTVMdWw=",
"lastModified": 1684157850,
"narHash": "sha256-xGHTCgvAxO5CgAL6IAgE/VGRX2wob2Y+DPyqpXJ32oQ=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "e4272987f785a8848205263abb4911b922c21e1b",
"rev": "c0deab0effd576e70343cb5df0c64428e0e0d010",
"type": "github"
},
"original": {

View file

@ -41,12 +41,12 @@ in
};
nvim-osc52 = buildVimPluginFrom2Nix {
pname = "nvim-osc52";
version = "2023-05-11";
version = "2023-05-15";
src = fetchFromGitHub {
owner = "ojroques";
repo = "nvim-osc52";
rev = "fa9bbb319239fa54c1b91b84c1d368d3c6427ffd";
sha256 = "0w5w3zxgwdys7i5sl6l8mykjfgillsdc73d3xq6w6rzscslvlm1p";
rev = "3e96035d62290183fe7a11418db2b254fcfcaee3";
sha256 = "12zdrwjlrvzlpwqi757llfvr7ir6ww949i85da385n2crj3jfd8i";
fetchSubmodules = false;
};
};

View file

@ -15,8 +15,6 @@ end
pushd "$config_dir"
rm -rf result
set system_old (readlink /run/current-system)
switch $os
case Darwin
git pull
@ -28,7 +26,4 @@ end
rm -f result
set system_new (readlink /run/current-system)
nvd diff "$system_old" "$system_new"
popd

View file

@ -1,5 +1,7 @@
{
imports = [
../shared/show-update-changelog.nix
../darwin/defaults.nix
../darwin/fonts.nix
../darwin/sudo.nix

View file

@ -104,9 +104,14 @@ in
DHCP = "ipv4";
IPv6AcceptRA = false;
};
linkConfig.RequiredForOnline = "yes";
linkConfig.RequiredForOnline = "routable";
};
};
wait-online.extraArgs = [
"--interface=enp1s0"
"--interface=enp7s0"
];
};
services.journald.extraConfig = ''

View file

@ -107,11 +107,8 @@ in
};
};
wait-online.ignoredInterfaces = [
"veth0"
"veth1"
"veth2"
"veth3"
wait-online.extraArgs = [
"--interface=ens3"
];
};

View file

@ -131,17 +131,13 @@ in
DHCP = "ipv4";
IPv6AcceptRA = false;
};
linkConfig.RequiredForOnline = "yes";
linkConfig.RequiredForOnline = "routable";
};
};
wait-online.ignoredInterfaces = [
"veth0"
"veth1"
"veth2"
"veth3"
"veth4"
"veth5"
wait-online.extraArgs = [
"--interface=enp1s0"
"--interface=enp7s0"
];
};

View file

@ -1,10 +1,26 @@
{ config, ... }:
{ pkgs, config, lib, ... }:
let
inherit (lib) mkIf;
inherit (pkgs.stdenv) isDarwin;
inherit (pkgs.stdenv) isLinux;
in
{
system.activationScripts.show-update-changelog = ''
system.activationScripts = {
show-update-changelog = mkIf isLinux ''
if [[ -e /run/current-system ]]; then
echo "[show-update-changelog] Changelog"
${config.nix.package}/bin/nix store diff-closures /run/current-system "$systemConfig" || true
echo "[show-update-changelog] System Changelog"
${pkgs.nvd}/bin/nvd --nix-bin-dir='${config.nix.package}/bin' diff /run/current-system "$systemConfig"
fi
'';
postActivation = mkIf isDarwin {
text = ''
if [[ -e /run/current-system ]]; then
echo "[show-update-changelog] System Changelog"
sudo -H ${pkgs.nvd}/bin/nvd --nix-bin-dir='${config.nix.package}/bin' diff /run/current-system "$systemConfig"
fi
'';
};
};
}