From 88abf3ed4d9dab7ad932ee043df50cce4a4b05ef Mon Sep 17 00:00:00 2001 From: Pedro Rey Anca Date: Thu, 24 Jul 2025 19:05:09 +0200 Subject: [PATCH] Do not allow unfree (except steam) --- flake.nix | 1 - modules/core/nix.nix | 12 +++++++++++- modules/home/gaming.nix | 5 ----- modules/home/retroarch.nix | 1 - modules/home/vscodium.nix | 4 +--- 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/flake.nix b/flake.nix index 950fc37..ba3cb5d 100644 --- a/flake.nix +++ b/flake.nix @@ -37,7 +37,6 @@ system = "x86_64-linux"; pkgs = import nixpkgs { inherit system; - config.allowUnfree = true; }; lib = nixpkgs.lib; in { diff --git a/modules/core/nix.nix b/modules/core/nix.nix index 4b1337a..0555461 100644 --- a/modules/core/nix.nix +++ b/modules/core/nix.nix @@ -1,5 +1,15 @@ -{username, ...}: { +{ + username, + lib, + ... +}: { nix.settings = { trusted-users = ["${username}"]; }; + + nixpkgs.config.allowUnfreePredicate = pkg: + builtins.elem (lib.getName pkg) [ + "steam" + "steam-unwrapped" + ]; } diff --git a/modules/home/gaming.nix b/modules/home/gaming.nix index f1fe994..3400e5f 100644 --- a/modules/home/gaming.nix +++ b/modules/home/gaming.nix @@ -24,17 +24,12 @@ vitetris nethack - ## Celeste - celeste-classic - celeste-classic-pm - ## Doom # gzdoom crispy-doom ## Emulation sameboy - snes9x cemu dolphin-emu ryujinx diff --git a/modules/home/retroarch.nix b/modules/home/retroarch.nix index 4bee7d2..9cecd41 100644 --- a/modules/home/retroarch.nix +++ b/modules/home/retroarch.nix @@ -5,7 +5,6 @@ fceumm gambatte mgba - snes9x ])) ]; } diff --git a/modules/home/vscodium.nix b/modules/home/vscodium.nix index bd33d2c..5ec14b9 100644 --- a/modules/home/vscodium.nix +++ b/modules/home/vscodium.nix @@ -14,9 +14,7 @@ # python ms-python.python ms-python.black-formatter - # C/C++ - ms-vscode.cpptools - # OCaml + # OCaml ocamllabs.ocaml-platform # CMake ms-vscode.cmake-tools