forked from autowolf/nix
initial
This commit is contained in:
commit
252814b193
20 changed files with 1531 additions and 0 deletions
135
configuration.nix
Normal file
135
configuration.nix
Normal file
|
|
@ -0,0 +1,135 @@
|
||||||
|
{ config, inputs, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
nvidiaPackage = config.hardware.nvidia.package;
|
||||||
|
in
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[ # Include the results of the hardware scan.
|
||||||
|
./hardware-configuration.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
# Allow unfree packages
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
# Use the systemd-boot EFI boot loader.
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
programs.silentSDDM = {
|
||||||
|
enable = true;
|
||||||
|
theme = "rei";
|
||||||
|
settings = {
|
||||||
|
"LoginScreen.LoginArea.Avatar" = {
|
||||||
|
shape = "circle";
|
||||||
|
active-border-color = "#ffcfce";
|
||||||
|
};
|
||||||
|
"LoginScreen" = {
|
||||||
|
background = "hana.jpg";
|
||||||
|
};
|
||||||
|
"LockScreen" = {
|
||||||
|
background = "kokomi96024.png";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
networking.hostName = "girlCore"; # Define your hostname.
|
||||||
|
# Configure network connections interactively with nmcli or nmtui.
|
||||||
|
networking.networkmanager.enable = true;
|
||||||
|
# Set your time zone.
|
||||||
|
time.timeZone = "America/Chicago";
|
||||||
|
# Configure network proxy if necessary
|
||||||
|
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||||
|
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||||
|
# Select internationalisation properties.
|
||||||
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
console = {
|
||||||
|
font = "Lat2-Terminus16";
|
||||||
|
keyMap = "us";
|
||||||
|
};
|
||||||
|
services.displayManager.sddm = {
|
||||||
|
enable = true;
|
||||||
|
wayland.enable = true;
|
||||||
|
};
|
||||||
|
services.displayManager.defaultSession = "hyprland";
|
||||||
|
programs.hyprland.enable = true;
|
||||||
|
programs.hyprland.package = inputs.hyprland-git.packages."x86_64-linux".hyprland;
|
||||||
|
|
||||||
|
programs.steam = {
|
||||||
|
enable = true;
|
||||||
|
remotePlay.openFirewall = true; # optional
|
||||||
|
dedicatedServer.openFirewall = true; # optional
|
||||||
|
localNetworkGameTransfers.openFirewall = true; # optional
|
||||||
|
gamescopeSession.enable = true; # optional
|
||||||
|
};
|
||||||
|
|
||||||
|
# nvidia drivers
|
||||||
|
hardware.graphics.enable = true;
|
||||||
|
hardware.graphics.enable32Bit = true;
|
||||||
|
services.xserver.videoDrivers = lib.mkDefault [ "nvidia" ];
|
||||||
|
hardware.nvidia = {
|
||||||
|
modesetting.enable = true;
|
||||||
|
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
|
||||||
|
# Enable this if you have graphical corruption issues or application crashes after waking
|
||||||
|
# up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
|
||||||
|
# of just the bare essentials.
|
||||||
|
powerManagement.enable = false;
|
||||||
|
|
||||||
|
powerManagement.finegrained = false;
|
||||||
|
# open = true;
|
||||||
|
open = lib.mkOverride 990 (nvidiaPackage ? open && nvidiaPackage ? firmware);
|
||||||
|
# Enable the Nvidia settings menu,
|
||||||
|
# accessible via `nvidia-settings`.
|
||||||
|
nvidiaSettings = true;
|
||||||
|
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||||
|
};
|
||||||
|
services.pipewire = {
|
||||||
|
enable = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable touchpad support (enabled default in most desktopManager).
|
||||||
|
services.libinput.enable = true;
|
||||||
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||||
|
users.users.ashley = {
|
||||||
|
isNormalUser = true;
|
||||||
|
extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
||||||
|
packages = with pkgs; [
|
||||||
|
tree
|
||||||
|
];
|
||||||
|
};
|
||||||
|
# List packages installed in system profile.
|
||||||
|
# You can use https://search.nixos.org/ to find more packages (and options).
|
||||||
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
git
|
||||||
|
neovim
|
||||||
|
wget
|
||||||
|
];
|
||||||
|
environment.variables.EDITOR = "nvim";
|
||||||
|
# Some programs need SUID wrappers, can be configured further or are
|
||||||
|
# started in user sessions.
|
||||||
|
# List services that you want to enable:
|
||||||
|
# Enable the OpenSSH daemon.
|
||||||
|
# Open ports in the firewall.
|
||||||
|
networking.firewall.allowedTCPPorts = [ ];
|
||||||
|
networking.firewall.allowedUDPPorts = [ ];
|
||||||
|
networking.firewall.enable = true;
|
||||||
|
# This option defines the first version of NixOS you have installed on this particular machine,
|
||||||
|
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
|
||||||
|
#
|
||||||
|
# Most users should NEVER change this value after the initial install, for any reason,
|
||||||
|
# even if you've upgraded your system to a new NixOS release.
|
||||||
|
#
|
||||||
|
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
|
||||||
|
# so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
|
||||||
|
# to actually do that.
|
||||||
|
#
|
||||||
|
# This value being lower than the current NixOS release does NOT mean your system is
|
||||||
|
# out of date, out of support, or vulnerable.
|
||||||
|
#
|
||||||
|
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
|
||||||
|
# and migrated your data accordingly.
|
||||||
|
#
|
||||||
|
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
||||||
|
system.stateVersion = "25.11"; # Did you read the comment?
|
||||||
|
}
|
||||||
573
flake.lock
generated
Normal file
573
flake.lock
generated
Normal file
|
|
@ -0,0 +1,573 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"aquamarine": {
|
||||||
|
"inputs": {
|
||||||
|
"hyprutils": [
|
||||||
|
"hyprland-git",
|
||||||
|
"hyprutils"
|
||||||
|
],
|
||||||
|
"hyprwayland-scanner": [
|
||||||
|
"hyprland-git",
|
||||||
|
"hyprwayland-scanner"
|
||||||
|
],
|
||||||
|
"nixpkgs": [
|
||||||
|
"hyprland-git",
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"systems": [
|
||||||
|
"hyprland-git",
|
||||||
|
"systems"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1765900596,
|
||||||
|
"narHash": "sha256-+hn8v9jkkLP9m+o0Nm5SiEq10W0iWDSotH2XfjU45fA=",
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "aquamarine",
|
||||||
|
"rev": "d83c97f8f5c0aae553c1489c7d9eff3eadcadace",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "aquamarine",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-compat": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1761588595,
|
||||||
|
"narHash": "sha256-XKUZz9zewJNUj46b4AJdiRZJAvSZ0Dqj2BNfXvFlJC4=",
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"rev": "f387cd2afec9419c8ee37694406ca490c3f34ee5",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"gitignore": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"hyprland-git",
|
||||||
|
"pre-commit-hooks",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1709087332,
|
||||||
|
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "gitignore.nix",
|
||||||
|
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "gitignore.nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"home-manager": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1771531206,
|
||||||
|
"narHash": "sha256-1R3Wx6KUkMb4x4E5UOhW9p6rqiexzSGGWxZqSHqW5n0=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"rev": "91be7cce763fa4022c7cf025a71b0c366d1b6e77",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"ref": "master",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"hyprcursor": {
|
||||||
|
"inputs": {
|
||||||
|
"hyprlang": [
|
||||||
|
"hyprland-git",
|
||||||
|
"hyprlang"
|
||||||
|
],
|
||||||
|
"nixpkgs": [
|
||||||
|
"hyprland-git",
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"systems": [
|
||||||
|
"hyprland-git",
|
||||||
|
"systems"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1753964049,
|
||||||
|
"narHash": "sha256-lIqabfBY7z/OANxHoPeIrDJrFyYy9jAM4GQLzZ2feCM=",
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "hyprcursor",
|
||||||
|
"rev": "44e91d467bdad8dcf8bbd2ac7cf49972540980a5",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "hyprcursor",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"hyprgraphics": {
|
||||||
|
"inputs": {
|
||||||
|
"hyprutils": [
|
||||||
|
"hyprland-git",
|
||||||
|
"hyprutils"
|
||||||
|
],
|
||||||
|
"nixpkgs": [
|
||||||
|
"hyprland-git",
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"systems": [
|
||||||
|
"hyprland-git",
|
||||||
|
"systems"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1763733840,
|
||||||
|
"narHash": "sha256-JnET78yl5RvpGuDQy3rCycOCkiKoLr5DN1fPhRNNMco=",
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "hyprgraphics",
|
||||||
|
"rev": "8f1bec691b2d198c60cccabca7a94add2df4ed1a",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "hyprgraphics",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"hyprland-git": {
|
||||||
|
"inputs": {
|
||||||
|
"aquamarine": "aquamarine",
|
||||||
|
"hyprcursor": "hyprcursor",
|
||||||
|
"hyprgraphics": "hyprgraphics",
|
||||||
|
"hyprland-guiutils": "hyprland-guiutils",
|
||||||
|
"hyprland-protocols": "hyprland-protocols",
|
||||||
|
"hyprlang": "hyprlang",
|
||||||
|
"hyprutils": "hyprutils",
|
||||||
|
"hyprwayland-scanner": "hyprwayland-scanner",
|
||||||
|
"hyprwire": "hyprwire",
|
||||||
|
"nixpkgs": "nixpkgs",
|
||||||
|
"pre-commit-hooks": "pre-commit-hooks",
|
||||||
|
"systems": "systems",
|
||||||
|
"xdph": "xdph"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1766604420,
|
||||||
|
"narHash": "sha256-2Kqg1YNtjPGXc1DIzBeESL8hiuUNUn3c3Oimab19Zn8=",
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "Hyprland",
|
||||||
|
"rev": "25250527793eb04bb60f103abe7f06370b9f6e1c",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "Hyprland",
|
||||||
|
"rev": "25250527793eb04bb60f103abe7f06370b9f6e1c",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"hyprland-guiutils": {
|
||||||
|
"inputs": {
|
||||||
|
"aquamarine": [
|
||||||
|
"hyprland-git",
|
||||||
|
"aquamarine"
|
||||||
|
],
|
||||||
|
"hyprgraphics": [
|
||||||
|
"hyprland-git",
|
||||||
|
"hyprgraphics"
|
||||||
|
],
|
||||||
|
"hyprlang": [
|
||||||
|
"hyprland-git",
|
||||||
|
"hyprlang"
|
||||||
|
],
|
||||||
|
"hyprtoolkit": "hyprtoolkit",
|
||||||
|
"hyprutils": [
|
||||||
|
"hyprland-git",
|
||||||
|
"hyprutils"
|
||||||
|
],
|
||||||
|
"hyprwayland-scanner": [
|
||||||
|
"hyprland-git",
|
||||||
|
"hyprwayland-scanner"
|
||||||
|
],
|
||||||
|
"nixpkgs": [
|
||||||
|
"hyprland-git",
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"systems": [
|
||||||
|
"hyprland-git",
|
||||||
|
"systems"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1765643131,
|
||||||
|
"narHash": "sha256-CCGohW5EBIRy4B7vTyBMqPgsNcaNenVad/wszfddET0=",
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "hyprland-guiutils",
|
||||||
|
"rev": "e50ae912813bdfa8372d62daf454f48d6df02297",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "hyprland-guiutils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"hyprland-protocols": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"hyprland-git",
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"systems": [
|
||||||
|
"hyprland-git",
|
||||||
|
"systems"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1765214753,
|
||||||
|
"narHash": "sha256-P9zdGXOzToJJgu5sVjv7oeOGPIIwrd9hAUAP3PsmBBs=",
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "hyprland-protocols",
|
||||||
|
"rev": "3f3860b869014c00e8b9e0528c7b4ddc335c21ab",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "hyprland-protocols",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"hyprlang": {
|
||||||
|
"inputs": {
|
||||||
|
"hyprutils": [
|
||||||
|
"hyprland-git",
|
||||||
|
"hyprutils"
|
||||||
|
],
|
||||||
|
"nixpkgs": [
|
||||||
|
"hyprland-git",
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"systems": [
|
||||||
|
"hyprland-git",
|
||||||
|
"systems"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1764612430,
|
||||||
|
"narHash": "sha256-54ltTSbI6W+qYGMchAgCR6QnC1kOdKXN6X6pJhOWxFg=",
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "hyprlang",
|
||||||
|
"rev": "0d00dc118981531aa731150b6ea551ef037acddd",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "hyprlang",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"hyprtoolkit": {
|
||||||
|
"inputs": {
|
||||||
|
"aquamarine": [
|
||||||
|
"hyprland-git",
|
||||||
|
"hyprland-guiutils",
|
||||||
|
"aquamarine"
|
||||||
|
],
|
||||||
|
"hyprgraphics": [
|
||||||
|
"hyprland-git",
|
||||||
|
"hyprland-guiutils",
|
||||||
|
"hyprgraphics"
|
||||||
|
],
|
||||||
|
"hyprlang": [
|
||||||
|
"hyprland-git",
|
||||||
|
"hyprland-guiutils",
|
||||||
|
"hyprlang"
|
||||||
|
],
|
||||||
|
"hyprutils": [
|
||||||
|
"hyprland-git",
|
||||||
|
"hyprland-guiutils",
|
||||||
|
"hyprutils"
|
||||||
|
],
|
||||||
|
"hyprwayland-scanner": [
|
||||||
|
"hyprland-git",
|
||||||
|
"hyprland-guiutils",
|
||||||
|
"hyprwayland-scanner"
|
||||||
|
],
|
||||||
|
"nixpkgs": [
|
||||||
|
"hyprland-git",
|
||||||
|
"hyprland-guiutils",
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"systems": [
|
||||||
|
"hyprland-git",
|
||||||
|
"hyprland-guiutils",
|
||||||
|
"systems"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1764592794,
|
||||||
|
"narHash": "sha256-7CcO+wbTJ1L1NBQHierHzheQGPWwkIQug/w+fhTAVuU=",
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "hyprtoolkit",
|
||||||
|
"rev": "5cfe0743f0e608e1462972303778d8a0859ee63e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "hyprtoolkit",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"hyprutils": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"hyprland-git",
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"systems": [
|
||||||
|
"hyprland-git",
|
||||||
|
"systems"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1766160771,
|
||||||
|
"narHash": "sha256-roINUGikWRqqgKrD4iotKbGj3ZKJl3hjMz5l/SyKrHw=",
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "hyprutils",
|
||||||
|
"rev": "5ac060bfcf2f12b3a6381156ebbc13826a05b09f",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "hyprutils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"hyprwayland-scanner": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"hyprland-git",
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"systems": [
|
||||||
|
"hyprland-git",
|
||||||
|
"systems"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1763640274,
|
||||||
|
"narHash": "sha256-Uan1Nl9i4TF/kyFoHnTq1bd/rsWh4GAK/9/jDqLbY5A=",
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "hyprwayland-scanner",
|
||||||
|
"rev": "f6cf414ca0e16a4d30198fd670ec86df3c89f671",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "hyprwayland-scanner",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"hyprwire": {
|
||||||
|
"inputs": {
|
||||||
|
"hyprutils": [
|
||||||
|
"hyprland-git",
|
||||||
|
"hyprutils"
|
||||||
|
],
|
||||||
|
"nixpkgs": [
|
||||||
|
"hyprland-git",
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"systems": [
|
||||||
|
"hyprland-git",
|
||||||
|
"systems"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1766253200,
|
||||||
|
"narHash": "sha256-26qPwrd3od+xoYVywSB7hC2cz9ivN46VPLlrsXyGxvE=",
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "hyprwire",
|
||||||
|
"rev": "1079777525b30a947c8d657fac158e00ae85de9d",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "hyprwire",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixcats": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1770584904,
|
||||||
|
"narHash": "sha256-9Zaz8lbKF2W9pwXZEnbiGsicHdBoU+dHt3Wv3mCJoZ8=",
|
||||||
|
"owner": "BirdeeHub",
|
||||||
|
"repo": "nixCats-nvim",
|
||||||
|
"rev": "538fdde784d2909700d97a8ef307783b33a86fb1",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "BirdeeHub",
|
||||||
|
"repo": "nixCats-nvim",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1766070988,
|
||||||
|
"narHash": "sha256-G/WVghka6c4bAzMhTwT2vjLccg/awmHkdKSd2JrycLc=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "c6245e83d836d0433170a16eb185cefe0572f8b8",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1771369470,
|
||||||
|
"narHash": "sha256-0NBlEBKkN3lufyvFegY4TYv5mCNHbi5OmBDrzihbBMQ=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "0182a361324364ae3f436a63005877674cf45efb",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pre-commit-hooks": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-compat": "flake-compat",
|
||||||
|
"gitignore": "gitignore",
|
||||||
|
"nixpkgs": [
|
||||||
|
"hyprland-git",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1765911976,
|
||||||
|
"narHash": "sha256-t3T/xm8zstHRLx+pIHxVpQTiySbKqcQbK+r+01XVKc0=",
|
||||||
|
"owner": "cachix",
|
||||||
|
"repo": "git-hooks.nix",
|
||||||
|
"rev": "b68b780b69702a090c8bb1b973bab13756cc7a27",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "cachix",
|
||||||
|
"repo": "git-hooks.nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"home-manager": "home-manager",
|
||||||
|
"hyprland-git": "hyprland-git",
|
||||||
|
"nixcats": "nixcats",
|
||||||
|
"nixpkgs": "nixpkgs_2",
|
||||||
|
"silentSDDM": "silentSDDM"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"silentSDDM": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1769900466,
|
||||||
|
"narHash": "sha256-WeoJBj/PhqFCCJEIycTipqPbKm5BpQT2uzFTYcYZ30I=",
|
||||||
|
"owner": "uiriansan",
|
||||||
|
"repo": "SilentSDDM",
|
||||||
|
"rev": "a44caf771b4cb72f5c2514f7d488455b0fa860d2",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "uiriansan",
|
||||||
|
"repo": "SilentSDDM",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1689347949,
|
||||||
|
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default-linux",
|
||||||
|
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default-linux",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"xdph": {
|
||||||
|
"inputs": {
|
||||||
|
"hyprland-protocols": [
|
||||||
|
"hyprland-git",
|
||||||
|
"hyprland-protocols"
|
||||||
|
],
|
||||||
|
"hyprlang": [
|
||||||
|
"hyprland-git",
|
||||||
|
"hyprlang"
|
||||||
|
],
|
||||||
|
"hyprutils": [
|
||||||
|
"hyprland-git",
|
||||||
|
"hyprutils"
|
||||||
|
],
|
||||||
|
"hyprwayland-scanner": [
|
||||||
|
"hyprland-git",
|
||||||
|
"hyprwayland-scanner"
|
||||||
|
],
|
||||||
|
"nixpkgs": [
|
||||||
|
"hyprland-git",
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"systems": [
|
||||||
|
"hyprland-git",
|
||||||
|
"systems"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1761431178,
|
||||||
|
"narHash": "sha256-xzjC1CV3+wpUQKNF+GnadnkeGUCJX+vgaWIZsnz9tzI=",
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "xdg-desktop-portal-hyprland",
|
||||||
|
"rev": "4b8801228ff958d028f588f0c2b911dbf32297f9",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "xdg-desktop-portal-hyprland",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
53
flake.nix
Normal file
53
flake.nix
Normal file
|
|
@ -0,0 +1,53 @@
|
||||||
|
{
|
||||||
|
description = "NixOS configuration";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
# home-manager, used for managing user configuration
|
||||||
|
home-manager = {
|
||||||
|
url = "github:nix-community/home-manager/master";
|
||||||
|
# The `follows` keyword in inputs is used for inheritance.
|
||||||
|
# Here, `inputs.nixpkgs` of home-manager is kept consistent with
|
||||||
|
# the `inputs.nixpkgs` of the current flake,
|
||||||
|
# to avoid problems caused by different versions of nixpkgs.
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
silentSDDM = {
|
||||||
|
url = "github:uiriansan/SilentSDDM";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
|
nixcats.url = "github:BirdeeHub/nixCats-nvim";
|
||||||
|
|
||||||
|
hyprland-git = {
|
||||||
|
url = "github:hyprwm/Hyprland/25250527793eb04bb60f103abe7f06370b9f6e1c";
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = inputs@{ nixpkgs, home-manager, nixcats, ... }: {
|
||||||
|
nixosConfigurations = {
|
||||||
|
girlCore = nixpkgs.lib.nixosSystem {
|
||||||
|
specialArgs = {inherit inputs;};
|
||||||
|
modules = [
|
||||||
|
./configuration.nix
|
||||||
|
inputs.silentSDDM.nixosModules.default
|
||||||
|
|
||||||
|
# make home-manager as a module of nixos
|
||||||
|
# so that home-manager configuration will be deployed automatically when executing `nixos-rebuild switch`
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
{
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
|
|
||||||
|
home-manager.extraSpecialArgs = { inherit inputs; };
|
||||||
|
|
||||||
|
home-manager.users.ashley = import ./home.nix;
|
||||||
|
|
||||||
|
# Optionally, use home-manager.extraSpecialArgs to pass arguments to home.nix
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
31
hardware-configuration.nix
Normal file
31
hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
|
# and may be overwritten by future invocations. Please make changes
|
||||||
|
# to /etc/nixos/configuration.nix instead.
|
||||||
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "ahci" "usbhid" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "/dev/disk/by-uuid/10c61ccc-e175-4cfd-bd6a-08a57dbdb0b5";
|
||||||
|
fsType = "btrfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{ device = "/dev/disk/by-uuid/24E3-BA29";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = [ "fmask=0077" "dmask=0077" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [ ];
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
||||||
42
home.nix
Normal file
42
home.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
{ inputs, pkgs, ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./modules/neovim/nixcats.nix
|
||||||
|
./modules/waybar/default.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
fonts.fontconfig.enable = true;
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
vesktop
|
||||||
|
brightnessctl
|
||||||
|
playerctl
|
||||||
|
librewolf
|
||||||
|
hyfetch
|
||||||
|
kitty
|
||||||
|
kittysay
|
||||||
|
nerd-fonts.departure-mono
|
||||||
|
];
|
||||||
|
|
||||||
|
programs = {
|
||||||
|
kitty = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
font = {
|
||||||
|
name = "DepartureMono Nerd Font Mono";
|
||||||
|
size = 7;
|
||||||
|
};
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
scrollback_lines = 16384;
|
||||||
|
enable_audio_bell = false;
|
||||||
|
update_check_interval = 0;
|
||||||
|
|
||||||
|
confirm_os_window_close = 0; # disable close window prompt
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home.stateVersion = "25.11";
|
||||||
|
}
|
||||||
|
|
||||||
11
modules/neovim/init.lua
Normal file
11
modules/neovim/init.lua
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
vim.g.mapleader = " "
|
||||||
|
|
||||||
|
vim.opt.termguicolors = true -- use terminal colors
|
||||||
|
vim.opt.relativenumber = false
|
||||||
|
vim.opt.number = true
|
||||||
|
vim.opt.wrap = false
|
||||||
|
vim.opt.colorcolumn = "80"
|
||||||
|
|
||||||
|
require("plugins")
|
||||||
|
require("lsp")
|
||||||
|
|
||||||
59
modules/neovim/lua/lsp/capabilities.lua
Normal file
59
modules/neovim/lua/lsp/capabilities.lua
Normal file
|
|
@ -0,0 +1,59 @@
|
||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.on_attach(_, bufnr)
|
||||||
|
-- we create a function that lets us more easily define mappings specific
|
||||||
|
-- for LSP related items. It sets the mode, buffer and description for us each time.
|
||||||
|
|
||||||
|
local nmap = function(keys, func, desc)
|
||||||
|
if desc then
|
||||||
|
desc = 'LSP: ' .. desc
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.keymap.set('n', keys, func, { buffer = bufnr, desc = desc })
|
||||||
|
end
|
||||||
|
|
||||||
|
nmap('<leader>rn', vim.lsp.buf.rename, '[R]e[n]ame')
|
||||||
|
nmap('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction')
|
||||||
|
|
||||||
|
nmap('gd', vim.lsp.buf.definition, '[G]oto [D]efinition')
|
||||||
|
|
||||||
|
-- NOTE: why are these functions that call the telescope builtin?
|
||||||
|
-- because otherwise they would load telescope eagerly when this is defined.
|
||||||
|
-- due to us using the on_require handler to make sure it is available.
|
||||||
|
if nixCats('general.telescope') then
|
||||||
|
nmap('gr', function() require('telescope.builtin').lsp_references() end, '[G]oto [R]eferences')
|
||||||
|
nmap('gI', function() require('telescope.builtin').lsp_implementations() end, '[G]oto [I]mplementation')
|
||||||
|
nmap('<leader>ds', function() require('telescope.builtin').lsp_document_symbols() end, '[D]ocument [S]ymbols')
|
||||||
|
nmap('<leader>ws', function() require('telescope.builtin').lsp_dynamic_workspace_symbols() end, '[W]orkspace [S]ymbols')
|
||||||
|
nmap('<leader>dd', "<cmd>Telescope diagnostics bufnr=0<CR>", '[D]ocument [D]iagnostics')
|
||||||
|
nmap('<leader>wd', "<cmd>Telescope diagnostics<CR>", '[W]orkspace [D]iagnostics')
|
||||||
|
end -- TODO: someone who knows the builtin versions of these to do instead help me out please.
|
||||||
|
|
||||||
|
nmap('<leader>D', vim.lsp.buf.type_definition, 'Type [D]efinition')
|
||||||
|
nmap('<leader>e', vim.diagnostic.open_float, 'Show [E]rror')
|
||||||
|
|
||||||
|
-- See `:help K` for why this keymap
|
||||||
|
nmap('K', vim.lsp.buf.hover, 'Hover Documentation')
|
||||||
|
nmap('<C-k>', vim.lsp.buf.signature_help, 'Signature Documentation')
|
||||||
|
|
||||||
|
-- Lesser used LSP functionality
|
||||||
|
nmap('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')
|
||||||
|
nmap('<leader>wa', vim.lsp.buf.add_workspace_folder, '[W]orkspace [A]dd Folder')
|
||||||
|
nmap('<leader>wr', vim.lsp.buf.remove_workspace_folder, '[W]orkspace [R]emove Folder')
|
||||||
|
nmap('<leader>wl', function()
|
||||||
|
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
||||||
|
end, '[W]orkspace [L]ist Folders')
|
||||||
|
|
||||||
|
-- Create a command `:Format` local to the LSP buffer
|
||||||
|
vim.api.nvim_buf_create_user_command(bufnr, 'Format', function(_)
|
||||||
|
vim.lsp.buf.format()
|
||||||
|
end, { desc = 'Format current buffer with LSP' })
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function M.get(server_name)
|
||||||
|
local capabilities = require('blink.cmp').get_lsp_capabilities()
|
||||||
|
|
||||||
|
return capabilities
|
||||||
|
end
|
||||||
|
return M
|
||||||
88
modules/neovim/lua/lsp/completion.lua
Normal file
88
modules/neovim/lua/lsp/completion.lua
Normal file
|
|
@ -0,0 +1,88 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"friendly-snippets",
|
||||||
|
dep_of = { "blink.cmp" },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"blink.cmp",
|
||||||
|
event = { "InsertEnter", "CmdlineEnter" },
|
||||||
|
on_require = "blink",
|
||||||
|
load = function (name)
|
||||||
|
vim.cmd.packadd(name)
|
||||||
|
end,
|
||||||
|
after = function(plugin)
|
||||||
|
local blink = require('blink.cmp')
|
||||||
|
|
||||||
|
blink.setup({
|
||||||
|
keymap = {
|
||||||
|
preset = 'default',
|
||||||
|
},
|
||||||
|
|
||||||
|
appearance = {
|
||||||
|
nerd_font_variant = 'mono',
|
||||||
|
},
|
||||||
|
|
||||||
|
sources = {
|
||||||
|
default = { 'lsp', 'path', 'snippets', 'buffer' },
|
||||||
|
providers = {
|
||||||
|
lsp = {
|
||||||
|
name = 'LSP',
|
||||||
|
module = 'blink.cmp.sources.lsp',
|
||||||
|
enabled = true,
|
||||||
|
},
|
||||||
|
path = {
|
||||||
|
name = 'Path',
|
||||||
|
module = 'blink.cmp.sources.path',
|
||||||
|
enabled = true,
|
||||||
|
},
|
||||||
|
snippets = {
|
||||||
|
name = 'Snippets',
|
||||||
|
module = 'blink.cmp.sources.snippets',
|
||||||
|
enabled = true,
|
||||||
|
},
|
||||||
|
buffer = {
|
||||||
|
name = 'Buffer',
|
||||||
|
module = 'blink.cmp.sources.buffer',
|
||||||
|
enabled = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
completion = {
|
||||||
|
accept = {
|
||||||
|
auto_brackets = {
|
||||||
|
enabled = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
menu = {
|
||||||
|
border = 'rounded',
|
||||||
|
max_height = 12,
|
||||||
|
scrolloff = 2,
|
||||||
|
|
||||||
|
draw = {
|
||||||
|
columns = {
|
||||||
|
{ "kind_icon", gap = 1, },
|
||||||
|
{ "label", "label_description", gap = 1, },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
documentation = {
|
||||||
|
auto_show = false,
|
||||||
|
window = {
|
||||||
|
border = 'rounded',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
signature = {
|
||||||
|
enabled = true,
|
||||||
|
window = {
|
||||||
|
border = 'rounded',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end
|
||||||
|
},
|
||||||
|
}
|
||||||
17
modules/neovim/lua/lsp/indentation.lua
Normal file
17
modules/neovim/lua/lsp/indentation.lua
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
|
pattern = "lua",
|
||||||
|
callback = function()
|
||||||
|
vim.opt_local.shiftwidth = 2
|
||||||
|
vim.opt_local.tabstop = 2
|
||||||
|
vim.opt_local.expandtab = true
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
|
pattern = "nix",
|
||||||
|
callback = function()
|
||||||
|
vim.opt_local.shiftwidth = 2
|
||||||
|
vim.opt_local.tabstop = 2
|
||||||
|
vim.opt_local.expandtab = true
|
||||||
|
end,
|
||||||
|
})
|
||||||
6
modules/neovim/lua/lsp/init.lua
Normal file
6
modules/neovim/lua/lsp/init.lua
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
require("lze").load {
|
||||||
|
{ import = "lsp.completion", },
|
||||||
|
}
|
||||||
|
|
||||||
|
require("lsp.indentation")
|
||||||
|
require("lsp.lsp")
|
||||||
71
modules/neovim/lua/lsp/lsp.lua
Normal file
71
modules/neovim/lua/lsp/lsp.lua
Normal file
|
|
@ -0,0 +1,71 @@
|
||||||
|
local servers = {}
|
||||||
|
|
||||||
|
servers.lua_ls = {
|
||||||
|
settings = {
|
||||||
|
Lua = {
|
||||||
|
formatters = {
|
||||||
|
ignoreComments = false,
|
||||||
|
},
|
||||||
|
signatureHelp = { enable = true },
|
||||||
|
diagnostics = {
|
||||||
|
globals = { 'nixCats', 'vim' },
|
||||||
|
-- disable = { 'missing-fields' },
|
||||||
|
},
|
||||||
|
workspace = {
|
||||||
|
-- make the server aware of the neovim runtime files
|
||||||
|
library = vim.api.nvim_get_runtime_file("", true),
|
||||||
|
checkThirdParty = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
telemetry = { enabled = false },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
servers.nil_ls = {
|
||||||
|
settings = {},
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Taken from nixCats example:
|
||||||
|
-- If you were to comment out this autocommand
|
||||||
|
-- and instead pass the on attach function directly to
|
||||||
|
-- nvim-lspconfig, it would do the same thing.
|
||||||
|
-- come to think of it, it might be better because then lspconfig doesnt have to be called before lsp attach?
|
||||||
|
-- but you would still end up triggering on a FileType event anyway, so, it makes little difference.
|
||||||
|
vim.api.nvim_create_autocmd('LspAttach', {
|
||||||
|
group = vim.api.nvim_create_augroup('nixCats-lsp-attach', { clear = true }),
|
||||||
|
callback = function(event)
|
||||||
|
require('lsp.capabilities').on_attach(vim.lsp.get_client_by_id(event.data.client_id), event.buf)
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
||||||
|
require("lze").load {
|
||||||
|
{
|
||||||
|
"nvim-lspconfig",
|
||||||
|
event = "FileType",
|
||||||
|
after = function(plugin)
|
||||||
|
-- Just register configs, don't enable yet
|
||||||
|
for server_name, cfg in pairs(servers) do
|
||||||
|
vim.lsp.config(server_name, {
|
||||||
|
capabilities = require('lsp.capabilities').get(server_name),
|
||||||
|
settings = (cfg or {}).settings,
|
||||||
|
filetypes = (cfg or {}).filetypes,
|
||||||
|
cmd = (cfg or {}).cmd,
|
||||||
|
root_pattern = (cfg or {}).root_pattern,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Enable on-demand per filetype
|
||||||
|
for server_name, cfg in pairs(servers) do
|
||||||
|
local filetypes = cfg.filetypes or vim.lsp.config[server_name].filetypes
|
||||||
|
if filetypes then
|
||||||
|
vim.api.nvim_create_autocmd('FileType', {
|
||||||
|
pattern = filetypes,
|
||||||
|
callback = function()
|
||||||
|
vim.lsp.enable(server_name)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
5
modules/neovim/lua/plugins/dressing.lua
Normal file
5
modules/neovim/lua/plugins/dressing.lua
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"dressing.nvim"
|
||||||
|
},
|
||||||
|
}
|
||||||
15
modules/neovim/lua/plugins/fyler.lua
Normal file
15
modules/neovim/lua/plugins/fyler.lua
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"fyler.nvim",
|
||||||
|
cmd = { "Fyler" },
|
||||||
|
keys = {
|
||||||
|
{ "<leader>tf", function() return require('fyler').toggle({ kind = "split_right" }) end, mode = {"n"}, desc = 'Open [F]yler' },
|
||||||
|
},
|
||||||
|
load = function (name)
|
||||||
|
vim.cmd.packadd(name)
|
||||||
|
end,
|
||||||
|
after = function(plugin)
|
||||||
|
local fyler = require("fyler").setup()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
7
modules/neovim/lua/plugins/init.lua
Normal file
7
modules/neovim/lua/plugins/init.lua
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
require("lze").load {
|
||||||
|
{ import = "plugins.dressing", },
|
||||||
|
{ import = "plugins.telescope", },
|
||||||
|
{ import = "plugins.treesitter", },
|
||||||
|
{ import = "plugins.fyler", },
|
||||||
|
{ import = "plugins.mini-hipatterns", },
|
||||||
|
}
|
||||||
76
modules/neovim/lua/plugins/mini-hipatterns.lua
Normal file
76
modules/neovim/lua/plugins/mini-hipatterns.lua
Normal file
|
|
@ -0,0 +1,76 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"mini.hipatterns",
|
||||||
|
after = function(plugin)
|
||||||
|
local hipatterns = require("mini.hipatterns")
|
||||||
|
|
||||||
|
-- Returns hex color group for matching short hex color.
|
||||||
|
--
|
||||||
|
---@param match string
|
||||||
|
---@return string
|
||||||
|
local hex_color_short = function(_, match)
|
||||||
|
local style = 'fg' -- 'fg' or 'bg', for extmark_opts_inline use 'fg'
|
||||||
|
local r, g, b = match:sub(2, 2), match:sub(3, 3), match:sub(4, 4)
|
||||||
|
local hex = string.format('#%s%s%s%s%s%s', r, r, g, g, b, b)
|
||||||
|
return hipatterns.compute_hex_color_group(hex, style)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Returns hex color group for matching alpha hex color.
|
||||||
|
--
|
||||||
|
---@param match string
|
||||||
|
---@return string
|
||||||
|
local hex_color_alpha = function(_, match)
|
||||||
|
local style = 'fg' -- 'fg' or 'bg', for extmark_opts_inline use 'fg'
|
||||||
|
local r, g, b = match:sub(2, 3), match:sub(4, 5), match:sub(6, 7)
|
||||||
|
local hex = string.format('#%s%s%s', r, g, b)
|
||||||
|
return hipatterns.compute_hex_color_group(hex, style)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Returns extmark opts for highlights with virtual inline text.
|
||||||
|
--
|
||||||
|
---@param data table Includes `hl_group`, `full_match` and more.
|
||||||
|
---@return table
|
||||||
|
local extmark_opts_inline = function(_, _, data)
|
||||||
|
return {
|
||||||
|
virt_text = { { '', data.hl_group } },
|
||||||
|
virt_text_pos = 'inline',
|
||||||
|
right_gravity = false,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Returns extmark opts for highlights with virtual inline text.
|
||||||
|
--
|
||||||
|
---@param data table Includes `hl_group`, `full_match` and more.
|
||||||
|
---@return table
|
||||||
|
local extmark_opts_inline_alpha = function(_, _, data)
|
||||||
|
return {
|
||||||
|
virt_text = { { '', data.hl_group } },
|
||||||
|
virt_text_pos = 'inline',
|
||||||
|
right_gravity = false,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
hipatterns.setup({
|
||||||
|
highlighters = {
|
||||||
|
-- #rrggbb
|
||||||
|
hex_color = hipatterns.gen_highlighter.hex_color({
|
||||||
|
style = "inline",
|
||||||
|
inline_text = '',
|
||||||
|
}),
|
||||||
|
-- #rgb
|
||||||
|
hex_color_short = {
|
||||||
|
pattern = "#%x%x%x%f[%X]",
|
||||||
|
group = hex_color_short,
|
||||||
|
extmark_opts = extmark_opts_inline,
|
||||||
|
},
|
||||||
|
-- #rrggbbaa
|
||||||
|
hex_color_alpha = {
|
||||||
|
pattern = "#%x%x%x%x%x%x%x%x%f[%X]",
|
||||||
|
group = hex_color_alpha,
|
||||||
|
extmark_opts = extmark_opts_inline_alpha,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
36
modules/neovim/lua/plugins/telescope.lua
Normal file
36
modules/neovim/lua/plugins/telescope.lua
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"telescope.nvim",
|
||||||
|
cmd = { "Telescope" },
|
||||||
|
keys = {
|
||||||
|
{ "<leader>f", function() return require('telescope.builtin').find_files() end, mode = {"n"}, desc = 'Telescope search [F]iles' },
|
||||||
|
{ "<leader>tr", function() return require('telescope.builtin').oldfiles() end, mode = {"n"}, desc = '[T]elescope search [R]ecent files' },
|
||||||
|
{ "<leader>ts", function() return require('telescope.builtin').live_grep() end, mode = {"n"}, desc = '[T]elescope [S]earch cwd with grep' },
|
||||||
|
{ "<leader>tw", function() return require('telescope.builtin').grep_string() end, mode = {"n"}, desc = '[T]elescope search current [W]ord' },
|
||||||
|
{ "<leader>tk", function() return require('telescope.builtin').keymaps() end, mode = {"n"}, desc = '[T]elescope search [K]eymaps' },
|
||||||
|
{ "<leader>tb", function() return require('telescope.builtin').buffers() end, mode = {"n"}, desc = '[T]elescope search [B]uffers' },
|
||||||
|
},
|
||||||
|
load = function (name)
|
||||||
|
vim.cmd.packadd(name)
|
||||||
|
vim.cmd.packadd("telescope-fzf-native.nvim")
|
||||||
|
end,
|
||||||
|
after = function(plugin)
|
||||||
|
local telescope = require("telescope")
|
||||||
|
local actions = require("telescope.actions")
|
||||||
|
|
||||||
|
telescope.setup {
|
||||||
|
defaults = {
|
||||||
|
mappings = {
|
||||||
|
i = {
|
||||||
|
["<C-k>"] = actions.move_selection_previous, -- move to prev result
|
||||||
|
["<C-j>"] = actions.move_selection_next, -- move to next result
|
||||||
|
["<C-q>"] = actions.send_selected_to_qflist + actions.open_qflist
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pcall(telescope.load_extension, "fzf")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
95
modules/neovim/lua/plugins/treesitter.lua
Normal file
95
modules/neovim/lua/plugins/treesitter.lua
Normal file
|
|
@ -0,0 +1,95 @@
|
||||||
|
-- to help me write this after nvim-treesitter updated, i used:
|
||||||
|
-- https://github.com/BirdeeHub/nixCats-nvim/blob/3c9bc4d7123e1b48d92f25ba505b889af541e897/templates/example/lua/myLuaConf/plugins/treesitter.lua
|
||||||
|
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"nvim-treesitter",
|
||||||
|
lazy = false,
|
||||||
|
after = function (plugin)
|
||||||
|
--@param buf integer
|
||||||
|
--@param language string
|
||||||
|
local function treesitter_try_attach(buf, language)
|
||||||
|
--check if parser exists and load it
|
||||||
|
if not vim.treesitter.language.add(language) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
-- enables syntax highlight and other treesitter features
|
||||||
|
vim.treesitter.start(buf, language)
|
||||||
|
|
||||||
|
-- enables treesitter based folds
|
||||||
|
vim.wo.foldexpr = "v:lua.vim.treesitter.foldexpr()"
|
||||||
|
|
||||||
|
-- enables treesiter based indentation
|
||||||
|
vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
|
||||||
|
end
|
||||||
|
|
||||||
|
local available_parsers = require("nvim-treesitter").get_available()
|
||||||
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
|
callback = function(args)
|
||||||
|
local buf, filetype = args.buf, args.match
|
||||||
|
local language = vim.treesitter.language.get_lang(filetype)
|
||||||
|
if not language then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local installed_parsers = require("nvim-treesitter").get_installed("parsers")
|
||||||
|
|
||||||
|
if vim.tbl_contains(installed_parsers, language) then
|
||||||
|
-- enable the parser if it is installed
|
||||||
|
treesitter_try_attach(buf, language)
|
||||||
|
elseif vim.tbl_contains(available_parsers, language) then
|
||||||
|
-- if a parser is available in `nvim-treesitter` enable it after ensuring it is installed
|
||||||
|
require("nvim-treesitter").install(language):await(function()
|
||||||
|
treesitter_try_attach(buf, language)
|
||||||
|
end)
|
||||||
|
else
|
||||||
|
-- try to enable treesitter features in case the parser exists but is not available from `nvim-treesitter`
|
||||||
|
treesitter_try_attach(buf, language)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nvim-treesitter-textobjects",
|
||||||
|
lazy = false,
|
||||||
|
before = function(plugin)
|
||||||
|
vim.g.no_plugin_maps = true
|
||||||
|
end,
|
||||||
|
after = function(plugin)
|
||||||
|
require("nvim-treesitter-textobjects").setup {
|
||||||
|
select = {
|
||||||
|
lookahead = true,
|
||||||
|
selection_modes = {
|
||||||
|
['@parameter.outer'] = 'v', -- charwise
|
||||||
|
['@function.outer'] = 'V', -- linewise
|
||||||
|
},
|
||||||
|
include_surrounding_whitespace = false,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
-- keymaps
|
||||||
|
vim.keymap.set({ "x", "o" }, "am", function()
|
||||||
|
require "nvim-treesitter-textobjects.select".select_textobject("@function.outer", "textobjects")
|
||||||
|
end)
|
||||||
|
vim.keymap.set({ "x", "o" }, "im", function()
|
||||||
|
require "nvim-treesitter-textobjects.select".select_textobject("@function.inner", "textobjects")
|
||||||
|
end)
|
||||||
|
vim.keymap.set({ "x", "o" }, "ac", function()
|
||||||
|
require "nvim-treesitter-textobjects.select".select_textobject("@class.outer", "textobjects")
|
||||||
|
end)
|
||||||
|
vim.keymap.set({ "x", "o" }, "ic", function()
|
||||||
|
require "nvim-treesitter-textobjects.select".select_textobject("@class.inner", "textobjects")
|
||||||
|
end)
|
||||||
|
-- You can also use captures from other query groups like `locals.scm`
|
||||||
|
vim.keymap.set({ "x", "o" }, "as", function()
|
||||||
|
require "nvim-treesitter-textobjects.select".select_textobject("@local.scope", "locals")
|
||||||
|
end)
|
||||||
|
|
||||||
|
-- NOTE: for more textobjects options, see the following link.
|
||||||
|
-- This template is using the new `main` branch of the repo.
|
||||||
|
-- https://github.com/nvim-treesitter/nvim-treesitter-textobjects/tree/main
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
183
modules/neovim/nixcats.nix
Normal file
183
modules/neovim/nixcats.nix
Normal file
|
|
@ -0,0 +1,183 @@
|
||||||
|
{
|
||||||
|
inputs,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
utils = inputs.nixcats.utils;
|
||||||
|
in {
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
inputs.nixcats.homeModule
|
||||||
|
];
|
||||||
|
|
||||||
|
config = {
|
||||||
|
# this value, nixCats is the defaultPackageName you pass to mkNixosModules
|
||||||
|
# it will be the namespace for your options.
|
||||||
|
nixCats = {
|
||||||
|
enable = true;
|
||||||
|
nixpkgs_version = inputs.nixpkgs;
|
||||||
|
# this will add the overlays from ./overlays and also,
|
||||||
|
# add any plugins in inputs named "plugins-pluginName" to pkgs.neovimPlugins
|
||||||
|
# It will not apply to overall system, just nixCats.
|
||||||
|
addOverlays =
|
||||||
|
/*
|
||||||
|
(import ./overlays inputs) ++
|
||||||
|
*/
|
||||||
|
[
|
||||||
|
(utils.standardPluginOverlay inputs)
|
||||||
|
];
|
||||||
|
# see the packageDefinitions below.
|
||||||
|
# This says which of those to install.
|
||||||
|
packageNames = ["ashleynvim"];
|
||||||
|
|
||||||
|
luaPath = "${./.}";
|
||||||
|
|
||||||
|
# the .replace vs .merge options are for modules based on existing configurations,
|
||||||
|
# they refer to how multiple categoryDefinitions get merged together by the module.
|
||||||
|
# for useage of this section, refer to :h nixCats.flake.outputs.categories
|
||||||
|
categoryDefinitions.replace = {
|
||||||
|
pkgs,
|
||||||
|
settings,
|
||||||
|
categories,
|
||||||
|
extra,
|
||||||
|
name,
|
||||||
|
mkNvimPlugin,
|
||||||
|
...
|
||||||
|
} @ packageDef: {
|
||||||
|
lspsAndRuntimeDeps = {
|
||||||
|
general = with pkgs; [
|
||||||
|
ripgrep
|
||||||
|
fd
|
||||||
|
];
|
||||||
|
treesitter = with pkgs; [
|
||||||
|
tree-sitter
|
||||||
|
];
|
||||||
|
lang = with pkgs; {
|
||||||
|
lua = [
|
||||||
|
lua-language-server
|
||||||
|
];
|
||||||
|
nix = [
|
||||||
|
nil
|
||||||
|
nix-doc
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
startupPlugins = {
|
||||||
|
general = with pkgs.vimPlugins; [
|
||||||
|
lze
|
||||||
|
plenary-nvim
|
||||||
|
nvim-notify
|
||||||
|
nvim-web-devicons
|
||||||
|
base16-nvim
|
||||||
|
mini-nvim
|
||||||
|
];
|
||||||
|
treesitter = with pkgs.vimPlugins; [
|
||||||
|
nvim-treesitter-textobjects
|
||||||
|
nvim-treesitter.withAllGrammars
|
||||||
|
];
|
||||||
|
};
|
||||||
|
optionalPlugins = {
|
||||||
|
general = with pkgs.vimPlugins; [
|
||||||
|
];
|
||||||
|
ui = with pkgs.vimPlugins; [
|
||||||
|
dressing-nvim
|
||||||
|
];
|
||||||
|
qol = with pkgs.vimPlugins; [
|
||||||
|
undotree
|
||||||
|
mini-hipatterns
|
||||||
|
];
|
||||||
|
telescope = with pkgs.vimPlugins; [
|
||||||
|
telescope-nvim
|
||||||
|
telescope-fzf-native-nvim
|
||||||
|
telescope-ui-select-nvim
|
||||||
|
];
|
||||||
|
fyler = with pkgs.vimPlugins; [
|
||||||
|
fyler-nvim
|
||||||
|
];
|
||||||
|
lsp = with pkgs.vimPlugins; [
|
||||||
|
nvim-lspconfig
|
||||||
|
];
|
||||||
|
completion = with pkgs.vimPlugins; [
|
||||||
|
blink-cmp
|
||||||
|
nvim-cmp
|
||||||
|
luasnip
|
||||||
|
friendly-snippets
|
||||||
|
cmp_luasnip
|
||||||
|
cmp-buffer
|
||||||
|
cmp-path
|
||||||
|
cmp-nvim-lua
|
||||||
|
cmp-nvim-lsp
|
||||||
|
cmp-cmdline
|
||||||
|
cmp-nvim-lsp-signature-help
|
||||||
|
cmp-cmdline-history
|
||||||
|
lspkind-nvim
|
||||||
|
];
|
||||||
|
lang = with pkgs.vimPlugins; {
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# shared libraries to be added to LD_LIBRARY_PATH
|
||||||
|
# variable available to nvim runtime
|
||||||
|
sharedLibraries = {
|
||||||
|
general = with pkgs; [
|
||||||
|
# libgit2
|
||||||
|
];
|
||||||
|
};
|
||||||
|
environmentVariables = {
|
||||||
|
lang = {
|
||||||
|
};
|
||||||
|
};
|
||||||
|
extraWrapperArgs = {
|
||||||
|
};
|
||||||
|
# lists of the functions you would have passed to
|
||||||
|
# python.withPackages or lua.withPackages
|
||||||
|
|
||||||
|
# get the path to this python environment
|
||||||
|
# in your lua config via
|
||||||
|
# vim.g.python3_host_prog
|
||||||
|
# or run from nvim terminal via :!<packagename>-python3
|
||||||
|
extraPython3Packages = {
|
||||||
|
};
|
||||||
|
# populates $LUA_PATH and $LUA_CPATH
|
||||||
|
extraLuaPackages = {
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# see :help nixCats.flake.outputs.packageDefinitions
|
||||||
|
packageDefinitions.replace = {
|
||||||
|
# these are the names of your packages
|
||||||
|
# you can include as many as you wish.
|
||||||
|
ashleynvim = {pkgs, ...}: {
|
||||||
|
# they contain a settings set defined above
|
||||||
|
# see :help nixCats.flake.outputs.settings
|
||||||
|
settings = {
|
||||||
|
wrapRc = true;
|
||||||
|
# IMPORTANT:
|
||||||
|
# your alias may not conflict with your other packages.
|
||||||
|
aliases = ["ashleyvim" "avim"];
|
||||||
|
};
|
||||||
|
# and a set of categories that you want
|
||||||
|
# (and other information to pass to lua)
|
||||||
|
categories = {
|
||||||
|
general = true;
|
||||||
|
|
||||||
|
ui = true;
|
||||||
|
qol = true;
|
||||||
|
telescope = true;
|
||||||
|
fyler = true;
|
||||||
|
lsp = true;
|
||||||
|
completion = true;
|
||||||
|
treesitter = true;
|
||||||
|
|
||||||
|
lang = {
|
||||||
|
lua = true;
|
||||||
|
nix = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
28
modules/waybar/default.nix
Normal file
28
modules/waybar/default.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
programs.waybar = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
mainBar = {
|
||||||
|
layer = "top";
|
||||||
|
position = "top";
|
||||||
|
height = 20;
|
||||||
|
|
||||||
|
# left
|
||||||
|
modules-left = ["privacy" "clock" "hyprland" "taskbar"];
|
||||||
|
|
||||||
|
# center
|
||||||
|
modules-center = ["mpris" "cava" "pulseaudio"];
|
||||||
|
|
||||||
|
# right
|
||||||
|
modules-right = ["network" "bluetooth" "battery" "upower"];
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
style = pkgs.writeTextFile {
|
||||||
|
name = "style.css";
|
||||||
|
text = builtins.readFile ./style.css;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
0
modules/waybar/style.css
Normal file
0
modules/waybar/style.css
Normal file
Loading…
Add table
Add a link
Reference in a new issue