From be53b5b4b6f3aeaef4678d128906428a5c3e2e70 Mon Sep 17 00:00:00 2001 From: Yusuf Bera Ertan Date: Fri, 28 May 2021 19:37:09 +0300 Subject: [PATCH] proper registry --- flake.lock | 3 +++ flake.nix | 1 + profiles/core/default.nix | 38 +++++++++++++++++++++++--------------- users/patriot/default.nix | 2 ++ 4 files changed, 29 insertions(+), 15 deletions(-) diff --git a/flake.lock b/flake.lock index a1302a2..e268a31 100644 --- a/flake.lock +++ b/flake.lock @@ -450,6 +450,9 @@ "nixos": "nixos", "nixos-hardware": "nixos-hardware", "nixosPersistence": "nixosPersistence", + "nixpkgs": [ + "nixos" + ], "nixpkgsWayland": "nixpkgsWayland", "nur": "nur", "pkgs": "pkgs" diff --git a/flake.nix b/flake.nix index 8b9cdfc..52a991a 100644 --- a/flake.nix +++ b/flake.nix @@ -4,6 +4,7 @@ inputs = { nixos.url = "nixpkgs/nixos-unstable"; + nixpkgs.follows = "nixos"; latest.url = "nixpkgs"; digga.url = "github:divnix/digga"; diff --git a/profiles/core/default.nix b/profiles/core/default.nix index 2aa2c77..f6d14c5 100644 --- a/profiles/core/default.nix +++ b/profiles/core/default.nix @@ -1,4 +1,4 @@ -{ self, config, pkgs, lib, ourLib, ... }: +{ self, inputs, config, pkgs, lib, ourLib, ... }: let inherit (lib) fileContents mkIf; pkgBin = ourLib.pkgBinNoDep pkgs; @@ -139,20 +139,28 @@ in diff-closures /run/current-system "$systemConfig" ''; - nix = { - autoOptimiseStore = true; - gc.automatic = true; - optimise.automatic = true; - useSandbox = true; - allowedUsers = [ "@wheel" ]; - trustedUsers = [ "root" "@wheel" ]; - extraOptions = '' - min-free = 536870912 - keep-outputs = true - keep-derivations = true - fallback = true - ''; - }; + nix = + let + registry = + builtins.mapAttrs + (_: v: { flake = v; }) + (lib.filterAttrs (_: v: v ? outputs) inputs); + in + { + autoOptimiseStore = true; + gc.automatic = true; + optimise.automatic = true; + useSandbox = true; + allowedUsers = [ "@wheel" ]; + trustedUsers = [ "root" "@wheel" ]; + extraOptions = '' + min-free = 536870912 + keep-outputs = true + keep-derivations = true + fallback = true + ''; + inherit registry; + }; programs.command-not-found.enable = false; home-manager.useGlobalPkgs = true; diff --git a/users/patriot/default.nix b/users/patriot/default.nix index 00a4bf4..a7785bd 100644 --- a/users/patriot/default.nix +++ b/users/patriot/default.nix @@ -18,6 +18,8 @@ in "$6$spzqhAyJfhHy$iHgLBlhjGn1l8PnbjJdWTn1GPvcjMqYNKUzdCe/7IrX6sHNgETSr/Nfpdmq9FCXLhrAfwHOd/q/8SvfeIeNX4/"; }; + environment.systemPackages = [ pkgs.qt5.qtwayland ]; + xdg.portal = { enable = true; gtkUsePortal = true;