mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-10 02:52:55 +00:00
nixfmt
This commit is contained in:
parent
ecc00acc05
commit
121e1e9c37
@ -5,10 +5,9 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports = [ # Include the results of the hardware scan.
|
||||||
[ # Include the results of the hardware scan.
|
/etc/nixos/hardware-configuration.nix
|
||||||
/etc/nixos/hardware-configuration.nix
|
];
|
||||||
];
|
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
@ -47,16 +46,12 @@
|
|||||||
autoRepeatDelay = 250;
|
autoRepeatDelay = 250;
|
||||||
autoRepeatInterval = 40;
|
autoRepeatInterval = 40;
|
||||||
|
|
||||||
/* desktopManager = { */
|
# desktopManager = {
|
||||||
/* xterm.enable = false; */
|
# xterm.enable = false;
|
||||||
/* xfce.enable = true; */
|
# xfce.enable = true;
|
||||||
/* }; */
|
# };
|
||||||
/* displayManager.defaultSession = "xfce"; */
|
# displayManager.defaultSession = "xfce";
|
||||||
windowManager = {
|
windowManager = { awesome = { enable = true; }; };
|
||||||
awesome = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Enable touchpad support (enabled default in most desktopManager).
|
# Enable touchpad support (enabled default in most desktopManager).
|
||||||
libinput.enable = true;
|
libinput.enable = true;
|
||||||
@ -104,15 +99,11 @@
|
|||||||
--rotate normal \
|
--rotate normal \
|
||||||
--output DVI-0 --off \
|
--output DVI-0 --off \
|
||||||
--output DVI-1 --off \
|
--output DVI-1 --off \
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
||||||
# Install fonts
|
# Install fonts
|
||||||
fonts.fonts = with pkgs; [
|
fonts.fonts = with pkgs; [ victor-mono nerdfonts ];
|
||||||
victor-mono
|
fonts.fontconfig.defaultFonts.monospace = [ "Victor Mono" ];
|
||||||
nerdfonts
|
|
||||||
];
|
|
||||||
fonts.fontconfig.defaultFonts.monospace = ["Victor Mono"];
|
|
||||||
|
|
||||||
# Gaming
|
# Gaming
|
||||||
hardware.opengl = {
|
hardware.opengl = {
|
||||||
@ -184,9 +175,7 @@
|
|||||||
longitude = 74.0;
|
longitude = 74.0;
|
||||||
};
|
};
|
||||||
|
|
||||||
services.redshift = {
|
services.redshift = { enable = true; };
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Some programs need SUID wrappers, can be configured further or are
|
# Some programs need SUID wrappers, can be configured further or are
|
||||||
# started in user sessions.
|
# started in user sessions.
|
||||||
|
138
nixos/home.nix
138
nixos/home.nix
@ -2,19 +2,26 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
# Nothing
|
font = "Victor Mono";
|
||||||
|
|
||||||
in
|
in {
|
||||||
|
|
||||||
{
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
|
# Applications
|
||||||
firefox
|
firefox
|
||||||
unzip
|
|
||||||
neovim
|
neovim
|
||||||
gcc # for tree-sitter
|
|
||||||
alacritty
|
alacritty
|
||||||
|
_1password-gui
|
||||||
|
discord
|
||||||
|
# neomutt
|
||||||
|
himalaya # Email
|
||||||
|
mpv # Video viewer
|
||||||
|
sxiv # Image viewer
|
||||||
|
|
||||||
|
# Utilities
|
||||||
|
unzip
|
||||||
|
gcc # for tree-sitter
|
||||||
tmux
|
tmux
|
||||||
rsync
|
rsync
|
||||||
ripgrep
|
ripgrep
|
||||||
@ -24,13 +31,9 @@ in
|
|||||||
sd
|
sd
|
||||||
jq
|
jq
|
||||||
tealdeer
|
tealdeer
|
||||||
_1password-gui
|
|
||||||
discord
|
|
||||||
gh
|
gh
|
||||||
/* neomutt */
|
pass
|
||||||
himalaya # Email
|
nixfmt
|
||||||
mpv # Video viewer
|
|
||||||
sxiv # Image viewer
|
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.alacritty = {
|
programs.alacritty = {
|
||||||
@ -49,22 +52,13 @@ in
|
|||||||
scrolling.history = 10000;
|
scrolling.history = 10000;
|
||||||
font = {
|
font = {
|
||||||
size = 14.0;
|
size = 14.0;
|
||||||
normal = {
|
normal = { family = "${font}"; };
|
||||||
family = "Victor Mono";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
key_bindings = [
|
key_bindings = [{
|
||||||
/* { */
|
key = "L";
|
||||||
/* key = "F"; */
|
mods = "Control|Shift";
|
||||||
/* mods = "Super"; */
|
chars = "\\x1F";
|
||||||
/* action = "ToggleFullscreen"; */
|
}];
|
||||||
/* } */
|
|
||||||
{
|
|
||||||
key = "L";
|
|
||||||
mods = "Control|Shift";
|
|
||||||
chars = "\\x1F";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
colors = {
|
colors = {
|
||||||
primary = {
|
primary = {
|
||||||
background = "0x1d2021";
|
background = "0x1d2021";
|
||||||
@ -75,24 +69,24 @@ in
|
|||||||
cursor = "0xd5c4a1";
|
cursor = "0xd5c4a1";
|
||||||
};
|
};
|
||||||
normal = {
|
normal = {
|
||||||
black = "0x1d2021";
|
black = "0x1d2021";
|
||||||
red = "0xfb4934";
|
red = "0xfb4934";
|
||||||
green = "0xb8bb26";
|
green = "0xb8bb26";
|
||||||
yellow = "0xfabd2f";
|
yellow = "0xfabd2f";
|
||||||
blue = "0x83a598";
|
blue = "0x83a598";
|
||||||
magenta = "0xd3869b";
|
magenta = "0xd3869b";
|
||||||
cyan = "0x8ec07c";
|
cyan = "0x8ec07c";
|
||||||
white = "0xd5c4a1";
|
white = "0xd5c4a1";
|
||||||
};
|
};
|
||||||
bright = {
|
bright = {
|
||||||
black = "0x665c54";
|
black = "0x665c54";
|
||||||
red = "0xfe8019";
|
red = "0xfe8019";
|
||||||
green = "0x3c3836";
|
green = "0x3c3836";
|
||||||
yellow = "0x504945";
|
yellow = "0x504945";
|
||||||
blue = "0xbdae93";
|
blue = "0xbdae93";
|
||||||
magenta = "0xebdbb2";
|
magenta = "0xebdbb2";
|
||||||
cyan = "0xd65d0e";
|
cyan = "0xd65d0e";
|
||||||
white = "0xfbf1c7";
|
white = "0xfbf1c7";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
draw_bold_text_with_bright_colors = false;
|
draw_bold_text_with_bright_colors = false;
|
||||||
@ -101,7 +95,7 @@ in
|
|||||||
|
|
||||||
programs.fish = {
|
programs.fish = {
|
||||||
enable = true;
|
enable = true;
|
||||||
functions = {};
|
functions = { };
|
||||||
interactiveShellInit = "";
|
interactiveShellInit = "";
|
||||||
loginShellInit = "";
|
loginShellInit = "";
|
||||||
shellAbbrs = {
|
shellAbbrs = {
|
||||||
@ -150,7 +144,8 @@ in
|
|||||||
|
|
||||||
# GitHub
|
# GitHub
|
||||||
ghr = "gh repo view -w";
|
ghr = "gh repo view -w";
|
||||||
gha = "gh run list | head -1 | awk \'{ print $(NF-2) }\' | xargs gh run view";
|
gha =
|
||||||
|
"gh run list | head -1 | awk '{ print $(NF-2) }' | xargs gh run view";
|
||||||
grw = "gh run watch";
|
grw = "gh run watch";
|
||||||
grf = "gh run view --log-failed";
|
grf = "gh run view --log-failed";
|
||||||
grl = "gh run view --log";
|
grl = "gh run view --log";
|
||||||
@ -168,7 +163,7 @@ in
|
|||||||
work = "vim $NOTES_PATH/work.md";
|
work = "vim $NOTES_PATH/work.md";
|
||||||
|
|
||||||
# Improved CLI Tools
|
# Improved CLI Tools
|
||||||
cat = "bat"; # Swap cat with bat
|
cat = "bat"; # Swap cat with bat
|
||||||
h = "http -Fh --all"; # Curl site for headers
|
h = "http -Fh --all"; # Curl site for headers
|
||||||
j = "just";
|
j = "just";
|
||||||
|
|
||||||
@ -177,7 +172,8 @@ in
|
|||||||
moon = "curl wttr.in/Moon";
|
moon = "curl wttr.in/Moon";
|
||||||
|
|
||||||
# Cheat Sheets
|
# Cheat Sheets
|
||||||
ssl = "openssl req -new -newkey rsa:2048 -nodes -keyout server.key -out server.csr";
|
ssl =
|
||||||
|
"openssl req -new -newkey rsa:2048 -nodes -keyout server.key -out server.csr";
|
||||||
fingerprint = "ssh-keyscan myhost.com | ssh-keygen -lf -";
|
fingerprint = "ssh-keyscan myhost.com | ssh-keygen -lf -";
|
||||||
publickey = "ssh-keygen -y -f ~/.ssh/id_rsa > ~/.ssh/id_rsa.pub";
|
publickey = "ssh-keygen -y -f ~/.ssh/id_rsa > ~/.ssh/id_rsa.pub";
|
||||||
forloop = "for i in (seq 1 100)";
|
forloop = "for i in (seq 1 100)";
|
||||||
@ -207,13 +203,15 @@ in
|
|||||||
ca = "cargo";
|
ca = "cargo";
|
||||||
|
|
||||||
};
|
};
|
||||||
shellAliases = {};
|
shellAliases = { };
|
||||||
shellInit = "";
|
shellInit = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
EDITOR = "nvim";
|
|
||||||
fish_greeting = "";
|
fish_greeting = "";
|
||||||
|
EDITOR = "nvim";
|
||||||
|
NIXOS_CONFIG = builtins.getEnv "PWD";
|
||||||
|
DOTS = "${builtins.getEnv "PWD"}/..";
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.starship = {
|
programs.starship = {
|
||||||
@ -244,12 +242,8 @@ in
|
|||||||
userName = "Noah Masur";
|
userName = "Noah Masur";
|
||||||
userEmail = "7386960+nmasur@users.noreply.github.com";
|
userEmail = "7386960+nmasur@users.noreply.github.com";
|
||||||
extraConfig = {
|
extraConfig = {
|
||||||
core = {
|
core = { editor = "nvim"; };
|
||||||
editor = "nvim";
|
pager = { branch = "false"; };
|
||||||
};
|
|
||||||
pager = {
|
|
||||||
branch = "false";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -260,23 +254,23 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Email
|
# Email
|
||||||
/* programs.himalaya = { */
|
# programs.himalaya = {
|
||||||
/* enable = true; */
|
# enable = true;
|
||||||
/* settings = { */
|
# settings = {
|
||||||
/* name = "Noah Masur"; */
|
# name = "Noah Masur";
|
||||||
/* downloads-dir = "~/Downloads"; */
|
# downloads-dir = "~/Downloads";
|
||||||
/* home = { */
|
# home = {
|
||||||
/* default = true; */
|
# default = true;
|
||||||
/* email = "censored"; */
|
# email = "censored";
|
||||||
/* imap-host = "censored"; */
|
# imap-host = "censored";
|
||||||
/* imap-port = 993; */
|
# imap-port = 993;
|
||||||
/* imap-login = "censored"; */
|
# imap-login = "censored";
|
||||||
/* imap-passwd-cmd = "cat ~/.config/himalaya/passwd"; */
|
# imap-passwd-cmd = "cat ~/.config/himalaya/passwd";
|
||||||
/* smtp-host = "censored"; */
|
# smtp-host = "censored";
|
||||||
/* smtp-port = 587; */
|
# smtp-port = 587;
|
||||||
/* smtp-login = "censored"; */
|
# smtp-login = "censored";
|
||||||
/* smtp-passwd-cmd = "cat ~/.config/himalaya/passwd"; */
|
# smtp-passwd-cmd = "cat ~/.config/himalaya/passwd";
|
||||||
/* }; */
|
# };
|
||||||
/* }; */
|
# };
|
||||||
/* }; */
|
# };
|
||||||
}
|
}
|
||||||
|
@ -165,7 +165,7 @@ require("packer").startup(function(use)
|
|||||||
args = { "run", "black", "--quiet", "--fast", "-" },
|
args = { "run", "black", "--quiet", "--fast", "-" },
|
||||||
}),
|
}),
|
||||||
require("null-ls").builtins.formatting.fish_indent,
|
require("null-ls").builtins.formatting.fish_indent,
|
||||||
-- require("null-ls").builtins.formatting.nixfmt,
|
require("null-ls").builtins.formatting.nixfmt,
|
||||||
require("null-ls").builtins.formatting.rustfmt,
|
require("null-ls").builtins.formatting.rustfmt,
|
||||||
require("null-ls").builtins.diagnostics.shellcheck,
|
require("null-ls").builtins.diagnostics.shellcheck,
|
||||||
require("null-ls").builtins.formatting.shfmt.with({
|
require("null-ls").builtins.formatting.shfmt.with({
|
||||||
@ -683,7 +683,7 @@ key("", "<Leader>t#", ":Tabularize /#<CR>")
|
|||||||
key("", "<Leader>tl", ":Tabularize /---<CR>")
|
key("", "<Leader>tl", ":Tabularize /---<CR>")
|
||||||
|
|
||||||
-- Vimrc editing
|
-- Vimrc editing
|
||||||
key("n", "<Leader>fv", ":edit $MYVIMRC<CR>")
|
key("n", "<Leader>fv", ":edit $DOTS/nvim.configlink/init.lua<CR>")
|
||||||
key("n", "<Leader>rr", ":luafile $MYVIMRC<CR>")
|
key("n", "<Leader>rr", ":luafile $MYVIMRC<CR>")
|
||||||
key("n", "<Leader>rp", ":luafile $MYVIMRC<CR>:PackerInstall<CR>:")
|
key("n", "<Leader>rp", ":luafile $MYVIMRC<CR>:PackerInstall<CR>:")
|
||||||
key("n", "<Leader>rc", ":luafile $MYVIMRC<CR>:PackerCompile<CR>")
|
key("n", "<Leader>rc", ":luafile $MYVIMRC<CR>:PackerCompile<CR>")
|
||||||
|
Loading…
Reference in New Issue
Block a user