update to NixOS 24.05

This commit is contained in:
Michele Guerini Rocco 2024-06-30 22:41:18 +02:00
parent 090fc917fb
commit 7c77904a34
Signed by: rnhmjoj
GPG Key ID: BFBAF4C975F76450
7 changed files with 58 additions and 4 deletions

View File

@ -22,6 +22,10 @@
# 2. Matrix Synapse migration (https://matrix-org.github.io/synapse/latest/upgrade.html) # 2. Matrix Synapse migration (https://matrix-org.github.io/synapse/latest/upgrade.html)
system.stateVersion = "23.05"; system.stateVersion = "23.05";
nixpkgs.source = builtins.fetchTarball
{ url = "https://github.com/NixOS/nixpkgs/archive/66c7fa70cd1a.tar.gz";
sha256 = "12a69mm612h2yxqkmak06km38hnxijnj6n76lrcl235j8c8zf8y0";
};
boot.kernelPackages = pkgs.linuxPackages_latest; boot.kernelPackages = pkgs.linuxPackages_latest;
boot.tmp.useTmpfs = true; boot.tmp.useTmpfs = true;

View File

@ -10,6 +10,9 @@
# Safely handle secrets # Safely handle secrets
./modules/secrets-store.nix ./modules/secrets-store.nix
# Pin Nixpkgs
./modules/nixpkgs.nix
]; ];
} }

View File

@ -0,0 +1,39 @@
{ config, lib, ... }:
let
nixpkgs = config.nixpkgs.source;
conf = "${toString ../..}/configuration.nix";
rebuild = self: super:
{ nixos-rebuild = super.nixos-rebuild.overrideAttrs (old:
{ postInstall = old.postInstall +
''
sed -i "$target" \
-e '/^export PATH/ a \
export NIX_PATH="nixpkgs=${nixpkgs}:nixos-config=${conf}"' \
-e 's/remoteSudo=/remoteSudo=1/' \
-e 's/-A system/-A system --no-out-link/'
'';
});
};
in
{
options.nixpkgs.source = lib.mkOption
{ type = lib.types.path;
description = "Nixpkgs sources";
};
config =
{ nixpkgs.pkgs = import nixpkgs { overlays = [ rebuild ]; };
nix.nixPath =
[ "nixpkgs=/run/current-system/nixpkgs"
"nixos-config=${conf}"
];
system.extraSystemBuilderCmds = "ln -s ${nixpkgs} $out/nixpkgs";
};
}

View File

@ -3,8 +3,8 @@
{ {
imports = [ imports = [
(builtins.fetchTarball { (builtins.fetchTarball {
url = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/nixos-23.05/nixos-mailserver-nixos-23.05.tar.gz"; url = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/nixos-24.05/nixos-mailserver-nixos-24.05.tar.gz";
sha256 = "1ngil2shzkf61qxiqw11awyl81cr7ks2kv3r3k243zz7v2xakm5c"; sha256 = "0clvw4622mqzk1aqw1qn6shl9pai097q62mq1ibzscnjayhp278b";
}) })
]; ];

View File

@ -17,6 +17,7 @@ with lib;
systemd.services.ydns = { systemd.services.ydns = {
description = "update ydns address record"; description = "update ydns address record";
wants = [ "network-online.target" ];
after = [ "network-online.target" ]; after = [ "network-online.target" ];
startAt = "*:0/30"; startAt = "*:0/30";

View File

@ -19,9 +19,9 @@ let
nix-queries fortran-queries nix-queries fortran-queries
(nvim-treesitter.withPlugins (p: with p; (nvim-treesitter.withPlugins (p: with p;
[ bash fish [ bash fish
fortran haskell c haskell
html css markdown html css markdown
nix python nix python lua
])) ]))
# Misc # Misc
@ -140,6 +140,7 @@ let
opt.foldmethod = "expr" -- Folding opt.foldmethod = "expr" -- Folding
opt.foldexpr = 'nvim_treesitter#foldexpr()' -- opt.foldexpr = 'nvim_treesitter#foldexpr()' --
opt.foldlevel = 99 -- open by default opt.foldlevel = 99 -- open by default
opt.foldopen:remove("search") -- don't open when searching
-- --
-- OSC 52 clipboard -- OSC 52 clipboard

View File

@ -8,6 +8,12 @@
roomId = "!FsUSHSNMPMVTFFcvJo:maxwell.ydns.eu"; roomId = "!FsUSHSNMPMVTFFcvJo:maxwell.ydns.eu";
authToken = config.secrets.passwords.matrix; authToken = config.secrets.passwords.matrix;
}; };
haskellPackages = super.haskellPackages.extend (hself: hsuper:
{ breve = hself.callCabal2nix "breve" (builtins.fetchTarball
{ url = "https://hackage.haskell.org/package/breve-0.5.1.0/breve-0.5.1.0.tar.gz";
}) {};
});
}); });
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [