fix: dns
This commit is contained in:
parent
a86424bb64
commit
9e05e68cc4
6 changed files with 80 additions and 6 deletions
33
hosts/thegeneralist-central/configuration.nix
Normal file
33
hosts/thegeneralist-central/configuration.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page, on
|
||||
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
||||
|
||||
{ self, config, pkgs, lib, inputs, ... }:
|
||||
|
||||
{
|
||||
imports = [ ./hardware-configuration.nix ];
|
||||
|
||||
users.knownUsers = [
|
||||
"thegeneralist"
|
||||
];
|
||||
|
||||
users.users.thegeneralist = {
|
||||
name = "thegeneralist";
|
||||
home = "/Users/thegeneralist";
|
||||
shell = pkgs.zsh;
|
||||
uid = 501;
|
||||
# openssh.authorizedKeys.keys = let
|
||||
# inherit (import ../../keys.nix) thegeneralist;
|
||||
# in [ thegeneralist ];
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
backupFileExtension = "home.bak";
|
||||
users.thegeneralist.home = {
|
||||
stateVersion = "25.11";
|
||||
homeDirectory = "/Users/thegeneralist";
|
||||
};
|
||||
};
|
||||
|
||||
system.stateVersion = 6;
|
||||
}
|
||||
31
hosts/thegeneralist-central/default.nix
Normal file
31
hosts/thegeneralist-central/default.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
lib: inputs: self: lib.darwinSystem {
|
||||
specialArgs = inputs // { inherit inputs; inherit self; };
|
||||
modules = [
|
||||
# Extensions: nixosModules, darwinModules, overlays
|
||||
({ pkgs, lib, inputs, ... }: let
|
||||
inherit (lib) attrValues hasAttrByPath getAttrFromPath filter;
|
||||
|
||||
collect = packagePath: (attrValues inputs)
|
||||
|> filter (hasAttrByPath packagePath)
|
||||
|> map (getAttrFromPath packagePath);
|
||||
|
||||
modules = collect [ "darwinModules" "default" ];
|
||||
# todo
|
||||
extensions = {
|
||||
nixpkgs.overlays = collect [ "overlays" "default" ];
|
||||
imports = modules;
|
||||
};
|
||||
in extensions)
|
||||
|
||||
./configuration.nix
|
||||
|
||||
# Modules
|
||||
({ pkgs, ... }: let
|
||||
inherit (lib) filter hasSuffix;
|
||||
commonModules = lib.filesystem.listFilesRecursive ../../modules/common |> filter (hasSuffix ".nix");
|
||||
darwinModules = lib.filesystem.listFilesRecursive ../../modules/darwin |> filter (hasSuffix ".nix");
|
||||
in {
|
||||
imports = commonModules ++ darwinModules;
|
||||
})
|
||||
];
|
||||
}
|
||||
11
hosts/thegeneralist-central/hardware-configuration.nix
Normal file
11
hosts/thegeneralist-central/hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{ lib, ... }:
|
||||
|
||||
{
|
||||
# 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;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "aarch64-darwin";
|
||||
}
|
||||
|
|
@ -2,7 +2,7 @@ lib: inputs: self: lib.nixosSystem {
|
|||
specialArgs = inputs // { inherit inputs; inherit self; };
|
||||
modules = [
|
||||
# Extensions: nixosModules, darwinModules, overlays
|
||||
({ pkgs, lib, ... }: let
|
||||
({ pkgs, lib, inputs, ... }: let
|
||||
inherit (lib) attrValues hasAttrByPath getAttrFromPath filter;
|
||||
|
||||
collect = packagePath: (attrValues inputs)
|
||||
|
|
@ -10,7 +10,7 @@ lib: inputs: self: lib.nixosSystem {
|
|||
|> map (getAttrFromPath packagePath);
|
||||
|
||||
modules = collect [ "nixosModules" "default" ];
|
||||
extensions = modules // {
|
||||
extensions = {
|
||||
nixpkgs.overlays = collect [ "overlays" "default" ];
|
||||
imports = modules;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -3,10 +3,8 @@
|
|||
in {
|
||||
options.dnsServers = mkOption {
|
||||
default = [
|
||||
"45.90.28.0#365fed.dns.nextdns.io"
|
||||
"2a07:a8c0::#365fed.dns.nextdns.io"
|
||||
"45.90.30.0#365fed.dns.nextdns.io"
|
||||
"2a07:a8c1::#365fed.dns.nextdns.io"
|
||||
"45.90.28.181#365fed.dns.nextdns.io"
|
||||
"45.90.30.181#365fed.dns.nextdns.io"
|
||||
"100.100.100.100#shorthair-wall.ts.net"
|
||||
];
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# TODO: this
|
||||
# { lib, ... }: let
|
||||
# sshOptions = {
|
||||
# PermitRootLogin = "no";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue