mirror of
https://github.com/oddlama/nix-config.git
synced 2025-10-11 07:10:39 +02:00
refactor: move full neovim config to only myuser
This commit is contained in:
parent
4c377b260e
commit
14329a9a5d
22 changed files with 23 additions and 40 deletions
|
@ -1,8 +1,7 @@
|
||||||
{
|
{
|
||||||
# If the host defines microvms, ensure that our modules and
|
# If the host defines microvms, ensure that our modules and
|
||||||
# some boilerplate is imported automatically.
|
# boilerplate stuff is imported automatically.
|
||||||
meta.microvms.commonImports = [
|
meta.microvms.commonImports = [
|
||||||
../.
|
../.
|
||||||
{home-manager.users.root.home.minimal = true;}
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
{pkgs, ...}: {
|
{pkgs, ...}: {
|
||||||
imports = [
|
imports = [
|
||||||
./modules/uid.nix
|
./modules/uid.nix
|
||||||
./modules/minimal.nix
|
|
||||||
|
|
||||||
./git.nix
|
./git.nix
|
||||||
./htop.nix
|
./htop.nix
|
||||||
./neovim
|
./neovim.nix
|
||||||
./shell
|
./shell
|
||||||
./utils.nix
|
./utils.nix
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
{lib, ...}: {
|
|
||||||
options = {
|
|
||||||
home.minimal = lib.mkEnableOption "minimal setup only (e.g. for virtual machines)";
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,23 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
imports = [
|
|
||||||
./minimal.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
config = lib.mkIf (!config.home.minimal) {
|
|
||||||
programs.neovim = {
|
|
||||||
withPython3 = true;
|
|
||||||
extraPython3Packages = pyPkgs: with pyPkgs; [openai];
|
|
||||||
withNodeJs = true;
|
|
||||||
};
|
|
||||||
xdg.configFile = {
|
|
||||||
"nvim/lua".source = ./lua;
|
|
||||||
"nvim/init.lua".source = ./init.lua;
|
|
||||||
};
|
|
||||||
home.packages = with pkgs; [gcc shellcheck stylua];
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -16,9 +16,7 @@ in {
|
||||||
inherit (config.repo.secrets.global.myuser) hashedPassword;
|
inherit (config.repo.secrets.global.myuser) hashedPassword;
|
||||||
createHome = true;
|
createHome = true;
|
||||||
group = myuser;
|
group = myuser;
|
||||||
extraGroups =
|
extraGroups = ["wheel" "input" "video"];
|
||||||
["wheel" "input" "video"]
|
|
||||||
++ lib.optionals config.sound.enable ["audio"];
|
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
autoSubUidGidRange = false;
|
autoSubUidGidRange = false;
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
|
@ -69,6 +67,7 @@ in {
|
||||||
imports = [
|
imports = [
|
||||||
../common
|
../common
|
||||||
./graphical
|
./graphical
|
||||||
|
./neovim
|
||||||
|
|
||||||
./dev.nix
|
./dev.nix
|
||||||
./gpg.nix
|
./gpg.nix
|
||||||
|
@ -78,11 +77,6 @@ in {
|
||||||
home = {
|
home = {
|
||||||
inherit (config.users.users.${myuser}) uid;
|
inherit (config.users.users.${myuser}) uid;
|
||||||
username = config.users.users.${myuser}.name;
|
username = config.users.users.${myuser}.name;
|
||||||
# TODO this shall be moved!
|
|
||||||
shellAliases = {
|
|
||||||
p = "cd ~/projects";
|
|
||||||
zf = "zathura --fork";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,6 +44,10 @@
|
||||||
# TODO mouse speed
|
# TODO mouse speed
|
||||||
# TODO persist tmp malte ddelete.
|
# TODO persist tmp malte ddelete.
|
||||||
# TODO ncdu
|
# TODO ncdu
|
||||||
|
home.shellAliases = {
|
||||||
|
p = "cd ~/projects";
|
||||||
|
zf = "zathura --fork";
|
||||||
|
};
|
||||||
|
|
||||||
# Needed to fix cursors in firefox under wayland, see https://github.com/NixOS/nixpkgs/issues/207339#issuecomment-1374497558
|
# Needed to fix cursors in firefox under wayland, see https://github.com/NixOS/nixpkgs/issues/207339#issuecomment-1374497558
|
||||||
gtk = {
|
gtk = {
|
||||||
|
|
15
users/myuser/neovim/default.nix
Normal file
15
users/myuser/neovim/default.nix
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
programs.neovim = {
|
||||||
|
withPython3 = true;
|
||||||
|
extraPython3Packages = pyPkgs: with pyPkgs; [openai];
|
||||||
|
withNodeJs = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
xdg.configFile = {
|
||||||
|
"nvim/lua".source = ./lua;
|
||||||
|
"nvim/init.lua".source = ./init.lua;
|
||||||
|
};
|
||||||
|
|
||||||
|
# TODO NO! NO! all of this goes away
|
||||||
|
home.packages = with pkgs; [gcc shellcheck stylua];
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue