split systempackages

This commit is contained in:
Peder Bergebakken Sundt 2023-03-12 05:14:28 +01:00
parent d86ae0e703
commit 6ae060e391
17 changed files with 269 additions and 391 deletions

View File

@ -15,6 +15,8 @@
* [x] Make a flake * [x] Make a flake
* [x] merge hosted docs into a single subdomain * [x] merge hosted docs into a single subdomain
* [x] Setup some remote-development and deploy flow * [x] Setup some remote-development and deploy flow
* [ ] add a hidpi profile? https://wiki.archlinux.org/title/HiDPI
* [ ] rocm
* [ ] xclip * [ ] xclip
* [ ] xforwarding over ssh * [ ] xforwarding over ssh
* [ ] autogenerate ssh keys * [ ] autogenerate ssh keys

View File

@ -3,8 +3,14 @@
imports = [ imports = [
./cachix.nix ./cachix.nix
./profiles/locale-no.nix ./profiles/locale-no.nix
# results of 'nixos-generate-config'
# nice to have if i just dump this flake into /etc/nixos on a clean install
(if builtins.pathExists ./configuration.nix
then ./configuration.nix
else {}
)
(if builtins.pathExists ./hardware-configuration.nix (if builtins.pathExists ./hardware-configuration.nix
then ./hardware-configuration.nix # results of nixos-generate-config then ./hardware-configuration.nix
else {} else {}
) )
]; ];
@ -44,7 +50,6 @@
environment.shells = with pkgs; [ bash zsh ]; environment.shells = with pkgs; [ bash zsh ];
nix.settings.allowed-users = [ "*" ]; # default nix.settings.allowed-users = [ "*" ]; # default
#nix.settings.allowed-users = [ "@nixbld" "@builders" ]; # TODO: this #nix.settings.allowed-users = [ "@nixbld" "@builders" ]; # TODO: this
nix.settings.trusted-users = [ "root" "@wheel" ]; nix.settings.trusted-users = [ "root" "@wheel" ];
@ -64,5 +69,4 @@
# firewall # firewall
services.fail2ban.enable = config.services.openssh.enable; services.fail2ban.enable = config.services.openssh.enable;
networking.firewall.enable = true; # default networking.firewall.enable = true; # default
} }

View File

