From 90bbc2a03c184ed67d4701c7104b148993f2de12 Mon Sep 17 00:00:00 2001 From: Filippo Berto Date: Mon, 2 Dec 2024 12:03:30 +0100 Subject: [PATCH] WIP: upgrade to 24.11 --- flake.lock | 16 +++--- flake.nix | 66 ++++++++++++++----------- instances/baldur/configuration.nix | 16 ------ instances/freya/configuration.nix | 18 ------- instances/heimdall/configuration.nix | 24 +-------- instances/loki/configuration.nix | 31 ------------ instances/odin/common_configuration.nix | 18 ------- instances/sif/configuration.nix | 18 ------- instances/thor/configuration.nix | 17 ------- modules/nixos/users/bertof.nix | 13 +++-- 10 files changed, 56 insertions(+), 181 deletions(-) diff --git a/flake.lock b/flake.lock index 99a55d1..6e9e480 100644 --- a/flake.lock +++ b/flake.lock @@ -298,16 +298,16 @@ ] }, "locked": { - "lastModified": 1726989464, - "narHash": "sha256-Vl+WVTJwutXkimwGprnEtXc/s/s8sMuXzqXaspIGlwM=", + "lastModified": 1733050161, + "narHash": "sha256-lYnT+EYE47f5yY3KS/Kd4pJ6CO9fhCqumkYYkQ3TK20=", "owner": "nix-community", "repo": "home-manager", - "rev": "2f23fa308a7c067e52dfcc30a0758f47043ec176", + "rev": "62d536255879be574ebfe9b87c4ac194febf47c5", "type": "github" }, "original": { "owner": "nix-community", - "ref": "release-24.05", + "ref": "release-24.11", "repo": "home-manager", "type": "github" } @@ -539,16 +539,16 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1732817615, - "narHash": "sha256-OxBtFh60ooClrIZyKEJyUsPngfBunnZVY7LfsoZPm9M=", + "lastModified": 1733129712, + "narHash": "sha256-JTLTaLyfbLLRmHNLvjJD1Om2TBWQX9X/49bQobhQQok=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "fa7db5bea155321f36140fcd11a514247cd0757d", + "rev": "d93b83e0743720585203621e373bbb6cbcf3549b", "type": "github" }, "original": { "owner": "NixOS", - "ref": "release-24.05", + "ref": "release-24.11", "repo": "nixpkgs", "type": "github" } diff --git a/flake.nix b/flake.nix index e47ae46..a29d8e9 100644 --- a/flake.nix +++ b/flake.nix @@ -4,10 +4,10 @@ inputs = { flake-compat.url = "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"; - nixpkgs.url = "github:NixOS/nixpkgs/release-24.05"; + nixpkgs.url = "github:NixOS/nixpkgs/release-24.11"; nixpkgs-u.url = "github:NixOS/nixpkgs/nixos-unstable"; home-manager = { - url = "github:nix-community/home-manager/release-24.05"; + url = "github:nix-community/home-manager/release-24.11"; inputs.nixpkgs.follows = "nixpkgs"; }; home-manager-u = { @@ -49,6 +49,10 @@ extraOptions = "experimental-features = nix-command flakes"; permittedInsecurePackages = [ "electron-27.3.11" # LogSeq + "aspnetcore-runtime-6.0.36" # Sonarr + "aspnetcore-runtime-wrapped-6.0.36" # Sonarr + "dotnet-sdk-6.0.428" # Sonarr + "dotnet-sdk-wrapped-6.0.428" # Sonarr ]; }; @@ -118,6 +122,7 @@ }; } + { services.userborn.enable = true; } ./modules/nixos/users/bertof.nix # Some basic defaults @@ -171,6 +176,7 @@ }; devShells.default = pkgs.mkShell { + buildInputs = [ pkgs.deploy-rs ]; shellHook = '' ${config.pre-commit.installationScript} LOCAL_KEY = "/etc/nix/key"; @@ -416,36 +422,36 @@ home-manager.users.tiziano = import ./instances/loki/hm_tiziano.nix; }]; }; + }; - # # Deploy-rs checks - # checks = builtins.mapAttrs (_system: deployLib: deployLib.deployChecks inputs.self.deploy) inputs.deploy-rs.lib; + # # Deploy-rs checks + # checks = builtins.mapAttrs (_system: deployLib: deployLib.deployChecks inputs.self.deploy) inputs.deploy-rs.lib; - # Map nodes to Deploy-rs deployments - deploy.nodes = { - baldur = { - hostname = "baldur.bertof.net"; - profiles.system = { user = "root"; path = inputs.deploy-rs.lib.x86_64-linux.activate.nixos inputs.self.nixosConfigurations.baldur; }; - }; - freya = { - hostname = "freya.tsn"; - profiles.system = { user = "root"; path = inputs.deploy-rs.lib.aarch64-linux.activate.nixos inputs.self.nixosConfigurations.freya; }; - }; - heimdall = { - hostname = "heimdall.tsn"; - profiles.system = { user = "root"; path = inputs.deploy-rs.lib.x86_64-linux.activate.nixos inputs.self.nixosConfigurations.heimdall; }; - }; - loki = { - hostname = "loki.tsn"; - profiles.system = { user = "root"; path = inputs.deploy-rs.lib.x86_64-linux.activate.nixos inputs.self.nixosConfigurations.loki; }; - }; - odin = { - hostname = "odin.tsn"; - profiles.system = { user = "root"; path = inputs.deploy-rs.lib.x86_64-linux.activate.nixos inputs.self.nixosConfigurations.odin; }; - }; - thor = { - hostname = "thor.tsn"; - profiles.system = { user = "root"; path = inputs.deploy-rs.lib.x86_64-linux.activate.nixos inputs.self.nixosConfigurations.thor; }; - }; + # Map nodes to Deploy-rs deployments + deploy.nodes = { + baldur = { + hostname = "baldur.bertof.net"; + profiles.system = { user = "root"; path = inputs.deploy-rs.lib.x86_64-linux.activate.nixos inputs.self.nixosConfigurations.baldur; }; + }; + freya = { + hostname = "freya.tsn"; + profiles.system = { user = "root"; path = inputs.deploy-rs.lib.aarch64-linux.activate.nixos inputs.self.nixosConfigurations.freya; }; + }; + heimdall = { + hostname = "heimdall.tsn"; + profiles.system = { user = "root"; path = inputs.deploy-rs.lib.x86_64-linux.activate.nixos inputs.self.nixosConfigurations.heimdall; }; + }; + loki = { + hostname = "loki.tsn"; + profiles.system = { user = "root"; path = inputs.deploy-rs.lib.x86_64-linux.activate.nixos inputs.self.nixosConfigurations.loki; }; + }; + odin = { + hostname = "odin.tsn"; + profiles.system = { user = "root"; path = inputs.deploy-rs.lib.x86_64-linux.activate.nixos inputs.self.nixosConfigurations.odin; }; + }; + thor = { + hostname = "thor.tsn"; + profiles.system = { user = "root"; path = inputs.deploy-rs.lib.x86_64-linux.activate.nixos inputs.self.nixosConfigurations.thor; }; }; }; }; diff --git a/instances/baldur/configuration.nix b/instances/baldur/configuration.nix index b527138..99b03c6 100644 --- a/instances/baldur/configuration.nix +++ b/instances/baldur/configuration.nix @@ -190,22 +190,6 @@ defaults.email = "filippo.berto95@gmail.com"; }; - users.users.bertof = { - isNormalUser = true; - extraGroups = [ - "audio" - "input" - "docker" - "libvirtd" - "network" - "networkmanager" - "usb" - "video" - "wheel" - ]; - shell = pkgs.zsh; - }; - boot.kernel.sysctl = { "net.ipv4.conf.all.forwarding" = true; "net.ipv4.conf.default.forwarding" = true; diff --git a/instances/freya/configuration.nix b/instances/freya/configuration.nix index cea72a8..b676af7 100644 --- a/instances/freya/configuration.nix +++ b/instances/freya/configuration.nix @@ -434,24 +434,6 @@ in time.timeZone = "Europe/Rome"; - users.users = { - bertof = { - isNormalUser = true; - extraGroups = [ - "audio" - "input" - "docker" - "libvirtd" - "network" - "networkmanager" - "usb" - "video" - "wheel" - ]; - shell = pkgs.zsh; - }; - }; - zramSwap.enable = true; system.stateVersion = "22.11"; diff --git a/instances/heimdall/configuration.nix b/instances/heimdall/configuration.nix index fd15258..52b36b0 100644 --- a/instances/heimdall/configuration.nix +++ b/instances/heimdall/configuration.nix @@ -31,10 +31,8 @@ in enable = true; # package = pkgs.bluezFull; }; - opengl = { - enable = true; - driSupport = true; - }; + graphics.enable = true; + amdgpu.amdvlk.enable = true; }; i18n.defaultLocale = "it_IT.UTF-8"; @@ -444,24 +442,6 @@ in time.timeZone = "Europe/Rome"; - users.users = { - bertof = { - isNormalUser = true; - extraGroups = [ - "audio" - "input" - "docker" - "libvirtd" - "network" - "networkmanager" - "usb" - "video" - "wheel" - ]; - shell = pkgs.zsh; - }; - }; - zramSwap.enable = true; system.stateVersion = "24.05"; diff --git a/instances/loki/configuration.nix b/instances/loki/configuration.nix index 6d29bbd..ae8ac47 100644 --- a/instances/loki/configuration.nix +++ b/instances/loki/configuration.nix @@ -213,37 +213,6 @@ in # }; }; - users.users = { - bertof = { - isNormalUser = true; - extraGroups = [ - "audio" - "input" - # "docker" - "libvirtd" - "network" - "networkmanager" - "usb" - "video" - "wheel" - ]; - shell = pkgs.zsh; - }; - tiziano = { - isNormalUser = true; - extraGroups = [ - "audio" - "input" - "video" - ]; - openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMExwtJFk6HjySrTZwJH67SOHC3hlL28NO4oe2GXsv6k" - ]; - shell = pkgs.zsh; - }; - # jellyfin.extraGroups = [ "video" ]; - }; - # services.snapper = { # configs = # let diff --git a/instances/odin/common_configuration.nix b/instances/odin/common_configuration.nix index 25d260b..c0f145c 100644 --- a/instances/odin/common_configuration.nix +++ b/instances/odin/common_configuration.nix @@ -192,24 +192,6 @@ }; }; - # Define a user account. Don't forget to set a password with ‘passwd’. - users.users.bertof = { - isNormalUser = true; - extraGroups = [ - "audio" - "input" - "docker" - "flashrom" - "libvirtd" - "network" - "networkmanager" - "usb" - "video" - "wheel" - ]; - shell = pkgs.zsh; - }; - programs = { dconf.enable = true; flashrom.enable = true; diff --git a/instances/sif/configuration.nix b/instances/sif/configuration.nix index 330e61f..4079b5b 100644 --- a/instances/sif/configuration.nix +++ b/instances/sif/configuration.nix @@ -199,24 +199,6 @@ }; }; - # Define a user account. Don't forget to set a password with ‘passwd’. - users.users.bertof = { - isNormalUser = true; - extraGroups = [ - "audio" - "input" - "docker" - "flashrom" - "libvirtd" - "network" - "networkmanager" - "usb" - "video" - "wheel" - ]; - shell = pkgs.zsh; - }; - programs = { dconf.enable = true; flashrom.enable = true; diff --git a/instances/thor/configuration.nix b/instances/thor/configuration.nix index a74146c..d0ed9a8 100644 --- a/instances/thor/configuration.nix +++ b/instances/thor/configuration.nix @@ -286,23 +286,6 @@ ''; }; - users.users.bertof = { - isNormalUser = true; - extraGroups = [ - "audio" - "input" - "docker" - "flashrom" - "libvirtd" - "network" - "networkmanager" - "usb" - "video" - "wheel" - ]; - shell = pkgs.zsh; - }; - virtualisation = { docker.enable = true; kvmgt.enable = true; diff --git a/modules/nixos/users/bertof.nix b/modules/nixos/users/bertof.nix index 214ee91..737b364 100644 --- a/modules/nixos/users/bertof.nix +++ b/modules/nixos/users/bertof.nix @@ -1,13 +1,20 @@ -{ +{ pkgs, ... }: { users.users.bertof = { isNormalUser = true; + shell = pkgs.zsh; extraGroups = [ - "libvirtd" + "audio" + "docker" + "flashrom" + "input" "kvm" + "libvirtd" "network" "networkmanager" - "wheel" "tss" + "usb" + "video" + "wheel" ]; openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC3W3Btk1qtLHU69aFwseDuKU6PJMA+NxVXJXiRNhDce bertof@odin"