mirror of
https://github.com/Superredstone/nixos.git
synced 2026-06-17 15:24:39 +02:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
3f7b0028b9
|
|||
|
535b169dd5
|
|||
|
aac20b0c00
|
@@ -9,9 +9,13 @@ My own NixOS configuration, made for myself so probably won't suit you well.
|
|||||||
```bash
|
```bash
|
||||||
git clone git@github.com:Superredstone/nixos.git ~/.nixos && cd .nixos
|
git clone git@github.com:Superredstone/nixos.git ~/.nixos && cd .nixos
|
||||||
```
|
```
|
||||||
2) Choose an hostname
|
2) Choose a hostname
|
||||||
3) Copy your current configuration inside of `machines/$HOSTNAME`
|
3) Copy your current configuration inside of `machines/$HOSTNAME`
|
||||||
4) Create a file named `machines/$HOSTNAME/default.nix` with the following contents
|
4) Load basic utils to your current environment
|
||||||
|
```bash
|
||||||
|
nix-shell -p git neovim just
|
||||||
|
```
|
||||||
|
5) Create a file named `machines/$HOSTNAME/default.nix` with the following contents
|
||||||
```nix
|
```nix
|
||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
@@ -20,11 +24,11 @@ git clone git@github.com:Superredstone/nixos.git ~/.nixos && cd .nixos
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
5) Follow `secrets/README.md`
|
|
||||||
6) Switch to the new configuration
|
6) Switch to the new configuration
|
||||||
```bash
|
```bash
|
||||||
HOSTNAME=HOSTNAME just switch
|
HOSTNAME=HOSTNAME just new-machine
|
||||||
```
|
```
|
||||||
|
7) Follow `secrets/README.md`
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
After commit [bd788c3](https://github.com/Superredstone/nixos/commit/bd788c366af4b94e1fab8251cabc08fc10f5b037) this repository will follow the [conventional commits specification](https://www.conventionalcommits.org/en/v1.0.0/#specification)
|
After commit [bd788c3](https://github.com/Superredstone/nixos/commit/bd788c366af4b94e1fab8251cabc08fc10f5b037) this repository will follow the [conventional commits specification](https://www.conventionalcommits.org/en/v1.0.0/#specification)
|
||||||
|
|||||||
@@ -1,7 +1,4 @@
|
|||||||
{ ... }:
|
{ ... }:
|
||||||
let
|
|
||||||
dockerNetwork = "172.18.0.0/16";
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
networking = {
|
networking = {
|
||||||
networkmanager.enable = true;
|
networkmanager.enable = true;
|
||||||
@@ -22,10 +19,6 @@ in
|
|||||||
80
|
80
|
||||||
443
|
443
|
||||||
];
|
];
|
||||||
extraInputRules = ''
|
|
||||||
ip saddr ${dockerNetwork} tcp dport 5900 accept
|
|
||||||
ip saddr ${dockerNetwork} tcp dport 8001-8005 accept
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
networking = {
|
networking = {
|
||||||
networkmanager.enable = true;
|
networkmanager.enable = true;
|
||||||
wireguard.enable = true;
|
wireguard.enable = true;
|
||||||
nftables.enable = true;
|
|
||||||
firewall = {
|
firewall = {
|
||||||
checkReversePath = false;
|
checkReversePath = false;
|
||||||
allowedUDPPorts = [ 25565 ];
|
allowedUDPPorts = [ 25565 ];
|
||||||
|
|||||||
Reference in New Issue
Block a user