diff --git a/NixOS.md b/NixOS.md index b3690f9..077f48c 100644 --- a/NixOS.md +++ b/NixOS.md @@ -34,6 +34,29 @@ This document contains general notes about NixOS that are independent of my NixO * There is controversy about flakes, rather use channels (e.g. with niv) * Prins, P., Suresh, J. and Dolstra, E., "Nix fixes dependency hell on all Linux distributions," [Archived](https://web.archive.org/web/20081226010942/http://www.linux.com/feature/155922) December 26, 2008, at the Wayback Machine linux.com, December 22, 2008 +## Upgrade from 23.05 to 23.11 + +* https://discourse.nixos.org/t/nixos-23-11-released/36210 + +Change the tracking branch of nixpkgs from 23.05 to 23.11: + +```shell +niv modify nixpkgs --branch nixos-23.11 +niv modify home-manager --branch release-23.11 +``` + +Update `home.stateVersion` to `home.stateVersion = "23.11";` in order to match the NixOS channel. + +Read the release notes. GNOME 45: Notably, Loupe has replaced Eye of GNOME as the default image viewer, Snapshot has replaced Cheese as the default camera application, and Photos will no longer be installed. + +Updating with nixos-rebuild boot and rebooting is recommended. + +```shell +niv update && colmena build --on yodaTux -v --show-trace && colmena apply-local --sudo boot +``` + +TODO: Update yodaHedgehog and yodaYoga with `boot` (!) + ## niv: Dependency management * https://nix.dev/tutorials/first-steps/towards-reproducibility-pinning-nixpkgs#dependency-management-with-niv diff --git a/hosts/pi3bplus/configuration.nix b/hosts/pi3bplus/configuration.nix index c7ea3e8..a5e0452 100644 --- a/hosts/pi3bplus/configuration.nix +++ b/hosts/pi3bplus/configuration.nix @@ -67,11 +67,6 @@ # accidentally delete configuration.nix. # system.copySystemConfiguration = true; - # This value determines the NixOS release from which the default - # settings for stateful data, like file locations and database versions - # on your system were taken. It's perfectly fine and recommended to leave - # 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? + # Most users should never change this value after the initial install, for any reason, even if you’ve upgraded your system to a new NixOS release. + system.stateVersion = "23.11"; } diff --git a/hosts/yodaHedgehog/configuration.nix b/hosts/yodaHedgehog/configuration.nix index a26d453..cb04088 100644 --- a/hosts/yodaHedgehog/configuration.nix +++ b/hosts/yodaHedgehog/configuration.nix @@ -45,4 +45,7 @@ boot.kernelParams = []; boot.kernelPackages = pkgs.linuxPackages; + + # Most users should never change this value after the initial install, for any reason, even if you’ve upgraded your system to a new NixOS release. + system.stateVersion = "23.05"; } diff --git a/hosts/yodaNas/configuration.nix b/hosts/yodaNas/configuration.nix index ebf25a3..66f1ae4 100644 --- a/hosts/yodaNas/configuration.nix +++ b/hosts/yodaNas/configuration.nix @@ -54,4 +54,7 @@ "mds=full,nosmt" ]; boot.kernelPackages = pkgs.linuxPackages; + + # Most users should never change this value after the initial install, for any reason, even if you’ve upgraded your system to a new NixOS release. + system.stateVersion = "23.05"; } diff --git a/hosts/yodaTab/configuration.nix b/hosts/yodaTab/configuration.nix index f348b64..b23e836 100644 --- a/hosts/yodaTab/configuration.nix +++ b/hosts/yodaTab/configuration.nix @@ -54,4 +54,7 @@ boot.kernelParams = []; boot.kernelPackages = pkgs.linuxPackages_latest; + + # Most users should never change this value after the initial install, for any reason, even if you’ve upgraded your system to a new NixOS release. + system.stateVersion = "23.05"; } diff --git a/hosts/yodaTux/configuration.nix b/hosts/yodaTux/configuration.nix index f18aba2..a629824 100644 --- a/hosts/yodaTux/configuration.nix +++ b/hosts/yodaTux/configuration.nix @@ -75,4 +75,7 @@ # Free/Libre. # https://en.wikipedia.org/wiki/Linux-libre #boot.kernelPackages = pkgs.linuxPackages-libre; + + # Most users should never change this value after the initial install, for any reason, even if you’ve upgraded your system to a new NixOS release. + system.stateVersion = "23.05"; } diff --git a/hosts/yodaYoga/configuration.nix b/hosts/yodaYoga/configuration.nix index 69725cc..0c0ffaa 100644 --- a/hosts/yodaYoga/configuration.nix +++ b/hosts/yodaYoga/configuration.nix @@ -32,4 +32,7 @@ "mds=full,nosmt" ]; boot.kernelPackages = pkgs.linuxPackages; + + # Most users should never change this value after the initial install, for any reason, even if you’ve upgraded your system to a new NixOS release. + system.stateVersion = "23.05"; } diff --git a/iso-aarch64.nix b/iso-aarch64.nix index 25c8550..b433f62 100644 --- a/iso-aarch64.nix +++ b/iso-aarch64.nix @@ -38,5 +38,5 @@ (builtins.readFile ./assets/ssh/nitrokey.pub) ]; hardware.enableRedistributableFirmware = true; - system.stateVersion = "23.05"; + system.stateVersion = "23.11"; } diff --git a/modules/base.nix b/modules/base.nix index f6305e5..8f9f6df 100644 --- a/modules/base.nix +++ b/modules/base.nix @@ -93,12 +93,4 @@ # https://nixos.wiki/wiki/Firewall # -> Firewall rules may be overwritten by docker, as per https://github.com/NixOS/nixpkgs/issues/111852 networking.firewall.enable = true; - - # This value determines the NixOS release from which the default - # settings for stateful data, like file locations and database versions - # on your system were taken. It's perfectly fine and recommended to leave - # 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? } diff --git a/modules/freetube.nix b/modules/freetube.nix index 97130e0..f1971e1 100644 --- a/modules/freetube.nix +++ b/modules/freetube.nix @@ -1,12 +1,8 @@ { config, pkgs, lib, ... }: { - # TODO: We use unstable until Electron is upgraded to higher than 22, e.g. to 27 - # permalink: https://github.com/NixOS/nixpkgs/blob/60b9db998f71ea49e1a9c41824d09aa274be1344/pkgs/applications/video/freetube/default.nix#L1 - # current master: https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/video/freetube/default.nix#L1 - users.users.yoda = { packages = with pkgs; [ - unstable.freetube # YouTube client. + freetube # YouTube client. ]; }; diff --git a/modules/home-manager.nix b/modules/home-manager.nix index 88c391d..209eae0 100644 --- a/modules/home-manager.nix +++ b/modules/home-manager.nix @@ -20,13 +20,13 @@ in home-manager.useGlobalPkgs = true; home-manager.users.yoda = { osConfig, config, pkgs, ... }: { - /* The home.stateVersion option does not have a default and must be set */ - /* https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion */ - home.stateVersion = "23.05"; + # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion + # Switching to a higher state version typically requires performing some manual steps, such as data conversion or moving files. + home.stateVersion = "23.11"; }; home-manager.users.root = { osConfig, config, pkgs, ... }: { - /* The home.stateVersion option does not have a default and must be set */ - /* https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion */ - home.stateVersion = "23.05"; + # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion + # Switching to a higher state version typically requires performing some manual steps, such as data conversion or moving files. + home.stateVersion = "23.11"; }; } diff --git a/modules/joplin-desktop.nix b/modules/joplin-desktop.nix index c27695f..ed99258 100644 --- a/modules/joplin-desktop.nix +++ b/modules/joplin-desktop.nix @@ -1,17 +1,10 @@ { config, pkgs, lib, ...}: { - # TODO: Similar to signal-desktop, joplin-desktop crashes frequently on Wayland. - # As of 2023-10-20, the stable version did not start, but unstable does. - environment.sessionVariables.NIXOS_OZONE_WL = lib.mkIf (config.services.xserver.displayManager.gdm.wayland) "1"; users.users.yoda = { packages = with pkgs; [ - ( - if (config.services.xserver.displayManager.gdm.wayland) - then unstable.joplin-desktop # Markdown notes - else joplin-desktop # Markdown notes - ) + joplin-desktop # Markdown notes ]; }; } diff --git a/modules/obsidian.nix b/modules/obsidian.nix index 4f17a4c..2857da5 100644 --- a/modules/obsidian.nix +++ b/modules/obsidian.nix @@ -4,9 +4,9 @@ "obsidian" ]; - # TODO: Disallow insecure Electron version electron-24.8.6. + # TODO: Disallow insecure Electron version. nixpkgs.config.permittedInsecurePackages = [ - "electron-24.8.6" + "electron-25.9.0" ]; users.users.yoda = { diff --git a/modules/pmbootstrap.nix b/modules/pmbootstrap.nix index c634012..0b07ceb 100644 --- a/modules/pmbootstrap.nix +++ b/modules/pmbootstrap.nix @@ -2,10 +2,7 @@ { users.users.yoda = { packages = with pkgs; [ - # As I got the error below, I switched to the unstable version: - # You are using pmbootstrap version 1.50.1, but version 1.53.0 is required. - # Please update your pmbootstrap version (with your distribution's package manager). - unstable.pmbootstrap + pmbootstrap ]; }; diff --git a/modules/signal-desktop.nix b/modules/signal-desktop.nix index 9eddb5a..845d116 100644 --- a/modules/signal-desktop.nix +++ b/modules/signal-desktop.nix @@ -5,11 +5,6 @@ signal-desktop-beta # Signal client ]; }; -# users.users.yoda = { -# packages = with pkgs.unstable; [ -# signal-desktop-beta # Signal client -# ]; -# }; # TODO: lib.mkIf (config.services.xserver.displayManager.gdm.wayland) @@ -44,16 +39,4 @@ }); }) ]; -# nixpkgs.overlays = lib.mkIf (config.services.xserver.displayManager.gdm.wayland) [ -# (self: super: { -# unstable.signal-desktop-beta = super.unstable.signal-desktop-beta.overrideAttrs (old: { -# preFixup = old.preFixup + '' -# gappsWrapperArgs+=( -# --add-flags "--enable-features=UseOzonePlatform" -# --add-flags "--ozone-platform=wayland" -# ) -# ''; -# }); -# }) -# ]; }