formatted

This commit is contained in:
atagen 2023-04-21 01:58:39 +10:00
parent ba1684c8d4
commit 737ca01e49
24 changed files with 468 additions and 411 deletions

View file

@ -1,12 +1,16 @@
{ inputs, outputs, lib, config, pkgs, ... }:
# let
{
inputs,
outputs,
lib,
config,
pkgs,
...
}:
# let
# lemurs = callPackage ./system/syspkgs/lemurs.nix {};
# ly = callPackage ./system/syspkgs/ly.nix {};
# in
{
nixpkgs = {
overlays = [
outputs.overlays.additions
@ -15,50 +19,49 @@
};
nix = {
registry = lib.mapAttrs(_: value: { flake = value; }) inputs;
registry = lib.mapAttrs (_: value: {flake = value;}) inputs;
settings = {
experimental-features = "nix-command flakes";
};
};
# imports = [
# inputs.declarative-cachix
# inputs.helix
# inputs.declarative-cachix
# inputs.helix
# ];
# cachix = [
# "nix-community"
# ];
nix.extraOptions = ''
keep-outputs = true
keep-derivations = true
'';
systemd.services.NetworkManager-wait-online.enable = true;
environment.pathsToLink = [ "/share/zsh" ];
environment.pathsToLink = ["/share/zsh"];
boot.loader.systemd-boot.consoleMode = "max";
boot.loader.timeout = 3;
boot.loader.systemd-boot.enable = true;
boot.tmpOnTmpfs = true;
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
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" ];
i18n.supportedLocales = ["en_AU.UTF-8/UTF-8"];
console = {
font = "Lat2-Terminus16";
useXkbConfig = true; # use xkbOptions in tty.
font = "Lat2-Terminus16";
useXkbConfig = true; # use xkbOptions in tty.
};
nixpkgs.config.allowUnfree = true;
hardware.opengl.enable = true;
hardware.opengl.driSupport32Bit = true;
@ -88,10 +91,9 @@
services.resolved = {
enable = true;
fallbackDns = [ "103.1.206.179" "168.138.8.38" "168.138.12.137" ];
fallbackDns = ["103.1.206.179" "168.138.8.38" "168.138.12.137"];
dnssec = "false";
};
# Enable sound.
security.rtkit.enable = true;
@ -109,12 +111,10 @@
programs.zsh.enable = true;
users.defaultUserShell = pkgs.zsh;
services.tailscale.enable = true;
environment.systemPackages = with pkgs; [
rnix-lsp
tailscale
@ -124,9 +124,9 @@
# helix
ark
curl
git
zsh
@ -137,53 +137,49 @@
cachix
alejandra
];
# services.mullvad-vpn.enable = true;
networking.wg-quick.interfaces = {
mullvad = {
address = [ "10.67.227.64/32" ];
dns = [ "10.64.0.1" ];
address = ["10.67.227.64/32"];
dns = ["10.64.0.1"];
privateKey = "OOPAlePjy7x2DVpg6d7BoBqpST3lDJSYght185tSUl8=";
peers = [
{
publicKey = "LXuRwa9JRTt2/UtldklKGlj/IVLORITqgET4II4DRkU=";
allowedIPs = [ "0.0.0.0/0" ];
allowedIPs = ["0.0.0.0/0"];
endpoint = "146.70.200.194:51820";
persistentKeepalive = 25;
}
];
};
};
networking.firewall.enable = true;
networking.firewall = {
trustedInterfaces = [ "tailscale0" ];
trustedInterfaces = ["tailscale0"];
checkReversePath = "loose";
};
systemd.services.fixNetworkingForTailscale = {
wantedBy = [ "multi-user.target" ];
after = [ "network.target" "mullvad-daemon.service" ];
wantedBy = ["multi-user.target"];
after = ["network.target" "mullvad-daemon.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'';
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 =''
text = ''
auth include login
'';
};
system.stateVersion = "23.05"; # Did you read the comment? # lol no
}

View file

@ -1,13 +1,13 @@
{ inputs, ... }:
{
additions = final: _prev: import ./pkgs { pkgs = final; };
unstable-pkgs = final: _prev: {
unstable = import inputs.nixpkgs {
system = final.system;
config.allowUnfree = true;
};
};
{inputs, ...}: {
additions = final: _prev: import ./pkgs {pkgs = final;};
unstable-pkgs = final: _prev: {
unstable = import inputs.nixpkgs {
system = final.system;
config.allowUnfree = true;
};
};
}
# inputs: _: prev: {
# system76-scheduler = prev.callPackage ./syspkgs/system76-scheduler.nix {};
# }

View file

@ -1,28 +1,34 @@
{ inputs, outputs, config, lib, pkgs, overlays, modulesPath, ... }:
{
{
inputs,
outputs,
config,
lib,
pkgs,
overlays,
modulesPath,
...
}: {
nix.settings = {
substituters = [ "https://hyprland.cachix.org" ];
substituters = ["https://hyprland.cachix.org"];
trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="];
};
imports = [
./configuration.nix
inputs.hyprland.nixosModules.default
];
imports = [
./configuration.nix
inputs.hyprland.nixosModules.default
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbcore" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" "i2c-dev" ];
boot.extraModulePackages = [ ];
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "usbcore" "sd_mod"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-amd" "i2c-dev"];
boot.extraModulePackages = [];
boot.kernelParams = [
"nvidia_drm.modeset=1"
"mitigations=off"
"acpi_enforce_resources=lax"
"preempt=full"
"quiet"
"loglevel=3"
"nvidia_drm.modeset=1"
"mitigations=off"
"acpi_enforce_resources=lax"
"preempt=full"
"quiet"
"loglevel=3"
"systemd.show_status=auto"
"rd.udev.log_level=3"
"vt.global_cursor_default=0"
@ -33,8 +39,8 @@
boot.loader.systemd-boot.configurationLimit = 5;
boot.loader.efi.canTouchEfiVariables = true;
# boot.plymouth.enable = true;
boot.supportedFilesystems = [ "ntfs" ];
boot.supportedFilesystems = ["ntfs"];
security.tpm2.enable = true;
@ -66,7 +72,7 @@
settings = {
notify_interval = 120;
friendly_name = "PC";
media_dir = [ "A,/data/Music/Slsk" ];
media_dir = ["A,/data/Music/Slsk"];
};
};
@ -79,14 +85,14 @@
nvidiaPatches = true;
};
services.xserver.videoDrivers = [ "nvidia" ];
services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
hardware.nvidia.modesetting.enable = true;
hardware.nvidia.powerManagement.enable = true;
programs.xwayland.enable = true;
systemd.services.no-rgb = {
wantedBy = [ "multi-user.target" ];
wantedBy = ["multi-user.target"];
description = "rgb led turn-off-er";
serviceConfig = {
Type = "oneshot";
@ -95,7 +101,7 @@
};
systemd.services."com.system76.Scheduler" = {
wantedBy = [ "multi-user.target" ];
wantedBy = ["multi-user.target"];
description = "the system76 process scheduler";
serviceConfig = {
Type = "dbus";
@ -121,8 +127,8 @@
enable = true;
motherboard = "amd";
};
hardware.ckb-next.enable = true;
hardware.ckb-next.enable = true;
xdg.portal = {
enable = true;
@ -141,42 +147,40 @@
xdg-desktop-portal-gtk
];
};
environment.systemPackages = with pkgs;
[
ckb-next
openrgb
wl-clipboard
wl-clipboard-x11
xclip
# system76-scheduler
];
environment.systemPackages = with pkgs; [
ckb-next
openrgb
wl-clipboard
wl-clipboard-x11
xclip
# system76-scheduler
];
networking.hostName = "quiver"; # Define your hostname.
users.users.bolt = {
isNormalUser = true;
extraGroups = [ "wheel" ]; # Enable sudo for the user.
extraGroups = ["wheel"]; # Enable sudo for the user.
};
fileSystems."/" =
{ device = "/dev/disk/by-uuid/d227445f-6120-4768-8e1b-011f097505c1";
fsType = "ext4";
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/d227445f-6120-4768-8e1b-011f097505c1";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/6B75-AF9F";
fsType = "vfat";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/6B75-AF9F";
fsType = "vfat";
};
fileSystems."/data" = {
device = "/dev/disk/by-uuid/39D4F78C658E8B56";
fsType = "ntfs";
options = [ "rw" "uid=1000" "gid=100" ];
};
networking.firewall = {
allowedUDPPorts = [ 1900 ];
allowedTCPPorts = [ 8200 2234 ];
options = ["rw" "uid=1000" "gid=100"];
};
networking.firewall = {
allowedUDPPorts = [1900];
allowedTCPPorts = [8200 2234];
};
}