aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Xmodmap2
-rw-r--r--apvlv.nix11
-rw-r--r--bash.nix27
-rw-r--r--conjure.nix11
-rw-r--r--discord.nix35
-rw-r--r--git.nix11
-rw-r--r--home.nix121
-rw-r--r--htop.nix17
-rw-r--r--i3.nix38
-rw-r--r--lutris.nix9
-rw-r--r--rofi.nix14
-rw-r--r--vim.nix34
-rw-r--r--xmonad.nix69
13 files changed, 399 insertions, 0 deletions
diff --git a/Xmodmap b/Xmodmap
new file mode 100644
index 0000000..c5e9e9f
--- /dev/null
+++ b/Xmodmap
@@ -0,0 +1,2 @@
+keycode 9 = grave asciitilde
+keycode 84 = Scroll_Lock
diff --git a/apvlv.nix b/apvlv.nix
new file mode 100644
index 0000000..2739751
--- /dev/null
+++ b/apvlv.nix
@@ -0,0 +1,11 @@
+{ pkgs, ... }:
+
+{
+ home.packages = with pkgs; [
+ apvlv
+ ];
+
+ home.file.".apvlvrc".text = ''
+ set zoom=fitheight
+ '';
+}
diff --git a/bash.nix b/bash.nix
new file mode 100644
index 0000000..b223742
--- /dev/null
+++ b/bash.nix
@@ -0,0 +1,27 @@
+{ config, lib, pkgs, ... }:
+
+{
+ programs.bash = {
+ enable = true;
+
+ sessionVariables = {
+ # for when Nix supports this
+ NIX_SHELL_PRESERVE_PROMPT = "1";
+ };
+
+ initExtra = ''
+ if [ -z $IN_NIX_SHELL ] ; then
+ export PS1="[\[\e[34m\]\u@\h \W\[\e[39m\]]\$ "
+ else
+ export PS1="[\[\e[34m\]\u@\h \W\[\e[39m\]]* "
+ fi
+ export PS2="> "
+ '';
+ };
+
+ # automatically add the slash after a sym-linked directory
+ # https://unix.stackexchange.com/questions/257861
+ home.file.".inputrc".text = ''
+ set mark-symlinked-directories on
+ '';
+}
diff --git a/conjure.nix b/conjure.nix
new file mode 100644
index 0000000..88e746d
--- /dev/null
+++ b/conjure.nix
@@ -0,0 +1,11 @@
+{ ... }:
+
+let mag = import <magpkgs> {}; in
+
+{
+ home.packages = with mag; [
+ (conjure.override {
+ savilerow = conjure.containedSolvers.savilerow;
+ })
+ ];
+}
diff --git a/discord.nix b/discord.nix
new file mode 100644
index 0000000..15fe95a
--- /dev/null
+++ b/discord.nix
@@ -0,0 +1,35 @@
+{ config, lib, pkgs, ... }:
+
+with pkgs;
+
+let
+ binaryName = "discord";
+
+ mydiscord =
+ (discord.override rec {
+
+ version = "0.0.13";
+ src = fetchurl {
+ url = "https://dl.discordapp.net/apps/linux/${version}/discord-${version}.tar.gz";
+ sha256 = "0d5z6cbj9dg3hjw84pyg75f8dwdvi2mqxb9ic8dfqzk064ssiv7y";
+ };
+
+ nss = nss_latest;
+ inherit binaryName;
+
+ }).overrideAttrs (old: {
+
+ preInstallPhases = [ "preInstall" ];
+
+ preInstall = ''
+ mv ./Discord ./${binaryName}
+ '';
+
+ });
+
+in
+ {
+ home.packages = [
+ mydiscord
+ ];
+ }
diff --git a/git.nix b/git.nix
new file mode 100644
index 0000000..82d9beb
--- /dev/null
+++ b/git.nix
@@ -0,0 +1,11 @@
+{ config, lib, pkgs, ... }:
+
+{
+ programs.git = {
+ enable = true;
+ # package = pkgs.gitAndTools.gitFull;
+
+ userName = "Tom Harley";
+ userEmail = "tom@magnostherobot.co.uk";
+ };
+}
diff --git a/home.nix b/home.nix
new file mode 100644
index 0000000..8667f73
--- /dev/null
+++ b/home.nix
@@ -0,0 +1,121 @@
+{ config, pkgs, ... }:
+
+{
+ # Let Home Manager install and manage itself.
+ programs.home-manager.enable = true;
+
+ # 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
+ # incompatible changes.
+ #
+ # You can update Home Manager without changing this value. See
+ # the Home Manager release notes for a list of state version
+ # changes in each release.
+ home.stateVersion = "20.03";
+
+ nixpkgs.config.allowUnfree = true;
+
+ home.packages = with pkgs; [
+ vcv-rack
+ cawbird
+ unzip
+ scrot
+ nnn
+ file
+ ripgrep
+ p7zip
+ obs-studio
+ rtorrent
+ weechat
+ ];
+
+ imports = [
+ ./i3.nix
+ ./apvlv.nix
+ ./lutris.nix
+ ./htop.nix
+ ./git.nix
+ ./bash.nix
+ ./xmonad.nix
+ ./discord.nix
+ ./vim.nix
+ ./conjure.nix
+ ./rofi.nix
+ ];
+
+ home.file.".Xmodmap" = rec {
+ executable = false;
+ onChange = "${pkgs.xorg.xmodmap}/bin/xmodmap ${target}";
+ target = "./.Xmodmap";
+ source = ./Xmodmap;
+ };
+
+ xsession = {
+ enable = true;
+
+ initExtra = ''
+ ${pkgs.feh}/bin/feh --bg-center --no-fehbg \
+ "$HOME/Pictures/vaporwave-bg/Vaporwave Goddesses Temple.png" \
+ "$HOME/Pictures/vaporwave-bg/b_vap2.png"
+
+ ${pkgs.xorg.xset}/bin/xset mouse 1/1 1
+ '';
+ };
+
+ programs.fzf = {
+ enable = true;
+ enableBashIntegration = true;
+ };
+
+ programs.urxvt = {
+ enable = true;
+
+ fonts = [ "xft:Hack:size=9" ];
+ iso14755 = false;
+ scroll.bar.enable = false;
+
+ extraConfig = {
+ "internalBorder" = 0;
+ "externalBorder" = 0;
+ "background" = "#1c1b1a";
+ "foreground" = "#f8f6f2";
+ "cursorColor" = "#aeee00";
+ "scrollColor" = "#45413b";
+ "fadeColor" = "#ffffff";
+ "fading" = 20;
+
+ # black
+ "color0" = "#141413";
+ "color8" = "#000000";
+ # red
+ "color1" = "#ff2c4b";
+ "color9" = "#ff2c4b";
+ # green
+ "color2" = "#aeee00";
+ "color10" = "#aeee00";
+ # yellow
+ "color3" = "#fade3e";
+ "color11" = "#ffa724";
+ # blue
+ "color4" = "#0a9dff";
+ "color12" = "#0a9dff";
+ # magenta
+ "color5" = "#ff9eb8";
+ "color13" = "#ff9eb8";
+ # cyan
+ "color6" = "#8cffba";
+ "color14" = "#8cffba";
+ # white
+ "color7" = "#d9cec3";
+ "color15" = "#ffffff";
+ };
+ };
+
+ programs.firefox = {
+ enable = true;
+
+ enableAdobeFlash = false;
+ };
+
+}
diff --git a/htop.nix b/htop.nix
new file mode 100644
index 0000000..f28ee96
--- /dev/null
+++ b/htop.nix
@@ -0,0 +1,17 @@
+{ config, lib, pkgs, ... }:
+
+{
+ programs.htop = {
+ enable = false;
+
+ delay = 10;
+ fields = [ "PID" "PERCENT_CPU" "TIME" "M_RESIDENT" "PERCENT_MEM" "COMM" ];
+
+ hideThreads = false;
+ hideUserlandThreads = false;
+ hideKernelThreads = false;
+
+ highlightBaseName = true;
+ treeView = true;
+ };
+}
diff --git a/i3.nix b/i3.nix
new file mode 100644
index 0000000..63da26a
--- /dev/null
+++ b/i3.nix
@@ -0,0 +1,38 @@
+{ config, lib, pkgs, ... }:
+
+let
+ mod = "Mod4";
+
+in {
+ xsession.windowManager.i3 = {
+ enable = false;
+
+ config = {
+ modifier = mod;
+
+ keybindings = lib.mkOptionDefault {
+ # Focus
+ "${mod}+h" = "focus left";
+ "${mod}+j" = "focus down";
+ "${mod}+k" = "focus up";
+ "${mod}+l" = "focus right";
+
+ # Move
+ "${mod}+Shift+h" = "move left";
+ "${mod}+Shift+j" = "move down";
+ "${mod}+Shift+k" = "move up";
+ "${mod}+Shift+l" = "move right";
+ };
+
+ bars = [];
+
+ focus.mouseWarping = false;
+
+ fonts = [ "Hack 9" ];
+
+ startup = [
+ { command = "${pkgs.xorg.xmodmap}/bin/xmodmap ~/.Xmodmap"; notification = false; }
+ ];
+ };
+ };
+}
diff --git a/lutris.nix b/lutris.nix
new file mode 100644
index 0000000..18cae99
--- /dev/null
+++ b/lutris.nix
@@ -0,0 +1,9 @@
+{ pkgs, ... }:
+
+{
+ home.packages = with pkgs; [
+ lutris
+ openssl
+ steam
+ ];
+}
diff --git a/rofi.nix b/rofi.nix
new file mode 100644
index 0000000..359e2ef
--- /dev/null
+++ b/rofi.nix
@@ -0,0 +1,14 @@
+{ config, lib, pkgs, ... }:
+
+{
+ programs.rofi = {
+ enable = true;
+ package = pkgs.rofi;
+
+ borderWidth = 0;
+ scrollbar = false;
+ separator = "solid";
+ terminal = "${pkgs.rxvt-unicode}/bin/urxvt";
+ theme = "Monokai";
+ };
+}
diff --git a/vim.nix b/vim.nix
new file mode 100644
index 0000000..197578a
--- /dev/null
+++ b/vim.nix
@@ -0,0 +1,34 @@
+{ config, lib, pkgs, ... }:
+
+{
+ programs.vim = {
+ enable = true;
+
+ # to search vim plugins:
+ # nix-env -f '<nixpkgs>' -qaP -A vimPlugins
+ plugins = with pkgs.vimPlugins; [
+ vim-fugitive
+ vim-sensible
+ vim-nix
+ editorconfig-vim
+ goyo-vim
+ fzf-vim
+ ];
+
+ settings = {
+ expandtab = true;
+ shiftwidth = 4;
+ tabstop = 4;
+
+ hidden = true;
+ mouse = "a";
+ number = false;
+ relativenumber = false;
+ };
+ };
+
+ home.sessionVariables = {
+ VISUAL = "vim";
+ EDITOR = "vim -e";
+ };
+}
diff --git a/xmonad.nix b/xmonad.nix
new file mode 100644
index 0000000..7647094
--- /dev/null
+++ b/xmonad.nix
@@ -0,0 +1,69 @@
+{ config, lib, pkgs, ... }:
+
+{
+ xsession.windowManager.xmonad = {
+ enable = true;
+ enableContribAndExtras = true;
+
+ # would be nice to have this as an actual haskell file, so I
+ # could get syntax highlighting, but I also need to make sure
+ # external programs are included as runtime dependencies
+ config = pkgs.writeText "xmonad.hs" ''
+ import XMonad
+ import XMonad.Actions.Volume
+ import XMonad.Actions.PhysicalScreens
+ import XMonad.Util.Dzen
+ import XMonad.Hooks.EwmhDesktops
+ import XMonad.Util.EZConfig
+
+ import Data.Default
+
+ mymod = mod4Mask
+ myKeys =
+ [ ((mymod, xK_p), spawn "${pkgs.rofi}/bin/rofi -show run")
+ , ((mymod, xK_i), lowerVolume 5 >>= alert)
+ , ((mymod, xK_o), raiseVolume 5 >>= alert)
+ ]
+ ++
+ [((mymod .|. mask, key), f sc)
+ | (key, sc) <- zip [xK_w, xK_e, xK_r] [0..]
+ , (f, mask) <- [(viewScreen def, 0), (sendToScreen def, shiftMask)]]
+
+ alert = dzenConfig (timeout 3 >=> onCurr xScreen) . show . round
+
+ main = xmonad $ ewmh $ def
+ { terminal = "${pkgs.rxvt-unicode}/bin/urxvt"
+ , modMask = mymod
+ , borderWidth = 0
+ , focusFollowsMouse = False
+ } `additionalKeys` myKeys
+ '';
+ };
+
+ xsession.enable = true;
+ xsession.initExtra = ''
+ # source .Xmodmap to get key rebindings
+ ${pkgs.xorg.xmodmap}/bin/xmodmap .Xmodmap
+
+ # disable mouse acceleration
+ ${pkgs.xorg.xinput}/bin/xinput --set-prop \
+ 'Logitech G500s Laser Gaming Mouse' \
+ 'libinput Accel Profile Enabled' 0, 1
+
+ # make displayport input the primary monitor
+ ${pkgs.xorg.xrandr}/bin/xrandr --output DP-0 --primary
+ '';
+
+ xsession.pointerCursor = {
+ defaultCursor = "left_ptr";
+ package = pkgs.vanilla-dmz;
+ name = "Vanilla-DMZ-AA";
+ size = 16;
+ };
+
+ # adding dzen to path because I cannot for the life of me figure
+ # out how to add it to xmonad's path
+ home.packages = with pkgs; [
+ dzen2
+ ];
+}