1
0
mirror of https://github.com/kmein/niveum synced 2026-03-22 12:51:08 +01:00

4 Commits

6 changed files with 100 additions and 43 deletions

View File

@@ -1,8 +1,12 @@
{
pkgs,
niveumPackages,
lib,
system ? null,
...
}: {
}: let
darwin = lib.strings.hasSuffix "-darwin" system;
in {
environment.systemPackages = [
pkgs.htop
pkgs.w3m
@@ -13,10 +17,8 @@
pkgs.p7zip
pkgs.zip
# MONITORS
pkgs.iotop # I/O load monitor
pkgs.iftop # interface bandwidth monitor
pkgs.lsof # list open files
pkgs.psmisc # for killall, pstree
# SHELL
pkgs.sqlite
pkgs.fd # better find
@@ -41,9 +43,12 @@
niveumPackages.untilport
niveumPackages.kpaste
# HARDWARE
pkgs.usbutils # for lsusb
pkgs.pciutils # for lspci
] ++ lib.optionals (!darwin) [
pkgs.usbutils # for lsusb
pkgs.lshw # for lshw
pkgs.iotop # I/O load monitor
pkgs.psmisc # for killall, pstree
];
environment.shellAliases = let
@@ -61,30 +66,30 @@
readlink "$(${pkgs.which}/bin/which --skip-alias "$1")" | xargs dirname
'';
in {
"ß" = "${pkgs.util-linux}/bin/setsid";
nixi = "nix repl '<nixpkgs>'";
take = "source ${take}";
wcd = "source ${wcd}";
where = "source ${where}";
# temporary files and directories
cdt = "source ${cdt}";
vit = "$EDITOR $(mktemp)";
# file safety
mv = "mv --interactive";
rm = "rm --interactive";
cp = "cp --interactive";
mv = "${pkgs.coreutils}/bin/mv --interactive";
rm = "${pkgs.coreutils}/bin/rm --interactive";
cp = "${pkgs.coreutils}/bin/cp --interactive";
# colours
cat = "${pkgs.bat}/bin/bat --theme=ansi --style=plain";
l = "ls --color=auto --time-style=long-iso --almost-all";
ls = "ls --color=auto --time-style=long-iso";
ll = "ls --color=auto --time-style=long-iso -l";
la = "ls --color=auto --time-style=long-iso --almost-all -l";
l = "${pkgs.coreutils}/bin/ls --color=auto --time-style=long-iso --almost-all";
ls = "${pkgs.coreutils}/bin/ls --color=auto --time-style=long-iso";
ll = "${pkgs.coreutils}/bin/ls --color=auto --time-style=long-iso -l";
la = "${pkgs.coreutils}/bin/ls --color=auto --time-style=long-iso --almost-all -l";
} // (if darwin then {} else {
"ß" = "${pkgs.util-linux}/bin/setsid";
ip = "${pkgs.iproute2}/bin/ip -c";
# systemd
s = "${pkgs.systemd}/bin/systemctl";
us = "${pkgs.systemd}/bin/systemctl --user";
j = "${pkgs.systemd}/bin/journalctl";
uj = "${pkgs.systemd}/bin/journalctl --user";
};
});
}

View File

