215 lines
5.1 KiB
Nix
Executable file
215 lines
5.1 KiB
Nix
Executable file
|
|
{ config, pkgs, ... }:
|
|
|
|
# let
|
|
# lemurs = callPackage ./system/syspkgs/lemurs.nix {};
|
|
# ly = callPackage ./system/syspkgs/ly.nix {};
|
|
# in
|
|
{
|
|
|
|
imports = [
|
|
# where are we ?
|
|
#./wollomi.nix
|
|
# ./adrift.nix
|
|
./quiver.nix
|
|
|
|
# home manager should exist for users
|
|
<home-manager/nixos>
|
|
|
|
./cachix.nix
|
|
|
|
# declarative cachix
|
|
(import (builtins.fetchTarball "https://github.com/jonascarpay/declarative-cachix/archive/master.tar.gz"))
|
|
|
|
];
|
|
|
|
cachix = [
|
|
"nix-community"
|
|
];
|
|
|
|
nix.extraOptions = ''
|
|
experimental-features = nix-command flakes
|
|
keep-outputs = true
|
|
keep-derivations = true
|
|
'';
|
|
|
|
environment.sessionVariables = rec {
|
|
WLR_NO_HARDWARE_CURSORS = "1";
|
|
GBM_BACKEND = "nvidia-drm";
|
|
NVD_BACKEND = "direct";
|
|
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
|
|
LIBVA_DRIVER_NAME = "nvidia";
|
|
__GL_GSYNC_ALLOWED = "1";
|
|
__GL_VRR_ALLOWED = "1";
|
|
};
|
|
|
|
environment.pathsToLink = [ "/share/zsh" ];
|
|
boot.loader.systemd-boot.enable = true;
|
|
boot.loader.systemd-boot.configurationLimit = 5;
|
|
boot.loader.systemd-boot.consoleMode = "max";
|
|
boot.loader.timeout = 3;
|
|
|
|
boot.kernelPackages = pkgs.linuxPackages_xanmod_latest;
|
|
|
|
boot.tmpOnTmpfs = true;
|
|
|
|
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
|
|
|
time.timeZone = "Australia/Sydney";
|
|
time.hardwareClockInLocalTime = true;
|
|
|
|
# Select internationalisation properties.
|
|
i18n.defaultLocale = "en_AU.UTF-8";
|
|
i18n.supportedLocales = [ "en_AU.UTF-8/UTF-8" ];
|
|
console = {
|
|
font = "Lat2-Terminus16";
|
|
useXkbConfig = true; # use xkbOptions in tty.
|
|
};
|
|
|
|
nixpkgs.config.allowUnfree = true;
|
|
hardware.opengl.enable = true;
|
|
hardware.opengl.driSupport32Bit = true;
|
|
|
|
#input stuff
|
|
services.xserver.enable = false;
|
|
services.xserver.xkbOptions = "caps:escape";
|
|
services.xserver.layout = "us";
|
|
services.xserver.libinput.enable = true;
|
|
# kde time
|
|
services.xserver.desktopManager.plasma5.enable = true;
|
|
services.xserver.displayManager.lightdm.enable = false; # gets installed by default..
|
|
# services.xserver.displayManager.sddm = {
|
|
# enable = true;
|
|
# theme = "${(pkgs.fetchFromGitHub {
|
|
# owner = "EricKotato";
|
|
# repo = "sddm-slice";
|
|
# rev = "763b8f4e01c00c1f8590fc7a103e14f6e8449443";
|
|
# sha256 = "sha256-UW53ZdKb3RSrrcZ9GxZsJyjzS/uKR8lkaLLyi+2o27U=";
|
|
# })}";
|
|
# autoNumlock = true;
|
|
# settings = {
|
|
# General = {
|
|
# InputMethod = "";
|
|
# };
|
|
# };
|
|
# };
|
|
|
|
services.greetd = {
|
|
enable = true;
|
|
settings = {
|
|
default_session = {
|
|
command = "${pkgs.greetd.tuigreet}/bin/tuigreet -r -g \"what's good\" --time --sessions ${config.services.xserver.displayManager.sessionData.desktops}/share/wayland-sessions";
|
|
# export SESSION_DIRS=${config.services.xserver.displayManager.sessionData.desktops}/share/wayland-sessions;
|
|
# command = "${pkgs.greetd.regreet}/bin/regreet -l off";
|
|
user = "greeter";
|
|
};
|
|
};
|
|
};
|
|
|
|
|
|
security.polkit.enable = true;
|
|
|
|
services.xserver.desktopManager.plasma5.runUsingSystemd = true;
|
|
programs.dconf.enable = true;
|
|
|
|
xdg.autostart.enable = true;
|
|
|
|
services.resolved = {
|
|
enable = true;
|
|
fallbackDns = [ "103.1.206.179" "168.138.8.38" "168.138.12.137" ];
|
|
dnssec = "false";
|
|
};
|
|
|
|
|
|
# Enable sound.
|
|
security.rtkit.enable = true;
|
|
services.pipewire = {
|
|
enable = true;
|
|
alsa.enable = true;
|
|
alsa.support32Bit = true;
|
|
pulse.enable = true;
|
|
# jack.enable = true;
|
|
};
|
|
|
|
# gtk compatibility
|
|
qt.enable = true;
|
|
qt.style = "kvantum";
|
|
qt.platformTheme = "qt5ct";
|
|
|
|
programs.zsh.enable = true;
|
|
users.defaultUserShell = pkgs.zsh;
|
|
|
|
services.tailscale.enable = true;
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
rnix-lsp
|
|
|
|
tailscale
|
|
|
|
home-manager
|
|
cachix
|
|
|
|
helix
|
|
ark
|
|
|
|
curl
|
|
|
|
git
|
|
|
|
zsh
|
|
|
|
nix-index
|
|
comma
|
|
|
|
river
|
|
|
|
|
|
|
|
];
|
|
|
|
networking.wg-quick.interfaces = {
|
|
mullvad = {
|
|
address = [ "10.66.224.186/32" ];
|
|
dns = [ "10.64.0.1" ];
|
|
privateKey = "WD0CNYazB8D19SJvwz/TdPqoWgWCGfTwA7mim16q7UM=";
|
|
peers = [
|
|
{
|
|
publicKey = "QhE7I5TnUuc3gLqSeF9KhOr0oew5v03bpj0EHrEOR2M=";
|
|
allowedIPs = [ "0.0.0.0/0" ];
|
|
endpoint = "89.44.10.66:51820";
|
|
persistentKeepalive = 25;
|
|
}
|
|
];
|
|
};
|
|
};
|
|
|
|
networking.firewall.enable = true;
|
|
networking.firewall = {
|
|
trustedInterfaces = [ "tailscale0" ];
|
|
checkReversePath = "loose";
|
|
};
|
|
|
|
systemd.services.fixNetworkingForTailscale = {
|
|
wantedBy = [ "multi-user.target" ];
|
|
after = [ "network.target" "wg-quick-mullvad.service" ];
|
|
description = "fix the damn routing table";
|
|
serviceConfig = {
|
|
Type = "oneshot";
|
|
User = "root";
|
|
ExecStart = ''${pkgs.bash}/bin/bash -c 'if [[ "$( ${pkgs.iproute2}/bin/ip rule | grep -e "62:.*52" | wc -l)" -eq 0 ]]; then ${pkgs.iproute2}/bin/ip rule add pref 62 table 52; fi'''';
|
|
# ExecStop = ''${pkgs.iproute2}/bin/ip rule del pref 62 table 52'';
|
|
};
|
|
};
|
|
|
|
security.pam.services.waylock = {
|
|
text =''
|
|
auth include login
|
|
'';
|
|
};
|
|
|
|
|
|
system.stateVersion = "22.05"; # Did you read the comment?
|
|
|
|
}
|
|
|