@ -7,47 +7,29 @@
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
../../hardware/opengl-intel.nix
../../users # home-manager ../../users # home-manager
../../users/pbsds ../../users/pbsds
../../hardware/opengl-intel.nix ../../profiles/shell/base.nix
../../profiles/shell/archives.nix
../../profiles/shell/nix-utils.nix
../../profiles/shell/binfmt-emu.nix
/** / #../../profiles/domeneshop-dyndns # TODO: secrets
../../profiles/web
../../profiles/web/index
../../profiles/web/docs
../../profiles/web/docs/pdoc.nix
../../profiles/web/docs/python-docs.nix
../../profiles/web/docs/nixpkgs.nix
../../profiles/web/docs/linux-docs.nix
../../profiles/web/docs/yagcd.nix
/**/
#../../profiles/domeneshop-dyndns # TODO: olavtr is hardcoded...
#../../profiles/code-remote #../../profiles/code-remote
#../../profiles/remote-builders # #../../profiles/remote-builders
#../../profiles/autossh-reverse-tunnels #../../profiles/autossh-reverse-tunnels
]; ];
#services.domeneshop-updater.target = "bolle.pbsds.net"; # default?
# run/build weird binaries
# TODO: somehow make sure this is in sync with remote-builders
boot.binfmt.emulatedSystems = [
"wasm32-wasi"
"wasm64-wasi"
"x86_64-windows"
"aarch64-linux"
"riscv64-linux"
#"x86_64-darwin"
#"aarch64-darwin"
];
services.thermald.enable = true; services.thermald.enable = true;
# Virtualization # Virtualization
#virtualisation.podman.enable = true; #virtualisation.podman.enable = true;
#virtualisation.podman.dockerCompat = true; # alias docker to podman #virtualisation.podman.dockerCompat = true; # alias docker to podman
#virtualisation.oci-containers.backend = "podman"; #virtualisation.oci-containers.backend = "podman"; # default
# Networking # Networking
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
@ -71,96 +53,14 @@
/**/ /**/
# Installed system packages # Installed system packages
# TODO: prune this, make home-manager deal with the majority
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
lsof
lshw
htop
file
tmux
#parallel # already provided by moreutils
pwgen
git
nmap
rsync
bind.dnsutils
graphviz
dialog
cowsay
gnused
gnumake
coreutils-full
moreutils
binutils
diffutils
findutils
usbutils
bash-completion
curl
wget
strace
killall
zip
unrar
unzip
atool
p7zip
bzip2
gzip
atool
micro
aspell aspellDicts.en aspellDicts.nb
vimv
dos2unix
#rmate # TODO: add to nixpkgs
pandoc
cargo
cargo-edit
sqlite
#sshuttle
visidata
weston
cage cage
weston
dialog
zenith
vimix-gtk-themes vimix-gtk-themes
flat-remix-icon-theme flat-remix-icon-theme
xclip
feh feh
sshfs
glances
zenith
tealdeer # tldr
entr
axel aria
bat
xe # xargs alternative
sd # sed alternative
fd # find alternative
silver-searcher # `ag`
ripgrep
jq
yq
htmlq
sysz
du-dust # du alternative
ncdu # Disk usage analyzer with an ncurses interface
gh
hub
cachix
nix-output-monitor
nix-prefetch
nix-top
#nix-index
nix-tree
nix-diff
nixfmt
alejandra
]; ];
# TODO: remove? Move? # TODO: remove? Move?
@ -173,12 +73,15 @@
# System fonts # System fonts
# Nice to have when X-forwading on headless machines # Nice to have when X-forwading on headless machines
# TODO: move? # TODO: move?
#hardware.video.hidpi.enable = true; # highdpi (for nord only)
#fonts.fontconfig.hinting.enable = true; # lowdpi
fonts.fontDir.enable = true; # creates /run/current-system/sw/share/X11/fonts
fonts.enableDefaultFonts = true; # dejavu, freefont, gyre, liberation, unifont, noto-fonts-emoji
fonts.fonts = with pkgs; [ fonts.fonts = with pkgs; [
noto-fonts # includes Cousine noto-fonts # includes Cousine
noto-fonts-cjk noto-fonts-cjk
noto-fonts-emoji noto-fonts-emoji
noto-fonts-extra noto-fonts-extra
dejavu_fonts
]; ];
# This value determines the NixOS release from which the default # This value determines the NixOS release from which the default

View File

