From 1e9eabe6af0247c67d464f5adbe164298e53d380 Mon Sep 17 00:00:00 2001 From: Paul-Henri Froidmont Date: Sat, 10 Jun 2023 09:50:14 +0200 Subject: [PATCH] Update to NixOS 23.05 --- common.nix | 16 ++- flake.lock | 126 +++++++++++------- flake.nix | 4 +- .../nixos-desktop/hardware-configuration.nix | 1 - modules/desktop/xmonad/xmonad.nix | 20 +-- modules/desktop/zsh.nix | 100 +++++++------- modules/security.nix | 4 +- 7 files changed, 154 insertions(+), 117 deletions(-) diff --git a/common.nix b/common.nix index 8f3c5e8..0376455 100644 --- a/common.nix +++ b/common.nix @@ -25,11 +25,21 @@ with lib.my; { system.configurationRevision = with inputs; mkIf (self ? rev) self.rev; - time.timeZone = lib.mkDefault "Europe/Amsterdam"; + time.timeZone = mkDefault "Europe/Amsterdam"; - i18n.defaultLocale = lib.mkDefault "en_US.UTF-8"; + i18n.defaultLocale = mkDefault "en_US.UTF-8"; - console = { keyMap = lib.mkDefault "fr"; }; + console = { + keyMap = lib.mkDefault "fr"; + font = mkDefault "${pkgs.terminus_font}/share/consolefonts/ter-v32n.psf.gz"; + earlySetup = true; + }; + + fonts.fontconfig.antialias = mkDefault true; + fonts.fontconfig.subpixel = { + rgba = mkDefault "none"; + lcdfilter = mkDefault "none"; + }; environment.systemPackages = with pkgs; [ git diff --git a/flake.lock b/flake.lock index da04ba2..a6f74a4 100644 --- a/flake.lock +++ b/flake.lock @@ -36,14 +36,15 @@ "emacs-overlay": { "inputs": { "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs", + "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1684348799, - "narHash": "sha256-K/2G+BnHK3JdGnT/qkYWGljgy5kUeCZDSnBz4cLqb+c=", + "lastModified": 1686362938, + "narHash": "sha256-ssO8XGORwqOD6TI56a7Ay0lDR8t44s1fVwF1Up83IUQ=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "95c844b1985808df780acc1835a354fe3ff27282", + "rev": "82a84e07b068909ea8423dd4f7689d4366f03494", "type": "github" }, "original": { @@ -85,6 +86,22 @@ "type": "github" } }, + "evil-collection": { + "flake": false, + "locked": { + "lastModified": 1685464774, + "narHash": "sha256-b/MIqjQTRLcIJ+t9NLX0HL1ee2rxp/C5Uq702kxmVkE=", + "owner": "emacs-evil", + "repo": "evil-collection", + "rev": "4cc676efa2ee18a1e95f1572734cb084e5b76646", + "type": "github" + }, + "original": { + "owner": "emacs-evil", + "repo": "evil-collection", + "type": "github" + } + }, "evil-escape": { "flake": false, "locked": { @@ -182,12 +199,15 @@ } }, "flake-utils": { + "inputs": { + "systems": "systems" + }, "locked": { - "lastModified": 1667395993, - "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", + "lastModified": 1685518550, + "narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=", "owner": "numtide", "repo": "flake-utils", - "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", + "rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef", "type": "github" }, "original": { @@ -198,7 +218,7 @@ }, "flake-utils_2": { "inputs": { - "systems": "systems" + "systems": "systems_2" }, "locked": { "lastModified": 1681202837, @@ -234,11 +254,11 @@ "gruvbox-gtk-theme": { "flake": false, "locked": { - "lastModified": 1676919051, - "narHash": "sha256-xcTI0rLZE7Yzt/9lljotzMDfiacZp1Jj41aLCzJKJko=", + "lastModified": 1685300773, + "narHash": "sha256-Y+6HuWaVkNqlYc+w5wLkS2LpKcDtpeOpdHnqBmShm5Q=", "owner": "Fausto-Korpsvart", "repo": "Gruvbox-GTK-Theme", - "rev": "44e81d8226579a24a791f3acf43b97de815bc4b1", + "rev": "c0b7fb501938241a3b6b5734f8cb1f0982edc6b4", "type": "github" }, "original": { @@ -267,20 +287,19 @@ "inputs": { "nixpkgs": [ "nixpkgs" - ], - "utils": "utils" + ] }, "locked": { - "lastModified": 1681092193, - "narHash": "sha256-JerCqqOqbT2tBnXQW4EqwFl0hHnuZp21rIQ6lu/N4rI=", + "lastModified": 1685599623, + "narHash": "sha256-Tob4CMOVHue0D3RzguDBCtUmX5ji2PsdbQDbIOIKvsc=", "owner": "nix-community", "repo": "home-manager", - "rev": "f9edbedaf015013eb35f8caacbe0c9666bbc16af", + "rev": "93db05480c0c0f30382d3e80779e8386dcb4f9dd", "type": "github" }, "original": { "owner": "nix-community", - "ref": "release-22.11", + "ref": "release-23.05", "repo": "home-manager", "type": "github" } @@ -291,6 +310,7 @@ "doom-snippets": "doom-snippets", "emacs-overlay": "emacs-overlay_2", "emacs-so-long": "emacs-so-long", + "evil-collection": "evil-collection", "evil-escape": "evil-escape", "evil-markdown": "evil-markdown", "evil-org-mode": "evil-org-mode", @@ -314,11 +334,11 @@ "ws-butler": "ws-butler" }, "locked": { - "lastModified": 1683249650, - "narHash": "sha256-NwBzz2CHNtT0oDqAGewByQ5OFnAWf+ewHUrK0F44xZk=", + "lastModified": 1686183018, + "narHash": "sha256-SSrHWJEziOrZvTW2RkGSVAgHbFL61JIBTWQxlT+x2X0=", "owner": "nix-community", "repo": "nix-doom-emacs", - "rev": "588ccf37fa9eb9d2ec787b91c989dcd6892983e9", + "rev": "6458f9045e1a722b267f9528675e8be0274665b3", "type": "github" }, "original": { @@ -345,11 +365,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1673540789, - "narHash": "sha256-xqnxBOK3qctIeUVxecydrEDbEXjsvHCPGPbvsl63M/U=", + "lastModified": 1686226982, + "narHash": "sha256-nLuiPoeiVfqqzeq9rmXxpybh77VS37dsY/k8N2LoxVg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "0f213d0fee84280d8c3a97f7469b988d6fe5fcdf", + "rev": "a64b73e07d4aa65cfcbda29ecf78eaf9e72e44bd", "type": "github" }, "original": { @@ -359,13 +379,29 @@ "type": "github" } }, + "nixpkgs-stable": { + "locked": { + "lastModified": 1686237827, + "narHash": "sha256-fAZB+Zkcmc+qlauiFnIH9+2qgwM0NO/ru5pWEw3tDow=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "81ed90058a851eb73be835c770e062c6938c8a9e", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-23.05", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs-unstable": { "locked": { - "lastModified": 1684215771, - "narHash": "sha256-fsum28z+g18yreNa1Y7MPo9dtps5h1VkHfZbYQ+YPbk=", + "lastModified": 1686226982, + "narHash": "sha256-nLuiPoeiVfqqzeq9rmXxpybh77VS37dsY/k8N2LoxVg=", "owner": "nixos", "repo": "nixpkgs", - "rev": "963006aab35e3e8ebbf6052b6bf4ea712fdd3c28", + "rev": "a64b73e07d4aa65cfcbda29ecf78eaf9e72e44bd", "type": "github" }, "original": { @@ -392,16 +428,16 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1684171562, - "narHash": "sha256-BMUWjVWAUdyMWKk0ATMC9H0Bv4qAV/TXwwPUvTiC5IQ=", + "lastModified": 1686237827, + "narHash": "sha256-fAZB+Zkcmc+qlauiFnIH9+2qgwM0NO/ru5pWEw3tDow=", "owner": "nixos", "repo": "nixpkgs", - "rev": "55af203d468a6f5032a519cba4f41acf5a74b638", + "rev": "81ed90058a851eb73be835c770e062c6938c8a9e", "type": "github" }, "original": { "owner": "nixos", - "ref": "nixos-22.11", + "ref": "nixos-23.05", "repo": "nixpkgs", "type": "github" } @@ -576,6 +612,21 @@ "type": "github" } }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "ts-fold": { "flake": false, "locked": { @@ -592,21 +643,6 @@ "type": "github" } }, - "utils": { - "locked": { - "lastModified": 1667395993, - "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "ws-butler": { "flake": false, "locked": { diff --git a/flake.nix b/flake.nix index 703e7ee..05376a1 100644 --- a/flake.nix +++ b/flake.nix @@ -1,9 +1,9 @@ { inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-22.11"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; home-manager = { - url = "github:nix-community/home-manager/release-22.11"; + url = "github:nix-community/home-manager/release-23.05"; inputs.nixpkgs.follows = "nixpkgs"; }; emacs-overlay.url = "github:nix-community/emacs-overlay"; diff --git a/hosts/nixos-desktop/hardware-configuration.nix b/hosts/nixos-desktop/hardware-configuration.nix index ee3f7ec..2916c26 100644 --- a/hosts/nixos-desktop/hardware-configuration.nix +++ b/hosts/nixos-desktop/hardware-configuration.nix @@ -53,7 +53,6 @@ hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; - hardware.video.hidpi.enable = lib.mkDefault true; services.resolved.dnssec = "false"; } diff --git a/modules/desktop/xmonad/xmonad.nix b/modules/desktop/xmonad/xmonad.nix index be092af..8d16519 100644 --- a/modules/desktop/xmonad/xmonad.nix +++ b/modules/desktop/xmonad/xmonad.nix @@ -31,16 +31,16 @@ in { displayManager.lightdm = { enable = true; background = ../wallpaper.png; - greeters.mini = { - enable = true; - user = config.user.name; - extraConfig = '' - text-color = "#fbf1c7" - password-background-color = "#3c3836" - window-color = "#282828" - border-color = "#458588" - ''; - }; + #greeters.mini = { + # enable = true; + # user = config.user.name; + # extraConfig = '' + # text-color = "#fbf1c7" + # password-background-color = "#3c3836" + # window-color = "#282828" + # border-color = "#458588" + # ''; + #}; }; }; diff --git a/modules/desktop/zsh.nix b/modules/desktop/zsh.nix index a2d7866..a81c5af 100644 --- a/modules/desktop/zsh.nix +++ b/modules/desktop/zsh.nix @@ -4,68 +4,60 @@ with lib; with lib.my; let cfg = config.modules.desktop.zsh; in { - options.modules.desktop.zsh = { - enable = mkBoolOpt false; - }; + options.modules.desktop.zsh = { enable = mkBoolOpt false; }; config = mkIf cfg.enable { environment.pathsToLink = [ "/share/zsh" ]; + programs.zsh.enable = true; - users.users.${config.user.name} = { - shell = pkgs.zsh; - }; + users.users.${config.user.name} = { shell = pkgs.zsh; }; home-manager.users.${config.user.name} = { - programs.zsh = - { - enable = true; - history = { - save = 50000; - size = 50000; - }; - enableCompletion = true; - enableAutosuggestions = true; - enableSyntaxHighlighting = true; - initExtra = '' - source ${./p10k.zsh} - autoload -Uz up-line-or-beginning-search down-line-or-beginning-search - zle -N up-line-or-beginning-search - zle -N down-line-or-beginning-search - - [[ -n "$key[Up]" ]] && bindkey -- "$key[Up]" up-line-or-beginning-search - [[ -n "$key[Down]" ]] && bindkey -- "$key[Down]" down-line-or-beginning-search - - eval $(${pkgs.thefuck}/bin/thefuck --alias) - ''; - oh-my-zsh = { - enable = true; - plugins = [ - "git" - "terraform" - "systemd" - ]; - }; - plugins = [ - { - name = "powerlevel10k"; - src = pkgs.zsh-powerlevel10k; - file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme"; - } - { - name = "powerlevel10k-config"; - src = ./p10k.zsh; - } - { - name = "nix-zsh-completions"; - src = pkgs.nix-zsh-completions; - } - { - name = "zsh-completions"; - src = pkgs.zsh-completions; - } - ]; + programs.zsh = { + enable = true; + history = { + save = 50000; + size = 50000; }; + enableCompletion = true; + enableAutosuggestions = true; + enableSyntaxHighlighting = true; + initExtra = '' + source ${./p10k.zsh} + autoload -Uz up-line-or-beginning-search down-line-or-beginning-search + zle -N up-line-or-beginning-search + zle -N down-line-or-beginning-search + + [[ -n "$key[Up]" ]] && bindkey -- "$key[Up]" up-line-or-beginning-search + [[ -n "$key[Down]" ]] && bindkey -- "$key[Down]" down-line-or-beginning-search + + eval $(${pkgs.thefuck}/bin/thefuck --alias) + ''; + oh-my-zsh = { + enable = true; + plugins = [ "git" "terraform" "systemd" ]; + }; + plugins = [ + { + name = "powerlevel10k"; + src = pkgs.zsh-powerlevel10k; + file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme"; + } + { + name = "powerlevel10k-config"; + src = ./p10k.zsh; + } + { + name = "nix-zsh-completions"; + src = pkgs.nix-zsh-completions; + } + { + name = "zsh-completions"; + src = pkgs.zsh-completions; + } + ]; + }; }; }; } diff --git a/modules/security.nix b/modules/security.nix index f303258..8752d64 100644 --- a/modules/security.nix +++ b/modules/security.nix @@ -11,10 +11,10 @@ # tmpfs = /tmp is mounted in ram. Doing so makes temp file management speedy # on ssd systems, and volatile! Because it's wiped on reboot. - boot.tmpOnTmpfs = lib.mkDefault true; + boot.tmp.useTmpfs = lib.mkDefault true; # If not using tmpfs, which is naturally purged on reboot, we must clean it # /tmp ourselves. /tmp should be volatile storage! - boot.cleanTmpDir = lib.mkDefault (!config.boot.tmpOnTmpfs); + boot.tmp.cleanOnBoot = lib.mkDefault (!config.boot.tmpOnTmpfs); # Fix a security hole in place for backwards compatibility. See desc in # nixpkgs/nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix