52 Commits

Author SHA1 Message Date
450118d234 remove dead code with deadnix 2023-02-20 20:45:56 -05:00
cc84f1d37a move nixos and darwin back into modules dir 2023-02-20 20:37:37 -05:00
ded498f4c9 switch from uuid to label disks 2023-02-20 20:30:45 -05:00
0d0ee1fc5a improve readme clarity 2023-02-20 20:26:14 -05:00
251dce68bb remove mitm ssl instructions 2023-02-20 20:13:52 -05:00
448c97665b move public-keys to root directory 2023-02-20 20:02:21 -05:00
86aa02aae4 rename patches directory to overlays 2023-02-20 20:00:54 -05:00
6cd22bc7ce remove bypass-paywalls-clean
no longer available from mozilla extensions
2023-02-20 17:49:19 -05:00
048de4772c rename 1password module with underscore 2023-02-20 17:49:00 -05:00
700e59e6c8 update outdated readme 2023-02-20 17:48:11 -05:00
07e0afa1e9 fix: iso generating 2023-02-20 17:32:14 -05:00
6577b9e49b initial setup for swan and staff 2023-02-18 10:24:54 -05:00
58a0e6166d allow reading windows ntfs drives 2023-02-17 18:15:23 -05:00
e8c5a10df7 attempt to set default apps for xdg-open 2023-02-17 18:14:57 -05:00
37fa835c66 update lockfile, host name updates 2023-02-12 21:26:12 -05:00
fa69557ced change hostname theme 2023-02-11 14:35:38 +00:00
a9a06fb5fc fix steam games not launching 2023-02-05 17:16:20 -05:00
ceaad9d186 update lockfile, fix age not building 2023-02-02 11:01:12 -05:00
521937e366 fix desktop for new pc build 2023-01-31 09:07:47 -05:00
8915f17ea3 fixes for latest wsl 2023-01-28 15:36:52 +00:00
17799909b2 fix: polybar not showing i3 workspaces 2023-01-21 19:46:56 -05:00
7a4c3b930d firefox working again
still polybar is broken
2023-01-21 10:44:39 -05:00
e7bbee5da0 fix desktop to work with refactor 2023-01-21 09:29:03 -05:00
2dda6a31bd update lockfile, fix treesitter for terraform filetypes 2023-01-09 13:09:12 -05:00
e4d76189e6 update lockfile 2023-01-06 15:46:59 -05:00
0bc8a233d8 enable missing neovim for macbook 2022-12-21 17:48:53 -07:00
524a5aa347 enable missing configs for oracle 2022-12-22 00:47:25 +00:00
b4ddb149cc fix: bad references for server linux 2022-12-22 00:31:25 +00:00
d021baa1bb split nixos from darwin
required because they don't share all attributes
2022-12-21 17:07:58 -07:00
7063bd5f7a fixes for module layout 2022-12-21 14:38:34 -07:00
d040077d3a convert to proper module layout 2022-12-21 14:18:03 -07:00
bf1d2f1e9e update lockfile 2022-12-20 18:23:00 -07:00
fd7c523ebd try to disable splash screen when updating firefox 2022-12-20 18:22:41 -07:00
1b32457956 fix: update dock for hammerspoon shortcuts 2022-12-20 18:22:24 -07:00
50acdd0c58 update packages 2022-12-18 22:19:56 -07:00
a0c99a8449 fix: remove print crowding the hammerspoon log 2022-12-18 17:24:58 -07:00
d1b144f441 upgrade macos to ventura 2022-12-13 21:02:42 -07:00
adb7956213 fixes for python lsp 2022-12-11 09:52:32 -07:00
e011a1c6f1 page readme app 2022-12-10 15:48:15 -07:00
1d8638777c enable rebuild app command 2022-12-10 15:48:05 -07:00
2620b43925 fix firefox colors on macos 2022-12-10 15:47:39 -07:00
7d53a80d49 add gum formatting for default app 2022-12-06 17:40:13 -07:00
9b12369e43 fixes for oracle when updating to latest 2022-12-06 17:56:29 +00:00
427bd1a421 update sources for nixos 22.11 2022-12-06 10:03:06 -07:00
74e346fa63 fix: bad command for terraform-ls 2022-11-30 10:56:30 -07:00
4a803427fb Merge branch 'k9s-color' 2022-11-30 07:39:05 -07:00
d127ccacb0 add declarative k9s color 2022-11-29 23:07:45 -07:00
54e89d3acd add neovim as nix app 2022-11-29 20:48:46 -07:00
b258a40181 working flake build of neovim 2022-11-29 20:40:15 -07:00
650d1e91a2 only remove firefox quit shortcut on linux 2022-11-29 17:41:34 -07:00
d86534727e start of a WIP rebuild app 2022-11-27 13:10:22 -07:00
13e5b9ddc5 brewfile syntax no longer needed 2022-11-27 13:10:01 -07:00
218 changed files with 2057 additions and 1628 deletions

View File