@ -13,8 +13,6 @@
boot.kernelPackages = pkgs.linuxPackages_latest; # amdgpu audio fix when at 4k@60fps boot.kernelPackages = pkgs.linuxPackages_latest; # amdgpu audio fix when at 4k@60fps
services.flatpak.enable = true;
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
../../hardware/rocm.nix ../../hardware/rocm.nix
@ -23,40 +21,34 @@
../../users # home-manager ../../users # home-manager
../../users/pbsds ../../users/pbsds
../../profiles/desktop/gnome # with gdm ../../profiles/mounts/reidun-nfs.nix
../../profiles/shell/base.nix
../../profiles/shell/archives.nix
../../profiles/shell/nix-utils.nix
#../../profiles/shell/binfmt-emu.nix
../../profiles/desktop/gnome # configures gdm
#../../profiles/desktop/sound/alsa.nix
#../../profiles/desktop/sound/pulseaudio.nix #../../profiles/desktop/sound/pulseaudio.nix
../../profiles/desktop/sound/pipewire.nix ../../profiles/desktop/sound/pipewire.nix
#../../profiles/desktop/sound/alsa.nix
../../profiles/desktop/steam.nix ../../profiles/desktop/steam.nix
../../profiles/desktop/flatpak.nix
../../profiles/nfs/reidun.nix
../../profiles/remote-builders ../../profiles/remote-builders
#../../profiles/autossh-reverse-tunnels #../../profiles/autossh-reverse-tunnels
#../../profiles/domeneshop-dyndns # handled by noximilien #../../profiles/domeneshop-dyndns # handled by noximilien
]; ];
networking.firewall.allowedTCPPorts = [ 57621 ]; # spotify networking.firewall.allowedTCPPorts = [ 57621 ]; # spotify local discovery
# run/build weird binaries
# TODO: somehow make sure this is in sync with remote-builders
boot.binfmt.emulatedSystems = [
"wasm32-wasi"
"wasm64-wasi"
"x86_64-windows"
"aarch64-linux"
"riscv64-linux"
#"x86_64-darwin"
#"aarch64-darwin"
];
services.thermald.enable = true; services.thermald.enable = true;
# Virtualization # Virtualization
#virtualisation.podman.enable = true; #virtualisation.podman.enable = true;
#virtualisation.podman.dockerCompat = true; # alias docker to podman #virtualisation.podman.dockerCompat = true; # alias docker to podman
#virtualisation.oci-containers.backend = "podman"; #virtualisation.oci-containers.backend = "podman"; # default
# Networking # Networking
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
@ -75,97 +67,15 @@
#TODO: avahi? resolved? https://git.pvv.ntnu.no/Drift/pvv-nixos-config/src/main/base.nix#L15-L18 #TODO: avahi? resolved? https://git.pvv.ntnu.no/Drift/pvv-nixos-config/src/main/base.nix#L15-L18
# Installed system packages # Installed system packages
# TODO: prune this, make home-manager deal with the majority
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
lsof
lshw
htop
file
tmux
#parallel # already provided by moreutils
pwgen
git
nmap
rsync
bind.dnsutils
graphviz
dialog
cowsay
gnused
gnumake
coreutils-full
moreutils
binutils
diffutils
findutils
usbutils
bash-completion
curl
wget
strace
killall
zip
unrar
unzip
atool
p7zip
bzip2
gzip
atool
micro
aspell aspellDicts.en aspellDicts.nb
vimv
dos2unix
#rmate # TODO: add to nixpkgs
pandoc
cargo
cargo-edit
sqlite
#sshuttle
visidata
weston
cage cage
weston
dialog
zenith
vimix-gtk-themes vimix-gtk-themes
flat-remix-icon-theme flat-remix-icon-theme
xclip
feh feh
sshfs
glances
zenith
tealdeer # tldr
entr
axel aria
bat
xe # xargs alternative
sd # sed alternative
fd # find alternative
silver-searcher # `ag`
ripgrep
jq
yq
htmlq
sysz
du-dust # du alternative
ncdu # Disk usage analyzer with an ncurses interface
gh
hub
cachix
nix-output-monitor
nix-prefetch
nix-top
#nix-index
nix-tree
nix-diff
nixfmt
alejandra
firefox firefox
]; ];
@ -179,12 +89,15 @@
# System fonts # System fonts
# Nice to have when X-forwading on headless machines # Nice to have when X-forwading on headless machines
# TODO: move? # TODO: move?
hardware.video.hidpi.enable = true; # highdpi (for nord only)
#fonts.fontconfig.hinting.enable = true; # lowdpi
fonts.fontDir.enable = true; # creates /run/current-system/sw/share/X11/fonts
fonts.enableDefaultFonts = true; # dejavu, freefont, gyre, liberation, unifont, noto-fonts-emoji
fonts.fonts = with pkgs; [ fonts.fonts = with pkgs; [
noto-fonts # includes Cousine noto-fonts # includes Cousine
noto-fonts-cjk noto-fonts-cjk
noto-fonts-emoji noto-fonts-emoji
noto-fonts-extra noto-fonts-extra
dejavu_fonts
]; ];