@@ -1,25 +1,25 @@
{
pkgs,
config,
lib,
inputs,
system ? "x86_64-linux",
...
}: let
inherit (import ../lib) kieran ignorePaths;
in {
environment.systemPackages = [
pkgs.mr
pkgs.git
pkgs.gitFull
pkgs.git-crypt
pkgs.gitAndTools.gitflow
pkgs.gitAndTools.gh
pkgs.gitAndTools.git-extras
pkgs.gitAndTools.git-trim
pkgs.gitAndTools.git-absorb
pkgs.gitflow
pkgs.gh
pkgs.git-extras
# pkgs.git-trim
pkgs.git-absorb
pkgs.gitstats
pkgs.patch
pkgs.patchutils
inputs.self.packages.x86_64-linux.git-preview
inputs.self.packages.${system}.git-preview
];
environment.shellAliases = {
@@ -30,7 +30,7 @@ in {
home-manager.users.me = {
programs.git = {
enable = true;
package = pkgs.gitAndTools.gitFull;
package = pkgs.gitFull;
userName = kieran.name;
userEmail = kieran.email;
aliases = {

View File

@@ -1,5 +1,4 @@
{
config,
pkgs,
lib,
inputs,

View File

@@ -56,6 +56,13 @@
autoload -U zmv run-help
# atuin distributed shell history
export ATUIN_NOBIND="true" # disable all keybdinings of atuin
eval "$(atuin init zsh)"
bindkey '^r' _atuin_search_widget # bind ctrl+r to atuin
# use zsh only session history
fc -p
fpath=(${zsh-completions}/src $fpath)
'';
promptInit = with config.niveum; ''
@@ -68,13 +75,6 @@
zstyle ':vcs_info:*' formats "%c%u%F{cyan}%b%f"
zstyle ':vcs_info:*' actionformats "(%a) %c%u%F{cyan}%b%f"
# atuin distributed shell history
export ATUIN_NOBIND="true" # disable all keybdinings of atuin
eval "$(atuin init zsh)"
bindkey '^r' _atuin_search_widget # bind ctrl+r to atuin
# use zsh only session history
fc -p
precmd () {
vcs_info
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ] || [ -n "$SSH_CONNECTION" ]; then

View File

@@ -22,6 +22,6 @@ stdenv.mkDerivation {
homepage = https://github.com/thameera/vimv;
description = "Batch-rename files using Vim";
license = licenses.mit;
platforms = platforms.linux;
platforms = platforms.all;
};
}

View File

@@ -1,15 +1,24 @@
{
config,
pkgs,
inputs,
niveumPackages,
...
}: let
{ config, pkgs, lib, inputs, niveumPackages, ... }:
let
system = "x86_64-darwin";
nextcloud = "${config.home.homeDirectory}/Nextcloud/ZODIAC";
timeLedger = "${nextcloud}/hora.timeclock";
in {
adminEssentials = import ../../configs/admin-essentials.nix {
inherit pkgs niveumPackages lib system;
};
stardict = import ../../configs/stardict.nix {
inherit pkgs lib inputs;
};
git = import ../../configs/git.nix {
inherit pkgs lib inputs system;
};
in
{
home.packages = [
pkgs.git
(pkgs.writers.writeDashBin "hora" ''
${pkgs.hledger}/bin/hledger -f "${timeLedger}" "$@"
'')
@@ -17,12 +26,56 @@ in {
nvim + "${timeLedger}"
'')
niveumPackages.vim
];
pkgs.ghc
pkgs.python3
] ++ adminEssentials.environment.systemPackages
++ git.environment.systemPackages;
#++ stardict.environment.systemPackages;
home.shellAliases =
adminEssentials.environment.shellAliases
// git.environment.shellAliases;
programs.git = git.home-manager.users.me.programs.git;
programs.zsh = let
promptColours = {
success = "green";
failure = "red";
};
in {
autocd = true;
defaultKeymap = "viins";
enableAutosuggestions = true;
enableCompletion = true;
enable = true;
historySubstringSearch.enable = true;
syntaxHighlighting.enable = true;
syntaxHighlighting.highlighters = ["main" "brackets" "pattern" "line"];
initExtra = ''
precmd () {
if [[ -n $IN_NIX_SHELL ]]; then
PROMPT='%B%~%b %(?.%F{${promptColours.success}}.%F{${promptColours.failure}})λ%f '
else
PROMPT='%B%~%b %(?.%F{${promptColours.success}}.%F{${promptColours.failure}})%#%f '
fi
print -Pn "\e]2;%n@%M:%~\a" # title bar prompt
}
zle-keymap-select zle-line-init () {
case $KEYMAP in
vicmd) print -n '\e]12;green\a';;
viins|main) print -n '\e]12;gray\a';;
esac
}
zle -N zle-line-init
zle -N zle-keymap-select
'';
};
home.sessionVariables.EDITOR = "${niveumPackages.vim}/bin/nvim";
home.file."Local Applications".source = pkgs.symlinkJoin {
name = "local-applications";
paths = [pkgs.anki-bin pkgs.dbeaver pkgs.vscode pkgs.mpv];
paths = [ pkgs.anki-bin pkgs.dbeaver pkgs.vscode pkgs.mpv pkgs.stellarium ];
};
home.stateVersion = "23.11";
home.username = "xm7234fu";