This commit is contained in:
Nikos Papadakis 2023-10-28 14:25:31 +03:00
parent 340faaa949
commit c046bffd5d
Signed by untrusted user who does not match committer: nikos
GPG key ID: 78871F9905ADFF02
3 changed files with 73 additions and 30 deletions

View file

@ -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",

View file

@ -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,32 +16,32 @@
};
};
outputs = { nixpkgs, home-manager, neovim, ... }:
let
system = "x86_64-linux"; # change your system type here
user = "nikos"; # change your user here
dotfilesHome = "/home/nikos/.dotfiles"; # specify your dotfiles path
pkgs = nixpkgs.legacyPackages.${system};
in
{
homeConfigurations.${user} = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
outputs = { nixpkgs, home-manager, flake-utils, neovim, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
user = "nikos"; # change your user here
dotfilesHome = "/home/${user}/.dotfiles"; # specify your dotfiles path
pkgs = nixpkgs.legacyPackages.${system};
in
{
packages.homeConfigurations.${user} = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
# Specify your home configuration modules here, for example,
# the path to your home.nix.
modules = [
./home.nix
# Specify your home configuration modules here, for example,
# the path to your home.nix.
modules = [
./home.nix
{
nixpkgs.overlays = [
(final: prev: {
neovim = neovim.packages.${system}.neovim;
})
];
}
];
{
nixpkgs.overlays = [
(final: prev: {
neovim = neovim.packages.${system}.neovim;
})
];
}
];
extraSpecialArgs = { extra = { inherit user dotfilesHome; }; };
};
};
extraSpecialArgs = { extra = { inherit user dotfilesHome; }; };
};
});
}

View file

@ -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;