View File

@ -6,17 +6,22 @@
boot.loader.grub.useOSProber = true; boot.loader.grub.useOSProber = true;
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
../../hardware/opengl-intel.nix
../../users # home-manager ../../users # home-manager
../../users/pbsds ../../users/pbsds
../../users/jornane ../../users/jornane
#../../users/all.nix # TODO: does not work?
../../hardware/opengl-intel.nix ../../profiles/mounts/reidun-nfs.nix
../../profiles/tmate-server # opens port 42244 ../../profiles/shell/base.nix
../../profiles/shell/archives.nix
../../profiles/shell/nix-utils.nix
../../profiles/shell/binfmt-emu.nix
../../profiles/web ../../profiles/services/tmate-server.nix # opens port 42244
../../profiles/web # enables nginx+acme, defines mkDomain
../../profiles/web/index ../../profiles/web/index
../../profiles/web/services/cinny ../../profiles/web/services/cinny
../../profiles/web/services/element ../../profiles/web/services/element
@ -69,15 +74,14 @@
#../../profiles/web/services/trivial-gradios #../../profiles/web/services/trivial-gradios
../../profiles/domeneshop-dyndns # TODO: olavtr is hardcoded... ../../profiles/domeneshop-dyndns # TODO: olavtr is hardcoded...
../../profiles/code-remote ../../profiles/code-remote # TODO: move into web? services?
../../profiles/remote-builders # ../../profiles/remote-builders
../../profiles/nfs/reidun.nix # NFS mounts
../../profiles/autossh-reverse-tunnels ../../profiles/autossh-reverse-tunnels
#../../profiles/xrdp #../../profiles/xrdp
]; ];
services.domeneshop-updater.target = "olavtr.pbsds.net"; services.domeneshop-updater.target = "olavtr.pbsds.net";
# TODO: remove? Move to where relevant= # TODO: remove? Move to where relevant?
nixpkgs.overlays = [ nixpkgs.overlays = [
/** / /** /
(final: prev: { (final: prev: {
@ -87,25 +91,12 @@
/**/ /**/
]; ];
# run/build weird binaries
# TODO: somehow make sure this is in sync with remote-builders
boot.binfmt.emulatedSystems = [
"wasm32-wasi"
"wasm64-wasi"
"x86_64-windows"
"aarch64-linux"
"riscv64-linux"
#"x86_64-darwin"
#"aarch64-darwin"
];
services.thermald.enable = true; services.thermald.enable = true;
# Virtualization # Virtualization
virtualisation.podman.enable = true; virtualisation.podman.enable = true;
# TODO: are these default since 22.11?
virtualisation.podman.dockerCompat = true; # alias docker to podman virtualisation.podman.dockerCompat = true; # alias docker to podman
virtualisation.oci-containers.backend = "podman"; virtualisation.oci-containers.backend = "podman"; # default
# Networking # Networking
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
@ -127,96 +118,14 @@
#TODO: avahi? resolved? https://git.pvv.ntnu.no/Drift/pvv-nixos-config/src/main/base.nix#L15-L18 #TODO: avahi? resolved? https://git.pvv.ntnu.no/Drift/pvv-nixos-config/src/main/base.nix#L15-L18
# Installed system packages # Installed system packages
# TODO: prune this, make home-manager deal with the majority
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
lsof
lshw
htop
file
tmux
#parallel # already provided by moreutils
pwgen
git
nmap
rsync
bind.dnsutils
graphviz
dialog
cowsay
gnused
gnumake
coreutils-full
moreutils
binutils
diffutils
findutils
usbutils
bash-completion
curl
wget
strace
killall
zip
unrar
unzip
atool
p7zip
bzip2
gzip
atool
micro
aspell aspellDicts.en aspellDicts.nb
vimv
dos2unix
#rmate # TODO: add to nixpkgs
pandoc
cargo
cargo-edit
sqlite
#sshuttle
visidata
weston
cage cage
weston
dialog
zenith
vimix-gtk-themes vimix-gtk-themes
flat-remix-icon-theme flat-remix-icon-theme
xclip
feh feh
sshfs
glances
zenith
tealdeer # tldr
entr
axel aria
bat
xe # xargs alternative
sd # sed alternative
fd # find alternative
silver-searcher # `ag`
ripgrep
jq
yq
htmlq
sysz
du-dust # du alternative
ncdu # Disk usage analyzer with an ncurses interface
gh
hub
cachix
nix-output-monitor
nix-prefetch
nix-top
#nix-index
nix-tree
nix-diff
nixfmt
alejandra
]; ];
# TODO: remove? Move? # TODO: remove? Move?
@ -234,24 +143,20 @@
services.openssh.enable = true; services.openssh.enable = true;
services.openssh.forwardX11 = true; services.openssh.forwardX11 = true;
# TODO: should not be system-wide
#programs.ssh.extraConfig = ''
# Host *.ntnu.no *.pvv.org
# User pederbs
#'';
# System fonts # System fonts
# Nice to have when X-forwading on headless machines # Nice to have when X-forwading on headless machines
# TODO: move? # TODO: move?
#hardware.video.hidpi.enable = true; # highdpi (for nord only)
#fonts.fontconfig.hinting.enable = true; # lowdpi
fonts.fontDir.enable = true; # creates /run/current-system/sw/share/X11/fonts
fonts.enableDefaultFonts = true; # dejavu, freefont, gyre, liberation, unifont, noto-fonts-emoji
fonts.fonts = with pkgs; [ fonts.fonts = with pkgs; [
noto-fonts # includes Cousine noto-fonts # includes Cousine
noto-fonts-cjk noto-fonts-cjk
noto-fonts-emoji noto-fonts-emoji
noto-fonts-extra noto-fonts-extra
dejavu_fonts
]; ];
# This value determines the NixOS release from which the default # This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions # settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave # on your system were taken. Its perfectly fine and recommended to leave

