Push these changes to a branch cause I'm kind of giving up

This commit is contained in:
Jimbo 2024-10-07 11:42:34 -04:00
parent d9469fc321
commit e3bacb2d84
229 changed files with 1496 additions and 1479 deletions

20
home/programs/default.nix Normal file
View file

@ -0,0 +1,20 @@
{ ... }: {
imports = [
./easyeffects
./fastfetch
./foot
./gaming
./git
./librewolf
./mako
./mangohud
./misc
./mpv
./ncmpcpp
./neovim
./pcmanfm-qt
./ranger
./rofi
./tmux
];
}

View file

@ -1,309 +0,0 @@
{pkgs, ...}: {
home = {
packages = with pkgs; [
easyeffects
];
file = let
# An Easyeffects equalizer profile that sounds good to me
easyEffectsProfile = ''
{
"output": {
"blocklist": [],
"crystalizer#0": {
"band0": {
"bypass": false,
"intensity": 0.0,
"mute": false
},
"band1": {
"bypass": false,
"intensity": -1.0,
"mute": false
},
"band2": {
"bypass": false,
"intensity": -2.0,
"mute": false
},
"band3": {
"bypass": false,
"intensity": -3.0,
"mute": false
},
"band4": {
"bypass": false,
"intensity": -4.0,
"mute": false
},
"band5": {
"bypass": false,
"intensity": -5.0,
"mute": false
},
"band6": {
"bypass": false,
"intensity": -6.0,
"mute": false
},
"band7": {
"bypass": false,
"intensity": -7.0,
"mute": false
},
"band8": {
"bypass": false,
"intensity": -8.0,
"mute": false
},
"band9": {
"bypass": false,
"intensity": -9.0,
"mute": false
},
"band10": {
"bypass": false,
"intensity": -10.0,
"mute": false
},
"band11": {
"bypass": false,
"intensity": -11.0,
"mute": false
},
"band12": {
"bypass": false,
"intensity": -12.0,
"mute": false
},
"bypass": false,
"input-gain": 0.0,
"output-gain": 0.0
},
"equalizer#0": {
"balance": 0.0,
"bypass": false,
"input-gain": 0.0,
"left": {
"band0": {
"frequency": 32.0,
"gain": 1.1,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band1": {
"frequency": 64.0,
"gain": 1.16,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band2": {
"frequency": 125.0,
"gain": 3.33,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band3": {
"frequency": 250.0,
"gain": 1.53,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band4": {
"frequency": 500.0,
"gain": -1.83,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band5": {
"frequency": 1000.0,
"gain": -0.58,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band6": {
"frequency": 2000.0,
"gain": 1.42,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band7": {
"frequency": 4000.0,
"gain": 4.73,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band8": {
"frequency": 16000.0,
"gain": 7.62,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band9": {
"frequency": 156.38,
"gain": 2.84,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
}
},
"mode": "IIR",
"num-bands": 10,
"output-gain": 0.0,
"pitch-left": 0.0,
"pitch-right": 0.0,
"right": {
"band0": {
"frequency": 32.0,
"gain": 1.1,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band1": {
"frequency": 64.0,
"gain": 1.16,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band2": {
"frequency": 125.0,
"gain": 3.33,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band3": {
"frequency": 250.0,
"gain": 1.53,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band4": {
"frequency": 500.0,
"gain": -1.83,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band5": {
"frequency": 1000.0,
"gain": -0.58,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band6": {
"frequency": 2000.0,
"gain": 1.42,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band7": {
"frequency": 4000.0,
"gain": 4.73,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band8": {
"frequency": 16000.0,
"gain": 7.62,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band9": {
"frequency": 156.38,
"gain": 2.84,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
}
},
"split-channels": false
},
"plugins_order": [
"equalizer#0",
"crystalizer#0"
]
}
}
'';
in {
# Easyeffects profile
".config/easyeffects/output/JimHeadphones.json".text = easyEffectsProfile;
};
};
}

View file

