Big refactor WIP

This commit is contained in:
2022-04-15 16:40:32 +01:00
parent b1b692dbdf
commit ec73d821aa
35 changed files with 107 additions and 206 deletions

156
users/daniel/default.nix Normal file
View File

@@ -0,0 +1,156 @@
{ pkgs, lib, fetchurl, hostname, headless, ... }:
let
cliPackages = with pkgs; [
aerc
entr
go_1_18
gomuks
gopls
oh-my-zsh
(
let
my-python-packages = python-packages: with python-packages; [
tkinter
requests
];
python-with-my-packages = python3.withPackages my-python-packages;
in
python-with-my-packages
)
ranger
restic
rust-analyzer
starship
];
guiPackages = with pkgs; [
_1password
_1password-gui
discord
feh
iosevka
jetbrains.goland
mpv
nerdfonts
pamixer
pavucontrol
playerctl
spotify
xclip
];
in
{
imports = [
./configs/system
] ++ lib.optionals (!headless) [
./configs/desktop
] ++ lib.optionals (builtins.pathExists ./host-specific/${hostname}) [
./host-specific/${hostname}
];
home = {
username = "daniel";
homeDirectory = "/home/daniel";
sessionPath = [
"$HOME/go/bin"
];
file = {
".icons/default".source = "${pkgs.capitaine-cursors}/share/icons/capitaine-cursors";
"bin/update" = {
source = ../../scripts/update;
executable = true;
};
"bin/supdate" = {
source = ../../scripts/supdate;
executable = true;
};
};
packages = cliPackages ++ lib.optionals (!headless) guiPackages;
keyboard = {
layout = "gb";
options = [
"caps:escape"
];
};
stateVersion = "21.05";
};
programs = {
# Let Home Manager install and manage itself.
home-manager.enable = true;
fzf = {
enable = true;
enableZshIntegration = true;
};
git = {
enable = true;
package = pkgs.gitFull;
userName = "Daniel Patterson";
userEmail = "me@danielpatterson.dev";
extraConfig = {
pull.rebase = true;
init.defaultBranch = "main";
format.signOff = "yes";
sendemail = {
smtpUser = "me@danielpatterson.dev";
smtpServer = "smtp.fastmail.com";
smtpEncryption = "tls";
smtpServerPort = 587;
};
};
};
lazygit = {
enable = true;
settings = {
gui = {
showFileTree = false;
};
};
};
starship.enable = true;
vscode.enable = true;
zsh = {
enable = true;
enableAutosuggestions = true;
oh-my-zsh = {
enable = true;
plugins = [ "git" "fzf" ];
theme = "agnoster";
};
};
};
services ={
dunst.enable = true;
syncthing = {
enable = true;
};
screen-locker = {
enable = true;
lockCmd = "${pkgs.i3lock}/bin/i3lock -i /home/daniel/wallpapers/lock.png";
inactiveInterval = 60;
};
};
}