misc general changes / nixpkgs break fixes

This commit is contained in:
outfoxxed 2025-01-06 00:39:41 -08:00
parent 4b90113a54
commit a5b19fc918
Signed by: outfoxxed
GPG key ID: 4C88A185FB89301E
15 changed files with 272 additions and 67 deletions

View file

@ -75,6 +75,7 @@
./modules/devenv ./modules/devenv
./modules/system.nix ./modules/system.nix
./modules/hyprland ./modules/hyprland
./modules/xserver
./systems/msi ./systems/msi
]; ];
}; };

View file

@ -1,14 +1,23 @@
{ inputs, pkgs, ... }: { { inputs, lib, pkgs, ... }: {
boot.loader = { boot.loader = {
systemd-boot.enable = true; systemd-boot.enable = true;
efi.canTouchEfiVariables = true; efi.canTouchEfiVariables = true;
}; };
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"osu-lazer-bin"
"unrar"
"steam"
"steam-original"
"corefonts"
"vista-fonts"
"steam-unwrapped"
];
nixpkgs.config.permittedInsecurePackages = [ nixpkgs.config.permittedInsecurePackages = [
"electron-24.8.6" "jitsi-meet-1.0.8043"
"electron-25.9.0" "electron-28.3.3"
"electron-27.3.11"
]; ];
documentation = { documentation = {
@ -25,8 +34,10 @@
]; ];
nix = { nix = {
# hardlink duplicate files in the nix store settings = {
settings.auto-optimise-store = true; # hardlink duplicate files in the nix store
auto-optimise-store = true;
};
extraOptions = '' extraOptions = ''
experimental-features = nix-command flakes experimental-features = nix-command flakes
@ -34,6 +45,8 @@
# keep intermediary deps alive (no redownloading to rebuild after gc) # keep intermediary deps alive (no redownloading to rebuild after gc)
keep-outputs = true keep-outputs = true
keep-derivations = true keep-derivations = true
builders-use-substitutes = true
''; '';
# flake registries are used by the new nix commands. # flake registries are used by the new nix commands.
@ -49,6 +62,18 @@
"nixpkgs=/etc/nix/inputs/nixpkgs" "nixpkgs=/etc/nix/inputs/nixpkgs"
"stable=/etc/nix/inputs/stable" "stable=/etc/nix/inputs/stable"
]; ];
distributedBuilds = true;
buildMachines = [ {
hostName = "192.168.2.1";
system = "x86_64-linux";
protocol = "ssh-ng";
supportedFeatures = [ "big-parallel" "kvm" "nixos-test" "benchmark" ];
speedFactor = 100;
maxJobs = 16;
sshUser = "nix-remote-build";
sshKey = "/root/.ssh/id_build_server";
} ];
}; };
# add entries for `nixPath` above. # add entries for `nixPath` above.

View file

