move to snowfall

This commit is contained in:
zackartz 2024-05-23 20:26:30 +00:00
parent 9d7ad7c973
commit 769d4b0df5
No known key found for this signature in database
GPG key ID: 5B53E53A9A514DBA
188 changed files with 2203 additions and 3041 deletions

View file

@ -0,0 +1,36 @@
{
lib,
config,
pkgs,
...
}:
with lib;
with lib.custom; let
cfg = config.hardware.audio;
in {
options.hardware.audio = with types; {
enable = mkBoolOpt false "Enable Audio";
};
config = mkIf cfg.enable {
# Enable sound with pipewire.
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
# If you want to use JACK applications, uncomment this
jack.enable = true;
# use the example session manager (no others are packaged yet so this is enabled by default,
# no need to redefine it in your config for now)
wireplumber.enable = true;
};
sound = {
enable = true;
mediaKeys.enable = true;
};
};
}

View file

@ -0,0 +1,78 @@
{
lib,
config,
pkgs,
...
}:
with lib;
with lib.custom; let
cfg = config.hardware.nvidia;
in {
options.hardware.nvidia = with types; {
enable = mkBoolOpt false "Enable drivers for nvidia hardware";
};
config = mkIf cfg.enable {
services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.mkDriver {
version = "555.42.02";
sha256_64bit = "sha256-k7cI3ZDlKp4mT46jMkLaIrc2YUx1lh1wj/J4SVSHWyk=";
sha256_aarch64 = fakeSha256;
openSha256 = "sha256-rtDxQjClJ+gyrCLvdZlT56YyHQ4sbaL+d5tL4L4VfkA=";
settingsSha256 = "sha256-rtDxQjClJ+gyrCLvdZlT56YyHQ4sbaL+d5tL4L4VfkA=";
persistencedSha256 = fakeSha256;
};
hardware.nvidia = {
# Modesetting is required.
modesetting.enable = true;
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
# Enable this if you have graphical corruption issues or application crashes after waking
# up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
# of just the bare essentials.
powerManagement.enable = false;
# Fine-grained power management. Turns off GPU when not in use.
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
powerManagement.finegrained = false;
# Use the NVidia open source kernel module (not to be confused with the
# independent third-party "nouveau" open source driver).
# Support is limited to the Turing and later architectures. Full list of
# supported GPUs is at:
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
# Only available from driver 515.43.04+
# Currently alpha-quality/buggy, so false is currently the recommended setting.
open = false;
# Enable the Nvidia settings menu,
# accessible via `nvidia-settings`.
nvidiaSettings = true;
# Optionally, you may need to select the appropriate driver version for your specific GPU.
# package = config.boot.kernelPackages.nvidiaPackages.beta;
};
environment.variables = {
GBM_BACKEND = "nvidia-drm";
WLR_NO_HARDWARE_CURSORS = "1";
LIBVA_DRIVER_NAME = "nvidia";
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
__NV_PRIME_RENDER_OFFLOAD = "1";
__VK_LAYER_NV_optimus = "NVIDIA_only";
NVD_BACKEND = "direct";
# __GL_GSYNC_ALLOWED = "1";
# __GL_VRR_ALLOWED = "1";
XWAYLAND_NO_GLAMOR = "1";
__GL_MaxFramesAllowed = "1";
};
environment.systemPackages = with pkgs; [
vulkan-loader
vulkan-validation-layers
vulkan-tools
];
};
}

View file

