mirror of
https://github.com/kp2pml30/dotfiles.git
synced 2026-02-17 07:44:41 +04:00
try to migrate to nix
This commit is contained in:
parent
f2f4ead62f
commit
94da1ce936
26 changed files with 830 additions and 181 deletions
50
nix/personal/home.nix
Normal file
50
nix/personal/home.nix
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
{ pkgs
|
||||
, ...
|
||||
}@args:
|
||||
{
|
||||
home.stateVersion = "24.05";
|
||||
|
||||
home = {
|
||||
username = "kp2pml30";
|
||||
homeDirectory = "/home/kp2pml30";
|
||||
packages = with pkgs; [
|
||||
starship
|
||||
jq
|
||||
];
|
||||
};
|
||||
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
frequency = "weekly";
|
||||
};
|
||||
|
||||
programs = {
|
||||
git = {
|
||||
enable = true;
|
||||
userName = "kp2pml30";
|
||||
userEmail = "kp2pml30@gmail.com";
|
||||
lfs.enable = true;
|
||||
extraConfig = {
|
||||
init.defaultBranch = "main";
|
||||
};
|
||||
};
|
||||
|
||||
fish = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
starship = {
|
||||
enable = true;
|
||||
settings = {
|
||||
add_newline = false;
|
||||
format = "$cmd_duration$username$hostname$git_branch$git_commit$git_state$git_status$directory$status\n$character";
|
||||
hostname.ssh_only = true;
|
||||
cmd_duration.format = "took [$duration]($style)\n";
|
||||
};
|
||||
};
|
||||
|
||||
home-manager.enable = true;
|
||||
|
||||
neovim = import ./neovim.nix args;
|
||||
};
|
||||
}
|
||||
33
nix/personal/neovim.nix
Normal file
33
nix/personal/neovim.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ pkgs
|
||||
, lib
|
||||
, rootPath
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
fromGitHub = rev: repo: pkgs.vimUtils.buildVimPlugin {
|
||||
pname = "${lib.strings.sanitizeDerivationName repo}";
|
||||
version = rev;
|
||||
src = builtins.fetchGit {
|
||||
url = "https://github.com/${repo}.git";
|
||||
rev = rev;
|
||||
};
|
||||
};
|
||||
nvimConfig = builtins.readFile (rootPath + "/home/.config/nvim/base.vim");
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
nvim-treesitter.withAllGrammars
|
||||
nvim-autopairs
|
||||
nerdtree
|
||||
tokyonight-nvim
|
||||
barbar-nvim
|
||||
feline-nvim
|
||||
(fromGitHub "d63c811337b2f75de52f16efee176695f31e7fbc" "timakro/vim-yadi")
|
||||
(fromGitHub "aafa5c187a15701a7299a392b907ec15d9a7075f" "nvim-tree/nvim-web-devicons")
|
||||
];
|
||||
|
||||
extraConfig = nvimConfig;
|
||||
}
|
||||
7
nix/personal/user.nix
Normal file
7
nix/personal/user.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" "networkmanager" ];
|
||||
shell = pkgs.fish;
|
||||
hashedPassword = "$6$UK6oHr2gPRYD4Rak$lgF.mYReC0jahNuI4kt0j/CsrajVzMprvp3HgjKwwsjYHU6/Ur9jfROXZbKhhpyCLRmnlCpWeRCbHEYO/jhIv/";
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue