move all expressions to nix/; include modularized home-manager config
This commit is contained in:
parent
d76a7f963b
commit
13bd5e9000
65 changed files with 1726 additions and 511 deletions
394
nix/home-manager/configuration/fullblown-workstation.nix
Normal file
394
nix/home-manager/configuration/fullblown-workstation.nix
Normal file
|
@ -0,0 +1,394 @@
|
|||
{ pkgs
|
||||
, config,
|
||||
... }:
|
||||
|
||||
let
|
||||
# gitpkgs = import /home/steveej/src/github/NixOS/nixpkgs {};
|
||||
unstablepkgs = import <nixos-unstable> {};
|
||||
|
||||
in {
|
||||
imports = [
|
||||
../profiles/common.nix
|
||||
../profiles/qtile-desktop.nix
|
||||
../programs/emacs.nix
|
||||
../programs/firefox.nix
|
||||
../programs/chromium.nix
|
||||
../programs/homeshick.nix
|
||||
../programs/libreoffice.nix
|
||||
../programs/neovim.nix
|
||||
../programs/pass.nix
|
||||
../programs/zsh.nix
|
||||
];
|
||||
|
||||
nixpkgs.config = {
|
||||
pidgin = {
|
||||
openssl = true;
|
||||
gnutls = true;
|
||||
};
|
||||
|
||||
packageOverrides = pkgs: with pkgs; {
|
||||
busyboxStatic = busybox.override {
|
||||
enableStatic = true;
|
||||
extraConfig = ''
|
||||
CONFIG_STATIC y
|
||||
CONFIG_INSTALL_APPLET_DONT y
|
||||
CONFIG_INSTALL_APPLET_SYMLINKS n
|
||||
'';
|
||||
};
|
||||
|
||||
dropbearStatic = dropbear.override {
|
||||
enableStatic = true;
|
||||
};
|
||||
|
||||
myPython36 = python36Full.withPackages (ps: with ps; [
|
||||
pylint pep8 yapf flake8
|
||||
# autopep8 (broken)
|
||||
# pylint (broken)
|
||||
ipython
|
||||
llfuse
|
||||
dugong
|
||||
defusedxml
|
||||
wheel
|
||||
pip
|
||||
virtualenv
|
||||
pypi2nix
|
||||
cffi
|
||||
pyopenssl
|
||||
urllib3
|
||||
mistune
|
||||
|
||||
flask
|
||||
|
||||
pyaml
|
||||
] ++ [
|
||||
pkgs.libffi
|
||||
]);
|
||||
|
||||
staruml = callPackage ../../pkgs/staruml.nix { inherit (gnome2) GConf; libgcrypt = libgcrypt_1_5; };
|
||||
};
|
||||
};
|
||||
|
||||
home.sessionVariables = {
|
||||
GOPATH="$HOME/src/go";
|
||||
|
||||
PATH=pkgs.lib.concatStringsSep ":" [
|
||||
"$HOME/.local/bin"
|
||||
"$HOME/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin"
|
||||
"$HOME/.cargo/bin"
|
||||
"$HOME/.gem/ruby/2.3.0/bin"
|
||||
"$HOME/.npm-packages/bin"
|
||||
"$GOPATH/bin"
|
||||
"$PATH"
|
||||
];
|
||||
};
|
||||
|
||||
home.packages = []
|
||||
++ (with pkgs; [
|
||||
# Authentication
|
||||
cacert
|
||||
fprintd
|
||||
openssl
|
||||
mkpasswd
|
||||
|
||||
# Nix package related tools
|
||||
patchelf
|
||||
nix-index
|
||||
nox
|
||||
nix-prefetch-scripts
|
||||
|
||||
# Version Control Systems
|
||||
git-crypt
|
||||
unstablepkgs.pijul
|
||||
gitFull
|
||||
gitless
|
||||
mr
|
||||
|
||||
gitRepo
|
||||
|
||||
# Cloud/Remote System Management
|
||||
google-cloud-sdk
|
||||
ansible
|
||||
nixops
|
||||
unstablepkgs.terraform
|
||||
awscli
|
||||
hcloud
|
||||
|
||||
# Process/System Administration
|
||||
htop
|
||||
gnome3.gnome-tweak-tool
|
||||
xorg.xhost
|
||||
dmidecode
|
||||
python36Packages.glances
|
||||
evtest
|
||||
|
||||
# Archive Managers
|
||||
sshfsFuse
|
||||
xarchive
|
||||
p7zip
|
||||
zip
|
||||
unzip
|
||||
gzip
|
||||
lzop
|
||||
|
||||
# Password Management
|
||||
gnupg
|
||||
yubikey-neo-manager
|
||||
yubikey-personalization
|
||||
yubikey-personalization-gui
|
||||
gnome3.gnome_keyring
|
||||
gnome3.seahorse
|
||||
|
||||
# Security
|
||||
tpm-tools
|
||||
tpmmanager
|
||||
|
||||
# Web Browsers
|
||||
links2
|
||||
|
||||
# Language Support
|
||||
hunspellDicts.en-us
|
||||
hunspellDicts.de-de
|
||||
|
||||
# Messaging/Communication
|
||||
pidgin
|
||||
hexchat
|
||||
aspellDicts.en
|
||||
aspellDicts.de
|
||||
unstablepkgs.skype
|
||||
zoom-us
|
||||
unstablepkgs.bluejeans-gui
|
||||
thunderbird
|
||||
gnome3.evolution # gnome4.glib_networking
|
||||
tdesktop
|
||||
gnome3.cheese
|
||||
|
||||
# Virtualization
|
||||
virtmanager
|
||||
qemu
|
||||
# virtualbox
|
||||
vagrant
|
||||
unstablepkgs.rkt
|
||||
python27Packages.docker_compose
|
||||
# unstablepkgs.kubernetes
|
||||
unstablepkgs.minikube
|
||||
unstablepkgs.openshift
|
||||
# (unstablepkgs.minikube.overrideAttrs (oldAttrs: {
|
||||
# patches = oldAttrs.patches ++ [
|
||||
# (builtins.fetchurl { url ="https://patch-diff.githubusercontent.com/raw/kubernetes/minikube/pull/2517.diff"; })
|
||||
# ];
|
||||
# }))
|
||||
|
||||
# Remote Control Tools
|
||||
remmina
|
||||
freerdp
|
||||
x2goclient
|
||||
teamviewer
|
||||
|
||||
# Audio/Video Players
|
||||
ffmpeg
|
||||
vlc
|
||||
audacity
|
||||
spotify
|
||||
smtube
|
||||
python27Packages.youtube-dl-light
|
||||
screenkey
|
||||
quvi
|
||||
|
||||
# Network Tools
|
||||
openvpn
|
||||
tcpdump
|
||||
iftop
|
||||
iperf
|
||||
bind
|
||||
socat
|
||||
|
||||
# samba
|
||||
iptables
|
||||
nftables
|
||||
wireshark
|
||||
|
||||
# Code Editors
|
||||
xclip
|
||||
xsel
|
||||
unstablepkgs.vscode
|
||||
# (vscode-with-extensions.override {
|
||||
# # When the extension is already available in the default extensions set.
|
||||
# vscodeExtensions = with vscode-extensions; [
|
||||
# ]
|
||||
# # Concise version from the vscode market place when not available in the default set.
|
||||
# ++ vscode-utils.extensionsFromVscodeMarketplace [
|
||||
# {
|
||||
# name = "vsliveshare";
|
||||
# publisher = "MS-vsliveshare";
|
||||
# version = "0.3.198";
|
||||
# sha256 = "019ffyxca3qnqyz1fr7vh0plfdkc3ikr8v295z846lghvwlzjqdh";
|
||||
# }
|
||||
# ];
|
||||
# })
|
||||
|
||||
unstablepkgs.atom
|
||||
|
||||
# Image/Graphic/Design Tools
|
||||
gnome3.eog
|
||||
gimp
|
||||
imagemagick
|
||||
exiv2
|
||||
graphviz
|
||||
inkscape
|
||||
## barcode
|
||||
qrencode
|
||||
zbar
|
||||
feh
|
||||
# digikam
|
||||
|
||||
|
||||
# Modelling Tools
|
||||
plantuml
|
||||
umlet
|
||||
staruml
|
||||
eclipses.eclipse-modeling
|
||||
dia
|
||||
astah-community
|
||||
|
||||
# Misc Development Tools
|
||||
qrcode
|
||||
travis
|
||||
jq
|
||||
prometheus
|
||||
cdrtools
|
||||
|
||||
# Document Processing and Management
|
||||
unstablepkgs.zathura
|
||||
mendeley
|
||||
jabref
|
||||
zotero
|
||||
hugo
|
||||
pandoc
|
||||
|
||||
# LaTeX
|
||||
perlPackages.YAMLTiny
|
||||
perlPackages.FileHomeDir
|
||||
perlPackages.UnicodeLineBreak
|
||||
(texlive.combine {
|
||||
inherit (texlive)
|
||||
scheme-small
|
||||
texlive-de
|
||||
texlive-en
|
||||
texlive-scripts
|
||||
collection-langgerman
|
||||
|
||||
latexindent
|
||||
latexmk
|
||||
|
||||
algorithms
|
||||
cm-super
|
||||
|
||||
preprint
|
||||
enumitem
|
||||
draftwatermark
|
||||
everypage
|
||||
ulem
|
||||
placeins
|
||||
minted ifplatform fvextra xstring framed
|
||||
;
|
||||
})
|
||||
|
||||
pdftk
|
||||
masterpdfeditor
|
||||
|
||||
# File Synchronzation
|
||||
seafile-client
|
||||
syncthing
|
||||
grive2
|
||||
dropbox
|
||||
# gocryptfs
|
||||
# hubicfuse
|
||||
# s3ql
|
||||
# rclone
|
||||
rsync
|
||||
|
||||
# Filesystem Tools
|
||||
ntfs3g
|
||||
ddrescue
|
||||
ncdu
|
||||
unstablepkgs.woeusb
|
||||
unetbootin
|
||||
pcmanfm
|
||||
hdparm
|
||||
testdisk
|
||||
python27Packages.binwalk
|
||||
gptfdisk
|
||||
|
||||
# games
|
||||
zeroad
|
||||
|
||||
# Compilers & Toolchains
|
||||
autoconf
|
||||
automake
|
||||
libtool
|
||||
gcc
|
||||
pkgconfig
|
||||
binutils
|
||||
valgrind
|
||||
gdb
|
||||
cgdb
|
||||
man-pages
|
||||
gnumake
|
||||
shellcheck
|
||||
bazel
|
||||
|
||||
## Android
|
||||
androidsdk
|
||||
|
||||
## Java
|
||||
jre
|
||||
openjdk
|
||||
|
||||
## Ruby
|
||||
ruby
|
||||
|
||||
## Python
|
||||
myPython36
|
||||
pypi2nix
|
||||
|
||||
## Webdev
|
||||
nodejs-8_x
|
||||
npm2nix
|
||||
emscripten
|
||||
etcd
|
||||
sigal
|
||||
|
||||
# Code generators
|
||||
unstablepkgs.swagger-codegen
|
||||
|
||||
# Misc Desktop Tools
|
||||
ltunify
|
||||
solaar
|
||||
dex
|
||||
roxterm
|
||||
# kitty
|
||||
busyboxStatic
|
||||
xorg.xbacklight
|
||||
coreutils
|
||||
lsof
|
||||
pavucontrol
|
||||
x11_ssh_askpass
|
||||
xdotool
|
||||
xdg_utils
|
||||
xdg-user-dirs
|
||||
gnome3.dconf
|
||||
picocom
|
||||
glib.dev # contains gdbus tool
|
||||
|
||||
# Screen recording
|
||||
gtk-recordmydesktop # can't select the window
|
||||
qt-recordmydesktop
|
||||
vokoscreen
|
||||
shutter
|
||||
# kazam # doesn't start
|
||||
# xvidcap # doesn't keep the recording rectangle
|
||||
obs-studio
|
||||
shotcut
|
||||
openshot-qt
|
||||
]);
|
||||
}
|
161
nix/home-manager/configuration/removable-desktop.nix
Normal file
161
nix/home-manager/configuration/removable-desktop.nix
Normal file
|
@ -0,0 +1,161 @@
|
|||
{ pkgs
|
||||
, config,
|
||||
... }:
|
||||
|
||||
let
|
||||
# gitpkgs = import /home/steveej/src/github/NixOS/nixpkgs {};
|
||||
unstablepkgs = import <nixos-unstable> {};
|
||||
|
||||
in {
|
||||
imports = [
|
||||
../profiles/common.nix
|
||||
../profiles/qtile-desktop.nix
|
||||
../programs/emacs.nix
|
||||
../programs/firefox.nix
|
||||
../programs/chromium.nix
|
||||
../programs/homeshick.nix
|
||||
../programs/libreoffice.nix
|
||||
../programs/neovim.nix
|
||||
../programs/pass.nix
|
||||
../programs/zsh.nix
|
||||
];
|
||||
|
||||
nixpkgs.config = {
|
||||
pidgin = {
|
||||
openssl = true;
|
||||
gnutls = true;
|
||||
};
|
||||
|
||||
packageOverrides = pkgs: with pkgs; {
|
||||
myPython36 = python36Full.withPackages (ps: with ps; [
|
||||
pylint pep8 yapf flake8
|
||||
# autopep8 (broken)
|
||||
# pylint (broken)
|
||||
ipython
|
||||
llfuse
|
||||
dugong
|
||||
defusedxml
|
||||
wheel
|
||||
pip
|
||||
virtualenv
|
||||
pypi2nix
|
||||
cffi
|
||||
pyopenssl
|
||||
urllib3
|
||||
mistune
|
||||
|
||||
flask
|
||||
|
||||
pyaml
|
||||
] ++ [
|
||||
pkgs.libffi
|
||||
]);
|
||||
};
|
||||
};
|
||||
|
||||
home.sessionVariables = {
|
||||
};
|
||||
|
||||
home.packages = []
|
||||
++ (with pkgs; [
|
||||
# Authentication
|
||||
cacert
|
||||
fprintd
|
||||
openssl
|
||||
mkpasswd
|
||||
|
||||
# Nix package related tools
|
||||
patchelf
|
||||
nix-index
|
||||
nox
|
||||
nix-prefetch-scripts
|
||||
|
||||
# Version Control Systems
|
||||
git-crypt
|
||||
unstablepkgs.pijul
|
||||
gitFull
|
||||
gitless
|
||||
mr
|
||||
gitRepo
|
||||
|
||||
# Process/System Administration
|
||||
htop
|
||||
gnome3.gnome-tweak-tool
|
||||
xorg.xhost
|
||||
dmidecode
|
||||
python36Packages.glances
|
||||
evtest
|
||||
|
||||
# Archive Managers
|
||||
sshfsFuse
|
||||
xarchive
|
||||
p7zip
|
||||
zip
|
||||
unzip
|
||||
gzip
|
||||
lzop
|
||||
|
||||
# Password Management
|
||||
gnupg
|
||||
gnome3.gnome_keyring
|
||||
gnome3.seahorse
|
||||
|
||||
# Remote Control Tools
|
||||
remmina
|
||||
freerdp
|
||||
x2goclient
|
||||
|
||||
# Network Tools
|
||||
openvpn
|
||||
tcpdump
|
||||
iftop
|
||||
iperf
|
||||
bind
|
||||
socat
|
||||
|
||||
# samba
|
||||
iptables
|
||||
nftables
|
||||
wireshark
|
||||
|
||||
# Code Editors
|
||||
xclip
|
||||
xsel
|
||||
unstablepkgs.vscode
|
||||
|
||||
# Image/Graphic/Design Tools
|
||||
gnome3.eog
|
||||
gimp
|
||||
inkscape
|
||||
|
||||
# Misc Development Tools
|
||||
qrcode
|
||||
jq
|
||||
cdrtools
|
||||
|
||||
# Document Processing and Management
|
||||
unstablepkgs.zathura
|
||||
|
||||
# File Synchronzation
|
||||
rsync
|
||||
|
||||
# Filesystem Tools
|
||||
ntfs3g
|
||||
ddrescue
|
||||
ncdu
|
||||
unstablepkgs.woeusb
|
||||
unetbootin
|
||||
pcmanfm
|
||||
hdparm
|
||||
testdisk
|
||||
python27Packages.binwalk
|
||||
gptfdisk
|
||||
|
||||
androidsdk
|
||||
|
||||
## Python
|
||||
myPython36
|
||||
|
||||
busyboxStatic
|
||||
]);
|
||||
}
|
381
nix/home-manager/configuration/steveej-qtile-desktop.nix
Normal file
381
nix/home-manager/configuration/steveej-qtile-desktop.nix
Normal file
|
@ -0,0 +1,381 @@
|
|||
{ pkgs
|
||||
, config,
|
||||
... }:
|
||||
|
||||
let
|
||||
# gitpkgs = import /home/steveej/src/github/NixOS/nixpkgs {};
|
||||
unstablepkgs = import <nixos-unstable> {};
|
||||
|
||||
in {
|
||||
imports = [
|
||||
../profiles/common.nix
|
||||
../profiles/qtile-desktop.nix
|
||||
../programs/emacs.nix
|
||||
../programs/firefox.nix
|
||||
../programs/chromium.nix
|
||||
../programs/homeshick.nix
|
||||
../programs/libreoffice.nix
|
||||
../programs/neovim.nix
|
||||
../programs/pass.nix
|
||||
../programs/zsh.nix
|
||||
];
|
||||
|
||||
nixpkgs.config = {
|
||||
pidgin = {
|
||||
openssl = true;
|
||||
gnutls = true;
|
||||
};
|
||||
|
||||
packageOverrides = pkgs: with pkgs; {
|
||||
myPython36 = python36Full.withPackages (ps: with ps; [
|
||||
pylint pep8 yapf flake8
|
||||
# autopep8 (broken)
|
||||
# pylint (broken)
|
||||
ipython
|
||||
llfuse
|
||||
dugong
|
||||
defusedxml
|
||||
wheel
|
||||
pip
|
||||
virtualenv
|
||||
pypi2nix
|
||||
cffi
|
||||
pyopenssl
|
||||
urllib3
|
||||
mistune
|
||||
|
||||
flask
|
||||
|
||||
pyaml
|
||||
] ++ [
|
||||
pkgs.libffi
|
||||
]);
|
||||
|
||||
staruml = callPackage ../../pkgs/staruml.nix { inherit (gnome2) GConf; libgcrypt = libgcrypt_1_5; };
|
||||
};
|
||||
};
|
||||
|
||||
home.sessionVariables = {
|
||||
GOPATH="$HOME/src/go";
|
||||
|
||||
PATH=pkgs.lib.concatStringsSep ":" [
|
||||
"$HOME/.local/bin"
|
||||
"$HOME/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin"
|
||||
"$HOME/.cargo/bin"
|
||||
"$HOME/.gem/ruby/2.3.0/bin"
|
||||
"$HOME/.npm-packages/bin"
|
||||
"$GOPATH/bin"
|
||||
"$PATH"
|
||||
];
|
||||
};
|
||||
|
||||
home.packages = []
|
||||
++ (with pkgs; [
|
||||
# Authentication
|
||||
cacert
|
||||
fprintd
|
||||
openssl
|
||||
mkpasswd
|
||||
|
||||
# Nix package related tools
|
||||
patchelf
|
||||
nix-index
|
||||
nox
|
||||
nix-prefetch-scripts
|
||||
|
||||
# Version Control Systems
|
||||
git-crypt
|
||||
unstablepkgs.pijul
|
||||
gitFull
|
||||
gitless
|
||||
mr
|
||||
|
||||
gitRepo
|
||||
|
||||
# Cloud/Remote System Management
|
||||
google-cloud-sdk
|
||||
ansible
|
||||
nixops
|
||||
unstablepkgs.terraform
|
||||
awscli
|
||||
hcloud
|
||||
|
||||
# Process/System Administration
|
||||
htop
|
||||
gnome3.gnome-tweak-tool
|
||||
xorg.xhost
|
||||
dmidecode
|
||||
python36Packages.glances
|
||||
evtest
|
||||
|
||||
# Archive Managers
|
||||
sshfsFuse
|
||||
xarchive
|
||||
p7zip
|
||||
zip
|
||||
unzip
|
||||
gzip
|
||||
lzop
|
||||
|
||||
# Password Management
|
||||
gnupg
|
||||
yubikey-neo-manager
|
||||
yubikey-personalization
|
||||
yubikey-personalization-gui
|
||||
gnome3.gnome_keyring
|
||||
gnome3.seahorse
|
||||
|
||||
# Security
|
||||
tpm-tools
|
||||
tpmmanager
|
||||
|
||||
# Web Browsers
|
||||
links2
|
||||
|
||||
# Language Support
|
||||
hunspellDicts.en-us
|
||||
hunspellDicts.de-de
|
||||
|
||||
# Messaging/Communication
|
||||
pidgin
|
||||
hexchat
|
||||
aspellDicts.en
|
||||
aspellDicts.de
|
||||
unstablepkgs.skype
|
||||
zoom-us
|
||||
unstablepkgs.bluejeans-gui
|
||||
thunderbird
|
||||
gnome3.evolution # gnome4.glib_networking
|
||||
tdesktop
|
||||
gnome3.cheese
|
||||
|
||||
# Virtualization
|
||||
virtmanager
|
||||
qemu
|
||||
# virtualbox
|
||||
vagrant
|
||||
unstablepkgs.rkt
|
||||
python27Packages.docker_compose
|
||||
# unstablepkgs.kubernetes
|
||||
unstablepkgs.minikube
|
||||
unstablepkgs.openshift
|
||||
# (unstablepkgs.minikube.overrideAttrs (oldAttrs: {
|
||||
# patches = oldAttrs.patches ++ [
|
||||
# (builtins.fetchurl { url ="https://patch-diff.githubusercontent.com/raw/kubernetes/minikube/pull/2517.diff"; })
|
||||
# ];
|
||||
# }))
|
||||
|
||||
# Remote Control Tools
|
||||
remmina
|
||||
freerdp
|
||||
x2goclient
|
||||
teamviewer
|
||||
|
||||
# Audio/Video Players
|
||||
ffmpeg
|
||||
vlc
|
||||
audacity
|
||||
spotify
|
||||
smtube
|
||||
python27Packages.youtube-dl-light
|
||||
screenkey
|
||||
quvi
|
||||
|
||||
# Network Tools
|
||||
openvpn
|
||||
tcpdump
|
||||
iftop
|
||||
iperf
|
||||
bind
|
||||
socat
|
||||
|
||||
# samba
|
||||
iptables
|
||||
nftables
|
||||
wireshark
|
||||
|
||||
# Code Editors
|
||||
xclip
|
||||
xsel
|
||||
unstablepkgs.vscode
|
||||
# (vscode-with-extensions.override {
|
||||
# # When the extension is already available in the default extensions set.
|
||||
# vscodeExtensions = with vscode-extensions; [
|
||||
# ]
|
||||
# # Concise version from the vscode market place when not available in the default set.
|
||||
# ++ vscode-utils.extensionsFromVscodeMarketplace [
|
||||
# {
|
||||
# name = "vsliveshare";
|
||||
# publisher = "MS-vsliveshare";
|
||||
# version = "0.3.198";
|
||||
# sha256 = "019ffyxca3qnqyz1fr7vh0plfdkc3ikr8v295z846lghvwlzjqdh";
|
||||
# }
|
||||
# ];
|
||||
# })
|
||||
|
||||
unstablepkgs.atom
|
||||
|
||||
# Image/Graphic/Design Tools
|
||||
gnome3.eog
|
||||
gimp
|
||||
imagemagick
|
||||
exiv2
|
||||
graphviz
|
||||
inkscape
|
||||
## barcode
|
||||
qrencode
|
||||
zbar
|
||||
feh
|
||||
# digikam
|
||||
|
||||
|
||||
# Modelling Tools
|
||||
plantuml
|
||||
umlet
|
||||
staruml
|
||||
eclipses.eclipse-modeling
|
||||
dia
|
||||
astah-community
|
||||
|
||||
# Misc Development Tools
|
||||
qrcode
|
||||
travis
|
||||
jq
|
||||
prometheus
|
||||
cdrtools
|
||||
|
||||
# Document Processing and Management
|
||||
unstablepkgs.zathura
|
||||
mendeley
|
||||
jabref
|
||||
zotero
|
||||
hugo
|
||||
pandoc
|
||||
|
||||
# LaTeX
|
||||
perlPackages.YAMLTiny
|
||||
perlPackages.FileHomeDir
|
||||
perlPackages.UnicodeLineBreak
|
||||
(texlive.combine {
|
||||
inherit (texlive)
|
||||
scheme-small
|
||||
texlive-de
|
||||
texlive-en
|
||||
texlive-scripts
|
||||
collection-langgerman
|
||||
|
||||
latexindent
|
||||
latexmk
|
||||
|
||||
algorithms
|
||||
cm-super
|
||||
|
||||
preprint
|
||||
enumitem
|
||||
draftwatermark
|
||||
everypage
|
||||
ulem
|
||||
placeins
|
||||
minted ifplatform fvextra xstring framed
|
||||
;
|
||||
})
|
||||
|
||||
pdftk
|
||||
masterpdfeditor
|
||||
|
||||
# File Synchronzation
|
||||
seafile-client
|
||||
syncthing
|
||||
grive2
|
||||
dropbox
|
||||
# gocryptfs
|
||||
# hubicfuse
|
||||
# s3ql
|
||||
# rclone
|
||||
rsync
|
||||
|
||||
# Filesystem Tools
|
||||
ntfs3g
|
||||
ddrescue
|
||||
ncdu
|
||||
unstablepkgs.woeusb
|
||||
unetbootin
|
||||
pcmanfm
|
||||
hdparm
|
||||
testdisk
|
||||
python27Packages.binwalk
|
||||
gptfdisk
|
||||
|
||||
# games
|
||||
zeroad
|
||||
|
||||
# Compilers & Toolchains
|
||||
autoconf
|
||||
automake
|
||||
libtool
|
||||
gcc
|
||||
pkgconfig
|
||||
binutils
|
||||
valgrind
|
||||
gdb
|
||||
cgdb
|
||||
man-pages
|
||||
gnumake
|
||||
shellcheck
|
||||
bazel
|
||||
|
||||
## Android
|
||||
androidsdk
|
||||
|
||||
## Java
|
||||
jre
|
||||
openjdk
|
||||
|
||||
## Ruby
|
||||
ruby
|
||||
|
||||
## Python
|
||||
myPython36
|
||||
pypi2nix
|
||||
|
||||
## Webdev
|
||||
nodejs-8_x
|
||||
npm2nix
|
||||
emscripten
|
||||
etcd
|
||||
sigal
|
||||
|
||||
# Code generators
|
||||
unstablepkgs.swagger-codegen
|
||||
|
||||
# Misc Desktop Tools
|
||||
ltunify
|
||||
solaar
|
||||
dex
|
||||
roxterm
|
||||
# kitty
|
||||
busyboxStatic
|
||||
xorg.xbacklight
|
||||
coreutils
|
||||
lsof
|
||||
pavucontrol
|
||||
x11_ssh_askpass
|
||||
xdotool
|
||||
xdg_utils
|
||||
xdg-user-dirs
|
||||
gnome3.dconf
|
||||
picocom
|
||||
glib.dev # contains gdbus tool
|
||||
|
||||
# Screen recording
|
||||
gtk-recordmydesktop # can't select the window
|
||||
qt-recordmydesktop
|
||||
vokoscreen
|
||||
shutter
|
||||
# kazam # doesn't start
|
||||
# xvidcap # doesn't keep the recording rectangle
|
||||
obs-studio
|
||||
shotcut
|
||||
openshot-qt
|
||||
]);
|
||||
}
|
22
nix/home-manager/lib.nix
Normal file
22
nix/home-manager/lib.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
}:
|
||||
|
||||
let
|
||||
|
||||
in {
|
||||
mkSimpleTrayService = { execStart }: {
|
||||
Unit = {
|
||||
Description = "pasystray applet";
|
||||
After = [ "graphical-session-pre.target" ];
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
};
|
||||
|
||||
Install = {
|
||||
WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
|
||||
Service = {
|
||||
ExecStart = execStart;
|
||||
};
|
||||
};
|
||||
}
|
52
nix/home-manager/profiles/common.nix
Normal file
52
nix/home-manager/profiles/common.nix
Normal file
|
@ -0,0 +1,52 @@
|
|||
{ pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
in {
|
||||
programs.home-manager.enable = true;
|
||||
programs.home-manager.path = https://github.com/rycee/home-manager/archive/master.tar.gz;
|
||||
|
||||
nixpkgs.config = {
|
||||
allowBroken = true;
|
||||
allowUnfree = true;
|
||||
|
||||
# TODO: move this to a pkgs overlay
|
||||
packageOverrides = pkgs: with pkgs; {
|
||||
busyboxStatic = busybox.override {
|
||||
enableStatic = true;
|
||||
extraConfig = ''
|
||||
CONFIG_STATIC y
|
||||
CONFIG_INSTALL_APPLET_DONT y
|
||||
CONFIG_INSTALL_APPLET_SYMLINKS n
|
||||
'';
|
||||
};
|
||||
|
||||
dropbearStatic = dropbear.override {
|
||||
enableStatic = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home.keyboard = {
|
||||
layout = "us";
|
||||
variant = "altgr-intl";
|
||||
options = [
|
||||
"nodeadkeys"
|
||||
# "caps:swapescape"
|
||||
];
|
||||
};
|
||||
|
||||
programs.direnv.enable = true;
|
||||
|
||||
home.sessionVariables = {
|
||||
NIXPKGS_ALLOW_UNFREE = "1";
|
||||
# Don't create .pyc files.
|
||||
PYTHONDONTWRITEBYTECODE = "1";
|
||||
|
||||
HOMESHICK_DIR="${pkgs.homeshick}";
|
||||
};
|
||||
|
||||
programs.command-not-found.enable = true;
|
||||
programs.fzf.enable = true;
|
||||
}
|
278
nix/home-manager/profiles/qtile-desktop.nix
Normal file
278
nix/home-manager/profiles/qtile-desktop.nix
Normal file
|
@ -0,0 +1,278 @@
|
|||
{ pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (import ../lib.nix { })
|
||||
mkSimpleTrayService
|
||||
;
|
||||
|
||||
qtileConfig = pkgs.writeScript "config.py" ''
|
||||
from libqtile.config import Key, Screen, Group, Drag, Click
|
||||
from libqtile.command import lazy
|
||||
from libqtile import layout, bar, widget
|
||||
from libqtile import hook
|
||||
|
||||
import logging, os
|
||||
logger = logging.getLogger()
|
||||
logger.setLevel(logging.WARN)
|
||||
|
||||
handler = logging.handlers.RotatingFileHandler(
|
||||
os.path.join(os.getenv('HOME'), '.qtilelog'), maxBytes=10240000,
|
||||
backupCount=7
|
||||
)
|
||||
handler.setLevel(logging.WARN)
|
||||
logger.addHandler(handler)
|
||||
|
||||
@hook.subscribe.screen_change
|
||||
def restart_on_randr(qtile, ev):
|
||||
import time
|
||||
|
||||
with open(os.path.join(os.environ['HOME'], ".qtilelastrestart"), "w"):
|
||||
pass
|
||||
|
||||
lastRestart = 0
|
||||
with open(os.path.join(os.environ['HOME'], ".qtilelastrestart"), "r+") as lastRestartFile:
|
||||
lastRestartStr = lastRestartFile.read()
|
||||
if len(lastRestartStr) > 0:
|
||||
lastRestart = float(lastRestartStr)
|
||||
|
||||
print("screen changed. (last change: %s)" % lastRestart)
|
||||
|
||||
delta=time.time()-lastRestart
|
||||
if delta > 3:
|
||||
import subprocess
|
||||
lastRestartFile.seek(0)
|
||||
lastRestartFile.write("%s" % time.time())
|
||||
lastRestartFile.truncate()
|
||||
|
||||
subprocess.call(["autorandr","-c"])
|
||||
qtile.cmd_restart()
|
||||
else:
|
||||
print("screen is changing too fast: %s" % delta)
|
||||
|
||||
active_screen = 0
|
||||
@hook.subscribe.client_focus
|
||||
def focus_changed(window):
|
||||
global active_screen
|
||||
pass
|
||||
active_screen = window.group.screen.index
|
||||
|
||||
@hook.subscribe.current_screen_change
|
||||
def move_widget():
|
||||
global active_screen
|
||||
systray = widget.Systray()
|
||||
logging.warn("Screen changed to %i" % active_screen)
|
||||
|
||||
key_super = "mod4"
|
||||
key_alt = "mod1"
|
||||
key_control = "control"
|
||||
|
||||
keys = [
|
||||
# https://github.com/qtile/qtile/blob/develop/libqtile/xkeysyms.py
|
||||
Key([key_super], "Return", lazy.spawn("${pkgs.roxterm}/bin/roxterm")),
|
||||
Key([key_super], "backslash", lazy.spawn("${pkgs.roxterm}/bin/roxterm")),
|
||||
Key([key_super], "apostrophe", lazy.spawn("${pkgs.roxterm}/bin/roxterm")),
|
||||
Key([key_super], "r", lazy.spawncmd()),
|
||||
Key([key_super], "w", lazy.window.kill()),
|
||||
|
||||
# Key([key_alt, key_super], "l", lazy.spawn("xscreensaver-command -lock")),
|
||||
# Key([key_alt, key_super], "l", lazy.spawn("sh -c '(sleep 1; xset dpms force off) & xautolock -locknow'")),
|
||||
# Key([key_alt, key_super], "l", lazy.spawn("light-locker-command -l")),
|
||||
# Key([key_alt, key_super], "l", lazy.spawn("dm-tool lock")),
|
||||
Key([key_alt, key_super], "l", lazy.spawn('${pkgs.bash}/bin/sh -c "loginctl lock-session $XDG_SESSION_ID"')),
|
||||
Key([key_alt, key_super], "s", lazy.spawn("${pkgs.systemd}/bin/systemctl suspend")),
|
||||
|
||||
Key([key_super, key_control], "r", lazy.restart()),
|
||||
Key([key_super, key_control], "q", lazy.shutdown()),
|
||||
|
||||
# Toggle between different layouts as defined below
|
||||
Key([key_super], "Tab", lazy.next_layout()),
|
||||
|
||||
# MonadTall keybindings
|
||||
Key([key_super], "h", lazy.layout.left()),
|
||||
Key([key_super], "l", lazy.layout.right()),
|
||||
Key([key_super], "j", lazy.layout.down()),
|
||||
Key([key_super], "k", lazy.layout.up()),
|
||||
Key([key_super, key_control], "h", lazy.layout.shuffle_left()),
|
||||
Key([key_super, key_control], "l", lazy.layout.shuffle_right()),
|
||||
Key([key_super, key_control], "j", lazy.layout.shuffle_down()),
|
||||
Key([key_super, key_control], "k", lazy.layout.shuffle_up()),
|
||||
Key([key_super, key_control], "space", lazy.layout.toggle_split()),
|
||||
Key([key_control, key_alt], "h", lazy.layout.grow_left()),
|
||||
Key([key_control, key_alt], "j", lazy.layout.grow_down()),
|
||||
Key([key_control, key_alt], "k", lazy.layout.grow_up()),
|
||||
Key([key_control, key_alt], "l", lazy.layout.grow_right()),
|
||||
Key([key_super], "n", lazy.layout.normalize()),
|
||||
Key([key_super], "o", lazy.layout.maximize()),
|
||||
|
||||
# Stack
|
||||
Key([key_super], "h", lazy.layout.previous().when('stack')),
|
||||
Key([key_super], "l", lazy.layout.next().when('stack')),
|
||||
Key([key_super], "j", lazy.layout.up().when('stack')),
|
||||
Key([key_super], "k", lazy.layout.down().when('stack')),
|
||||
Key([key_super, key_control], "j", lazy.layout.shuffle_up().when('stack')),
|
||||
Key([key_super, key_control], "k", lazy.layout.shuffle_down().when('stack')),
|
||||
Key([key_super, key_control], "h", lazy.layout.client_to_previous().when('stack')),
|
||||
Key([key_super, key_control], "l", lazy.layout.client_to_next().when('stack')),
|
||||
|
||||
# Columns
|
||||
Key([key_super], "h", lazy.layout.left().when('columns')),
|
||||
Key([key_super], "l", lazy.layout.right().when('columns')),
|
||||
Key([key_super], "j", lazy.layout.down().when('columns')),
|
||||
Key([key_super], "k", lazy.layout.up().when('columns')),
|
||||
Key([key_super, key_control], "j", lazy.layout.shuffle_down().when('columns')),
|
||||
Key([key_super, key_control], "k", lazy.layout.shuffle_up().when('columns')),
|
||||
Key([key_super, key_control], "h", lazy.layout.shuffle_left().when('columns')),
|
||||
Key([key_super, key_control], "l", lazy.layout.shuffle_right().when('columns')),
|
||||
|
||||
# Max
|
||||
Key([key_super], "j", lazy.layout.next()),
|
||||
Key([key_super], "k", lazy.layout.previous()),
|
||||
|
||||
# Multimedia Keys
|
||||
Key([], "XF86AudioPlay", lazy.spawn("${pkgs.dbus}/bin/dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause")),
|
||||
Key([], "XF86AudioPrev", lazy.spawn("${pkgs.dbus}/bin/dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous")),
|
||||
Key([], "XF86AudioNext", lazy.spawn("${pkgs.dbus}/bin/dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next")),
|
||||
## Microsoft Comfort Curve specific
|
||||
Key([key_super, "shift"], "XF86TouchpadToggle", lazy.spawn("${pkgs.dbus}/bin/dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous")),
|
||||
Key([key_alt, key_super], "XF86TouchpadToggle", lazy.spawn("${pkgs.dbus}/bin/dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next")),
|
||||
|
||||
# FIXME: Backlight currently broken
|
||||
# Key([], "XF86MonBrightnessDown", lazy.spawn("xbacklight -inc -5")),
|
||||
# Key([], "XF86MonBrightnessUp", lazy.spawn("xbacklight -inc 5")),
|
||||
|
||||
Key([], "Print", lazy.spawn("${pkgs.flameshot}/bin/flameshot gui")),
|
||||
]
|
||||
groups = [Group(i) for i in "1234567890"]
|
||||
|
||||
for i in groups:
|
||||
# super + letter of group = switch to group
|
||||
keys.append(
|
||||
Key([key_super], i.name, lazy.group[i.name].toscreen())
|
||||
)
|
||||
|
||||
# super + shift + letter of group = switch to & move focused window to group
|
||||
keys.append(
|
||||
Key([key_super, key_control], i.name, lazy.window.togroup(i.name))
|
||||
)
|
||||
|
||||
layouts = [
|
||||
layout.Columns(num_columns=3, border_focus='#00ff00', border_width=2),
|
||||
layout.Max(),
|
||||
# layout.Stack(num_stacks=3, border_focus='#00ff00', border_width=2, autosplit=True, previous_on_rm=True),
|
||||
# layout.Wmii(border_focus='#00ff00'),
|
||||
# layout.MonadTall(ratio=0.6, border_focus='#00ff00'),
|
||||
]
|
||||
|
||||
widget_defaults = dict(
|
||||
font='Arial',
|
||||
fontsize=16,
|
||||
padding=3,
|
||||
)
|
||||
|
||||
screens_count = 4
|
||||
screens = []
|
||||
for i in range(0, screens_count+1):
|
||||
j = i+1
|
||||
widgets = [
|
||||
widget.TextBox("Screen %i" % j, name="Screen %i" % j),
|
||||
widget.GroupBox(),
|
||||
widget.WindowName(),
|
||||
widget.Prompt(),
|
||||
widget.CPUGraph(),
|
||||
widget.MemoryGraph(),
|
||||
widget.NetGraph(bandwidth_type='down'),
|
||||
widget.NetGraph(bandwidth_type='up'),
|
||||
widget.Clock(format='%Y-%m-%d %a %I:%M %p'),
|
||||
]
|
||||
if i is 0:
|
||||
widgets.insert(-1, widget.Systray())
|
||||
|
||||
screens.append(Screen(bottom=bar.Bar(widgets, 30)))
|
||||
|
||||
keys.append(Key([key_super, "shift"], "%i" % (i+1), lazy.to_screen(i)))
|
||||
|
||||
# subscribe.current_screen_change(func)
|
||||
|
||||
dgroups_key_binder = None
|
||||
dgroups_app_rules = []
|
||||
main = None
|
||||
follow_mouse_focus = False
|
||||
bring_front_click = True
|
||||
cursor_warp = False
|
||||
auto_fullscreen = True
|
||||
focus_on_window_activation = "urgent"
|
||||
|
||||
|
||||
# Drag floating layouts.
|
||||
mouse = [
|
||||
Drag([key_super,key_control], "Button1", lazy.window.set_position_floating(), start=lazy.window.get_position()),
|
||||
Drag([key_super,key_control], "Button2", lazy.window.set_size_floating(), start=lazy.window.get_size()),
|
||||
Click([key_super,key_control], "Button3", lazy.window.disable_floating())
|
||||
]
|
||||
floating_layout = layout.Floating()
|
||||
|
||||
wmname = "LG3D"
|
||||
'';
|
||||
in {
|
||||
systemd.user = {
|
||||
startServices = true;
|
||||
services = {
|
||||
redshift-gtk = mkSimpleTrayService {
|
||||
execStart = "${pkgs.redshift}/bin/redshift-gtk -v -l 47.6691:9.1698 -t 7000:4500 -m randr";
|
||||
};
|
||||
|
||||
pasystray = mkSimpleTrayService {
|
||||
execStart = "${pkgs.pasystray}/bin/pasystray";
|
||||
};
|
||||
|
||||
cbatticon = mkSimpleTrayService {
|
||||
execStart = "${pkgs.cbatticon}/bin/cbatticon";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
gnome-keyring.enable = true;
|
||||
blueman-applet.enable = true;
|
||||
screen-locker = {
|
||||
enable = true;
|
||||
inactiveInterval = 7;
|
||||
lockCmd = "${pkgs.xscreensaver}/bin/xscreensaver-command -lock";
|
||||
};
|
||||
xscreensaver.enable = true;
|
||||
network-manager-applet.enable = true;
|
||||
syncthing.enable = true;
|
||||
gpg-agent = {
|
||||
enable = true;
|
||||
enableScDaemon = true;
|
||||
enableSshSupport = true;
|
||||
grabKeyboardAndMouse = true;
|
||||
};
|
||||
flameshot.enable = true;
|
||||
};
|
||||
|
||||
xsession = {
|
||||
enable = true;
|
||||
windowManager.command = "${pkgs.qtile}/bin/qtile -c ${qtileConfig}";
|
||||
initExtra = ''
|
||||
${pkgs.autorandr}/bin/autorandr -c
|
||||
${pkgs.feh}/bin/feh --bg-scale ${pkgs.nixos-artwork.wallpapers.simple-blue}/share/artwork/gnome/nix-wallpaper-simple-blue.png
|
||||
'';
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
# X Tools/Libraries
|
||||
lightdm
|
||||
qtile
|
||||
xscreensaver
|
||||
gnome3.networkmanagerapplet
|
||||
autorandr
|
||||
arandr
|
||||
gnome3.gnome_themes_standard
|
||||
gnome3.adwaita-icon-theme
|
||||
lxappearance
|
||||
xorg.xcursorthemes
|
||||
];
|
||||
}
|
23
nix/home-manager/programs/chromium.nix
Normal file
23
nix/home-manager/programs/chromium.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
programs.chromium = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
nixpkgs.config = {
|
||||
chromium = {
|
||||
enablePepperPDF = true;
|
||||
enablePepperFlash = false;
|
||||
};
|
||||
};
|
||||
|
||||
programs.browserpass = {
|
||||
browsers = [
|
||||
"chromium"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
24
nix/home-manager/programs/emacs.nix
Normal file
24
nix/home-manager/programs/emacs.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{ pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
programs.emacs = {
|
||||
enable = true;
|
||||
extraPackages = epkgs: (with epkgs; [
|
||||
nix-mode
|
||||
magit # ; Integrate git <C-x g>
|
||||
zerodark-theme # ; Nicolas' theme
|
||||
undo-tree # ; <C-x u> to show the undo tree
|
||||
# zoom-frm # ; increase/decrease font size for all buffers %lt;C-x C-+>
|
||||
]) ++ (with epkgs.melpaPackages; [
|
||||
evil
|
||||
]) ++ (with epkgs.elpaPackages; [
|
||||
auctex # ; LaTeX mode
|
||||
beacon # ; highlight my cursor when scrolling
|
||||
nameless # ; hide current package name everywhere in elisp code
|
||||
]) ++ (with pkgs; [
|
||||
pkgs.notmuch # From main packages set
|
||||
]);
|
||||
};
|
||||
}
|
19
nix/home-manager/programs/firefox.nix
Normal file
19
nix/home-manager/programs/firefox.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
enableAdobeFlash = false;
|
||||
enableGoogleTalk = true;
|
||||
enableIcedTea = true;
|
||||
};
|
||||
|
||||
programs.browserpass = {
|
||||
browsers = [
|
||||
"firefox"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
38
nix/home-manager/programs/homeshick.nix
Normal file
38
nix/home-manager/programs/homeshick.nix
Normal file
|
@ -0,0 +1,38 @@
|
|||
{ pkgs
|
||||
, config
|
||||
, ...
|
||||
}:
|
||||
|
||||
let
|
||||
bootstrapRepos = pkgs.writeScript "bootstrapRepos" ''
|
||||
set -e
|
||||
echo home-manager path is ${config.home.path}
|
||||
echo home is $HOME
|
||||
|
||||
source ${pkgs.homeshick}/homeshick.sh
|
||||
type homeshick
|
||||
|
||||
# echo Updating homeshick
|
||||
# ln -sfT ${pkgs.homeshick} "$HOMESICK_REPOS"/.homeshick
|
||||
# mv -Tf "$HOMESICK_REPOS"/{.,}homeshick
|
||||
'';
|
||||
|
||||
in {
|
||||
home.sessionVariables = {
|
||||
HOMESHICK_DIR="${pkgs.homeshick}";
|
||||
};
|
||||
|
||||
home.activation.bootstrapRepos = config.lib.dag.entryAfter ["writeBoundary"] ''
|
||||
$DRY_RUN_CMD ${bootstrapRepos}
|
||||
'';
|
||||
|
||||
nixpkgs.config = {
|
||||
|
||||
packageOverrides = pkgs: with pkgs; {
|
||||
homeshick = builtins.fetchGit {
|
||||
url = "https://github.com/andsens/homeshick.git";
|
||||
ref = "master";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
14
nix/home-manager/programs/libreoffice.nix
Normal file
14
nix/home-manager/programs/libreoffice.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{ pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
home.sessionVariables = {
|
||||
# Workaround for Libreoffice to force gtk3
|
||||
SAL_USE_VCLPLUGIN = "gtk3";
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
libreoffice-fresh
|
||||
];
|
||||
}
|
152
nix/home-manager/programs/neovim.nix
Normal file
152
nix/home-manager/programs/neovim.nix
Normal file
|
@ -0,0 +1,152 @@
|
|||
{ pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
unstablepkgs = import <nixos-unstable> {};
|
||||
|
||||
in {
|
||||
home.sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
};
|
||||
|
||||
nixpkgs.config = {
|
||||
pidgin = {
|
||||
openssl = true;
|
||||
gnutls = true;
|
||||
};
|
||||
|
||||
packageOverrides = pkgs: with pkgs; {
|
||||
neovim = unstablepkgs.neovim;
|
||||
vimPlugins = unstablepkgs.vimPlugins;
|
||||
};
|
||||
};
|
||||
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
|
||||
extraPythonPackages = (ps: with ps; [ ]);
|
||||
extraPython3Packages = (ps: with ps; [ ]);
|
||||
|
||||
configure = {
|
||||
customRC = builtins.readFile ./neovim/vimrc;
|
||||
vam = {
|
||||
knownPlugins = with pkgs; vimPlugins // {
|
||||
delimitMate = vimUtils.buildVimPlugin {
|
||||
name = "delimitMate-vim";
|
||||
src = fetchFromGitHub {
|
||||
owner = "Raimondi";
|
||||
repo = "delimitMate";
|
||||
rev = "728b57a6564c1d2bdfb9b9e0f2f8c5ba3d7e0c5c";
|
||||
sha256 = "0fskm9gz81dk8arcidrm71mv72a7isng1clssqkqn5wnygbiimsn";
|
||||
};
|
||||
buildInputs = [ zip vim ];
|
||||
};
|
||||
|
||||
yaml-folds = vimUtils.buildVimPlugin {
|
||||
name = "vim-yaml-folds";
|
||||
src = fetchFromGitHub {
|
||||
owner = "pedrohdz";
|
||||
repo = "vim-yaml-folds";
|
||||
rev = "0672d9a3b685b51b4c49d8716c2ad4e27cfa5abd";
|
||||
sha256 = "0yp2jgaqiria79lh75fkrs77rw7nk518bq63w9bvyy814i7s4scn";
|
||||
};
|
||||
buildInputs = [ zip vim ];
|
||||
};
|
||||
|
||||
vim-markdown-toc = vimUtils.buildVimPlugin {
|
||||
name = "vim-markdown-toc";
|
||||
src = fetchFromGitHub {
|
||||
owner = "mzlogin";
|
||||
repo = "vim-markdown-toc";
|
||||
rev = "a6e227023f405a7c39590a8aaf0d54dde5614a2e";
|
||||
sha256 = "1vpsnjzc7hvrkp6mq68myxl3k1x363iif58rrd17njcsa4jh1zwy";
|
||||
};
|
||||
};
|
||||
vim-perl = vimUtils.buildVimPlugin {
|
||||
name = "vim-perl";
|
||||
src = fetchFromGitHub {
|
||||
owner = "vim-perl";
|
||||
repo = "vim-perl";
|
||||
rev = "21d0a0d795336acf8a9306da35f379c32cfc5e08";
|
||||
sha256 = "0f2sa0v3djd89k16n4saji9n7grziyhkljq75dskcbv8r19m8i1j";
|
||||
};
|
||||
};
|
||||
|
||||
git-blame = vimUtils.buildVimPlugin {
|
||||
name = "git-blame";
|
||||
src = fetchFromGitHub {
|
||||
"owner" = "zivyangll";
|
||||
"repo" = "git-blame.vim";
|
||||
"rev" = "a5b666840eead1b1ea1c351038da6ce026716bb6";
|
||||
"sha256" = "181siphb87yzln9433159ssa6vmm1h2dd0kqhlx7bgsi51gng4rv";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
pluginDictionaries = let
|
||||
default = [
|
||||
"delimitMate"
|
||||
"vim-airline"
|
||||
"ctrlp"
|
||||
"vim-css-color"
|
||||
"rainbow_parentheses"
|
||||
"vim-colorschemes"
|
||||
"vim-colorstepper"
|
||||
"vim-signify"
|
||||
"fugitive"
|
||||
"ctrlp"
|
||||
"vim-indent-guides"
|
||||
"UltiSnips"
|
||||
"fzfWrapper"
|
||||
|
||||
"ncm2"
|
||||
"ncm2-bufword"
|
||||
"ncm2-path"
|
||||
"ncm2-tmux"
|
||||
"ncm2-ultisnips"
|
||||
"nvim-yarp"
|
||||
|
||||
"LanguageClient-neovim"
|
||||
|
||||
"Improved-AnsiEsc"
|
||||
"tabular"
|
||||
"git-blame"
|
||||
|
||||
# Nix
|
||||
"vim-addon-nix"
|
||||
"vim-addon-vim2nix"
|
||||
|
||||
# LaTeX
|
||||
"vim-latex-live-preview"
|
||||
"vimtex"
|
||||
|
||||
# YAML
|
||||
"yaml-folds"
|
||||
|
||||
# Perl
|
||||
# "vim-perl"
|
||||
|
||||
|
||||
# markdown
|
||||
"vim-markdown"
|
||||
"vim-markdown-toc"
|
||||
|
||||
# misc syntax support
|
||||
"vim-bazel"
|
||||
];
|
||||
in [
|
||||
{ names = default; }
|
||||
{ names = default ++ [
|
||||
];
|
||||
filename_regex = ".*\.nix\$";
|
||||
}
|
||||
{ names = default ++ [
|
||||
];
|
||||
filename_regex = ".*\.tex\$";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
246
nix/home-manager/programs/neovim/vimrc
Normal file
246
nix/home-manager/programs/neovim/vimrc
Normal file
|
@ -0,0 +1,246 @@
|
|||
set nocompatible
|
||||
set mouse=
|
||||
|
||||
" Enable Elite mode, No ARRRROWWS!!!!
|
||||
let g:elite_mode=1
|
||||
if get(g:, 'elite_mode')
|
||||
nnoremap <Up> :resize +2<CR>
|
||||
nnoremap <Down> :resize -2<CR>
|
||||
nnoremap <Left> :vertical resize +2<CR>
|
||||
nnoremap <Right> :vertical resize -2<CR>
|
||||
endif
|
||||
|
||||
nnoremap <expr>K getline('.')[col('.')-1]==' ' ? "r<CR>" : "i<CR><Esc>"
|
||||
|
||||
" Enable highlighting of the current line
|
||||
set cursorline
|
||||
|
||||
" leader
|
||||
let mapleader = ','
|
||||
let maplocalleader = ','
|
||||
|
||||
" save on ctrl-s
|
||||
nnoremap <c-s> :w<CR>
|
||||
inoremap <c-s> <Esc>:w<CR>
|
||||
|
||||
set hidden
|
||||
syntax on
|
||||
set hlsearch
|
||||
set ignorecase
|
||||
set smartcase
|
||||
set number
|
||||
|
||||
" mappings to stop insert mode
|
||||
imap jjj <ESC>
|
||||
imap kkk <ESC>
|
||||
imap lll <ESC>
|
||||
imap hhh <ESC>
|
||||
set scroll=11
|
||||
|
||||
" new mappings
|
||||
noremap <C-j> <C-f>
|
||||
noremap <C-k> <C-u>
|
||||
|
||||
noremap <C-n> :tabn<CR>
|
||||
noremap <C-p> :tabp<CR>
|
||||
let g:ctrlp_map = '<tab>'
|
||||
set wildignore+=*/site/*,*.so,*.swp,*.zip
|
||||
let g:ctrlp_custom_ignore = {
|
||||
\ 'dir': '\v[\/]\.(git|hg|svn|)$$',
|
||||
\ 'file': '\v\.(exe|so|dll)$$',
|
||||
\ }
|
||||
|
||||
"let g:ctrlp_match_func = { 'match': 'pymatcher#PyMatch' }
|
||||
"let g:pydiction_location = '~/.vim/bundle/pydiction/complete-dict'
|
||||
|
||||
" allways show status line
|
||||
set ls=2
|
||||
set tabstop=4
|
||||
set shiftwidth=4
|
||||
set softtabstop=4
|
||||
set expandtab
|
||||
"set textwidth=80
|
||||
|
||||
set backspace=indent,eol,start
|
||||
|
||||
set wildignore+=*/site/*,*.so,*.swp,*.zip
|
||||
let g:ctrlp_custom_ignore = {
|
||||
\ 'dir': '\v[\/]\.(git|hg|svn|)$$',
|
||||
\ 'file': '\v\.(exe|so|dll)$$',
|
||||
\ }
|
||||
" }
|
||||
|
||||
" spelling {{{
|
||||
au BufRead,BufNewFile *.txt,*.tex,*.md,*.markdown setlocal spell spelllang=en_us,de_de
|
||||
" }}}
|
||||
|
||||
" sync default register to clipboard {
|
||||
if has('unnamedplus')
|
||||
set clipboard=unnamedplus
|
||||
else
|
||||
set clipboard=unnamed
|
||||
endif
|
||||
" }
|
||||
|
||||
" colored brackets {
|
||||
let g:rbpt_colorpairs = [
|
||||
\ ['brown', 'RoyalBlue3'],
|
||||
\ ['Darkblue', 'SeaGreen3'],
|
||||
\ ['darkgray', 'DarkOrchid3'],
|
||||
\ ['darkgreen', 'firebrick3'],
|
||||
\ ['darkcyan', 'RoyalBlue3'],
|
||||
\ ['darkred', 'SeaGreen3'],
|
||||
\ ['darkmagenta', 'DarkOrchid3'],
|
||||
\ ['brown', 'firebrick3'],
|
||||
\ ['gray', 'RoyalBlue3'],
|
||||
\ ['black', 'SeaGreen3'],
|
||||
\ ['darkmagenta', 'DarkOrchid3'],
|
||||
\ ['Darkblue', 'firebrick3'],
|
||||
\ ['darkgreen', 'RoyalBlue3'],
|
||||
\ ['darkcyan', 'SeaGreen3'],
|
||||
\ ['darkred', 'DarkOrchid3'],
|
||||
\ ['red', 'firebrick3'],
|
||||
\ ]
|
||||
let g:rbpt_max = 16
|
||||
let g:rbpt_loadcmd_toggle = 0
|
||||
|
||||
au VimEnter * RainbowParenthesesToggle
|
||||
au Syntax * RainbowParenthesesLoadRound
|
||||
au Syntax * RainbowParenthesesLoadSquare
|
||||
au Syntax * RainbowParenthesesLoadBraces
|
||||
" }
|
||||
|
||||
set t_ut=
|
||||
colorscheme PaperColor
|
||||
|
||||
" Python {{{
|
||||
augroup ft_python
|
||||
au!
|
||||
au FileType python setlocal omnifunc=pythoncomplete#Complete
|
||||
au FileType python setlocal define=^\s*\\(def\\\\|class\\)
|
||||
augroup END
|
||||
" }}}
|
||||
|
||||
" YAML {{{
|
||||
augroup ft_yaml
|
||||
au!
|
||||
setlocal autoindent sw=2 et tabstop=2 shiftwidth=2 softtabstop=2
|
||||
augroup END
|
||||
" }}}
|
||||
|
||||
" markdown {
|
||||
augroup filetypedetect
|
||||
" gitit page files
|
||||
au BufRead,BufNewFile *.page set filetype=markdown
|
||||
augroup END
|
||||
|
||||
|
||||
" Cycle between the valid list item markers *, - and + in the TOC
|
||||
let g:vmt_cycle_list_item_markers = 1
|
||||
|
||||
" } markdown
|
||||
|
||||
let g:indent_guides_enable_on_vim_startup = 1
|
||||
|
||||
|
||||
"bazel
|
||||
augroup filetypedetect
|
||||
au BufRead,BufNewFile *.bazel set filetype=bzl
|
||||
augroup END
|
||||
|
||||
"Justfile
|
||||
augroup filetypedetect
|
||||
au BufRead,BufNewFile Justfile set filetype=make
|
||||
augroup END
|
||||
|
||||
|
||||
augroup VCenterCursor
|
||||
au!
|
||||
au BufEnter,WinEnter,WinNew,VimResized *,*.*
|
||||
\ let &scrolloff=winheight(win_getid())/2
|
||||
augroup END
|
||||
|
||||
" " deoplete {
|
||||
" let g:deoplete#enable_at_startup = 1
|
||||
" let g:deoplete#num_processes = 1
|
||||
" let g:deoplete#enable_smart_case = 1
|
||||
"
|
||||
" if !exists('g:deoplete#omni#input_patterns')
|
||||
" let g:deoplete#omni#input_patterns = {}
|
||||
" endif
|
||||
" let g:deoplete#omni#input_patterns.tex = g:vimtex#re#deoplete
|
||||
" " } deoplete
|
||||
|
||||
" enable ncm2 for all buffers
|
||||
autocmd BufEnter * call ncm2#enable_for_buffer()
|
||||
set completeopt=noinsert,menuone,noselect
|
||||
|
||||
" LanguageClient {
|
||||
set hidden
|
||||
|
||||
let g:LanguageClient_serverCommands = {
|
||||
\ 'rust': ['rustup', 'run', 'stable', 'rls'],
|
||||
\ 'javascript.jsx': ['tcp://127.0.0.1:2089'],
|
||||
\ }
|
||||
" \ 'javascript': ['/usr/local/bin/javascript-typescript-stdio'],
|
||||
" \ 'python': ['/usr/local/bin/pyls'],
|
||||
nnoremap <F5> :call LanguageClient_contextMenu()<CR>
|
||||
" Or map each action separately
|
||||
nnoremap <silent> K :call LanguageClient#textDocument_hover()<CR>
|
||||
nnoremap <silent> gd :call LanguageClient#textDocument_definition()<CR>
|
||||
nnoremap <silent> <F2> :call LanguageClient#textDocument_rename()<CR>
|
||||
" }
|
||||
|
||||
let g:vimtex_view_method = 'zathura'
|
||||
let g:vimtex_complete_enabled = 1
|
||||
let g:vimtex_complete_close_braces = 1
|
||||
let g:vimtex_complete_recursive_bib = 1
|
||||
let g:vimtex_indent_enabled = 1
|
||||
let g:vimtex_indent_bib_enabled = 1
|
||||
let g:vimtex_fold_enabled = 1
|
||||
let g:vimtex_fold_comments = 1
|
||||
let g:vimtex_fold_preamble = 1
|
||||
let g:vimtex_compiler_latexmk = {
|
||||
\ 'options' : [
|
||||
\ '-shell-escape',
|
||||
\ '-pdf',
|
||||
\ '-verbose',
|
||||
\ '-file-line-error',
|
||||
\ '-synctex=1',
|
||||
\ '-interaction=nonstopmode',
|
||||
\ ],
|
||||
\}
|
||||
let g:vimtex_quickfix_latexlog = {
|
||||
\ 'default' : 1,
|
||||
\ 'general' : 1,
|
||||
\ 'references' : 1,
|
||||
\ 'overfull' : 0,
|
||||
\ 'underfull' : 0,
|
||||
\ 'font' : 0,
|
||||
\ 'packages' : {
|
||||
\ 'default' : 1,
|
||||
\ 'natbib' : 1,
|
||||
\ 'biblatex' : 1,
|
||||
\ 'babel' : 1,
|
||||
\ 'hyperref' : 1,
|
||||
\ 'scrreprt' : 1,
|
||||
\ 'fixltx2e' : 1,
|
||||
\ 'titlesec' : 1,
|
||||
\ },
|
||||
\}
|
||||
|
||||
function! ViewerCallback() dict
|
||||
call self.forward_search(self.out())
|
||||
endfunction
|
||||
let g:vimtex_view_zathura_hook_callback = 'ViewerCallback'
|
||||
let g:vimtex_view_general_callback = 'ViewerCallback'
|
||||
let g:vimtex_compiler_progname = '${pkgs.neovim-remote}/bin/nvr'
|
||||
" } latex
|
||||
|
||||
" terminal {
|
||||
tnoremap <Esc> <C-\><C-n>
|
||||
" } terminal
|
||||
|
||||
" allow per-project vimrc
|
||||
" TODO: only source if it exists
|
||||
" source .vimrc
|
24
nix/home-manager/programs/pass.nix
Normal file
24
nix/home-manager/programs/pass.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{ pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
{
|
||||
home.sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
|
||||
# required by pass-otp
|
||||
PASSWORD_STORE_EXTENSIONS_DIR = "$HOME/.nix-profile/lib/password-store/extensions";
|
||||
PASSWORD_STORE_ENABLE_EXTENSIONS = "true";
|
||||
};
|
||||
|
||||
programs.browserpass = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
pass-otp
|
||||
qtpass
|
||||
rofi-pass
|
||||
];
|
||||
}
|
||||
|
79
nix/home-manager/programs/zsh.nix
Normal file
79
nix/home-manager/programs/zsh.nix
Normal file
|
@ -0,0 +1,79 @@
|
|||
{ pkgs
|
||||
, config
|
||||
, ...
|
||||
}:
|
||||
|
||||
let
|
||||
in {
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
|
||||
# will be called again by oh-my-zsh
|
||||
enableCompletion = false;
|
||||
enableAutosuggestions = true;
|
||||
initExtra = ''
|
||||
PROMPT='%F{%(!.red.green)}%n%f@%m %(?.%F{green}✓%f.%F{red}✗ ($?%))%f %F{blue}%~%f %F{magenta}$(git_prompt_info)%f
|
||||
%_%F{%(!.red.green)}$(prompt_char)%f '
|
||||
RPROMPT=""
|
||||
|
||||
# Automatic rehash
|
||||
zstyle ':completion:*' rehash true
|
||||
|
||||
if [ -f $HOME/.shrc.d/sh_aliases ]; then
|
||||
. $HOME/.shrc.d/sh_aliases
|
||||
fi
|
||||
|
||||
source ${pkgs.homeshick}/homeshick.sh
|
||||
fpath=(${pkgs.homeshick}/completions $fpath)
|
||||
|
||||
# Disable intercepting of ctrl-s and ctrl-q as flow control.
|
||||
stty stop ''' -ixoff -ixon
|
||||
|
||||
# don't cd into directories when executed
|
||||
unsetopt AUTO_CD
|
||||
'';
|
||||
|
||||
sessionVariables = {
|
||||
# Add more envrionment variables here
|
||||
};
|
||||
|
||||
plugins = [
|
||||
{
|
||||
# will source zsh-autosuggestions.plugin.zsh
|
||||
name = "zsh-autosuggestions";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "zsh-users";
|
||||
repo = "zsh-autosuggestions";
|
||||
rev = "v0.4.0";
|
||||
sha256 = "0z6i9wjjklb4lvr7zjhbphibsyx51psv50gm07mbb0kj9058j6kc";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "enhancd";
|
||||
file = "init.sh";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "b4b4r07";
|
||||
repo = "enhancd";
|
||||
rev = "v2.2.1";
|
||||
sha256 = "0iqa9j09fwm6nj5rpip87x3hnvbbz9w9ajgm6wkrd5fls8fn8i5g";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "pass";
|
||||
src = "${pkgs.oh-my-zsh}/share/oh-my-zsh/plugins/pass";
|
||||
}
|
||||
{
|
||||
name = "minikube";
|
||||
src = "${pkgs.oh-my-zsh}/share/oh-my-zsh/plugins/minikube";
|
||||
}
|
||||
];
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
theme = "tjkirch";
|
||||
plugins = [
|
||||
"git"
|
||||
"sudo"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue