This commit is contained in:
Tim Schubert 2020-08-01 15:46:33 +02:00
parent b7b348c163
commit 3d86adb45f
Signed by: dadada
GPG key ID: EEB8D1CE62C4DFEA
41 changed files with 124 additions and 81 deletions

View file

@ -1,44 +0,0 @@
{ config, pkgs, ... }:
let
colors = import ./colors.nix;
in {
imports = [
./vim
./tmux.nix
./zsh.nix
(import ./termite.nix {
config = config;
pkgs = pkgs;
colors = colors;
})
./gpg.nix
./ssh.nix
./git.nix
./gtk.nix
./xdg.nix
(import ./mako.nix {
config = config;
pkgs = pkgs;
colors = colors;
})
];
systemd.user.services = {
auto-source-volume = {
Unit = {
Description = "Revert setting volume of microphone";
Documentation = [ "man(1)pacmd" ];
BindsTo = "pulseaudio.service";
};
Service = {
ExecStart = "/bin/sh %h/bin/auto-source-volume.sh";
Type = "simple";
};
Install = {
WantedBy = [ "default.target" ];
};
};
};
}

26
modules/common.nix Normal file
View file

@ -0,0 +1,26 @@
{ config, pkgs, ... }:
let
colors = import ./colors.nix;
in {
imports = [
./vim
./tmux.nix
./zsh.nix
(import ./termite.nix {
config = config;
pkgs = pkgs;
colors = colors;
})
./gpg.nix
./ssh.nix
./git.nix
./gtk.nix
./xdg.nix
(import ./mako.nix {
config = config;
pkgs = pkgs;
colors = colors;
})
./keyring.nix
];
}

View file

@ -9,9 +9,6 @@
font.package = pkgs.cantarell-fonts;
font.name = "Cantarell";
};
dconf.settings."org/gnome/desktop/interface" = {
enable-animations = false;
};
qt = {
enable = true;
platformTheme = "gtk";

7
modules/keyring.nix Normal file
View file

@ -0,0 +1,7 @@
{ config, ... }:
{
services.gnome-keyring = {
enable = true;
components = [ "pkcs11" "secrets" "ssh" ];
};
}

View file

@ -1,22 +1,23 @@
{ config, pkgs, lib, ... }:
let
userEnv = {
XDISPLAY=":0";
TERMINAL="xterm-256color";
EDITOR = "vim";
PAGER = "less";
MAILDIR = "\$HOME/.var/mail";
MBLAZE = "\$HOME/.config/mblaze";
NOTMUCH_CONFIG = "\$HOME/.config/notmuch/config";
GDK_BACKEND= "x11";
#GDK_BACKEND= "x11";
MOZ_ENABLE_WAYLAND= "1";
SSH_ASKPASS = "${pkgs.lxqt.lxqt-openssh-askpass}/bin/lxqt-openssh-askpass";
};
unstable = import <nixpkgs-unstable> {};
in
{
imports = [
./common.nix
./private/metis
];
# Let Home Manager install and manage itself.
@ -25,7 +26,12 @@ in
home.sessionVariables = userEnv;
systemd.user.sessionVariables = userEnv;
home.packages = with pkgs; [
sqlite
clang
gitAndTools.git-bug
pypi2nix
libnotify
aspellDicts.en
aspellDicts.de
@ -50,7 +56,6 @@ in
nfs-utils
lsof
samba
firefox-bin
chromium
bc
brightnessctl
@ -64,10 +69,10 @@ in
ldns
libreoffice
mblaze
mpv
nmap
pass
pavucontrol
clang-tools
pinentry
playerctl
i3blocks
@ -77,8 +82,7 @@ in
sshfs-fuse
tdesktop
#texlive.combined.scheme-full
thunderbird-bin
tor-browser-bundle-bin
#tor-browser-bundle-bin
virtmanager
whois
youtube-dl
@ -100,13 +104,20 @@ in
bemenu
xss-lock
htop
gnome3.nautilus
gnome3.eog
imagemagick
corefonts
mpv
firefox-bin
] ++ (with unstable; [
thunderbird-bin
python38Packages.managesieve
android-studio
cachix
keepassxc
signal-desktop
libguestfs
minecraft
]);
services.syncthing = {
@ -120,18 +131,6 @@ in
lockCmd = "~/bin/lock-session";
};
xdg = {
enable = true;
userDirs = {
download ="\$HOME/tmp";
music = "\$HOME/lib/music";
videos ="\$HOME/lib/videos";
pictures = "\$HOME/lib/pictures";
documents = "\$HOME/lib";
desktop = "$HOME/tmp";
};
};
# This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage
# when a new Home Manager release introduces backwards

25
modules/profile.nix Normal file
View file

@ -0,0 +1,25 @@
{ config, pkgs, lib, ... }:
{
programs.bash = {
enable = true;
profileExtra = ''
export TERM="xterm-256color"
export EDITOR="vim"
alias gst="git status"
alias gco="git commit";
alias glo="git log";
alias gad="git add";
alias ls="exa";
alias ll="exa -l";
alias la="exa -la";
alias mv="mv -i";
alias cp="cp -i";
'';
};
home.packages = [
pkgs.exa
pkgs.fzf
];
}

View file

@ -2,8 +2,5 @@
{
programs.ssh = {
enable = true;
extraConfig = ''
AddKeysToAgent yes
'';
};
}

View file

@ -162,10 +162,10 @@ bindsym $mod+m mode "$mode_move"
mode "$mode_move" {
# move focused container
bindsym h move left
bindsym j move down
bindsym k move up
bindsym l move right
bindsym h move left ;mode "default"
bindsym j move down ;mode "default"
bindsym k move up ;mode "default"
bindsym l move right;mode "default"
bindsym 1 move container to workspace number $1 ;mode "default"
bindsym 2 move container to workspace number $2 ;mode "default"
bindsym 3 move container to workspace number $3 ;mode "default"

View file

Before

Width:  |  Height:  |  Size: 342 KiB

After

Width:  |  Height:  |  Size: 342 KiB

Before After
Before After

View file

@ -35,6 +35,7 @@ in
#pkgs.vimPlugins.vim-gnupg
#pkgs.vimPlugins.vim-l9
pkgs.vimPlugins.vim-ledger
#pkgs.vimPlugins.clang_complete
];
};
}

View file

@ -0,0 +1,11 @@
let b:ale_fixers = ['clang-format', 'remove_trailing_lines', 'trim_whitespace']
let b:ale_linters = ['clangd']
"setlocal tabstop=8 expandtab shiftwidth=2 smarttab
" GNU Coding Standards
setlocal cindent
setlocal cinoptions=>4,n-2,{2,^-2,:2,=2,g0,h2,p5,t0,+2,(0,u0,w1,m1
setlocal shiftwidth=2
setlocal softtabstop=2
setlocal textwidth=79
setlocal fo-=ro fo+=cql

View file

@ -119,6 +119,8 @@ nmap <leader>?? :ALEHover<Enter>
" This setting must be set before ALE is loaded.
let g:ale_completion_enabled = 1
let g:ale_fix_on_save = 1
let g:ale_warn_about_trailing_whitespace = 1
let g:ale_warn_about_trailing_lines = 1
let g:ale_completion_tsserver_autoimport = 1

View file

@ -21,10 +21,18 @@ in {
xdg = {
enable = true;
mimeApps = {
enable = true;
enable = false;
associations.added = apps;
defaultApplications = apps;
};
userDirs = {
download ="\$HOME/tmp";
music = "\$HOME/lib/music";
videos ="\$HOME/lib/videos";
pictures = "\$HOME/lib/pictures";
documents = "\$HOME/lib";
desktop = "$HOME/tmp";
};
};
home.packages = with pkgs; [
firefox-bin

View file

@ -23,8 +23,12 @@
source ~/.nix-profile/share/zsh-git-prompt/zshrc.sh
source ~/.nix-profile/share/fzf/key-bindings.zsh
source ~/.nix-profile/share/fzf/completion.zsh
PROMPT='%F{red}%?%f %F{green}%m%f:%F{blue}%~%f '
preexec() { echo -n -e "\033]0;$1\007" }
PROMPT="%F{red}%?%f %F{green}%m%f:%F{blue}%~%f "
RPROMPT='$(git_super_status)'
#NIX_BUILD_SHELL="${pkgs.zsh}/bin/zsh"
'';
profileExtra = ''
'';

@ -1 +0,0 @@
Subproject commit b0e1f068d07f5576d162b944f494fad542363422

View file

@ -1 +0,0 @@
../nur-packages/overlay.nix

View file

@ -3,7 +3,7 @@ self: super:
# Based on https://gist.github.com/clefru/9ed1186bf0b76d27e0ad20cbd9966b87
texlive-tubslatex = super.lib.overrideDerivation (super.texlive.combine {
inherit (super.texlive) scheme-full;
tubslatex.pkgs = [ super.tubslatex ];
tubslatex.pkgs = [ (super.callPackage ../pkgs/tubslatex.nix {}) ];
}) (oldAttrs: {
postBuild = ''
# Save the udpmap.cfg because texlive.combine removes it.
@ -14,10 +14,8 @@ self: super:
cat $out/share/texmf/web2c/updmap.cfg.1 > $out/share/texmf/web2c/updmap.cfg
rm $out/share/texmf/web2c/updmap.cfg.1
perl `type -P mktexlsr.pl` $out/share/texmf
yes | perl `type -P updmap.pl` --sys --syncwithtrees --force || true
perl `type -P updmap.pl` --sys --enable Map=NexusProSerif.map --enable Map=NexusProSans.map
# Regenerate .map files.
perl `type -P updmap.pl` --sys
'';

15
pkgs/tubslatex.nix Normal file
View file

@ -0,0 +1,15 @@
{ stdenv, fetchzip }:
stdenv.mkDerivation rec {
src = fetchzip {
url = https://gitlab.ibr.cs.tu-bs.de/tubslatex/tubslatex/-/jobs/116760/artifacts/raw/builds/tubslatex.tds.zip;
sha256 = "0vvgwwkd8y7nk1lkda6zsnfnzmvgda1g59yawsknmw246y8nw8ln";
stripRoot = false;
};
installPhase = ''
mkdir -p $out
cp -r * $out/
'';
pname = "tubslatex";
name = pname;
tlType = "run";
}

View file

@ -1 +0,0 @@
let b:ale_fixers = ['clang-format', 'remove_trailing_lines', 'trim_whitespace']