@ -1,3 +1,5 @@
# System Configurations
This repository contains configuration files for my NixOS, macOS, and WSL This repository contains configuration files for my NixOS, macOS, and WSL
hosts. hosts.
@ -6,15 +8,31 @@ configuration may be difficult to translate to a non-Nix system.
However, some of the configurations are easier to lift directly: However, some of the configurations are easier to lift directly:
- [Neovim](https://github.com/nmasur/dotfiles/tree/master/modules/neovim/lua) - [Neovim](https://github.com/nmasur/dotfiles/tree/master/modules/common/neovim/config)
- [Fish functions](https://github.com/nmasur/dotfiles/tree/master/modules/shell/fish/functions) - [Fish functions](https://github.com/nmasur/dotfiles/tree/master/modules/common/shell/fish/functions)
- [More fish aliases](https://github.com/nmasur/dotfiles/blob/master/modules/shell/fish/default.nix) - [More fish aliases](https://github.com/nmasur/dotfiles/blob/master/modules/common/shell/fish/default.nix)
- [Git aliases](https://github.com/nmasur/dotfiles/blob/master/modules/shell/git.nix) - [Git aliases](https://github.com/nmasur/dotfiles/blob/master/modules/common/shell/git.nix)
- [Hammerspoon](https://github.com/nmasur/dotfiles/tree/master/modules/darwin/hammerspoon) - [Hammerspoon](https://github.com/nmasur/dotfiles/tree/master/modules/darwin/hammerspoon)
Try out my Neovim config (requires [nix](https://nixos.org/download.html)):
```bash
nix run github:nmasur/dotfiles#neovim
```
Or build it as a package (requires [nix](https://nixos.org/download.html)):
```bash
nix build github:nmasur/dotfiles#neovim
```
If you already have a Neovim configuration, you may need to move it out of
`~/.config/nvim` or set `XDG_CONFIG_HOME` to another value; otherwise both
configs might conflict with each other.
--- ---
# Installation # Full Installation
## NixOS - From Live Disk ## NixOS - From Live Disk
@ -26,7 +44,7 @@ installer disk:
```bash ```bash
lsblk # Choose the disk you want to wipe lsblk # Choose the disk you want to wipe
nix-shell -p nixVersions.stable nix-shell -p nixVersions.stable
nix run github:nmasur/dotfiles#installer -- nvme0n1 desktop nix run github:nmasur/dotfiles#installer -- nvme0n1 tempest
``` ```
## NixOS - From Existing System ## NixOS - From Existing System
@ -36,7 +54,7 @@ following command:
```bash ```bash
nix-shell -p nixVersions.stable nix-shell -p nixVersions.stable
sudo nixos-rebuild switch --flake github:nmasur/dotfiles#desktop sudo nixos-rebuild switch --flake github:nmasur/dotfiles#tempest
``` ```
## Windows - From NixOS WSL ## Windows - From NixOS WSL
@ -47,7 +65,7 @@ the WSL configuration:
``` ```
nix-shell -p nixVersions.stable nix-shell -p nixVersions.stable
sudo nixos-rebuild switch --flake github:nmasur/dotfiles#wsl sudo nixos-rebuild switch --flake github:nmasur/dotfiles#hydra
``` ```
You should also download the You should also download the
@ -74,25 +92,9 @@ nix-build https://github.com/LnL7/nix-darwin/archive/master.tar.gz -A installer
Then switch to the macOS configuration: Then switch to the macOS configuration:
```bash ```bash
darwin-rebuild switch --flake github:nmasur/dotfiles#macbook darwin-rebuild switch --flake github:nmasur/dotfiles#lookingglass
``` ```
### Dealing with corporate MITM SSL certificates:
```bash
# Get the certificates
openssl s_client -showcerts -verify 5 -connect cache.nixos.org:443 < /dev/null
# Paste them in here
sudo nvim $NIX_SSL_CERT_FILE
```
### Dealing with Neovim issues:
Update Neovim Packer plugins: `:PackerSync`
Update TreeSitter languages: `:TSUpdateSync`
--- ---
# Flake Templates # Flake Templates

View File

@ -1,6 +1,25 @@
{ pkgs, ... }: rec { { pkgs, ... }: rec {
default = readme; default = {
type = "app";
program = builtins.toString (pkgs.writeShellScript "default" ''
${pkgs.gum}/bin/gum style --margin "1 2" --padding "0 2" --foreground "15" --background "55" "Options"
${pkgs.gum}/bin/gum format --type=template -- ' {{ Italic "Run with" }} {{ Color "15" "69" " nix run github:nmasur/dotfiles#" }}{{ Color "15" "62" "someoption" }}{{ Color "15" "69" " " }}.'
echo ""
echo ""
${pkgs.gum}/bin/gum format --type=template -- \
' {{ Color "15" "57" " readme " }} {{ Italic "Documentation for this repository." }}' \
' {{ Color "15" "57" " rebuild " }} {{ Italic "Switch to this configuration." }}' \
' {{ Color "15" "57" " installer " }} {{ Italic "Format and install from nothing." }}' \
' {{ Color "15" "57" " neovim " }} {{ Italic "Test out the Neovim package." }}' \
' {{ Color "15" "57" " loadkey " }} {{ Italic "Load an ssh key for this machine using melt." }}' \
' {{ Color "15" "57" " encrypt-secret " }} {{ Italic "Encrypt a secret for all machines." }}' \
' {{ Color "15" "57" " reencrypt-secrets " }} {{ Italic "Reencrypt all secrets when new machine is added." }}' \
' {{ Color "15" "57" " netdata " }} {{ Italic "Connect a machine to Netdata cloud." }}'
echo ""
echo ""
'');
};
# Format and install from nothing # Format and install from nothing
installer = import ./installer.nix { inherit pkgs; }; installer = import ./installer.nix { inherit pkgs; };
@ -8,6 +27,20 @@
# Display the readme for this repository # Display the readme for this repository
readme = import ./readme.nix { inherit pkgs; }; readme = import ./readme.nix { inherit pkgs; };
# Rebuild
rebuild = {
type = "app";
program = builtins.toString (pkgs.writeShellScript "rebuild" ''
echo ${pkgs.system}
SYSTEM=${if pkgs.stdenv.isDarwin then "darwin" else "linux"}
if [ "$SYSTEM" == "darwin" ]; then
darwin-rebuild switch --flake github:nmasur/dotfiles#lookingglass
else
nixos-rebuild switch --flake github:nmasur/dotfiles
fi
'');
};
# Load the SSH key for this machine # Load the SSH key for this machine
loadkey = import ./loadkey.nix { inherit pkgs; }; loadkey = import ./loadkey.nix { inherit pkgs; };
@ -20,4 +53,18 @@
# Connect machine metrics to Netdata Cloud # Connect machine metrics to Netdata Cloud
netdata = import ./netdata-cloud.nix { inherit pkgs; }; netdata = import ./netdata-cloud.nix { inherit pkgs; };
# Run neovim as an app
neovim = {
type = "app";
program = "${
(import ../modules/common/neovim/package {
inherit pkgs;
colors =
import ../colorscheme/gruvbox/neovim-gruvbox.nix { inherit pkgs; };
})
}/bin/nvim";
};
nvim = neovim;
} }

View File

@ -11,7 +11,7 @@
tmpfile=$(mktemp) tmpfile=$(mktemp)
echo "''${secret}" > ''${tmpfile} echo "''${secret}" > ''${tmpfile}
${pkgs.age}/bin/age --encrypt --armor --recipients-file ${ ${pkgs.age}/bin/age --encrypt --armor --recipients-file ${
builtins.toString ../hosts/public-keys builtins.toString ../public-keys
} $tmpfile } $tmpfile
rm $tmpfile rm $tmpfile
''); '');

View File

@ -3,7 +3,7 @@
type = "app"; type = "app";
program = builtins.toString (pkgs.writeShellScript "readme" '' program = builtins.toString (pkgs.writeShellScript "readme" ''
${pkgs.glow}/bin/glow ${builtins.toString ../README.md} ${pkgs.glow}/bin/glow --pager ${builtins.toString ../README.md}
''); '');
} }

View File

@ -17,7 +17,7 @@
--identity ~/.ssh/id_ed25519 $encryptedfile > $tmpfile --identity ~/.ssh/id_ed25519 $encryptedfile > $tmpfile
echo "Encrypting ''${encryptedfile}..." echo "Encrypting ''${encryptedfile}..."
${pkgs.age}/bin/age --encrypt --armor --recipients-file ${ ${pkgs.age}/bin/age --encrypt --armor --recipients-file ${
builtins.toString ../hosts/public-keys builtins.toString ../public-keys
} $tmpfile > $encryptedfile } $tmpfile > $encryptedfile
rm $tmpfile rm $tmpfile
done done

157
flake.lock generated
View File

@ -3,11 +3,11 @@
"Comment-nvim-src": { "Comment-nvim-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1668781964, "lastModified": 1674040818,
"narHash": "sha256-po1MyuuOH3e8yJTAtkxnusFSJuNpQnjpe+zfWPoO62E=", "narHash": "sha256-7UtZAE9tPlnpeHS2LLol/LGVOxptDXNKWXHNHvFBNk4=",
"owner": "numToStr", "owner": "numToStr",
"repo": "Comment.nvim", "repo": "Comment.nvim",
"rev": "5f01c1a89adafc52bf34e3bf690f80d9d726715d", "rev": "eab2c83a0207369900e92783f56990808082eac2",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -19,11 +19,11 @@
"bufferline-nvim-src": { "bufferline-nvim-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1668632062, "lastModified": 1676130961,
"narHash": "sha256-qGl1jwBaMFWsrth7F20KrfJpyVENF8GEOJsVBBcSTVA=", "narHash": "sha256-3LT45i0eSMfUV9EBrtdtzHxFKRATIhRy/faDd3lI3mA=",
"owner": "akinsho", "owner": "akinsho",
"repo": "bufferline.nvim", "repo": "bufferline.nvim",
"rev": "4ecfa81e470a589e74adcde3d5bb1727dd407363", "rev": "84b0822b2af478d0b4f7b0f9249ca218855331db",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -35,11 +35,11 @@
"cmp-nvim-lsp-src": { "cmp-nvim-lsp-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1668566979, "lastModified": 1675708067,
"narHash": "sha256-Mqkp8IH/laUx0cK7S0BjusTT+OtOOJOamZM4+93RHdU=", "narHash": "sha256-DxpcPTBlvVP88PDoTheLV2fC76EXDqS2UpM5mAfj/D4=",
"owner": "hrsh7th", "owner": "hrsh7th",
"repo": "cmp-nvim-lsp", "repo": "cmp-nvim-lsp",
"rev": "59224771f91b86d1de12570b4070fe4ad7cd1eeb", "rev": "0e6b2ed705ddcff9738ec4ea838141654f12eeef",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -55,11 +55,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1666776005, "lastModified": 1673295039,
"narHash": "sha256-HwSMF19PpczfqNHKcFsA6cF4PVbG00uUSdbq6q3jB5o=", "narHash": "sha256-AsdYgE8/GPwcelGgrntlijMg4t3hLFJFCRF3tL5WVjA=",
"owner": "lnl7", "owner": "lnl7",
"repo": "nix-darwin", "repo": "nix-darwin",
"rev": "f6648ca0698d1611d7eadfa72b122252b833f86c", "rev": "87b9d090ad39b25b2400029c64825fc2a8868943",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -74,11 +74,11 @@
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1668992358, "lastModified": 1675471726,
"narHash": "sha256-24iH+wIbE1bKCFmqslwOpfrDypJ40mk1uGIqRUxDXxY=", "narHash": "sha256-526iHwidfdtZZ7aAU9od1/zbyfSFBEailBTet+Gvfqg=",
"owner": "bandithedoge", "owner": "bandithedoge",
"repo": "nixpkgs-firefox-darwin", "repo": "nixpkgs-firefox-darwin",
"rev": "066d4fd658acd075b45405eda9e3bca6a71a47b1", "rev": "813d55a3e3b3c0423eb5d1fcb4bf82197c9f7796",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -90,11 +90,11 @@
"flake-compat": { "flake-compat": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1650374568, "lastModified": 1673956053,
"narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=", "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra", "owner": "edolstra",
"repo": "flake-compat", "repo": "flake-compat",
"rev": "b4a34015c698c7793d592d66adbab377907a2be8", "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -135,11 +135,11 @@
}, },
"flake-utils_3": { "flake-utils_3": {
"locked": { "locked": {
"lastModified": 1659877975, "lastModified": 1667395993,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -156,11 +156,11 @@
"utils": "utils" "utils": "utils"
}, },
"locked": { "locked": {
"lastModified": 1666903647, "lastModified": 1675935446,
"narHash": "sha256-sFI1Gh9DTGzHnBINondupUGYbe+T0wZcpcZjkW0qffM=", "narHash": "sha256-WajulTn7QdwC7QuXRBavrANuIXE5z+08EdxdRw1qsNs=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "213a06295dff96668a1d673b9fd1c03ce1de6745", "rev": "2dce7f1a55e785a22d61668516df62899278c9e4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -177,11 +177,11 @@
"rust-overlay": "rust-overlay" "rust-overlay": "rust-overlay"
}, },
"locked": { "locked": {
"lastModified": 1669391194, "lastModified": 1676110678,
"narHash": "sha256-4oWcXqyBYPHF+Wt8AxRhWk70O1qVJPkyBw2IhxJtj6k=", "narHash": "sha256-hemg8rMKS2me2Wua9ZG/0aQ8fEOfytjyKB+WYcXfEKE=",
"owner": "oxalica", "owner": "oxalica",
"repo": "nil", "repo": "nil",
"rev": "afec5fed829ee193de7e8c62e1fb4bd55140f4ac", "rev": "ce2e0b5d60fe497134050796f7d12ffb6b50eb28",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -198,11 +198,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1666021730, "lastModified": 1673891598,
"narHash": "sha256-eXd9bqYleh+BZsUybKCj7rNhnwoV0tzsuGGXKmW/+NA=", "narHash": "sha256-EevceKxQtA+I0XVA8tBGKmYV1V1KbWc3gsswysMzeDk=",
"owner": "gytis-ivaskevicius", "owner": "gytis-ivaskevicius",
"repo": "nix2vim", "repo": "nix2vim",
"rev": "f3b56da72278cd720fe7fb4b6d001047b7179669", "rev": "5b31eb81e2c6c74f9e8a4911660f3bf585d55158",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -234,11 +234,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1666812839, "lastModified": 1674666581,
"narHash": "sha256-0nBDgjPU+iDsvz89W+cDEyhnFGSwCJmwDl/gMGqYiU0=", "narHash": "sha256-KNI2s/xrL7WOYaPJAWKBtb7cCH3335rLfsL+B+ssuGY=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixos-generators", "repo": "nixos-generators",
"rev": "41f3518bc194389df22a3d198215eae75e6b5ab9", "rev": "6a5dc1d3d557ea7b5c19b15ff91955124d0400fa",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -265,11 +265,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1669597967, "lastModified": 1675309347,
"narHash": "sha256-R+2NaDkXsYkOpFOhmVR8jBZ77Pq55Z6ilaqwFLLn000=", "narHash": "sha256-D3CQ6HRDT2m3XJlrzb5jKq4vNFR5xFTEFKC7iSjlFpM=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "be9e3762e719211368d186f547f847737baad720", "rev": "006c3bd4dd2f5d1d2094047f307cbf9e2b73d9c5",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -281,11 +281,11 @@
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1666959691, "lastModified": 1676110339,
"narHash": "sha256-TRpWA3t8ata79HOGtFd5dDCl1kJQmIE16PDF53/Hcxo=", "narHash": "sha256-kOS/L8OOL2odpCOM11IevfHxcUeE0vnZUQ74EOiwXcs=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "448a599c49978c2794401bfc3a2e1fba1a8663be", "rev": "e5530aba13caff5a4f41713f1265b754dc2abfd8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -297,27 +297,28 @@
}, },
"nixpkgs_4": { "nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1660318005, "lastModified": 1674868155,
"narHash": "sha256-g9WCa9lVUmOV6dYRbEPjv/TLOR5hamjeCcKExVGS3OQ=", "narHash": "sha256-eFNm2h6fNbgD7ZpO4MHikCB5pSnCJ7DTmwPisjetmwc=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "5c211b47aeadcc178c5320afd4e74c7eed5c389f", "rev": "ce20e9ebe1903ea2ba1ab006ec63093020c761cb",
"type": "github" "type": "github"
}, },
"original": { "original": {
"id": "nixpkgs", "owner": "NixOS",
"ref": "nixos-22.05", "ref": "nixos-22.11",
"type": "indirect" "repo": "nixpkgs",
"type": "github"
} }
}, },
"null-ls-nvim-src": { "null-ls-nvim-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1669235424, "lastModified": 1676246878,
"narHash": "sha256-po66LOeGuBHi3MZsn5+/gYdgU+oFTZUPfPWx2norc3I=", "narHash": "sha256-hAUEa2zNsYXQ+TsHYHBzcW67lCxhiD7x+uPbdOZwY8o=",
"owner": "jose-elias-alvarez", "owner": "jose-elias-alvarez",
"repo": "null-ls.nvim", "repo": "null-ls.nvim",
"rev": "c51978f546a86a653f4a492b86313f4616412cec", "rev": "d4594231a06cecce73a78a256b0d7c7ab51f7dd5",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -328,11 +329,11 @@
}, },
"nur": { "nur": {
"locked": { "locked": {
"lastModified": 1667025500, "lastModified": 1676251563,
"narHash": "sha256-88akaieCIrqta3Uyha7Zv3FJWzKJebb2BrOdZba1zdI=", "narHash": "sha256-itLKR2Haeh5wQ6dxkuZ8L5gwp3+CAggpN+w2e7cLQPg=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nur", "repo": "nur",
"rev": "21dd192519af12a01f1348bbfa86cde47f7aa392", "rev": "9a8b28a9d6611f6af9f7abb3e690fc755d6906fe",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -344,11 +345,11 @@
"nvim-lspconfig-src": { "nvim-lspconfig-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1669447443, "lastModified": 1676175675,
"narHash": "sha256-ikrkXhzkn4nYqJd9WaG61UGYWRdY2cbzKQIR+kDcYqE=", "narHash": "sha256-Wg3NatT4DRBMF6hCxK4C2DC+geFMpfFUFogPbqeMt6E=",
"owner": "neovim", "owner": "neovim",
"repo": "nvim-lspconfig", "repo": "nvim-lspconfig",
"rev": "abe6c99c7489de2c317869cf5dea57a9595a0cca", "rev": "1712672e4da3003a0dd9f771d30389600b360f42",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -360,11 +361,11 @@
"nvim-tree-lua-src": { "nvim-tree-lua-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1669432749, "lastModified": 1676244722,
"narHash": "sha256-YQix8eYrruuyH5pzjFvxb6hbMLhu1X/hnymO9dmbCqs=", "narHash": "sha256-xoSekdZhWr59qTOM0/ihYiuKiwHiKYb42Ep5JHn65UM=",
"owner": "kyazdani42", "owner": "kyazdani42",
"repo": "nvim-tree.lua", "repo": "nvim-tree.lua",
"rev": "b17358ff4d822deeb42b97919065800f8f91cb55", "rev": "ba1778e061f25814bc5940be886a7f41d7d7736e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -376,11 +377,11 @@
"nvim-treesitter-src": { "nvim-treesitter-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1669484329, "lastModified": 1676240774,
"narHash": "sha256-aAzVCRoqa2TDMsDKuxFRJHleR4ubA0bLaCVYk96/su8=", "narHash": "sha256-eRSU/9ysSvTyYxBrp9Whg0eXgAOsCdmIHMlYZK7bjRg=",
"owner": "nvim-treesitter", "owner": "nvim-treesitter",
"repo": "nvim-treesitter", "repo": "nvim-treesitter",
"rev": "5aacb06135a952190933f9bfff923957db8965db", "rev": "7eb5f1a2e3949496f26c4084b521b30f2d08137a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -425,11 +426,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1669170936, "lastModified": 1675391458,
"narHash": "sha256-TKPH4Pzkjw5gAPo9hejs3O4mWJW6V/RSiOj8UuSFRTs=", "narHash": "sha256-ukDKZw922BnK5ohL9LhwtaDAdCsJL7L6ScNEyF1lO9w=",
"owner": "oxalica", "owner": "oxalica",
"repo": "rust-overlay", "repo": "rust-overlay",
"rev": "c90c223c4aef334356029b89c72bb65e26f7efe6", "rev": "383a4acfd11d778d5c2efcf28376cbd845eeaedf",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -441,11 +442,11 @@
"telescope-nvim-src": { "telescope-nvim-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1669224375, "lastModified": 1675149856,
"narHash": "sha256-NqMtFHgYO031WLDHb7AuVRUFMA72LHYVjbD0bt26O6I=", "narHash": "sha256-L4Kw94CUy6N7zcyy9INuR/O0fxQ7sp0IvGd/u7fHxMA=",
"owner": "nvim-telescope", "owner": "nvim-telescope",
"repo": "telescope.nvim", "repo": "telescope.nvim",
"rev": "cea9c75c19d172d2c6f089f21656019734a615cf", "rev": "203bf5609137600d73e8ed82703d6b0e320a5f36",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -457,11 +458,11 @@
"telescope-project-nvim-src": { "telescope-project-nvim-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1665406281, "lastModified": 1671805267,
"narHash": "sha256-ZBFgUlW+h7vndazZ0lZux8i7yQHKJNDPQPZ2z96Rfpk=", "narHash": "sha256-S4SOHzQ17ux5pcwwYFpVVLzjLeC4/EJ0IFPbrfzUJC8=",
"owner": "nvim-telescope", "owner": "nvim-telescope",
"repo": "telescope-project.nvim", "repo": "telescope-project.nvim",
"rev": "ff4d3cea905383a67d1a47b9dd210c4907d858c2", "rev": "8e8ee37b7210761502cdf2c3a82b5ba8fb5b2972",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -473,11 +474,11 @@
"toggleterm-nvim-src": { "toggleterm-nvim-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1667475764, "lastModified": 1675358836,
"narHash": "sha256-gazqaTsK5hAFqk6OONqTsR/zmjN3P8fPKsYufBhkeRA=", "narHash": "sha256-9O7p/7tRStg51OFhMc88M5ewYquiYC9x9CV4s5veVP8=",
"owner": "akinsho", "owner": "akinsho",
"repo": "toggleterm.nvim", "repo": "toggleterm.nvim",
"rev": "3ba683827c623affb4d9aa518e97b34db2623093", "rev": "19aad0f41f47affbba1274f05e3c067e6d718e1e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -488,11 +489,11 @@
}, },
"utils": { "utils": {
"locked": { "locked": {
"lastModified": 1659877975, "lastModified": 1667395993,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -524,11 +525,11 @@
"nixpkgs": "nixpkgs_4" "nixpkgs": "nixpkgs_4"
}, },
"locked": { "locked": {
"lastModified": 1666720338, "lastModified": 1676126384,
"narHash": "sha256-7V91ZtTz7zDXb6hivktQ9RlBglP+WEkYFSciPJHwMJw=", "narHash": "sha256-3aAnN891Cb1pizewAgaHIo3W1WbAjXtoWuX8n3j8YoI=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NixOS-WSL", "repo": "NixOS-WSL",
"rev": "7bfb8f5aa91fee30a189eae32cda8ddc465076df", "rev": "a1c7e8bebac32cfac7aa8498bdfc60cbff13eb50",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -94,7 +94,7 @@
}; };
outputs = { self, nixpkgs, ... }@inputs: outputs = { nixpkgs, ... }@inputs:
let let
@ -104,7 +104,7 @@
fullName = "Noah Masur"; fullName = "Noah Masur";
gitName = fullName; gitName = fullName;
gitEmail = "7386960+nmasur@users.noreply.github.com"; gitEmail = "7386960+nmasur@users.noreply.github.com";
mailServer = "noahmasur.com"; mail.server = "noahmasur.com";
dotfilesRepo = "git@github.com:nmasur/dotfiles"; dotfilesRepo = "git@github.com:nmasur/dotfiles";
}; };
@ -112,7 +112,8 @@
overlays = [ overlays = [
inputs.nur.overlay inputs.nur.overlay
inputs.nix2vim.overlay inputs.nix2vim.overlay
(import ./modules/neovim/plugins-overlay.nix inputs) (import ./overlays/neovim-plugins.nix inputs)
(import ./overlays/calibre-web.nix)
]; ];
# System types to support. # System types to support.
@ -125,22 +126,24 @@
in rec { in rec {
nixosConfigurations = { nixosConfigurations = {
desktop = import ./hosts/desktop { inherit inputs globals overlays; }; tempest = import ./hosts/tempest { inherit inputs globals overlays; };
wsl = import ./hosts/wsl { inherit inputs globals overlays; }; hydra = import ./hosts/hydra { inherit inputs globals overlays; };
oracle = import ./hosts/oracle { inherit inputs globals overlays; }; flame = import ./hosts/flame { inherit inputs globals overlays; };
swan = import ./hosts/swan { inherit inputs globals overlays; };
}; };
darwinConfigurations = { darwinConfigurations = {
macbook = import ./hosts/macbook { inherit inputs globals overlays; }; lookingglass =
import ./hosts/lookingglass { inherit inputs globals overlays; };
}; };
# For quickly applying local settings with: # For quickly applying local settings with:
# home-manager switch --flake .#desktop # home-manager switch --flake .#tempest
homeConfigurations = { homeConfigurations = {
desktop = tempest =
nixosConfigurations.desktop.config.home-manager.users.${globals.user}.home; nixosConfigurations.tempest.config.home-manager.users.${globals.user}.home;
macbook = lookingglass =
darwinConfigurations.macbook.config.home-manager.users."Noah.Masur".home; darwinConfigurations.lookingglass.config.home-manager.users."Noah.Masur".home;
}; };
# Package servers into images with a generator # Package servers into images with a generator
@ -148,15 +151,20 @@
aws = { aws = {
"${system}" = "${system}" =
import ./hosts/aws { inherit inputs globals system overlays; }; import ./generators/aws { inherit inputs globals system overlays; };
};
staff = {
"${system}" = import ./generators/staff {
inherit inputs globals system overlays;
};
}; };
neovim = let pkgs = import nixpkgs { inherit system overlays; }; neovim = let pkgs = import nixpkgs { inherit system overlays; };
in import ./modules/neovim/package { in import ./modules/common/neovim/package {
inherit pkgs; inherit pkgs;
colors = import ./modules/colorscheme/gruvbox/neovim-gruvbox.nix { colors =
inherit pkgs; import ./colorscheme/gruvbox/neovim-gruvbox.nix { inherit pkgs; };
};
}; };
}); });

View File

@ -15,16 +15,16 @@ nixos-generators.nixosGenerate {
gitEmail = globals.gitEmail; gitEmail = globals.gitEmail;
networking.hostName = "sheep"; networking.hostName = "sheep";
gui.enable = false; gui.enable = false;
colorscheme = (import ../modules/colorscheme/gruvbox); colorscheme = (import ../colorscheme/gruvbox);
passwordHash = null; passwordHash = null;
publicKey = publicKey =
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s"; "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s";
# AWS settings require this # AWS settings require this
permitRootLogin = "prohibit-password"; permitRootLogin = "prohibit-password";
} }
../../hosts/common.nix ../../modules/common
../../modules/nixos ../../modules/nixos
../../modules/services/sshd.nix ../../modules/common/services/sshd.nix
] ++ [ ] ++ [
# Required to fix diskSize errors during build # Required to fix diskSize errors during build
({ ... }: { amazonImage.sizeMB = 16 * 1024; }) ({ ... }: { amazonImage.sizeMB = 16 * 1024; })

View File

@ -0,0 +1,17 @@
# The Staff
# ISO configuration for my USB drive
{ inputs, system, ... }:
with inputs;
nixos-generators.nixosGenerate {
inherit system;
format = "install-iso";
modules = [{
networking.hostName = "staff";
users.extraUsers.root.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s"
];
}];
}

View File

@ -1,48 +0,0 @@
{ inputs, globals, ... }:
with inputs;
# System configuration for my desktop
nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { };
modules = [
globals
home-manager.nixosModules.home-manager
{
networking.hostName = "desktop";
nixpkgs.overlays = [ nur.overlay ];
# Set registry to flake packages, used for nix X commands
nix.registry.nixpkgs.flake = nixpkgs;
identityFile = "/home/${globals.user}/.ssh/id_ed25519";
gui.enable = true;
theme = {
colors = (import ../../modules/colorscheme/gruvbox).dark;
dark = true;
};
wallpaper = "${wallpapers}/gruvbox/road.jpg";
gtk.theme.name = nixpkgs.lib.mkDefault "Adwaita-dark";
passwordHash = nixpkgs.lib.fileContents ../../private/password.sha512;
}
./hardware-configuration.nix
../common.nix
../../modules/hardware
../../modules/nixos
../../modules/graphical
../../modules/applications/media.nix
../../modules/applications/firefox.nix
../../modules/applications/kitty.nix
../../modules/applications/1password.nix
../../modules/applications/discord.nix
../../modules/applications/nautilus.nix
../../modules/applications/obsidian.nix
../../modules/mail
../../modules/gaming/steam.nix
../../modules/gaming/legendary.nix
../../modules/repositories/notes.nix
../../modules/services/keybase.nix
../../modules/services/mullvad.nix
../../modules/programming/nix.nix
];
}

View File

@ -1,30 +0,0 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules =
[ "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-label/boot";
fsType = "vfat";
};
swapDevices = [ ];
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.cpu.intel.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View File

@ -1,24 +1,33 @@
{ inputs, globals, ... }: # The Flame
with inputs;
# System configuration for an Oracle free server # System configuration for an Oracle free server
# How to install: # How to install:
# https://blog.korfuri.fr/posts/2022/08/nixos-on-an-oracle-free-tier-ampere-machine/ # https://blog.korfuri.fr/posts/2022/08/nixos-on-an-oracle-free-tier-ampere-machine/
{ inputs, globals, overlays, ... }:
with inputs;
nixpkgs.lib.nixosSystem { nixpkgs.lib.nixosSystem {
system = "aarch64-linux"; system = "aarch64-linux";
specialArgs = { }; specialArgs = { };
modules = [ modules = [
(removeAttrs globals [ "mailServer" ]) ./hardware-configuration.nix
../../modules/common
../../modules/nixos
(removeAttrs globals [ "mail.server" ])
wsl.nixosModules.wsl
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
{ {
server = true;
gui.enable = false; gui.enable = false;
colorscheme = (import ../../modules/colorscheme/gruvbox); theme = { colors = (import ../../colorscheme/gruvbox).dark; };
nixpkgs.overlays = overlays;
wsl.enable = false;
caddy.enable = true;
# FQDNs for various services # FQDNs for various services
networking.hostName = "oracle"; networking.hostName = "flame";
bookServer = "books.masu.rs"; bookServer = "books.masu.rs";
streamServer = "stream.masu.rs"; streamServer = "stream.masu.rs";
nextcloudServer = "cloud.masu.rs"; nextcloudServer = "cloud.masu.rs";
@ -32,7 +41,7 @@ nixpkgs.lib.nixosSystem {
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s"; "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s";
# Nextcloud backup config # Nextcloud backup config
backupS3 = { backup.s3 = {
endpoint = "s3.us-west-002.backblazeb2.com"; endpoint = "s3.us-west-002.backblazeb2.com";
bucket = "noahmasur-backup"; bucket = "noahmasur-backup";
accessKeyId = "0026b0e73b2e2c80000000005"; accessKeyId = "0026b0e73b2e2c80000000005";
@ -42,6 +51,7 @@ nixpkgs.lib.nixosSystem {
users.users.nextcloud.extraGroups = [ "jellyfin" ]; users.users.nextcloud.extraGroups = [ "jellyfin" ];
# Wireguard config for Transmission # Wireguard config for Transmission
wireguard.enable = true;
networking.wireguard.interfaces.wg0 = { networking.wireguard.interfaces.wg0 = {
# The local IPs for this machine within the Wireguard network # The local IPs for this machine within the Wireguard network
@ -71,20 +81,18 @@ nixpkgs.lib.nixosSystem {
# Grant access to Transmission directories from Jellyfin # Grant access to Transmission directories from Jellyfin
users.users.jellyfin.extraGroups = [ "transmission" ]; users.users.jellyfin.extraGroups = [ "transmission" ];
# Proxy traffic with Cloudflare
cloudflare.enable = true;
# Setup Minecraft server
gaming.minecraft-server.enable = true;
# Clone dotfiles
dotfiles.enable = true;
neovim.enable = true;
} }
./hardware-configuration.nix
../common.nix
../../modules/nixos
../../modules/hardware/server.nix
../../modules/services/sshd.nix
../../modules/services/calibre.nix
../../modules/services/jellyfin.nix
../../modules/services/nextcloud.nix
../../modules/services/cloudflare.nix
../../modules/services/transmission.nix
../../modules/services/prometheus.nix
../../modules/services/vaultwarden.nix
../../modules/services/gitea.nix
../../modules/gaming/minecraft-server.nix
]; ];
} }

View File

@ -1,7 +1,7 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }: { lib, modulesPath, ... }:
{ {
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];

View File

@ -1,42 +1,49 @@
{ inputs, globals, ... }: # The Hydra
# System configuration for WSL
{ inputs, globals, overlays, ... }:
with inputs; with inputs;
# System configuration for WSL
nixpkgs.lib.nixosSystem { nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = { }; specialArgs = { };
modules = [ modules = [
../../modules/common
../../modules/nixos
globals globals
wsl.nixosModules.wsl wsl.nixosModules.wsl
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
{ {
networking.hostName = "wsl"; networking.hostName = "hydra";
nixpkgs.overlays = overlays;
# Set registry to flake packages, used for nix X commands # Set registry to flake packages, used for nix X commands
nix.registry.nixpkgs.flake = nixpkgs; nix.registry.nixpkgs.flake = nixpkgs;
identityFile = "/home/${globals.user}/.ssh/id_ed25519"; identityFile = "/home/${globals.user}/.ssh/id_ed25519";
gui.enable = false; gui.enable = false;
theme = { theme = {
colors = (import ../../modules/colorscheme/gruvbox).dark; colors = (import ../../colorscheme/gruvbox).dark;
dark = true; dark = true;
}; };
passwordHash = nixpkgs.lib.fileContents ../../private/password.sha512; passwordHash = nixpkgs.lib.fileContents ../../private/password.sha512;
wsl = { wsl = {
enable = true; enable = true;
automountPath = "/mnt"; wslConf.automount.root = "/mnt";
defaultUser = globals.user; defaultUser = globals.user;
startMenuLaunchers = true; startMenuLaunchers = true;
nativeSystemd = true;
wslConf.network.generateResolvConf = true; # Turn off if it breaks VPN wslConf.network.generateResolvConf = true; # Turn off if it breaks VPN
interop.includePath = interop.includePath =
false; # Including Windows PATH will slow down Neovim command mode false; # Including Windows PATH will slow down Neovim command mode
}; };
neovim.enable = true;
mail.enable = true;
mail.aerc.enable = true;
mail.himalaya.enable = true;
dotfiles.enable = true;
nixlang.enable = true;
lua.enable = true;
} }
../common.nix
../../modules/wsl
../../modules/nixos
../../modules/mail
../../modules/repositories/notes.nix
../../modules/programming/nix.nix
../../modules/programming/lua.nix
]; ];
} }

View File

@ -0,0 +1,48 @@
# The Looking Glass
# System configuration for my work Macbook
{ inputs, globals, overlays, ... }:
with inputs;
darwin.lib.darwinSystem {
system = "x86_64-darwin";
specialArgs = { };
modules = [
../../modules/common
../../modules/darwin
(globals // {
user = "Noah.Masur";
gitName = "Noah-Masur_1701";
gitEmail = "Noah.Masur@take2games.com";
})
home-manager.darwinModules.home-manager
{
networking.hostName = "noah-masur-mac";
identityFile = "/Users/Noah.Masur/.ssh/id_ed25519";
gui.enable = true;
theme = {
colors = (import ../../colorscheme/gruvbox).dark;
dark = true;
};
mail.user = globals.user;
nixpkgs.overlays = [ firefox-darwin.overlay ] ++ overlays;
# Set registry to flake packages, used for nix X commands
nix.registry.nixpkgs.flake = nixpkgs;
neovim.enable = true;
mail.enable = true;
mail.aerc.enable = true;
mail.himalaya.enable = true;
kitty.enable = true;
discord.enable = true;
firefox.enable = true;
dotfiles.enable = true;
nixlang.enable = true;
terraform.enable = true;
python.enable = true;
lua.enable = true;
kubernetes.enable = true;
"1password".enable = true;
}
];
}

View File

@ -1,43 +0,0 @@
{ inputs, globals, ... }:
with inputs;
# System configuration for my work MacBook
darwin.lib.darwinSystem {
system = "x86_64-darwin";
specialArgs = { };
modules = [
(globals // {
user = "Noah.Masur";
gitName = "Noah-Masur_1701";
gitEmail = "Noah.Masur@take2games.com";
})
home-manager.darwinModules.home-manager
{
identityFile = "/Users/Noah.Masur/.ssh/id_ed25519";
gui.enable = true;
theme = {
colors = (import ../../modules/colorscheme/gruvbox).dark;
dark = true;
};
mailUser = globals.user;
networking.hostName = "noah-masur-mac";
nixpkgs.overlays = [ firefox-darwin.overlay ];
# Set registry to flake packages, used for nix X commands
nix.registry.nixpkgs.flake = nixpkgs;
}
../common.nix
../../modules/darwin
../../modules/mail
../../modules/applications/alacritty.nix
../../modules/applications/kitty.nix
../../modules/applications/discord.nix
../../modules/applications/firefox.nix
../../modules/repositories/notes.nix
../../modules/programming/nix.nix
../../modules/programming/terraform.nix
../../modules/programming/python.nix
../../modules/programming/lua.nix
../../modules/programming/kubernetes.nix
];
}

48
hosts/swan/default.nix Normal file
View File

@ -0,0 +1,48 @@
# The Swan
# System configuration for my home NAS server
{ inputs, globals, overlays, ... }:
with inputs;
nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { };
modules = [
./hardware-configuration.nix
../../modules/common
../../modules/nixos
(removeAttrs globals [ "mail.server" ])
wsl.nixosModules.wsl
home-manager.nixosModules.home-manager
{
server = true;
gui.enable = false;
theme = { colors = (import ../../colorscheme/gruvbox).dark; };
nixpkgs.overlays = overlays;
wsl.enable = false;
caddy.enable = true;
networking.hostName = "swan";
# Disable passwords, only use SSH key
publicKey =
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s";
# Clone dotfiles
dotfiles.enable = true;
neovim.enable = true;
boot.zfs.enabled = true;
boot.kernelPackages =
config.boot.zfs.package.latestCompatibleLinuxPackages;
boot.zfs.extraPools = [ "mypool" ];
services.zfs.autoScrub.enable = true;
services.zfs.autoScrub.interval = "daily";
services.nfs.server.enable = true;
}
];
}

62
hosts/tempest/default.nix Normal file
View File

@ -0,0 +1,62 @@
# The Tempest
# System configuration for my desktop
{ inputs, globals, overlays, ... }:
with inputs;
nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { };
modules = [
./hardware-configuration.nix
../../modules/common
../../modules/nixos
globals
wsl.nixosModules.wsl
home-manager.nixosModules.home-manager
{
physical = true;
networking.hostName = "tempest";
nixpkgs.overlays = [ nur.overlay ] ++ overlays;
# Set registry to flake packages, used for nix X commands
nix.registry.nixpkgs.flake = nixpkgs;
identityFile = "/home/${globals.user}/.ssh/id_ed25519";
gui.enable = true;
theme = {
colors = (import ../../colorscheme/gruvbox).dark;
dark = true;
};
wallpaper = "${wallpapers}/gruvbox/road.jpg";
gtk.theme.name = nixpkgs.lib.mkDefault "Adwaita-dark";
passwordHash = nixpkgs.lib.fileContents ../../private/password.sha512;
wsl.enable = false;
publicKey = null;
neovim.enable = true;
media.enable = true;
firefox.enable = true;
kitty.enable = true;
_1password.enable = true;
discord.enable = true;
nautilus.enable = true;
obsidian.enable = true;
mail.enable = true;
mail.aerc.enable = true;
mail.himalaya.enable = true;
keybase.enable = true;
# mullvad.enable = true;
nixlang.enable = true;
dotfiles.enable = true;
gaming = {
enable = true;
steam.enable = true;
legendary.enable = true;
lutris.enable = true;
leagueoflegends.enable = true;
};
}
];
}

View File

@ -0,0 +1,40 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, modulesPath, ... }:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules =
[ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ "amdgpu" ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
services.xserver.videoDrivers = [ "amdgpu" ];
fileSystems."/" = {
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-label/boot";
fsType = "vfat";
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp5s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true;
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
hardware.cpu.amd.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View File

@ -1,10 +0,0 @@
{ config, pkgs, lib, ... }: {
config = lib.mkIf config.gui.enable {
unfreePackages = [ "1password" "_1password-gui" ];
home-manager.users.${config.user} = {
home.packages = with pkgs; [ _1password-gui ];
};
};
}

View File

@ -1,12 +0,0 @@
{ config, pkgs, lib, ... }: {
config = lib.mkIf config.gui.enable {
home-manager.users.${config.user}.home.packages = with pkgs; [
mpv # Video viewer
sxiv # Image viewer
mupdf # PDF viewer
zathura # PDF viewer
];
};
}

View File

@ -1,10 +0,0 @@
{ config, pkgs, lib, ... }: {
config = lib.mkIf config.gui.enable {
unfreePackages = [ "obsidian" ];
home-manager.users.${config.user} = {
home.packages = with pkgs; [ obsidian ];
};
};
}

View File

@ -1,12 +0,0 @@
{ config, pkgs, lib, ... }: {
config = lib.mkIf config.gui.enable {
home-manager.users.${config.user} = {
home.packages = with pkgs; [ qbittorrent ];
};
};
}

View File

@ -1,13 +0,0 @@
local M = {}
M.packer = function(use)
use({
"lifepillar/vim-gruvbox8",
config = function()
vim.g.gruvbox_italicize_strings = 0
vim.cmd("colorscheme gruvbox8")
end,
})
end
return M

View File

@ -0,0 +1,20 @@
{ config, pkgs, lib, ... }: {
options = {
_1password = {
enable = lib.mkEnableOption {
description = "Enable 1Password.";
default = false;
};
};
};
config = lib.mkIf
(config.gui.enable && config._1password.enable && pkgs.stdenv.isLinux) {
unfreePackages = [ "1password" "_1password-gui" ];
home-manager.users.${config.user} = {
home.packages = with pkgs; [ _1password-gui ];
};
};
}

View File

@ -1,6 +1,15 @@
{ config, pkgs, lib, ... }: { { config, pkgs, lib, ... }: {
config = lib.mkIf config.gui.enable { options = {
alacritty = {
enable = lib.mkEnableOption {
description = "Enable Alacritty.";
default = false;
};
};
};
config = lib.mkIf (config.gui.enable && config.alacritty.enable) {
home-manager.users.${config.user} = { home-manager.users.${config.user} = {
xsession.windowManager.i3.config.terminal = "alacritty"; xsession.windowManager.i3.config.terminal = "alacritty";
programs.rofi.terminal = "${pkgs.alacritty}/bin/alacritty"; programs.rofi.terminal = "${pkgs.alacritty}/bin/alacritty";

View File

@ -3,7 +3,6 @@
imports = [ imports = [
./1password.nix ./1password.nix
./alacritty.nix ./alacritty.nix
./calibre.nix
./discord.nix ./discord.nix
./firefox.nix ./firefox.nix
./kitty.nix ./kitty.nix

View File

@ -1,6 +1,15 @@
{ config, pkgs, lib, ... }: { { config, pkgs, lib, ... }: {
config = lib.mkIf config.gui.enable { options = {
discord = {
enable = lib.mkEnableOption {
description = "Enable Discord.";
default = false;
};
};
};
config = lib.mkIf (config.gui.enable && config.discord.enable) {
unfreePackages = [ "discord" ]; unfreePackages = [ "discord" ];
home-manager.users.${config.user} = { home-manager.users.${config.user} = {
home.packages = with pkgs; [ discord ]; home.packages = with pkgs; [ discord ];

View File

@ -1,45 +1,67 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
{ {
config = lib.mkIf config.gui.enable {
unfreePackages = [ "onepassword-password-manager" "okta-browser-plugin" ]; options = {
firefox = {
enable = lib.mkEnableOption {
description = "Enable Firefox.";
default = false;
};
};
};
config = lib.mkIf (config.gui.enable && config.firefox.enable) {
unfreePackages = [
(lib.mkIf config._1password.enable "onepassword-password-manager")
"okta-browser-plugin"
];
home-manager.users.${config.user} = { home-manager.users.${config.user} = {
programs.firefox = { programs.firefox = {
enable = true; enable = true;
package = lib.mkIf pkgs.stdenv.isDarwin pkgs.firefox-bin; package =
extensions = with pkgs.nur.repos.rycee.firefox-addons; [ if pkgs.stdenv.isDarwin then pkgs.firefox-bin else pkgs.firefox;
ublock-origin profiles.default = {
vimium
multi-account-containers
facebook-container
temporary-containers
onepassword-password-manager
okta-browser-plugin
sponsorblock
reddit-enhancement-suite
bypass-paywalls-clean
markdownload
darkreader
snowflake
don-t-fuck-with-paste
i-dont-care-about-cookies
];
profiles.Profile0 = {
id = 0; id = 0;
name = "default"; name = "default";
isDefault = true; isDefault = true;
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
ublock-origin
vimium
multi-account-containers
facebook-container
temporary-containers
(lib.mkIf config._1password.enable onepassword-password-manager)
okta-browser-plugin
sponsorblock
reddit-enhancement-suite
return-youtube-dislikes
markdownload
darkreader
snowflake
don-t-fuck-with-paste
i-dont-care-about-cookies
wappalyzer
];
settings = { settings = {
"app.update.auto" = false;
"browser.aboutConfig.showWarning" = false; "browser.aboutConfig.showWarning" = false;
"browser.warnOnQuit" = false; "browser.warnOnQuit" = false;
"browser.quitShortcut.disabled" = true; "browser.quitShortcut.disabled" =
if pkgs.stdenv.isLinux then true else false;
"browser.theme.dark-private-windows" = true; "browser.theme.dark-private-windows" = true;
"browser.toolbars.bookmarks.visibility" = "newtab"; "browser.toolbars.bookmarks.visibility" = false;
"browser.startup.page" = 3; # Restore previous session "browser.startup.page" = 3; # Restore previous session
"browser.newtabpage.enabled" = false; # Make new tabs blank "browser.newtabpage.enabled" = false; # Make new tabs blank
"trailhead.firstrun.didSeeAboutWelcome" =
true; # Disable welcome splash
"dom.forms.autocomplete.formautofill" = false; # Disable autofill "dom.forms.autocomplete.formautofill" = false; # Disable autofill
"extensions.formautofill.creditCards.enabled" =
false; # Disable credit cards
"dom.payments.defaults.saveAddress" = false; # Disable address save
"general.autoScroll" = true; # Drag middle-mouse to scroll "general.autoScroll" = true; # Drag middle-mouse to scroll
"services.sync.prefs.sync.general.autoScroll" = "services.sync.prefs.sync.general.autoScroll" =
false; # Prevent disabling autoscroll false; # Prevent disabling autoscroll
@ -60,6 +82,22 @@
.toolbar-items { .toolbar-items {
background-color: ${config.theme.colors.base00} !important; background-color: ${config.theme.colors.base00} !important;
} }
/* Extra tab bar sides on macOS */
.titlebar-spacer {
background-color: ${config.theme.colors.base00} !important;
}
.titlebar-buttonbox-container {
background-color: ${config.theme.colors.base00} !important;
}
#tabbrowser-tabs {
border-inline-start: 0 !important;
}
/* Private Browsing indicator on macOS */
#private-browsing-indicator-with-label {
background-color: ${config.theme.colors.base00} !important;
margin-inline: 0 !important;
padding-inline: 7px;
}
/* Tabs themselves */ /* Tabs themselves */
.tabbrowser-tab .tab-stack { .tabbrowser-tab .tab-stack {
border-radius: 5px 5px 0 0; border-radius: 5px 5px 0 0;

View File

@ -1,6 +1,15 @@
{ config, pkgs, lib, ... }: { { config, pkgs, lib, ... }: {
config = lib.mkIf config.gui.enable { options = {
kitty = {
enable = lib.mkEnableOption {
description = "Enable Kitty.";
default = false;
};
};
};
config = lib.mkIf (config.gui.enable && config.kitty.enable) {
home-manager.users.${config.user} = { home-manager.users.${config.user} = {
# xsession.windowManager.i3.config.terminal = "kitty"; # xsession.windowManager.i3.config.terminal = "kitty";
# programs.rofi.terminal = "${pkgs.kitty}/bin/kitty"; # programs.rofi.terminal = "${pkgs.kitty}/bin/kitty";

View File

@ -0,0 +1,30 @@
{ config, pkgs, lib, ... }: {
options = {
media = {
enable = lib.mkEnableOption {
description = "Enable media programs.";
default = false;
};
};
};
config = lib.mkIf (config.gui.enable && config.media.enable) {
home-manager.users.${config.user} = {
home.packages = with pkgs; [
mpv # Video viewer
sxiv # Image viewer
mupdf # PDF viewer
zathura # PDF viewer
];
# Set default for opening PDFs
xdg.mimeApps.defaultApplications."application/pdf" =
[ "zathura.desktop" ];
xdg.mimeApps.defaultApplications."image/*" = [ "sxiv.desktop" ];
};
};
}

View File

@ -1,13 +1,26 @@
{ config, pkgs, lib, ... }: { { config, pkgs, lib, ... }: {
options = {
nautilus = {
enable = lib.mkEnableOption {
description = "Enable Nautilus file manager.";
default = false;
};
};
};
# Install Nautilus file manager # Install Nautilus file manager
config = lib.mkIf config.gui.enable { config = lib.mkIf (config.gui.enable && config.nautilus.enable) {
home-manager.users.${config.user} = { home-manager.users.${config.user} = {
home.packages = with pkgs; [ home.packages = with pkgs; [
gnome.nautilus gnome.nautilus
gnome.sushi # Quick preview with spacebar gnome.sushi # Quick preview with spacebar
]; ];
# Set default for opening directories
xdg.mimeApps.defaultApplications."inode/directory" =
[ "nautilus.desktop" ];
programs.fish.functions = { programs.fish.functions = {
qr = { qr = {
body = body =

View File

@ -0,0 +1,19 @@
{ config, pkgs, lib, ... }: {
options = {
obsidian = {
enable = lib.mkEnableOption {
description = "Enable Obsidian.";
default = false;
};
};
};
config = lib.mkIf (config.gui.enable && config.obsidian.enable) {
unfreePackages = [ "obsidian" ];
home-manager.users.${config.user} = {
home.packages = with pkgs; [ obsidian ];
};
};
}

View File

@ -0,0 +1,21 @@
{ config, pkgs, lib, ... }: {
options = {
qbittorrent = {
enable = lib.mkEnableOption {
description = "Enable qBittorrent.";
default = false;
};
};
};
config = lib.mkIf (config.gui.enable && config.qbittorrent.enable) {
home-manager.users.${config.user} = {
home.packages = with pkgs; [ qbittorrent ];
};
};
}

View File

@ -1,9 +1,9 @@
{ config, lib, pkgs, ... }: { { config, lib, pkgs, ... }: {
imports = imports =
[ ../modules/shell ../modules/neovim ../modules/repositories/dotfiles.nix ]; [ ./applications ./mail ./neovim ./programming ./repositories ./shell ];
options = rec { options = {
user = lib.mkOption { user = lib.mkOption {
type = lib.types.str; type = lib.types.str;
description = "Primary user of the system"; description = "Primary user of the system";
@ -36,7 +36,7 @@
colors = lib.mkOption { colors = lib.mkOption {
type = lib.types.attrs; type = lib.types.attrs;
description = "Base16 color scheme."; description = "Base16 color scheme.";
default = (import ../modules/colorscheme/gruvbox).dark; default = (import ../colorscheme/gruvbox).dark;
}; };
dark = lib.mkOption { dark = lib.mkOption {
type = lib.types.bool; type = lib.types.bool;
@ -74,7 +74,7 @@
}; };
}; };
config = let stateVersion = "22.11"; config = let stateVersion = "23.05";
in { in {
# Enable features in Nix commands # Enable features in Nix commands

View File

@ -1,6 +1,8 @@
{ config, pkgs, ... }: { { config, pkgs, lib, ... }: {
config = { options.mail.aerc.enable = lib.mkEnableOption "Aerc email.";
config = lib.mkIf config.mail.aerc.enable {
home-manager.users.${config.user} = { home-manager.users.${config.user} = {

View File

@ -3,18 +3,19 @@
imports = [ ./himalaya.nix ./aerc.nix ]; imports = [ ./himalaya.nix ./aerc.nix ];
options = { options = {
mailUser = lib.mkOption { mail.enable = lib.mkEnableOption "Mail service.";
mail.user = lib.mkOption {
type = lib.types.str; type = lib.types.str;
description = "User name for the email address."; description = "User name for the email address.";
default = config.user; default = config.user;
}; };
mailServer = lib.mkOption { mail.server = lib.mkOption {
type = lib.types.str; type = lib.types.str;
description = "Server name for the email address."; description = "Server name for the email address.";
}; };
}; };
config = { config = lib.mkIf config.mail.enable {
home-manager.users.${config.user} = { home-manager.users.${config.user} = {
programs.mbsync = { enable = true; }; programs.mbsync = { enable = true; };
@ -25,13 +26,13 @@
accounts.email = { accounts.email = {
maildirBasePath = "${config.homePath}/mail"; maildirBasePath = "${config.homePath}/mail";
accounts = { accounts = {
home = let address = "${config.mailUser}@${config.mailServer}"; home = let address = "${config.mail.user}@${config.mail.server}";
in { in {
userName = address; userName = address;
realName = config.fullName; realName = config.fullName;
primary = true; primary = true;
inherit address; inherit address;
aliases = map (mailUser: "${mailUser}@${config.mailServer}") [ aliases = map (user: "${user}@${config.mail.server}") [
"me" "me"
"hey" "hey"
"admin" "admin"

View File

@ -1,15 +1,17 @@
{ config, ... }: { { config, lib, ... }: {
config = { options.mail.himalaya.enable = lib.mkEnableOption "Himalaya email.";
config = lib.mkIf config.mail.himalaya.enable {
home-manager.users.${config.user} = { home-manager.users.${config.user} = {
programs.himalaya = { enable = true; }; programs.himalaya = { enable = true; };
accounts.email.accounts.home.himalaya = { accounts.email.accounts.home.himalaya = {
enable = true; enable = true;
backend = "imap";
sender = "smtp";
settings = { settings = {
backend = "imap";
sender = "smtp";
downloads-dir = config.userDirs.download; downloads-dir = config.userDirs.download;
smtp-insecure = true; smtp-insecure = true;
}; };

View File

@ -10,7 +10,7 @@ vim.keymap.set("n", "<Leader>gd", gitsigns.diffthis)
vim.keymap.set("v", "<Leader>gd", gitsigns.diffthis) vim.keymap.set("v", "<Leader>gd", gitsigns.diffthis)
vim.keymap.set("n", "<Leader>rgf", gitsigns.reset_buffer) vim.keymap.set("n", "<Leader>rgf", gitsigns.reset_buffer)
vim.keymap.set("v", "<Leader>hs", gitsigns.stage_hunk) vim.keymap.set("v", "<Leader>hs", gitsigns.stage_hunk)
vim.keymap.set("v", "<Leader>hr", gitsigns.reset_hunk) vim.keymap.set("n", "<Leader>hr", gitsigns.reset_hunk)
vim.keymap.set("v", "<Leader>hr", gitsigns.reset_hunk) vim.keymap.set("v", "<Leader>hr", gitsigns.reset_hunk)
-- Navigation -- Navigation

View File

@ -22,7 +22,7 @@
}; };
use.lspconfig.terraformls.setup = use.lspconfig.terraformls.setup =
dsl.callWith { cmd = [ "${pkgs.terraform-ls}/bin/terraform-lsp" ]; }; dsl.callWith { cmd = [ "${pkgs.terraform-ls}/bin/terraform-ls" "serve" ]; };
vim.api.nvim_create_augroup = dsl.callWith [ "LspFormatting" { } ]; vim.api.nvim_create_augroup = dsl.callWith [ "LspFormatting" { } ];
@ -42,7 +42,10 @@
command = "${pkgs.shfmt}/bin/shfmt", command = "${pkgs.shfmt}/bin/shfmt",
extra_args = { "-i", "4", "-ci" }, extra_args = { "-i", "4", "-ci" },
}), }),
require("null-ls").builtins.formatting.terraform_fmt.with({ command = "${pkgs.terraform}/bin/terraform" }), require("null-ls").builtins.formatting.terraform_fmt.with({
command = "${pkgs.terraform}/bin/terraform",
extra_filetypes = { "hcl" },
}),
}, },
on_attach = function(client, bufnr) on_attach = function(client, bufnr)

View File

@ -1,7 +1,7 @@
{ pkgs, ... }: { { pkgs, ... }: {
plugins = [ plugins = [
(pkgs.vimPlugins.nvim-treesitter.withPlugins (plugins: (pkgs.vimPlugins.nvim-treesitter.withPlugins (_plugins:
with pkgs.tree-sitter-grammars; [ with pkgs.tree-sitter-grammars; [
tree-sitter-hcl tree-sitter-hcl
tree-sitter-python tree-sitter-python

View File

@ -0,0 +1,44 @@
{ config, pkgs, lib, ... }:
let
neovim = import ./package {
inherit pkgs;
colors = import config.theme.colors.neovimConfig { inherit pkgs; };
};
in {
options.neovim.enable = lib.mkEnableOption "Neovim.";
config = lib.mkIf config.neovim.enable {
home-manager.users.${config.user} =
{
home.packages = [ neovim ];
programs.git.extraConfig.core.editor = "nvim";
home.sessionVariables = {
EDITOR = "nvim";
MANPAGER = "nvim +Man!";
};
programs.fish = {
shellAliases = { vim = "nvim"; };
shellAbbrs = {
v = lib.mkForce "nvim";
vl = lib.mkForce "nvim -c 'normal! `0' -c 'bdelete 1'";
vll = "nvim -c 'Telescope oldfiles'";
};
};
programs.kitty.settings.scrollback_pager = lib.mkForce ''
${neovim}/bin/nvim -c 'setlocal nonumber nolist showtabline=0 foldcolumn=0|Man!' -c "autocmd VimEnter * normal G" -'';
};
# # Used for icons in Vim
# fonts.fonts = with pkgs; [ nerdfonts ];
};
}

View File

@ -64,7 +64,6 @@ M.packer = function(use)
}) })
-- Additional syntax sources -- Additional syntax sources
use("bfontaine/Brewfile.vim") --- Brewfile syntax
use("chr4/nginx.vim") --- Nginx syntax use("chr4/nginx.vim") --- Nginx syntax
use("towolf/vim-helm") --- Helm syntax use("towolf/vim-helm") --- Helm syntax
use("rodjek/vim-puppet") --- Puppet syntax use("rodjek/vim-puppet") --- Puppet syntax

View File

@ -4,7 +4,8 @@
vim.filetype.add({ vim.filetype.add({
pattern = { pattern = {
[".*%.tfvars"] = "terraform", [".*%.tfvars"] = "hcl",
[".*%.tf"] = "hcl",
}, },
}) })

View File

@ -13,16 +13,16 @@
# in pkgs.neovimBuilder { # in pkgs.neovimBuilder {
# package = pkgs.neovim-unwrapped; # package = pkgs.neovim-unwrapped;
# imports = [ # imports = [
# ./modules/neovim/plugins/bufferline.nix # ./modules/common/neovim/plugins/bufferline.nix
# ./modules/neovim/plugins/completion.nix # ./modules/common/neovim/plugins/completion.nix
# ./modules/neovim/plugins/gitsigns.nix # ./modules/common/neovim/plugins/gitsigns.nix
# ./modules/neovim/plugins/lsp.nix # ./modules/common/neovim/plugins/lsp.nix
# ./modules/neovim/plugins/misc.nix # ./modules/common/neovim/plugins/misc.nix
# ./modules/neovim/plugins/statusline.nix # ./modules/common/neovim/plugins/statusline.nix
# ./modules/neovim/plugins/syntax.nix # ./modules/common/neovim/plugins/syntax.nix
# ./modules/neovim/plugins/telescope.nix # ./modules/common/neovim/plugins/telescope.nix
# ./modules/neovim/plugins/toggleterm.nix # ./modules/common/neovim/plugins/toggleterm.nix
# ./modules/neovim/plugins/tree.nix # ./modules/common/neovim/plugins/tree.nix
# ] ++ extraConfig; # ] ++ extraConfig;
# } # }

View File

@ -0,0 +1,12 @@
{ ... }: {
imports = [
./haskell.nix
./kubernetes.nix
./lua.nix
./nix.nix
./python.nix
./terraform.nix
];
}

View File

@ -0,0 +1,14 @@
{ config, lib, ... }: {
options.haskell.enable = lib.mkEnableOption "Haskell programming language.";
config = lib.mkIf config.haskell.enable {
# Binary Cache for Haskell.nix
nix.settings.trusted-public-keys =
[ "hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" ];
nix.settings.substituters = [ "https://cache.iog.io" ];
};
}

View File

@ -0,0 +1,145 @@
{ config, pkgs, lib, ... }: {
options.kubernetes.enable = lib.mkEnableOption "Kubernetes tools.";
config = lib.mkIf config.kubernetes.enable {
home-manager.users.${config.user} = {
home.packages = with pkgs; [
kubectl # Basic Kubernetes queries
kubernetes-helm # Helm CLI
fluxcd # Bootstrap clusters with Flux
kustomize # Kustomize CLI (for Flux)
];
programs.fish.shellAbbrs = {
k = "kubectl";
pods = "kubectl get pods -A";
nodes = "kubectl get nodes";
deploys = "kubectl get deployments -A";
dash = "kube-dashboard";
ks = "k9s";
};
# Terminal Kubernetes UI
programs.k9s = {
enable = true;
# settings = { k9s = { headless = true; }; };
skin = {
k9s = {
body = {
fgColor = config.theme.colors.base06;
bgColor = config.theme.colors.base00;
logoColor = config.theme.colors.base02; # *blue ?
};
# Search bar
prompt = {
fgColor = config.theme.colors.base06;
bgColor = config.theme.colors.base00;
suggestColor = config.theme.colors.base03;
};
# Header left side
info = {
fgColor = config.theme.colors.base04;
sectionColor = config.theme.colors.base05;
};
dialog = {
fgColor = config.theme.colors.base06;
bgColor = config.theme.colors.base00;
buttonFgColor = config.theme.colors.base06;
buttonBgColor = config.theme.colors.base0E;
buttonFocusFgColor = config.theme.colors.base07;
buttonFocusBgColor = config.theme.colors.base02; # *cyan
labelFgColor = config.theme.colors.base09;
fieldFgColor = config.theme.colors.base06;
};
frame = {
border = {
fgColor = config.theme.colors.base01;
focusColor = config.theme.colors.base06;
};
menu = {
fgColor = config.theme.colors.base06;
keyColor = config.theme.colors.base0E; # *magenta
numKeyColor = config.theme.colors.base0E; # *magenta
};
crumbs = {
fgColor = config.theme.colors.base06;
bgColor = config.theme.colors.base01;
activeColor = config.theme.colors.base03;
};
status = {
newColor = config.theme.colors.base04; # *cyan
modifyColor = config.theme.colors.base0D; # *blue
addColor = config.theme.colors.base0B; # *green
errorColor = config.theme.colors.base08; # *red
highlightColor = config.theme.colors.base09; # *orange
killColor = config.theme.colors.base03; # *comment
completedColor = config.theme.colors.base03; # *comment
};
title = {
fgColor = config.theme.colors.base06;
bgColor = config.theme.colors.base00;
highlightColor = config.theme.colors.base09; # *orange
counterColor = config.theme.colors.base0D; # *blue
filterColor = config.theme.colors.base0E; # *magenta
};
};
views = {
charts = {
bgColor = config.theme.colors.base00;
defaultDialColors =
[ config.theme.colors.base0D config.theme.colors.base08 ];
# - *blue
# - *red
defaultChartColors =
[ config.theme.colors.base0D config.theme.colors.base08 ];
# - *blue
# - *red
};
table = {
# List of resources
fgColor = config.theme.colors.base06;
bgColor = config.theme.colors.base00;
# Row selection
cursorFgColor = config.theme.colors.base07;
cursorBgColor = config.theme.colors.base01;
# Header row
header = {
fgColor = config.theme.colors.base0D;
bgColor = config.theme.colors.base00;
sorterColor = config.theme.colors.base0A; # *selection
};
};
xray = {
fgColor = config.theme.colors.base06;
bgColor = config.theme.colors.base00;
cursorColor = config.theme.colors.base06;
graphicColor = config.theme.colors.base0D;
showIcons = false;
};
yaml = {
keyColor = config.theme.colors.base0D;
colonColor = config.theme.colors.base04;
fgColor = config.theme.colors.base03;
};
logs = {
fgColor = config.theme.colors.base06;
bgColor = config.theme.colors.base00;
indicator = {
fgColor = config.theme.colors.base06;
bgColor = config.theme.colors.base00;
};
};
};
};
};
};
};
};
}

View File

@ -0,0 +1,12 @@
{ config, pkgs, lib, ... }: {
options.lua.enable = lib.mkEnableOption "Lua programming language.";
config = lib.mkIf config.lua.enable {
home-manager.users.${config.user}.home.packages = with pkgs; [
stylua # Lua formatter
sumneko-lua-language-server # Lua LSP
];
};
}

View File

@ -0,0 +1,18 @@
{ config, pkgs, lib, ... }: {
options.nixlang.enable = lib.mkEnableOption "Nix programming language.";
config = lib.mkIf config.nixlang.enable {
home-manager.users.${config.user} = {
home.packages = with pkgs; [
nixfmt # Nix file formatter
nil # Nix language server
];
};
};
}

View File

@ -0,0 +1,22 @@
{ config, pkgs, lib, ... }: {
options.python.enable = lib.mkEnableOption "Python programming language.";
config = lib.mkIf config.python.enable {
home-manager.users.${config.user} = {
home.packages = with pkgs; [
# python310 # Standard Python interpreter
nodePackages.pyright # Python language server
black # Python formatter
python310Packages.flake8 # Python linter
];
programs.fish.shellAbbrs = { py = "python3"; };
};
};
}

View File

@ -0,0 +1,22 @@
{ config, pkgs, lib, ... }: {
options.terraform.enable = lib.mkEnableOption "Terraform tools.";
config = lib.mkIf config.terraform.enable {
home-manager.users.${config.user} = {
programs.fish.shellAbbrs = {
# Terraform
te = "terraform";
};
home.packages = with pkgs; [
terraform # Terraform executable
terraform-ls # Language server
tflint # Linter
];
};
};
}

View File

@ -0,0 +1,5 @@
{ ... }: {
imports = [ ./dotfiles.nix ./notes.nix ];
}

View File

@ -0,0 +1,30 @@
{ config, pkgs, lib, ... }: {
options.dotfiles.enable = lib.mkEnableOption "Clone dotfiles.";
config = lib.mkIf config.dotfiles.enable {
home-manager.users.${config.user} = {
home.activation = {
# Always clone dotfiles repository if it doesn't exist
cloneDotfiles =
config.home-manager.users.${config.user}.lib.dag.entryAfter
[ "writeBoundary" ] ''
if [ ! -d "${config.dotfilesPath}" ]; then
$DRY_RUN_CMD mkdir --parents $VERBOSE_ARG $(dirname "${config.dotfilesPath}")
$DRY_RUN_CMD ${pkgs.git}/bin/git clone ${config.dotfilesRepo} "${config.dotfilesPath}"
fi
'';
};
# Set a variable for dotfiles repo, not necessary but convenient
home.sessionVariables.DOTS = config.dotfilesPath;
};
};
}

View File

@ -0,0 +1,15 @@
{ config, pkgs, lib, ... }: {
options.charm.enable = lib.mkEnableOption "Charm utilities.";
config.home-manager.users.${config.user} = lib.mkIf config.charm.enable {
home.packages = with pkgs; [
glow # Markdown previews
skate # Key-value store
charm # Manage account and filesystem
];
};
}

View File

@ -1,4 +1,4 @@
{ config, pkgs, lib, ... }: { { config, pkgs, ... }: {
users.users.${config.user}.shell = pkgs.fish; users.users.${config.user}.shell = pkgs.fish;
programs.fish.enable = programs.fish.enable =

Some files were not shown because too many files have changed in this diff Show More