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 @@...@@ -1,6 +1,7 @@
1{1{
2 pkgs,2 pkgs,
3 userSettings,3 userSettings,
4 systemSettings,
4 ...5 ...
5}: {6}: {
6 imports = [7 imports = [
...@@ -30,9 +31,9 @@...@@ -30,9 +31,9 @@
3031
31 nh = {32 nh = {
32 enable = true;33 enable = true;
33 clean.enable = true;34 # clean.enable = true;
34 clean.extraArgs = "--keep-since 4d --keep 3";35 # clean.extraArgs = "--keep-since 4d --keep 3";
35 flake = "/home/nmarks/.dotfiles";36 flake = "/home/nmarks/.dotfiles#nixosConfigurations.nixos";
36 };37 };
3738
38 neovim = {39 neovim = {
...@@ -132,8 +133,9 @@...@@ -132,8 +133,9 @@
132 # services.xserver.libinput.enable = true;133 # services.xserver.libinput.enable = true;
133134
134 # Define a user account. Don't forget to set a password with ‘passwd’.135 # Define a user account. Don't forget to set a password with ‘passwd’.
135 users.defaultUserShell = pkgs.fish;136 # users.defaultUserShell = pkgs.fish;
136 users.users.${userSettings.username} = {137 users.users.${userSettings.username} = {
138 shell = pkgs.fish;
137 isNormalUser = true;139 isNormalUser = true;
138 description = "Natalie Marks";140 description = "Natalie Marks";
139 extraGroups = ["networkmanager" "wheel" "docker"];141 extraGroups = ["networkmanager" "wheel" "docker"];
...@@ -156,7 +158,7 @@...@@ -156,7 +158,7 @@
156 };158 };
157159
158 networking = {160 networking = {
159 hostName = userSettings.hostname; # Define your hostname.161 hostName = systemSettings.host; # Define your hostname.
160 # wireless.enable = true; # Enables wireless support via wpa_supplicant.162 # wireless.enable = true; # Enables wireless support via wpa_supplicant.
161 networkmanager.enable = true;163 networkmanager.enable = true;
162 firewall = {164 firewall = {
hosts/desktop/home.nix+11-4
...@@ -3,16 +3,22 @@...@@ -3,16 +3,22 @@
3 config,3 config,
4 pkgs,4 pkgs,
5 lib,5 lib,
6 zls,6 userSettings,
7 systemSettings,
7 ...8 ...
8}: let9}: 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;};
10in {11in {
12 imports = [
13 inputs.nixvim.homeManagerModules.nixvim
14 #set up nixvim
15 # ../../modules/nixvim
16 ];
11 home = {17 home = {
12 stateVersion = "23.05"; # Please read the comment before changing.18 stateVersion = "23.05"; # Please read the comment before changing.
1319
14 packages = with pkgs; let20 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;};
16 in22 in
17 shared-packages23 shared-packages
18 ++ [24 ++ [
...@@ -51,9 +57,10 @@ in {...@@ -51,9 +57,10 @@ in {
51 calibre57 calibre
52 mpv58 mpv
53 wireguard-tools59 wireguard-tools
60 signal-desktop
54 ]61 ]
55 ++ [62 ++ [
56 zls.packages.x86_64-linux.zls63 inputs.zls.packages.x86_64-linux.zls
57 rust-bin.stable.latest.default64 rust-bin.stable.latest.default
58 ];65 ];
59 # programs.mangohud.enable = true;66 # programs.mangohud.enable = true;
hosts/laptop/configuration.nix+1
...@@ -6,6 +6,7 @@...@@ -6,6 +6,7 @@
6 environment.systemPackages = with pkgs; [6 environment.systemPackages = with pkgs; [
7 neovim7 neovim
8 pinentry_mac8 pinentry_mac
9 signal-desktop-bin
9 ];10 ];
1011
11 # Create /etc/zshrc that loads the nix-darwin environment.12 # Create /etc/zshrc that loads the nix-darwin environment.
modules/nixos/boot.nix+1-1
...@@ -10,7 +10,7 @@...@@ -10,7 +10,7 @@
10 grub = {10 grub = {
11 enable = true;11 enable = true;
12 device = "nodev";12 device = "nodev";
13 theme = pkgs.catppuccin-grub;13 # theme = pkgs.catppuccin-grub;
14 useOSProber = true;14 useOSProber = true;
15 efiSupport = true;15 efiSupport = true;
16 };16 };
modules/nixos/nvidia.nix+14-14
...@@ -19,6 +19,19 @@ in {...@@ -19,6 +19,19 @@ in {
1919
20 # Blacklist nouveau to avoid conflicts20 # Blacklist nouveau to avoid conflicts
21 boot.blacklistedKernelModules = ["nouveau"];21 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
23 hardware = {36 hardware = {
24 nvidia = {37 nvidia = {
...@@ -28,7 +41,7 @@ in {...@@ -28,7 +41,7 @@ in {
2841
29 powerManagement = {42 powerManagement = {
30 enable = true; # Power management43 enable = true; # Power management
31 finegrained = true; # More precise power consumption control44 # finegrained = true; # More precise power consumption control
32 };45 };
3346
34 # Use the NVidia open source kernel module (not to be confused with the47 # Use the NVidia open source kernel module (not to be confused with the
...@@ -37,19 +50,6 @@ in {...@@ -37,19 +50,6 @@ in {
37 open = false;50 open = false;
3851
39 # Environment variables for better compatibility52 # 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
54 # Enable the Nvidia settings menu,54 # Enable the Nvidia settings menu,
55 # accessible via `nvidia-settings`.55 # accessible via `nvidia-settings`.
modules/nixos/services.nix+1-2
...@@ -25,10 +25,9 @@...@@ -25,10 +25,9 @@
25 displayManager.cosmic-greeter.enable = true;25 displayManager.cosmic-greeter.enable = true;
2626
27 # Auto mount devices27 # Auto mount devices
28 udiskie = {28 udisks2 = {
29 enable = true;29 enable = true;
30 };30 };
31
32 # Configure keymap in X1131 # Configure keymap in X11
33 xserver = {32 xserver = {
34 xkb.layout = "us";33 xkb.layout = "us";
modules/nixvim/plugins/blink.nix+30-1
...@@ -25,7 +25,13 @@...@@ -25,7 +25,13 @@
25 settings = {25 settings = {
26 keymap.preset = "super-tab";26 keymap.preset = "super-tab";
27 completion = {27 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
30 documentation = {36 documentation = {
31 auto_show = true;37 auto_show = true;
...@@ -33,6 +39,29 @@...@@ -33,6 +39,29 @@
33 window.border = "rounded";39 window.border = "rounded";
34 };40 };
35 };41 };
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";
36 };65 };
37 };66 };
38 };67 };
modules/nixvim/plugins/default.nix+1
...@@ -1,5 +1,6 @@...@@ -1,5 +1,6 @@
1{pkgs, ...}: {1{pkgs, ...}: {
2 imports = [2 imports = [
3 ./blink.nix3 ./blink.nix
4 ./lz-n.nix
4 ];5 ];
5}6}
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 @@...@@ -59,9 +59,9 @@
59 reboot-windows = "sudo efibootmgr --bootnext 0000; sudo reboot -h now";59 reboot-windows = "sudo efibootmgr --bootnext 0000; sudo reboot -h now";
60 };60 };
61 shellInit = ''61 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
63 batman --export-env | source62 batman --export-env | source
64 '';63 '';
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
65 };65 };
66 home-manager.enable = true;66 home-manager.enable = true;
67}67}
modules/shared/packages.nix+6-2
...@@ -1,4 +1,8 @@...@@ -1,4 +1,8 @@
1{pkgs, ...}:1{
2 pkgs,
3 systemSettings,
4 ...
5}:
2with pkgs; [6with pkgs; [
3 #general development7 #general development
4 just8 just
...@@ -59,7 +63,6 @@ with pkgs; [...@@ -59,7 +63,6 @@ with pkgs; [
59 withMoonlight = true;63 withMoonlight = true;
60 })64 })
61 vesktop65 vesktop
62 signal-desktop-bin
6366
64 #media67 #media
65 spotify68 spotify
...@@ -108,6 +111,7 @@ with pkgs; [...@@ -108,6 +111,7 @@ with pkgs; [
108111
109 #math112 #math
110 texlive.combined.scheme-full113 texlive.combined.scheme-full
114 zathura
111115
112 #fun things116 #fun things
113 cowsay117 cowsay