2021-12-27 09:46:15 +00:00
|
|
|
{ tree, config, pkgs, lib, ... }:
|
2022-02-15 12:57:23 +00:00
|
|
|
let usb_data = import ./hardware/usb_data.nix { };
|
|
|
|
in {
|
2021-12-27 09:46:15 +00:00
|
|
|
imports = with tree; [
|
2021-12-28 22:59:28 +00:00
|
|
|
users.root
|
2022-01-29 21:44:38 +00:00
|
|
|
users.chaos
|
2021-12-27 09:46:15 +00:00
|
|
|
profiles.tailscale
|
2022-01-16 11:22:44 +00:00
|
|
|
profiles.dnscrypt
|
2022-02-02 15:49:09 +00:00
|
|
|
#profiles.printing
|
2022-01-16 11:22:44 +00:00
|
|
|
profiles.sshd
|
|
|
|
|
2022-02-15 12:57:23 +00:00
|
|
|
hosts.lappy.profiles.usb-automount
|
2022-03-02 16:19:09 +00:00
|
|
|
hosts.lappy.profiles.macos-vm
|
2022-02-14 17:22:46 +00:00
|
|
|
|
2022-01-16 11:37:09 +00:00
|
|
|
# required for dualsense controller
|
|
|
|
profiles.kernels.latest
|
|
|
|
|
2021-12-27 09:46:15 +00:00
|
|
|
profiles.laptop
|
2022-01-16 11:22:44 +00:00
|
|
|
|
2022-01-26 23:05:24 +00:00
|
|
|
# Bluetooth
|
2022-04-11 12:26:28 +01:00
|
|
|
#profiles.connectivity.bluetooth
|
2022-01-26 23:05:24 +00:00
|
|
|
|
2022-01-16 11:46:16 +00:00
|
|
|
profiles.connectivity.network_manager
|
2022-01-17 19:55:34 +00:00
|
|
|
profiles.connectivity.ios
|
2022-01-16 11:46:16 +00:00
|
|
|
|
2022-02-08 19:46:57 +00:00
|
|
|
profiles.sound.pipewire
|
2022-01-16 11:46:16 +00:00
|
|
|
|
2022-03-02 16:19:09 +00:00
|
|
|
profiles.gui.base
|
2022-02-14 14:56:05 +00:00
|
|
|
profiles.gui.environments.gnome
|
2022-01-16 11:22:44 +00:00
|
|
|
|
2022-01-29 23:51:11 +00:00
|
|
|
#profiles.gaming.steam
|
2022-01-16 11:22:44 +00:00
|
|
|
|
|
|
|
# for sci-hub and whenever websites break
|
|
|
|
profiles.tor
|
2022-01-16 11:37:09 +00:00
|
|
|
|
|
|
|
# For cross compiling and deploying to raspberry
|
|
|
|
profiles.cross.arm64
|
2021-12-27 09:46:15 +00:00
|
|
|
];
|
|
|
|
|
2022-03-02 16:19:09 +00:00
|
|
|
services.mullvad-vpn.enable = true;
|
|
|
|
|
2021-12-27 09:46:15 +00:00
|
|
|
home-manager.users.root = { imports = with tree; [ home.base ]; };
|
2022-01-29 21:44:38 +00:00
|
|
|
home-manager.users.chaos = {
|
2022-02-15 12:57:23 +00:00
|
|
|
programs.ssh.matchBlocks."*".identityFile = "${usb_data.ssh_priv_path}";
|
2022-02-16 09:26:38 +00:00
|
|
|
programs.git.extraConfig = {
|
|
|
|
gpg.format = "ssh";
|
|
|
|
commit.gpgsign = "true";
|
|
|
|
tag.gpgsign = "true";
|
|
|
|
user = { signingKey = "${usb_data.ssh_priv_path}"; };
|
2022-02-16 09:24:00 +00:00
|
|
|
};
|
2021-12-27 09:46:15 +00:00
|
|
|
imports = with tree; [
|
|
|
|
home.base
|
2022-01-03 16:50:22 +00:00
|
|
|
home.dev.all
|
2022-02-02 15:49:09 +00:00
|
|
|
#home.reversing
|
2022-01-16 11:22:44 +00:00
|
|
|
|
2022-03-02 16:19:09 +00:00
|
|
|
home.gui.base
|
2022-02-14 15:16:35 +00:00
|
|
|
home.gui.environments.gnome
|
2022-01-16 11:46:32 +00:00
|
|
|
|
2022-01-29 23:51:11 +00:00
|
|
|
#home.gaming.emulators.ds
|
2022-01-24 16:10:09 +00:00
|
|
|
#home.gaming.games.minecraft
|
2022-01-16 11:22:44 +00:00
|
|
|
#home.gaming.games.osu
|
2022-01-24 16:10:09 +00:00
|
|
|
#home.gaming.platforms.steam
|
2022-01-16 11:22:44 +00:00
|
|
|
|
2022-04-11 12:26:28 +01:00
|
|
|
#home.bluetooth
|
|
|
|
#home.network_manager
|
2022-01-16 11:22:44 +00:00
|
|
|
|
2021-12-27 09:46:15 +00:00
|
|
|
home.apps.vivaldi
|
|
|
|
home.apps.telegram
|
2022-01-03 21:13:15 +00:00
|
|
|
home.apps.quassel
|
2022-02-02 15:49:09 +00:00
|
|
|
home.apps.mpv
|
2022-02-06 08:29:02 +00:00
|
|
|
home.apps.strawberry
|
2022-02-02 15:49:09 +00:00
|
|
|
home.apps.file-roller
|
|
|
|
home.apps.nautilus
|
2022-02-06 08:29:02 +00:00
|
|
|
home.apps.nicotine-plus
|
2022-02-07 11:14:09 +00:00
|
|
|
home.apps.musicutil
|
2022-02-13 13:57:39 +00:00
|
|
|
home.apps.pavucontrol
|
2022-03-02 16:19:09 +00:00
|
|
|
home.apps.mullvad
|
|
|
|
home.apps.aria2
|
2022-03-09 18:53:48 +00:00
|
|
|
home.apps.aegisub
|
2022-01-16 11:22:44 +00:00
|
|
|
|
2022-02-23 15:37:02 +00:00
|
|
|
home.programming.editors.vscode
|
2022-02-02 15:49:09 +00:00
|
|
|
home.programming.languages.go
|
2021-12-27 09:46:15 +00:00
|
|
|
home.programming.languages.nix
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2022-02-14 15:16:35 +00:00
|
|
|
hardware.opengl.extraPackages = with pkgs; [
|
|
|
|
vaapiIntel
|
|
|
|
vaapiVdpau
|
|
|
|
libvdpau-va-gl
|
|
|
|
intel-media-driver
|
|
|
|
];
|
|
|
|
|
2022-03-02 16:19:09 +00:00
|
|
|
#services.getty.extraArgs = [ "--skip-login" "--login-options" "chaos" ];
|
2022-01-01 15:16:12 +00:00
|
|
|
|
2021-12-29 16:12:15 +00:00
|
|
|
networking.firewall.enable = true;
|
2022-03-02 16:19:09 +00:00
|
|
|
networking.firewall.allowPing = true;
|
|
|
|
|
|
|
|
# Allow Soulseek
|
|
|
|
networking.firewall.allowedTCPPorts = [ 22 2235 ];
|
|
|
|
networking.firewall.allowedTCPPortRanges = [
|
|
|
|
# Allow aria2 to work
|
2022-03-09 18:53:48 +00:00
|
|
|
{
|
|
|
|
from = 6881;
|
|
|
|
to = 6999;
|
|
|
|
}
|
|
|
|
{
|
|
|
|
from = 50101;
|
|
|
|
to = 50109;
|
|
|
|
}
|
2022-03-02 16:19:09 +00:00
|
|
|
];
|
|
|
|
networking.firewall.allowedUDPPortRanges = [
|
|
|
|
# Allow aria2 to work
|
2022-03-09 18:53:48 +00:00
|
|
|
{
|
|
|
|
from = 6881;
|
|
|
|
to = 6999;
|
|
|
|
}
|
|
|
|
{
|
|
|
|
from = 50101;
|
|
|
|
to = 50109;
|
|
|
|
}
|
2022-03-02 16:19:09 +00:00
|
|
|
];
|
|
|
|
|
2021-12-29 16:12:15 +00:00
|
|
|
# let vscode, vivaldi, etc work.
|
|
|
|
security.unprivilegedUsernsClone = true;
|
|
|
|
|
2022-02-15 11:02:07 +00:00
|
|
|
nix.settings.auto-optimise-store = true;
|
|
|
|
nix.gc = {
|
|
|
|
automatic = true;
|
|
|
|
dates = "daily";
|
|
|
|
options = "--delete-older-than 4d";
|
|
|
|
};
|
|
|
|
|
2021-12-27 09:46:15 +00:00
|
|
|
networking.hostName = "lappy";
|
|
|
|
time.timeZone = "Europe/London";
|
|
|
|
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
|
|
|
|
|
|
|
services.fstrim.enable = true;
|
|
|
|
|
|
|
|
system.stateVersion = "21.11";
|
|
|
|
}
|
|
|
|
|