@ -0,0 +1,294 @@
{
"output": {
"blocklist": [],
"crystalizer#0": {
"band0": {
"bypass": false,
"intensity": 0.0,
"mute": false
},
"band1": {
"bypass": false,
"intensity": -1.0,
"mute": false
},
"band2": {
"bypass": false,
"intensity": -2.0,
"mute": false
},
"band3": {
"bypass": false,
"intensity": -3.0,
"mute": false
},
"band4": {
"bypass": false,
"intensity": -4.0,
"mute": false
},
"band5": {
"bypass": false,
"intensity": -5.0,
"mute": false
},
"band6": {
"bypass": false,
"intensity": -6.0,
"mute": false
},
"band7": {
"bypass": false,
"intensity": -7.0,
"mute": false
},
"band8": {
"bypass": false,
"intensity": -8.0,
"mute": false
},
"band9": {
"bypass": false,
"intensity": -9.0,
"mute": false
},
"band10": {
"bypass": false,
"intensity": -10.0,
"mute": false
},
"band11": {
"bypass": false,
"intensity": -11.0,
"mute": false
},
"band12": {
"bypass": false,
"intensity": -12.0,
"mute": false
},
"bypass": false,
"input-gain": 0.0,
"output-gain": 0.0
},
"equalizer#0": {
"balance": 0.0,
"bypass": false,
"input-gain": 0.0,
"left": {
"band0": {
"frequency": 32.0,
"gain": 1.1,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band1": {
"frequency": 64.0,
"gain": 1.16,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band2": {
"frequency": 125.0,
"gain": 3.33,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band3": {
"frequency": 250.0,
"gain": 1.53,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band4": {
"frequency": 500.0,
"gain": -1.83,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band5": {
"frequency": 1000.0,
"gain": -0.58,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band6": {
"frequency": 2000.0,
"gain": 1.42,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band7": {
"frequency": 4000.0,
"gain": 4.73,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band8": {
"frequency": 16000.0,
"gain": 7.62,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band9": {
"frequency": 156.38,
"gain": 2.84,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
}
},
"mode": "IIR",
"num-bands": 10,
"output-gain": 0.0,
"pitch-left": 0.0,
"pitch-right": 0.0,
"right": {
"band0": {
"frequency": 32.0,
"gain": 1.1,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band1": {
"frequency": 64.0,
"gain": 1.16,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band2": {
"frequency": 125.0,
"gain": 3.33,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band3": {
"frequency": 250.0,
"gain": 1.53,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band4": {
"frequency": 500.0,
"gain": -1.83,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band5": {
"frequency": 1000.0,
"gain": -0.58,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band6": {
"frequency": 2000.0,
"gain": 1.42,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band7": {
"frequency": 4000.0,
"gain": 4.73,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band8": {
"frequency": 16000.0,
"gain": 7.62,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band9": {
"frequency": 156.38,
"gain": 2.84,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
}
},
"split-channels": false
},
"plugins_order": [
"equalizer#0",
"crystalizer#0"
]
}
}

View file

@ -0,0 +1,10 @@
{pkgs, ...}: {
home = {
packages = with pkgs; [
easyeffects
];
file = {
".config/easyeffects/output/JimHeadphones.json".source = ./JimHeadphones.json;
};
};
}

View file

@ -0,0 +1,153 @@
{ pkgs, ... }: {
home = {
file = let
fastConf = ''
{
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
"logo": {
"source": "xenia",
"color": {
"1": "1;97",
"2": "red",
"3": "yellow"
}
},
"display": {
"separator": " \u001b[33m ",
"color": "red"
},
"modules": [
{
"type": "custom",
"format": "\u001b[1m"
},
{
"type": "host",
"key": "󰌢 "
},
{
"type": "cpu",
"key": " "
},
{
"type": "gpu",
"key": "󰢮 "
},
{
"type": "disk",
"folders": "/",
"key": " "
},
{
"type": "memory",
"format": "{/1}{-}{/}{/2}{-}{/}{} / {}",
"key": " "
},
{
"type": "display",
"compactType": "original",
"key": "󰍹 "
},
{
"type": "custom",
"format": "\u001b[1m"
},
{
"type": "os",
"format": "{3} {12}",
"key": "󰍛 "
},
{
"type": "kernel",
"format": "{1} {2}",
"key": " "
},
{
"type": "wm",
"key": " "
},
{
"type": "shell",
"key": " "
},
{
"type": "terminal",
"key": " "
},
{
"type": "packages",
"key": "󰆧 "
},
{
"type": "uptime",
"key": "󰅐 "
},
{
"type": "command",
"text": "date -d @$(stat -c %W /) '+%a %b %d %r %Z %Y'",
"key": "󰶡 "
},
{
"type": "custom",
"format": "\u001b[1m"
},
{
"type": "custom",
"format": "\u001b[90m󰮯 \u001b[31m󰊠 \u001b[32m󰊠 \u001b[33m󰊠 \u001b[34m󰊠 \u001b[35m󰊠 \u001b[36m󰊠 \u001b[37m󰊠"
}
]
}
'';
in {
# Fastfetch config
".config/fastfetch/config.jsonc".text = fastConf;
};
packages = let
# Small Neofetch config
pFetch = let
smallConf = pkgs.writeText "smallconf.jsonc" ''
{
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
"logo": {
"type": "small"
},
"modules": [
{
"type": "os",
"format": "{3} {12}",
"key": "󰍛 "
},
{
"type": "host",
"key": "󰌢 "
},
{
"type": "kernel",
"format": "{1} {2}",
"key": " "
},
{
"type": "uptime",
"key": "󰅐 "
},
{
"type": "packages",
"key": "󰆧 "
},
{
"type": "memory",
"format": "{/1}{-}{/}{/2}{-}{/}{} / {}",
"key": " "
}
]
}
'';
in pkgs.writeScriptBin "pfetch"
''fastfetch --config ${smallConf}'';
in with pkgs; [
fastfetch pFetch
];
};
}