View File

@ -0,0 +1,26 @@
{ config, pkgs, ... }:
{
services.flatpak.enable = true;
# fix missing fonts in flatpak, without resorting to copying fonts to a dedicated folder
# via https://github.com/NixOS/nixpkgs/issues/119433#issuecomment-1326957279
system.fsPackages = [ pkgs.bindfs ];
fileSystems = let
mkRoSymBind = path: {
device = path;
fsType = "fuse.bindfs";
# resolve-symlinks enable not mounting /nix into the flatpacks
options = [ "ro" "resolve-symlinks" "x-gvfs-hide" ];
};
aggregatedFonts = pkgs.buildEnv {
name = "system-fonts";
paths = config.fonts.fonts;
pathsToLink = [ "/share/fonts" ];
};
in {
# Create an FHS mount to support flatpak host icons/fonts
"/usr/share/icons" = mkRoSymBind (config.system.path + "/share/icons");
"/usr/share/fonts" = mkRoSymBind (aggregatedFonts + "/share/fonts");
};
}

View File

@ -1,17 +1,26 @@
{ {
# Time zone and internationalisation properties. # Time zone and internationalisation properties.
time.timeZone = "Europe/Oslo"; time.timeZone = "Europe/Oslo";
i18n.defaultLocale = "en_US.utf8"; i18n.defaultLocale = "en_US.utf8";
i18n.extraLocaleSettings.LC_ADDRESS = "nb_NO.utf8"; i18n.extraLocaleSettings.LC_ADDRESS = "nb_NO.utf8";
i18n.extraLocaleSettings.LC_IDENTIFICATION = "nb_NO.utf8"; i18n.extraLocaleSettings.LC_IDENTIFICATION = "nb_NO.utf8";
i18n.extraLocaleSettings.LC_MEASUREMENT = "nb_NO.utf8"; i18n.extraLocaleSettings.LC_MEASUREMENT = "nb_NO.utf8";
i18n.extraLocaleSettings.LC_MONETARY = "nb_NO.utf8"; i18n.extraLocaleSettings.LC_MONETARY = "nb_NO.utf8";
i18n.extraLocaleSettings.LC_NAME = "nb_NO.utf8"; i18n.extraLocaleSettings.LC_NAME = "nb_NO.utf8";
i18n.extraLocaleSettings.LC_NUMERIC = "nb_NO.utf8"; i18n.extraLocaleSettings.LC_NUMERIC = "nb_NO.utf8";
i18n.extraLocaleSettings.LC_PAPER = "nb_NO.utf8"; i18n.extraLocaleSettings.LC_PAPER = "nb_NO.utf8";
i18n.extraLocaleSettings.LC_TELEPHONE = "nb_NO.utf8"; i18n.extraLocaleSettings.LC_TELEPHONE = "nb_NO.utf8";
i18n.extraLocaleSettings.LC_TIME = "nb_NO.utf8"; i18n.extraLocaleSettings.LC_TIME = "nb_NO.utf8";
console.keyMap = "no"; console.keyMap = "no";
services.xserver.layout = "no"; services.xserver.layout = "no";
services.xserver.xkbVariant = ""; services.xserver.xkbVariant = "";
# no caps lock
services.xserver.xkbOptions = "ctrl:nocaps";
#console.useXkbConfig = true; # applies to ttys aswell, mutex with console.keyMap
# run the following to make GNOME reload the xkb options:
/*
gsettings reset org.gnome.desktop.input-sources xkb-options
gsettings reset org.gnome.desktop.input-sources sources
*/
} }

