Create smaller presets for home-manager without gui

refactoring

refactoring

refactoring

refactoring

refactoring

refactoring

refactoring

refactoring

refactoring

refactoring

refactoring
This commit is contained in:
Patrick Neff 2024-03-09 13:50:44 +01:00
parent 069fb08780
commit 2fafce867e
14 changed files with 118 additions and 60 deletions

View File

@ -328,17 +328,17 @@
"nixpkgs": "nixpkgs_4"
},
"locked": {
"lastModified": 1709227340,
"narHash": "sha256-uzvnQOTiRA5varexAPU5pUhGIYTGj/z4Peyg/pIkkJk=",
"lastModified": 1709674014,
"narHash": "sha256-JUEESYa5u5pLjBNqy7mN3pFv6176skfYBixtC+1Ph0Q=",
"ref": "refs/heads/master",
"rev": "491985a4a372b1236526a007d297976767a6b728",
"revCount": 18,
"rev": "1f3ba170caa4dfd8d09b07d8f1a3dc4ff3bf76d1",
"revCount": 26,
"type": "git",
"url": "ssh://gitea@pi1.odie.intranet/odie/neovim-flake"
"url": "ssh://gitea@pi1.odie.intranet/odie/neovim-flake.git"
},
"original": {
"type": "git",
"url": "ssh://gitea@pi1.odie.intranet/odie/neovim-flake"
"url": "ssh://gitea@pi1.odie.intranet/odie/neovim-flake.git"
}
},
"neovim-flake": {

View File

@ -12,7 +12,7 @@
url = "github:nix-community/neovim-nightly-overlay";
};
neovim = {
url = "git+ssh://gitea@pi1.odie.intranet/odie/neovim-flake";
url = "git+ssh://gitea@pi1.odie.intranet/odie/neovim-flake.git";
#url = "/home/odie/Code/nix/neovim-config";
};
nur.url = "github:nix-community/NUR";
@ -52,19 +52,44 @@
inherit system overlays;
config.allowUnfree = true;
};
in
rec {
homeManagerModules = rec {
full = [
(import ./modules)
];
};
homeConfigurations = {
"odie-full" = home-manager.lib.homeManagerConfiguration {
pkgs = mkPkgs "x86_64-linux";
extraSpecialArgs = { inherit inputs outputs vars; };
modules = homeManagerModules.full;
in
rec {
homeModules = rec {
base = import ./modules/base.nix;
gui = import ./modules/gui.nix;
shell = import ./modules/shell.nix;
dev = import ./modules/dev.nix;
};
homeConfigurations = rec {
odie-shell = home-manager.lib.homeManagerConfiguration {
inherit pkgs extraSpecialArgs;
modules = [
homeModules.base
homeModules.shell
];
};
odie-dev = home-manager.lib.homeManagerConfiguration {
inherit pkgs extraSpecialArgs;
modules = [
inputs.neovim.homeModules.neovim-ide
homeModules.base
homeModules.shell
homeModules.dev
];
};
odie-gui = home-manager.lib.homeManagerConfiguration {
inherit pkgs extraSpecialArgs;
modules = [
inputs.neovim.homeModules.neovim-ide
homeModules.base
homeModules.shell
homeModules.dev
homeModules.gui
];
};
odie = odie-gui;
};
} // flake-utils.lib.eachDefaultSystem
(system:

View File

@ -8,17 +8,6 @@
stateVersion = "23.05";
};
imports = [
./shell
./gui
./mpd
./development
inputs.neovim.homeModules.default
];
programs.neovim-ide.enable = lib.mkDefault true;
programs.kitty.enable = lib.mkForce true;
news = {
display = "silent";
json = lib.mkForce { };

5
modules/dev.nix Normal file
View File

@ -0,0 +1,5 @@
{ pkgs, lib, inputs, vars, ... }: with lib; {
imports = [
./development
];
}

View File

@ -1,5 +1,10 @@
_: {
imports = [
./rust.nix
./gitea-cli
./neovim-ide
./nix
];
programs.lazygit.enable = true;
programs.gitea-cli.enable = true;
}

View File

@ -0,0 +1,10 @@
{ lib, pkgs, config, ... }: {
options = {
programs.gitea-cli.enable = lib.mkEnableOption "gitea-cli";
};
config = lib.mkIf config.programs.gitea-cli.enable {
home.packages = with pkgs; [
tea
];
};
}

View File

@ -0,0 +1,3 @@
{ lib, ... }: {
programs.neovim-ide.enable = lib.mkDefault true;
}

View File

@ -0,0 +1,8 @@
_: {
nix = {
extraOptions = ''
keep-outputs = true
keep-derivations = true
'';
};
}

View File

@ -1,14 +0,0 @@
{ pkgs, config, lib, ... }: {
options = {
development.rust.enable = lib.mkEnableOption "rust development";
};
config = lib.mkIf config.development.rust.enable {
home.packages = with pkgs; [
rustc
cargo
rust-analyzer
clippy
rustfmt
];
};
}

14
modules/gui.nix Normal file
View File

@ -0,0 +1,14 @@
{ pkgs, lib, inputs, vars, ... }: with lib; {
imports = [
./gui
./mpd
];
programs.kitty.enable = lib.mkForce true;
news = {
display = "silent";
json = lib.mkForce { };
entries = lib.mkForce [ ];
};
}

View File

@ -1,4 +1,8 @@
{ lib, ... }: {
{ lib, config, ... }: {
options = {
gui.enable = lib.mkEnableOption "gui";
};
config = lib.mkIf config.gui.enable {
imports = [
./firefox.nix
./keepassxc.nix
@ -14,4 +18,5 @@
nextcloud-client.enable = lib.mkDefault false;
udiskie.enable = lib.mkDefault false;
};
};
}

5
modules/shell.nix Normal file
View File

@ -0,0 +1,5 @@
_: {
imports = [
./shell
];
}

View File

@ -2,11 +2,11 @@
home.packages = with pkgs; [ tea ];
programs = {
ssh = {
#addKeysToAgent = "yes";
addKeysToAgent = "yes";
forwardAgent = true;
extraConfig = ''
AddKeysToAgent yes
'';
# extraConfig = ''
# AddKeysToAgent yes
# '';
};
};

View File

@ -2,6 +2,9 @@
programs = {
zoxide = {
enableZshIntegration = true;
options = [
"--cmd cd"
];
};
};
}