feat: migrate to nix home-manager 🚀
This commit is contained in:
parent
9fbd1226a8
commit
098805ae76
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -22,3 +22,6 @@
|
||||
[submodule "dots/.config/zsh/config/plugins/zsh-nix-shell"]
|
||||
path = dots/.config/zsh/config/plugins/zsh-nix-shell
|
||||
url = https://github.com/chisui/zsh-nix-shell
|
||||
[submodule "dots/.config/zsh/config/plugins/powerlevel10k"]
|
||||
path = dots/.config/zsh/config/plugins/powerlevel10k
|
||||
url = https://github.com/romkatv/powerlevel10k.git
|
||||
|
61
config/default.nix
Normal file
61
config/default.nix
Normal file
@ -0,0 +1,61 @@
|
||||
{ pkgs, ... }: {
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
home = {
|
||||
packages = with pkgs; [
|
||||
gcc
|
||||
sqlite
|
||||
luajit
|
||||
imagemagick
|
||||
dotnet-sdk_8
|
||||
cargo
|
||||
rustc
|
||||
shellcheck
|
||||
openjdk
|
||||
go
|
||||
nodejs
|
||||
poetry
|
||||
python3
|
||||
ruby
|
||||
yamllint
|
||||
curl
|
||||
llvm
|
||||
openssh
|
||||
openssl
|
||||
pkg-config
|
||||
wget
|
||||
rsync
|
||||
readline
|
||||
gnumake
|
||||
cmake
|
||||
git
|
||||
gh
|
||||
ffmpeg
|
||||
silicon
|
||||
man
|
||||
jq
|
||||
tectonic
|
||||
fzf
|
||||
eza
|
||||
luajit
|
||||
];
|
||||
file = {
|
||||
".config/" = { source = ../dots/.config; recursive = true; force = true; };
|
||||
".local/" = { source = ../dots/.local; recursive = true; force = true; };
|
||||
".omnisharp" = { source = ../dots/.omnisharp; force = true; };
|
||||
".zshrc" = { source = ../dots/.zshrc; force = true; };
|
||||
".latexmkrc" = { source = ../dots/.latexmkrc; force = true; };
|
||||
};
|
||||
};
|
||||
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [
|
||||
sqlite
|
||||
gh
|
||||
];
|
||||
# Magick is required for image.nvim
|
||||
extraLuaPackages = lp: [ lp.magick ];
|
||||
};
|
||||
|
||||
}
|
26
dots/.config/.gitignore
vendored
26
dots/.config/.gitignore
vendored
@ -1,26 +0,0 @@
|
||||
/*
|
||||
!nvim
|
||||
!zathura
|
||||
!chrome-flags.conf
|
||||
!chromium-flags.conf
|
||||
!bat
|
||||
!zsh
|
||||
!hypr
|
||||
!mako
|
||||
!mpv
|
||||
!waybar
|
||||
!silicon
|
||||
!powershell
|
||||
!wezterm
|
||||
!wofi
|
||||
!kitty
|
||||
!alacritty
|
||||
!git
|
||||
!gtk-3.0
|
||||
!gtk-4.0
|
||||
!fontconfig
|
||||
!stylua.toml
|
||||
!Trolltech.conf
|
||||
!systemd
|
||||
!mimeapps.list
|
||||
!emacs
|
5
dots/.config/emacs/.gitignore
vendored
5
dots/.config/emacs/.gitignore
vendored
@ -1,5 +0,0 @@
|
||||
*
|
||||
!.gitignore
|
||||
!init.el
|
||||
!lisp
|
||||
!early-init.el
|
1
dots/.config/home-manager
Symbolic link
1
dots/.config/home-manager
Symbolic link
@ -0,0 +1 @@
|
||||
/home/sam/.dot_files
|
2
dots/.config/nix/nix.conf
Normal file
2
dots/.config/nix/nix.conf
Normal file
@ -0,0 +1,2 @@
|
||||
extra-experimental-features = flakes nix-command
|
||||
max-jobs = auto
|
@ -1,59 +0,0 @@
|
||||
#compdef exa
|
||||
|
||||
# Save this file as _exa in /usr/local/share/zsh/site-functions or in any
|
||||
# other folder in $fpath. E. g. save it in a folder called ~/.zfunc and add a
|
||||
# line containing `fpath=(~/.zfunc $fpath)` somewhere before `compinit` in your
|
||||
# ~/.zshrc.
|
||||
|
||||
__exa() {
|
||||
# Give completions using the `_arguments` utility function with
|
||||
# `-s` for option stacking like `exa -ab` for `exa -a -b` and
|
||||
# `-S` for delimiting options with `--` like in `exa -- -a`.
|
||||
_arguments -s -S \
|
||||
"(- *)"{-v,--version}"[Show version of exa]" \
|
||||
"(- *)"{-'\?',--help}"[Show list of command-line options]" \
|
||||
{-1,--oneline}"[Display one entry per line]" \
|
||||
{-l,--long}"[Display extended file metadata as a table]" \
|
||||
{-G,--grid}"[Display entries as a grid]" \
|
||||
{-x,--across}"[Sort the grid across, rather than downwards]" \
|
||||
{-R,--recurse}"[Recurse into directories]" \
|
||||
{-T,--tree}"[Recurse into directories as a tree]" \
|
||||
{-F,--classify}"[Display type indicator by file names]" \
|
||||
--colo{,u}r"[When to use terminal colours]" \
|
||||
--colo{,u}r-scale"[Highlight levels of file sizes distinctly]" \
|
||||
--icons"[Display icons]" \
|
||||
--no-icons"[Hide icons]" \
|
||||
--group-directories-first"[Sort directories before other files]" \
|
||||
--git-ignore"[Ignore files mentioned in '.gitignore']" \
|
||||
{-a,--all}"[Show hidden and 'dot' files]" \
|
||||
{-d,--list-dirs}"[List directories like regular files]" \
|
||||
{-D,--only-dirs}"[List only directories]" \
|
||||
{-L,--level}"+[Limit the depth of recursion]" \
|
||||
{-r,--reverse}"[Reverse the sort order]" \
|
||||
{-s,--sort}="[Which field to sort by]:(sort field):(accessed age changed created date extension Extension filename Filename inode modified oldest name Name newest none size time type)" \
|
||||
{-I,--ignore-glob}"[Ignore files that match these glob patterns]" \
|
||||
{-b,--binary}"[List file sizes with binary prefixes]" \
|
||||
{-B,--bytes}"[List file sizes in bytes, without any prefixes]" \
|
||||
--changed"[Use the changed timestamp field]" \
|
||||
{-g,--group}"[List each file's group]" \
|
||||
{-h,--header}"[Add a header row to each column]" \
|
||||
{-H,--links}"[List each file's number of hard links]" \
|
||||
{-i,--inode}"[List each file's inode number]" \
|
||||
{-m,--modified}"[Use the modified timestamp field]" \
|
||||
{-n,--numeric}"[List numeric user and group IDs.]" \
|
||||
{-S,--blocks}"[List each file's number of filesystem blocks]" \
|
||||
{-t,--time}="[Which time field to show]:(time field):(accessed changed created modified)" \
|
||||
--time-style="[How to format timestamps]:(time style):(default iso long-iso full-iso)" \
|
||||
--no-permissions"[Suppress the permissions field]" \
|
||||
--octal-permissions"[List each file's permission in octal format]" \
|
||||
--no-filesize"[Suppress the filesize field]" \
|
||||
--no-user"[Suppress the user field]" \
|
||||
--no-time"[Suppress the time field]" \
|
||||
{-u,--accessed}"[Use the accessed timestamp field]" \
|
||||
{-U,--created}"[Use the created timestamp field]" \
|
||||
--git"[List each file's Git status, if tracked]" \
|
||||
{-@,--extended}"[List each file's extended attributes and sizes]" \
|
||||
'*:filename:_files'
|
||||
}
|
||||
|
||||
__exa
|
@ -8,6 +8,7 @@ configure() {
|
||||
|
||||
init() {
|
||||
local wkdir="${BASE_ZSH_CONFIG_DIR}/config/plugins"
|
||||
source "${wkdir}/powerlevel10k/powerlevel10k.zsh-theme"
|
||||
source "${wkdir}/fzf-tab/fzf-tab.plugin.zsh"
|
||||
source "${wkdir}/zsh-autosuggestions/zsh-autosuggestions.zsh"
|
||||
source "${wkdir}/zsh-completions/zsh-completions.plugin.zsh"
|
||||
|
1
dots/.config/zsh/config/plugins/powerlevel10k
Submodule
1
dots/.config/zsh/config/plugins/powerlevel10k
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 174ce9bf0166c657404a21f4dc9608da935f7325
|
224
flake.lock
Normal file
224
flake.lock
Normal file
@ -0,0 +1,224 @@
|
||||
{
|
||||
"nodes": {
|
||||
"flake-compat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1696426674,
|
||||
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"neovim-nightly-overlay",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1698882062,
|
||||
"narHash": "sha256-HkhafUayIqxXyHH1X8d9RDl1M2CkFgZLjKD3MzabiEo=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "8c9fa2545007b49a5db5f650ae91f227672c3877",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts_2": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"neovim-nightly-overlay",
|
||||
"hercules-ci-effects",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1696343447,
|
||||
"narHash": "sha256-B2xAZKLkkeRFG5XcHHSXXcP7To9Xzr59KXeZiRf4vdQ=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "c9afaba3dfa4085dbd2ccb38dfade5141e33d9d4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "flake-parts",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1685518550,
|
||||
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hercules-ci-effects": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts_2",
|
||||
"nixpkgs": [
|
||||
"neovim-nightly-overlay",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1701009247,
|
||||
"narHash": "sha256-GuX16rzRze2y7CsewJLTV6qXkXWyEwp6VCZXi8HLruU=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "hercules-ci-effects",
|
||||
"rev": "31b6cd7569191bfcd0a548575b0e2ef953ed7d09",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "hercules-ci-effects",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1701071203,
|
||||
"narHash": "sha256-lQywA7QU/vzTdZ1apI0PfgCWNyQobXUYghVrR5zuIeM=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "db1878f013b52ba5e4034db7c1b63e8d04173a86",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"neovim-flake": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": [
|
||||
"neovim-nightly-overlay",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"dir": "contrib",
|
||||
"lastModified": 1701130526,
|
||||
"narHash": "sha256-+TPrkfN6jG5ZlRBG4d+6vS8tRIVWMNsVFECb3gbjI9E=",
|
||||
"owner": "neovim",
|
||||
"repo": "neovim",
|
||||
"rev": "3a3474371b6b87e630e7aa217e7860e9154cd563",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"dir": "contrib",
|
||||
"owner": "neovim",
|
||||
"repo": "neovim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"neovim-nightly-overlay": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
"flake-parts": "flake-parts",
|
||||
"hercules-ci-effects": "hercules-ci-effects",
|
||||
"neovim-flake": "neovim-flake",
|
||||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1701137963,
|
||||
"narHash": "sha256-ihXnCLR42qO9Mc+fLT/vtp+EW8CZHJwgdKMhc/+y76I=",
|
||||
"owner": "nix-community",
|
||||
"repo": "neovim-nightly-overlay",
|
||||
"rev": "e8b2276946b372057d6c425fe259c1351fdf2c67",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "neovim-nightly-overlay",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1701040486,
|
||||
"narHash": "sha256-vawYwoHA5CwvjfqaT3A5CT9V36Eq43gxdwpux32Qkjw=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "45827faa2132b8eade424f6bdd48d8828754341a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1701040486,
|
||||
"narHash": "sha256-vawYwoHA5CwvjfqaT3A5CT9V36Eq43gxdwpux32Qkjw=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "45827faa2132b8eade424f6bdd48d8828754341a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"home-manager": "home-manager",
|
||||
"neovim-nightly-overlay": "neovim-nightly-overlay",
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
}
|
||||
},
|
||||
"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
|
||||
}
|
38
flake.nix
Normal file
38
flake.nix
Normal file
@ -0,0 +1,38 @@
|
||||
{
|
||||
description = "Price Hiller's home manager configuration";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
|
||||
};
|
||||
|
||||
outputs = inputs @ { home-manager, nixpkgs, ... }:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
username = "sam";
|
||||
in
|
||||
{
|
||||
defaultPackage.x86_64-linux = home-manager.defaultPackage.x86_64-linux;
|
||||
targets.genericLinux.enable = true;
|
||||
homeConfigurations.${username} = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
modules = [
|
||||
({
|
||||
nixpkgs.overlays = [
|
||||
inputs.neovim-nightly-overlay.overlay
|
||||
];
|
||||
home = {
|
||||
username = "${username}";
|
||||
homeDirectory = "/home/${username}";
|
||||
stateVersion = "24.05";
|
||||
};
|
||||
})
|
||||
./config
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user