Refactor the whole configuration #1

Merged
caem merged 354 commits from refactor into master 2025-02-01 14:05:16 +01:00
3 changed files with 14 additions and 3 deletions
Showing only changes of commit e0880ff700 - Show all commits

View file

@ -3,6 +3,7 @@
let let
fs = import ./fs.nix { inherit lib; }; fs = import ./fs.nix { inherit lib; };
hosts = import ./hosts.nix { inherit lib; }; hosts = import ./hosts.nix { inherit lib; };
modules = import ./modules.nix { inherit lib; };
in in
fs // hosts fs // hosts // modules

10
lib/modules.nix Normal file
View file

@ -0,0 +1,10 @@
{ lib }:
rec {
makeOverridable =
f: origArgs:
let
origRes = f origArgs;
in
origRes // { override = newArgs: makeOverridable f (origArgs // newArgs); };
}

View file

@ -2,7 +2,7 @@
# https://github.com/ryan4yin/nix-config/blob/7deed26cc5a3af2072b8c89a688f265607babc80/hardening/nixpaks/firefox.nix # https://github.com/ryan4yin/nix-config/blob/7deed26cc5a3af2072b8c89a688f265607babc80/hardening/nixpaks/firefox.nix
# https://github.com/schizofox/schizofox/blob/cdf69b2a445ff12680657a3bd44ce7c406bf2ae6/flake/modules/home-manager/default.nix # https://github.com/schizofox/schizofox/blob/cdf69b2a445ff12680657a3bd44ce7c406bf2ae6/flake/modules/home-manager/default.nix
{ ... }: final: prev: { { lib, ... }: final: prev: {
firefox-esr-wrapped = let firefox-esr-wrapped = let
sandboxed-firefox-esr = prev.mkNixPak { sandboxed-firefox-esr = prev.mkNixPak {
config = { sloth, ... }: { config = { sloth, ... }: {
@ -75,5 +75,5 @@
}; };
}; };
in in
sandboxed-firefox-esr.config.env; lib.makeOverridable sandboxed-firefox-esr.config.env;
} }