@ -1,11 +1,15 @@
{ system, inputs, impurity, lib, config, pkgs, ... }: let { system, inputs, impurity, lib, config, pkgs, ... }: let
inherit (inputs) hyprland hyprland-hy3 quickshell; inherit (inputs) hyprland hyprsunset hyprpicker hyprland-hy3 quickshell;
exe = hyprland.packages.${system}.default.overrideAttrs (final: prev: {
dontStrip = true;
});
# I blame home manager # I blame home manager
wrapper = pkgs.callPackage ({ ... }: pkgs.writeShellScriptBin "hyprland" '' wrapper = pkgs.callPackage ({ ... }: pkgs.writeShellScriptBin "hyprland" ''
${builtins.readFile ./session.sh} ${builtins.readFile ./session.sh}
${config.hyprland-session.prerun} ${config.hyprland-session.prerun}
${hyprland.packages.${system}.default}/bin/Hyprland $@ ${lib.getExe exe} $@
'') {}; '') {};
in { in {
imports = [ hyprland.nixosModules.default ]; imports = [ hyprland.nixosModules.default ];
@ -20,6 +24,12 @@ in {
type = types.separatedString "\n"; type = types.separatedString "\n";
default = ""; default = "";
}; };
# same as above but no impurity so the greeter works
extraConfigStatic = mkOption {
type = types.separatedString "\n";
default = "";
};
}; };
config = { config = {
@ -54,7 +64,10 @@ in {
grim grim
slurp slurp
playerctl playerctl
wf-recorder wl-screenrec
hyprsunset.packages.${system}.default
hyprpicker.packages.${system}.default
]; ];
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {

View file

@ -1,4 +1,4 @@
exec-once = quickshell -c shell exec-once = qs -c shell
exec = systemctl start --user emacs.service && emacsclient -e "(setenv \"HYPRLAND_INSTANCE_SIGNATURE\" \"$HYPRLAND_INSTANCE_SIGNATURE\")" exec = systemctl start --user emacs.service && emacsclient -e "(setenv \"HYPRLAND_INSTANCE_SIGNATURE\" \"$HYPRLAND_INSTANCE_SIGNATURE\")"
@ -17,7 +17,6 @@ input {
kb_layout = us kb_layout = us
sensitivity = 0 sensitivity = 0
follow_mouse = 1 follow_mouse = 1
mouse_refocus = false
accel_profile = flat accel_profile = flat
} }
@ -31,13 +30,17 @@ decoration {
noise = 0.008 noise = 0.008
contrast = 0.8916 contrast = 0.8916
brightness = 0.8 brightness = 0.8
input_methods = yes
} }
drop_shadow = no shadow {
enabled = false
}
} }
animations { animations {
enabled = yes enabled = yes
first_launch_animation = no
bezier = windowIn, 0.06, 0.71, 0.25, 1 bezier = windowIn, 0.06, 0.71, 0.25, 1
bezier = windowResize, 0.04, 0.67, 0.38, 1 bezier = windowResize, 0.04, 0.67, 0.38, 1
@ -48,7 +51,7 @@ animations {
animation = border, 1, 10, default animation = border, 1, 10, default
animation = borderangle, 1, 8, default animation = borderangle, 1, 8, default
animation = fade, 1, 3, default animation = fade, 1, 3, default
animation = workspaces, 1, 6, default animation = workspaces, 1, 6, default, slidevert
animation = layers, 1, 5, windowIn, slide animation = layers, 1, 5, windowIn, slide
} }
@ -62,22 +65,28 @@ gestures {
misc { misc {
disable_hyprland_logo = true disable_hyprland_logo = true
disable_splash_rendering = true disable_splash_rendering = true
vrr = 1
no_direct_scanout = false
key_press_enables_dpms = true key_press_enables_dpms = true
} }
render {
explicit_sync = true
#direct_scanout = true
}
binds { binds {
workspace_back_and_forth = true workspace_back_and_forth = true
} }
plugin { plugin {
hy3 { hy3 {
tabs { tabs {
height = 2 border_width = 1
padding = 6 col.active = rgba(33ccff20)
render_text = false col.border.active = rgba(33ccffee)
} col.text.active = rgba(ffffffff)
col.inactive = rgba(30303020)
col.border.inactive = rgba(595959aa)
}
autotile { autotile {
enable = true enable = true
@ -87,8 +96,13 @@ plugin {
} }
} }
misc {
vfr = on
}
debug { debug {
disable_logs = no disable_logs = no
overlay = off
} }
monitor = , preferred, auto, 1 monitor = , preferred, auto, 1
@ -110,10 +124,15 @@ layerrule = animation fade, shell:background
layerrule = blur, shell:bar layerrule = blur, shell:bar
layerrule = blurpopups, shell:bar layerrule = blurpopups, shell:bar
layerrule = ignorezero, shell:bar layerrule = ignorezero, shell:bar
layerrule = noanim, shell:bar layerrule = blur, shell:notifications
layerrule = ignorezero, shell:notifications
layerrule = noanim, shell:notifications
layerrule = noanim, shell:screenshot layerrule = noanim, shell:screenshot
layerrule = blur, shell:launcher
layerrule = ignorezero, shell:launcher
layerrule = animation popin 90%, shell:launcher
windowrulev2 = float, class:^(opensnitch_ui)$ windowrulev2 = float, class:^(opensnitch_ui)$
windowrulev2 = dimaround, class:^(opensnitch_ui)$ windowrulev2 = dimaround, class:^(opensnitch_ui)$
@ -125,11 +144,12 @@ windowrulev2 = float, class:^(org.freedesktop.impl.portal.desktop.kde)$
windowrulev2 = size 1000 700, class:^(org.freedesktop.impl.portal.desktop.kde)$ windowrulev2 = size 1000 700, class:^(org.freedesktop.impl.portal.desktop.kde)$
windowrulev2 = center, class:^(org.freedesktop.impl.portal.desktop.kde)$ windowrulev2 = center, class:^(org.freedesktop.impl.portal.desktop.kde)$
windowrulev2 = dimaround, class:^(org.freedesktop.impl.portal.desktop.kde)$ windowrulev2 = dimaround, class:^(org.freedesktop.impl.portal.desktop.kde)$
windowrulev2 = float, title:^(OpenSSH Authentication Passphrase request)$
windowrulev2 = float, class:^(AlacrittyFloating)$ windowrulev2 = float, class:^(AlacrittyFloating)$
$mod = SUPER $mod = SUPER
$launcher = walker $launcher = qs msg -c shell launcher open
bind = $mod+SHIFT, m, exit bind = $mod+SHIFT, m, exit
@ -138,12 +158,12 @@ bind = $mod+SHIFT, return, exec, alacritty --class AlacrittyFloating
bind = $mod, grave, exec, $launcher bind = $mod, grave, exec, $launcher
bind = $mod+SHIFT, q, hy3:killactive bind = $mod+SHIFT, q, hy3:killactive
bind = $mod+SHIFT, s, global, shell:screenshot bind = $mod+SHIFT, s, exec, qs msg -c shell screenshot takeScreenshot
bind = $mod, c, global, shell:termselect bind = $mod, PERIOD, exec, qs msg -c shell lockscreen lock
bind = $mod, PERIOD, exec, quickshell -c lockscreen
bind = $mod, f, fullscreen, 1 bind = $mod, f, fullscreen, 1
bind = $mod+SHIFT, f, fullscreen, 0 bind = $mod+SHIFT, f, fullscreen, 0
bind = $mod, tab, hy3:togglefocuslayer
bind = $mod+SHIFT, tab, togglefloating bind = $mod+SHIFT, tab, togglefloating
bind = $mod, d, hy3:makegroup, h bind = $mod, d, hy3:makegroup, h
@ -162,10 +182,18 @@ bindn = , mouse_down, hy3:focustab, l, require_hovered
bindn = , mouse_up, hy3:focustab, r, require_hovered bindn = , mouse_up, hy3:focustab, r, require_hovered
bind = $mod, q, hy3:warpcursor bind = $mod, q, hy3:warpcursor
bind = ,XF86AudioPlay, exec, playerctl play-pause bind = $mod, i, exec, hyprctl keyword plugin:hy3:tabs:height 20
bind = ,XF86AudioStop, exec, playerctl -a stop bind = $mod, i, exec, hyprctl keyword plugin:hy3:tabs:render_text true
bind = ,XF86AudioNext, exec, playerctl next bind = $mod, o, exec, hyprctl keyword plugin:hy3:tabs:height 20
bind = ,XF86AudioPrev, exec, playerctl previous bind = $mod, o, exec, hyprctl keyword plugin:hy3:tabs:render_text true
bindr = $mod, o, exec, hyprctl keyword plugin:hy3:tabs:height 2
bindr = $mod, o, exec, hyprctl keyword plugin:hy3:tabs:render_text false
bind = ,XF86AudioStop, exec, qs msg -c shell mpris pauseAll
bind = ,XF86AudioPlay, exec, qs msg -c shell mpris playPause
bind = ,XF86AudioNext, exec, qs msg -c shell mpris next
bind = ,XF86AudioPrev, exec, qs msg -c shell mpris previous
bind = $mod, h, hy3:movefocus, l bind = $mod, h, hy3:movefocus, l
bind = $mod, j, hy3:movefocus, d bind = $mod, j, hy3:movefocus, d

View file

@ -1,7 +1,5 @@
# session # session
export XDG_SESSION_TYPE=wayland export XDG_SESSION_TYPE=wayland
export XDG_SESSION_DESKTOP=hyprland
export XDG_CURRENT_DESKTOP=hyprland
# firefox # firefox
export MOZ_ENABLE_WAYLAND=1 export MOZ_ENABLE_WAYLAND=1
@ -28,7 +26,7 @@ export NIXOS_OZONE_WL=1
# cursed dbus # cursed dbus
dbus-update-activation-environment --systemd MOZ_ENABLE_WAYLAND MOZ_DBUS_REMOTE QT_QPA_PLATFORM QT_QPA_PLATFORMTHEME QT_WAYLAND_DISABLE_WINDOWDECORATION SDL_VIDEODRIVER _JAVA_AWT_WM_NONREPARENTING JDK_JAVA_OPTIONS XCURSOR_SIZE XCURSOR_THEME dbus-update-activation-environment --systemd MOZ_ENABLE_WAYLAND MOZ_DBUS_REMOTE QT_QPA_PLATFORM QT_QPA_PLATFORMTHEME QT_WAYLAND_DISABLE_WINDOWDECORATION SDL_VIDEODRIVER _JAVA_AWT_WM_NONREPARENTING JDK_JAVA_OPTIONS XCURSOR_SIZE XCURSOR_THEME NIXOS_OZONE_WL
# theme in dbus: # theme in dbus:
# QT_PLUGIN_PATH=<qt5ct>/lib/qt-ver/plugins + breeze will correctly set the theme. # QT_PLUGIN_PATH=<qt5ct>/lib/qt-ver/plugins + breeze will correctly set the theme.

View file

@ -11,35 +11,55 @@
programs.dconf.enable = true; programs.dconf.enable = true;
#services.cpupower-gui.enable = true;
# power management
services.tlp.enable = true;
# battery status in ironbar
services.upower.enable = true; services.upower.enable = true;
services.power-profiles-daemon.enable = true;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
git git
git-lfs
vim vim
]; ];
services.ntp.enable = true;
networking = { networking = {
networkmanager = { networkmanager = {
enable = true; enable = true;
dns = "systemd-resolved"; dns = lib.mkForce "systemd-resolved";
}; };
nameservers = [ "9.9.9.9" ]; nameservers = [ "9.9.9.9" ];
useNetworkd = true;
}; };
services.resolved = { services.resolved = {
enable = true; enable = true;
dnssec = "true"; #fallbackDns = [ "no" ];
fallbackDns = [ "9.9.9.9" ]; dnssec = "false";
extraConfig = '' };
DNSOverTLS=yes
''; services.dnsmasq = {
enable = true;
resolveLocalQueries = false;
settings = {
listen-address = "127.0.0.55";
bind-interfaces = true;
address = [ "/foo.site/127.1.0.1" ];
server = [ "9.9.9.9" ];
};
};
systemd.network = {
networks.wlp4s0 = {
matchConfig.Name = "wlp4s0";
networkConfig.DHCP = "yes";
dhcpV4Config.UseDNS = "no";
dhcpV6Config.UseDNS = "no";
};
wait-online.anyInterface = true;
}; };
# removable disks in file manager # removable disks in file manager
@ -47,4 +67,12 @@
programs.adb.enable = true; programs.adb.enable = true;
users.users.${config.main-user}.extraGroups = [ "adbusers" ]; users.users.${config.main-user}.extraGroups = [ "adbusers" ];
services.tailscale.enable = true;
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
enableExtraSocket = true;
};
} }

