diff options
| author | Tom Harley | 2020-12-30 10:52:09 +0000 |
|---|---|---|
| committer | Tom Harley | 2020-12-30 10:52:41 +0000 |
| commit | 68cf8766e2636a50b0a660368b18426e2c12d487 (patch) | |
| tree | f7f73e3a93e36ca544b14e6fdb3bd31073262424 | |
| download | home-manager-68cf8766e2636a50b0a660368b18426e2c12d487.tar.gz home-manager-68cf8766e2636a50b0a660368b18426e2c12d487.zip | |
Initial commit
| -rw-r--r-- | Xmodmap | 2 | ||||
| -rw-r--r-- | apvlv.nix | 11 | ||||
| -rw-r--r-- | bash.nix | 27 | ||||
| -rw-r--r-- | conjure.nix | 11 | ||||
| -rw-r--r-- | discord.nix | 35 | ||||
| -rw-r--r-- | git.nix | 11 | ||||
| -rw-r--r-- | home.nix | 121 | ||||
| -rw-r--r-- | htop.nix | 17 | ||||
| -rw-r--r-- | i3.nix | 38 | ||||
| -rw-r--r-- | lutris.nix | 9 | ||||
| -rw-r--r-- | rofi.nix | 14 | ||||
| -rw-r--r-- | vim.nix | 34 | ||||
| -rw-r--r-- | xmonad.nix | 69 |
13 files changed, 399 insertions, 0 deletions
@@ -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 + ]; + } @@ -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; + }; +} @@ -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"; + }; +} @@ -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 + ]; +} |
