From a77dce38f55f679eed94acaa796378e0bb6d6a62 Mon Sep 17 00:00:00 2001 From: Daniel Kempkens Date: Sat, 24 Jun 2023 20:19:50 +0200 Subject: [PATCH] Update deps --- flake.lock | 24 ++++++++++++------------ home/programs/nvim/default.nix | 2 +- home/programs/nvim/plugins.nix | 12 ++++++------ home/programs/scripts/nixpkgs-switch | 23 +++++++++++++++-------- system/hosts/Styx.nix | 4 ++-- system/hosts/tanker.nix | 1 + system/nixos/msmtp.nix | 4 ++-- system/nixos/smartd.nix | 22 ++++++++++++++++++++++ 8 files changed, 61 insertions(+), 31 deletions(-) create mode 100644 system/nixos/smartd.nix diff --git a/flake.lock b/flake.lock index 900679f..213930b 100644 --- a/flake.lock +++ b/flake.lock @@ -152,11 +152,11 @@ ] }, "locked": { - "lastModified": 1687431792, - "narHash": "sha256-ba5d/XlxQrgNrYeYhriX3FISBMVBF+nKVBMLE0/OC0Q=", + "lastModified": 1687598357, + "narHash": "sha256-70ciIe8415oQnQypawaqocEaLJcI1XtkqRNmle8vsrg=", "owner": "nix-community", "repo": "disko", - "rev": "637d87df3fd265a1d1669d897ad9436a87fc5ad8", + "rev": "1e7098ee0448dc5d33df394d040f454cd42a809c", "type": "github" }, "original": { @@ -276,11 +276,11 @@ ] }, "locked": { - "lastModified": 1687506590, - "narHash": "sha256-CSou9mrG9h/WVRjCptfTrATVxvhmtdQXElmWV/ZkrAs=", + "lastModified": 1687627695, + "narHash": "sha256-6Pu7nWb52PRtUmihwuDNShDmsZiXgtXR0OARtH4DSik=", "owner": "nix-community", "repo": "home-manager", - "rev": "d2b6f2d154bf6b27a93ed895392f80c503df7cfa", + "rev": "172d46d4b2677b32277d903bdf4cff77c2cc6477", "type": "github" }, "original": { @@ -299,11 +299,11 @@ }, "locked": { "dir": "contrib", - "lastModified": 1687473626, - "narHash": "sha256-9RacG3kFwJoxAeTcSU4DSuISk8jIO/7uarTe/M7/gZs=", + "lastModified": 1687563195, + "narHash": "sha256-eLdq2jS/CGCUe68V3K7YenGdxhP8Lf2zC9mMj8rDnB8=", "owner": "neovim", "repo": "neovim", - "rev": "3688735c2b63337ab8d8b12ac08b4e6e064e98a2", + "rev": "fa0a25dcb3a4fd2d6f03e09bcc7edac2f9ea8ded", "type": "github" }, "original": { @@ -324,11 +324,11 @@ "weewx-proxy-flake": "weewx-proxy-flake" }, "locked": { - "lastModified": 1687508546, - "narHash": "sha256-FU40rzPZcwdfXxMh8t00pdvAwFZtG38LuSC3oh0bD48=", + "lastModified": 1687594890, + "narHash": "sha256-Vf4nJWN7Vd+FOgVMhPdfACwtv8Oa+RB2WAV5tqFfBpo=", "owner": "nifoc", "repo": "nix-overlay", - "rev": "313011c66b28d90f3c35bf01fd0fa45c9602f94e", + "rev": "9ff43e8db8a409e01ee8ce9c6d764399eddb5ea1", "type": "github" }, "original": { diff --git a/home/programs/nvim/default.nix b/home/programs/nvim/default.nix index 5baa4ae..069c0b1 100644 --- a/home/programs/nvim/default.nix +++ b/home/programs/nvim/default.nix @@ -31,7 +31,7 @@ in nodePackages.dockerfile-language-server-nodejs nodePackages.svelte-language-server nodePackages.typescript-language-server - # nodePackages.vscode-langservers-extracted + nodePackages.vscode-langservers-extracted nodePackages.yaml-language-server lua-language-server taplo-lsp diff --git a/home/programs/nvim/plugins.nix b/home/programs/nvim/plugins.nix index a2ee05b..8491c2b 100644 --- a/home/programs/nvim/plugins.nix +++ b/home/programs/nvim/plugins.nix @@ -85,12 +85,12 @@ in }; leap-nvim = buildVimPluginFrom2Nix { pname = "leap.nvim"; - version = "2023-06-22"; + version = "2023-06-24"; src = fetchFromGitHub { owner = "ggandor"; repo = "leap.nvim"; - rev = "0e5a8b684b577a1d1af53499007e9b84f6323e45"; - sha256 = "14mqp0l6gwhgg6sz592cdzkrh82gv2wa6l094spyyhz6f598rz62"; + rev = "3cc0e6a0b99dc18d4e5a88baa3cbe3c7b8b34566"; + sha256 = "1d8kzcg8cnzqjn02cdsmhx0hx2hsncxg2kacnsyzlzwwrcix2kg9"; fetchSubmodules = false; }; }; @@ -107,12 +107,12 @@ in }; nvim-treesitter = buildVimPluginFrom2Nix { pname = "nvim-treesitter"; - version = "2023-06-23"; + version = "2023-06-24"; src = fetchFromGitHub { owner = "nvim-treesitter"; repo = "nvim-treesitter"; - rev = "f03db67aa400940a4e39f138a20cc9d0843528d3"; - sha256 = "0g4nkd8l7hqhhxin05pp0da39kfs5zm29bj5pb87fxvbm8zmrijc"; + rev = "68c619f2e3bbace5d2e885dbe44289dc68d776e5"; + sha256 = "118pqng7bc61f37w82c1qiq5ird4l5sk8g7bgyycclay1h14xgsi"; fetchSubmodules = false; }; }; diff --git a/home/programs/scripts/nixpkgs-switch b/home/programs/scripts/nixpkgs-switch index 93a75ec..0bbc83f 100755 --- a/home/programs/scripts/nixpkgs-switch +++ b/home/programs/scripts/nixpkgs-switch @@ -2,6 +2,7 @@ set -f nix_os (uname) set -f nix_hostname (hostname -s) +set -f other_hostname $argv[1] switch $nix_os case Darwin @@ -16,14 +17,20 @@ end pushd "$config_dir" rm -rf result -switch $nix_os - case Darwin - git pull - nom build ".#darwinConfigurations.$nix_hostname.config.system.build.toplevel" - env TERM=xterm-256color darwin-rebuild switch --flake ".#$nix_hostname" - case Linux - sudo git pull - sudo nixos-rebuild switch --flake . +if test "$other_hostname" = "" + switch $nix_os + case Darwin + git pull + nom build ".#darwinConfigurations.$nix_hostname.config.system.build.toplevel" + env TERM=xterm-256color darwin-rebuild switch --flake ".#$nix_hostname" + case Linux + sudo git pull + sudo nixos-rebuild switch --flake . + end +else + git pull + nom build --eval-store auto --store "ssh-ng://builder-$other_hostname" ".#nixosConfigurations.$other_hostname.config.system.build.toplevel" + deploy --skip-checks ".#$other_hostname" end rm -f result diff --git a/system/hosts/Styx.nix b/system/hosts/Styx.nix index cc32b68..18ce242 100644 --- a/system/hosts/Styx.nix +++ b/system/hosts/Styx.nix @@ -45,7 +45,7 @@ { hostName = "builder-tanker"; systems = [ "x86_64-linux" "aarch64-linux" ]; - maxJobs = 2; + maxJobs = 4; } { @@ -57,7 +57,7 @@ { hostName = "builder-argon"; systems = [ "aarch64-linux" ]; - maxJobs = 1; + maxJobs = 2; } ]; diff --git a/system/hosts/tanker.nix b/system/hosts/tanker.nix index 7f6a550..48b865d 100644 --- a/system/hosts/tanker.nix +++ b/system/hosts/tanker.nix @@ -12,6 +12,7 @@ in ../shared/show-update-changelog.nix ../nixos/ssh.nix ../nixos/msmtp.nix + ../nixos/smartd.nix ../nixos/git.nix diff --git a/system/nixos/msmtp.nix b/system/nixos/msmtp.nix index bad786e..6f183ef 100644 --- a/system/nixos/msmtp.nix +++ b/system/nixos/msmtp.nix @@ -1,4 +1,4 @@ -{ config, ... }: +{ pkgs, config, ... }: { programs.msmtp = { @@ -16,7 +16,7 @@ port = 465; tls_starttls = false; user = "postmaster@mg.kempkens.io"; - passwordeval = "cat ${config.age.secrets.msmtp-password.path}"; + passwordeval = "${pkgs.coreutils}/bin/cat ${config.age.secrets.msmtp-password.path}"; set_from_header = true; from = "tanker@mg.kempkens.io"; diff --git a/system/nixos/smartd.nix b/system/nixos/smartd.nix new file mode 100644 index 0000000..fe3a828 --- /dev/null +++ b/system/nixos/smartd.nix @@ -0,0 +1,22 @@ +{ + services.smartd = { + enable = true; + + autodetect = true; + + defaults.monitored = "-a -o on -s (S/../.././02|L/../../6/03)"; + + notifications = { + mail = { + enable = true; + sender = "smartd@mg.kempkens.io"; + recipient = "daniel+tanker@kempkens.io"; + }; + + wall.enable = true; + x11.enable = false; + + test = false; + }; + }; +}