update to NixOS 24.05
This commit is contained in:
parent
090fc917fb
commit
7c77904a34
@ -22,6 +22,10 @@
|
||||
# 2. Matrix Synapse migration (https://matrix-org.github.io/synapse/latest/upgrade.html)
|
||||
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.tmp.useTmpfs = true;
|
||||
|
@ -10,6 +10,9 @@
|
||||
|
||||
# Safely handle secrets
|
||||
./modules/secrets-store.nix
|
||||
|
||||
# Pin Nixpkgs
|
||||
./modules/nixpkgs.nix
|
||||
];
|
||||
|
||||
}
|
||||
|
39
custom/modules/nixpkgs.nix
Normal file
39
custom/modules/nixpkgs.nix
Normal 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";
|
||||
};
|
||||
|
||||
}
|
@ -3,8 +3,8 @@
|
||||
{
|
||||
imports = [
|
||||
(builtins.fetchTarball {
|
||||
url = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/nixos-23.05/nixos-mailserver-nixos-23.05.tar.gz";
|
||||
sha256 = "1ngil2shzkf61qxiqw11awyl81cr7ks2kv3r3k243zz7v2xakm5c";
|
||||
url = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/nixos-24.05/nixos-mailserver-nixos-24.05.tar.gz";
|
||||
sha256 = "0clvw4622mqzk1aqw1qn6shl9pai097q62mq1ibzscnjayhp278b";
|
||||
})
|
||||
];
|
||||
|
||||
|
1
jobs.nix
1
jobs.nix
@ -17,6 +17,7 @@ with lib;
|
||||
|
||||
systemd.services.ydns = {
|
||||
description = "update ydns address record";
|
||||
wants = [ "network-online.target" ];
|
||||
after = [ "network-online.target" ];
|
||||
startAt = "*:0/30";
|
||||
|
||||
|
@ -19,9 +19,9 @@ let
|
||||
nix-queries fortran-queries
|
||||
(nvim-treesitter.withPlugins (p: with p;
|
||||
[ bash fish
|
||||
fortran haskell
|
||||
c haskell
|
||||
html css markdown
|
||||
nix python
|
||||
nix python lua
|
||||
]))
|
||||
|
||||
# Misc
|
||||
@ -140,6 +140,7 @@ let
|
||||
opt.foldmethod = "expr" -- Folding
|
||||
opt.foldexpr = 'nvim_treesitter#foldexpr()' --
|
||||
opt.foldlevel = 99 -- open by default
|
||||
opt.foldopen:remove("search") -- don't open when searching
|
||||
|
||||
--
|
||||
-- OSC 52 clipboard
|
||||
|
@ -8,6 +8,12 @@
|
||||
roomId = "!FsUSHSNMPMVTFFcvJo:maxwell.ydns.eu";
|
||||
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; [
|
||||
|
Loading…
Reference in New Issue
Block a user