authorgravatar for nmarks413@gmail.comNatalie Marks <nmarks413@gmail.com> 2025-04-30 12:38:32-07:00
committergravatar for nmarks413@gmail.comNatalie Marks <nmarks413@gmail.com> 2025-04-30 12:38:32-07:00
log17abc9277d2a40bf37b56e8c0e1123fd0b4f743b
tree67853484b369e29337eb5396ef060012c96d8776
parent0ccc341bda018a59bfa5331d4742a7fef6fc0e8c
parente9844c71c462397a4c9042ae064b13385b761e45
signature Commit is signed but in an unrecognized format.

Merge branch 'main' of github.com:nmarks413/nix-config


11 files changed, 80 insertions(+), 30 deletions(-)

hosts/desktop/configuration.nix+7-5
......@@ -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 = {
......@@ -132,8 +133,9 @@
132133 # services.xserver.libinput.enable = true;
133134
134135 # Define a user account. Don't forget to set a password with ‘passwd’.
135 users.defaultUserShell = pkgs.fish;
136 # users.defaultUserShell = pkgs.fish;
136137 users.users.${userSettings.username} = {
138 shell = pkgs.fish;
137139 isNormalUser = true;
138140 description = "Natalie Marks";
139141 extraGroups = ["networkmanager" "wheel" "docker"];
......@@ -156,7 +158,7 @@
156158 };
157159
158160 networking = {
159 hostName = userSettings.hostname; # Define your hostname.
161 hostName = systemSettings.host; # Define your hostname.
160162 # wireless.enable = true; # Enables wireless support via wpa_supplicant.
161163 networkmanager.enable = true;
162164 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/blink.nix+30-1
......@@ -25,7 +25,13 @@
2525 settings = {
2626 keymap.preset = "super-tab";
2727 completion = {
28 ghost_test.enabled = true;
28 accept.auto_brackets.enabled = false;
29 ghost_test.enabled = false;
30
31 list.selection = {
32 preselect = true;
33 auto_insert = false;
34 };
2935
3036 documentation = {
3137 auto_show = true;
......@@ -33,6 +39,29 @@
3339 window.border = "rounded";
3440 };
3541 };
42
43 menu.draw.components = {
44 kind_icon.text.__raw = ''
45 function(ctx)
46 local kind_icon, _, _ = require('mini.icons').get('lsp', ctx.kind)
47 -- Check for both nil and the default fallback icon
48 if not kind_icon or kind_icon == '󰞋' then
49 -- Use our configured kind_icons
50 return require('blink.cmp.config').appearance.kind_icons[ctx.kind] or ""
51 end
52 return kind_icon
53 end,
54 -- Optionally, you may also use the highlights from mini.icons
55 highlight = function(ctx)
56 local _, hl, _ = require('mini.icons').get('lsp', ctx.kind)
57 return hl
58 end
59 '';
60 };
61 };
62
63 fuzzy = {
64 implementation = "prefer_rust_with_warning";
3665 };
3766 };
3867 };
modules/nixvim/plugins/default.nix+1
......@@ -1,5 +1,6 @@
11{pkgs, ...}: {
22 imports = [
33 ./blink.nix
4 ./lz-n.nix
45 ];
56}
modules/nixvim/plugins/lz-n.nix created+7
......@@ -0,0 +1,7 @@
1{pkgs, ...}: {
2 programs.nixvim.plugins = {
3 lz-n = {
4 enable = true;
5 };
6 };
7}
modules/shared/homeManagerPrograms.nix+1-1
......@@ -59,9 +59,9 @@
5959 reboot-windows = "sudo efibootmgr --bootnext 0000; sudo reboot -h now";
6060 };
6161 shellInit = ''
62 test -r '/Users/${userSettings.username}/.opam/opam-init/init.fish' && source '/Users/${userSettings.username}/.opam/opam-init/init.fish' > /dev/null 2> /dev/null; or true
6362 batman --export-env | source
6463 '';
64 ##test -r '/Users/${userSettings.username}/.opam/opam-init/init.fish' && source '/Users/${userSettings.username}/.opam/opam-init/init.fish' > /dev/null 2> /dev/null; or true
6565 };
6666 home-manager.enable = true;
6767}
modules/shared/packages.nix+6-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
......@@ -108,6 +111,7 @@ with pkgs; [
108111
109112 #math
110113 texlive.combined.scheme-full
114 zathura
111115
112116 #fun things
113117 cowsay