View file

@ -4,10 +4,12 @@
clang-tools_16 clang-tools_16
jdt-language-server jdt-language-server
kotlin-language-server kotlin-language-server
typescript-language-server
astro-language-server
glslls
bear bear
gdb gdb
pwndbg
]; ];
systemd.user.sessionVariables = { systemd.user.sessionVariables = {

View file

@ -1,15 +1,43 @@
{ system, inputs, pkgs, config, ... }: { { lib, system, inputs, pkgs, config, ... }: {
imports = [ ./modules/greetd ];
system.extraDependencies = with pkgs; [ ungoogled-chromium ]; system.extraDependencies = with pkgs; [ ungoogled-chromium ];
environment.systemPackages = with pkgs; [ nix-output-monitor ];
environment.sessionVariables.FLAKE = "/home/admin/nixnew";
programs.steam = {
enable = true;
extraCompatPackages = [
pkgs.proton-ge-bin
];
};
fonts = { fonts = {
enableDefaultPackages = false; enableDefaultPackages = false;
packages = with inputs.stable.legacyPackages.${system}; [ packages = (with inputs.stable.legacyPackages.${system}; [
dejavu_fonts dejavu_fonts
nerdfonts nerdfonts
noto-fonts noto-fonts
noto-fonts-cjk noto-fonts-cjk
]; ]) ++ (with pkgs; [
corefonts
vistafonts
]);
fontconfig = {
defaultFonts = {
serif = [ "DejaVu Serif" ];
sansSerif = [ "DejaVu Sans" ];
monospace = [ "JetBrainsMono Nerd Font" ];
};
};
};
programs.ssh = {
enableAskPassword = true;
askPassword = lib.getExe pkgs.lxqt.lxqt-openssh-askpass;
}; };
systemd = { systemd = {
@ -35,7 +63,7 @@
programs = { programs = {
gnupg.agent = { gnupg.agent = {
enable = true; enable = true;
pinentryFlavor = "gnome3"; pinentryPackage = pkgs.pinentry-qt;
}; };
kdeconnect = { kdeconnect = {
package = pkgs.kdePackages.kdeconnect-kde; package = pkgs.kdePackages.kdeconnect-kde;
@ -79,13 +107,12 @@
]; ];
home.packages = with pkgs; [ home.packages = with pkgs; [
kdePackages.ark
kwrite kwrite
krita krita
gimp gimp
vlc vlc
mpv mpv
gpicview qimgv
kdePackages.filelight kdePackages.kirigami kdePackages.kquickcharts # deps kdePackages.filelight kdePackages.kirigami kdePackages.kquickcharts # deps
curl curl
cantata cantata
@ -96,18 +123,22 @@
htop htop
btop btop
speedcrunch speedcrunch
libreoffice libreoffice-qt6
nnn
ripgrep ripgrep
qbittorrent qbittorrent
signal-desktop signal-desktop
anki-bin anki-bin
kid3
wireshark
mumble
freetube
distrobox distrobox
xdg-utils xdg-utils
light light
unrar # used by ark unrar # used by ark
libnotify # test with it a lot
]; ];
programs = { programs = {
@ -124,7 +155,7 @@
services = { services = {
mpd = { mpd = {
enable = true; enable = true;
musicDirectory = "${homeConfig.home.homeDirectory}/Music"; musicDirectory = "/pool/music";
network.startWhenNeeded = true; network.startWhenNeeded = true;
extraConfig = '' extraConfig = ''

View file

@ -0,0 +1 @@

View file

@ -0,0 +1,14 @@
{
services.xserver = {
enable = true;
logFile = null;
display = 7;
libinput = {
enable = true;
mouse.accelProfile = "flat";
};
displayManager.startx.enable = true;
};
}

View file

@ -1,12 +1,48 @@
{ pkgs, ... }: { { config, pkgs, ... }: {
imports = [ imports = [
./hardware.nix ./hardware.nix
./mullvad.nix
./hyprland ./hyprland
./mcontrolcenter.nix ./mcontrolcenter.nix
]; ];
services.timesyncd.enable = true;
services.sshd.enable = true;
system.stateVersion = "23.11"; system.stateVersion = "23.11";
networking.hostName = "msi"; networking.hostName = "msi";
time.timeZone = "America/Vancouver"; time.timeZone = "America/Vancouver";
programs.noisetorch.enable = true;
home-manager.users.${config.main-user} = {
home.packages = with pkgs; [
osu-lazer-bin
];
services.blueman-applet.enable = true;
};
networking = {
firewall.allowedTCPPorts = [
40921 # bittorrent
49775 # slsk
];
#nat.externalInterface = [ "wlp4s0" ];
};
users.users.${config.main-user}.extraGroups = [ "docker" ];
virtualisation.docker.enable = true;
boot.extraModulePackages = with config.boot.kernelPackages; [
v4l2loopback
];
boot.extraModprobeConfig = ''
options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1
'';
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
hardware.bluetooth.enable = true;
services.blueman.enable = true;
} }

View file

@ -1,6 +1,6 @@
# Do not modify this file! It was generated by nixos-generate-config # zfs:
# and may be overwritten by future invocations. Please make changes # sudo zfs create -o mountpoint=legacy -o canmount=off -o atime=off -o compression=zstd -o sync=disabled -o casesensitivity=sensitive -o exec=on -o setuid=off -o xattr=sa -o devices=off pool/games
# to /etc/nixos/configuration.nix instead. # sudo zfs create -o mountpoint=legacy -o canmount=off -o atime=off -o compression=zstd -o sync=disabled -o casesensitivity=sensitive -o exec=on -o setuid=off -o xattr=sa -o devices=off pool/torrents
{ config, lib, pkgs, modulesPath, ... }: { config, lib, pkgs, modulesPath, ... }:
{ {
@ -13,6 +13,11 @@
boot.kernelModules = [ "kvm-amd" ]; boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
boot.supportedFilesystems = [ "zfs" ];
networking.hostId = "fd4421b3";
systemd.services.zfs-mount.enable = false;
services.zfs.autoScrub.enable = true;
fileSystems."/" = fileSystems."/" =
{ device = "/dev/disk/by-uuid/c9cb1730-c0d1-4a2e-a092-12dfa7098476"; { device = "/dev/disk/by-uuid/c9cb1730-c0d1-4a2e-a092-12dfa7098476";
fsType = "ext4"; fsType = "ext4";
@ -23,6 +28,21 @@
fsType = "vfat"; fsType = "vfat";
}; };
fileSystems."/pool/games" = {
fsType = "zfs";
device = "pool/games";
};
fileSystems."/pool/torrents" = {
fsType = "zfs";
device = "pool/torrents";
};
fileSystems."/pool/music" = {
fsType = "zfs";
device = "pool/music";
};
swapDevices = [ ]; swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # Enables DHCP on each ethernet and wireless interface. In case of scripted networking

View file

@ -1,18 +1,22 @@
{ pkgs, ... }: { { pkgs, ... }: {
imports = [ ./hardware-configuration.nix ]; imports = [ ./hardware-configuration.nix ];
hardware.opengl = { environment.variables = {
VDPAU_DRIVER = "radeonsi";
QT_MEDIA_BACKED = "gstreamer"; # ffmpeg can't choose between vdpau and vaapi for some reason
};
hardware.graphics = {
enable = true; enable = true;
driSupport = true; #driSupport = true;
driSupport32Bit = true; enable32Bit = true;
extraPackages = with pkgs; [ extraPackages = with pkgs; [
rocm-opencl-icd
amdvlk amdvlk
]; ];
extraPackages32 = with pkgs; [ extraPackages32 = with pkgs.driversi686Linux; [
driversi686Linux.amdvlk amdvlk
]; ];
}; };
} }

View file

@ -1,6 +1,7 @@
{ impurity, ... }: { { impurity, ... }: {
hyprland-session = { hyprland-session = {
prerun = "export WLR_DRM_DEVICES=/dev/dri/card1:/dev/dri/card2"; prerun = "export AQ_DRM_DEVICES=/dev/dri/card1:/dev/dri/card2";
extraConfig = "source = ${impurity.link ./hyprland.conf}"; extraConfig = "source = ${impurity.link ./hyprland.conf}";
extraConfigStatic = "source = ${./hyprland.conf}";
}; };
} }

View file

@ -21,4 +21,7 @@ workspace = 16, monitor:eDP-1
workspace = 17, monitor:eDP-1 workspace = 17, monitor:eDP-1
workspace = 18, monitor:eDP-1 workspace = 18, monitor:eDP-1
workspace = 19, monitor:eDP-1 workspace = 19, monitor:eDP-1
workspace = 20, monitor:eDP-1 workspace = 20, monitor:eDP-1
workspace = name:lock_DP-1, monitor:DP-1
workspace = name:lock_eDP-1, monitor:eDP-1