View file

@ -0,0 +1,7 @@
{
imports = [
./general
./emulators
./xash3d
];
}

View file

@ -0,0 +1,16 @@
{pkgs, lib, config, ...}: {
options = {
gaming.emulators.enable = lib.mkEnableOption "Enable console emulators";
};
config = mkIf config.gaming.emulators.enable; {
home.packages = with pkgs; [
dolphin-emu
cemu
ryujinx
duckstation
pcsx2
unstable.lime3ds
];
};
}

View file

@ -0,0 +1,14 @@
{pkgs, lib, config, ...}: {
options = {
gaming.general.enable = lib.mkEnableOption "Enable PC gaming apps";
};
config = mkIf config.gaming.general.enable; {
home.packages = with pkgs; [
steam
steam-run
heroic
prismlauncher
];
};
}

View file

@ -0,0 +1,12 @@
{pkgs, lib, config, ...}: {
options = {
gaming.xash3d.enable = lib.mkEnableOption "Enable Xash3d for Half-Life";
};
config = mkIf config.gaming.xash3d.enable; {
home.packages = with pkgs; [
xash3d
hlsdk
];
};
}

View file

@ -0,0 +1,8 @@
{ pkgs, outputs, ... }: {
programs.git = {
enable = true;
lfs.enable = true;
userName = outputs.secrets.jimUsername;
userEmail = outputs.secrets.jimEmail;
};
}

View file

@ -1,67 +0,0 @@
{pkgs, outputs, ...}: {
# Define GTK theme settings
gtk = {
enable = true;
font = {
name = "${outputs.look.fonts.main}";
size = 11;
};
theme = {
name = "Colloid-Dark";
package = pkgs.colloid-gtk-theme.override {
themeVariants = ["default"];
colorVariants = ["dark"];
sizeVariants = ["standard"];
tweaks = ["black" "rimless" "normal"];
};
};
iconTheme = {
package = pkgs.papirus-icon-theme.override {color = "indigo";};
name = "Papirus-Dark";
};
cursorTheme = {
package = pkgs.simp1e-cursors;
name = "Simp1e-Dark";
};
# GTK app bookmarks
gtk3 = {
bookmarks = [
# Local
"file:///home/jimbo/Downloads"
"file:///home/jimbo/Documents"
"file:///home/jimbo/Videos"
"file:///home/jimbo/Pictures/Screenshots"
"file:///home/jimbo/VMs"
# Remote
"file:///home/jimbo/JimboNFS/Downloads"
"file:///home/jimbo/JimboNFS/Documents"
"file:///home/jimbo/JimboNFS/Music"
"file:///home/jimbo/JimboNFS/Photos"
"file:///home/jimbo/JimboNFS/Videos"
"file:///home/jimbo/JimboNFS/Projects"
# More important stuff
"file:///home/jimbo/JimboNFS/School"
"file:///etc/nixos"
];
# Disable shadows
extraCss = ''
* { outline-width: 0px; }
decoration { box-shadow: none; }
'';
};
# Stop gtk4 from being rounded
gtk4.extraCss = ''
window {
border-top-left-radius:0;
border-top-right-radius:0;
border-bottom-left-radius:0;
border-bottom-right-radius:0;
}
'';
};
}

View file