View File

@ -0,0 +1,13 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
zip
unrar
unzip
atool
p7zip
bzip2
gzip
atool
];
}

53
profiles/shell/base.nix Normal file
View File

@ -0,0 +1,53 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
lsof
lshw
file
tmux
#parallel # already provided by moreutils
pwgen
git
#gh
#hub
nmap
rsync
bind.dnsutils
gnused
gnumake
coreutils-full
moreutils
binutils
diffutils
findutils
usbutils
bash-completion
curl
wget
strace
killall
htop
glances
#sshfs
entr
tealdeer # tldr, but rust
axel aria
bat
xe # xargs alternative
sd # sed alternative
fd # find alternative
silver-searcher # `ag`
ripgrep # 'rg'
jq
yq
htmlq
sysz
du-dust # du alternative
ncdu # Disk usage analyzer with an ncurses interface
visidata
sqlite
];
}

View File

@ -0,0 +1,14 @@
{ pkgs, ... }:
{
# run/build weird binaries
# TODO: somehow make sure this is in sync with remote-builders
boot.binfmt.emulatedSystems = [
"wasm32-wasi"
"wasm64-wasi"
"x86_64-windows"
"aarch64-linux"
"riscv64-linux"
#"x86_64-darwin"
#"aarch64-darwin"
];
}

View File

@ -0,0 +1,16 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
cachix
nix-output-monitor
nix-prefetch
nix-top
#nix-index
nix-tree
#nix-search # TODO: exists?
nix-diff
#comma
nixfmt
alejandra
];
}

View File

@ -3,7 +3,11 @@
# system-wide shit # system-wide shit
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
micro
vimv
xclip
fzf fzf
#rmate-sh # TODO: add to nixpkgs
]; ];
# TODO: fzf for zsh # TODO: fzf for zsh
programs.bash.shellInit = '' programs.bash.shellInit = ''
@ -13,6 +17,7 @@
programs.bash.shellAliases."ed" = "micro"; # TODO: ${EDITOR:-micro} programs.bash.shellAliases."ed" = "micro"; # TODO: ${EDITOR:-micro}
environment.variables."EDITOR" = "micro"; environment.variables."EDITOR" = "micro";
# user and home-manager # user and home-manager
#nix.trusted-users = [ "pbsds" ]; #nix.trusted-users = [ "pbsds" ];

View File

@ -2,7 +2,7 @@
{ pkgs, config, ... }: { pkgs, config, ... }:
{ {
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
home.stateVersion = "22.11"; home.stateVersion = "22.11"; # TODO: what uses this?
imports = [ imports = [
./profiles/bat.nix ./profiles/bat.nix
@ -14,12 +14,8 @@
./profiles/tmate.nix ./profiles/tmate.nix
]; ];
# TODO: add remote-exec once packaged
programs.bash.initExtra = '' programs.bash.initExtra = ''
if [ "$COLORTERM" = "truecolor" ] || [ "$TERM" == "xterm" ]; then
export TERM=xterm-256color
export MICRO_TRUECOLOR=1
fi
# remote-exec # remote-exec
if command -v remote >/dev/null && remote-quick >/dev/null; then if command -v remote >/dev/null && remote-quick >/dev/null; then
complete -F _command remote complete -F _command remote
@ -31,10 +27,11 @@
nix-shell -p atom --run "atom $(printf "%q " "$@") --in-process-gpu --no-sandbox" nix-shell -p atom --run "atom $(printf "%q " "$@") --in-process-gpu --no-sandbox"
} }
''; '';
# TODO: split ^
home.packages = with pkgs; [ home.packages = with pkgs; [
xclip xclip
#rmate-sh # TODO: add to nixpkgs, add to ssh config
#remote-exec # TODO: add to nixpkgs
zip zip
unrar unrar
@ -45,17 +42,14 @@
gzip gzip
atool atool
aspell
aspellDicts.en
aspellDicts.nb
dos2unix dos2unix
pandoc pandoc
graphviz graphviz
vgmstream vgmstream
gallery-dl gallery-dl
yt-dlp
youtube-dl youtube-dl
yt-dlp
ffmpeg-full ffmpeg-full
visidata visidata
@ -67,18 +61,26 @@
ponysay ponysay
# TODO: move to graphical? kiosk? # TODO: move to graphical? kiosk?
mesa-demos
cage cage
mesa-demos
librespeed-cli librespeed-cli
cachix cachix
nix-template #nix-template
nix-output-monitor nix-output-monitor
nixpkgs-review nixpkgs-review
manix manix
comma comma
#sshuttle
#cargo
#cargo-edit
#nim
#nimble
(python3.withPackages (python-packages: with python-packages; [ (python3.withPackages (python-packages: with python-packages; [
matplotlib matplotlib
more-itertools more-itertools
@ -98,10 +100,8 @@
home.shellAliases = { home.shellAliases = {
#flexget = "ssh -t knut.pbsds.net sudo -u flexget flexget"; #flexget = "ssh -t knut.pbsds.net sudo -u flexget flexget";
flexget = "sudo --user=flexget flexget -c /var/lib/flexget/flexget.yml"; flexget = "sudo --user=flexget flexget -c /var/lib/flexget/flexget.yml"; # TODO: only applies to nox...
hman = "man -H "; # HTML opened in a browser hman = "man -H "; # HTML opened in a browser
tmux = "systemd-run --scope --user tmux"; # detach from ssh scope, surviving logout tmux = "systemd-run --scope --user tmux"; # detach from ssh scope, surviving logout
# TODO: wayland # TODO: wayland
@ -111,7 +111,6 @@
pwd-fqdn = ''echo "$(whoami)@$(hostname -f):$(printf "%q" "$(realpath .)/")"''; pwd-fqdn = ''echo "$(whoami)@$(hostname -f):$(printf "%q" "$(realpath .)/")"'';
http-server = "${pkgs.python3}/bin/python -m http.server"; http-server = "${pkgs.python3}/bin/python -m http.server";
manix-fzf = ''manix "" 2>/dev/null | grep '^# ' | sed 's/^# \(.*\) (.*/\1/;s/ (.*//;s/^# //' | fzf --preview="manix '{}'" | xargs manix''; manix-fzf = ''manix "" 2>/dev/null | grep '^# ' | sed 's/^# \(.*\) (.*/\1/;s/ (.*//;s/^# //' | fzf --preview="manix '{}'" | xargs manix'';
# TODO: move to /run/user/... # TODO: move to /run/user/...
@ -121,7 +120,7 @@
programs.nix-index.enable = true; programs.nix-index.enable = true;
xdg.enable = true; xdg.enable = true;
#xdg.desktopEntries #TODO: xdg.desktopEntries
/** / /** /
programs.beets = { programs.beets = {

View File

@ -1,7 +1,10 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
home.packages = with pkgs; [
home.packages = with pkgs; [ git gh hub ]; git
gh
hub
];
#programs.git.gitui.enable = true; #programs.git.gitui.enable = true;
programs.git.enable = true; programs.git.enable = true;
@ -19,29 +22,30 @@
"result-dev" "result-dev"
"result-lib" "result-lib"
"__pycache__" "__pycache__"
"*.pyc"
]; ];
home.shellAliases = { home.shellAliases = {
# git gud # git gud
gs = "git status"; gs = "git status";
gb = "git blame"; gb = "git blame";
gl = "git log --oneline --color | head -n 30"; gl = "git log --oneline --color | head -n 30";
glg = "git log --all --decorate --oneline --graph"; glg = "git log --all --decorate --oneline --graph";
gpra = "git pull --rebase --autostash"; gpra = "git pull --rebase --autostash";
gd = "git diff"; gd = "git diff";
gdwd = "git diff --word-diff"; gdwd = "git diff --word-diff";
gdwdr = "git diff --word-diff --word-diff-regex=."; gdwdr = "git diff --word-diff --word-diff-regex=.";
gds = "git diff --staged"; gds = "git diff --staged";
gdswd = "git diff --staged --word-diff"; gdswd = "git diff --staged --word-diff";
gdswdr = "git diff --staged --word-diff --word-diff-regex=."; gdswdr = "git diff --staged --word-diff --word-diff-regex=.";
gcp = "git cherry-pick"; gcp = "git cherry-pick";
gca = "git commit --amend"; gca = "git commit --amend";
gcara = "git commit --amend --reset-author"; gcara = "git commit --amend --reset-author";
gpo = "git push origin"; gpo = "git push origin";
gpasr = "git pull --autostash --rebase"; gpasr = "git pull --autostash --rebase";
#gfr = "git fetch origin master && git rebase FETCH_HEAD"; #gfr = "git fetch origin master && git rebase FETCH_HEAD";
gfr = "git pull --rebase"; gfr = "git pull --rebase";
gp = "git pull --rebase --autostash"; gp = "git pull --rebase --autostash";
}; };
} }

View File

@ -8,7 +8,19 @@
home.shellAliases.de = "$EDITOR"; home.shellAliases.de = "$EDITOR";
home.sessionVariables.EDITOR = "micro"; home.sessionVariables.EDITOR = "micro";
home.packages = with pkgs; [ micro ]; home.packages = with pkgs; [
micro
aspell
aspellDicts.en
aspellDicts.nb
];
programs.bash.initExtra = ''
if [ "$COLORTERM" = "truecolor" ] || [ "$TERM" == "xterm" ]; then
export TERM=xterm-256color
export MICRO_TRUECOLOR=1
fi
'';
programs.micro.enable = true; programs.micro.enable = true;
programs.micro.trueColor = true; programs.micro.trueColor = true;