Initial commit 🚀
This commit is contained in:
commit
b593cdeb3e
5
.sops.yaml
Normal file
5
.sops.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
keys:
|
||||
- &master age16xvq5a9js563tk9mqltxaz5wkjte9rkj2et4zwswrr96pkzq4susghwmmm
|
||||
creation_rules:
|
||||
- path_regex: ^nix/users/[^/]+/secrets/[^/]+\.(yaml|json)$
|
||||
age: *master
|
299
flake.lock
Normal file
299
flake.lock
Normal file
@ -0,0 +1,299 @@
|
||||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1692799911,
|
||||
"narHash": "sha256-3eihraek4qL744EvQXsK1Ha6C3CR7nnT8X2qWap4RNk=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "f9e7cf818399d17d347f847525c5a5a8032e4e44",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1696940889,
|
||||
"narHash": "sha256-p2Wic74A1tZpFcld1wSEbFQQbrZ/tPDuLieCnspamQo=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "6bba64781e4b7c1f91a733583defbd3e46b49408",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hyprland": {
|
||||
"inputs": {
|
||||
"hyprland-protocols": "hyprland-protocols",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"systems": "systems",
|
||||
"wlroots": "wlroots",
|
||||
"xdph": "xdph"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1697151905,
|
||||
"narHash": "sha256-sfuiRn7D5D2NzDkXXN/DUUcs2d1ddlf3VmzDBzDO2Tk=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "Hyprland",
|
||||
"rev": "3a61350286de842c7f1566c38e2b42821080ddf4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hyprwm",
|
||||
"repo": "Hyprland",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hyprland-protocols": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"hyprland",
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": [
|
||||
"hyprland",
|
||||
"systems"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1691753796,
|
||||
"narHash": "sha256-zOEwiWoXk3j3+EoF3ySUJmberFewWlagvewDRuWYAso=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprland-protocols",
|
||||
"rev": "0c2ce70625cb30aef199cb388f99e19a61a6ce03",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprland-protocols",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"maxfetch": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1690770330,
|
||||
"narHash": "sha256-LzOhrFFjGs9GIDjk1lUFKhlnzJuEUrKjBcv1eT3kaY8=",
|
||||
"owner": "jobcmax",
|
||||
"repo": "maxfetch",
|
||||
"rev": "17baa4047073e20572403b70703c69696af6b68d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "jobcmax",
|
||||
"repo": "maxfetch",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1694767346,
|
||||
"narHash": "sha256-5uH27SiVFUwsTsqC5rs3kS7pBoNhtoy9QfTP9BmknGk=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "ace5093e36ab1e95cb9463863491bee90d5a4183",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1690640159,
|
||||
"narHash": "sha256-5DZUYnkeMOsVb/eqPYb9zns5YsnQXRJRC8Xx/nPMcno=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "e6ab46982debeab9831236869539a507f670a129",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1697059129,
|
||||
"narHash": "sha256-9NJcFF9CEYPvHJ5ckE8kvINvI84SZZ87PvqMbH6pro0=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "5e4c2ada4fcd54b99d56d7bd62f384511a7e2593",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_4": {
|
||||
"locked": {
|
||||
"lastModified": 1693060755,
|
||||
"narHash": "sha256-KNsbfqewEziFJEpPR0qvVz4rx0x6QXxw1CcunRhlFdk=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c66ccfa00c643751da2fd9290e096ceaa30493fc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"orcaslicer": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs_4"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1693147294,
|
||||
"narHash": "sha256-4+09HY6FhZTZBHnQaKMANq8nAz//lIZ95X78ylCKjr4=",
|
||||
"owner": "ovlach",
|
||||
"repo": "nix-orca-slicer",
|
||||
"rev": "1e71e6e01ef3b49d0731ca611b6bfce32dbe26d0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "ovlach",
|
||||
"repo": "nix-orca-slicer",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"home-manager": "home-manager",
|
||||
"hyprland": "hyprland",
|
||||
"maxfetch": "maxfetch",
|
||||
"nixpkgs": "nixpkgs_3",
|
||||
"orcaslicer": "orcaslicer",
|
||||
"sops-nix": "sops-nix"
|
||||
}
|
||||
},
|
||||
"sops-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"nixpkgs-stable": []
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1697064251,
|
||||
"narHash": "sha256-xxp2sB+4vqB6S6zC/L5J8LlRKgVbgIZOcYl9/TDrEzI=",
|
||||
"owner": "mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "f995ea159252a53b25fa99824f2891e3b479d511",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "mic92",
|
||||
"repo": "sops-nix",
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"systems_2": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"wlroots": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"host": "gitlab.freedesktop.org",
|
||||
"lastModified": 1696410538,
|
||||
"narHash": "sha256-ecDhdYLXWHsxMv+EWG36mCNDvzRbu9qfjH7dLxL7aGM=",
|
||||
"owner": "wlroots",
|
||||
"repo": "wlroots",
|
||||
"rev": "3406c1b17a4a7e6d4e2a7d9c1176affa72bce1bc",
|
||||
"type": "gitlab"
|
||||
},
|
||||
"original": {
|
||||
"host": "gitlab.freedesktop.org",
|
||||
"owner": "wlroots",
|
||||
"repo": "wlroots",
|
||||
"rev": "3406c1b17a4a7e6d4e2a7d9c1176affa72bce1bc",
|
||||
"type": "gitlab"
|
||||
}
|
||||
},
|
||||
"xdph": {
|
||||
"inputs": {
|
||||
"hyprland-protocols": [
|
||||
"hyprland",
|
||||
"hyprland-protocols"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"hyprland",
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": [
|
||||
"hyprland",
|
||||
"systems"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1694628480,
|
||||
"narHash": "sha256-Qg9hstRw0pvjGu5hStkr2UX1D73RYcQ9Ns/KnZMIm9w=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "xdg-desktop-portal-hyprland",
|
||||
"rev": "8f45a6435069b9e24ebd3160eda736d7a391cbf2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hyprwm",
|
||||
"repo": "xdg-desktop-portal-hyprland",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
56
flake.nix
Normal file
56
flake.nix
Normal file
@ -0,0 +1,56 @@
|
||||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
maxfetch.url = "github:jobcmax/maxfetch";
|
||||
orcaslicer.url = "github:ovlach/nix-orca-slicer";
|
||||
hyprland.url = "github:hyprwm/Hyprland";
|
||||
sops-nix = {
|
||||
url = "github:mic92/sops-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.nixpkgs-stable.follows = "";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, home-manager, ...}@inputs:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
username = "nicolaivds";
|
||||
home_profile = "nicolaivds";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
# The path to this very repo
|
||||
flake_path = "~/.dotfiles";
|
||||
in
|
||||
{
|
||||
homeConfigurations = {
|
||||
"${username}" = home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
extraSpecialArgs = { inherit username flake_path inputs; };
|
||||
modules = [
|
||||
./nix/users/${home_profile}
|
||||
# Pin registry to flake
|
||||
{ nix.registry.nixpkgs.flake = nixpkgs; }
|
||||
# Pin channel to flake
|
||||
# { home.sessionVariables.NIX_PATH = "nixpkgs=nixpkgs=flake:nixpkgs$\{NIX_PATH:+:$NIX_PATH}"; }
|
||||
{ home.sessionVariables.NIX_PATH = "nixpkgs=flake:nixpkgs$\{NIX_PATH:+:$NIX_PATH}"; }
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
nixosConfigurations = {
|
||||
desktop = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = { inherit username flake_path inputs; };
|
||||
modules = [
|
||||
./nix/systems/main/desktop
|
||||
{ nix.registry.nixpkgs.flake = nixpkgs; }
|
||||
# { nix.nixPath = [ "nixpkgs=configflake:nixpkgs" ]; }
|
||||
{ nix.nixPath = [ "nixpkgs=flake:nixpkgs" ]; }
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
4
nix/lib/colors.nix
Normal file
4
nix/lib/colors.nix
Normal file
@ -0,0 +1,4 @@
|
||||
{ lib, hex }:
|
||||
rec {
|
||||
|
||||
}
|
0
nix/lib/default.nix
Normal file
0
nix/lib/default.nix
Normal file
71
nix/systems/main/base/default.nix
Normal file
71
nix/systems/main/base/default.nix
Normal file
@ -0,0 +1,71 @@
|
||||
{ username, pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./networking.nix
|
||||
./packages.nix
|
||||
./services.nix
|
||||
./virtulization.nix
|
||||
];
|
||||
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot.loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
|
||||
nix = {
|
||||
settings = {
|
||||
auto-optimise-store = true;
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
};
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 7d";
|
||||
};
|
||||
};
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Brussels";
|
||||
|
||||
users = {
|
||||
defaultUserShell = pkgs.zsh;
|
||||
groups = {
|
||||
"${username}" = {};
|
||||
};
|
||||
users.nicolaivds = {
|
||||
isNormalUser = true;
|
||||
# initialPassword = "gigachad";
|
||||
extraGroups = ["wheel" "video" "plugdev" "${username}"];
|
||||
packages = with pkgs; [
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
environment.sessionVariables = rec {
|
||||
WLR_NO_HARDWARE_CURSORS = "1";
|
||||
NIXOS_OZONE_WL = "1";
|
||||
LIBSEAT_BACKEND = "logind";
|
||||
|
||||
XDG_CACHE_HOME = "$HOME/.cache";
|
||||
XDG_CONFIG_HOME = "$HOME/.config";
|
||||
XDG_DATA_HOME = "$HOME/.local/share";
|
||||
XDG_STATE_HOME = "$HOME/.local/state";
|
||||
|
||||
# Not officially in the specification
|
||||
XDG_BIN_HOME = "$HOME/.local/bin";
|
||||
PATH = [
|
||||
"${XDG_BIN_HOME}"
|
||||
];
|
||||
};
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html)
|
||||
|
||||
system.stateVersion = "23.05"; # Did you read the comment?
|
||||
}
|
11
nix/systems/main/base/docker.nix
Normal file
11
nix/systems/main/base/docker.nix
Normal file
@ -0,0 +1,11 @@
|
||||
{ config, lib, pkgs, inputs, ... }:
|
||||
{
|
||||
users.users.justinlime.extraGroups = [ "docker" ];
|
||||
environment.systemPackages = with pkgs; [
|
||||
docker-compose
|
||||
];
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
storageDriver = true;
|
||||
};
|
||||
}
|
13
nix/systems/main/base/networking.nix
Normal file
13
nix/systems/main/base/networking.nix
Normal file
@ -0,0 +1,13 @@
|
||||
{ ... }:
|
||||
{
|
||||
networking = {
|
||||
networkmanager.enable = true;
|
||||
nameservers = [ "1.1.1.1" "1.0.0.1" ];
|
||||
firewall = {
|
||||
enable = true;
|
||||
checkReversePath = false;
|
||||
allowedTCPPorts = [ 80 443 ];
|
||||
allowedUDPPorts = [];
|
||||
};
|
||||
};
|
||||
}
|
68
nix/systems/main/base/packages.nix
Normal file
68
nix/systems/main/base/packages.nix
Normal file
@ -0,0 +1,68 @@
|
||||
{ pkgs, inputs, flake_path, ... }:
|
||||
{
|
||||
# List packages installed in system profile
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
age
|
||||
curl
|
||||
gcc
|
||||
git
|
||||
gnome.file-roller
|
||||
pulseaudio
|
||||
unzip
|
||||
wireplumber
|
||||
wget
|
||||
wl-clipboard
|
||||
zip
|
||||
inputs.home-manager.packages.${pkgs.system}.home-manager
|
||||
];
|
||||
variables = { EDITOR = "nvim"; };
|
||||
pathsToLink = [ "/share/zsh" ];
|
||||
};
|
||||
|
||||
hardware.opengl.enable = true;
|
||||
|
||||
# Programs
|
||||
programs = {
|
||||
dconf.enable = true;
|
||||
direnv.enable = true;
|
||||
hyprland.enable = true;
|
||||
thunar = {
|
||||
enable = true;
|
||||
plugins = with pkgs.xfce; [
|
||||
xfconf
|
||||
thunar-volman
|
||||
thunar-archive-plugin
|
||||
thunar-media-tags-plugin
|
||||
];
|
||||
};
|
||||
zsh = {
|
||||
enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
enableCompletion = true;
|
||||
autosuggestions.enable = true;
|
||||
setOptions = ["PROMPT_SUBST" "appendhistory"];
|
||||
shellAliases = {
|
||||
ga = "git add";
|
||||
gs = "git status";
|
||||
gb = "git branch";
|
||||
gm = "git merge";
|
||||
gpl = "git pull";
|
||||
gplo = "git pull origin";
|
||||
gps = "git push";
|
||||
gpso = "git push origin";
|
||||
gc = "git commit";
|
||||
gcm = "git commit -m";
|
||||
gch = "git checkout";
|
||||
gchb = "git checkout -b";
|
||||
gcoe = "git config user.email";
|
||||
gcon = "git config user.name";
|
||||
all-switch = "nix-switch && home-switch";
|
||||
all-update = "nix flake update ${flake_path}# && all-switch";
|
||||
vi = "nvim";
|
||||
vim = "nvim";
|
||||
vimdiff = "nvim -d";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
74
nix/systems/main/base/services.nix
Normal file
74
nix/systems/main/base/services.nix
Normal file
@ -0,0 +1,74 @@
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
# List services that you want to enable:
|
||||
services = {
|
||||
xserver = {
|
||||
layout = "be";
|
||||
xkbVariant = "nodeadkeys";
|
||||
videoDrivers = ["nvidia"];
|
||||
exportConfiguration = true;
|
||||
|
||||
#displayManager.gdm.enable = true;
|
||||
};
|
||||
|
||||
gnome.gnome-keyring.enable = true;
|
||||
|
||||
spice-vdagentd.enable = true;
|
||||
gvfs = {
|
||||
enable = true;
|
||||
package = lib.mkForce pkgs.gnome3.gvfs;
|
||||
};
|
||||
|
||||
pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
udev.packages = with pkgs; [
|
||||
via
|
||||
];
|
||||
printing = {
|
||||
enable = true;
|
||||
drivers = with pkgs; [
|
||||
gutenprint
|
||||
hplip
|
||||
];
|
||||
};
|
||||
};
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
wlr.enable = true;
|
||||
extraPortals = [
|
||||
#pkgs.xdg-desktop-portal-hyprland
|
||||
pkgs.xdg-desktop-portal-gtk
|
||||
pkgs.xdg-desktop-portal-wlr
|
||||
];
|
||||
};
|
||||
virtualisation = {
|
||||
docker.enable = true;
|
||||
docker.rootless = {
|
||||
enable = true;
|
||||
setSocketVariable = true;
|
||||
};
|
||||
spiceUSBRedirection.enable = true;
|
||||
libvirtd = {
|
||||
enable = true;
|
||||
allowedBridges = ["wlo1"];
|
||||
qemu = {
|
||||
swtpm.enable = true;
|
||||
ovmf.enable = true;
|
||||
ovmf.packages = [ pkgs.OVMFFull.fd ];
|
||||
};
|
||||
};
|
||||
};
|
||||
security = {
|
||||
rtkit.enable = true;
|
||||
pam.services.swaylock = { #Swaylock fix for wrong password
|
||||
text = ''
|
||||
auth include login
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
29
nix/systems/main/base/virtulization.nix
Normal file
29
nix/systems/main/base/virtulization.nix
Normal file
@ -0,0 +1,29 @@
|
||||
{ config, lib, pkgs, inputs, ... }:
|
||||
{
|
||||
users.users.nicolaivds.extraGroups = [ "kvm" "input" "libvirtd" ];
|
||||
environment.systemPackages = with pkgs; [
|
||||
virt-manager
|
||||
virt-viewer
|
||||
win-spice
|
||||
win-virtio
|
||||
spice
|
||||
spice-gtk
|
||||
spice-protocol
|
||||
];
|
||||
|
||||
services.spice-vdagentd.enable = true;
|
||||
virtualisation = {
|
||||
spiceUSBRedirection.enable = true;
|
||||
libvirtd = {
|
||||
enable = true;
|
||||
allowedBridges = ["wlo1"];
|
||||
qemu = {
|
||||
swtpm.enable = true;
|
||||
ovmf = {
|
||||
enable = true;
|
||||
packages = [ pkgs.OVMFFull.fd ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
30
nix/systems/main/desktop/default.nix
Normal file
30
nix/systems/main/desktop/default.nix
Normal file
@ -0,0 +1,30 @@
|
||||
{ pkgs, flake_path, ... }:
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
../base
|
||||
];
|
||||
|
||||
# System
|
||||
networking.hostName = "Beast";
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
|
||||
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
|
||||
};
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
mangohud
|
||||
nvidia-vaapi-driver
|
||||
egl-wayland
|
||||
];
|
||||
};
|
||||
|
||||
powerManagement = {
|
||||
enable = true;
|
||||
cpuFreqGovernor = "performance";
|
||||
};
|
||||
|
||||
# Programs
|
||||
programs.zsh.shellAliases.nix-switch = "nixos-rebuild switch --use-remote-sudo --flake ${flake_path}#desktop";
|
||||
}
|
68
nix/systems/main/desktop/hardware-configuration.nix
Normal file
68
nix/systems/main/desktop/hardware-configuration.nix
Normal file
@ -0,0 +1,68 @@
|
||||
# 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 = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/0b17d697-e4df-4a42-b374-57f4474c8d36";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/813C-8212";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
fileSystems."/mnt/venus" =
|
||||
{ device = "/dev/disk/by-uuid/dfc684ed-744d-4560-8c69-846693fb51e6";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/9304179a-f639-41bb-8819-872fc99d5166"; }
|
||||
];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp3s0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware = {
|
||||
cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
opengl = {
|
||||
enable = true;
|
||||
|
||||
# Vulkan
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
|
||||
# VA-API
|
||||
extraPackages = with pkgs; [
|
||||
vaapiVdpau
|
||||
libvdpau-va-gl
|
||||
nvidia-vaapi-driver
|
||||
];
|
||||
};
|
||||
|
||||
nvidia = {
|
||||
modesetting.enable = true;
|
||||
open = true;
|
||||
nvidiaSettings = true;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.vulkan_beta;
|
||||
};
|
||||
};
|
||||
}
|
8
nix/users/base/default.nix
Normal file
8
nix/users/base/default.nix
Normal file
@ -0,0 +1,8 @@
|
||||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./neovim.nix
|
||||
./zsh.nix
|
||||
./packages.nix
|
||||
];
|
||||
}
|
25
nix/users/base/neovim.nix
Normal file
25
nix/users/base/neovim.nix
Normal file
@ -0,0 +1,25 @@
|
||||
{ inputs, pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
neovim
|
||||
ripgrep
|
||||
|
||||
# Language Servers
|
||||
lua-language-server # Lua
|
||||
nixd # Nix
|
||||
gopls # GoLang
|
||||
rust-analyzer # Rust
|
||||
zls # Zig
|
||||
llvmPackages_15.clang-unwrapped #C, C++
|
||||
python311Packages.jedi-language-server #Python
|
||||
nodePackages_latest.vscode-langservers-extracted #HTML,CSS, JSON
|
||||
nodePackages_latest.grammarly-languageserver #Markdown
|
||||
nodePackages_latest.typescript-language-server #Javascript and Typescript
|
||||
nodePackages_latest.bash-language-server #Bash
|
||||
nodePackages_latest.dockerfile-language-server-nodejs #Dockerfiles
|
||||
nodePackages_latest.yaml-language-server #Yaml
|
||||
];
|
||||
# xdg.configFile = {
|
||||
# "nvim".source = "${inputs.self}/nvim";
|
||||
# };
|
||||
}
|
15
nix/users/base/packages.nix
Normal file
15
nix/users/base/packages.nix
Normal file
@ -0,0 +1,15 @@
|
||||
{ pkgs, inputs, ... }:
|
||||
{
|
||||
fonts.fontconfig.enable = true;
|
||||
|
||||
home.packages = with pkgs; [
|
||||
gcc
|
||||
vrrtest
|
||||
websocat
|
||||
roboto
|
||||
fira-code
|
||||
pciutils
|
||||
libnotify
|
||||
(nerdfonts.override { fonts = [ "RobotoMono" ]; })
|
||||
];
|
||||
}
|
29
nix/users/base/zsh.nix
Normal file
29
nix/users/base/zsh.nix
Normal file
@ -0,0 +1,29 @@
|
||||
{ config, ... }:
|
||||
{
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
autocd = true;
|
||||
enableAutosuggestions = true;
|
||||
enableCompletion = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
dotDir = "~/.config/zsh";
|
||||
history.path = "~/.config/zsh/.zsh_history";
|
||||
initExtra = ''
|
||||
setopt appendhistory
|
||||
parse_git_branch() {
|
||||
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
|
||||
}
|
||||
setopt PROMPT_SUBST
|
||||
PROMPT='%B%F{183}%m%f%F{111}[%f%F{158}%~%f%F{111}]%f%F{111}$(parse_git_branch)%f %F{183}>%f%f%b '
|
||||
if [[ "$TERM" == "dumb" ]]
|
||||
then
|
||||
unsetopt zle
|
||||
unsetopt prompt_cr
|
||||
unsetopt prompt_subst
|
||||
unfunction precmd
|
||||
unfunction preexec
|
||||
PS1='$ '
|
||||
fi
|
||||
'';
|
||||
};
|
||||
}
|
17
nix/users/nicolaivds/colors/default.nix
Normal file
17
nix/users/nicolaivds/colors/default.nix
Normal file
@ -0,0 +1,17 @@
|
||||
rec {
|
||||
primary_accent_hex = "cba6f7";
|
||||
secondary_accent_hex = "89b4fa";
|
||||
tertiary_accent_hex = "f5f5f5";
|
||||
primary_background_hex = "11111B";
|
||||
secondary_background_hex = "1b1b2b";
|
||||
tertiary_background_hex = "25253a";
|
||||
|
||||
primary_accent_rgba = "rgba(203,166,247,${opacity})";
|
||||
secondary_accent_rgba = "rgba(137,180,250,${opacity})";
|
||||
tertiary_accent_rgba = "rgba(245,245,245,${opacity})";
|
||||
primary_background_rgba = "rgba(17,17,27,${opacity})";
|
||||
secondary_background_rgba = "rgba(27,27,43,${opacity})";
|
||||
tertiary_background_rgba = "rgba(37,37,58,${opacity})";
|
||||
|
||||
opacity = "1";
|
||||
}
|
48
nix/users/nicolaivds/default.nix
Normal file
48
nix/users/nicolaivds/default.nix
Normal file
@ -0,0 +1,48 @@
|
||||
{ inputs, username, flake_path, ... }:
|
||||
let
|
||||
# Variables to share accross configs
|
||||
custom = {
|
||||
font = "RobotoMono Nerd Font";
|
||||
fontsize = "12";
|
||||
primary_accent = "cba6f7";
|
||||
secondary_accent= "89b4fa";
|
||||
tertiary_accent = "f5f5f5";
|
||||
background = "11111B";
|
||||
opacity = "1";
|
||||
cursor = "Numix-Cursor";
|
||||
palette = import ./colors;
|
||||
};
|
||||
in
|
||||
{
|
||||
_module.args = { inherit inputs username custom; };
|
||||
imports = [
|
||||
./general
|
||||
./programs
|
||||
./themes
|
||||
./wayland
|
||||
];
|
||||
|
||||
# Let Home Manager install and mange itself
|
||||
programs.home-manager.enable = true;
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nixpkgs.config.allowUnfreePredicate = _: true;
|
||||
home.shellAliases = {
|
||||
home-switch = "home-manager switch --flake ${flake_path}#${username}";
|
||||
sudo = "sudo -E";
|
||||
sudopath = "sudo env PATH=$PATH";
|
||||
};
|
||||
|
||||
# Home Manager needs a bit of information about you and the path it should manage
|
||||
home.username = "${username}";
|
||||
home.homeDirectory = "/home/${username}";
|
||||
|
||||
# This value determines the Home Manager release that your
|
||||
# configuration is compatible with. This helps avoid breakage
|
||||
# when a new Home Manager release introduces backwards
|
||||
# incompatible changes.
|
||||
#
|
||||
# You can update Home Manager without changing this value. See
|
||||
# the Home Manager release notes for a list of state version
|
||||
# changes in each release.
|
||||
home.stateVersion = "23.05";
|
||||
}
|
7
nix/users/nicolaivds/general/default.nix
Normal file
7
nix/users/nicolaivds/general/default.nix
Normal file
@ -0,0 +1,7 @@
|
||||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
../../base
|
||||
./packages.nix
|
||||
];
|
||||
}
|
65
nix/users/nicolaivds/general/packages.nix
Normal file
65
nix/users/nicolaivds/general/packages.nix
Normal file
@ -0,0 +1,65 @@
|
||||
{ pkgs, inputs, ... }:
|
||||
{
|
||||
#Overlays/Overrides
|
||||
nixpkgs.overlays = [
|
||||
(self: super: {
|
||||
waybar = super.waybar.overrideAttrs (oldAttrs: {
|
||||
mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ];
|
||||
});
|
||||
})
|
||||
];
|
||||
|
||||
programs.direnv.enable = true;
|
||||
|
||||
#Packages
|
||||
home.packages = with pkgs; [
|
||||
betterbird
|
||||
bottles
|
||||
brave
|
||||
btop
|
||||
cliphist
|
||||
foot
|
||||
gamemode
|
||||
gamescope
|
||||
glibc
|
||||
go
|
||||
grim
|
||||
hplipWithPlugin
|
||||
inputs.maxfetch.packages.${pkgs.system}.default
|
||||
inputs.orcaslicer.packages.${pkgs.system}.orca-slicer
|
||||
libreoffice
|
||||
lutris
|
||||
mpv
|
||||
neofetch
|
||||
neovim
|
||||
nix-prefetch-github
|
||||
obs-studio
|
||||
obs-studio-plugins.obs-pipewire-audio-capture
|
||||
obs-studio-plugins.obs-vkcapture
|
||||
obs-studio-plugins.wlrobs
|
||||
pavucontrol
|
||||
picard
|
||||
playerctl
|
||||
protontricks
|
||||
protonup-qt
|
||||
qbittorrent
|
||||
remmina
|
||||
slurp
|
||||
steamtinkerlaunch
|
||||
swayidle
|
||||
swaylock-effects
|
||||
swaynotificationcenter
|
||||
swww
|
||||
vlc
|
||||
waybar
|
||||
wine-wayland
|
||||
winetricks
|
||||
wl-clipboard
|
||||
wlogout
|
||||
wofi
|
||||
xdg-utils
|
||||
xdotool
|
||||
xorg.xprop
|
||||
xorg.xwininfo
|
||||
];
|
||||
}
|
13
nix/users/nicolaivds/programs/brave.nix
Normal file
13
nix/users/nicolaivds/programs/brave.nix
Normal file
@ -0,0 +1,13 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.chromium = {
|
||||
enable = true;
|
||||
package = pkgs.brave;
|
||||
extensions = [
|
||||
{ id = "nngceckbapebfimnlniiiahkandclblb"; } # Bitwarden
|
||||
{ id = "gebbhagfogifgggkldgodflihgfeippi"; } # Return Youtube Dislike
|
||||
{ id = "mnjggcdmjocbbbhaepdhchncahnbgone"; } # SponsorBlock
|
||||
{ id = "bmnlcjabgnpnenekpadlanbbkooimhnj"; } # Honey
|
||||
];
|
||||
};
|
||||
}
|
10
nix/users/nicolaivds/programs/default.nix
Normal file
10
nix/users/nicolaivds/programs/default.nix
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
imports = [
|
||||
./webcord.nix
|
||||
./mpd.nix
|
||||
./brave.nix
|
||||
./vscodium.nix
|
||||
./git.nix
|
||||
./sops.nix
|
||||
];
|
||||
}
|
69
nix/users/nicolaivds/programs/git.nix
Normal file
69
nix/users/nicolaivds/programs/git.nix
Normal file
@ -0,0 +1,69 @@
|
||||
{ pkgs, config, ... }:
|
||||
{
|
||||
services.gpg-agent.enable = true;
|
||||
programs = {
|
||||
git = {
|
||||
enable = true;
|
||||
delta.enable = true;
|
||||
includes = [
|
||||
{
|
||||
condition = "gitdir:${config.home.homeDirectory}/GIT/Personal/";
|
||||
contents = {
|
||||
user = {
|
||||
name = "Nicolai Van der Storm";
|
||||
email = "nicolai@nvds.be";
|
||||
signingkey = "CA53B34914EFD59B";
|
||||
};
|
||||
gpg.program = "gpg2";
|
||||
commit.gpgsign = true;
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
condition = "gitdir:${config.home.homeDirectory}/.dotfiles/";
|
||||
contents = {
|
||||
user = {
|
||||
name = "Nicolai Van der Storm";
|
||||
email = "nicolai@nvds.be";
|
||||
signingkey = "CA53B34914EFD59B";
|
||||
};
|
||||
gpg.program = "gpg2";
|
||||
commit.gpgsign = true;
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
};
|
||||
gpg = {
|
||||
enable = true;
|
||||
homedir = "${config.xdg.configHome}/gpg";
|
||||
publicKeys = [
|
||||
{source = "${config.xdg.configHome}/gpg/nicolaivds_pup.gpg";}
|
||||
{source = "${config.xdg.configHome}/gpg/nicolaivds.gpg";}
|
||||
];
|
||||
};
|
||||
|
||||
ssh = {
|
||||
enable = true;
|
||||
matchBlocks = {
|
||||
# Personal git server
|
||||
"git.nvds.be" = {
|
||||
hostname = "git.nvds.be";
|
||||
identityFile = "${config.home.homeDirectory}/.ssh/id_ed25519_personal";
|
||||
};
|
||||
|
||||
# Github
|
||||
"github.com" = {
|
||||
hostname = "github.com";
|
||||
identityFile = "${config.home.homeDirectory}/.ssh/id_ed25519_personal";
|
||||
};
|
||||
|
||||
# Gitlab
|
||||
"gitlab.com" = {
|
||||
hostname = "gitlab.com";
|
||||
identityFile = "${config.home.homeDirectory}/.ssh/id_ed25519_personal";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
23
nix/users/nicolaivds/programs/mpd.nix
Normal file
23
nix/users/nicolaivds/programs/mpd.nix
Normal file
@ -0,0 +1,23 @@
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
services = {
|
||||
mpdris2.enable = true;
|
||||
mpd = {
|
||||
enable = true;
|
||||
musicDirectory = "${config.home.homeDirectory}/Music/";
|
||||
network.startWhenNeeded = true;
|
||||
extraConfig = ''
|
||||
audio_output {
|
||||
type "pipewire"
|
||||
name "PipeWire Sound Server"
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
programs = {
|
||||
ncmpcpp = {
|
||||
enable = true;
|
||||
package = pkgs.ncmpcpp.override { visualizerSupport = true; };
|
||||
};
|
||||
};
|
||||
}
|
20
nix/users/nicolaivds/programs/sops.nix
Normal file
20
nix/users/nicolaivds/programs/sops.nix
Normal file
@ -0,0 +1,20 @@
|
||||
{ inputs, lib, config, ... }:
|
||||
{
|
||||
imports = [
|
||||
inputs.sops-nix.homeManagerModules.sops
|
||||
# <sops-nix/modules/home-manager/sops.nix>
|
||||
];
|
||||
|
||||
sops = {
|
||||
age.keyFile = "${config.xdg.configHome}/sops/age/keys.txt";
|
||||
defaultSopsFile = ../secrets/secrets.yaml;
|
||||
secrets = {
|
||||
ssh_nicolaivds.path = "${config.home.homeDirectory}/.ssh/id_ed25519_personal";
|
||||
ssh_nicolaivds_pub.path = "${config.home.homeDirectory}/.ssh/id_ed25519_personal.pub";
|
||||
gpg_nicolaivds_pub.path = "${config.xdg.configHome}/gpg/nicolaivds_pup.gpg";
|
||||
gpg_nicolaivds.path = "${config.xdg.configHome}/gpg/nicolaivds.gpg";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.services.mbsync.Unit.After = [ "sops-nix.service" ];
|
||||
}
|
7
nix/users/nicolaivds/programs/vscodium.nix
Normal file
7
nix/users/nicolaivds/programs/vscodium.nix
Normal file
@ -0,0 +1,7 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
package = pkgs.vscodium;
|
||||
};
|
||||
}
|
19
nix/users/nicolaivds/programs/webcord.nix
Normal file
19
nix/users/nicolaivds/programs/webcord.nix
Normal file
@ -0,0 +1,19 @@
|
||||
{ pkgs, lib, ... }:
|
||||
let
|
||||
catppuccin-mocha = pkgs.fetchFromGitHub {
|
||||
owner = "catppuccin";
|
||||
repo = "discord";
|
||||
rev = "f5e294288267ed3eca46b43cfaea63a544230906";
|
||||
hash = "sha256-LlZaJ9FCQ3otEzbWT2Zv4QObc0EmxyHpQ+onuQP1p4Y=";
|
||||
};
|
||||
in {
|
||||
home.packages = with pkgs; [
|
||||
(webcord-vencord.override { webcord = webcord.override { electron_25 = electron_24;};})
|
||||
];
|
||||
|
||||
xdg.configFile = {
|
||||
"WebCord/Themes/Mocha" = {
|
||||
source = "${catppuccin-mocha}/themes/mocha.theme.css";
|
||||
};
|
||||
};
|
||||
}
|
24
nix/users/nicolaivds/secrets/secrets.yaml
Normal file
24
nix/users/nicolaivds/secrets/secrets.yaml
Normal file
File diff suppressed because one or more lines are too long
7
nix/users/nicolaivds/themes/default.nix
Normal file
7
nix/users/nicolaivds/themes/default.nix
Normal file
@ -0,0 +1,7 @@
|
||||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./gtk.nix
|
||||
./qt.nix
|
||||
];
|
||||
}
|
37
nix/users/nicolaivds/themes/gtk.nix
Normal file
37
nix/users/nicolaivds/themes/gtk.nix
Normal file
@ -0,0 +1,37 @@
|
||||
{
|
||||
pkgs,
|
||||
custom ? {
|
||||
font = "RobotoMono Nerd Font";
|
||||
fontsize = "12";
|
||||
cursor = "Numix-Cursor";
|
||||
},
|
||||
...
|
||||
}:
|
||||
{
|
||||
gtk = {
|
||||
enable = true;
|
||||
font.name = "${custom.font} ${custom.fontsize}";
|
||||
iconTheme = {
|
||||
name = "Papirus-Dark";
|
||||
package = pkgs.catppuccin-papirus-folders;
|
||||
};
|
||||
cursorTheme = {
|
||||
name = "${custom.cursor}";
|
||||
package = pkgs.numix-cursor-theme;
|
||||
};
|
||||
theme = {
|
||||
name = "Catppuccin-Mocha-Standard-Blue-Dark";
|
||||
package = pkgs.catppuccin-gtk.override { variant="mocha"; };
|
||||
};
|
||||
gtk3.extraConfig = {
|
||||
Settings = ''
|
||||
gtk-application-prefer-dark-theme=1
|
||||
'';
|
||||
};
|
||||
gtk4.extraConfig = {
|
||||
Settings = ''
|
||||
gtk-application-prefer-dark-theme=1
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
8
nix/users/nicolaivds/themes/qt.nix
Normal file
8
nix/users/nicolaivds/themes/qt.nix
Normal file
@ -0,0 +1,8 @@
|
||||
{ ... }:
|
||||
{
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme = "gtk";
|
||||
style.name = "gtk2";
|
||||
};
|
||||
}
|
10
nix/users/nicolaivds/wayland/default.nix
Normal file
10
nix/users/nicolaivds/wayland/default.nix
Normal file
@ -0,0 +1,10 @@
|
||||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./hyprland.nix
|
||||
./waybar.nix
|
||||
./wofi.nix
|
||||
./foot.nix
|
||||
./wlogout.nix
|
||||
];
|
||||
}
|
52
nix/users/nicolaivds/wayland/foot.nix
Normal file
52
nix/users/nicolaivds/wayland/foot.nix
Normal file
@ -0,0 +1,52 @@
|
||||
{
|
||||
custom ? {
|
||||
font = "RobotoMono Nerd Font";
|
||||
fontsize = "12";
|
||||
primary_accent = "cba6f7";
|
||||
background = "11111B";
|
||||
opacity = ".85";
|
||||
},
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.foot = {
|
||||
enable = true;
|
||||
server.enable = true;
|
||||
settings = {
|
||||
main = {
|
||||
term = "xterm-256color";
|
||||
font = "${custom.font}:size=${custom.fontsize}";
|
||||
pad = "10x5 center";
|
||||
dpi-aware = "no";
|
||||
};
|
||||
cursor = {
|
||||
color = "${custom.primary_accent} ${custom.primary_accent}";
|
||||
style = "beam";
|
||||
};
|
||||
colors = {
|
||||
alpha="${custom.opacity}";
|
||||
background="${custom.palette.tertiary_background_hex}";
|
||||
# background="${custom.background}";
|
||||
regular0="11111B"; # black
|
||||
regular1="ff5555"; # red
|
||||
regular2="afffd7"; # green
|
||||
regular3="f1fa8c"; # yellow
|
||||
regular4="87afff"; # blue
|
||||
regular5="bd93f9"; # magenta
|
||||
regular6="8be9fd"; # cyan
|
||||
regular7="f8f8f2"; # white
|
||||
bright0="2d5b69"; # bright black
|
||||
bright1="ff665c"; # bright red
|
||||
bright2="84c747"; # bright green
|
||||
bright3="ebc13d"; # bright yellow
|
||||
bright4="58a3ff"; # bright blue
|
||||
bright5="ff84cd"; # bright magenta
|
||||
bright6="53d6c7"; # bright cyan
|
||||
bright7="cad8d9"; # bright white
|
||||
};
|
||||
tweak = {
|
||||
sixel = "yes";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
228
nix/users/nicolaivds/wayland/hyprland.nix
Normal file
228
nix/users/nicolaivds/wayland/hyprland.nix
Normal file
@ -0,0 +1,228 @@
|
||||
{
|
||||
config,
|
||||
custom ? {
|
||||
fontsize = "12";
|
||||
primary_accent = "cba6f7";
|
||||
secondary_accent = "89b4fa";
|
||||
tertiary_accent = "f5f5f5";
|
||||
background = "11111B";
|
||||
opacity = ".85";
|
||||
cursor = "Numix-Cursor";
|
||||
},
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
|
||||
enableNvidiaPatches = true;
|
||||
xwayland.enable = true;
|
||||
systemd.enable = true;
|
||||
settings = {
|
||||
"$mainMod" = "SUPER";
|
||||
monitor = [
|
||||
"DP-2, 2560x1440@144, 0x0, 1"
|
||||
];
|
||||
exec-once = [
|
||||
"waybar"
|
||||
"swww init"
|
||||
''swayidle -w timeout 1800 'swaylock -f -i ${config.home.homeDirectory}/photos/wallpapers/wallpaper.png' timeout 1805 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' before-sleep "swaylock -f -i ${config.home.homeDirectory}/photos/wallpapers/wallpaper.png"''
|
||||
"hyprctl setcursor ${custom.cursor} ${custom.fontsize}"
|
||||
"wl-paste --type text --watch cliphist store &"
|
||||
"wl-paste --type image --watch cliphist store &"
|
||||
"swaync"
|
||||
];
|
||||
input = {
|
||||
kb_layout = "be";
|
||||
follow_mouse = 1;
|
||||
force_no_accel = 1;
|
||||
numlock_by_default = true;
|
||||
sensitivity = 0;
|
||||
};
|
||||
general = {
|
||||
gaps_in = 6;
|
||||
gaps_out = 10;
|
||||
border_size = 2;
|
||||
# "col.active_border" = "rgb(${custom.primary_accent})";
|
||||
"col.active_border" = "rgba(${custom.palette.tertiary_background_hex}00)";
|
||||
"col.inactive_border" = "rgba(${custom.background}00)";
|
||||
#allow_tearing = true;
|
||||
layout = "dwindle";
|
||||
};
|
||||
decoration = {
|
||||
rounding = 10;
|
||||
shadow_ignore_window = true;
|
||||
drop_shadow = true;
|
||||
shadow_range = 40;
|
||||
shadow_render_power = 2;
|
||||
# "col.shadow" = "rgb(${custom.primary_accent})";
|
||||
"col.shadow" = "rgb(${custom.background})";
|
||||
"col.shadow_inactive" = "rgba(${custom.background}00)";
|
||||
blur = {
|
||||
enabled = false;
|
||||
size = 6;
|
||||
passes = 3;
|
||||
new_optimizations = true;
|
||||
ignore_opacity = true;
|
||||
noise = 0.0117;
|
||||
contrast = 1.2;
|
||||
xray = false;
|
||||
brightness = 1;
|
||||
};
|
||||
};
|
||||
animations = {
|
||||
enabled = true;
|
||||
bezier = "overshot,0.13,0.99,0.29,1.1";
|
||||
animation = [
|
||||
"windows,1,6,overshot,slide"
|
||||
"border,1,10,default"
|
||||
"fade,1,10,default"
|
||||
"workspaces,1,6,overshot,slide"
|
||||
];
|
||||
};
|
||||
dwindle = {
|
||||
pseudotile = true;
|
||||
preserve_split = true;
|
||||
force_split = 2;
|
||||
};
|
||||
master = {
|
||||
new_is_master = true;
|
||||
};
|
||||
gestures = {
|
||||
workspace_swipe = false;
|
||||
};
|
||||
misc = {
|
||||
vfr = true;
|
||||
vrr = 0;
|
||||
disable_hyprland_logo = true;
|
||||
disable_splash_rendering = true;
|
||||
};
|
||||
bind = [
|
||||
# TODO: Look into using special workspace
|
||||
# Exit to tty
|
||||
"$mainMod SHIFT, X, exit "
|
||||
|
||||
# Launch
|
||||
"$mainMod, RETURN, exec, foot"
|
||||
"$mainMod, D, exec, wofi"
|
||||
''$mainMod,P,exec,mkdir -p ${config.home.homeDirectory}/photos/screenshots; grim -t png -g "$(slurp)" ${config.home.homeDirectory}/photos/screenshots/$(date +%Y-%m-%d_%H-%m-%s).png''
|
||||
"$mainMod SHIFT,N,exec, swaync-client -t -sw"
|
||||
"$mainMod,X,exec, wlogout -b 4"
|
||||
"$mainMod,V,exec, cliphist list | wofi -dmenu | cliphist decode | wl-paste"
|
||||
|
||||
# Window Options
|
||||
"$mainMod SHIFT, P, pseudo"
|
||||
"$mainMod, S, togglesplit"
|
||||
"$mainMod, F, fullscreen"
|
||||
"$mainMod, Space, togglefloating "
|
||||
"$mainMod, Q, killactive"
|
||||
|
||||
# Focus Windows
|
||||
"$mainMod, H, movefocus, l"
|
||||
"$mainMod, L, movefocus, r"
|
||||
"$mainMod, K, movefocus, u"
|
||||
"$mainMod, J, movefocus, d"
|
||||
|
||||
# Move Windows
|
||||
"$mainMod SHIFT,H,movewindow,l"
|
||||
"$mainMod SHIFT,L,movewindow,r"
|
||||
"$mainMod SHIFT,K,movewindow,u"
|
||||
"$mainMod SHIFT,J,movewindow,d"
|
||||
|
||||
# Switch workspaces
|
||||
"$mainMod, AMPERSAND, workspace, 1"
|
||||
"$mainMod, EACUTE, workspace, 2"
|
||||
"$mainMod, QUOTEDBL, workspace, 3"
|
||||
"$mainMod, APOSTROPHE, workspace, 4"
|
||||
"$mainMod, PARENLEFT, workspace, 5"
|
||||
"$mainMod, SECTION, workspace, 6"
|
||||
"$mainMod, EGRAVE, workspace, 7"
|
||||
"$mainMod, EXCLAM, workspace, 8"
|
||||
"$mainMod, CCEDILLA, workspace, 9"
|
||||
"$mainMod, AGRAVE, workspace, 10"
|
||||
|
||||
# Switch active window to workspace
|
||||
"$mainMod SHIFT, AMPERSAND, movetoworkspace, 1"
|
||||
"$mainMod SHIFT, EACUTE, movetoworkspace, 2"
|
||||
"$mainMod SHIFT, QUOTEDBL, movetoworkspace, 3"
|
||||
"$mainMod SHIFT, APOSTROPHE, movetoworkspace, 4"
|
||||
"$mainMod SHIFT, PARENLEFT, movetoworkspace, 5"
|
||||
"$mainMod SHIFT, SECTION, movetoworkspace, 6"
|
||||
"$mainMod SHIFT, EGRAVE, movetoworkspace, 7"
|
||||
"$mainMod SHIFT, EXCLAM, movetoworkspace, 8"
|
||||
"$mainMod SHIFT, CCEDILLA, movetoworkspace, 9"
|
||||
"$mainMod SHIFT, AGRAVE, movetoworkspace, 10"
|
||||
|
||||
# Scroll workspace with mouse scrollwheel
|
||||
"$mainMod, mouse_down, workspace, e+1"
|
||||
"$mainMod, mouse_up, workspace, e-1"
|
||||
];
|
||||
bindm = [
|
||||
# Move and resize windows with mouse too
|
||||
"$mainMod, mouse:272, movewindow"
|
||||
"$mainMod SHIFT, mouse:272, resizewindow"
|
||||
];
|
||||
bindle = [
|
||||
# Volume Keys
|
||||
",XF86AudioRaiseVolume,exec,pactl set-sink-volume @DEFAULT_SINK@ +5% "
|
||||
",XF86AudioLowerVolume,exec,pactl set-sink-volume @DEFAULT_SINK@ -5% "
|
||||
];
|
||||
windowrulev2 = [
|
||||
# "opacity ${custom.opacity} ${custom.opacity},class:^(thunar)$"
|
||||
# "opacity ${custom.opacity} ${custom.opacity},class:^(WebCord)$"
|
||||
# "opacity 0.90 0.90,class:^(Brave-browser)$"
|
||||
# "opacity 0.90 0.90,class:^(brave-browser)$"
|
||||
# "opacity 0.90 0.90,class:^(firefox)$"
|
||||
"float,class:^(pavucontrol)$"
|
||||
"float,class:^(file_progress)$"
|
||||
"float,class:^(confirm)$"
|
||||
"float,class:^(dialog)$"
|
||||
"float,class:^(download)$"
|
||||
"float,class:^(notification)$"
|
||||
"float,class:^(error)$"
|
||||
"float,class:^(confirmreset)$"
|
||||
"float,title:^(Open File)$"
|
||||
"float,title:^(branchdialog)$"
|
||||
"float,title:^(Confirm to replace files)$"
|
||||
"float,title:^(File Operation Progress)$"
|
||||
"float,title:^(mpv)$"
|
||||
"float, title:^(Picture-in-Picture)$"
|
||||
# Ensure tearing for specific games
|
||||
# "immediate, class:^(cs2)$"
|
||||
# "immediate, class:^(love)$"
|
||||
# "immediate, title:^(Freesync test)$"
|
||||
];
|
||||
layerrule = [
|
||||
"blur, waybar"
|
||||
"blur, wofi"
|
||||
"ignorezero, wofi"
|
||||
];
|
||||
};
|
||||
# Submaps
|
||||
extraConfig = ''
|
||||
# will switch to a submap called resize
|
||||
bind=$mainMod,R,submap,resize
|
||||
|
||||
# will start a submap called "resize"
|
||||
submap=resize
|
||||
|
||||
# sets repeatable binds for resizing the active window
|
||||
binde=,L,resizeactive,15 0
|
||||
binde=,H,resizeactive,-15 0
|
||||
binde=,K,resizeactive,0 -15
|
||||
binde=,J,resizeactive,0 15
|
||||
|
||||
# use reset to go back to the global submap
|
||||
bind=,escape,submap,reset
|
||||
bind=$mainMod,R,submap,reset
|
||||
|
||||
# will reset the submap, meaning end the current one and return to the global one
|
||||
submap=reset
|
||||
|
||||
# For tearing
|
||||
env = WLR_DRM_NO_ATOMIC,1
|
||||
'';
|
||||
};
|
||||
}
|
323
nix/users/nicolaivds/wayland/waybar.nix
Normal file
323
nix/users/nicolaivds/wayland/waybar.nix
Normal file
@ -0,0 +1,323 @@
|
||||
{
|
||||
config,
|
||||
custom ? {
|
||||
font = "RobotoMono Nerd Font";
|
||||
fontsize = "12";
|
||||
primary_accent = "cba6f7";
|
||||
secondary_accent = "89b4fa";
|
||||
tertiary_accent = "f5f5f5";
|
||||
background = "11111B";
|
||||
opacity = ".85";
|
||||
cursor = "Numix-Cursor";
|
||||
},
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
settings.mainBar = {
|
||||
position= "top";
|
||||
layer= "top";
|
||||
height= 35;
|
||||
margin-top= 0;
|
||||
margin-bottom= 0;
|
||||
margin-left= 0;
|
||||
margin-right= 0;
|
||||
modules-left= [
|
||||
"custom/launcher"
|
||||
"custom/playerctl#backward"
|
||||
"custom/playerctl#play"
|
||||
"custom/playerctl#foward"
|
||||
"custom/playerlabel"
|
||||
];
|
||||
modules-center= [
|
||||
"cava#left"
|
||||
"hyprland/workspaces"
|
||||
"cava#right"
|
||||
];
|
||||
modules-right= [
|
||||
"tray"
|
||||
"pulseaudio"
|
||||
"network"
|
||||
"clock"
|
||||
];
|
||||
clock= {
|
||||
format = " {:%a, %d %b, %I:%M %p}";
|
||||
tooltip= "true";
|
||||
tooltip-format= "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
|
||||
format-alt= " {:%d/%m}";
|
||||
};
|
||||
"wlr/workspaces"= {
|
||||
active-only= false;
|
||||
all-outputs= false;
|
||||
disable-scroll= false;
|
||||
on-scroll-up= "hyprctl dispatch workspace e-1";
|
||||
on-scroll-down= "hyprctl dispatch workspace e+1";
|
||||
format = "{name}";
|
||||
on-click= "activate";
|
||||
format-icons= {
|
||||
urgent= "";
|
||||
active= "";
|
||||
default = "";
|
||||
sort-by-number= true;
|
||||
};
|
||||
};
|
||||
"cava#left" = {
|
||||
framerate = 60;
|
||||
autosens = 1;
|
||||
bars = 18;
|
||||
lower_cutoff_freq = 50;
|
||||
higher_cutoff_freq = 10000;
|
||||
method = "pipewire";
|
||||
source = "auto";
|
||||
stereo = true;
|
||||
reverse = false;
|
||||
bar_delimiter = 0;
|
||||
monstercat = false;
|
||||
waves = false;
|
||||
input_delay = 2;
|
||||
format-icons = [
|
||||
"<span foreground='#${custom.primary_accent}'>▁</span>"
|
||||
"<span foreground='#${custom.primary_accent}'>▂</span>"
|
||||
"<span foreground='#${custom.primary_accent}'>▃</span>"
|
||||
"<span foreground='#${custom.primary_accent}'>▄</span>"
|
||||
"<span foreground='#${custom.secondary_accent}'>▅</span>"
|
||||
"<span foreground='#${custom.secondary_accent}'>▆</span>"
|
||||
"<span foreground='#${custom.secondary_accent}'>▇</span>"
|
||||
"<span foreground='#${custom.secondary_accent}'>█</span>"
|
||||
];
|
||||
};
|
||||
"cava#right" = {
|
||||
framerate = 60;
|
||||
autosens = 1;
|
||||
bars = 18;
|
||||
lower_cutoff_freq = 50;
|
||||
higher_cutoff_freq = 10000;
|
||||
method = "pipewire";
|
||||
source = "auto";
|
||||
stereo = true;
|
||||
reverse = false;
|
||||
bar_delimiter = 0;
|
||||
monstercat = false;
|
||||
waves = false;
|
||||
input_delay = 2;
|
||||
format-icons = [
|
||||
"<span foreground='#${custom.primary_accent}'>▁</span>"
|
||||
"<span foreground='#${custom.primary_accent}'>▂</span>"
|
||||
"<span foreground='#${custom.primary_accent}'>▃</span>"
|
||||
"<span foreground='#${custom.primary_accent}'>▄</span>"
|
||||
"<span foreground='#${custom.secondary_accent}'>▅</span>"
|
||||
"<span foreground='#${custom.secondary_accent}'>▆</span>"
|
||||
"<span foreground='#${custom.secondary_accent}'>▇</span>"
|
||||
"<span foreground='#${custom.secondary_accent}'>█</span>"
|
||||
];
|
||||
};
|
||||
"custom/playerctl#backward"= {
|
||||
format= " ";
|
||||
on-click= "playerctl previous";
|
||||
on-scroll-up = "playerctl volume .05+";
|
||||
on-scroll-down = "playerctl volume .05-";
|
||||
};
|
||||
"custom/playerctl#play"= {
|
||||
format= "{icon}";
|
||||
return-type= "json";
|
||||
exec= "playerctl -a metadata --format '{\"text\": \"{{artist}} - {{markup_escape(title)}}\", \"tooltip\": \"{{playerName}} : {{markup_escape(title)}}\", \"alt\": \"{{status}}\", \"class\": \"{{status}}\"}' -F";
|
||||
on-click= "playerctl play-pause";
|
||||
on-scroll-up = "playerctl volume .05+";
|
||||
on-scroll-down = "playerctl volume .05-";
|
||||
format-icons= {
|
||||
Playing = "<span> </span>";
|
||||
Paused = "<span> </span>";
|
||||
Stopped = "<span> </span>";
|
||||
};
|
||||
};
|
||||
"custom/playerctl#foward"= {
|
||||
format= " ";
|
||||
on-click= "playerctl next";
|
||||
on-scroll-up = "playerctl volume .05+";
|
||||
on-scroll-down = "playerctl volume .05-";
|
||||
};
|
||||
"custom/playerlabel"= {
|
||||
format= "<span> {} </span>";
|
||||
return-type= "json";
|
||||
max-length= 40;
|
||||
exec = "playerctl -a metadata --format '{\"text\": \"{{artist}} - {{markup_escape(title)}}\", \"tooltip\": \"{{playerName}} : {{markup_escape(title)}}\", \"alt\": \"{{status}}\", \"class\": \"{{status}}\"}' -F";
|
||||
on-click= "";
|
||||
};
|
||||
|
||||
memory= {
|
||||
format= " {}%";
|
||||
format-alt= " {used}/{total} GiB";
|
||||
interval= 5;
|
||||
};
|
||||
cpu= {
|
||||
format= " {usage}%";
|
||||
format-alt= " {avg_frequency} GHz";
|
||||
interval= 5;
|
||||
};
|
||||
network = {
|
||||
format-wifi = " {signalStrength}%";
|
||||
format-ethernet = " 100% ";
|
||||
tooltip-format = "Connected to {essid} {ifname} via {gwaddr}";
|
||||
format-linked = "{ifname} (No IP)";
|
||||
format-disconnected = " 0% ";
|
||||
};
|
||||
tray= {
|
||||
icon-size= 20;
|
||||
spacing= 8;
|
||||
};
|
||||
pulseaudio= {
|
||||
format= "{icon} {volume}%";
|
||||
format-muted= "";
|
||||
format-icons= {
|
||||
default= ["" "" ""];
|
||||
};
|
||||
# on-scroll-up= "bash ${config.home.homeDirectory}/.scripts/volume up";
|
||||
# on-scroll-down= "bash ${config.home.homeDirectory}/.scripts/volume down";
|
||||
scroll-step= 5;
|
||||
on-click= "pavucontrol";
|
||||
};
|
||||
"custom/randwall"= {
|
||||
format= "";
|
||||
# on-click= "bash $HOME/.config/hypr/randwall.sh";
|
||||
# on-click-right= "bash $HOME/.config/hypr/wall.sh";
|
||||
};
|
||||
"custom/launcher"= {
|
||||
format= "";
|
||||
# on-click= "bash $HOME/.config/rofi/launcher.sh";
|
||||
# on-click-right= "bash $HOME/.config/rofi/run.sh";
|
||||
tooltip= "false";
|
||||
};
|
||||
};
|
||||
style = ''
|
||||
* {
|
||||
border: none;
|
||||
border-radius: 0px;
|
||||
font-family: ${custom.font};
|
||||
font-size: 14px;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background: ${custom.palette.primary_background_rgba};
|
||||
}
|
||||
|
||||
#cava.left, #cava.right {
|
||||
background: #${custom.palette.tertiary_background_hex};
|
||||
margin: 5px;
|
||||
padding: 8px 16px;
|
||||
color: #${custom.primary_accent};
|
||||
}
|
||||
#cava.left {
|
||||
border-radius: 24px 10px 24px 10px;
|
||||
}
|
||||
#cava.right {
|
||||
border-radius: 10px 24px 10px 24px;
|
||||
}
|
||||
#workspaces {
|
||||
background: #${custom.palette.tertiary_background_hex};
|
||||
margin: 5px 5px;
|
||||
padding: 8px 5px;
|
||||
border-radius: 16px;
|
||||
color: #${custom.primary_accent}
|
||||
}
|
||||
#workspaces button {
|
||||
padding: 0px 5px;
|
||||
margin: 0px 3px;
|
||||
border-radius: 16px;
|
||||
color: transparent;
|
||||
background: ${custom.palette.primary_background_rgba};
|
||||
transition: all 0.3s ease-in-out;
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
background-color: #${custom.secondary_accent};
|
||||
color: #${custom.background};
|
||||
border-radius: 16px;
|
||||
min-width: 50px;
|
||||
background-size: 400% 400%;
|
||||
transition: all 0.3s ease-in-out;
|
||||
}
|
||||
|
||||
#workspaces button:hover {
|
||||
background-color: #${custom.tertiary_accent};
|
||||
color: #${custom.background};
|
||||
border-radius: 16px;
|
||||
min-width: 50px;
|
||||
background-size: 400% 400%;
|
||||
}
|
||||
|
||||
#tray, #pulseaudio, #network, #battery,
|
||||
#custom-playerctl.backward, #custom-playerctl.play, #custom-playerctl.foward{
|
||||
background: #${custom.palette.tertiary_background_hex};
|
||||
font-weight: bold;
|
||||
margin: 5px 0px;
|
||||
}
|
||||
#tray, #pulseaudio, #network, #battery{
|
||||
color: #${custom.tertiary_accent};
|
||||
border-radius: 10px 24px 10px 24px;
|
||||
padding: 0 20px;
|
||||
margin-left: 7px;
|
||||
}
|
||||
#clock {
|
||||
color: #${custom.tertiary_accent};
|
||||
background: #${custom.palette.tertiary_background_hex};
|
||||
border-radius: 0px 0px 0px 40px;
|
||||
padding: 10px 10px 15px 25px;
|
||||
margin-left: 7px;
|
||||
font-weight: bold;
|
||||
font-size: 16px;
|
||||
}
|
||||
#custom-launcher {
|
||||
color: #${custom.secondary_accent};
|
||||
background: #${custom.palette.tertiary_background_hex};
|
||||
border-radius: 0px 0px 40px 0px;
|
||||
margin: 0px;
|
||||
padding: 0px 35px 0px 15px;
|
||||
font-size: 28px;
|
||||
}
|
||||
|
||||
#custom-playerctl.backward, #custom-playerctl.play, #custom-playerctl.foward {
|
||||
background: #${custom.palette.tertiary_background_hex};
|
||||
font-size: 22px;
|
||||
}
|
||||
#custom-playerctl.backward:hover, #custom-playerctl.play:hover, #custom-playerctl.foward:hover{
|
||||
color: #${custom.tertiary_accent};
|
||||
}
|
||||
#custom-playerctl.backward {
|
||||
color: #${custom.primary_accent};
|
||||
border-radius: 24px 0px 0px 10px;
|
||||
padding-left: 16px;
|
||||
margin-left: 7px;
|
||||
}
|
||||
#custom-playerctl.play {
|
||||
color: #${custom.secondary_accent};
|
||||
padding: 0 5px;
|
||||
}
|
||||
#custom-playerctl.foward {
|
||||
color: #${custom.primary_accent};
|
||||
border-radius: 0px 10px 24px 0px;
|
||||
padding-right: 12px;
|
||||
margin-right: 7px
|
||||
}
|
||||
#custom-playerlabel {
|
||||
background: #${custom.palette.tertiary_background_hex};
|
||||
color: #${custom.tertiary_accent};
|
||||
padding: 0 20px;
|
||||
border-radius: 24px 10px 24px 10px;
|
||||
margin: 5px 0;
|
||||
font-weight: bold;
|
||||
}
|
||||
#window{
|
||||
background: #${custom.palette.tertiary_background_hex};
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
border-radius: 16px;
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
33
nix/users/nicolaivds/wayland/wlogout.nix
Normal file
33
nix/users/nicolaivds/wayland/wlogout.nix
Normal file
@ -0,0 +1,33 @@
|
||||
{ config, ... }:
|
||||
{
|
||||
programs.wlogout = {
|
||||
enable = true;
|
||||
layout = [
|
||||
{
|
||||
label = "lock";
|
||||
# action = "waylock -f -i ${config.home.homeDirectory}/photos/wallpapers/wallpaper.png";
|
||||
action = "swaylock";
|
||||
text = "lock";
|
||||
keybind = "l";
|
||||
}
|
||||
{
|
||||
label = "shutdown";
|
||||
action = "systemctl poweroff";
|
||||
text = "Shutdown";
|
||||
keybind = "s";
|
||||
}
|
||||
{
|
||||
label = "reboot";
|
||||
action = "systemctl reboot";
|
||||
text = "Reboot";
|
||||
keybind = "r";
|
||||
}
|
||||
{
|
||||
label = "logout";
|
||||
action = "loginctl terminate-user $USER";
|
||||
text = "Log out";
|
||||
keybind = "e";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
55
nix/users/nicolaivds/wayland/wofi.nix
Normal file
55
nix/users/nicolaivds/wayland/wofi.nix
Normal file
@ -0,0 +1,55 @@
|
||||
{
|
||||
custom ? {
|
||||
font = "RobotoMono Nerd Font";
|
||||
primary_accent = "cba6f7";
|
||||
secondary_accent = "89b4fa";
|
||||
tertiary_accent = "f5f5f5";
|
||||
background = "11111B";
|
||||
opacity = "1";
|
||||
},
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.wofi = {
|
||||
enable = true;
|
||||
settings = {
|
||||
allow_images = true;
|
||||
width = "25%";
|
||||
hide_scroll = true;
|
||||
term = "foot";
|
||||
show = "drun";
|
||||
};
|
||||
style =''
|
||||
* {
|
||||
font-family: ${custom.font},monospace;
|
||||
font-weight: bold;
|
||||
}
|
||||
#window {
|
||||
border-radius: 40px;
|
||||
background: ${custom.palette.primary_background_rgba}
|
||||
}
|
||||
#input {
|
||||
border-radius: 100px;
|
||||
margin: 20px;
|
||||
padding: 15px 25px;
|
||||
background: ${custom.palette.tertiary_background_rgba};
|
||||
color: #${custom.tertiary_accent};
|
||||
}
|
||||
#outer-box {
|
||||
font-weight: bold;
|
||||
font-size: 14px;
|
||||
}
|
||||
#entry {
|
||||
margin: 10px 80px;
|
||||
padding: 20px 20px;
|
||||
border-radius: 200px;
|
||||
}
|
||||
#entry:selected{
|
||||
background-color:#${custom.primary_accent};
|
||||
color: #${custom.background};
|
||||
}
|
||||
#entry:hover {
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
11
nvim/init.lua
Normal file
11
nvim/init.lua
Normal file
@ -0,0 +1,11 @@
|
||||
--- Plugin Manager ---
|
||||
require(".lazy")
|
||||
|
||||
--- Colorschemes ---
|
||||
vim.cmd("runtime! lua/plugins/colorschemes/*.lua")
|
||||
|
||||
--- All Core Files ---
|
||||
vim.cmd("runtime! lua/core/*.lua")
|
||||
|
||||
--- All Other Plugins ---
|
||||
vim.cmd("runtime! lua/plugins/*.lua")
|
18
nvim/lua/core/colors.lua
Normal file
18
nvim/lua/core/colors.lua
Normal file
@ -0,0 +1,18 @@
|
||||
local status, color = pcall(vim.cmd.colorscheme, "catppuccin")
|
||||
if not status then
|
||||
print(color, 'using murphy instead')
|
||||
vim.cmd.colorscheme("murphy")
|
||||
end
|
||||
|
||||
vim.opt.fillchars:append { eob = " " } -- Gets rid of tilde after line numbers
|
||||
vim.cmd.set("noshowmode") -- Hide mode mode at bottom
|
||||
vim.cmd.set("noruler")
|
||||
|
||||
---------- These are now handled by the transparent nvim plugin --------
|
||||
-- vim.api.nvim_set_hl(0, "Normal", {bg = "none"})
|
||||
-- vim.api.nvim_set_hl(0, "NonText", {bg = "none"})
|
||||
-- vim.api.nvim_set_hl(0, "NormalFloat", {bg = "none"})
|
||||
-- vim.api.nvim_set_hl(0, "LineNr", {bg = "none"})
|
||||
-- vim.api.nvim_set_hl(0, "SignColumn", {bg = "none"})
|
||||
-- vim.api.nvim_set_hl(0, "VertSplit", {bg = "none"})
|
||||
-- vim.api.nvim_set_hl(0, "TabLine", {bg = "none"})
|
112
nvim/lua/core/functions.lua
Normal file
112
nvim/lua/core/functions.lua
Normal file
@ -0,0 +1,112 @@
|
||||
function edit_nvim()
|
||||
vim.cmd(":e $MYVIMRC")
|
||||
vim.cmd(":cd ~/.config/nvim")
|
||||
vim.cmd(":NvimTreeOpen")
|
||||
end
|
||||
|
||||
function randomquote()
|
||||
local quote = {
|
||||
"Bing Chilling",
|
||||
"The Stink Boys",
|
||||
"Whopper Whopper Whopper Whopper Junior Double Triple Whopper",
|
||||
"White Monster",
|
||||
"The system plays us everday...",
|
||||
"sudo systemctl restart justinlime",
|
||||
"sudo systemctl start justinlime",
|
||||
"sudo systemctl stop justinlime",
|
||||
"sudo systemctl enable justinlime",
|
||||
"sudo systemctl disable justinlime",
|
||||
}
|
||||
return quote[math.random(1,#quote)]
|
||||
end
|
||||
|
||||
function randomsplash()
|
||||
local splash = {
|
||||
{
|
||||
[[ ⠀ ]],
|
||||
[[ ⠀⠀ ⣞⢽⢪⢣⢣⢣⢫⡺⡵⣝⡮⣗⢷⢽⢽⢽⣮⡷⡽⣜⣜⢮⢺⣜⢷⢽⢝⡽⣝ ]],
|
||||
[[ ⠀ ⠸⡸⠜⠕⠕⠁⢁⢇⢏⢽⢺⣪⡳⡝⣎⣏⢯⢞⡿⣟⣷⣳⢯⡷⣽⢽⢯⣳⣫⠇ ]],
|
||||
[[ ⠀⠀ ⠀⢀⢀⢄⢬⢪⡪⡎⣆⡈⠚⠜⠕⠇⠗⠝⢕⢯⢫⣞⣯⣿⣻⡽⣏⢗⣗⠏ ⠀]],
|
||||
[[ ⠀ ⠀ ⠪⡪⡪⣪⢪⢺⢸⢢⢓⢆⢤⢀⠀⠀⠀⠀⠈⢊⢞⡾⣿⡯⣏⢮⠷⠁⠀ ⠀ ]],
|
||||
[[ ⠀ ⠀ ⠀⠀⠈⠊⠆⡃⠕⢕⢇⢇⢇⢇⢇⢏⢎⢎⢆⢄⠀⢑⣽⣿⢝⠲⠉⠀⠀⠀ ⠀]],
|
||||
[[ ⠀ ⠀⠀⠀ ⠀⠀⡿⠂⠠⠀⡇⢇⠕⢈⣀⠀⠁⠡⠣⡣⡫⣂⣿⠯⢪⠰⠂⠀⠀⠀⠀ ]],
|
||||
[[ ⠀⠀ ⠀⠀⠀⡦⡙⡂⢀⢤⢣⠣⡈⣾⡃⠠⠄⠀⡄⢱⣌⣶⢏⢊⠂⠀⠀⠀⠀⠀⠀ ]],
|
||||
[[ ⠀ ⠀ ⠀⠀⠀⢝⡲⣜⡮⡏⢎⢌⢂⠙⠢⠐⢀⢘⢵⣽⣿⡿⠁⠁⠀⠀⠀⠀⠀⠀ ⠀]],
|
||||
[[ ⠀ ⠀ ⠀⠀⠀⠨⣺⡺⡕⡕⡱⡑⡆⡕⡅⡕⡜⡼⢽⡻⠏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ]],
|
||||
[[ ⠀ ⠀ ⠀⠀⠀⣼⣳⣫⣾⣵⣗⡵⡱⡡⢣⢑⢕⢜⢕⡝⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ]],
|
||||
[[ ⠀ ⠀ ⠀⠀⣴⣿⣾⣿⣿⣿⡿⡽⡑⢌⠪⡢⡣⣣⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ]],
|
||||
[[ ⠀ ⠀ ⠀⠀⡟⡾⣿⢿⢿⢵⣽⣾⣼⣘⢸⢸⣞⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ]],
|
||||
[[ ⠀ ⠀ ⠀⠀⠀⠁⠇⠡⠩⡫⢿⣝⡻⡮⣒⢽⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ]],
|
||||
[[ ⠀ _ _ _ ___ ]],
|
||||
[[ ⠀ | \ | | (_) |__ \ ]],
|
||||
[[ ⠀ | \| | ___ ___ __ __ _ _ __ ___ ) | ]],
|
||||
[[ ⠀ | . ` | / _ \ / _ \\ \ / /| || '_ ` _ \ / / ]],
|
||||
[[ ⠀ | |\ || __/| (_) |\ V / | || | | | | ||_| ]],
|
||||
[[ ⠀ |_| \_| \___| \___/ \_/ |_||_| |_| |_|(_) ]],
|
||||
[[ ⠀ ]],
|
||||
[[______________________________________________________]],
|
||||
[[ ⠀ ]],
|
||||
[[ ⠀ ]],
|
||||
},
|
||||
{
|
||||
[[ ⠀ ]],
|
||||
[[⠀⠀⠀⠀⠀⡰⢂⣾⠿⠛⠒⠚⠛⠃⠺⢶⡀⠀⠀⠀⠀⠀⠀⠀⠀]],
|
||||
[[⠀⠀⠀⠀⢠⡣⠋⠁⠀⠀⠀⠀⠀⢀⡐⠒⢙⣄⠀⠀⠀⠀⠀⠀⠀]],
|
||||
[[⠀⠀⠀⠀⡘⠀⠀⠀⠀⠀⠀⢄⠉⠀⠐⠀⠀⠙⢦⠀⠀⠀⠀⠀⠀]],
|
||||
[[⠀⠀⠀⣾⠁⠀⠀⠄⠂⢈⣠⠎⠀⠀⣸⣿⡿⠓⢬⡇⠀⠀⠀⠀⠀]],
|
||||
[[⠀⠀⢸⡟⠀⠔⣁⣤⣶⣿⠋⢰⠀⠀⣿⡟⠻⣦⠀⢳⠀⠀⠀⠀⠀]],
|
||||
[[⠀⠀⣷⡇⢠⣾⢟⢭⣭⡭⡄⠀⡆⠀⣿⣷⣶⠺⡆⢸⡄⠀⠀⠀⠀]],
|
||||
[[⠀⠀⠇⡇⠛⠡⣑⣈⣛⠝⢁⡀⠇⠀⣿⡿⠛⠒⣡⠇⣧⣀⠀⠀⠀]],
|
||||
[[⠀⠀⢠⠁⠈⠐⠤⠄⠀⣠⢸⠈⠢⠀⣿⡇⠀⠀⠠⠚⣿⣿⠀⠀⠀]],
|
||||
[[⡄⠀⢾⠀⡆⠠⣴⠞⠯⡀⠈⠙⠲⣶⣿⡇⠑⣦⡄⠀⣿⣿⠀⠀⠀]],
|
||||
[[⠈⠺⡮⠀⢡⠀⠀⠀⠀⠀⠁⠐⠒⠒⠛⠃⠈⠛⠇⠀⡏⡏⠀⠀⠀]],
|
||||
[[⠀⢰⠁⠀⠘⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⡄⠀⢷⠀⠀⠀]],
|
||||
[[⠀⠘⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠃⠀⢸⠀⠀⠀]],
|
||||
[[⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⡄⠀⠀]],
|
||||
[[⠀⠀⢣⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⠸⡳⡀⠀]],
|
||||
[[⠀⠀⠀⠑⢄⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣯⣼⡇⠑⣄]],
|
||||
[[ ]],
|
||||
[[ ███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗ ]],
|
||||
[[ ████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║ ]],
|
||||
[[ ██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║ ]],
|
||||
[[ ██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║ ]],
|
||||
[[ ██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║ ]],
|
||||
[[ ╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ ]],
|
||||
[[ ⠀ ]],
|
||||
[[______________________________________________________]],
|
||||
[[ ⠀ ]],
|
||||
[[ ⠀ ]],
|
||||
},
|
||||
{
|
||||
[[ ]],
|
||||
[[⣿⣿⣿⣿⡏⣀⠀⠀⠀⠀⠀⠀⠀⣀⣤⣤⣤⣄⡀⠀⠀⠀⠀⠀⠀⠀⠙⢿⣿⣿]],
|
||||
[[⣿⣿⣿⢏⣴⣿⣷⠀⠀⠀⠀⠀⢾⣿⣿⣿⣿⣿⣿⡆⠀⠀⠀⠀⠀⠀⠀⠈⣿⣿]],
|
||||
[[⣿⣿⣟⣾⣿⡟⠁⠀⠀⠀⠀⠀⢀⣾⣿⣿⣿⣿⣿⣷⢢⠀⠀⠀⠀⠀⠀⠀⢸⣿]],
|
||||
[[⣿⣿⣿⣿⣟⠀⡴⠄⠀⠀⠀⠀⠀⠀⠙⠻⣿⣿⣿⣿⣷⣄⠀⠀⠀⠀⠀⠀⠀⣿]],
|
||||
[[⣿⣿⣿⠟⠻⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠶⢴⣿⣿⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⣿]],
|
||||
[[⣿⣁⡀⠀⠀⢰⢠⣦⠀⠀⠀⠀⠀⠀⠀⠀⢀⣼⣿⣿⣿⣿⣿⡄⠀⣴⣶⣿⡄⣿]],
|
||||
[[⣿⡋⠀⠀⠀⠎⢸⣿⡆⠀⠀⠀⠀⠀⠀⣴⣿⣿⣿⣿⣿⣿⣿⠗⢘⣿⣟⠛⠿⣼]],
|
||||
[[⣿⣿⠋⢀⡌⢰⣿⡿⢿⡀⠀⠀⠀⠀⠀⠙⠿⣿⣿⣿⣿⣿⡇⠀⢸⣿⣿⣧⢀⣼]],
|
||||
[[⣿⣿⣷⢻⠄⠘⠛⠋⠛⠃⠀⠀⠀⠀⠀⢿⣧⠈⠉⠙⠛⠋⠀⠀⠀⣿⣿⣿⣿⣿]],
|
||||
[[⣿⣿⣧⠀⠈⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠟⠀⠀⠀⠀⢀⢃⠀⠀⢸⣿⣿⣿⣿]],
|
||||
[[⣿⣿⡿⠀⠴⢗⣠⣤⣴⡶⠶⠖⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⡸⠀⣿⣿⣿⣿]],
|
||||
[[⣿⣿⣿⡀⢠⣾⣿⠏⠀⠠⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠛⠉⠀⣿⣿⣿⣿]],
|
||||
[[⣿⣿⣿⣧⠈⢹⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⣿⣿]],
|
||||
[[⣿⣿⣿⣿⡄⠈⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿]],
|
||||
[[⣿⣿⣿⣿⣧⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿]],
|
||||
[[⣿⣿⣿⣿⣷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿]],
|
||||
[[⣿⣿⣿⣿⣿⣦⣄⣀⣀⣀⣀⠀⠀⠀⠀⠘⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿]],
|
||||
[[ __ ]],
|
||||
[[ ___ ___ ___ __ __ /\_\ ___ ___ ]],
|
||||
[[ / _ `\ / __`\ / __`\/\ \/\ \\/\ \ / __` __`\ ]],
|
||||
[[/\ \/\ \/\ __//\ \_\ \ \ \_/ |\ \ \/\ \/\ \/\ \ ]],
|
||||
[[\ \_\ \_\ \____\ \____/\ \___/ \ \_\ \_\ \_\ \_\]],
|
||||
[[ \/_/\/_/\/____/\/___/ \/__/ \/_/\/_/\/_/\/_/]],
|
||||
[[ ]],
|
||||
[[______________________________________________________]],
|
||||
[[ ]],
|
||||
[[ ]],
|
||||
},
|
||||
}
|
||||
return splash[math.random(1,#splash)]
|
||||
end
|
93
nvim/lua/core/keymaps.lua
Normal file
93
nvim/lua/core/keymaps.lua
Normal file
@ -0,0 +1,93 @@
|
||||
local opts = { noremap = true, silent = true }
|
||||
local map = vim.keymap.set
|
||||
|
||||
--Leader Key
|
||||
map("", "<Space>", "<Nop>", opts)
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = " "
|
||||
|
||||
---------- Normal Mode ----------
|
||||
|
||||
--Window Resize
|
||||
map("n", "<S-h>", ":vertical resize +2<CR>", opts)
|
||||
map("n", "<S-j>", ":resize +2<CR>", opts)
|
||||
map("n", "<S-k>", ":resize -2<CR>", opts)
|
||||
map("n", "<S-l>", ":vertical resize -2<CR>", opts)
|
||||
|
||||
---------- Insert Mode ----------
|
||||
|
||||
--jj gang rise up
|
||||
map("i", "jj", "<ESC>", opts)
|
||||
|
||||
---------- Visual Mode -----------
|
||||
|
||||
--Move Selections
|
||||
map("v", "<S-h>", "< gv", opts)
|
||||
map("v", "<S-j>", ":m '>+1<CR>gv=gv", opts)
|
||||
map("v", "<S-k>", ":m '<-2<CR>gv=gv", opts)
|
||||
map("v", "<S-l>", "> gv", opts)
|
||||
|
||||
---------- Terminal Mode ----------
|
||||
|
||||
--Escape Terminal
|
||||
map('t', 'jj', [[<C-\><C-n>]], opts)
|
||||
map('t', '<C-[>', [[<C-\><C-n>]], opts)
|
||||
map('t', '<esc>', [[<C-\><C-n>]], opts)
|
||||
|
||||
--------- Custom Functions ----------
|
||||
|
||||
--Edit Nvim
|
||||
map("n", "<leader>en", ":lua edit_nvim()<CR>", opts)
|
||||
|
||||
---------- Plugins ----------------
|
||||
|
||||
--Fugative
|
||||
map("n", "<leader>ga", ":G add<Space>", opts)
|
||||
map("n", "<leader>gs", ":G status<CR>", opts)
|
||||
map("n", "<leader>gb", ":G branch<Space>", opts)
|
||||
map("n", "<leader>gm", ":G merge<Space>", opts)
|
||||
map("n", "<leader>gpl", ":G pull<Space>", opts)
|
||||
map("n", "<leader>gplo", ":G pull origin<Space>", opts)
|
||||
map("n", "<leader>gps", ":G push<Space>", opts)
|
||||
map("n", "<leader>gpso", ":G push origin<Space>", opts)
|
||||
map("n", "<leader>gc", ":G commit<Space>", opts)
|
||||
map("n", "<leader>gcm", ":G commit -m<Space>", opts)
|
||||
map("n", "<leader>gch", ":G checkout<Space>", opts)
|
||||
map("n", "<leader>gchb", ":G checkout -b<Space>", opts)
|
||||
map("n", "<leader>gcoe", ":G config user.email<Space>", opts)
|
||||
map("n", "<leader>gcon", ":G config user.name<Space>", opts)
|
||||
|
||||
--Nvim Tree
|
||||
map("n", "<leader>dt", ":NvimTreeToggle<CR>", opts)
|
||||
|
||||
--Transparency
|
||||
map("n", "<leader>tt", ":TransparentToggle<CR>", opts)
|
||||
|
||||
--Telescope
|
||||
map('n', '<leader>ff', ":Telescope find_files<CR>", opts)
|
||||
map('n', '<leader>fw', ":Telescope live_grep<CR>", opts)
|
||||
map('n', '<leader>fgc', ":Telescope git_commits<CR>", opts)
|
||||
map('n', '<leader>fgs', ":Telescope git_stash<CR>", opts)
|
||||
map('n', '<leader>fgb', ":Telescope git_branches<CR>", opts)
|
||||
map('n', '<leader>fv', ":Telescope treesitter<CR>", opts)
|
||||
map('n', '<leader>fs', ":Telescope spell_suggest<CR>", opts)
|
||||
map('n', '<leader>fc', ":Telescope colorscheme<CR>", opts)
|
||||
|
||||
--BufferLine
|
||||
map("n", "<leader>1", ":BufferLineGoToBuffer 1<CR>", opts)
|
||||
map("n", "<leader>2", ":BufferLineGoToBuffer 2<CR>", opts)
|
||||
map("n", "<leader>3", ":BufferLineGoToBuffer 3<CR>", opts)
|
||||
map("n", "<leader>4", ":BufferLineGoToBuffer 4<CR>", opts)
|
||||
map("n", "<leader>5", ":BufferLineGoToBuffer 5<CR>", opts)
|
||||
map("n", "<leader>6", ":BufferLineGoToBuffer 6<CR>", opts)
|
||||
map("n", "<leader>7", ":BufferLineGoToBuffer 7<CR>", opts)
|
||||
map("n", "<leader>8", ":BufferLineGoToBuffer 8<CR>", opts)
|
||||
map("n", "<leader>9", ":BufferLineGoToBuffer 9<CR>", opts)
|
||||
|
||||
map("n", "<leader>h", ":BufferLineCyclePrev<CR>", opts)
|
||||
map("n", "<leader>l", ":BufferLineCycleNext<CR>", opts)
|
||||
|
||||
map("n", "<leader><S-h>", ":BufferLineMovePrev<CR>", opts)
|
||||
map("n", "<leader><S-l>", ":BufferLineMoveNext<CR>", opts)
|
||||
|
||||
map("n", "<leader>qq", ":bdelete<CR>", opts) -- Close current buffer
|
33
nvim/lua/core/options.lua
Normal file
33
nvim/lua/core/options.lua
Normal file
@ -0,0 +1,33 @@
|
||||
local opt = vim.opt
|
||||
opt.clipboard = "unnamedplus"
|
||||
opt.guicursor = "a:blinkon0" --Disable cursor blink
|
||||
opt.guicursor = "i:ver25-iCursor" --Change to beam cursor when in insert mode
|
||||
opt.mouse = "a"
|
||||
opt.smartcase = true
|
||||
opt.smartindent = true
|
||||
opt.number = true
|
||||
opt.relativenumber = true
|
||||
opt.cursorline = false
|
||||
opt.cursorlineopt='number'
|
||||
opt.wrap = false
|
||||
opt.shiftwidth = 4
|
||||
opt.softtabstop = 4
|
||||
opt.tabstop = 4
|
||||
opt.backupdir = vim.fn.expand("~/.local/share/nvim/data/backup")
|
||||
opt.undodir = vim.fn.expand("~/.local/share/nvim/data/undo")
|
||||
opt.directory = vim.fn.expand("~/.local/share/nvim/data/swap")
|
||||
opt.ignorecase = true
|
||||
opt.splitbelow = true
|
||||
opt.splitright = true
|
||||
opt.swapfile = false
|
||||
opt.undofile = true
|
||||
opt.backup = false
|
||||
opt.expandtab = true
|
||||
opt.termguicolors = true
|
||||
opt.scrolloff = 8
|
||||
opt.updatetime = 50
|
||||
opt.cursorline = true
|
||||
vim.api.nvim_create_autocmd("FileType", { --Set indentation to 2 spaces for nix files
|
||||
pattern = "nix",
|
||||
command = "setlocal shiftwidth=2 tabstop=2"
|
||||
})
|
83
nvim/lua/lazy.lua
Normal file
83
nvim/lua/lazy.lua
Normal file
@ -0,0 +1,83 @@
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
vim.fn.system({
|
||||
"git",
|
||||
"clone",
|
||||
"--filter=blob:none",
|
||||
"https://github.com/folke/lazy.nvim.git",
|
||||
"--branch=stable", -- latest stable release
|
||||
lazypath,
|
||||
print([[
|
||||
Installing lazy.nvim and plugins.....
|
||||
⠀⣞⢽⢪⢣⢣⢣⢫⡺⡵⣝⡮⣗⢷⢽⢽⢽⣮⡷⡽⣜⣜⢮⢺⣜⢷⢽⢝⡽⣝
|
||||
⠸⡸⠜⠕⠕⠁⢁⢇⢏⢽⢺⣪⡳⡝⣎⣏⢯⢞⡿⣟⣷⣳⢯⡷⣽⢽⢯⣳⣫⠇
|
||||
⠀⠀⢀⢀⢄⢬⢪⡪⡎⣆⡈⠚⠜⠕⠇⠗⠝⢕⢯⢫⣞⣯⣿⣻⡽⣏⢗⣗⠏⠀
|
||||
⠀⠪⡪⡪⣪⢪⢺⢸⢢⢓⢆⢤⢀⠀⠀⠀⠀⠈⢊⢞⡾⣿⡯⣏⢮⠷⠁⠀⠀
|
||||
⠀⠀⠀⠈⠊⠆⡃⠕⢕⢇⢇⢇⢇⢇⢏⢎⢎⢆⢄⠀⢑⣽⣿⢝⠲⠉⠀⠀⠀⠀
|
||||
⠀⠀⠀⠀⠀⡿⠂⠠⠀⡇⢇⠕⢈⣀⠀⠁⠡⠣⡣⡫⣂⣿⠯⢪⠰⠂⠀⠀⠀⠀
|
||||
⠀⠀⠀⠀⡦⡙⡂⢀⢤⢣⠣⡈⣾⡃⠠⠄⠀⡄⢱⣌⣶⢏⢊⠂⠀⠀⠀⠀⠀⠀
|
||||
⠀⠀⠀⠀⢝⡲⣜⡮⡏⢎⢌⢂⠙⠢⠐⢀⢘⢵⣽⣿⡿⠁⠁⠀⠀⠀⠀⠀⠀⠀
|
||||
⠀⠀⠀⠀⠨⣺⡺⡕⡕⡱⡑⡆⡕⡅⡕⡜⡼⢽⡻⠏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
||||
⠀⠀⠀⠀⣼⣳⣫⣾⣵⣗⡵⡱⡡⢣⢑⢕⢜⢕⡝⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
||||
⠀⠀⠀⣴⣿⣾⣿⣿⣿⡿⡽⡑⢌⠪⡢⡣⣣⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
||||
⠀⠀⠀⡟⡾⣿⢿⢿⢵⣽⣾⣼⣘⢸⢸⣞⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
||||
⠀⠀⠀⠀⠁⠇⠡⠩⡫⢿⣝⡻⡮⣒⢽⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
||||
]])
|
||||
})
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
local plugins = {
|
||||
--- Lazy ---
|
||||
"folke/lazy.nvim", --Lazy will manage itself
|
||||
|
||||
--- Colorschemes ---
|
||||
{ "catppuccin/nvim", name = "catppuccin", lazy = false, priority = 1000 },
|
||||
{ 'rose-pine/neovim', name = 'rose-pine', lazy = false, priority = 1000 },
|
||||
{ "olimorris/onedarkpro.nvim", lazy = false, priority = 1000 },
|
||||
{ "Mofiqul/dracula.nvim", lazy = false, priority = 1000 },
|
||||
{ 'folke/tokyonight.nvim', lazy = false, priority = 1000 },
|
||||
{ "ellisonleao/gruvbox.nvim", lazy = false, priority = 1000 },
|
||||
|
||||
--- LSP---
|
||||
-- "jose-elias-alvarez/null-ls.nvim",
|
||||
-- "neovim/nvim-lspconfig", --LSP
|
||||
|
||||
-- -- CMP
|
||||
-- "hrsh7th/nvim-cmp", --Completion
|
||||
-- "hrsh7th/cmp-nvim-lsp", --Completion LSP integration
|
||||
-- "hrsh7th/cmp-path", --Completion show system paths
|
||||
-- "hrsh7th/cmp-buffer", --Completion shows text from current buffer
|
||||
-- "hrsh7th/cmp-cmdline",
|
||||
-- "hrsh7th/cmp-nvim-lua",
|
||||
-- "saadparwaiz1/cmp_luasnip", --Completion snippets
|
||||
-- { "L3MON4D3/LuaSnip", dependencies = { "rafamadriz/friendly-snippets" } }, --Extra snippets
|
||||
|
||||
|
||||
-- --- The Rest ----
|
||||
-- "lukas-reineke/indent-blankline.nvim", --Sexy indent lines
|
||||
-- "windwp/nvim-ts-autotag", --Auto tags for HTML
|
||||
-- "norcalli/nvim-colorizer.lua", --Visualize Hex/RGB/etc
|
||||
-- "lewis6991/gitsigns.nvim", --Shows deletions/additions/modifications if in git repo
|
||||
-- "tpope/vim-fugitive", --Git command integration
|
||||
-- "xiyaowong/transparent.nvim", --Transparency Toggle
|
||||
-- "andweeb/presence.nvim", --Discord Rich Presence
|
||||
-- "numToStr/Comment.nvim", --Easy full line or selection commenting out
|
||||
-- { "folke/which-key.nvim", event = "VeryLazy" }, --Shows key combinations if youre dumb
|
||||
-- { 'windwp/nvim-autopairs', event = "InsertEnter" }, --Automatic pairs for braces, brackets, quotes, etc.
|
||||
-- { "nvim-treesitter/nvim-treesitter", build = ":TSUpdate" }, --Parser for better highlighting, use :TSUpdate
|
||||
-- { 'akinsho/toggleterm.nvim', version = "*", config = true }, --Quick toggle terminal in neovim
|
||||
-- { "nvim-tree/nvim-tree.lua", dependencies = { "nvim-tree/nvim-web-devicons" } }, --File Browser, Devicons need a hack nerd font
|
||||
-- { "akinsho/bufferline.nvim", dependencies = { "nvim-tree/nvim-web-devicons" } }, --Tabs
|
||||
-- { "nvim-lualine/lualine.nvim", dependencies = { "nvim-tree/nvim-web-devicons" } }, --Sexy bar at the bottom
|
||||
-- { "nvim-telescope/telescope.nvim", dependencies = { "nvim-lua/plenary.nvim" } }, --Plenary needs g++ and gcc
|
||||
-- {
|
||||
-- 'glepnir/dashboard-nvim',
|
||||
-- event = 'VimEnter',
|
||||
-- dependencies = {
|
||||
-- 'nvim-tree/nvim-web-devicons' }
|
||||
-- }, --Dope ass dashboard
|
||||
}
|
||||
|
||||
local opts = {}
|
||||
require("lazy").setup(plugins, opts)
|
49
nvim/lua/plugins/colorschemes/catppuccin.lua
Normal file
49
nvim/lua/plugins/colorschemes/catppuccin.lua
Normal file
@ -0,0 +1,49 @@
|
||||
local status, plugin = pcall(require,'catppuccin')
|
||||
if not status then
|
||||
print('Plugin Error: ', plugin)
|
||||
return
|
||||
end
|
||||
|
||||
plugin.setup({
|
||||
flavour = "mocha", -- latte, frappe, macchiato, mocha
|
||||
background = { -- :h background
|
||||
light = "latte",
|
||||
dark = "mocha",
|
||||
},
|
||||
transparent_background = false,
|
||||
show_end_of_buffer = false, -- show the '~' characters after the end of buffers
|
||||
term_colors = false,
|
||||
dim_inactive = {
|
||||
enabled = false,
|
||||
shade = "dark",
|
||||
percentage = 0.15,
|
||||
},
|
||||
no_italic = false, -- Force no italic
|
||||
no_bold = false, -- Force no bold
|
||||
no_underline = false, -- Force no underline
|
||||
styles = {
|
||||
comments = { "italic" },
|
||||
conditionals = { "italic" },
|
||||
loops = {},
|
||||
functions = {},
|
||||
keywords = {},
|
||||
strings = {},
|
||||
variables = {},
|
||||
numbers = {},
|
||||
booleans = {},
|
||||
properties = {},
|
||||
types = {},
|
||||
operators = {},
|
||||
},
|
||||
color_overrides = {},
|
||||
custom_highlights = {},
|
||||
integrations = {
|
||||
cmp = true,
|
||||
gitsigns = true,
|
||||
nvimtree = true,
|
||||
telescope = true,
|
||||
notify = false,
|
||||
mini = false,
|
||||
-- For more plugins integrations please scroll down (https://github.com/catppuccin/nvim#integrations)
|
||||
},
|
||||
})
|
48
nvim/lua/plugins/colorschemes/dracula.lua
Normal file
48
nvim/lua/plugins/colorschemes/dracula.lua
Normal file
@ -0,0 +1,48 @@
|
||||
local status, plugin = pcall(require,'dracula')
|
||||
if not status then
|
||||
print('Plugin Error: ', plugin)
|
||||
return
|
||||
end
|
||||
plugin.setup({
|
||||
-- customize dracula color palette
|
||||
colors = {
|
||||
bg = "#282A36",
|
||||
fg = "#F8F8F2",
|
||||
selection = "#44475A",
|
||||
comment = "#6272A4",
|
||||
red = "#FF5555",
|
||||
orange = "#FFB86C",
|
||||
yellow = "#F1FA8C",
|
||||
green = "#50fa7b",
|
||||
purple = "#BD93F9",
|
||||
cyan = "#8BE9FD",
|
||||
pink = "#FF79C6",
|
||||
bright_red = "#FF6E6E",
|
||||
bright_green = "#69FF94",
|
||||
bright_yellow = "#FFFFA5",
|
||||
bright_blue = "#D6ACFF",
|
||||
bright_magenta = "#FF92DF",
|
||||
bright_cyan = "#A4FFFF",
|
||||
bright_white = "#FFFFFF",
|
||||
menu = "#21222C",
|
||||
visual = "#3E4452",
|
||||
gutter_fg = "#4B5263",
|
||||
nontext = "#3B4048",
|
||||
},
|
||||
-- show the '~' characters after the end of buffers
|
||||
show_end_of_buffer = true, -- default false
|
||||
-- use transparent background
|
||||
transparent_bg = false, -- default false
|
||||
-- set custom lualine background color
|
||||
lualine_bg_color = "#44475a", -- default nil
|
||||
-- set italic comment
|
||||
italic_comment = true, -- default false
|
||||
-- overrides the default highlights see `:h synIDattr`
|
||||
overrides = {
|
||||
-- Examples
|
||||
-- NonText = { fg = dracula.colors().white }, -- set NonText fg to white
|
||||
-- NvimTreeIndentMarker = { link = "NonText" }, -- link to NonText highlight
|
||||
-- Nothing = {} -- clear highlight of Nothing
|
||||
},
|
||||
})
|
||||
|
27
nvim/lua/plugins/colorschemes/gruvbox.lua
Normal file
27
nvim/lua/plugins/colorschemes/gruvbox.lua
Normal file
@ -0,0 +1,27 @@
|
||||
local status, plugin = pcall(require,'gruvbox')
|
||||
if not status then
|
||||
print('Plugin Error: ', plugin)
|
||||
return
|
||||
end
|
||||
plugin.setup({
|
||||
undercurl = true,
|
||||
underline = true,
|
||||
bold = true,
|
||||
italic = {
|
||||
strings = true,
|
||||
comments = true,
|
||||
operators = false,
|
||||
folds = true,
|
||||
},
|
||||
strikethrough = true,
|
||||
invert_selection = false,
|
||||
invert_signs = false,
|
||||
invert_tabline = false,
|
||||
invert_intend_guides = false,
|
||||
inverse = true, -- invert background for search, diffs, statuslines and errors
|
||||
contrast = "", -- can be "hard", "soft" or empty string
|
||||
palette_overrides = {},
|
||||
overrides = {},
|
||||
dim_inactive = false,
|
||||
transparent_mode = false,
|
||||
})
|
6
nvim/lua/plugins/colorschemes/onedarkpro.lua
Normal file
6
nvim/lua/plugins/colorschemes/onedarkpro.lua
Normal file
@ -0,0 +1,6 @@
|
||||
local status, plugin = pcall(require,'onedarkpro')
|
||||
if not status then
|
||||
print('Plugin Error: ', plugin)
|
||||
return
|
||||
end
|
||||
plugin.setup({})
|
54
nvim/lua/plugins/colorschemes/rosepine.lua
Normal file
54
nvim/lua/plugins/colorschemes/rosepine.lua
Normal file
@ -0,0 +1,54 @@
|
||||
local status, plugin = pcall(require,'rose-pine')
|
||||
if not status then
|
||||
print('Plugin Error: ', plugin)
|
||||
return
|
||||
end
|
||||
plugin.setup({
|
||||
--- @usage 'auto'|'main'|'moon'|'dawn'
|
||||
variant = 'auto',
|
||||
--- @usage 'main'|'moon'|'dawn'
|
||||
dark_variant = 'main',
|
||||
bold_vert_split = false,
|
||||
dim_nc_background = false,
|
||||
disable_background = false,
|
||||
disable_float_background = false,
|
||||
disable_italics = false,
|
||||
|
||||
--- @usage string hex value or named color from rosepinetheme.com/palette
|
||||
groups = {
|
||||
background = 'base',
|
||||
background_nc = '_experimental_nc',
|
||||
panel = 'surface',
|
||||
panel_nc = 'base',
|
||||
border = 'highlight_med',
|
||||
comment = 'muted',
|
||||
link = 'iris',
|
||||
punctuation = 'subtle',
|
||||
|
||||
error = 'love',
|
||||
hint = 'iris',
|
||||
info = 'foam',
|
||||
warn = 'gold',
|
||||
|
||||
headings = {
|
||||
h1 = 'iris',
|
||||
h2 = 'foam',
|
||||
h3 = 'rose',
|
||||
h4 = 'gold',
|
||||
h5 = 'pine',
|
||||
h6 = 'foam',
|
||||
}
|
||||
-- or set all headings at once
|
||||
-- headings = 'subtle'
|
||||
},
|
||||
|
||||
-- Change specific vim highlight groups
|
||||
-- https://github.com/rose-pine/neovim/wiki/Recipes
|
||||
highlight_groups = {
|
||||
ColorColumn = { bg = 'rose' },
|
||||
|
||||
-- Blend colours against the "base" background
|
||||
CursorLine = { bg = 'foam', blend = 10 },
|
||||
StatusLine = { fg = 'love', bg = 'love', blend = 10 },
|
||||
}
|
||||
})
|
40
nvim/lua/plugins/colorschemes/tokyonight.lua
Normal file
40
nvim/lua/plugins/colorschemes/tokyonight.lua
Normal file
@ -0,0 +1,40 @@
|
||||
local status, plugin = pcall(require,'tokyonight')
|
||||
if not status then
|
||||
print('Plugin Error: ', plugin)
|
||||
return
|
||||
end
|
||||
plugin.setup({
|
||||
-- your configuration comes here
|
||||
-- or leave it empty to use the default settings
|
||||
style = "moon", -- The theme comes in three styles, `storm`, `moon`, a darker variant `night` and `day`
|
||||
light_style = "day", -- The theme is used when the background is set to light
|
||||
transparent = false, -- Enable this to disable setting the background color
|
||||
terminal_colors = true, -- Configure the colors used when opening a `:terminal` in Neovim
|
||||
styles = {
|
||||
-- Style to be applied to different syntax groups
|
||||
-- Value is any valid attr-list value for `:help nvim_set_hl`
|
||||
comments = { italic = true },
|
||||
keywords = { italic = true },
|
||||
functions = {},
|
||||
variables = {},
|
||||
-- Background styles. Can be "dark", "transparent" or "normal"
|
||||
sidebars = "dark", -- style for sidebars, see below
|
||||
floats = "dark", -- style for floating windows
|
||||
},
|
||||
sidebars = { "qf", "help" }, -- Set a darker background on sidebar-like windows. For example: `["qf", "vista_kind", "terminal", "packer"]`
|
||||
day_brightness = 0.3, -- Adjusts the brightness of the colors of the **Day** style. Number between 0 and 1, from dull to vibrant colors
|
||||
hide_inactive_statusline = false, -- Enabling this option, will hide inactive statuslines and replace them with a thin border instead. Should work with the standard **StatusLine** and **LuaLine**.
|
||||
dim_inactive = false, -- dims inactive windows
|
||||
lualine_bold = false, -- When `true`, section headers in the lualine theme will be bold
|
||||
|
||||
--- You can override specific color groups to use other groups or a hex color
|
||||
--- function will be called with a ColorScheme table
|
||||
---@param colors ColorScheme
|
||||
on_colors = function(colors) end,
|
||||
|
||||
--- You can override specific highlights to use other groups or a hex color
|
||||
--- function will be called with a Highlights and ColorScheme table
|
||||
---@param highlights Highlights
|
||||
---@param colors ColorScheme
|
||||
on_highlights = function(highlights, colors) end,
|
||||
})
|
Loading…
Reference in New Issue
Block a user