{ inputs, hostname, lib, config, ... }: { imports = [ ./gui.nix ./laptop.nix ./thinkpad.nix ./locales.nix ./envfs.nix ./pc.nix ./main.nix ./sets.nix ./syslog.nix ./hosts.nix ./bluetooth.nix ./unfree.nix ./build-machines.nix ./ollama.nix ./apache ./overlays ]; options = { this.defaults.enable = lib.mkEnableOption "default settings" // { default = true; }; this.defaults.ld = lib.mkEnableOption "ld" // { default = true; }; }; config = lib.mkMerge [ (lib.mkIf config.this.defaults.enable { networking.hostName = hostname; security.sudo.enable = false; services.logind.settings = { Login.HandleLidSwitch = "ignore"; Login.HandlePowerKey = "suspend"; }; documentation.man.generateCaches = true; environment.pathsToLink = [ "/include" ]; environment.variables = { PKG_CONFIG_PATH = "/run/current-system/sw/lib/pkgconfig"; C_INCLUDE_PATH = "/run/current-system/sw/include"; LIBRARY_PATH = "/run/current-system/sw/lib"; SASL_PATH = "/run/current-system/sw/lib/sasl2"; }; services.udev.extraRules = '' KERNEL=="uinput", MODE="0660", GROUP="input" ''; programs.bash.shellInit = '' HISTIGNORE="*INSIDE_EMACS*:$HISTIGNORE" ''; nix = { channel.enable = false; registry.nixpkgs-unstable.flake = inputs.nixpkgs-unstable; nixPath = lib.mkOrder 1000 [ "nixpkgs=flake:nixpkgs" "nixpkgs-unstable=flake:nixpkgs-unstable" ]; settings = { experimental-features = [ "nix-command" "flakes" ]; trusted-users = ["simon"]; }; }; }) (lib.mkIf config.this.defaults.ld { programs.nix-ld.enable = true; environment.sessionVariables = { NIX_LD_LIBRARY_PATH = lib.mkForce "/run/current-system/sw/lib:/run/current-system/sw/share/nix-ld/lib"; }; }) ]; }