1
0
Fork 0
nixos/configuration.nix

124 lines
3.3 KiB
Nix

{ config, pkgs, ... }:
{
environment.systemPackages = with pkgs;
[ # development
gnumake
postgresql
strace
valgrind
] ++ [ # utilities
acpi
cloak
man-pages
mdcat
unzip
wget
] ++ [ # applications
R
] ++ [ # other
cifs-utils
ffmpeg
libcxx
libinput
ntfs3g
openal
];
home-manager.useGlobalPkgs = true;
imports = [ ./lwad ];
lwad = {
applications = {
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"
];
};
markdown-preview.enable = true;
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;
};
core.enable = true;
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 = [ "/" ];
groups = {
terminalApplications.enable = true;
terminalCommands.enable = true;
};
utilities = {
pulseaudio.enable = true;
tailscale.enable = true;
};
};
programs = {
dconf.enable = true;
bash.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'';
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)'';
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";
};
};
systemd.services.nix-daemon.serviceConfig.SystemCallErrorNumber = "ENOSYS"; # Work around incompatabilities between old systemd and new syscalls.
}