From 47799411a349b434591a39d4dbb5f240191e2e1f Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Sun, 9 Nov 2025 07:25:58 +0900 Subject: [PATCH 1/3] feat(nix): enhance unfree package configuration in home-manager and NixOS - Updated the Nix configuration to allow unfree packages by setting `nixpkgs.config.allowUnfree = true;`. - Expanded the `allowUnfreePredicate` to include "crush" alongside existing packages "claude-code" and "qwen-code" for improved package management. --- home-manager/default.nix | 16 ++++++++++------ hosts/nixos/default.nix | 8 +++++--- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/home-manager/default.nix b/home-manager/default.nix index 399fca27a..92a399dc7 100644 --- a/home-manager/default.nix +++ b/home-manager/default.nix @@ -31,12 +31,16 @@ in inputs.agenix.homeManagerModules.default ]; - nixpkgs.config.allowUnfreePredicate = - pkg: - builtins.elem (lib.getName pkg) [ - "claude-code" - "qwen-code" - ]; + nixpkgs.config = { + allowUnfree = true; + allowUnfreePredicate = + pkg: + builtins.elem (lib.getName pkg) [ + "claude-code" + "qwen-code" + "crush" + ]; + }; home.username = username; home.homeDirectory = lib.mkIf pkgs.stdenv.isLinux "/home/${username}"; diff --git a/hosts/nixos/default.nix b/hosts/nixos/default.nix index a52efbe3d..f26549572 100644 --- a/hosts/nixos/default.nix +++ b/hosts/nixos/default.nix @@ -7,7 +7,10 @@ let inherit (inputs) nixpkgs home-manager; system = "x86_64-linux"; - pkgs = nixpkgs.legacyPackages.${system}; + pkgs = import nixpkgs { + inherit system; + config.allowUnfree = true; + }; configuration = { config, lib, ... }: { @@ -104,7 +107,6 @@ nixpkgs.lib.nixosSystem { fsType = "ext4"; }; - nixpkgs.config.allowUnfree = true; nixpkgs.pkgs = pkgs; fonts.packages = with pkgs; [ @@ -118,7 +120,7 @@ nixpkgs.lib.nixosSystem { home-manager.users."${username}" = import ../../home-manager { inherit inputs username system; lib = nixpkgs.lib; - pkgs = nixpkgs.legacyPackages.${system}; + pkgs = pkgs; config = { }; }; } From b41455e48676009c5dde7668d3bcbb348241dbe2 Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Sun, 9 Nov 2025 07:28:08 +0900 Subject: [PATCH 2/3] fix(makefile): update NixOS build command for improved configuration - Modified the NixOS build command in the Makefile to use the correct path for the runner configuration, enhancing the build process and ensuring compatibility with the current setup. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9432e1770..be17cbc8e 100644 --- a/Makefile +++ b/Makefile @@ -211,7 +211,7 @@ nix-build: nix-connect if [ "$(OS)" = "Darwin" ]; then \ $(NIX_ALLOW_UNFREE) $(NIX_EXEC) build .#$(NIX_CONFIG_TYPE).runner.system $(NIX_FLAGS) --impure --no-update-lock-file --show-trace; \ elif [ "$(NIX_CONFIG_TYPE)" = "nixosConfigurations" ]; then \ - $(NIX_ALLOW_UNFREE) $(NIX_EXEC) run $(NIX_FLAGS) nixpkgs#nixos-rebuild -- build --flake .#runner --impure --no-update-lock-file; \ + $(NIX_ALLOW_UNFREE) $(NIX_EXEC) build .#nixosConfigurations.runner.config.system.build.toplevel $(NIX_FLAGS) --impure --no-update-lock-file --show-trace; \ elif [ "$(NIX_CONFIG_TYPE)" = "homeConfigurations" ]; then \ $(NIX_ALLOW_UNFREE) $(NIX_EXEC) build .#$(NIX_CONFIG_TYPE)."$(NIX_USERNAME)@$(NIX_SYSTEM)".activationPackage $(NIX_FLAGS) --impure --no-update-lock-file --show-trace; \ else \ From 81f9b7b7180cddb0d6c773798e5f9fb3f9551e7f Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Sun, 9 Nov 2025 07:36:47 +0900 Subject: [PATCH 3/3] feat(e2e): add disk space cleanup step for Ubuntu runners - Introduced a new step in the e2e workflow to free up disk space on Linux runners, enhancing the environment's performance and reliability during tests. --- .github/workflows/e2e.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 68e89c31c..216be7299 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -26,6 +26,17 @@ jobs: steps: - name: Checkout uses: actions/checkout@v5 + - name: Free Disk Space (Ubuntu) + if: runner.os == 'Linux' + uses: jlumbroso/free-disk-space@main + with: + tool-cache: false + android: true + dotnet: true + haskell: true + large-packages: true + docker-images: true + swap-storage: true - name: KVM Linux Virtualization if: runner.os == 'Linux' run: |