task | reformatted with nixfmt

This commit is contained in:
Don Harper 2024-12-13 11:50:29 -06:00
parent e3fea64660
commit c3a0a0847f
119 changed files with 1010 additions and 2135 deletions

View file

@ -1,11 +1,5 @@
{
inputs,
outputs,
lib,
config,
pkgs,
...
}: let
{ inputs, outputs, lib, config, pkgs, ... }:
let
my-python-packages = python-packages:
with python-packages; [
pip
@ -18,16 +12,10 @@
in {
nix = {
settings = {
experimental-features = [
"nix-command"
"flakes"
];
experimental-features = [ "nix-command" "flakes" ];
warn-dirty = false;
auto-optimise-store = true;
trusted-users = [
"root"
"don"
];
trusted-users = [ "root" "don" ];
};
gc = {
automatic = true;
@ -35,12 +23,7 @@ in {
options = "--delete-older-than 7d";
};
};
imports = [
../../home
./systemd.nix
./tailscale.nix
./upgrade-diff.nix
];
imports = [ ../../home ./systemd.nix ./tailscale.nix ./upgrade-diff.nix ];
# Enable networking
networking.networkmanager.enable = true;
@ -59,17 +42,14 @@ in {
inputMethod = {
enable = true;
type = "fcitx5";
fcitx5.addons = with pkgs; [
fcitx5-mozc
fcitx5-gtk
];
fcitx5.addons = with pkgs; [ fcitx5-mozc fcitx5-gtk ];
};
};
# Bootloader.
boot = {
kernelPackages = pkgs.linuxPackages_latest;
kernelParams = ["consoleblank=60"];
kernelParams = [ "consoleblank=60" ];
#loader = {
#systemd-boot = {
#enable = true;
@ -79,53 +59,33 @@ in {
#efiSysMountPoint = "/boot";
#};
#};
plymouth = {
enable = true;
};
kernel = {
sysctl = {
"vm.swappiness" = 10;
};
};
plymouth = { enable = true; };
kernel = { sysctl = { "vm.swappiness" = 10; }; };
};
security = {
polkit = {
enable = true;
};
polkit = { enable = true; };
sudo.enable = false;
doas = {
enable = true;
extraRules = [
{
users = ["don"];
keepEnv = true;
noPass = true;
}
];
extraRules = [{
users = [ "don" ];
keepEnv = true;
noPass = true;
}];
};
};
services = {
pcscd = {
enable = true;
};
pcscd = { enable = true; };
avahi = {
enable = true;
nssmdns4 = true;
};
printing = {
enable = true;
};
udisks2 = {
enable = true;
};
nscd = {
enableNsncd = true;
};
tailscale = {
enable = true;
};
printing = { enable = true; };
udisks2 = { enable = true; };
nscd = { enableNsncd = true; };
tailscale = { enable = true; };
locate = {
enable = true;
package = pkgs.mlocate;
@ -206,12 +166,8 @@ in {
];
programs = {
dconf = {
enable = true;
};
mtr = {
enable = true;
};
dconf = { enable = true; };
mtr = { enable = true; };
gnupg = {
agent = {
enable = true;
@ -223,9 +179,7 @@ in {
nixpkgs.overlays = [
(final: super: {
khal = super.khal.overridePythonAttrs (_: {
doCheck = false;
});
khal = super.khal.overridePythonAttrs (_: { doCheck = false; });
})
];
@ -233,45 +187,33 @@ in {
networking.firewall = {
enable = true;
# always allow traffic from your Tailscale network
trustedInterfaces = ["tailscale0"];
trustedInterfaces = [ "tailscale0" ];
checkReversePath = "loose";
# allow the Tailscale UDP port through the firewall
allowedUDPPorts = [config.services.tailscale.port];
allowedTCPPortRanges = [
{
from = 1714;
to = 1764;
}
];
allowedUDPPortRanges = [
{
from = 1714;
to = 1764;
}
];
allowedUDPPorts = [ config.services.tailscale.port ];
allowedTCPPortRanges = [{
from = 1714;
to = 1764;
}];
allowedUDPPortRanges = [{
from = 1714;
to = 1764;
}];
# allow you to SSH in over the public internet
allowedTCPPorts = [22];
allowedTCPPorts = [ 22 ];
interfaces = {
"tailscale0" = {
allowedTCPPorts = [
22
8080
8443
];
allowedTCPPortRanges = [
{
from = 1714;
to = 1764;
}
];
allowedUDPPortRanges = [
{
from = 1714;
to = 1764;
}
];
allowedTCPPorts = [ 22 8080 8443 ];
allowedTCPPortRanges = [{
from = 1714;
to = 1764;
}];
allowedUDPPortRanges = [{
from = 1714;
to = 1764;
}];
};
};
};