@ -0,0 +1,80 @@
{
options,
config,
lib,
pkgs,
inputs,
...
}:
with lib;
with lib.custom; let
cfg = config.protocols.wayland;
in {
options.protocols.wayland = with types; {
enable = mkBoolOpt false "Enable Wayland Protocol";
};
config = mkIf cfg.enable {
environment.etc."greetd/environments".text = ''
bspwm
Hyprland
'';
services = {
greetd = {
enable = true;
settings = rec {
initial_session = {
command = "Hyprland";
user = "zack";
};
default_session = initial_session;
};
};
};
environment = {
variables = {
NIXOS_OZONE_WL = "1";
__GL_GSYNC_ALLOWED = "0";
__GL_VRR_ALLOWED = "0";
_JAVA_AWT_WM_NONEREPARENTING = "1";
SSH_AUTH_SOCK = "/run/user/1000/keyring/ssh";
DISABLE_QT5_COMPAT = "0";
GDK_BACKEND = "wayland,x11";
ANKI_WAYLAND = "1";
DIRENV_LOG_FORMAT = "";
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
QT_QPA_PLATFORM = "wayland;xcb";
DISABLE_QT_COMPAT = "0";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
MOZ_ENABLE_WAYLAND = "1";
WLR_BACKEND = "wayland";
WLR_RENDERER = "wayland";
XDG_SESSION_TYPE = "wayland";
SDL_VIDEODRIVER = "wayland";
XDG_CACHE_HOME = "/home/zack/.cache";
CLUTTER_BACKEND = "wayland";
};
loginShellInit = ''
dbus-update-activation-environment --systemd DISPLAY
eval $(gnome-keyring-daemon --start --components=ssh,secrets)
eval $(ssh-agent)
'';
};
hardware.pulseaudio.support32Bit = true;
xdg.portal = {
enable = true;
config.common.default = "*";
wlr.enable = true;
extraPortals = [
pkgs.xdg-desktop-portal-gtk
pkgs.xdg-desktop-portal-wlr
inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland
pkgs.xwaylandvideobridge
];
};
};
}

View file

@ -0,0 +1,31 @@
{
lib,
config,
pkgs,
...
}:
with lib;
with lib.custom; let
cfg = config.services.dlna;
in {
options.services.dlna = with types; {
enable = mkBoolOpt false "Enable MiniDLNA service";
};
config = mkIf cfg.enable {
services.minidlna = {
enable = true;
openFirewall = true;
settings = {
notify_interval = 60;
friendly_name = "ZACKPC";
media_dir = ["A,/home/zack/Music"];
inotify = "yes";
};
};
users.users.minidlna = {
extraGroups = ["users"];
};
};
}

View file

@ -0,0 +1,34 @@
{
lib,
config,
pkgs,
...
}:
with lib;
with lib.custom; let
cfg = config.services.vpn;
in {
options.services.vpn = with types; {
enable = mkBoolOpt false "Enable MiniDLNA service";
};
config = mkIf cfg.enable {
services.mullvad-vpn.enable = true;
services.openvpn.servers = {
work = {
config = ''config /home/zack/Downloads/zachary_myers.ovpn'';
updateResolvConf = true;
};
};
# disable autoconnect for now
# systemd.services."mullvad-daemon".postStart = let
# mullvad = config.services.mullvad-vpn.package;
# in ''
# while ! ${mullvad}/bin/mullvad status >/dev/null; do sleep 1; done
# ${mullvad}/bin/mullvad auto-connect set on
# ${mullvad}/bin/mullvad tunnel set ipv6 on
# ${mullvad}/bin/mullvad connect
# '';
};
}

View file

@ -0,0 +1,58 @@
{
options,
config,
lib,
pkgs,
...
}:
with lib;
with lib.custom; let
cfg = config.ui.fonts;
in {
options.ui.fonts = with types; {
enable = mkBoolOpt false "Enable Custom Fonts";
};
config = mkIf cfg.enable {
fonts = {
packages = with pkgs; [
material-icons
material-design-icons
roboto
work-sans
comic-neue
source-sans
twemoji-color-font
comfortaa
inter
lato
lexend
jost
dejavu_fonts
iosevka-bin
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
jetbrains-mono
(nerdfonts.override {fonts = ["Iosevka" "JetBrainsMono"];})
];
enableDefaultPackages = false;
# this fixes emoji stuff
fontconfig = {
defaultFonts = {
monospace = [
"Iosevka"
"Iosevka Nerd Font Complete Mono"
"Iosevka Nerd Font"
"Noto Color Emoji"
];
sansSerif = ["Inter" "Noto Color Emoji"];
serif = ["Noto Serif" "Noto Color Emoji"];
emoji = ["Noto Color Emoji"];
};
};
};
};
}