2024-04-01 14:21:20 +02:00
|
|
|
{
|
|
|
|
description = ''
|
|
|
|
For questions just DM me on X: https://twitter.com/@m3tam3re
|
|
|
|
There is also some NIXOS content on my YT channel: https://www.youtube.com/@m3tam3re
|
|
|
|
|
|
|
|
One of the best ways to learn NIXOS is to read other peoples configurations. I have personally learned a lot from Gabriel Fontes configs:
|
|
|
|
https://github.com/Misterio77/nix-starter-configs
|
2024-04-06 06:12:36 +02:00
|
|
|
https://github.com/Misterio77/nix-config
|
|
|
|
|
|
|
|
Please also check out the starter configs mentioned above.
|
2024-04-01 14:21:20 +02:00
|
|
|
'';
|
|
|
|
|
2025-01-13 10:32:08 +01:00
|
|
|
inputs = {nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";};
|
2024-04-01 14:21:20 +02:00
|
|
|
|
2025-01-13 10:32:08 +01:00
|
|
|
outputs = {nixpkgs, ...}: let
|
|
|
|
systems = [
|
|
|
|
"aarch64-linux"
|
|
|
|
"i686-linux"
|
|
|
|
"x86_64-linux"
|
|
|
|
"aarch64-darwin"
|
|
|
|
"x86_64-darwin"
|
|
|
|
];
|
|
|
|
forAllSystems = nixpkgs.lib.genAttrs systems;
|
|
|
|
in {
|
|
|
|
templates = {
|
|
|
|
nixos-standard = {
|
|
|
|
description = ''
|
|
|
|
NIXOS Standard - contains the basic flake structure I use to configure multiple machines and user environtments.
|
|
|
|
'';
|
|
|
|
path = ./nixos/standard;
|
|
|
|
};
|
|
|
|
vserver = {
|
|
|
|
description = ''
|
|
|
|
NIXOS Vserver - basic vserver with traefik and podman to be run on a vps.
|
|
|
|
'';
|
2025-01-13 12:02:08 +01:00
|
|
|
welcomeText = ''
|
|
|
|
## Next steps
|
|
|
|
|
|
|
|
1. Move hosts/HOSTNAME to hosts/your-hostname with
|
|
|
|
|
|
|
|
`mv hosts/__HOSTNAME__ hosts/your-hostname`
|
|
|
|
|
|
|
|
2. Change the hostname in your 2. Edit configuration.nix
|
|
|
|
|
|
|
|
`networking.hostName = "__HOSTNAME__"; # CHANGE ME.`
|
|
|
|
|
|
|
|
`networking.hostId = ""; # CHANGE ME`
|
|
|
|
|
|
|
|
You can generate a random hostId with openssl rand -hex 4
|
|
|
|
'';
|
2025-01-13 10:32:08 +01:00
|
|
|
path = ./nixos/vps;
|
2024-04-01 14:21:20 +02:00
|
|
|
};
|
|
|
|
};
|
2025-01-13 10:32:08 +01:00
|
|
|
formatter =
|
|
|
|
forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
|
|
|
|
};
|
2024-04-01 14:21:20 +02:00
|
|
|
}
|