78 lines
2.3 KiB
Nix
78 lines
2.3 KiB
Nix
{
|
|
description = "OSHs dotfiles";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
|
|
neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
|
|
home-manager.url = "github:nix-community/home-manager/release-24.05";
|
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
outputs = { self, nixpkgs, home-manager, neovim-nightly-overlay, ... }:
|
|
let
|
|
system = builtins.currentSystem;
|
|
username = builtins.getEnv "USER";
|
|
homeDir = builtins.getEnv "HOME";
|
|
pkgs = import nixpkgs { inherit system; };
|
|
in {
|
|
homeConfigurations.${username} = home-manager.lib.homeManagerConfiguration {
|
|
inherit pkgs;
|
|
modules = [
|
|
{
|
|
nixpkgs.overlays = [
|
|
neovim-nightly-overlay.overlays.default
|
|
];
|
|
|
|
home.username = username;
|
|
home.homeDirectory = homeDir;
|
|
# Only manage what you explicitly turn on below
|
|
# (this keeps you from overriding distro-level things)
|
|
programs.git = {
|
|
enable = true;
|
|
userName = "Oshgnacknak";
|
|
userEmail = "osh@oshgnacknak.de";
|
|
};
|
|
|
|
programs.neovim = {
|
|
enable = true;
|
|
package = neovim-nightly-overlay.packages.${pkgs.system}.default;
|
|
};
|
|
|
|
# Put extra packages in the *user* profile (not system)
|
|
home.packages = with pkgs; [
|
|
ripgrep
|
|
fd
|
|
tmux
|
|
neovim
|
|
xsel
|
|
];
|
|
|
|
# Example: link dotfiles without forcing overwrite
|
|
# (fails safely if a file already exists)
|
|
home.file.".tmux.conf".source = ./_tmux.conf;
|
|
|
|
home.file.".local/share/nvim/site/autoload/plug.vim".source = pkgs.fetchurl {
|
|
url = "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim";
|
|
sha256 = "c2d8998469a049a51225a71128a12917b379822d16b639493e29ea02d8787306";
|
|
};
|
|
|
|
xdg.configFile."nvim" = {
|
|
source = ./_config/nvim;
|
|
recursive = true;
|
|
force = true;
|
|
};
|
|
|
|
# Environment variables only for this user/session
|
|
home.sessionVariables = {
|
|
EDITOR = "nvim";
|
|
};
|
|
|
|
# Good HM hygiene
|
|
xdg.enable = true;
|
|
home.stateVersion = "24.05";
|
|
}
|
|
];
|
|
};
|
|
};
|
|
}
|
|
|