authorgravatar for nmarks413@gmail.comNatalie Marks <nmarks413@gmail.com> 2025-04-21 16:49:27-07:00
committergravatar for nmarks413@gmail.comNatalie Marks <nmarks413@gmail.com> 2025-04-21 16:49:27-07:00
logb103004218ddf9c510ccd29e6244c890545b9006
tree50eea426ee5ac5ae9c109309e4f17a14ffabf547
parent318316c05bd2f070497bd6d6064686050dc3fe10
signature Commit is signed but in an unrecognized format.

fix nixos config


8 files changed, 45 insertions(+), 27 deletions(-)

hosts/desktop/configuration.nix+5-4
......@@ -1,6 +1,7 @@
11{
22 pkgs,
33 userSettings,
4 systemSettings,
45 ...
56}: {
67 imports = [
......@@ -30,9 +31,9 @@
3031
3132 nh = {
3233 enable = true;
33 clean.enable = true;
34 clean.extraArgs = "--keep-since 4d --keep 3";
35 flake = "/home/nmarks/.dotfiles";
34 # clean.enable = true;
35 # clean.extraArgs = "--keep-since 4d --keep 3";
36 flake = "/home/nmarks/.dotfiles#nixosConfigurations.nixos";
3637 };
3738
3839 neovim = {
......@@ -156,7 +157,7 @@
156157 };
157158
158159 networking = {
159 hostName = userSettings.hostname; # Define your hostname.
160 hostName = systemSettings.host; # Define your hostname.
160161 # wireless.enable = true; # Enables wireless support via wpa_supplicant.
161162 networkmanager.enable = true;
162163 firewall = {
hosts/desktop/home.nix+11-4
......@@ -3,16 +3,22 @@
33 config,
44 pkgs,
55 lib,
6 zls,
6 userSettings,
7 systemSettings,
78 ...
89}: let
9 shared-programs = import ../../modules/shared/homeManagerPrograms.nix {inherit inputs config pkgs lib;};
10 shared-programs = import ../../modules/shared/homeManagerPrograms.nix {inherit inputs config pkgs lib userSettings systemSettings;};
1011in {
12 imports = [
13 inputs.nixvim.homeManagerModules.nixvim
14 #set up nixvim
15 ../../modules/nixvim
16 ];
1117 home = {
1218 stateVersion = "23.05"; # Please read the comment before changing.
1319
1420 packages = with pkgs; let
15 shared-packages = import ../../modules/shared/packages.nix {inherit pkgs;};
21 shared-packages = import ../../modules/shared/packages.nix {inherit pkgs systemSettings;};
1622 in
1723 shared-packages
1824 ++ [
......@@ -51,9 +57,10 @@ in {
5157 calibre
5258 mpv
5359 wireguard-tools
60 signal-desktop
5461 ]
5562 ++ [
56 zls.packages.x86_64-linux.zls
63 inputs.zls.packages.x86_64-linux.zls
5764 rust-bin.stable.latest.default
5865 ];
5966 # programs.mangohud.enable = true;
hosts/laptop/configuration.nix+1
......@@ -6,6 +6,7 @@
66 environment.systemPackages = with pkgs; [
77 neovim
88 pinentry_mac
9 signal-desktop-bin
910 ];
1011
1112 # Create /etc/zshrc that loads the nix-darwin environment.
modules/nixos/boot.nix+1-1
......@@ -10,7 +10,7 @@
1010 grub = {
1111 enable = true;
1212 device = "nodev";
13 theme = pkgs.catppuccin-grub;
13 # theme = pkgs.catppuccin-grub;
1414 useOSProber = true;
1515 efiSupport = true;
1616 };
modules/nixos/nvidia.nix+14-14
......@@ -19,6 +19,19 @@ in {
1919
2020 # Blacklist nouveau to avoid conflicts
2121 boot.blacklistedKernelModules = ["nouveau"];
22 environment.variables = {
23 LIBVA_DRIVER_NAME = "nvidia"; # Hardware video acceleration
24 XDG_SESSION_TYPE = "wayland"; # Force Wayland
25 GBM_BACKEND = "nvidia-drm"; # Graphics backend for Wayland
26 __GLX_VENDOR_LIBRARY_NAME = "nvidia"; # Use Nvidia driver for GLX
27 WLR_NO_HARDWARE_CURSORS = "1"; # Fix for cursors on Wayland
28 NIXOS_OZONE_WL = "1"; # Wayland support for Electron apps
29 __GL_GSYNC_ALLOWED = "1"; # Enable G-Sync if available
30 __GL_VRR_ALLOWED = "1"; # Enable VRR (Variable Refresh Rate)
31 WLR_DRM_NO_ATOMIC = "1"; # Fix for some issues with Hyprland
32 NVD_BACKEND = "direct"; # Configuration for new driver
33 MOZ_ENABLE_WAYLAND = "1"; # Wayland support for Firefox
34 };
2235
2336 hardware = {
2437 nvidia = {
......@@ -28,7 +41,7 @@ in {
2841
2942 powerManagement = {
3043 enable = true; # Power management
31 finegrained = true; # More precise power consumption control
44 # finegrained = true; # More precise power consumption control
3245 };
3346
3447 # Use the NVidia open source kernel module (not to be confused with the
......@@ -37,19 +50,6 @@ in {
3750 open = false;
3851
3952 # Environment variables for better compatibility
40 environment.variables = {
41 LIBVA_DRIVER_NAME = "nvidia"; # Hardware video acceleration
42 XDG_SESSION_TYPE = "wayland"; # Force Wayland
43 GBM_BACKEND = "nvidia-drm"; # Graphics backend for Wayland
44 __GLX_VENDOR_LIBRARY_NAME = "nvidia"; # Use Nvidia driver for GLX
45 WLR_NO_HARDWARE_CURSORS = "1"; # Fix for cursors on Wayland
46 NIXOS_OZONE_WL = "1"; # Wayland support for Electron apps
47 __GL_GSYNC_ALLOWED = "1"; # Enable G-Sync if available
48 __GL_VRR_ALLOWED = "1"; # Enable VRR (Variable Refresh Rate)
49 WLR_DRM_NO_ATOMIC = "1"; # Fix for some issues with Hyprland
50 NVD_BACKEND = "direct"; # Configuration for new driver
51 MOZ_ENABLE_WAYLAND = "1"; # Wayland support for Firefox
52 };
5353
5454 # Enable the Nvidia settings menu,
5555 # accessible via `nvidia-settings`.
modules/nixos/services.nix+1-2
......@@ -25,10 +25,9 @@
2525 displayManager.cosmic-greeter.enable = true;
2626
2727 # Auto mount devices
28 udiskie = {
28 udisks2 = {
2929 enable = true;
3030 };
31
3231 # Configure keymap in X11
3332 xserver = {
3433 xkb.layout = "us";
modules/nixvim/plugins/lz-n.nix created+7
......@@ -0,0 +1,7 @@
1{pkgs, ...}: {
2 programs.nixvim.programs = {
3 lz-n = {
4 enable = true;
5 };
6 };
7}
modules/shared/packages.nix+5-2
......@@ -1,4 +1,8 @@
1{pkgs, ...}:
1{
2 pkgs,
3 systemSettings,
4 ...
5}:
26with pkgs; [
37 #general development
48 just
......@@ -59,7 +63,6 @@ with pkgs; [
5963 withMoonlight = true;
6064 })
6165 vesktop
62 signal-desktop-bin
6366
6467 #media
6568 spotify