nix
This commit is contained in:
parent
340faaa949
commit
c046bffd5d
3 changed files with 73 additions and 30 deletions
36
flake.lock
36
flake.lock
|
@ -4,6 +4,24 @@
|
|||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1694529238,
|
||||
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_2": {
|
||||
"inputs": {
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1685518550,
|
||||
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
|
||||
|
@ -40,7 +58,7 @@
|
|||
},
|
||||
"neovim": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"flake-utils": "flake-utils_2",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
|
@ -79,6 +97,7 @@
|
|||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"home-manager": "home-manager",
|
||||
"neovim": "neovim",
|
||||
"nixpkgs": "nixpkgs"
|
||||
|
@ -98,6 +117,21 @@
|
|||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_2": {
|
||||
"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",
|
||||
|
|
11
flake.nix
11
flake.nix
|
@ -3,6 +3,7 @@
|
|||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
|
@ -15,15 +16,15 @@
|
|||
};
|
||||
};
|
||||
|
||||
outputs = { nixpkgs, home-manager, neovim, ... }:
|
||||
outputs = { nixpkgs, home-manager, flake-utils, neovim, ... }:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
system = "x86_64-linux"; # change your system type here
|
||||
user = "nikos"; # change your user here
|
||||
dotfilesHome = "/home/nikos/.dotfiles"; # specify your dotfiles path
|
||||
dotfilesHome = "/home/${user}/.dotfiles"; # specify your dotfiles path
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in
|
||||
{
|
||||
homeConfigurations.${user} = home-manager.lib.homeManagerConfiguration {
|
||||
packages.homeConfigurations.${user} = home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
|
||||
# Specify your home configuration modules here, for example,
|
||||
|
@ -42,5 +43,5 @@
|
|||
|
||||
extraSpecialArgs = { extra = { inherit user dotfilesHome; }; };
|
||||
};
|
||||
};
|
||||
});
|
||||
}
|
||||
|
|
16
home.nix
16
home.nix
|
@ -28,15 +28,11 @@
|
|||
# The home.packages option allows you to install Nix packages into your
|
||||
# environment.
|
||||
home.packages = with pkgs; [
|
||||
neovim # neovim nightly
|
||||
ripgrep # "rg" cli, alternative to grep, used by nvim
|
||||
fd # find alternative, used by nvim
|
||||
lsd # "ls" alternative
|
||||
zoxide # "z" command
|
||||
nil # Nix LSP
|
||||
nixpkgs-fmt # Nix formatter
|
||||
(nerdfonts.override { fonts = [ "JetBrainsMono" ]; }) # nerdfonts jetbrains mono
|
||||
efm-langserver # Generic language server
|
||||
];
|
||||
|
||||
fonts.fontconfig.enable = true;
|
||||
|
@ -69,6 +65,18 @@
|
|||
);
|
||||
};
|
||||
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
package = pkgs.neovim;
|
||||
extraPackages = [
|
||||
pkgs.nil # Nix lsp
|
||||
pkgs.nixpkgs-fmt # Nix formatter
|
||||
pkgs.efm-langserver # Generic language server
|
||||
pkgs.lua-language-server
|
||||
];
|
||||
};
|
||||
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
|
|
Loading…
Reference in a new issue