perf: speed up evaluation and reduce memory
This commit is contained in:
parent
8aa5e8d620
commit
2ef87bbded
7 changed files with 12 additions and 86 deletions
|
|
@ -1,7 +1,7 @@
|
|||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
{pkgs, ...}: {
|
||||
{pkgs, inputs, ...}: {
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
|
|
@ -43,7 +43,7 @@
|
|||
|
||||
home-manager.users.moritz.home.packages = with pkgs; [
|
||||
anki
|
||||
stable.calibre # NOTE: breaks often in unstable
|
||||
(inputs.stable.legacyPackages.${pkgs.system}.calibre) # NOTE: breaks often in unstable
|
||||
];
|
||||
|
||||
networking.firewall.allowedTCPPorts = [9090];
|
||||
|
|
|
|||
|
|
@ -1,63 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.my.nixpkgs;
|
||||
|
||||
overlayType = mkOptionType {
|
||||
name = "nixpkgs-overlay";
|
||||
description = "nixpkgs overlay";
|
||||
check = lib.isFunction;
|
||||
merge = lib.mergeOneOption;
|
||||
};
|
||||
in {
|
||||
options.my.nixpkgs = {
|
||||
overlays = mkOption {
|
||||
default = [];
|
||||
type = types.listOf overlayType;
|
||||
example =
|
||||
literalExpression
|
||||
''
|
||||
[
|
||||
(self: super: {
|
||||
openssh = super.openssh.override {
|
||||
hpnSupport = true;
|
||||
kerberos = self.libkrb5;
|
||||
};
|
||||
})
|
||||
]
|
||||
'';
|
||||
};
|
||||
channels = mkOption {
|
||||
default = {};
|
||||
example = literalExpression ''
|
||||
{
|
||||
stable = inputs.nixpkgs-stable;
|
||||
}
|
||||
'';
|
||||
type = with types; attrsOf package;
|
||||
};
|
||||
overlaysForAllChannels = mkEnableOption "apply overlays for all channels";
|
||||
};
|
||||
|
||||
config.nixpkgs = {
|
||||
overlays = let
|
||||
channelOverlays = _: prev:
|
||||
mapAttrs
|
||||
(
|
||||
_: value:
|
||||
import value {
|
||||
inherit (prev) system;
|
||||
config.allowUnfree = true;
|
||||
overlays = optional cfg.overlaysForAllChannels cfg.overlays;
|
||||
}
|
||||
)
|
||||
cfg.channels;
|
||||
in
|
||||
cfg.overlays ++ [channelOverlays];
|
||||
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -12,23 +12,6 @@ in {
|
|||
];
|
||||
|
||||
my = {
|
||||
nixpkgs = {
|
||||
overlays = [
|
||||
(
|
||||
_: prev: {
|
||||
nur = import inputs.nur {
|
||||
pkgs = prev;
|
||||
nurpkgs = prev;
|
||||
};
|
||||
}
|
||||
)
|
||||
];
|
||||
channels = {
|
||||
master = inputs.master;
|
||||
stable = inputs.stable;
|
||||
};
|
||||
};
|
||||
|
||||
shell = {
|
||||
abbreviations = {
|
||||
us = "systemctl --user";
|
||||
|
|
@ -164,6 +147,8 @@ in {
|
|||
xdg.userDirs.enable = true;
|
||||
};
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ in {
|
|||
(inputs.filetags.packages.${pkgs.system}.default)
|
||||
keepassxc
|
||||
pavucontrol
|
||||
stable.libreoffice # NOTE: breaks often
|
||||
(inputs.stable.legacyPackages.${pkgs.system}.libreoffice) # NOTE: breaks often
|
||||
signal-desktop
|
||||
vlc
|
||||
];
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
|
|
@ -11,7 +12,7 @@ in {
|
|||
enable = mkEnableOption "chromium";
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.stable.chromium;
|
||||
default = inputs.stable.legacyPackages.${pkgs.system}.chromium;
|
||||
defaultText = "pkgs.chromium";
|
||||
description = "Chromium package to install.";
|
||||
};
|
||||
|
|
|
|||
|
|
@ -65,7 +65,10 @@ in {
|
|||
// Overrides
|
||||
${cfg.arkenfox.overrides}
|
||||
'';
|
||||
extensions.packages = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||
extensions.packages = with (import inputs.nur {
|
||||
pkgs = pkgs;
|
||||
nurpkgs = pkgs;
|
||||
}).repos.rycee.firefox-addons; [
|
||||
darkreader
|
||||
istilldontcareaboutcookies
|
||||
kagi-search
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@
|
|||
|
||||
# SSH
|
||||
services.openssh = {
|
||||
package = pkgs.master.openssh; # HACK: to fix CVE-2024-6387
|
||||
package = pkgs.openssh;
|
||||
settings = {
|
||||
# Disable ssh password login
|
||||
PasswordAuthentication = lib.mkDefault false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue