Split up home.nix into packages and aliases

This commit is contained in:
Sijmen 2023-07-03 11:50:03 +02:00
parent 0238ad32b9
commit 5ae74eeefb
Signed by: vijfhoek
GPG Key ID: DAF7821E067D9C48
4 changed files with 203 additions and 121 deletions

View File

@ -0,0 +1,75 @@
{ pkgs, ... }:
{
home = {
shellAliases = {
".." = "cd ..";
"..." = "cd ../..";
"...." = "cd ../../..";
"....." = "cd ../../../..";
o = "${pkgs.xdg-utils}/bin/xdg-open";
ncdu = "${pkgs.ncdu}/bin/ncdu --color dark";
config = "vim /etc/nixos/configuration/main.nix";
hmconf = "vim /etc/nixos/common/home-manager/main.nix";
hmhconf = "vim /etc/nixos/common/home-manager/home.nix";
switch = "sudo nixos-rebuild switch";
nr = "nix run --impure";
ns = "nix-shell";
nsp = "nix-shell -p";
cdnix = "cd /etc/nixos";
pvim = "${pkgs.poetry}/bin/poetry run vim";
ga = "${pkgs.git}/bin/git add";
gb = "${pkgs.git}/bin/git branch";
gba = "${pkgs.git}/bin/git branch -a";
gbd = "${pkgs.git}/bin/git branch -d";
gc = "${pkgs.git}/bin/git commit";
gca = "${pkgs.git}/bin/git commit --amend";
gcan = "${pkgs.git}/bin/git commit --amend --no-edit";
gcl = "${pkgs.git}/bin/git clone";
gcm = "${pkgs.git}/bin/git commit -m";
gco = "${pkgs.git}/bin/git checkout";
gcob = "${pkgs.git}/bin/git checkout -b";
gcom = "${pkgs.git}/bin/git remote show origin | sed -n '/HEAD branch/s/.*: //p' | xargs git checkout";
gf = "${pkgs.git}/bin/git fetch";
gfp = "${pkgs.git}/bin/git fetch --prune";
gl = "${pkgs.git}/bin/git pull";
glr = "${pkgs.git}/bin/git pull --rebase";
gla = "${pkgs.git}/bin/git pull --autostash";
glra = "${pkgs.git}/bin/git pull --rebase --autostash";
gp = "${pkgs.git}/bin/git push";
gpf = "${pkgs.git}/bin/git push --force-with-lease";
gr = "${pkgs.git}/bin/git reset";
grs = "${pkgs.git}/bin/git reset --soft";
gs = "${pkgs.git}/bin/git stash";
gsa = "${pkgs.git}/bin/git stash apply";
gsp = "${pkgs.git}/bin/git stash pop";
gst = "${pkgs.git}/bin/git status";
tigs = "${pkgs.tig}/bin/tig status";
oath = "${pkgs.yubikey-manager}/bin/ykman oath accounts code";
pc = "${pkgs.podman-compose}/bin/podman-compose";
pce = "${pkgs.podman-compose}/bin/podman-compose exec";
pclf = "${pkgs.podman-compose}/bin/podman-compose logs --tail 100 -f";
pr = "${pkgs.poetry}/bin/poetry run";
};
pointerCursor = {
name = "Adwaita";
package = pkgs.gnome.adwaita-icon-theme;
size = 24;
x11 = {
enable = true;
defaultCursor = "Adwaita";
};
};
};
}

View File

@ -0,0 +1,126 @@
{ pkgs, ... }:
{
home = {
packages = with pkgs; [
# Office
aerc
libreoffice-fresh
obsidian
thunderbird
pandoc
texlive.combined.scheme-full
# Programming
bacon
colordiff
podman-compose
docker-compose
sublime-merge
tig
vscode-fhs
cargo
cargo-outdated
clang
poetry
rust-analyzer
rustc
rustfmt
# Graphics
gimp
graphicsmagick
inkscape
imv
# Internet
discord
element-desktop
gnome.epiphany
httpie
wget
remmina
x2goclient
transmission-gtk
# Sound & Video
cantata
easyeffects
pavucontrol
spotify
ncmpcpp
mpdevil
squeezelite
mediainfo
mpc-cli
# Gaming
chiaki
#prismlauncher
heroic
#factorio
# System Tools
dig
borgbackup
dconf
dmenu
rofi-wayland
grim
light
screen
slurp
smartmontools
swaylock
sysstat
usbutils
virt-manager
wl-clipboard
yubikey-manager
watchexec
wine
xdg-utils
xfce.thunar
gnome.nautilus
nnn
niv
home-manager
nix-index
gnome.evince
gnome.gnome-characters
gnome.gnome-keyring
gnome.gnome-system-monitor
gnome.gnome-tweaks
pika-backup
dua
fd
file
killall
lsof
ncdu
silver-searcher
tree
htop
iotop
powertop
s-tui
libarchive
p7zip
unrar
unzip
zip
# Misc
php
python311
python311Packages.i3ipc
kicad-small
];
};
}

View File

@ -2,126 +2,6 @@
{ {
home = { home = {
packages = with pkgs; [
# Office
aerc
libreoffice-fresh
obsidian
thunderbird
pandoc
texlive.combined.scheme-full
# Programming
bacon
colordiff
podman-compose
docker-compose
sublime-merge
tig
vscode-fhs
cargo
cargo-outdated
clang
poetry
rust-analyzer
rustc
rustfmt
# Graphics
gimp
graphicsmagick
inkscape
imv
# Internet
discord
element-desktop
gnome.epiphany
httpie
wget
remmina
x2goclient
transmission-gtk
# Sound & Video
cantata
easyeffects
pavucontrol
spotify
ncmpcpp
mpdevil
squeezelite
mediainfo
mpc-cli
# Gaming
#prismlauncher
heroic
#factorio
# System Tools
dig
borgbackup
dconf
dmenu
rofi-wayland
grim
light
screen
slurp
smartmontools
swaylock
sysstat
usbutils
virt-manager
wl-clipboard
yubikey-manager
watchexec
wine
xdg-utils
xfce.thunar
gnome.nautilus
nnn
niv
home-manager
nix-index
gnome.evince
gnome.gnome-characters
gnome.gnome-keyring
gnome.gnome-system-monitor
gnome.gnome-tweaks
pika-backup
dua
fd
file
killall
lsof
ncdu
silver-searcher
tree
htop
iotop
powertop
s-tui
libarchive
p7zip
unrar
unzip
zip
# Misc
php
python311
python311Packages.i3ipc
kicad
];
shellAliases = { shellAliases = {
".." = "cd .."; ".." = "cd ..";
"..." = "cd ../.."; "..." = "cd ../..";

View File

@ -5,7 +5,8 @@
home-manager.users.sijmen = { home-manager.users.sijmen = {
imports = [ imports = [
./home.nix ./home-aliases.nix
./home-packages.nix
./gtk.nix ./gtk.nix
./systemd.nix ./systemd.nix
./programs.nix ./programs.nix