modules/comin: init
This commit is contained in:
parent
872849c875
commit
ade0694d14
2 changed files with 33 additions and 1 deletions
2
.github/workflows/eval.yaml
vendored
2
.github/workflows/eval.yaml
vendored
|
@ -36,7 +36,7 @@ jobs:
|
||||||
failed_hosts=""
|
failed_hosts=""
|
||||||
for host in $hosts; do
|
for host in $hosts; do
|
||||||
echo "Eval derivation for $host"
|
echo "Eval derivation for $host"
|
||||||
if ! nix show-derivation -L ".#nixosConfigurations.$host.config.system.build.toplevel" > "eval/$host.json"; then
|
if ! nix derivation show ".#nixosConfigurations.$host.config.system.build.toplevel" > "eval/$host.json"; then
|
||||||
echo "❌ Failed to evaluate $host"
|
echo "❌ Failed to evaluate $host"
|
||||||
failed_hosts+="$host "
|
failed_hosts+="$host "
|
||||||
rm "eval/$host.json"
|
rm "eval/$host.json"
|
||||||
|
|
32
modules/nixos/common-settings/comin.nix
Normal file
32
modules/nixos/common-settings/comin.nix
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
inherit (lib)
|
||||||
|
mkEnableOption
|
||||||
|
mkIf
|
||||||
|
;
|
||||||
|
|
||||||
|
cfg = config.commonSettings.comin;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.commonSettings.comin = {
|
||||||
|
enable = mkEnableOption "auto updater with comin";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
services.comin = mkIf cfg.enable {
|
||||||
|
enable = true;
|
||||||
|
remotes = [
|
||||||
|
{
|
||||||
|
name = "origin";
|
||||||
|
url = "https://github.com/xinyangli/nixos-config.git";
|
||||||
|
branches.main.name = "deploy-comin-eval";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
hostname = config.networking.hostName;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue