mwahahahaha, have the orome config building! on to manwe
This commit is contained in:
parent
3a2f52f45e
commit
af58cfb4ab
30 changed files with 259 additions and 199 deletions
|
@ -27,7 +27,7 @@ in {
|
|||
};
|
||||
|
||||
config = mkMerge [
|
||||
(mkIf (config.modules.desktop.type == "wayland") {
|
||||
(mkIf (config.modules.${user}.desktop.type == "wayland") {
|
||||
environment.variables.MOZ_ENABLE_WAYLAND = "1";
|
||||
})
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ in {
|
|||
};
|
||||
|
||||
config = mkMerge [
|
||||
(mkIf (config.modules.desktop.type == "wayland") {
|
||||
(mkIf (config.modules.${user}.desktop.type == "wayland") {
|
||||
environment.variables.MOZ_ENABLE_WAYLAND = "1";
|
||||
})
|
||||
|
||||
|
|
|
@ -3,18 +3,18 @@ let
|
|||
inherit (lib.meta) getExe;
|
||||
inherit (lib.modules) mkIf;
|
||||
|
||||
cfg = options.modules.${user}.desktop.editors.nvim;
|
||||
cfg = config.modules.${user}.desktop.editors.nvim;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
inputs.nvf.nixosModules.default
|
||||
];
|
||||
|
||||
options.modules.${user}.desktop.editors.nvim = let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
in { enable = mkEnableOption "neo-vim (nixvim)"; };
|
||||
in {
|
||||
enable = mkEnableOption "neo-vim (nixvim)";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
modules.desktop.editors.nvim.enable = true;
|
||||
|
||||
home-manager.users.${user}.programs.nvf = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
|
|
@ -14,8 +14,8 @@ in {
|
|||
inherit (lib.options) mkEnableOption;
|
||||
in { enable = mkEnableOption "OpenGL terminal emulator"; };
|
||||
|
||||
config = mkIf config.${user}.modules.desktop.terminal.alacritty.enable {
|
||||
modules.shell.toolset.tmux.enable = true;
|
||||
config = mkIf config.modules.${user}.desktop.terminal.alacritty.enable {
|
||||
modules.${user}.shell.toolset.tmux.enable = true;
|
||||
|
||||
home-manager.users.${user}.programs.alacritty = {
|
||||
enable = true;
|
||||
|
|
|
@ -21,8 +21,8 @@ in
|
|||
})
|
||||
|
||||
(mkIf config.modules.develop.xdg.enable {
|
||||
home = {
|
||||
};
|
||||
# home = {
|
||||
# };
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
|
@ -22,23 +22,17 @@ in
|
|||
(mkIf (cfg.default != null) {
|
||||
users.defaultUserShell = pkgs."${cfg.default}";
|
||||
|
||||
modules.shell.toolset.gnupg.enable = true;
|
||||
# modules.${user}.shell.toolset.gnupg.enable = true;
|
||||
})
|
||||
|
||||
(mkIf cfg.corePkgs.enable {
|
||||
modules.shell.toolset = {
|
||||
modules.${user}.shell.toolset = {
|
||||
btop.enable = true;
|
||||
fzf.enable = true;
|
||||
starship.enable = true;
|
||||
tmux.enable = true;
|
||||
};
|
||||
|
||||
home-manager.users.${user}.programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
config.whitelist.prefix = ["/home"];
|
||||
};
|
||||
|
||||
user.packages = attrValues {
|
||||
inherit (pkgs) any-nix-shell pwgen yt-dlp ripdrag yazi;
|
||||
inherit (pkgs) bat fd zoxide;
|
||||
|
@ -47,6 +41,12 @@ in
|
|||
};
|
||||
|
||||
home-manager.users.${user}.programs = {
|
||||
direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
config.whitelist.prefix = ["/home"];
|
||||
};
|
||||
|
||||
bat.enable = true;
|
||||
eza.enable = true;
|
||||
fzf.enable = true;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, options, lib, pkgs, ... }:
|
||||
{ config, options, lib, pkgs, user, ... }:
|
||||
let
|
||||
inherit (lib.attrsets) optionalAttrs;
|
||||
inherit (lib.modules) mkIf;
|
||||
|
@ -10,7 +10,7 @@ in
|
|||
|
||||
config = mkIf config.modules.${user}.shell.toolset.fzf.enable {
|
||||
home-manager.users.${user}.programs.fzf = let
|
||||
defShell = config.modules.shell.default;
|
||||
defShell = config.modules.${user}.shell.default;
|
||||
in {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
|
|
|
@ -14,7 +14,7 @@ in
|
|||
inherit (pkgs) act dura lazygit;
|
||||
inherit (pkgs.gitAndTools) gh git-open;
|
||||
}
|
||||
// optionalAttrs config.modules.shell.toolset.gnupg.enable {
|
||||
// optionalAttrs config.modules.${user}.shell.toolset.gnupg.enable {
|
||||
inherit (pkgs.gitAndTools) git-crypt;
|
||||
});
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, options, lib, pkgs, ... }:
|
||||
{ config, options, lib, pkgs, user, ... }:
|
||||
let
|
||||
inherit (builtins) getEnv;
|
||||
inherit (lib.modules) mkIf;
|
||||
|
@ -8,23 +8,31 @@ in
|
|||
{
|
||||
options.modules.${user}.shell.toolset.gnupg = let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
in { enable = mkEnableOption "cryptographic suite"; };
|
||||
in {
|
||||
enable = mkEnableOption "cryptographic suite";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
user.package = with pkgs; [ gnupg ];
|
||||
|
||||
config = mkIf config.modules.shell.toolset.gnupg.enable {
|
||||
environment.variables.GNUPGHOME = "$XDG_CONFIG_HOME/gnupg";
|
||||
|
||||
home-manager.users.${user}.programs.gnupg.agent = {
|
||||
home-manager.users.${user}.programs.gnupg = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
pinentryPackage = pkgs.pinentry-gnome3;
|
||||
|
||||
settings = let
|
||||
cacheTTL = 86400;
|
||||
in {
|
||||
default-cache-ttl = cacheTTL;
|
||||
default-cache-ttl-ssh = cacheTTL;
|
||||
max-cache-ttl = cacheTTL;
|
||||
max-cache-ttl-ssh = cacheTTL;
|
||||
agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
pinentryPackage = pkgs.pinentry-gnome3;
|
||||
|
||||
settings = let
|
||||
cacheTTL = 86400;
|
||||
in {
|
||||
default-cache-ttl = cacheTTL;
|
||||
default-cache-ttl-ssh = cacheTTL;
|
||||
max-cache-ttl = cacheTTL;
|
||||
max-cache-ttl-ssh = cacheTTL;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,99 +1,104 @@
|
|||
{ config, options, pkgs, lib, ... }:
|
||||
{ config, options, pkgs, lib, user, ... }:
|
||||
let
|
||||
inherit (lib.attrsets) mapAttrsToList;
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.strings) concatStrings escapeNixString;
|
||||
|
||||
cfg = config.modules.shell;
|
||||
cfg = config.modules.${user}.shell;
|
||||
in
|
||||
{
|
||||
config = mkIf (cfg.default == "zsh") {
|
||||
modules.shell = {
|
||||
corePkgs.enable = true;
|
||||
toolset = {
|
||||
starship.enable = true;
|
||||
};
|
||||
};
|
||||
modules.shell.zsh.enable = true;
|
||||
|
||||
home-manager.users.${user}.programs.starship.enableZshIntegration = true;
|
||||
modules.${user}.shell = {
|
||||
corePkgs.enable = true;
|
||||
};
|
||||
|
||||
# Enable completion for sys-packages:
|
||||
environment.pathsToLink = ["/share/zsh"];
|
||||
|
||||
home-manager.users.${user}.programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
autosuggestion.enable = true;
|
||||
|
||||
history = {
|
||||
size = 10000;
|
||||
path = "$XDG_CONFIG_HOME/zsh/history";
|
||||
home-manager.users.${user} = {
|
||||
xdg.configFile."zsh-abbreviations" = {
|
||||
target = "zsh/abbreviations";
|
||||
text = let
|
||||
abbrevs = {
|
||||
ls = "eza -al";
|
||||
};
|
||||
in ''
|
||||
${concatStrings (mapAttrsToList
|
||||
(k: v: "abbr ${k}=${escapeNixString v}")
|
||||
abbrevs
|
||||
)}
|
||||
'';
|
||||
};
|
||||
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
plugins = ["git" "docker-compose" "zoxide"];
|
||||
};
|
||||
programs = {
|
||||
starship.enableZshIntegration = true;
|
||||
|
||||
plugins = let
|
||||
mkZshPlugin = {
|
||||
pkg,
|
||||
file ? "${pkg.pname}.plugin.zsh",
|
||||
}: {
|
||||
name = pkg.pname;
|
||||
src = pkg.src;
|
||||
inherit file;
|
||||
zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
autosuggestion.enable = true;
|
||||
|
||||
history = {
|
||||
size = 10000;
|
||||
path = "$XDG_CONFIG_HOME/zsh/history";
|
||||
};
|
||||
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
plugins = ["git" "docker-compose" "zoxide"];
|
||||
};
|
||||
|
||||
plugins = let
|
||||
mkZshPlugin = {
|
||||
pkg,
|
||||
file ? "${pkg.pname}.plugin.zsh",
|
||||
}: {
|
||||
name = pkg.pname;
|
||||
src = pkg.src;
|
||||
inherit file;
|
||||
};
|
||||
in
|
||||
with pkgs; [
|
||||
(mkZshPlugin {pkg = zsh-abbr;})
|
||||
(mkZshPlugin {pkg = zsh-autopair;})
|
||||
(mkZshPlugin {pkg = zsh-you-should-use;})
|
||||
(mkZshPlugin {
|
||||
pkg = zsh-nix-shell;
|
||||
file = "nix-shell.plugin.zsh";
|
||||
})
|
||||
|
||||
{
|
||||
name = "zsh-autosuggestion";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "zsh-users";
|
||||
repo = "zsh-autosuggestions";
|
||||
rev = "v0.7.0";
|
||||
sha256 = "1g3pij5qn2j7v7jjac2a63lxd97mcsgw6xq6k5p7835q9fjiid98";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "zsh-completions";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "zsh-users";
|
||||
repo = "zsh-completions";
|
||||
rev = "0.34.0";
|
||||
sha256 = "0jjgvzj3v31yibjmq50s80s3sqi4d91yin45pvn3fpnihcrinam9";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "zsh-syntax-highlighting";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "zsh-users";
|
||||
repo = "zsh-syntax-highlighting";
|
||||
rev = "0.7.0";
|
||||
sha256 = "0s1z3whzwli5452h2yzjzzj27pf1hd45g223yv0v6hgrip9f853r";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
in
|
||||
with pkgs; [
|
||||
(mkZshPlugin {pkg = zsh-abbr;})
|
||||
(mkZshPlugin {pkg = zsh-autopair;})
|
||||
(mkZshPlugin {pkg = zsh-you-should-use;})
|
||||
(mkZshPlugin {
|
||||
pkg = zsh-nix-shell;
|
||||
file = "nix-shell.plugin.zsh";
|
||||
})
|
||||
|
||||
{
|
||||
name = "zsh-autosuggestion";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "zsh-users";
|
||||
repo = "zsh-autosuggestions";
|
||||
rev = "v0.7.0";
|
||||
sha256 = "1g3pij5qn2j7v7jjac2a63lxd97mcsgw6xq6k5p7835q9fjiid98";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "zsh-completions";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "zsh-users";
|
||||
repo = "zsh-completions";
|
||||
rev = "0.34.0";
|
||||
sha256 = "0jjgvzj3v31yibjmq50s80s3sqi4d91yin45pvn3fpnihcrinam9";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "zsh-syntax-highlighting";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "zsh-users";
|
||||
repo = "zsh-syntax-highlighting";
|
||||
rev = "0.7.0";
|
||||
sha256 = "0s1z3whzwli5452h2yzjzzj27pf1hd45g223yv0v6hgrip9f853r";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
home-manager.users.${user}.xdg.configFile."zsh-abbreviations" = {
|
||||
target = "zsh/abbreviations";
|
||||
text = let
|
||||
abbrevs = import "${config.sneeuwvlok.configDir}/shell-abbr";
|
||||
in ''
|
||||
${concatStrings (mapAttrsToList
|
||||
(k: v: "abbr ${k}=${escapeNixString v}")
|
||||
abbrevs
|
||||
)}
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -9,9 +9,6 @@ let
|
|||
cfg = config.modules.${user}.themes;
|
||||
desktop = config.modules.${user}.desktop;
|
||||
in {
|
||||
imports = [
|
||||
inputs.stylix.nixosModules.stylix
|
||||
];
|
||||
|
||||
options.modules.${user}.themes = let
|
||||
inherit (lib.options) mkOption mkEnableOption;
|
||||
|
@ -34,6 +31,8 @@ in {
|
|||
};
|
||||
|
||||
config = mkIf (cfg.enable) {
|
||||
modules.theming.enable = true;
|
||||
|
||||
stylix = {
|
||||
enable = true;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue