deployment: Improvements
This commit is contained in:
parent
e245f02aa8
commit
2c707e14cb
8 changed files with 49 additions and 38 deletions
18
flake.lock
18
flake.lock
|
@ -11,11 +11,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1683866323,
|
"lastModified": 1684153753,
|
||||||
"narHash": "sha256-M2bEuh2jr0Ec13GnP5f8unD8q0AcPt2fHSUynOZJ8No=",
|
"narHash": "sha256-PVbWt3qrjYAK+T5KplFcO+h7aZWfEj1UtyoKlvcDxh0=",
|
||||||
"owner": "ryantm",
|
"owner": "ryantm",
|
||||||
"repo": "agenix",
|
"repo": "agenix",
|
||||||
"rev": "92197270a1eedd142a4aff853e4cc6d1e838c22f",
|
"rev": "db5637d10f797bb251b94ef9040b237f4702cde3",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -85,11 +85,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1683754942,
|
"lastModified": 1684148371,
|
||||||
"narHash": "sha256-L+Bj8EL4XLmODRIuOkk9sI6FDECVzK+C8jeZFv7q6eY=",
|
"narHash": "sha256-CEVaArsziqantqU418XXruNDjPZN/HC3x1rqr2D4g+o=",
|
||||||
"owner": "lnl7",
|
"owner": "lnl7",
|
||||||
"repo": "nix-darwin",
|
"repo": "nix-darwin",
|
||||||
"rev": "252541bd05a7f55f3704a3d014ad1badc1e3360d",
|
"rev": "0dbf1c2fb1a5a0372a324eff1ba44f9da66febd2",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -228,11 +228,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1684061181,
|
"lastModified": 1684157850,
|
||||||
"narHash": "sha256-EJpZ+Drpt3aHpowddpsQFBWsqLSJHyP6dnremTVMdWw=",
|
"narHash": "sha256-xGHTCgvAxO5CgAL6IAgE/VGRX2wob2Y+DPyqpXJ32oQ=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "e4272987f785a8848205263abb4911b922c21e1b",
|
"rev": "c0deab0effd576e70343cb5df0c64428e0e0d010",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -41,12 +41,12 @@ in
|
||||||
};
|
};
|
||||||
nvim-osc52 = buildVimPluginFrom2Nix {
|
nvim-osc52 = buildVimPluginFrom2Nix {
|
||||||
pname = "nvim-osc52";
|
pname = "nvim-osc52";
|
||||||
version = "2023-05-11";
|
version = "2023-05-15";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "ojroques";
|
owner = "ojroques";
|
||||||
repo = "nvim-osc52";
|
repo = "nvim-osc52";
|
||||||
rev = "fa9bbb319239fa54c1b91b84c1d368d3c6427ffd";
|
rev = "3e96035d62290183fe7a11418db2b254fcfcaee3";
|
||||||
sha256 = "0w5w3zxgwdys7i5sl6l8mykjfgillsdc73d3xq6w6rzscslvlm1p";
|
sha256 = "12zdrwjlrvzlpwqi757llfvr7ir6ww949i85da385n2crj3jfd8i";
|
||||||
fetchSubmodules = false;
|
fetchSubmodules = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -15,8 +15,6 @@ end
|
||||||
pushd "$config_dir"
|
pushd "$config_dir"
|
||||||
rm -rf result
|
rm -rf result
|
||||||
|
|
||||||
set system_old (readlink /run/current-system)
|
|
||||||
|
|
||||||
switch $os
|
switch $os
|
||||||
case Darwin
|
case Darwin
|
||||||
git pull
|
git pull
|
||||||
|
@ -28,7 +26,4 @@ end
|
||||||
|
|
||||||
rm -f result
|
rm -f result
|
||||||
|
|
||||||
set system_new (readlink /run/current-system)
|
|
||||||
nvd diff "$system_old" "$system_new"
|
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
../shared/show-update-changelog.nix
|
||||||
|
|
||||||
../darwin/defaults.nix
|
../darwin/defaults.nix
|
||||||
../darwin/fonts.nix
|
../darwin/fonts.nix
|
||||||
../darwin/sudo.nix
|
../darwin/sudo.nix
|
||||||
|
|
|
@ -104,9 +104,14 @@ in
|
||||||
DHCP = "ipv4";
|
DHCP = "ipv4";
|
||||||
IPv6AcceptRA = false;
|
IPv6AcceptRA = false;
|
||||||
};
|
};
|
||||||
linkConfig.RequiredForOnline = "yes";
|
linkConfig.RequiredForOnline = "routable";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
wait-online.extraArgs = [
|
||||||
|
"--interface=enp1s0"
|
||||||
|
"--interface=enp7s0"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
services.journald.extraConfig = ''
|
services.journald.extraConfig = ''
|
||||||
|
|
|
@ -107,11 +107,8 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
wait-online.ignoredInterfaces = [
|
wait-online.extraArgs = [
|
||||||
"veth0"
|
"--interface=ens3"
|
||||||
"veth1"
|
|
||||||
"veth2"
|
|
||||||
"veth3"
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -131,17 +131,13 @@ in
|
||||||
DHCP = "ipv4";
|
DHCP = "ipv4";
|
||||||
IPv6AcceptRA = false;
|
IPv6AcceptRA = false;
|
||||||
};
|
};
|
||||||
linkConfig.RequiredForOnline = "yes";
|
linkConfig.RequiredForOnline = "routable";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
wait-online.ignoredInterfaces = [
|
wait-online.extraArgs = [
|
||||||
"veth0"
|
"--interface=enp1s0"
|
||||||
"veth1"
|
"--interface=enp7s0"
|
||||||
"veth2"
|
|
||||||
"veth3"
|
|
||||||
"veth4"
|
|
||||||
"veth5"
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -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 = {
|
||||||
if [[ -e /run/current-system ]]; then
|
show-update-changelog = mkIf isLinux ''
|
||||||
echo "[show-update-changelog] Changelog"
|
if [[ -e /run/current-system ]]; then
|
||||||
${config.nix.package}/bin/nix store diff-closures /run/current-system "$systemConfig" || true
|
echo "[show-update-changelog] System Changelog"
|
||||||
fi
|
${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
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue