diff options
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/home/cli-tools.nix | 12 | ||||
| -rw-r--r-- | modules/home/default.nix | 8 | ||||
| -rw-r--r-- | modules/home/editor.nix | 7 | ||||
| -rw-r--r-- | modules/home/git.nix | 9 | ||||
| -rw-r--r-- | modules/home/shell.nix | 14 | ||||
| -rw-r--r-- | modules/nixos/common.nix | 23 |
6 files changed, 73 insertions, 0 deletions
diff --git a/modules/home/cli-tools.nix b/modules/home/cli-tools.nix new file mode 100644 index 0000000..c489e1c --- /dev/null +++ b/modules/home/cli-tools.nix | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | { pkgs, ... }: | ||
| 2 | { | ||
| 3 | home.packages = with pkgs; [ | ||
| 4 | ripgrep | ||
| 5 | fd | ||
| 6 | bat | ||
| 7 | eza | ||
| 8 | jq | ||
| 9 | fzf | ||
| 10 | tree | ||
| 11 | ]; | ||
| 12 | } | ||
diff --git a/modules/home/default.nix b/modules/home/default.nix new file mode 100644 index 0000000..206a0ad --- /dev/null +++ b/modules/home/default.nix | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | { | ||
| 2 | imports = [ | ||
| 3 | ./git.nix | ||
| 4 | ./shell.nix | ||
| 5 | ./editor.nix | ||
| 6 | ./cli-tools.nix | ||
| 7 | ]; | ||
| 8 | } | ||
diff --git a/modules/home/editor.nix b/modules/home/editor.nix new file mode 100644 index 0000000..b687552 --- /dev/null +++ b/modules/home/editor.nix | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | { | ||
| 2 | programs.neovim = { | ||
| 3 | enable = true; | ||
| 4 | defaultEditor = true; | ||
| 5 | vimAlias = true; | ||
| 6 | }; | ||
| 7 | } | ||
diff --git a/modules/home/git.nix b/modules/home/git.nix new file mode 100644 index 0000000..4eab076 --- /dev/null +++ b/modules/home/git.nix | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | { | ||
| 2 | programs.git = { | ||
| 3 | enable = true; | ||
| 4 | extraConfig = { | ||
| 5 | init.defaultBranch = "main"; | ||
| 6 | pull.rebase = true; | ||
| 7 | }; | ||
| 8 | }; | ||
| 9 | } | ||
diff --git a/modules/home/shell.nix b/modules/home/shell.nix new file mode 100644 index 0000000..406206c --- /dev/null +++ b/modules/home/shell.nix | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | { | ||
| 2 | programs.zsh = { | ||
| 3 | enable = true; | ||
| 4 | autosuggestion.enable = true; | ||
| 5 | syntaxHighlighting.enable = true; | ||
| 6 | }; | ||
| 7 | |||
| 8 | programs.starship.enable = true; | ||
| 9 | |||
| 10 | programs.direnv = { | ||
| 11 | enable = true; | ||
| 12 | nix-direnv.enable = true; | ||
| 13 | }; | ||
| 14 | } | ||
diff --git a/modules/nixos/common.nix b/modules/nixos/common.nix new file mode 100644 index 0000000..5427414 --- /dev/null +++ b/modules/nixos/common.nix | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | { pkgs, lib, ... }: | ||
| 2 | { | ||
| 3 | nix.settings.experimental-features = [ "nix-command" "flakes" ]; | ||
| 4 | |||
| 5 | nix.gc = { | ||
| 6 | automatic = true; | ||
| 7 | dates = "weekly"; | ||
| 8 | options = "--delete-older-than 30d"; | ||
| 9 | }; | ||
| 10 | |||
| 11 | # Per-host configuration.nix can override either of these without | ||
| 12 | # conflicting, since they're set with mkDefault here. | ||
| 13 | time.timeZone = lib.mkDefault "Etc/UTC"; | ||
| 14 | i18n.defaultLocale = lib.mkDefault "en_US.UTF-8"; | ||
| 15 | |||
| 16 | programs.zsh.enable = true; | ||
| 17 | |||
| 18 | users.users.tom = { | ||
| 19 | isNormalUser = true; | ||
| 20 | extraGroups = [ "wheel" ]; | ||
| 21 | shell = pkgs.zsh; | ||
| 22 | }; | ||
| 23 | } | ||
