diff options
| author | Akshay Nair <phenax5@gmail.com> | 2020-12-20 20:56:53 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2020-12-20 20:56:53 +0530 |
| commit | 6f32887a0ea07ea8d5a792c525ff66284cfac5e6 (patch) | |
| tree | daae583af282fc2421bdb16f6288bc763fc0f2a6 /configuration.nix | |
| parent | 4e5ca7125a9709dc39709743e06522ec39656ebc (diff) | |
| download | nixos-config-6f32887a0ea07ea8d5a792c525ff66284cfac5e6.tar.gz nixos-config-6f32887a0ea07ea8d5a792c525ff66284cfac5e6.zip | |
Fixes autostart and x init stuff
Diffstat (limited to '')
| -rw-r--r-- | configuration.nix | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/configuration.nix b/configuration.nix index 4e31653..1f482c2 100644 --- a/configuration.nix +++ b/configuration.nix @@ -10,6 +10,13 @@ let shotkey = pkgs.callPackage ./packages/shotkey/pkg.nix {}; dwm = pkgs.callPackage ./packages/dwm/pkg.nix {}; st = pkgs.callPackage ./packages/st/pkg.nix {}; + windowManagers = { + dwm = '' + while true; do + (ssh-agent dwm &>> /tmp/dwm.log) || break; + done + ''; + }; in { imports = [ ./hardware-configuration.nix @@ -47,10 +54,19 @@ in { syntaxHighlighting.enable = true; histFile = "~/.config/zshhistory"; histSize = 50000; - interactiveShellInit = "source ~/nixos/external/zsh/zshrc"; + interactiveShellInit = ''source ~/nixos/external/zsh/zshrc''; promptInit = ""; - }; + loginShellInit = '' + setup_dwm() { + echo "~/nixos/external/xconfig/init.sh; ${windowManagers.dwm}" > ~/.xinitrc; + } + case "$(tty)" in + /dev/tty1) setup_dwm && startx ;; + *) echo "No tty for u" ;; + esac; + ''; + }; # X11 config services.xserver = { @@ -62,8 +78,12 @@ in { tapping = true; naturalScrolling = false; }; - # xkbOptions = "eurosign:e"; }; + fonts.fonts = with pkgs; [ + jetbrains-mono + cozette + noto-fonts-emoji + ]; # Enable CUPS to print documents. # services.printing.enable = true; @@ -125,6 +145,7 @@ in { firefox w3m xorg.xrandr + xorg.xmodmap mpv sxiv |
