feat: add work laptop configuration
This commit is contained in:
42
home/dogar/blueocean.nix
Normal file
42
home/dogar/blueocean.nix
Normal file
@@ -0,0 +1,42 @@
|
||||
{config, lib, ...}: {
|
||||
imports = lib.flatten [
|
||||
#
|
||||
# ========== Required Configs ==========
|
||||
#
|
||||
./common/core
|
||||
|
||||
#
|
||||
# ========== Host-specific Optional Configs ==========
|
||||
#
|
||||
(map (config: "${builtins.toString ./.}/common/optional/${config}.nix") [
|
||||
"btop"
|
||||
"direnv"
|
||||
"firefox"
|
||||
"fonts"
|
||||
"ghostty"
|
||||
"git"
|
||||
"hyprland"
|
||||
"kitty"
|
||||
"misc-packages"
|
||||
"nvim"
|
||||
"ssh"
|
||||
"starship"
|
||||
"tmux"
|
||||
"uv"
|
||||
"zsh"
|
||||
])
|
||||
];
|
||||
|
||||
services.yubikey-touch-detector.enable = true;
|
||||
|
||||
home = {
|
||||
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
||||
stateVersion = "25.05";
|
||||
sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
NIXOS_OZONE_WL = "1";
|
||||
};
|
||||
file.".npmrc".source = config.lib.file.mkOutOfStoreSymlink
|
||||
"${config.home.homeDirectory}/git/nix-config/dotfiles/npm/.npmrc";
|
||||
};
|
||||
}
|
||||
39
home/dogar/common/core/default.nix
Normal file
39
home/dogar/common/core/default.nix
Normal file
@@ -0,0 +1,39 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
hostSpec,
|
||||
...
|
||||
}: {
|
||||
imports = lib.flatten [
|
||||
(map lib.custom.relativeToRoot ["modules/common" "modules/home-manager"])
|
||||
];
|
||||
|
||||
inherit hostSpec;
|
||||
|
||||
home = {
|
||||
username = lib.mkDefault config.hostSpec.username;
|
||||
homeDirectory = lib.mkDefault config.hostSpec.home;
|
||||
stateVersion = lib.mkDefault "25.05";
|
||||
sessionPath = ["$HOME/.local/bin"];
|
||||
sessionVariables = {
|
||||
FLAKE = "$HOME/src/nix/nix-config";
|
||||
SHELL = "zsh";
|
||||
VISUAL = "nvim";
|
||||
EDITOR = "nvim";
|
||||
};
|
||||
};
|
||||
|
||||
nix = {
|
||||
package = lib.mkDefault pkgs.nix;
|
||||
settings = {
|
||||
experimental-features = ["nix-command" "flakes"];
|
||||
warn-dirty = false;
|
||||
};
|
||||
};
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
# Nicely reload system units when changing configs
|
||||
systemd.user.startServices = "sd-switch";
|
||||
}
|
||||
3
home/dogar/common/optional/btop.nix
Normal file
3
home/dogar/common/optional/btop.nix
Normal file
@@ -0,0 +1,3 @@
|
||||
{...}: {
|
||||
programs.btop = {enable = true;};
|
||||
}
|
||||
8
home/dogar/common/optional/direnv.nix
Normal file
8
home/dogar/common/optional/direnv.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
}
|
||||
11
home/dogar/common/optional/firefox.nix
Normal file
11
home/dogar/common/optional/firefox.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{pkgs, ...}: {
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
package = pkgs.firefox.override {
|
||||
cfg = {
|
||||
# Gnome shell native connector
|
||||
enableGnomeExtensions = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
4
home/dogar/common/optional/fonts.nix
Normal file
4
home/dogar/common/optional/fonts.nix
Normal file
@@ -0,0 +1,4 @@
|
||||
{pkgs, ...}: {
|
||||
fonts.fontconfig.enable = true;
|
||||
home.packages = with pkgs; [nerd-fonts.jetbrains-mono];
|
||||
}
|
||||
12
home/dogar/common/optional/ghostty.nix
Normal file
12
home/dogar/common/optional/ghostty.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
{config, ...}: {
|
||||
programs.ghostty = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
theme = "catppuccin-mocha";
|
||||
font-family = config.hostSpec.font;
|
||||
font-size = 14;
|
||||
initial-command = "tmux";
|
||||
};
|
||||
};
|
||||
}
|
||||
27
home/dogar/common/optional/git.nix
Normal file
27
home/dogar/common/optional/git.nix
Normal file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
lfs.enable = true;
|
||||
|
||||
settings = {
|
||||
user = {
|
||||
name = config.hostSpec.userFullName;
|
||||
email = config.hostSpec.email.user;
|
||||
};
|
||||
gpg = {format = "ssh";};
|
||||
"gpg \"ssh\"" = {
|
||||
program = "${lib.getExe' pkgs._1password-gui "op-ssh-sign"}";
|
||||
};
|
||||
commit = {gpgsign = true;};
|
||||
user = {signingKey = "~/.ssh/id_ed25519.pub";};
|
||||
pull = {rebase = true;};
|
||||
init = {defaultBranch = "main";};
|
||||
lfs = {locksverify = true;};
|
||||
};
|
||||
};
|
||||
}
|
||||
33
home/dogar/common/optional/hyprland.nix
Normal file
33
home/dogar/common/optional/hyprland.nix
Normal file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
home = {
|
||||
file = {
|
||||
"${config.xdg.configHome}/hypr/hyprland.conf".source =
|
||||
config.lib.file.mkOutOfStoreSymlink "${lib.custom.relativeToRoot "dotfiles/hypr/hyprland.conf"}";
|
||||
"${config.xdg.configHome}/hypr/hypridle.conf".source =
|
||||
config.lib.file.mkOutOfStoreSymlink "${lib.custom.relativeToRoot "dotfiles/hypr/hypridle.conf"}";
|
||||
"${config.xdg.configHome}/hypr/hyprlock.conf".source =
|
||||
config.lib.file.mkOutOfStoreSymlink "${lib.custom.relativeToRoot "dotfiles/hypr/hyprlock.conf"}";
|
||||
"${config.xdg.configHome}/waybar".source =
|
||||
config.lib.file.mkOutOfStoreSymlink "${lib.custom.relativeToRoot "dotfiles/waybar"}";
|
||||
"${config.xdg.configHome}/wofi".source =
|
||||
config.lib.file.mkOutOfStoreSymlink "${lib.custom.relativeToRoot "dotfiles/wofi"}";
|
||||
"${config.xdg.configHome}/mako".source =
|
||||
config.lib.file.mkOutOfStoreSymlink "${lib.custom.relativeToRoot "dotfiles/mako"}";
|
||||
};
|
||||
|
||||
packages = with pkgs; [
|
||||
hyprshot
|
||||
hyprlock
|
||||
hypridle
|
||||
hyprpolkitagent
|
||||
waybar
|
||||
wofi
|
||||
mako
|
||||
];
|
||||
};
|
||||
}
|
||||
14
home/dogar/common/optional/kitty.nix
Normal file
14
home/dogar/common/optional/kitty.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{config, ...}: {
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
|
||||
shellIntegration.enableZshIntegration = true;
|
||||
settings = {
|
||||
font = config.hostSpec.font;
|
||||
shell = "tmux";
|
||||
font-size = 16.0;
|
||||
active_border_color = "#44ffff";
|
||||
single_window_margin_width = 0;
|
||||
};
|
||||
};
|
||||
}
|
||||
35
home/dogar/common/optional/misc-packages.nix
Normal file
35
home/dogar/common/optional/misc-packages.nix
Normal file
@@ -0,0 +1,35 @@
|
||||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
btop
|
||||
zoxide
|
||||
unzip
|
||||
tmux
|
||||
gcc
|
||||
zig
|
||||
gparted
|
||||
gnupg
|
||||
dig
|
||||
bash
|
||||
kdePackages.dolphin
|
||||
font-awesome
|
||||
tree
|
||||
wl-clipboard-rs
|
||||
brightnessctl
|
||||
age
|
||||
nerd-fonts.jetbrains-mono
|
||||
lazygit
|
||||
gh
|
||||
dbeaver-bin
|
||||
cloudflare-warp
|
||||
protonmail-desktop
|
||||
rpi-imager
|
||||
kubectl
|
||||
k9s
|
||||
postgresql_17
|
||||
kitty
|
||||
waybar
|
||||
obsidian
|
||||
yq
|
||||
jq
|
||||
];
|
||||
}
|
||||
13
home/dogar/common/optional/nvim.nix
Normal file
13
home/dogar/common/optional/nvim.nix
Normal file
@@ -0,0 +1,13 @@
|
||||
{config, ...}: {
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
};
|
||||
|
||||
# Create a symlink from ~/.config/nvim to the dotfiles directory
|
||||
home.file.".config/nvim".source =
|
||||
config.lib.file.mkOutOfStoreSymlink
|
||||
"${config.home.homeDirectory}/git/nix-config/dotfiles/nvim";
|
||||
}
|
||||
10
home/dogar/common/optional/ssh.nix
Normal file
10
home/dogar/common/optional/ssh.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{...}: let
|
||||
onePassPath = "~/.1password/agent.sock";
|
||||
in {
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
enableDefaultConfig = false;
|
||||
extraConfig = "IdentityAgent ${onePassPath}";
|
||||
matchBlocks."*" = {};
|
||||
};
|
||||
}
|
||||
1
home/dogar/common/optional/starship.nix
Normal file
1
home/dogar/common/optional/starship.nix
Normal file
@@ -0,0 +1 @@
|
||||
{...}: {programs.starship.enable = true;}
|
||||
15
home/dogar/common/optional/tmux.nix
Normal file
15
home/dogar/common/optional/tmux.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
home = {
|
||||
file = {
|
||||
"${config.xdg.configHome}/tmux".source =
|
||||
lib.custom.relativeToRoot "dotfiles/tmux";
|
||||
};
|
||||
|
||||
packages = with pkgs; [tmux];
|
||||
};
|
||||
}
|
||||
10
home/dogar/common/optional/uv.nix
Normal file
10
home/dogar/common/optional/uv.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
...
|
||||
}: {
|
||||
programs.uv = {
|
||||
enable = true;
|
||||
settings = {
|
||||
pip.index-url = "https://pip.dogar.dev";
|
||||
};
|
||||
};
|
||||
}
|
||||
43
home/dogar/common/optional/zsh.nix
Normal file
43
home/dogar/common/optional/zsh.nix
Normal file
@@ -0,0 +1,43 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs; [
|
||||
eza
|
||||
ripgrep
|
||||
rm-improved
|
||||
dust
|
||||
xcp
|
||||
nh
|
||||
zoxide
|
||||
];
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
|
||||
initContent = ''
|
||||
eval "$(zoxide init zsh)"
|
||||
'';
|
||||
|
||||
shellAliases = {
|
||||
".." = "cd ..";
|
||||
ls = "exa";
|
||||
vim = "nvim";
|
||||
grep = "rg";
|
||||
du = "dust";
|
||||
rm = "rip";
|
||||
cp = "xcp";
|
||||
uo = "nh os switch ~/git/nix-config";
|
||||
k = "kubectl";
|
||||
};
|
||||
|
||||
history = {
|
||||
size = 10000;
|
||||
path = "${config.xdg.dataHome}/zsh/history";
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user