Merge branch 'main' of gh:greg-hellings/nixos-config
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
[](https://garnix.io)
|
||||||
|
|
||||||
This is a unified repo to contain my personal configurations for NixOS machines.
|
This is a unified repo to contain my personal configurations for NixOS machines.
|
||||||
|
|
||||||
# How To Use This
|
# How To Use This
|
||||||
@@ -11,22 +13,12 @@ Go through the normal process to setup a NixOS system during installation.
|
|||||||
/etc/nixos folder
|
/etc/nixos folder
|
||||||
5. Run the configuration generator. It should only genreate the hardware-configuration.nix
|
5. Run the configuration generator. It should only genreate the hardware-configuration.nix
|
||||||
file, which this repo gitignores
|
file, which this repo gitignores
|
||||||
6. Symlink the folder for the appropriate host to the location 'host' as such:
|
6. Create a folder and file with the machine name in `hosts/<machine>/default.nix`
|
||||||
`ln -s hosts/myhost host`.
|
7. Add `hosts/default.nix` an appropriate entry for the machine you are building
|
||||||
7. Run the nixos installation command
|
8. Create a file `home/hosts/<machine>/default.nix` with the new machine name as well
|
||||||
|
|
||||||
# Adding new hosts
|
# Adding new hosts
|
||||||
|
|
||||||
To add a new host, create a folder in the directory `hosts/` that matches the name of
|
To add a new host, create a folder in the directory `hosts/` that matches the name of
|
||||||
the target system. Each host must contain, minimally, a `default.nix` file that serves
|
the target system. Each host must contain, minimally, a `default.nix` file that serves
|
||||||
as the basis of configuring that host.
|
as the basis of configuring that host.
|
||||||
|
|
||||||
## Profiles
|
|
||||||
|
|
||||||
Certain shared characteristics can be created in the `profiles/` folder and included in
|
|
||||||
a particular host's configuration. For instance, any hosts that are running on a
|
|
||||||
Raspsberry Pi 4 should include the `profiles/rpi4.nix` file to properly configure things
|
|
||||||
like the kernel and boot parameters. Since I live in the "America/Chicago" timezone, hosts
|
|
||||||
that run in my home will also include `profiles/home.nix`. That file will also set the
|
|
||||||
domain that I use for my hosts at home. This allows shared content to be reused across
|
|
||||||
multiple machines without the need to repeat it.
|
|
||||||
|
|||||||
+2
-3
@@ -1,8 +1,7 @@
|
|||||||
builds:
|
builds:
|
||||||
include:
|
include:
|
||||||
- '*.x86_64-linux.*'
|
|
||||||
- '*.aarch64-linux.*'
|
|
||||||
- nixosConfigurations.*
|
|
||||||
- darwinConfigurations.*
|
- darwinConfigurations.*
|
||||||
- devShell.x86_64-linux
|
- devShell.x86_64-linux
|
||||||
- devShell.aarch64-linux
|
- devShell.aarch64-linux
|
||||||
|
- homeConfigurations.greghellings.activationPackage
|
||||||
|
- nixosConfigurations.*
|
||||||
|
|||||||
+4
-2
@@ -4,8 +4,8 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
{
|
rec {
|
||||||
"gregory.hellings" =
|
greghellings =
|
||||||
let
|
let
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
pkgs = (import inputs.nixunstable { inherit system overlays; });
|
pkgs = (import inputs.nixunstable { inherit system overlays; });
|
||||||
@@ -20,4 +20,6 @@
|
|||||||
username = "gregory.hellings";
|
username = "gregory.hellings";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
"gregory.hellings" = greghellings;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
+1
-1
@@ -27,7 +27,7 @@
|
|||||||
"chronicles.thehellings.lan" = lib.hm.dag.entryBefore [ "*.thehellings.lan"] nas;
|
"chronicles.thehellings.lan" = lib.hm.dag.entryBefore [ "*.thehellings.lan"] nas;
|
||||||
|
|
||||||
gh = { user = "git"; hostname = "github.com"; };
|
gh = { user = "git"; hostname = "github.com"; };
|
||||||
"src" = { user = "gitea"; hostname = "src.thehellings.com"; };
|
"src" = { user = "forgejo"; hostname = "src.thehellings.com"; };
|
||||||
|
|
||||||
"*.thehellings.lan" = owned;
|
"*.thehellings.lan" = owned;
|
||||||
"10.42.*" = owned;
|
"10.42.*" = owned;
|
||||||
|
|||||||
@@ -49,7 +49,6 @@ in {
|
|||||||
};
|
};
|
||||||
icdm-root = unstable { name = "icdm-root"; };
|
icdm-root = unstable { name = "icdm-root"; };
|
||||||
linode = machine { name = "linode"; };
|
linode = machine { name = "linode"; };
|
||||||
lappy = machine { name = "lappy"; };
|
|
||||||
mm = unstable { name = "mm"; };
|
mm = unstable { name = "mm"; };
|
||||||
myself = unstable { name = "myself"; };
|
myself = unstable { name = "myself"; };
|
||||||
iso = machine { name = "iso"; };
|
iso = machine { name = "iso"; };
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ let
|
|||||||
"10.42.1.12 tv"
|
"10.42.1.12 tv"
|
||||||
|
|
||||||
"10.42.100.6 isaiahbmc isaiahbmc.thehellings.lan"
|
"10.42.100.6 isaiahbmc isaiahbmc.thehellings.lan"
|
||||||
|
|
||||||
# Tailscale hosts
|
# Tailscale hosts
|
||||||
"100.90.74.19 jude.home"
|
"100.90.74.19 jude.home"
|
||||||
"100.88.91.27 dns.home"
|
"100.88.91.27 dns.home"
|
||||||
@@ -24,15 +25,12 @@ let
|
|||||||
"100.115.57.8 linode.home"
|
"100.115.57.8 linode.home"
|
||||||
"100.88.91.27 genesis.home jellyfin.home smart.home zwave.home"
|
"100.88.91.27 genesis.home jellyfin.home smart.home zwave.home"
|
||||||
"100.78.16.88 mm.home"
|
"100.78.16.88 mm.home"
|
||||||
"100..84.183.79 myself.home myself.shire-zebra.ts.net"
|
"100.84.183.79 myself.home myself.shire-zebra.ts.net git.thehellings.lan"
|
||||||
|
|
||||||
# Dev hosts
|
# Dev hosts
|
||||||
"10.42.101.1 icdm.lan wiki.icdm.lan *.icdm.lan"
|
"10.42.101.1 icdm.lan wiki.icdm.lan *.icdm.lan"
|
||||||
];
|
];
|
||||||
|
|
||||||
extraConfig = builtins.concatStringsSep "\n" [
|
|
||||||
];
|
|
||||||
|
|
||||||
adblockUpdate = pkgs.writeShellScriptBin "adblockUpdate" (builtins.readFile ./adblockUpdate.sh);
|
adblockUpdate = pkgs.writeShellScriptBin "adblockUpdate" (builtins.readFile ./adblockUpdate.sh);
|
||||||
proxyPort = 3128;
|
proxyPort = 3128;
|
||||||
dnsPort = 53;
|
dnsPort = 53;
|
||||||
@@ -190,7 +188,6 @@ in {
|
|||||||
hostsdir = "/etc/hosts.d/";
|
hostsdir = "/etc/hosts.d/";
|
||||||
server = dnsServers;
|
server = dnsServers;
|
||||||
};
|
};
|
||||||
extraConfig = "${extraConfig}";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Update adblock list
|
# Update adblock list
|
||||||
@@ -212,6 +209,7 @@ in {
|
|||||||
#};
|
#};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
bind
|
||||||
curl # Used by dnsmasq fetching
|
curl # Used by dnsmasq fetching
|
||||||
sqlite
|
sqlite
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user