feat: partial modularization of home.nix
This commit is contained in:
parent
14b33a0e1f
commit
1b546b236b
82
flake.lock
Normal file
82
flake.lock
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"flake-utils": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1710146030,
|
||||||
|
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"home-manager": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1712759992,
|
||||||
|
"narHash": "sha256-2APpO3ZW4idlgtlb8hB04u/rmIcKA8O7pYqxF66xbNY=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"rev": "31357486b0ef6f4e161e002b6893eeb4fafc3ca9",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1712608508,
|
||||||
|
"narHash": "sha256-vMZ5603yU0wxgyQeHJryOI+O61yrX2AHwY6LOFyV1gM=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "4cba8b53da471aea2ab2b0c1f30a81e7c451f4b6",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
|
"home-manager": "home-manager",
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
26
flake.nix
Normal file
26
flake.nix
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
description = "Configuration of my systems";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
# Specify the source of Home Manager and Nixpkgs.
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
home-manager = {
|
||||||
|
url = "github:nix-community/home-manager";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { nixpkgs, home-manager, flake-utils, ... }: {
|
||||||
|
homeConfigurations."yadunut@yadunut-mbp" = home-manager.lib.homeManagerConfiguration {
|
||||||
|
pkgs = nixpkgs.legacyPackages.aarch64-darwin;
|
||||||
|
|
||||||
|
# Specify your home configuration modules here, for example,
|
||||||
|
# the path to your home.nix.
|
||||||
|
modules = [ ./yadunut-mbp/home.nix ./modules/zsh.nix ./modules/neovim.nix ];
|
||||||
|
|
||||||
|
# Optionally use extraSpecialArgs
|
||||||
|
# to pass through arguments to home.nix
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
9
modules/neovim.nix
Normal file
9
modules/neovim.nix
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
programs.neovim = {
|
||||||
|
enable = true;
|
||||||
|
defaultEditor = true;
|
||||||
|
# extraLuaConfig = '' '';
|
||||||
|
# extraPackages = [ ];
|
||||||
|
};
|
||||||
|
}
|
38
modules/zsh.nix
Normal file
38
modules/zsh.nix
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
|
||||||
|
home.packages = [
|
||||||
|
pkgs.zsh-completions
|
||||||
|
];
|
||||||
|
programs.zsh = {
|
||||||
|
enable = true;
|
||||||
|
prezto = {
|
||||||
|
enable = true;
|
||||||
|
editor.keymap = "vi";
|
||||||
|
editor.dotExpansion = true;
|
||||||
|
pmodules = [
|
||||||
|
"environment"
|
||||||
|
"terminal"
|
||||||
|
"utility"
|
||||||
|
"directory"
|
||||||
|
"editor"
|
||||||
|
"history"
|
||||||
|
"syntax-highlighting"
|
||||||
|
"history-substring-search"
|
||||||
|
"autosuggestions"
|
||||||
|
"completion"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
shellAliases = {
|
||||||
|
lg = "lazygit";
|
||||||
|
cat = "bat";
|
||||||
|
diff = "delta";
|
||||||
|
s = "kitty +kitten ssh";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.starship = {
|
||||||
|
enable = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
};
|
||||||
|
}
|
@ -1,58 +0,0 @@
|
|||||||
beancount
|
|
||||||
binutils
|
|
||||||
coq
|
|
||||||
dive
|
|
||||||
efm-langserver
|
|
||||||
entr
|
|
||||||
eza
|
|
||||||
fava
|
|
||||||
fd
|
|
||||||
fzf
|
|
||||||
gh
|
|
||||||
git
|
|
||||||
git-delta
|
|
||||||
git-lfs
|
|
||||||
gmime
|
|
||||||
hashicorp/tap/nomad
|
|
||||||
hashicorp/tap/nomad-pack
|
|
||||||
hashicorp/tap/packer
|
|
||||||
hashicorp/tap/vault
|
|
||||||
hashicorp/tap/waypoint
|
|
||||||
jq
|
|
||||||
lazygit
|
|
||||||
libev
|
|
||||||
libgccjit
|
|
||||||
libmagic
|
|
||||||
libpq
|
|
||||||
lsusb
|
|
||||||
neovim
|
|
||||||
ninja
|
|
||||||
opam
|
|
||||||
openssh
|
|
||||||
pigz
|
|
||||||
pinentry-mac
|
|
||||||
postgresql@15
|
|
||||||
qemu
|
|
||||||
ripgrep
|
|
||||||
rust-analyzer
|
|
||||||
sleepwatcher
|
|
||||||
starship
|
|
||||||
tectonic
|
|
||||||
tesseract
|
|
||||||
texlab
|
|
||||||
tio
|
|
||||||
tmux
|
|
||||||
tokei
|
|
||||||
typst
|
|
||||||
vips
|
|
||||||
volta
|
|
||||||
watch
|
|
||||||
watchman
|
|
||||||
wget
|
|
||||||
xapian
|
|
||||||
yq
|
|
||||||
zellij
|
|
||||||
zls
|
|
||||||
zoxide
|
|
||||||
zsh-completions
|
|
||||||
zsync
|
|
@ -1,29 +0,0 @@
|
|||||||
{
|
|
||||||
description = "Home Manager configuration of yadunut";
|
|
||||||
|
|
||||||
inputs = {
|
|
||||||
# Specify the source of Home Manager and Nixpkgs.
|
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
||||||
home-manager = {
|
|
||||||
url = "github:nix-community/home-manager";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
outputs = { nixpkgs, home-manager, ... }:
|
|
||||||
let
|
|
||||||
system = "aarch64-darwin";
|
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
|
||||||
in {
|
|
||||||
homeConfigurations."yadunut" = home-manager.lib.homeManagerConfiguration {
|
|
||||||
inherit pkgs;
|
|
||||||
|
|
||||||
# Specify your home configuration modules here, for example,
|
|
||||||
# the path to your home.nix.
|
|
||||||
modules = [ ./home.nix ];
|
|
||||||
|
|
||||||
# Optionally use extraSpecialArgs
|
|
||||||
# to pass through arguments to home.nix
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
@ -18,11 +18,22 @@
|
|||||||
# The home.packages option allows you to install Nix packages into your
|
# The home.packages option allows you to install Nix packages into your
|
||||||
# environment.
|
# environment.
|
||||||
home.packages = [
|
home.packages = [
|
||||||
|
pkgs.bat
|
||||||
|
pkgs.beancount
|
||||||
|
pkgs.coq
|
||||||
|
pkgs.delta
|
||||||
|
# pkgs.dive
|
||||||
|
pkgs.entr
|
||||||
|
pkgs.fava
|
||||||
|
pkgs.fd
|
||||||
pkgs.htop
|
pkgs.htop
|
||||||
pkgs.ripgrep
|
pkgs.ripgrep
|
||||||
pkgs.bat
|
pkgs.typst
|
||||||
pkgs.delta
|
pkgs.wget
|
||||||
pkgs.fd
|
|
||||||
|
# Neovim deps
|
||||||
|
# pkgs.texlab
|
||||||
|
# pkgs.efm-langserver
|
||||||
|
|
||||||
# # It is sometimes useful to fine-tune packages, for example, by applying
|
# # It is sometimes useful to fine-tune packages, for example, by applying
|
||||||
# # overrides. You can do that directly here, just don't forget the
|
# # overrides. You can do that directly here, just don't forget the
|
||||||
@ -53,6 +64,15 @@
|
|||||||
EDITOR = "nvim";
|
EDITOR = "nvim";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
programs.direnv = {
|
||||||
|
enable = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
nix-direnv.enable = true;
|
||||||
|
config = {
|
||||||
|
hide_env_diff = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
programs.fzf.enable = true;
|
programs.fzf.enable = true;
|
||||||
programs.fzf.enableZshIntegration = true;
|
programs.fzf.enableZshIntegration = true;
|
||||||
|
|
||||||
@ -67,37 +87,6 @@
|
|||||||
|
|
||||||
programs.lazygit.enable = true;
|
programs.lazygit.enable = true;
|
||||||
|
|
||||||
programs.zsh = {
|
|
||||||
enable = true;
|
|
||||||
prezto = {
|
|
||||||
enable = true;
|
|
||||||
editor.keymap = "vi";
|
|
||||||
editor.dotExpansion = true;
|
|
||||||
pmodules = [
|
|
||||||
"environment"
|
|
||||||
"terminal"
|
|
||||||
"utility"
|
|
||||||
"directory"
|
|
||||||
"editor"
|
|
||||||
"history"
|
|
||||||
"syntax-highlighting"
|
|
||||||
"history-substring-search"
|
|
||||||
"autosuggestions"
|
|
||||||
"completion"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
shellAliases = {
|
|
||||||
lg = "lazygit";
|
|
||||||
cat = "bat";
|
|
||||||
diff = "delta";
|
|
||||||
s = "kitty +kitten ssh";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.starship = {
|
|
||||||
enable = true;
|
|
||||||
enableZshIntegration = true;
|
|
||||||
};
|
|
||||||
programs.neovim.enable = true;
|
programs.neovim.enable = true;
|
||||||
|
|
||||||
# Let Home Manager install and manage itself.
|
# Let Home Manager install and manage itself.
|
||||||
|
Loading…
Reference in New Issue
Block a user