1
0
Fork 0
nixos/configuration.nix

153 lines
4.0 KiB
Nix
Raw Normal View History

2024-03-27 15:40:36 +01:00
{ config, pkgs, ... }:
2023-02-14 22:16:43 +01:00
{
environment.systemPackages = with pkgs;
[ # development
gnumake
postgresql
strace
valgrind
] ++ [ # utilities
acpi
cloak
man-pages
mdcat
unzip
wget
] ++ [ # applications
pulsemixer
R
] ++ [ # other
cifs-utils
ffmpeg
libcxx
libinput
ntfs3g
openal
];
2023-11-23 11:48:22 +01:00
home-manager = {
useGlobalPkgs = true;
users.${config.lwad.definitions.username}.programs = {
bash = {
enable = true;
sessionVariables.BOOKMARKS_FILE = "\${HOME}/Documents/bookmarks";
};
git = {
enable = true;
userEmail = "toolbox.0-kindred@icloud.com";
userName = "lwad";
2023-11-23 11:48:22 +01:00
};
};
2023-02-14 22:16:43 +01:00
};
2024-03-15 12:16:41 +01:00
imports = [ ./lwad ];
2024-03-12 00:02:59 +01:00
lwad = {
applications = {
2024-03-15 00:28:39 +01:00
neovim = {
commentary.enable = true;
completion.enable = true;
enable = true;
formatting = {
enable = true;
formatters =
[ "beautysh" "clang_format" "nixfmt" "prettier" "rustfmt" "yapf" ];
};
fugitive.enable = true;
harpoon.enable = true;
lsp = {
enable = true;
servers = [
"bash"
"clangd"
"jedi"
"nil"
"ruff"
"rust-analyzer"
"typescript"
];
};
2024-03-21 18:04:30 +01:00
markdown-preview.enable = true;
2024-03-15 00:28:39 +01:00
snippets.enable = true;
telescope.enable = true;
undotree.enable = true;
zenmode.enable = true;
treeSitter = {
enable = true;
languages = [
"bash"
"c"
"css"
"elm"
"erlang"
"haskell"
"html"
"java"
"javascript"
"lua"
"markdown"
"nix"
"python"
"r"
"rust"
"typescript"
];
};
};
projectManager.enable = true;
2024-03-12 00:02:59 +01:00
};
2024-03-14 18:36:30 +01:00
core.enable = true;
2024-03-12 00:02:59 +01:00
development.languages = {
bash.enable = true;
c.enable = true;
erlang.enable = true;
java.enable = true;
python.enable = true;
rust.enable = true;
typescript.enable = true;
};
filesystems.btrfs.compressDrives = [ "/" ];
2024-03-27 15:40:36 +01:00
groups = {
terminalApplications.enable = true;
terminalCommands.enable = true;
};
2024-03-27 15:40:36 +01:00
utilities.tailscale.enable = true;
2024-03-12 00:02:59 +01:00
};
2023-02-14 22:16:43 +01:00
programs = {
dconf.enable = true;
bash = {
2024-03-27 15:40:36 +01:00
interactiveShellInit = ''
play() {
if [[ "$1" == "" ]]; then
2024-01-18 12:34:45 +01:00
target="."
else
target="$1"
fi
${pkgs.mpv}/bin/mpv --video=no --display-tags-clr "$target"
}
'';
shellAliases = {
calculator = "(cd && R --save --quiet)";
chvt = "${config.lwad.definitions.sudoas.command} ${pkgs.kbd}/bin/chvt";
drivediff = ''
rsync -nilrc --delete /mnt/external/Documents/ /home/${config.lwad.definitions.username}/Documents/ | sed -e "/.undo/d" -e "/.git/d"'';
here = "pwd >/tmp/herethere";
open = "xdg-open";
otp = ''
${pkgs.cloak}/bin/cloak view lancs | ${pkgs.coreutils}/bin/tr -d "\n" | ${pkgs.xclip}/bin/xclip -i -selection clipboard'';
2024-02-26 20:02:43 +01:00
repo = ''
directory="$((cd /home/${config.lwad.definitions.username} && ${pkgs.fd}/bin/fd -H "^\.git$" Documents -x dirname {}) | sort -h | ${pkgs.fzf}/bin/fzf)" && (pushd "/home/${config.lwad.definitions.username}/$directory" >/dev/null; bash -i; popd >/dev/null)'';
2024-03-27 15:40:36 +01:00
sshfs = "${pkgs.sshfs}/bin/sshfs -o uid=$(id -u),gid=$(id -g)";
there = ''cd "$(head -n 1 /tmp/herethere)"'';
wget = ''wget --hsts-file="$XDG_DATA_HOME/wget-hsts"'';
xclip = "xclip -selection clipboard";
};
2023-02-14 22:16:43 +01:00
};
};
services.pipewire = {
audio.enable = true;
enable = true;
pulse.enable = true;
socketActivation = true;
2023-05-25 15:23:31 +02:00
};
users.users.${config.lwad.definitions.username}.extraGroups = [ "video" ];
2023-02-14 22:16:43 +01:00
}