Refactor user config files

This commit is contained in:
2021-11-11 21:50:19 +00:00
parent cdf7b2c907
commit 029d4123fd
3 changed files with 134 additions and 130 deletions

4
flake.lock generated
View File

@@ -26,8 +26,8 @@
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1636132244, "lastModified": 1636508828,
"narHash": "sha256-uIfXaXszC0YSgEjPWE97o/JR4WS5bqJ8BcrKYz9ex4Y=", "narHash": "sha256-qgjgowDhUF3Kb4KKzJGd5VtKEHkDqn4unEexPauPvgs=",
"type": "git", "type": "git",
"url": "file:///home/daniel/go/src/i3utils" "url": "file:///home/daniel/go/src/i3utils"
}, },

View File

@@ -11,59 +11,64 @@
# Let Home Manager install and manage itself. # Let Home Manager install and manage itself.
programs.home-manager.enable = true; 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; services.dunst.enable = true;
home.packages = with pkgs; [ home = {
cargo username = "daniel";
chezmoi homeDirectory = "/home/daniel";
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.keyboard = { file = {
layout = "gb"; ".icons/default".source = "${pkgs.capitaine-cursors}/share/icons/capitaine-cursors";
options = [
"caps:escape" "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 = { programs = {
@@ -75,19 +80,14 @@
theme = "agnoster"; 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";
} }

View File

@@ -3,77 +3,81 @@
let let
mod = "Mod4"; mod = "Mod4";
in { in {
xsession.windowManager.i3 = { xsession = {
enable = true; 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; 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"; }; }
];
};
}; };
}; };
} }