initial commit
This commit is contained in:
21
home-manager/configs/alacritty.nix
Normal file
21
home-manager/configs/alacritty.nix
Normal file
@@ -0,0 +1,21 @@
|
||||
{ config, pkgs, font, ... }:
|
||||
|
||||
{
|
||||
programs.alacritty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
env = {
|
||||
"TERM" = "alacritty";
|
||||
};
|
||||
|
||||
terminal.shell.program = "zsh";
|
||||
|
||||
font = {
|
||||
size = 12;
|
||||
normal.family = font;
|
||||
bold.family = font;
|
||||
italic.family = font;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
25
home-manager/configs/git.nix
Normal file
25
home-manager/configs/git.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{ config, lib, pkgs, userName, userEmail, ... }:
|
||||
|
||||
{
|
||||
programs.git = {
|
||||
package = pkgs.gitAndTools.gitFull;
|
||||
enable = true;
|
||||
userName = userName;
|
||||
userEmail = userEmail;
|
||||
|
||||
extraConfig = {
|
||||
gpg = {
|
||||
format = "ssh";
|
||||
};
|
||||
"gpg \"ssh\"" = {
|
||||
program = "${lib.getExe' pkgs._1password-gui "op-ssh-sign"}";
|
||||
};
|
||||
commit = {
|
||||
gpgsign = true;
|
||||
};
|
||||
user = {
|
||||
signingKey = "~/.ssh/id_ed25519.pub";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
5
home-manager/configs/nvim.nix
Normal file
5
home-manager/configs/nvim.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.neovim.enable = true;
|
||||
}
|
||||
10
home-manager/configs/ssh.nix
Normal file
10
home-manager/configs/ssh.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
onePassPath = "~/.1password/agent.sock";
|
||||
in {
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
extraConfig = "IdentityAgent ${onePassPath}";
|
||||
};
|
||||
}
|
||||
5
home-manager/configs/starship.nix
Normal file
5
home-manager/configs/starship.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.starship.enable = true;
|
||||
}
|
||||
25
home-manager/configs/zsh.nix
Normal file
25
home-manager/configs/zsh.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
|
||||
shellAliases = {
|
||||
update = "sudo nixos-rebuild switch --flake ~/.dotfiles && home-manager switch --flake ~/.dotfiles";
|
||||
".." = "cd ..";
|
||||
ls = "exa";
|
||||
vim = "nvim";
|
||||
grep = "rg";
|
||||
du = "dust";
|
||||
rm = "rip";
|
||||
};
|
||||
|
||||
history = {
|
||||
size = 10000;
|
||||
path = "${config.xdg.dataHome}/zsh/history";
|
||||
};
|
||||
};
|
||||
}
|
||||
73
home-manager/home.nix
Normal file
73
home-manager/home.nix
Normal file
@@ -0,0 +1,73 @@
|
||||
# This is your home-manager configuration file
|
||||
# Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix)
|
||||
{
|
||||
inputs,
|
||||
outputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
# Be sure to actually install the font first!
|
||||
font = "ComicCodeLigatures";
|
||||
username = "shahab";
|
||||
email = "shahab@dogar.dev";
|
||||
fullName = "Shahab Dogar";
|
||||
in
|
||||
{
|
||||
# You can import other home-manager modules here
|
||||
imports = [
|
||||
# Custom import to configure font
|
||||
(import ./configs/alacritty.nix { inherit pkgs config; font = font; })
|
||||
|
||||
# Custom import for username and email
|
||||
(import ./configs/git.nix { inherit pkgs config lib; userEmail = email; userName = fullName; })
|
||||
|
||||
./configs/ssh.nix
|
||||
./configs/nvim.nix
|
||||
./configs/starship.nix
|
||||
./configs/zsh.nix
|
||||
];
|
||||
|
||||
nixpkgs = {
|
||||
# Configure your nixpkgs instance
|
||||
config = {
|
||||
# Disable if you don't want unfree packages
|
||||
allowUnfree = true;
|
||||
|
||||
# Workaround for https://github.com/nix-community/home-manager/issues/2942
|
||||
allowUnfreePredicate = _: true;
|
||||
};
|
||||
};
|
||||
|
||||
home = {
|
||||
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
||||
stateVersion = "24.05";
|
||||
|
||||
username = username;
|
||||
homeDirectory = "/home/${username}";
|
||||
sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
NIXOS_OZONE_WL = "1";
|
||||
};
|
||||
|
||||
packages = with pkgs; [
|
||||
neofetch
|
||||
mission-center
|
||||
discord
|
||||
eza
|
||||
ripgrep
|
||||
rm-improved
|
||||
dust
|
||||
firefox
|
||||
gh
|
||||
];
|
||||
};
|
||||
|
||||
# Enable home-manager
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
# Nicely reload system units when changing configs
|
||||
systemd.user.startServices = "sd-switch";
|
||||
}
|
||||
Reference in New Issue
Block a user