@ -0,0 +1,41 @@
{pkgs, outputs, ...}: {
services.mako = {
enable = true;
borderColor = "#${outputs.look.colors.accent}";
backgroundColor = "#${outputs.look.colors.dark}CC";
output = "${outputs.displays.d1}";
sort = "+time";
layer = "overlay";
padding = "8";
margin = "0";
borderSize = outputs.look.border.int;
maxIconSize = 40;
defaultTimeout = 6000;
font = "${outputs.look.fonts.main} 12";
anchor = "bottom-right";
extraConfig = "on-button-right=dismiss-all\nouter-margin=10\n[mode=do-not-disturb]\ninvisible=1";
};
home.packages = let
makoToggle = pkgs.writeScriptBin "makotoggle" ''
# Run makoctl mode and store the output in a variable
mode_output=$(makoctl mode)
# Extract the second line after "default"
mode_line=$(echo "$mode_output" | sed -n '/default/{n;p}')
if [[ "$mode_line" == "do-not-disturb" ]]; then
# Notifications are disabled, so we enable them
makoctl mode -r do-not-disturb
notify-send --expire-time=1500 'Notifications Enabled'
else
# Notifications are enabled, so we disable them
notify-send --expire-time=1500 'Notifications Disabled'
sleep 2
makoctl mode -a do-not-disturb
fi
'';
in with pkgs; [
makoToggle
];
}

View file

@ -3,9 +3,9 @@
packages = with pkgs; [
mangohud
];
file = let
# Mangohud config file
mangoConf = ''
file = {
# Mangohud config
".config/MangoHud/MangoHud.conf".text = ''
table_columns=2
frametime=0
legacy_layout=0
@ -24,9 +24,6 @@
gpu_load_change
frame_timing
'';
in {
# Mangohud config
".config/MangoHud/MangoHud.conf".text = mangoConf;
};
};
}

View file

@ -0,0 +1,19 @@
{ pkgs, lib, config, ... }: {
options = {
misc.avtools.enable = lib.mkEnableOption "Enable audio video tools";
};
imports = mkIf config.misc.avtools.enable [
./obs
];
config = mkIf config.misc.avtools.enable; {
home.packages = with pkgs; [
yt-dlp
spotdl
playerctl
ffmpeg
pulsemixer
];
};
}

View file

