formated using alejandra
This commit is contained in:
parent
88a48b895c
commit
4b1114a616
92 changed files with 1377 additions and 1156 deletions
|
|
@ -1,22 +1,27 @@
|
|||
{ inputs, outputs, lib, config, pkgs, ... }:
|
||||
|
||||
let
|
||||
my-python-packages = python-packages: with python-packages; [
|
||||
pip
|
||||
# pipx
|
||||
python-dateutil
|
||||
setuptools
|
||||
requests
|
||||
];
|
||||
python-with-my-packages = pkgs.python3Full.withPackages my-python-packages;
|
||||
in
|
||||
{
|
||||
inputs,
|
||||
outputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
my-python-packages = python-packages:
|
||||
with python-packages; [
|
||||
pip
|
||||
# pipx
|
||||
python-dateutil
|
||||
setuptools
|
||||
requests
|
||||
];
|
||||
python-with-my-packages = pkgs.python3Full.withPackages my-python-packages;
|
||||
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;
|
||||
|
|
@ -24,15 +29,14 @@ in
|
|||
options = "--delete-older-than 7d";
|
||||
};
|
||||
};
|
||||
imports =
|
||||
[
|
||||
../../home
|
||||
../../home/gui
|
||||
./detect-reboot-needed.nix
|
||||
./systemd.nix
|
||||
./tailscale.nix
|
||||
./upgrade-diff.nix
|
||||
];
|
||||
imports = [
|
||||
../../home
|
||||
../../home/gui
|
||||
./detect-reboot-needed.nix
|
||||
./systemd.nix
|
||||
./tailscale.nix
|
||||
./upgrade-diff.nix
|
||||
];
|
||||
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
|
@ -46,7 +50,6 @@ in
|
|||
hardwareClockInLocalTime = false;
|
||||
};
|
||||
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.utf8";
|
||||
i18n.inputMethod = {
|
||||
|
|
@ -60,27 +63,27 @@ in
|
|||
# Bootloader.
|
||||
boot = {
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
kernelParams = [ "consoleblank=60" ];
|
||||
loader = if (pkgs.hostPlatform != lib.mkDefault "aarch64-linux") then
|
||||
{
|
||||
systemd-boot = {
|
||||
enable = true;
|
||||
kernelParams = ["consoleblank=60"];
|
||||
loader =
|
||||
if (pkgs.hostPlatform != lib.mkDefault "aarch64-linux")
|
||||
then {
|
||||
systemd-boot = {
|
||||
enable = true;
|
||||
};
|
||||
efi = {
|
||||
canTouchEfiVariables = true;
|
||||
efiSysMountPoint = "/boot";
|
||||
};
|
||||
}
|
||||
else {
|
||||
grub.enable = false;
|
||||
generic-extlinux-compatible.enable = true;
|
||||
};
|
||||
efi = {
|
||||
canTouchEfiVariables = true;
|
||||
efiSysMountPoint = "/boot";
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
grub.enable = false;
|
||||
generic-extlinux-compatible.enable = true;
|
||||
};
|
||||
plymouth = {
|
||||
enable = true;
|
||||
};
|
||||
kernel = {
|
||||
sysctl = { "vm.swappiness" = 10;};
|
||||
sysctl = {"vm.swappiness" = 10;};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -91,11 +94,13 @@ in
|
|||
sudo.enable = false;
|
||||
doas = {
|
||||
enable = true;
|
||||
extraRules = [{
|
||||
users = [ "don" ];
|
||||
keepEnv = true;
|
||||
noPass = true;
|
||||
}];
|
||||
extraRules = [
|
||||
{
|
||||
users = ["don"];
|
||||
keepEnv = true;
|
||||
noPass = true;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -173,7 +178,7 @@ in
|
|||
};
|
||||
sane = {
|
||||
enable = true;
|
||||
extraBackends = [ pkgs.sane-airscan ];
|
||||
extraBackends = [pkgs.sane-airscan];
|
||||
};
|
||||
};
|
||||
security.rtkit.enable = true;
|
||||
|
|
@ -191,7 +196,7 @@ in
|
|||
isNormalUser = true;
|
||||
initialPassword = "changeme";
|
||||
description = "Don Harper";
|
||||
extraGroups = [ "networkmanager" "wheel" "scanner" "lp" "video" "mlocate" "disk" ];
|
||||
extraGroups = ["networkmanager" "wheel" "scanner" "lp" "video" "mlocate" "disk"];
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINd8AdVbQQ/Fmw+b9mI8EMYqIoRkwmSwAOtmlte3incL don@loki"
|
||||
];
|
||||
|
|
@ -205,7 +210,7 @@ in
|
|||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nixpkgs.config.permittedInsecurePackages = [ "electron-25.9.0" ];
|
||||
nixpkgs.config.permittedInsecurePackages = ["electron-25.9.0"];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
#(callPackage ../mypackages/kanshi-fix/default.nix {})
|
||||
|
|
@ -267,36 +272,54 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(final: prev: { qutebrowser = prev.qutebrowser.override { enableWideVine = true; }; })
|
||||
(final: super:{ khal = super.khal.overridePythonAttrs (_: { doCheck = false; }); })
|
||||
(final: prev: {qutebrowser = prev.qutebrowser.override {enableWideVine = true;};})
|
||||
(final: super: {khal = super.khal.overridePythonAttrs (_: {doCheck = false;});})
|
||||
];
|
||||
|
||||
# Open ports in the firewall.
|
||||
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;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It's perfectly fine and recommended to leavecatenate(variables, "bootdev", bootdev)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue