Merge branch 'main' of github.com:nmarks413/nix-config
This commit is contained in:
commit
17abc9277d
11 changed files with 80 additions and 30 deletions
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
userSettings,
|
userSettings,
|
||||||
|
systemSettings,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
|
@ -30,9 +31,9 @@
|
||||||
|
|
||||||
nh = {
|
nh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
clean.enable = true;
|
# clean.enable = true;
|
||||||
clean.extraArgs = "--keep-since 4d --keep 3";
|
# clean.extraArgs = "--keep-since 4d --keep 3";
|
||||||
flake = "/home/nmarks/.dotfiles";
|
flake = "/home/nmarks/.dotfiles#nixosConfigurations.nixos";
|
||||||
};
|
};
|
||||||
|
|
||||||
neovim = {
|
neovim = {
|
||||||
|
@ -132,8 +133,9 @@
|
||||||
# services.xserver.libinput.enable = true;
|
# services.xserver.libinput.enable = true;
|
||||||
|
|
||||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||||
users.defaultUserShell = pkgs.fish;
|
# users.defaultUserShell = pkgs.fish;
|
||||||
users.users.${userSettings.username} = {
|
users.users.${userSettings.username} = {
|
||||||
|
shell = pkgs.fish;
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "Natalie Marks";
|
description = "Natalie Marks";
|
||||||
extraGroups = ["networkmanager" "wheel" "docker"];
|
extraGroups = ["networkmanager" "wheel" "docker"];
|
||||||
|
@ -156,7 +158,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
hostName = userSettings.hostname; # Define your hostname.
|
hostName = systemSettings.host; # Define your hostname.
|
||||||
# wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
# wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||||
networkmanager.enable = true;
|
networkmanager.enable = true;
|
||||||
firewall = {
|
firewall = {
|
||||||
|
|
|
@ -3,16 +3,22 @@
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
zls,
|
userSettings,
|
||||||
|
systemSettings,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
shared-programs = import ../../modules/shared/homeManagerPrograms.nix {inherit inputs config pkgs lib;};
|
shared-programs = import ../../modules/shared/homeManagerPrograms.nix {inherit inputs config pkgs lib userSettings systemSettings;};
|
||||||
in {
|
in {
|
||||||
|
imports = [
|
||||||
|
inputs.nixvim.homeManagerModules.nixvim
|
||||||
|
#set up nixvim
|
||||||
|
# ../../modules/nixvim
|
||||||
|
];
|
||||||
home = {
|
home = {
|
||||||
stateVersion = "23.05"; # Please read the comment before changing.
|
stateVersion = "23.05"; # Please read the comment before changing.
|
||||||
|
|
||||||
packages = with pkgs; let
|
packages = with pkgs; let
|
||||||
shared-packages = import ../../modules/shared/packages.nix {inherit pkgs;};
|
shared-packages = import ../../modules/shared/packages.nix {inherit pkgs systemSettings;};
|
||||||
in
|
in
|
||||||
shared-packages
|
shared-packages
|
||||||
++ [
|
++ [
|
||||||
|
@ -51,9 +57,10 @@ in {
|
||||||
calibre
|
calibre
|
||||||
mpv
|
mpv
|
||||||
wireguard-tools
|
wireguard-tools
|
||||||
|
signal-desktop
|
||||||
]
|
]
|
||||||
++ [
|
++ [
|
||||||
zls.packages.x86_64-linux.zls
|
inputs.zls.packages.x86_64-linux.zls
|
||||||
rust-bin.stable.latest.default
|
rust-bin.stable.latest.default
|
||||||
];
|
];
|
||||||
# programs.mangohud.enable = true;
|
# programs.mangohud.enable = true;
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
neovim
|
neovim
|
||||||
pinentry_mac
|
pinentry_mac
|
||||||
|
signal-desktop-bin
|
||||||
];
|
];
|
||||||
|
|
||||||
# Create /etc/zshrc that loads the nix-darwin environment.
|
# Create /etc/zshrc that loads the nix-darwin environment.
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
grub = {
|
grub = {
|
||||||
enable = true;
|
enable = true;
|
||||||
device = "nodev";
|
device = "nodev";
|
||||||
theme = pkgs.catppuccin-grub;
|
# theme = pkgs.catppuccin-grub;
|
||||||
useOSProber = true;
|
useOSProber = true;
|
||||||
efiSupport = true;
|
efiSupport = true;
|
||||||
};
|
};
|
||||||
|
|
|
@ -19,6 +19,19 @@ in {
|
||||||
|
|
||||||
# Blacklist nouveau to avoid conflicts
|
# Blacklist nouveau to avoid conflicts
|
||||||
boot.blacklistedKernelModules = ["nouveau"];
|
boot.blacklistedKernelModules = ["nouveau"];
|
||||||
|
environment.variables = {
|
||||||
|
LIBVA_DRIVER_NAME = "nvidia"; # Hardware video acceleration
|
||||||
|
XDG_SESSION_TYPE = "wayland"; # Force Wayland
|
||||||
|
GBM_BACKEND = "nvidia-drm"; # Graphics backend for Wayland
|
||||||
|
__GLX_VENDOR_LIBRARY_NAME = "nvidia"; # Use Nvidia driver for GLX
|
||||||
|
WLR_NO_HARDWARE_CURSORS = "1"; # Fix for cursors on Wayland
|
||||||
|
NIXOS_OZONE_WL = "1"; # Wayland support for Electron apps
|
||||||
|
__GL_GSYNC_ALLOWED = "1"; # Enable G-Sync if available
|
||||||
|
__GL_VRR_ALLOWED = "1"; # Enable VRR (Variable Refresh Rate)
|
||||||
|
WLR_DRM_NO_ATOMIC = "1"; # Fix for some issues with Hyprland
|
||||||
|
NVD_BACKEND = "direct"; # Configuration for new driver
|
||||||
|
MOZ_ENABLE_WAYLAND = "1"; # Wayland support for Firefox
|
||||||
|
};
|
||||||
|
|
||||||
hardware = {
|
hardware = {
|
||||||
nvidia = {
|
nvidia = {
|
||||||
|
@ -28,7 +41,7 @@ in {
|
||||||
|
|
||||||
powerManagement = {
|
powerManagement = {
|
||||||
enable = true; # Power management
|
enable = true; # Power management
|
||||||
finegrained = true; # More precise power consumption control
|
# finegrained = true; # More precise power consumption control
|
||||||
};
|
};
|
||||||
|
|
||||||
# Use the NVidia open source kernel module (not to be confused with the
|
# Use the NVidia open source kernel module (not to be confused with the
|
||||||
|
@ -37,19 +50,6 @@ in {
|
||||||
open = false;
|
open = false;
|
||||||
|
|
||||||
# Environment variables for better compatibility
|
# Environment variables for better compatibility
|
||||||
environment.variables = {
|
|
||||||
LIBVA_DRIVER_NAME = "nvidia"; # Hardware video acceleration
|
|
||||||
XDG_SESSION_TYPE = "wayland"; # Force Wayland
|
|
||||||
GBM_BACKEND = "nvidia-drm"; # Graphics backend for Wayland
|
|
||||||
__GLX_VENDOR_LIBRARY_NAME = "nvidia"; # Use Nvidia driver for GLX
|
|
||||||
WLR_NO_HARDWARE_CURSORS = "1"; # Fix for cursors on Wayland
|
|
||||||
NIXOS_OZONE_WL = "1"; # Wayland support for Electron apps
|
|
||||||
__GL_GSYNC_ALLOWED = "1"; # Enable G-Sync if available
|
|
||||||
__GL_VRR_ALLOWED = "1"; # Enable VRR (Variable Refresh Rate)
|
|
||||||
WLR_DRM_NO_ATOMIC = "1"; # Fix for some issues with Hyprland
|
|
||||||
NVD_BACKEND = "direct"; # Configuration for new driver
|
|
||||||
MOZ_ENABLE_WAYLAND = "1"; # Wayland support for Firefox
|
|
||||||
};
|
|
||||||
|
|
||||||
# Enable the Nvidia settings menu,
|
# Enable the Nvidia settings menu,
|
||||||
# accessible via `nvidia-settings`.
|
# accessible via `nvidia-settings`.
|
||||||
|
|
|
@ -25,10 +25,9 @@
|
||||||
displayManager.cosmic-greeter.enable = true;
|
displayManager.cosmic-greeter.enable = true;
|
||||||
|
|
||||||
# Auto mount devices
|
# Auto mount devices
|
||||||
udiskie = {
|
udisks2 = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Configure keymap in X11
|
# Configure keymap in X11
|
||||||
xserver = {
|
xserver = {
|
||||||
xkb.layout = "us";
|
xkb.layout = "us";
|
||||||
|
|
|
@ -25,7 +25,13 @@
|
||||||
settings = {
|
settings = {
|
||||||
keymap.preset = "super-tab";
|
keymap.preset = "super-tab";
|
||||||
completion = {
|
completion = {
|
||||||
ghost_test.enabled = true;
|
accept.auto_brackets.enabled = false;
|
||||||
|
ghost_test.enabled = false;
|
||||||
|
|
||||||
|
list.selection = {
|
||||||
|
preselect = true;
|
||||||
|
auto_insert = false;
|
||||||
|
};
|
||||||
|
|
||||||
documentation = {
|
documentation = {
|
||||||
auto_show = true;
|
auto_show = true;
|
||||||
|
@ -33,6 +39,29 @@
|
||||||
window.border = "rounded";
|
window.border = "rounded";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
menu.draw.components = {
|
||||||
|
kind_icon.text.__raw = ''
|
||||||
|
function(ctx)
|
||||||
|
local kind_icon, _, _ = require('mini.icons').get('lsp', ctx.kind)
|
||||||
|
-- Check for both nil and the default fallback icon
|
||||||
|
if not kind_icon or kind_icon == '' then
|
||||||
|
-- Use our configured kind_icons
|
||||||
|
return require('blink.cmp.config').appearance.kind_icons[ctx.kind] or ""
|
||||||
|
end
|
||||||
|
return kind_icon
|
||||||
|
end,
|
||||||
|
-- Optionally, you may also use the highlights from mini.icons
|
||||||
|
highlight = function(ctx)
|
||||||
|
local _, hl, _ = require('mini.icons').get('lsp', ctx.kind)
|
||||||
|
return hl
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
fuzzy = {
|
||||||
|
implementation = "prefer_rust_with_warning";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{pkgs, ...}: {
|
{pkgs, ...}: {
|
||||||
imports = [
|
imports = [
|
||||||
./blink.nix
|
./blink.nix
|
||||||
|
./lz-n.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
7
modules/nixvim/plugins/lz-n.nix
Normal file
7
modules/nixvim/plugins/lz-n.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
programs.nixvim.plugins = {
|
||||||
|
lz-n = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -59,9 +59,9 @@
|
||||||
reboot-windows = "sudo efibootmgr --bootnext 0000; sudo reboot -h now";
|
reboot-windows = "sudo efibootmgr --bootnext 0000; sudo reboot -h now";
|
||||||
};
|
};
|
||||||
shellInit = ''
|
shellInit = ''
|
||||||
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
|
|
||||||
batman --export-env | source
|
batman --export-env | source
|
||||||
'';
|
'';
|
||||||
|
##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
|
||||||
};
|
};
|
||||||
home-manager.enable = true;
|
home-manager.enable = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
{pkgs, ...}:
|
{
|
||||||
|
pkgs,
|
||||||
|
systemSettings,
|
||||||
|
...
|
||||||
|
}:
|
||||||
with pkgs; [
|
with pkgs; [
|
||||||
#general development
|
#general development
|
||||||
just
|
just
|
||||||
|
@ -59,7 +63,6 @@ with pkgs; [
|
||||||
withMoonlight = true;
|
withMoonlight = true;
|
||||||
})
|
})
|
||||||
vesktop
|
vesktop
|
||||||
signal-desktop-bin
|
|
||||||
|
|
||||||
#media
|
#media
|
||||||
spotify
|
spotify
|
||||||
|
@ -108,6 +111,7 @@ with pkgs; [
|
||||||
|
|
||||||
#math
|
#math
|
||||||
texlive.combined.scheme-full
|
texlive.combined.scheme-full
|
||||||
|
zathura
|
||||||
|
|
||||||
#fun things
|
#fun things
|
||||||
cowsay
|
cowsay
|
||||||
|
|
Loading…
Reference in a new issue