stuff
This commit is contained in:
parent
6dcd96551b
commit
51575e020e
@ -11,6 +11,7 @@
|
||||
|
||||
# TODOs:
|
||||
|
||||
* [ ] http health monitoring `services.netdata.httpcheck.checks.<foobar>`
|
||||
* [x] Split stuff into multiple files
|
||||
* [x] Make a flake
|
||||
* [x] merge hosted docs into a single subdomain
|
||||
|
@ -17,6 +17,8 @@
|
||||
#https://github.com/numtide/system-manager
|
||||
#nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions"
|
||||
#https://github.com/numtide/nixpkgs-unfree # has a cache
|
||||
#https://github.com/matthewbauer/nixiosk
|
||||
#inputs.pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
|
||||
|
||||
# used to host old docs
|
||||
#nixpkgs-22.url = "github:NixOS/nixpkgs/nixos-22.11";
|
||||
|
@ -5,8 +5,10 @@
|
||||
|
||||
# https://nixos.wiki/wiki/Nvidia
|
||||
|
||||
#https://nixpk.gs/pr-tracker.html?pr=235481
|
||||
#nixpkgs.config.cudaSupport = true; # TODO: TOO SLOW, BREAKS
|
||||
#nixpkgs.config.nvidiaSupport = true; # TODO: slow? used only by zenith
|
||||
|
||||
nixpkgs.config.allowUnfreePredicate = pkg: lib.any (x: x) [
|
||||
(lib.hasInfix "nvidia" (lib.toLower (lib.getName pkg)))
|
||||
(lib.hasInfix "cuda" (lib.toLower (lib.getName pkg)))
|
||||
@ -27,6 +29,8 @@
|
||||
#hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.latest; # only do this per-host
|
||||
hardware.nvidia.powerManagement.enable = true; # Fix graphical corruption on suspend/resume
|
||||
|
||||
|
||||
|
||||
# add this to the host in question:
|
||||
#hardware.nvidia.prime = {
|
||||
# offload.enable = true;
|
||||
|
@ -4,7 +4,6 @@
|
||||
services.xserver.displayManager.gdm.enable = true;
|
||||
services.xserver.displayManager.gdm.wayland = true;
|
||||
services.xserver.desktopManager.gnome.enable = true;
|
||||
services.xserver.displayManager.gdm.autoSuspend = !config.services.openssh.enable;
|
||||
#services.printing.enable = true; # CUPS
|
||||
programs.xwayland.enable = true;
|
||||
xdg.portal.enable = true;
|
||||
|
@ -3,4 +3,6 @@
|
||||
systemd.targets.suspend.enable = false;
|
||||
systemd.targets.hibernate.enable = false;
|
||||
systemd.targets.hybrid-sleep.enable = false;
|
||||
|
||||
services.xserver.displayManager.gdm.autoSuspend = true;
|
||||
}
|
||||
|
@ -131,6 +131,11 @@ let
|
||||
programs.ssh.knownHosts.${proxy.host or "IGNORE"} = lib.mkIf (proxy != null) { publicKey = proxy.publicKey; };
|
||||
};
|
||||
|
||||
remoteMap = lib.listToAttrs (lib.forEach remotes (remote: {
|
||||
name = remote.hostName;
|
||||
value = remote;
|
||||
}));
|
||||
|
||||
in {
|
||||
|
||||
nix.distributedBuilds = true;
|
||||
@ -141,6 +146,15 @@ in {
|
||||
# useful when the builder has a faster internet connection than i do
|
||||
nix.settings.builders-use-substitutes = true;
|
||||
|
||||
/** /
|
||||
nix.buildMachines = let cfg = remoteMap.${config.networking.fqdn}; in [{
|
||||
hostName = "localhost"; # https://github.com/NixOS/nix/pull/4938
|
||||
systems = [ config.nixpkgs.system "builtin" ] ++ config.boot.binfmt.emulatedSystems;
|
||||
supportedFeatures = ["builtin" "local" "kvm" "nixos-test" "big-parallel" "benchmark"];
|
||||
inherit (cfg) maxJobs speedFactor;
|
||||
}];
|
||||
/**/
|
||||
|
||||
# TIL: this can be a list of configurations and lambdas, not just file paths
|
||||
imports = builtins.map mkRemoteConfig remotes;
|
||||
|
||||
|
@ -8,6 +8,7 @@ in
|
||||
#(lib.mapAttrsToList (domain: vhost: [ domain ] ++ vhost.serverAliases))
|
||||
(lib.mapAttrsToList (domain: vhost: [ domain ]))
|
||||
lib.flatten
|
||||
#(builtins.filter (domain: domain != ""))
|
||||
(lib.sort (x: y: x<y))
|
||||
];
|
||||
|
||||
@ -31,6 +32,17 @@ in
|
||||
services.nginx.enable = true;
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||
|
||||
/** /
|
||||
services.nginx.virtualHosts."" = {
|
||||
default = true;
|
||||
forceSSL = false;
|
||||
enableACME = false;
|
||||
root = pkgs.writeTextDir "index.html" ''
|
||||
<!DOCTYPE html>
|
||||
no
|
||||
'';
|
||||
};
|
||||
/**/
|
||||
|
||||
# Website tunnel
|
||||
# TODO: remove
|
||||
|
@ -11,6 +11,9 @@
|
||||
home.packages = with pkgs; [
|
||||
atom # TODO: config
|
||||
pulsar # TODO: config, transition into this
|
||||
# TODO: nodePackages.bash-language-server
|
||||
# TODO: python-lsp-server, somehow
|
||||
|
||||
discord
|
||||
element-desktop#-wayland
|
||||
slack
|
||||
|
Loading…
Reference in New Issue
Block a user