mirror of
https://github.com/nmasur/dotfiles
synced 2025-07-07 10:10:14 +00:00
Compare commits
50 Commits
54e89d3acd
...
legacy
Author | SHA1 | Date | |
---|---|---|---|
450118d234 | |||
cc84f1d37a | |||
ded498f4c9 | |||
0d0ee1fc5a | |||
251dce68bb | |||
448c97665b | |||
86aa02aae4 | |||
6cd22bc7ce | |||
048de4772c | |||
700e59e6c8 | |||
07e0afa1e9 | |||
6577b9e49b | |||
58a0e6166d | |||
e8c5a10df7 | |||
37fa835c66 | |||
fa69557ced | |||
a9a06fb5fc | |||
ceaad9d186 | |||
521937e366 | |||
8915f17ea3 | |||
17799909b2 | |||
7a4c3b930d | |||
e7bbee5da0 | |||
2dda6a31bd | |||
e4d76189e6 | |||
0bc8a233d8 | |||
524a5aa347 | |||
b4ddb149cc | |||
d021baa1bb | |||
7063bd5f7a | |||
d040077d3a | |||
bf1d2f1e9e | |||
fd7c523ebd | |||
1b32457956 | |||
50acdd0c58 | |||
a0c99a8449 | |||
d1b144f441 | |||
adb7956213 | |||
e011a1c6f1 | |||
1d8638777c | |||
2620b43925 | |||
7d53a80d49 | |||
9b12369e43 | |||
427bd1a421 | |||
74e346fa63 | |||
4a803427fb | |||
d127ccacb0 | |||
650d1e91a2 | |||
d86534727e | |||
13e5b9ddc5 |
38
README.md
38
README.md
@ -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,27 +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/config)
|
- [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:
|
Try out my Neovim config (requires [nix](https://nixos.org/download.html)):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
nix run github:nmasur/dotfiles#neovim
|
nix run github:nmasur/dotfiles#neovim
|
||||||
```
|
```
|
||||||
|
|
||||||
Or build it as a package:
|
Or build it as a package (requires [nix](https://nixos.org/download.html)):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
nix build github:nmasur/dotfiles#neovim
|
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
|
||||||
|
|
||||||
@ -38,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
|
||||||
@ -48,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
|
||||||
@ -59,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
|
||||||
@ -86,17 +92,7 @@ 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
|
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
@ -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; };
|
||||||
|
|
||||||
@ -24,11 +57,10 @@
|
|||||||
neovim = {
|
neovim = {
|
||||||
type = "app";
|
type = "app";
|
||||||
program = "${
|
program = "${
|
||||||
(import ../modules/neovim/package {
|
(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; };
|
||||||
};
|
|
||||||
})
|
})
|
||||||
}/bin/nvim";
|
}/bin/nvim";
|
||||||
};
|
};
|
||||||
|
@ -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
|
||||||
'');
|
'');
|
||||||
|
@ -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}
|
||||||
'');
|
'');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -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
157
flake.lock
generated
@ -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": {
|
||||||
|
42
flake.nix
42
flake.nix
@ -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; };
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -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; })
|
17
generators/staff/default.nix
Normal file
17
generators/staff/default.nix
Normal 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"
|
||||||
|
];
|
||||||
|
}];
|
||||||
|
}
|
@ -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
|
|
||||||
];
|
|
||||||
}
|
|
@ -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;
|
|
||||||
}
|
|
@ -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
|
|
||||||
];
|
];
|
||||||
}
|
}
|
@ -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") ];
|
@ -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
|
|
||||||
];
|
];
|
||||||
}
|
}
|
@ -1,12 +1,16 @@
|
|||||||
|
# The Looking Glass
|
||||||
|
# System configuration for my work Macbook
|
||||||
|
|
||||||
{ inputs, globals, overlays, ... }:
|
{ inputs, globals, overlays, ... }:
|
||||||
|
|
||||||
with inputs;
|
with inputs;
|
||||||
|
|
||||||
# System configuration for my work MacBook
|
|
||||||
darwin.lib.darwinSystem {
|
darwin.lib.darwinSystem {
|
||||||
system = "x86_64-darwin";
|
system = "x86_64-darwin";
|
||||||
specialArgs = { };
|
specialArgs = { };
|
||||||
modules = [
|
modules = [
|
||||||
|
../../modules/common
|
||||||
|
../../modules/darwin
|
||||||
(globals // {
|
(globals // {
|
||||||
user = "Noah.Masur";
|
user = "Noah.Masur";
|
||||||
gitName = "Noah-Masur_1701";
|
gitName = "Noah-Masur_1701";
|
||||||
@ -14,30 +18,31 @@ darwin.lib.darwinSystem {
|
|||||||
})
|
})
|
||||||
home-manager.darwinModules.home-manager
|
home-manager.darwinModules.home-manager
|
||||||
{
|
{
|
||||||
|
networking.hostName = "noah-masur-mac";
|
||||||
identityFile = "/Users/Noah.Masur/.ssh/id_ed25519";
|
identityFile = "/Users/Noah.Masur/.ssh/id_ed25519";
|
||||||
gui.enable = true;
|
gui.enable = true;
|
||||||
theme = {
|
theme = {
|
||||||
colors = (import ../../modules/colorscheme/gruvbox).dark;
|
colors = (import ../../colorscheme/gruvbox).dark;
|
||||||
dark = true;
|
dark = true;
|
||||||
};
|
};
|
||||||
mailUser = globals.user;
|
mail.user = globals.user;
|
||||||
networking.hostName = "noah-masur-mac";
|
|
||||||
nixpkgs.overlays = [ firefox-darwin.overlay ] ++ overlays;
|
nixpkgs.overlays = [ firefox-darwin.overlay ] ++ 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;
|
||||||
|
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;
|
||||||
}
|
}
|
||||||
../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
48
hosts/swan/default.nix
Normal 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
62
hosts/tempest/default.nix
Normal 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;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
40
hosts/tempest/hardware-configuration.nix
Normal file
40
hosts/tempest/hardware-configuration.nix
Normal 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;
|
||||||
|
}
|
@ -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 ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
@ -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
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
@ -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 ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
@ -1,12 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
|
||||||
|
|
||||||
config = lib.mkIf config.gui.enable {
|
|
||||||
|
|
||||||
home-manager.users.${config.user} = {
|
|
||||||
|
|
||||||
home.packages = with pkgs; [ qbittorrent ];
|
|
||||||
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
@ -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
|
|
20
modules/common/applications/1password.nix
Normal file
20
modules/common/applications/1password.nix
Normal 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 ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
@ -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";
|
@ -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
|
@ -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 ];
|
@ -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 =
|
||||||
|
if pkgs.stdenv.isDarwin then pkgs.firefox-bin else pkgs.firefox;
|
||||||
|
profiles.default = {
|
||||||
|
id = 0;
|
||||||
|
name = "default";
|
||||||
|
isDefault = true;
|
||||||
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||||
ublock-origin
|
ublock-origin
|
||||||
vimium
|
vimium
|
||||||
multi-account-containers
|
multi-account-containers
|
||||||
facebook-container
|
facebook-container
|
||||||
temporary-containers
|
temporary-containers
|
||||||
onepassword-password-manager
|
(lib.mkIf config._1password.enable onepassword-password-manager)
|
||||||
okta-browser-plugin
|
okta-browser-plugin
|
||||||
sponsorblock
|
sponsorblock
|
||||||
reddit-enhancement-suite
|
reddit-enhancement-suite
|
||||||
bypass-paywalls-clean
|
return-youtube-dislikes
|
||||||
markdownload
|
markdownload
|
||||||
darkreader
|
darkreader
|
||||||
snowflake
|
snowflake
|
||||||
don-t-fuck-with-paste
|
don-t-fuck-with-paste
|
||||||
i-dont-care-about-cookies
|
i-dont-care-about-cookies
|
||||||
|
wappalyzer
|
||||||
];
|
];
|
||||||
profiles.Profile0 = {
|
|
||||||
id = 0;
|
|
||||||
name = "default";
|
|
||||||
isDefault = true;
|
|
||||||
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;
|
@ -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";
|
30
modules/common/applications/media.nix
Normal file
30
modules/common/applications/media.nix
Normal 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" ];
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
@ -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 =
|
19
modules/common/applications/obsidian.nix
Normal file
19
modules/common/applications/obsidian.nix
Normal 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 ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
21
modules/common/applications/qbittorrent.nix
Normal file
21
modules/common/applications/qbittorrent.nix
Normal 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 ];
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
@ -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
|
@ -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} = {
|
||||||
|
|
@ -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"
|
@ -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;
|
||||||
settings = {
|
|
||||||
backend = "imap";
|
backend = "imap";
|
||||||
sender = "smtp";
|
sender = "smtp";
|
||||||
|
settings = {
|
||||||
downloads-dir = config.userDirs.download;
|
downloads-dir = config.userDirs.download;
|
||||||
smtp-insecure = true;
|
smtp-insecure = true;
|
||||||
};
|
};
|
@ -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
|
@ -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)
|
@ -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
|
44
modules/common/neovim/default.nix
Normal file
44
modules/common/neovim/default.nix
Normal 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 ];
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
@ -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
|
@ -4,7 +4,8 @@
|
|||||||
|
|
||||||
vim.filetype.add({
|
vim.filetype.add({
|
||||||
pattern = {
|
pattern = {
|
||||||
[".*%.tfvars"] = "terraform",
|
[".*%.tfvars"] = "hcl",
|
||||||
|
[".*%.tf"] = "hcl",
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
@ -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;
|
||||||
# }
|
# }
|
||||||
|
|
12
modules/common/programming/default.nix
Normal file
12
modules/common/programming/default.nix
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{ ... }: {
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
./haskell.nix
|
||||||
|
./kubernetes.nix
|
||||||
|
./lua.nix
|
||||||
|
./nix.nix
|
||||||
|
./python.nix
|
||||||
|
./terraform.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
}
|
14
modules/common/programming/haskell.nix
Normal file
14
modules/common/programming/haskell.nix
Normal 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" ];
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
145
modules/common/programming/kubernetes.nix
Normal file
145
modules/common/programming/kubernetes.nix
Normal 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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
12
modules/common/programming/lua.nix
Normal file
12
modules/common/programming/lua.nix
Normal 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
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
18
modules/common/programming/nix.nix
Normal file
18
modules/common/programming/nix.nix
Normal 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
|
||||||
|
];
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
22
modules/common/programming/python.nix
Normal file
22
modules/common/programming/python.nix
Normal 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"; };
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
22
modules/common/programming/terraform.nix
Normal file
22
modules/common/programming/terraform.nix
Normal 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
|
||||||
|
];
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
5
modules/common/repositories/default.nix
Normal file
5
modules/common/repositories/default.nix
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{ ... }: {
|
||||||
|
|
||||||
|
imports = [ ./dotfiles.nix ./notes.nix ];
|
||||||
|
|
||||||
|
}
|
30
modules/common/repositories/dotfiles.nix
Normal file
30
modules/common/repositories/dotfiles.nix
Normal 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;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
15
modules/common/shell/charm.nix
Normal file
15
modules/common/shell/charm.nix
Normal 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
|
||||||
|
];
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
@ -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
Reference in New Issue
Block a user