@ -1,5 +1,4 @@
{pkgs, ...}: {
# OBS with plugins
{pkgs, lib, config, ...}: {
programs.obs-studio = {
enable = true;
plugins = with pkgs.obs-studio-plugins; [

View file

@ -0,0 +1,12 @@
{ pkgs, lib, config, ... }: {
options = {
misc.chat.enable = lib.mkEnableOption "Enable chat clients";
};
config = mkIf config.misc.chat.enable; {
home.packages = with pkgs; [
vesktop
fractal
];
};
}

View file

@ -0,0 +1,11 @@
{ ... }: {
imports = [
./avtools
./chat
./general
./headless
./production
./remote-desktop
./school
];
}

View file

@ -0,0 +1,17 @@
{ pkgs, lib, config, ... }: {
options = {
misc.general.enable = lib.mkEnableOption "Enable general use apps";
};
config = mkIf config.misc.general.enable; {
home.packages = with pkgs; [
imv
qbittorrent
libreoffice-fresh
ffmpegthumbnailer
thunderbird
protonvpn-cli_2
bc
];
};
}

View file

@ -0,0 +1,19 @@
{ pkgs, lib, config, ... }: {
options = {
misc.headless.enable = lib.mkEnableOption "Enable apps that can be used headlessly";
};
config = mkIf config.misc.headless.enable; {
home.packages = with pkgs; [
home-manager
gotop
tcptrack
p7zip
vimv
dua
pciutils
usbutils
protonvpn-cli_2
];
};
}

View file

@ -0,0 +1,15 @@
{ pkgs, lib, config, ... }: {
options = {
production.enable = lib.mkEnableOption "Enable apps used for production";
};
config = mkIf config.misc.production.enable; {
home.packages = with pkgs; [
krita
inkscape
audacity
blender_4_2
sunvox
];
};
}

View file

@ -0,0 +1,12 @@
{ pkgs, lib, config, ... }: {
options = {
remote-desktop.enable = lib.mkEnableOption "Enable remote desktop related apps";
};
config = mkIf misc.remote-desktop.nvidia.enable; {
home.packages = with pkgs; [
moonlight-qt
rustdesk-flutter
];
};
}

View file

@ -0,0 +1,14 @@
{ pkgs, lib, config, ... }: {
options = {
school.enable = lib.mkEnableOption "Enable apps needed for school";
};
config = mkIf config.misc.school.enable; {
home.packages = with pkgs; [
remmina
freerdp
globalprotect-openconnect
zoom-us
];
};
}

View file

@ -1,5 +1,4 @@
{
# MPV settings
programs.mpv = {
enable = true;
config = {

View file

@ -0,0 +1,15 @@
{pkgs, ...}: {
programs.ncmpcpp = {
enable = true;
settings = {
browser_sort_mode = "name";
user_interface = "alternative";
};
};
services.mpd-discord-rpc.enable = true;
home.packages = with pkgs; [
mpc-cli
];
}

View file

@ -0,0 +1,108 @@
{ pkgs, outputs, ... }: {
programs.neovim = {
enable = true;
defaultEditor = true;
viAlias = true;
vimAlias = true;
plugins = with pkgs.vimPlugins; [
# Vim theme
vim-airline
vim-airline-themes
# Internal clipboard
vim-vsnip
cmp-vsnip
# Autocomplete manager
lspkind-nvim
# Autocomplete plugins
cmp-nvim-lsp
cmp-buffer
cmp-path
cmp-cmdline
nvim-cmp
# Hex color visualizer and color theme
nvim-colorizer-lua
vim-monokai-pro
# Discord RPC
vimsence
# Nerdtree
nerdtree
vim-nerdtree-syntax-highlight
];
extraConfig = ''
lua <<EOF
-- Set up nvim-cmp
local cmp = require'cmp'
cmp.setup({
snippet = {
-- REQUIRED - you must specify a snippet engine
expand = function(args)
vim.fn["vsnip#anonymous"](args.body)
end,
},
mapping = cmp.mapping.preset.insert({
['<C-b>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete(),
['<C-e>'] = cmp.mapping.abort(),
['<CR>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
}),
sources = cmp.config.sources({
{ name = 'nvim_lsp' },
{ name = 'vsnip' }
}, {
{ name = 'buffer' },
})
})
-- Use buffer source for '/' and '?'
cmp.setup.cmdline({ '/', '?' }, {
mapping = cmp.mapping.preset.cmdline(),
sources = {
{ name = 'buffer' }
}
})
-- Use cmdline & path source for ':'
cmp.setup.cmdline(':', {
mapping = cmp.mapping.preset.cmdline(),
sources = cmp.config.sources({
{ name = 'path' }
}, {
{ name = 'cmdline' }
})
})
EOF
colorscheme monokai_pro
let g:airline_theme='onedark'
let g:airline#extensions#tabline#enabled = 1
hi Normal guibg=none ctermbg=235
hi Visual guibg=#${outputs.look.colors.mid} ctermbg=238
hi Pmenu guibg=#${outputs.look.colors.mid} ctermbg=238
hi EndOfBuffer guibg=none ctermbg=235
hi LineNr guibg=none ctermbg=none
lua require'colorizer'.setup()
set nu rnu
set termguicolors
set mouse=a
set undofile
set undodir=$HOME/.local/share/nvim/undo
set undolevels=100
set undoreload=10000
nmap <C-x> :bnext<CR>
nmap <C-z> :bprev<CR>
nmap <C-w> :bd<CR>
nmap <C-a> :NERDTreeToggle
'';
};
}

View file

@ -1,12 +1,11 @@
{pkgs, ...}: {
# Swappy config file
{ pkgs, ... }: {
home = {
packages = with pkgs; [
pcmanfm-qt
gnome.file-roller
];
file = let
# File manager config
pcmanConf = ''
file = {
".config/pcmanfm-qt/default/settings.conf".text = ''
[Behavior]
BookmarkOpenMethod=current_tab
ConfirmDelete=true
@ -53,9 +52,6 @@
SwitchToNewTab=true
TabPaths=@Invalid()
'';
in {
# PCManFM config
".config/pcmanfm-qt/default/settings.conf".text = pcmanConf;
};
};
}

View file

@ -0,0 +1,133 @@
{ pkgs, ... }: {
# Enable Ranger
programs.ranger = {
enable = true;
settings = {
preview_images = true;
preview_images_method = "sixel";
dirname_in_tabs = true;
cd_tab_fuzzy = true;
autosave_bookmarks = false;
show_hidden = true;
wrap_scroll = true;
column_ratios = "2,2,4";
hidden_filter = ''^\.|\.(?:pyc|pyo|bak|swp)$|^lost\+found$|^__(py)?cache__$'';
};
rifle = [
# Text editing
{
condition = ''ext xml|json|jsonc|m3u|m3u8|csv|tex|py|pl|rb|js|sh|php|md|nix'';
command = ''vim -- "$@"'';
}
# Media
{
condition = ''mime ^image, has imv, X, flag f'';
command = ''imv -- "$@"'';
}
{
condition = ''mime ^video, terminal, has mpv'';
command = ''mpv -- "$@"'';
}
{
condition = ''mime ^video, terminal, has mpv'';
command = ''mpv --video-rotate=270 -- "$@"'';
}
{
condition = ''mime ^audio|ogg$, terminal, has mpv'';
command = ''mpv --no-audio-display -- "$@"'';
}
{
condition = ''mime ^audio|ogg$, terminal, has mpv'';
command = ''mpv --shuffle --no-audio-display -- "$@"'';
}
{
condition = ''ext x?html?|pdf, has librewolf, X, flag f'';
command = ''librewolf -- "$@"'';
}
{
condition = ''ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has libreoffice, X, flag f'';
command = ''libreoffice "$@"'';
}
# Scripts
{
condition = ''sh'';
command = ''sh -- "$1"'';
}
{
condition = ''py'';
command = ''python -- "$1"'';
}
{
condition = ''pl'';
command = ''perl -- "$1"'';
}
{
condition = ''js'';
command = ''node -- "$1"'';
}
{
condition = ''php'';
command = ''php -- "$1"'';
}
# Misc
{
condition = ''ext exe|msi'';
command = ''wine "$1"'';
}
{
condition = ''ext 7z|ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz|iso|jar|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip|zst, has 7z'';
command = ''7z x -- "$@"'';
}
{
condition = ''label open, has xdg-open'';
command = ''xdg-open -- "$@"'';
}
];
plugins = [
{
name = "devicons2";
src = builtins.fetchGit {
url = "https://github.com/cdump/ranger-devicons2";
rev = "9606009aa01743768b0f27de0a841f7d8fe196c5";
};
}
];
extraConfig = ''
default_linemode devicons2
'';
};
# Ranger's bookmarks and necessary tools
home = {
file = let
rangerBookmarks = ''
# Local files
h:/home/jimbo/
k:/home/jimbo/Downloads
v:/home/jimbo/Videos
c:/home/jimbo/.config
L:/home/jimbo/.local
D:/mnt
n:/etc/nixos
# Remote files
a:/home/jimbo/JimboNFS
K:/home/jimbo/JimboNFS/Downloads
p:/home/jimbo/JimboNFS/Photos
P:/home/jimbo/JimboNFS/Projects
V:/home/jimbo/JimboNFS/Videos/Random
m:/home/jimbo/JimboNFS/Music
s:/home/jimbo/JimboNFS/School
'';
in {
".local/share/ranger/bookmarks".text = rangerBookmarks;
};
packages = with pkgs; [
imagemagick
poppler_utils
];
};
}

View file

@ -1,5 +1,4 @@
{pkgs, config, outputs, ...}: {
# Enable Rofi
{ pkgs, config, outputs, ... }: {
programs.rofi = {
enable = true;
package = pkgs.rofi-wayland;
@ -124,7 +123,7 @@
};
};
home.packages = let
# All my rofi scripts in one file
# A script to execute commands with Rofi
rofiScripts = pkgs.writeScriptBin "rofiscripts" ''
# Scratchpad function
handle_scratchpads() {

View file

@ -1,19 +0,0 @@
{pkgs, ...}: {
# Swappy config file
home = {
packages = with pkgs; [
swappy
];
file = let
# Swappy config, for screenshot editing
swappyConfig = ''
[Default]
early_exit=true
save_dir=$HOME/Pictures/Screenshots
'';
in {
# Swappy's config
".config/swappy/config".text = swappyConfig;
};
};
}

View file

@ -0,0 +1,22 @@
{ ... }: {
# Enable tmux
programs.tmux = {
enable = true;
extraConfig = ''
set -g mouse on
set -g base-index 1
set -g default-terminal "st-256color"
set -g history-limit 4096
set -g set-titles on
set -g set-titles-string "#T"
set -g status on
set -g status-left ""
set -g status-position bottom
set -g status-right "#[bg=brightblack]#[fg=dark_purple] #T "
set -g status-style "bg=black"
setw -g pane-base-index 1
setw -g window-status-format "#[bg=brightmagenta]#[fg=black] #I #[bg=brightblack]#[fg=white] #W "
setw -g window-status-current-format "#[bg=brightmagenta]#[fg=black] #I #[bg=white]#[fg=black] #W "
'';
};
}