Switch to nixos 23.11

This commit is contained in:
Konstantin Nazarov 2024-03-14 10:13:21 +00:00
parent 02eba1a2ae
commit 7b0b9e2bae
Signed by: knazarov
GPG key ID: 4CFE0A42FA409C22
6 changed files with 101 additions and 54 deletions

View file

@ -4,10 +4,10 @@
{ config, lib, nixpkgs, pkgs, home-manager, ... }:
let my_python = (pkgs.python3.withPackages (ps: with ps; [ git_plan ]));
let
my_python = (pkgs.python3.withPackages (ps: with ps; [ git_plan ]));
my_emacs =
(pkgs.emacsWithPackagesFromUsePackage {
my_emacs = (pkgs.emacsWithPackagesFromUsePackage {
config = ./emacs.el;
defaultInitFile = true;
package = pkgs.emacs29-pgtk.overrideAttrs (old: { withTreeSitter = true; });
@ -171,9 +171,11 @@ in {
nixfmt
my_emacs
libreoffice
gcc
#network-manager-applet
(clang-tools.override {
llvmPackages = llvmPackages_16;
llvmPackages = llvmPackages_17;
enableLibcxx = true;
}) # mainly for clang-format
# wget
my_python
@ -322,6 +324,8 @@ in {
services.keyd = {
enable = true;
keyboards = {
default = {
ids = [ "*" ];
settings = {
main = {
@ -335,6 +339,8 @@ in {
};
};
};
};
};
# Enable the OpenSSH daemon.
services.openssh = {
@ -351,6 +357,7 @@ in {
};
networking.firewall.allowedTCPPorts = [
8096
# Syncthing
8384
22000
@ -368,7 +375,7 @@ in {
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.05"; # Did you read the comment?
system.stateVersion = "23.11"; # Did you read the comment?
# needed for sway
security.polkit.enable = true;
@ -531,8 +538,7 @@ in {
"XF86MonBrightnessDown" = "exec brightnessctl s 5%-";
#"Mod4+Return" =
#"exec emacs --eval '(progn (setq confirm-kill-processes nil) (vterm))'";
"Mod4+Return" =
"exec emacsclient -c";
"Mod4+Return" = "exec emacsclient -c";
"Mod4+space" =
"exec ${pkgs.foot}/bin/foot -T mylauncher -a mylauncher ${pkgs.q-sh}/bin/q";
"Mod4+p" =

View file

@ -955,7 +955,27 @@ window, unless BACKGROUND (prefix-argument) is non-nil.
;; C/C++
(defun eldoc-short (arg)
"`eldoc' but uses the echo area by default and a prefix will swap to a buffer."
;; https://github.com/joaotavora/eglot/discussions/1328
(interactive "P")
(let (_)
(defvar eldoc-display-functions)
(setq eldoc-display-functions
(if arg '(eldoc-display-in-buffer) '(eldoc-display-in-echo-area)))
(eldoc t)))
(with-eval-after-load 'eglot
(add-hook
'eglot-managed-mode-hook
(lambda ()
;; we want eglot to setup callbacks from eldoc, but we don't want eldoc
;; running after every command. As a workaround, we disable it after we just
;; enabled it. Now calling `M-x eldoc` will put the help we want in the eldoc
;; buffer. Alternatively we could tell eglot to stay out of eldoc, and add
;; the hooks manually, but that seems fragile to updates in eglot.
;; (eldoc-mode -1)
))
(add-to-list 'eglot-server-programs
`(c++-mode . ("clangd")))
(add-to-list 'eglot-server-programs
@ -973,6 +993,7 @@ window, unless BACKGROUND (prefix-argument) is non-nil.
(add-hook 'c-mode-hook 'clang-format+-mode)
(add-hook 'c-ts-mode-hook 'clang-format+-mode)
(add-hook 'c++-mode-hook 'clang-format+-mode)
(add-hook 'c++-ts-mode-hook 'clang-format+-mode)
(setq clang-format+-context 'buffer)
;; for viewing C/C++ coverage reports

View file

@ -49,11 +49,11 @@
]
},
"locked": {
"lastModified": 1692221510,
"narHash": "sha256-arGqL5Gu7U8fnFTkaK+1dy5f/F+vk/T45gTP1MzxS7Q=",
"lastModified": 1708027330,
"narHash": "sha256-7jqtoikxzTgy68P+yRg5lGWnJit6S9LdkVM1wCDVlGc=",
"owner": "~knazarov",
"repo": "git-plan",
"rev": "9e39b2cdd29a4fdd7c43fc5f96d624c2bde11169",
"rev": "e94eee1acefbabfb8b0e9e64a6cf14f0730c5954",
"type": "sourcehut"
},
"original": {
@ -69,16 +69,16 @@
]
},
"locked": {
"lastModified": 1702195668,
"narHash": "sha256-Lxmjez0nfNBptdqV5GsXKm7Bb7swjGsrxiLxWJu0tL8=",
"lastModified": 1706981411,
"narHash": "sha256-cLbLPTL1CDmETVh4p0nQtvoF+FSEjsnJTFpTxhXywhQ=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "33110fb3c7fe6a94b98b641866a5eddb64b7c23f",
"rev": "652fda4ca6dafeb090943422c34ae9145787af37",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-23.05",
"ref": "release-23.11",
"repo": "home-manager",
"type": "github"
}
@ -105,11 +105,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1702407096,
"narHash": "sha256-9p9M0suFgxI9RHPWkIACcfcuuGB1L7Jf1QLMZOMyKaA=",
"lastModified": 1707680347,
"narHash": "sha256-x4w2tsjOxclzz3Rdfq1H4z7J3AmaRey/aoNx1vbaB1o=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "0b157469b7afebfe31e008e532c48540c78082a9",
"rev": "749d596bfb5f54543f70e80f700e044d070870a2",
"type": "github"
},
"original": {
@ -120,16 +120,16 @@
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1702221085,
"narHash": "sha256-Br3GCSkkvkmw46cT6wCz6ro2H1WgDMWbKE0qctbdtL0=",
"lastModified": 1707514827,
"narHash": "sha256-Y+wqFkvikpE1epCx57PsGw+M1hX5aY5q/xgk+ebDwxI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c2786e7084cbad90b4f9472d5b5e35ecb57958af",
"rev": "20f65b86b6485decb43c5498780c223571dd56ef",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-23.05",
"ref": "nixos-23.11",
"repo": "nixpkgs",
"type": "github"
}

View file

@ -4,8 +4,8 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs";
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-23.05";
home-manager.url = "github:nix-community/home-manager/release-23.05";
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-23.11";
home-manager.url = "github:nix-community/home-manager/release-23.11";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
emacs-overlay.url = "github:nix-community/emacs-overlay";
emacs-overlay.inputs.nixpkgs.follows = "nixpkgs";

View file

@ -25,6 +25,7 @@
};
security.pam.enableSSHAgentAuth = true;
security.pam.sshAgentAuth.enable = true;
security.sudo.wheelNeedsPassword = false;
nix.settings.trusted-users = [ "@wheel" ];
@ -94,6 +95,11 @@
forceSSL = true;
locations."/_matrix" = { proxyPass = "http://127.0.0.1:8008"; };
};
"git.knazarov.com" = {
enableACME = true;
forceSSL = true;
locations."/" = { proxyPass = "http://127.0.0.1:3000"; };
};
"turn.knazarov.com" = { enableACME = true; };
};
};
@ -103,6 +109,7 @@
"knazarov.com".email = "mail@knazarov.com";
"vmatveeva.com".email = "mail@knazarov.com";
"matrix.knazarov.com".email = "mail@knazarov.com";
"git.knazarov.com".email = "mail@knazarov.com";
"turn.knazarov.com" = {
email = "mail@knazarov.com";
postRun = "systemctl restart coturn.service";
@ -110,6 +117,19 @@
};
};
services.forgejo = {
enable = true;
settings = {
service = {
DISABLE_REGISTRATION = true;
};
server = {
ROOT_URL = "https://git.knazarov.com/";
LANDING_PAGE = "explore";
};
};
};
services.dendrite = {
enable = true;
environmentFile = config.sops.secrets.matrix_registration_secret.path;

View file

@ -1,8 +1,8 @@
hello: ENC[AES256_GCM,data:+LPt8J+Ks1m10+zZ2Q96r3K2W6Yeng7M7+c2TYDQ+/4AJl6Xc6hVnU8PKk28RA==,iv:v3B/CcFFA7kuuPcYDa5qha0ZrtskW5p443Zm8kM7xqA=,tag:r8Y9uf1dmp+VfJOHFG75PQ==,type:str]
fastmail_password: ENC[AES256_GCM,data:tHr8PqIg9DigRBu2bgjUeg==,iv:NI9bENFPuKcOt1cd2kg2DKU22J1dJ+3mK7UoceZagR4=,tag:oEgeQb1iLKisOqHi9Ds7xg==,type:str]
github_token: ENC[AES256_GCM,data:E1+wrI5VUlnsqfKNH6fY7IXqHIiagAByLYCfIfdd2+HcvniAvZzaIyKB3nma5eks3csN5A9XgYXRb09lELroW00obmIWbWZPdFhDccHRtVOqFq/r+x27O/3MAkDqID5mc8xD8SqWUibr9UZfXjFcXC4bx7+a4pyy45akz9RLIJRVKDzxMBGmZ/wQcuFS9uy2Pv2yWRL7q4olzvc/kzNFRWCLU7ThIAJSIx//NluOE8xjsA==,iv:Cdc2wwGdXprch1hHd0CwJM6vUAYmfhI4FpcKjcoIZYY=,tag:so8BJtjHGcGzayPqMwy43A==,type:str]
github_token: ENC[AES256_GCM,data:ET4zFSe1dyFum/HMlzT/0bEP/Kzr3vdp16eKZb63hBYcz0+bKmJ/NZGk4KyojPKgRfgHR3XrrJbVdFdP2QTjfX3XtVq6N7RoU4wOwjrdOgm+4JCKRqO6pWa5ieX0m1DB5NuU7hN6X6Yqwcu38dpGzBUinpcyQDmMHSby6epL,iv:IoFHQ6sC9ZxvOIckkoF5Wnn4+VvCHapwNduCBlELzrU=,tag:gfF24P2JUWUhEIxt3Np3MQ==,type:str]
mullvad_account: ENC[AES256_GCM,data:CO4wl2vNAMEC9oy37nIrpw==,iv:a3w64u8XQ/tihIDxIPPtdZ6F7dldLPvRzGUs1MpVe4M=,tag:HQxJVuGEvI0fVj8yGptbdA==,type:str]
git_plan_config: ENC[AES256_GCM,data:YNsxnIWgH90fHTKVTPjb9xTJH/d/CCKrX4BPIipWM/YmOc3T6mxmqjqSoXDgOS5Y0jaCW8t6DsLaZjxfYdkyCDyyi+zM7rQUzDj4rMkvgvsvWs+lLjgY/dFWswh9gG3cdQdGdoX3uXkDV6pkFqbO3pbQzrf4EwCdi8ApvroSYhQlKKn5kZcQclBzI4EuYUWsWrluNoWPZSz5X64CaqxZLhMj1wWTwD4vmBJ5Ck2aDEjYpKcdZHSmeeB2w5sHO1YUN4TF4FHOde9ac5X/7o2Lo6743LeKOnaUUB1NQBvY9afMnXDSARjjrpzGLXSdh5PA8zpV+vVE7a3h8QsUkwLtAD6ByX3lNord7ntrh14IBsYN6R68gUjztEAGLvAZmL/c9qD4+nFmyeaapCCUnt67Ku8LmqzDH8kLwNVyVYOP86V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LGa6e9coCNu8vSuqUgfv0jFET71bNw28xPrN38A/PIlUcR9MXe1SGqKAFxEv134ZkJr78g1PIWNoVDrmIlMpV6dYRLKM1FOcpAhJorIXooIl6quCdg2/U5onP8cQ7lt2LsEG5APKj7pz7huatdwM/CgxrcqPVb0E2Lk5c+wi3Rf9/Jz3BqcWQm3bwkHwivWyCD1Nw+qRXLFSfXGTovSBsxX0j4LbdP0o4iPuj068DGawpYC/AfcKfOCmh8aInQhGCQtIq14QGffU9GbW37gHu,iv:ZzOUYu3s+kfwbKajA+6fdu2EysipjoKD49muLNFBZ58=,tag:e0RI7rA8eLQI8h5L4pvS1A==,type:str]
sops:
kms: []
@ -28,8 +28,8 @@ sops:
U3loV2xDMkM5SWNXRDJobDloL0FVUUkK3OP7KvcKkE8mJ880dm6LMFZUxELjl8/P
6+q8qAYiAvl0Cbd4GzkNpUuBbLlFFWfFmC0vbgg8gyZ6xI5AFhHAPw==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2023-11-13T13:07:42Z"
mac: ENC[AES256_GCM,data:LFcc9sGsh2m7VQRFgkyF7YcEBuf1wijw7UNRcMp5AEXHuczKWCUHE2SpubhORLK14dImB6+VoLFPwlztkEBvBY9rlFffCEwNUJ+GKwTJCVjHI10TXyEb9ivT3RlqSKR3YZIl/E8qPrF0iGNPLcG9HbvwL75fyh85JunZWoDtqpI=,iv:6XytyOIUhQE6Vcn+AaQUTR0wZIPM13o2SBT/K5WOC0I=,tag:YwvwsSqzQVrEtQxPzWC6tg==,type:str]
lastmodified: "2024-01-10T11:00:59Z"
mac: ENC[AES256_GCM,data:Y5AeyLjTDWIG4ZgB5dfOAJsyttZ3//B1Y7zFOgRwCPDSYTzNAJaOayI2d9iLFbKRT4lMDd3/u8esBrFyM50IhCQkuY7yWfjvuvyfEFE/3nF3X+Fgao4T9RlTF5YqH1JZg3MC785MLYo8jZteQ2l1iuXXZI94A+bMg9dctliCySs=,iv:nYk2AJVBA1eB1/2isklkQOcg1eQbWtSxS1kg7fVBPBY=,tag:1wNpL33fvVvQh0UKTDmUWg==,type:str]
pgp:
- created_at: "2023-06-10T01:03:11Z"
enc: |-