Set up flake layout
This commit is contained in:
parent
e465fe9a29
commit
e6df3e7949
11 changed files with 24 additions and 2 deletions
17
README.md
Normal file
17
README.md
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
## NixOS System flakes
|
||||||
|
|
||||||
|
This is currently in heavy development. The goal is to create a reusable structure for Freelock infrastructure, to make recreating a host or building a new one a breeze.
|
||||||
|
|
||||||
|
## Creating a new host
|
||||||
|
|
||||||
|
Start with a bare NixOS install, sort out the hardware-specific needs (partitioning scheme - /boot, swap, /nix partitions, etc).
|
||||||
|
|
||||||
|
1. Clone this repository.
|
||||||
|
2. Create a directory under hosts for the host, based on the hostname.
|
||||||
|
3. Copy the hardware-configuration.nix into the new directory.
|
||||||
|
4. Copy a default.nix from a similar host into the new directory.
|
||||||
|
5. Edit to include the appropriate modules and any host-specific settings.
|
||||||
|
6. Add a stanza in the top-level flake.nix for the new host.
|
||||||
|
7. Commit changes and push to central repo.
|
||||||
|
8. Delete /etc/nixos and move this directory into place (for servers at least -- can symlink if user-managed).
|
||||||
|
9. `sudo nixos-rebuild switch`.
|
0
desktop/default.nix
Normal file
0
desktop/default.nix
Normal file
0
desktop/dev.nix
Normal file
0
desktop/dev.nix
Normal file
0
desktop/office.nix
Normal file
0
desktop/office.nix
Normal file
|
@ -71,6 +71,11 @@
|
||||||
# Enable CUPS to print documents.
|
# Enable CUPS to print documents.
|
||||||
services.printing.enable = true;
|
services.printing.enable = true;
|
||||||
|
|
||||||
|
services.salt.minion.enable = true;
|
||||||
|
services.salt.minion.configuration = {
|
||||||
|
master = "salt.freelock.lan";
|
||||||
|
location = [ "freelock" ];
|
||||||
|
};
|
||||||
# Enable sound with pipewire.
|
# Enable sound with pipewire.
|
||||||
sound.enable = true;
|
sound.enable = true;
|
||||||
hardware.pulseaudio.enable = false;
|
hardware.pulseaudio.enable = false;
|
||||||
|
@ -203,10 +208,10 @@
|
||||||
device = "/home/docker";
|
device = "/home/docker";
|
||||||
options = [ "bind" ];
|
options = [ "bind" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Allow Xdebug to use port 9003.
|
# Allow Xdebug to use port 9003.
|
||||||
networking.firewall.allowedTCPPorts = [ 9000 9003 ];
|
networking.firewall.allowedTCPPorts = [ 9000 9003 ];
|
||||||
|
|
||||||
# Make it possible for ddev to modify the /etc/hosts file.
|
# Make it possible for ddev to modify the /etc/hosts file.
|
||||||
# Otherwise you'll have to manually change the
|
# Otherwise you'll have to manually change the
|
||||||
# hosts configuration after creating a new ddev project.
|
# hosts configuration after creating a new ddev project.
|
0
server/default.nix
Normal file
0
server/default.nix
Normal file
0
server/docker.nix
Normal file
0
server/docker.nix
Normal file
0
server/mail.nix
Normal file
0
server/mail.nix
Normal file
0
server/ns.nix
Normal file
0
server/ns.nix
Normal file
0
server/salt-master.nix
Normal file
0
server/salt-master.nix
Normal file
Loading…
Reference in a new issue