format everything

This commit is contained in:
Noa Aarts 2024-06-04 12:18:23 +02:00
parent 9c28397d38
commit b54f3d54f1
37 changed files with 1185 additions and 1173 deletions

View file

@ -1,28 +1,28 @@
{ lib, config, pkgs, ... }:
let
cfg = config.modules.apps;
cfg = config.modules.apps;
in
{
options.modules.apps = {
enable = lib.mkEnableOption "enable desktop applications";
};
options.modules.apps = {
enable = lib.mkEnableOption "enable desktop applications";
};
imports = [
./firefox.nix
./git.nix
./kitty.nix
./zsh.nix
];
imports = [
./firefox.nix
./git.nix
./kitty.nix
./zsh.nix
];
config = lib.mkIf cfg.enable {
modules.apps = {
firefox.enable = true;
git.enable = true;
kitty.enable = true;
zsh = {
enable = true;
enableAliases = true;
};
};
};
config = lib.mkIf cfg.enable {
modules.apps = {
firefox.enable = true;
git.enable = true;
kitty.enable = true;
zsh = {
enable = true;
enableAliases = true;
};
};
};
}

View file

@ -1,17 +1,17 @@
{ lib, config, pkgs, ... }:
let
cfg = config.modules.apps.firefox;
let
cfg = config.modules.apps.firefox;
in
{
options.modules.apps.firefox = {
enable = lib.mkEnableOption "enable firefox";
};
options.modules.apps.firefox = {
enable = lib.mkEnableOption "enable firefox";
};
config = lib.mkIf cfg.enable {
programs.firefox = {
enable = true;
# TODO: add some default firefox settings
};
};
config = lib.mkIf cfg.enable {
programs.firefox = {
enable = true;
# TODO: add some default firefox settings
};
};
}

View file

@ -1,34 +1,34 @@
{ lib, config, pkgs, ... }:
let
cfg = config.modules.apps.git;
let
cfg = config.modules.apps.git;
in
{
options.modules.apps.git = {
enable = lib.mkEnableOption "enable git";
name = lib.mkOption {
example = "Jill Doe";
description = "the git user Name";
type = lib.types.str;
};
email = lib.mkOption {
example = "jilldoe@test.local";
description = "the git user Name";
type = lib.types.str;
};
};
options.modules.apps.git = {
enable = lib.mkEnableOption "enable git";
name = lib.mkOption {
example = "Jill Doe";
description = "the git user Name";
type = lib.types.str;
};
email = lib.mkOption {
example = "jilldoe@test.local";
description = "the git user Name";
type = lib.types.str;
};
};
config = lib.mkIf cfg.enable {
programs.git = {
enable = true;
userName = cfg.name;
userEmail = cfg.email;
extraConfig = {
init = { defaultBranch = "main"; };
safe.directory = "/etc/nixos";
pull.rebase = false;
};
};
};
config = lib.mkIf cfg.enable {
programs.git = {
enable = true;
userName = cfg.name;
userEmail = cfg.email;
extraConfig = {
init = { defaultBranch = "main"; };
safe.directory = "/etc/nixos";
pull.rebase = false;
};
};
};
}

View file

@ -1,19 +1,19 @@
{ lib, config, pkgs, ... }:
let
cfg = config.modules.apps.kitty;
let
cfg = config.modules.apps.kitty;
in
{
options.modules.apps.kitty = {
enable = lib.mkEnableOption "enable the kitty terminal emulator";
};
options.modules.apps.kitty = {
enable = lib.mkEnableOption "enable the kitty terminal emulator";
};
config = lib.mkIf cfg.enable {
programs.kitty = {
enable = true;
settings = {
confirm_os_window_close = 0;
};
shellIntegration.enableZshIntegration = true;
};
};
config = lib.mkIf cfg.enable {
programs.kitty = {
enable = true;
settings = {
confirm_os_window_close = 0;
};
shellIntegration.enableZshIntegration = true;
};
};
}

View file

@ -1,39 +1,39 @@
{ lib, config, pkgs, ... }:
let
cfg = config.modules.apps.zsh;
let
cfg = config.modules.apps.zsh;
in
{
options.modules.apps.zsh = {
enable = lib.mkEnableOption "enable zsh with oh-my-zsh";
enableAliases = lib.mkEnableOption "whether to enable shellAliases";
};
options.modules.apps.zsh = {
enable = lib.mkEnableOption "enable zsh with oh-my-zsh";
enableAliases = lib.mkEnableOption "whether to enable shellAliases";
};
config = lib.mkIf cfg.enable {
programs.direnv = {
enable=true;
enableZshIntegration=true;
nix-direnv.enable=true;
};
programs.zsh = {
enable=true;
shellAliases = lib.mkIf cfg.enableAliases {
ll = "lsd -l";
lt = "lsd -l --tree";
update = "nix flake update --commit-lock-file $HOME/nixos && sudo nixos-rebuild switch --flake $HOME/nixos";
};
initExtra = ''
[[ ! -r /home/noa/.opam/opam-init/init.zsh ]] || source /home/noa/.opam/opam-init/init.zsh > /dev/null 2> /dev/null
'';
history = {
path = "${config.xdg.dataHome}/zsh/history";
size = 10000;
};
oh-my-zsh = {
enable = true;
plugins = [ "git" ];
theme = "frisk";
};
};
};
config = lib.mkIf cfg.enable {
programs.direnv = {
enable = true;
enableZshIntegration = true;
nix-direnv.enable = true;
};
programs.zsh = {
enable = true;
shellAliases = lib.mkIf cfg.enableAliases {
ll = "lsd -l";
lt = "lsd -l --tree";
update = "nix flake update --commit-lock-file $HOME/nixos && sudo nixos-rebuild switch --flake $HOME/nixos";
};
initExtra = ''
[[ ! -r /home/noa/.opam/opam-init/init.zsh ]] || source /home/noa/.opam/opam-init/init.zsh > /dev/null 2> /dev/null
'';
history = {
path = "${config.xdg.dataHome}/zsh/history";
size = 10000;
};
oh-my-zsh = {
enable = true;
plugins = [ "git" ];
theme = "frisk";
};
};
};
}