From 015ad6a1c685985eb2c90a8c0e8bb197f216decc Mon Sep 17 00:00:00 2001 From: Toast Date: Mon, 27 Nov 2023 11:05:12 +0100 Subject: [PATCH 1/6] Revert "Bat: use old theme syntax" This reverts commit 0d6bdf7d94a79070d3fe03d89bbbe4d092f159d5. --- roles/common/programs/bat.nix | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/roles/common/programs/bat.nix b/roles/common/programs/bat.nix index 207887e..2075753 100644 --- a/roles/common/programs/bat.nix +++ b/roles/common/programs/bat.nix @@ -1,17 +1,5 @@ { config, pkgs, ... }: -let - # Home manager on 23.05 doesn't understand the new format, so I'll use the old one until 23.11 becomes stable - newformat = { - src = pkgs.fetchFromGitHub { - owner = "catppuccin"; - repo = "bat"; - rev = "master"; - hash = "sha256-6WVKQErGdaqb++oaXnY3i6/GuH2FhTgK0v4TN4Y0Wbw="; - }; - file = "Catppuccin-mocha.tmTheme"; - }; - oldformat = builtins.readFile (newformat.src + "/${newformat.file}"); -in + { home-manager = { users.toast.programs.bat = { @@ -20,7 +8,15 @@ in theme = "catppuccin-mocha"; }; themes = { - catppuccin-mocha = oldformat; + catppuccin-mocha = { + src = pkgs.fetchFromGitHub { + owner = "catppuccin"; + repo = "bat"; + rev = "master"; + hash = "sha256-6WVKQErGdaqb++oaXnY3i6/GuH2FhTgK0v4TN4Y0Wbw="; + }; + file = "Catppuccin-mocha.tmTheme"; + }; }; }; }; From d9aab2cdc8ed6b6f6bd6d55d7fcbd088427ffe36 Mon Sep 17 00:00:00 2001 From: Toast Date: Mon, 27 Nov 2023 11:21:22 +0100 Subject: [PATCH 2/6] Desktop: use new fonts format --- roles/desktop/configuration.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/desktop/configuration.nix b/roles/desktop/configuration.nix index 2ad993a..7a07df6 100644 --- a/roles/desktop/configuration.nix +++ b/roles/desktop/configuration.nix @@ -9,7 +9,7 @@ users.users.toast.extraGroups = [ "scanner" ]; # Set up fonts - fonts.fonts = [ + fonts.packages = [ ( pkgs.nerdfonts.override { fonts = [ "Hack" "JetBrainsMono" ]; } ) ]; From 63d6a617c1aa97d24ea6f52868b82b75208bdbf1 Mon Sep 17 00:00:00 2001 From: Toast Date: Thu, 30 Nov 2023 23:30:56 +0100 Subject: [PATCH 3/6] Flake: update stable nixpkgs to 23.11 --- flake.lock | 16 ++++++++-------- flake.nix | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/flake.lock b/flake.lock index 5e311aa..4a17911 100644 --- a/flake.lock +++ b/flake.lock @@ -124,16 +124,16 @@ ] }, "locked": { - "lastModified": 1700392168, - "narHash": "sha256-v5LprEFx3u4+1vmds9K0/i7sHjT0IYGs7u9v54iz/OA=", + "lastModified": 1700814205, + "narHash": "sha256-lWqDPKHRbQfi+zNIivf031BUeyciVOtwCwTjyrhDB5g=", "owner": "nix-community", "repo": "home-manager", - "rev": "28535c3a34d79071f2ccb68671971ce0c0984d7e", + "rev": "aeb2232d7a32530d3448318790534d196bf9427a", "type": "github" }, "original": { "owner": "nix-community", - "ref": "release-23.05", + "ref": "release-23.11", "repo": "home-manager", "type": "github" } @@ -270,16 +270,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1700989516, - "narHash": "sha256-oKbmPa2wpTHh9XB3+zIx97uMZGNnp97GPliKKG2/plo=", + "lastModified": 1701263465, + "narHash": "sha256-lNXUIlkfyDyp9Ox21hr+wsEf/IBklLvb6bYcyeXbdRc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d2e4de209881b38392933fabf303cde3454b0b4c", + "rev": "50aa30a13c4ab5e7ba282da460a3e3d44e9d0eb3", "type": "github" }, "original": { "id": "nixpkgs", - "ref": "nixos-23.05", + "ref": "nixos-23.11", "type": "indirect" } }, diff --git a/flake.nix b/flake.nix index 9119495..75ab5e1 100755 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,7 @@ description = "Configuration for Everest"; inputs = { - nixpkgs.url = "nixpkgs/nixos-23.05"; + nixpkgs.url = "nixpkgs/nixos-23.11"; nixpkgs-unstable.url = "nixpkgs/nixos-unstable"; agenix = { @@ -14,7 +14,7 @@ }; home-manager = { - url = "github:nix-community/home-manager/release-23.05"; + url = "github:nix-community/home-manager/release-23.11"; inputs.nixpkgs.follows = "nixpkgs"; }; From d5098eb264178469deb6decc450cd83ad5c75e11 Mon Sep 17 00:00:00 2001 From: Toast Date: Fri, 1 Dec 2023 00:00:42 +0100 Subject: [PATCH 4/6] Move syncthing options to new format --- roles/common/services/syncthing.nix | 58 ++++++++++++++-------------- roles/desktop/services/syncthing.nix | 2 +- roles/gaming/services/syncthing.nix | 2 +- roles/school/services/syncthing.nix | 2 +- roles/server/syncthing.nix | 2 +- 5 files changed, 33 insertions(+), 33 deletions(-) diff --git a/roles/common/services/syncthing.nix b/roles/common/services/syncthing.nix index 966b866..9a090ab 100755 --- a/roles/common/services/syncthing.nix +++ b/roles/common/services/syncthing.nix @@ -5,39 +5,39 @@ overrideDevices = true; overrideFolders = true; openDefaultPorts = true; - extraOptions = { + settings = { options = { urAccepted = 3; }; - }; - # Set up devices and folders common to every device - devices = { - "phone" = { - name = "Xiaomi Redmi Note 10 Pro"; - id = "K7KNZ5V-XREUADL-CROQXPV-6AA4H65-2VUD34Z-VQWKJ6S-LWWW4EE-XPNEZQ6"; + # Set up devices and folders common to every device + devices = { + "phone" = { + name = "Xiaomi Redmi Note 10 Pro"; + id = "K7KNZ5V-XREUADL-CROQXPV-6AA4H65-2VUD34Z-VQWKJ6S-LWWW4EE-XPNEZQ6"; + }; + "pc" = { + name = "Archie"; + id = "NJPX754-64AQNP3-7GZFIRZ-W2EDRJQ-27ORWYM-X5YXEXQ-ERRTRTQ-BSYD4AY"; + }; + "steamdeck" = { + name = "Steam Deck"; + id = "DNFEGEA-PDEVW5A-O5VBVQK-IUXI7J5-MAHCQAG-2JLEFFM-DSXB6AS-TX6ZHAN"; + }; + "server" = { + name = "Everest"; + id = "BVJBCAZ-WDIWBFR-CK3WB3N-TWH3UXX-EPZXVWE-BLQ3IDU-U7MHVVB-WO4BKAJ"; + }; + "surface" = { + name = "Surface Go"; + id = "HTVSF3O-AHY3TNH-BLVSEGK-HRRSMHC-H5LJWVF-NDKGM6O-ATWZALC-YXNV2Q4"; + }; }; - "pc" = { - name = "Archie"; - id = "NJPX754-64AQNP3-7GZFIRZ-W2EDRJQ-27ORWYM-X5YXEXQ-ERRTRTQ-BSYD4AY"; - }; - "steamdeck" = { - name = "Steam Deck"; - id = "DNFEGEA-PDEVW5A-O5VBVQK-IUXI7J5-MAHCQAG-2JLEFFM-DSXB6AS-TX6ZHAN"; - }; - "server" = { - name = "Everest"; - id = "BVJBCAZ-WDIWBFR-CK3WB3N-TWH3UXX-EPZXVWE-BLQ3IDU-U7MHVVB-WO4BKAJ"; - }; - "surface" = { - name = "Surface Go"; - id = "HTVSF3O-AHY3TNH-BLVSEGK-HRRSMHC-H5LJWVF-NDKGM6O-ATWZALC-YXNV2Q4"; - }; - }; - folders = { - "passwords" = { - label = "KeePassXC Passwords"; - id = "rdyaq-ex659"; - devices = [ "phone" "pc" "steamdeck" "server" "surface"]; + folders = { + "passwords" = { + label = "KeePassXC Passwords"; + id = "rdyaq-ex659"; + devices = [ "phone" "pc" "steamdeck" "server" "surface"]; + }; }; }; }; diff --git a/roles/desktop/services/syncthing.nix b/roles/desktop/services/syncthing.nix index c650ba9..84dc962 100644 --- a/roles/desktop/services/syncthing.nix +++ b/roles/desktop/services/syncthing.nix @@ -6,7 +6,7 @@ user = "toast"; group = "users"; dataDir = config.users.users.toast.home; - folders."passwords".path = "~/Documents/Passwords"; + settings.folders."passwords".path = "~/Documents/Passwords"; }; # Allow regular users to stop syncthing # https://stackoverflow.com/questions/61480914/using-policykit-to-allow-non-root-users-to-start-and-stop-a-service diff --git a/roles/gaming/services/syncthing.nix b/roles/gaming/services/syncthing.nix index d275d88..ed786b6 100644 --- a/roles/gaming/services/syncthing.nix +++ b/roles/gaming/services/syncthing.nix @@ -6,7 +6,7 @@ TODO: turn this into a module eventually */ - services.syncthing.folders = { + services.syncthing.settings.folders = { "steam-201810" = { label = "Wolfenstein The New Order Saves"; id = "laxxf-t2wmy"; diff --git a/roles/school/services/syncthing.nix b/roles/school/services/syncthing.nix index aac049a..9663c57 100644 --- a/roles/school/services/syncthing.nix +++ b/roles/school/services/syncthing.nix @@ -1,7 +1,7 @@ { config, ... }: { - services.syncthing.folders = { + services.syncthing.settings.folders = { "school-things" = { label = "School things"; id = "z6alc-nfoqr"; diff --git a/roles/server/syncthing.nix b/roles/server/syncthing.nix index 9c84f89..489324d 100755 --- a/roles/server/syncthing.nix +++ b/roles/server/syncthing.nix @@ -11,7 +11,7 @@ key = config.age.secrets.syncthingKey.path; cert = config.age.secrets.syncthingCert.path; guiAddress = "0.0.0.0:8384"; - folders = { + settings.folders = { "passwords" = { path = "${config.services.syncthing.dataDir}/passwords"; }; From d54cf1741b5bd1c60e48a5b733002c060e6d443f Mon Sep 17 00:00:00 2001 From: Toast Date: Fri, 1 Dec 2023 00:03:37 +0100 Subject: [PATCH 5/6] Everest: declare interface for default gateway --- machines/Everest/configuration.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/machines/Everest/configuration.nix b/machines/Everest/configuration.nix index 1d88a68..5db99e7 100755 --- a/machines/Everest/configuration.nix +++ b/machines/Everest/configuration.nix @@ -28,10 +28,14 @@ prefixLength = 24; } ]; }; - defaultGateway = "192.168.0.1"; + # I use networkd, so I need to declare the interface for the default gateway + defaultGateway = { + address = "192.168.0.1"; + interface = "eno1"; + }; nameservers = [ "8.8.8.8" ]; }; - + # Define a user account. Don't forget to set a password with ‘passwd’. users.users.toast = { isNormalUser = true; From 0281e6cfeb6dd94f6e80215f1decc43c1326459a Mon Sep 17 00:00:00 2001 From: Toast Date: Fri, 1 Dec 2023 00:12:33 +0100 Subject: [PATCH 6/6] Update home manager and system stateVersion to 23.11 --- roles/common/configuration.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/common/configuration.nix b/roles/common/configuration.nix index 922ce06..42a9518 100755 --- a/roles/common/configuration.nix +++ b/roles/common/configuration.nix @@ -69,7 +69,7 @@ useGlobalPkgs = true; verbose = true; users.toast = { config, ... }: { - home.stateVersion = "23.05"; + home.stateVersion = "23.11"; xdg = { userDirs = { enable = true; @@ -100,7 +100,7 @@ */ system = { - stateVersion = "23.05"; + stateVersion = "23.11"; # Nix on nixos 23.05 does not have dirtyRev configurationRevision = flakeSelf.sourceInfo.rev or flakeSelf.sourceInfo.dirtyRev or "dirty"; nixos.variant_id = lib.strings.toLower config.networking.hostName;