diff --git a/flake.lock b/flake.lock index 9b4d0cc..cd724fc 100644 --- a/flake.lock +++ b/flake.lock @@ -26,8 +26,8 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1636132244, - "narHash": "sha256-uIfXaXszC0YSgEjPWE97o/JR4WS5bqJ8BcrKYz9ex4Y=", + "lastModified": 1636508828, + "narHash": "sha256-qgjgowDhUF3Kb4KKzJGd5VtKEHkDqn4unEexPauPvgs=", "type": "git", "url": "file:///home/daniel/go/src/i3utils" }, diff --git a/user/daniel/home.nix b/user/daniel/home.nix index fd960dd..d0f77b5 100644 --- a/user/daniel/home.nix +++ b/user/daniel/home.nix @@ -11,59 +11,64 @@ # Let Home Manager install and manage itself. programs.home-manager.enable = true; - home.username = "daniel"; - home.homeDirectory = "/home/daniel"; - - home.file = { - ".icons/default".source = "${pkgs.capitaine-cursors}/share/icons/capitaine-cursors"; - - "bin/system-update.sh" = { - source = ../../scripts/system-update.sh; - executable = true; - }; - "bin/home-update.sh" = { - source = ../../scripts/home-update.sh; - executable = true; - }; - "bin/update.sh" = { - source = ../../scripts/update.sh; - executable = true; - }; - }; - - xsession.enable = true; services.dunst.enable = true; - home.packages = with pkgs; [ - cargo - chezmoi - discord - element-desktop - feh - fzf - go_1_17 - gopls - jetbrains.goland - i3 - i3lock - i3utils - iosevka - lazygit - nerdfonts - oh-my-zsh - pavucontrol - restic - rofi - starship - xclip - zettlr - ]; + home = { + username = "daniel"; + homeDirectory = "/home/daniel"; - home.keyboard = { - layout = "gb"; - options = [ - "caps:escape" + file = { + ".icons/default".source = "${pkgs.capitaine-cursors}/share/icons/capitaine-cursors"; + + "bin/system-update.sh" = { + source = ../../scripts/system-update.sh; + executable = true; + }; + + "bin/home-update.sh" = { + source = ../../scripts/home-update.sh; + executable = true; + }; + + "bin/update.sh" = { + source = ../../scripts/update.sh; + executable = true; + }; + }; + + packages = with pkgs; [ + cargo + chezmoi + discord + element-desktop + feh + fzf + go_1_17 + gopls + jetbrains.goland + i3 + i3lock + i3utils + iosevka + lazygit + nerdfonts + oh-my-zsh + pavucontrol + restic + rofi + starship + xclip + zettlr ]; + + keyboard = { + layout = "gb"; + options = [ + "caps:escape" + ]; + }; + + stateVersion = "21.05"; }; programs = { @@ -75,19 +80,14 @@ theme = "agnoster"; }; }; + git = { + enable = true; + userName = "Daniel Patterson"; + userEmail = "me@danielpatterson.dev"; + }; + + starship.enable = true; + + vscode.enable = true; }; - - programs.git = { - enable = true; - userName = "Daniel Patterson"; - userEmail = "me@danielpatterson.dev"; - }; - - programs.starship.enable = true; - - programs.vscode = { - enable = true; - }; - - home.stateVersion = "21.05"; } diff --git a/user/progs/i3/default.nix b/user/progs/i3/default.nix index 7484da4..717bcdf 100644 --- a/user/progs/i3/default.nix +++ b/user/progs/i3/default.nix @@ -3,77 +3,81 @@ let mod = "Mod4"; in { - xsession.windowManager.i3 = { + xsession = { enable = true; - config = { - bars = [ ]; - defaultWorkspace = "workspace number 1"; + windowManager.i3 = { + enable = true; + config = { + bars = [ ]; + + defaultWorkspace = "workspace number 1"; + + floating = { + modifier = mod; + criteria = [ + { instance = "pavucontrol"; } + ]; + }; + + focus = { + followMouse = false; + }; + + fonts = { + names = [ "pango:monospace 8" ]; + style = "monospace"; + size = 8.0; + }; + + keybindings = lib.mkOptionDefault { + "${mod}+q" = "kill"; + "${mod}+d" = "exec rofi -show drun"; + + "${mod}+h" = "focus left"; + "${mod}+j" = "focus down"; + "${mod}+k" = "focus up"; + "${mod}+l" = "focus right"; + + "${mod}+Shift+h" = "move left"; + "${mod}+Shift+l" = "move right"; + + "${mod}+b" = "split h"; + "${mod}+v" = "split v"; + "${mod}+Control+Return" = "exec --no-startup-id i3utils workspace new"; + "${mod}+Control+Shift+Return" = "exec --no-startup-id i3utils workspace new -b"; + "${mod}+Shift+Return" = "exec --no-startup-id i3utils workspace new -n, move next"; + + "${mod}+Control+j" = "exec --no-startup-id $HOME/bin/scripts/godown"; + "${mod}+Control+k" = "exec --no-startup-id $HOME/bin/scripts/goup"; + "${mod}+Control+h" = "exec --no-startup-id i3utils workspace new -b"; + + "${mod}+Shift+k" = "exec --no-startup-id i3utils window move prev"; + "${mod}+Shift+j" = "exec --no-startup-id i3utils window move next"; + + "${mod}+p" = "scratchpad show"; + "${mod}+Escape" = "exec i3lock -i /home/daniel/Pictures/wallpapers/wallpaper_3840x2160_blur.png"; + "${mod}+Shift+Escape" = "exec i3lock -i /home/daniel/Pictures/wallpapers/wallpaper_3840x2160_blur.png && systemctl suspend"; + }; - floating = { modifier = mod; - criteria = [ - { instance = "pavucontrol"; } + + startup = [ + { command = "$HOME/bin/scripts/flower"; always = true; } ]; + + terminal = "alacritty"; + + window = { + border = 5; + titlebar = false; + commands = [ + { command = "move position center #2116 46"; criteria = { class = "jetbrains-toolbox"; }; } + { command = "move scratchpad"; criteria = { instance = "spotify"; }; } + ]; + }; + }; - - focus = { - followMouse = false; - }; - - fonts = { - names = [ "pango:monospace 8" ]; - style = "monospace"; - size = 8.0; - }; - - keybindings = lib.mkOptionDefault { - "${mod}+q" = "kill"; - "${mod}+d" = "exec rofi -show drun"; - - "${mod}+h" = "focus left"; - "${mod}+j" = "focus down"; - "${mod}+k" = "focus up"; - "${mod}+l" = "focus right"; - - "${mod}+Shift+h" = "move left"; - "${mod}+Shift+l" = "move right"; - - "${mod}+b" = "split h"; - "${mod}+v" = "split v"; - "${mod}+Control+Return" = "exec --no-startup-id i3utils workspace new"; - "${mod}+Control+Shift+Return" = "exec --no-startup-id i3utils workspace new -b"; - "${mod}+Shift+Return" = "exec --no-startup-id i3utils workspace new -n, move next"; - - "${mod}+Control+j" = "exec --no-startup-id $HOME/bin/scripts/godown"; - "${mod}+Control+k" = "exec --no-startup-id $HOME/bin/scripts/goup"; - "${mod}+Control+h" = "exec --no-startup-id i3utils workspace new -b"; - - "${mod}+Shift+k" = "exec --no-startup-id i3utils window move prev"; - "${mod}+Shift+j" = "exec --no-startup-id i3utils window move next"; - - "${mod}+p" = "scratchpad show"; - "${mod}+Escape" = "exec i3lock -i /home/daniel/Pictures/wallpapers/wallpaper_3840x2160_blur.png"; - "${mod}+Shift+Escape" = "exec i3lock -i /home/daniel/Pictures/wallpapers/wallpaper_3840x2160_blur.png && systemctl suspend"; - }; - - modifier = mod; - - startup = [ - { command = "$HOME/bin/scripts/flower"; always = true; } - ]; - - terminal = "alacritty"; - - window = { - border = 5; - titlebar = false; - commands = [ - { command = "move position center #2116 46"; criteria = { class = "jetbrains-toolbox"; }; } - { command = "move scratchpad"; criteria = { instance = "spotify"; }; } - ]; - }; - }; }; }