treewide format
This commit is contained in:
parent
653eb2d606
commit
b346790feb
31 changed files with 150 additions and 104 deletions
|
|
@ -1,4 +1,5 @@
|
|||
{lib, ...}: {
|
||||
{ lib, ... }:
|
||||
{
|
||||
services.avahi = lib.mkDefault {
|
||||
enable = true;
|
||||
nssmdns4 = true;
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
{}
|
||||
{ }
|
||||
|
|
|
|||
|
|
@ -1,9 +1,13 @@
|
|||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = [
|
||||
pkgs.nextdns
|
||||
];
|
||||
services.nextdns = {
|
||||
enable = true;
|
||||
arguments = ["-config" "cc2b9b"];
|
||||
arguments = [
|
||||
"-config"
|
||||
"cc2b9b"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,9 +5,11 @@
|
|||
inputs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
sopsFolder = builtins.toString inputs.nix-secrets + "/sops";
|
||||
in {
|
||||
in
|
||||
{
|
||||
#the import for inputs.sops-nix.nixosModules.sops is handled in hosts/common/core/default.nix so that it can be dynamically input according to the platform
|
||||
|
||||
sops = {
|
||||
|
|
@ -16,7 +18,7 @@ in {
|
|||
validateSopsFiles = false;
|
||||
age = {
|
||||
# automatically import host SSH keys as age keys
|
||||
sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"];
|
||||
sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
||||
};
|
||||
# secrets will be output to /run/secrets
|
||||
# e.g. /run/secrets/msmtp-password
|
||||
|
|
@ -49,13 +51,14 @@ in {
|
|||
# The containing folders are created as root and if this is the first ~/.config/ entry,
|
||||
# the ownership is busted and home-manager can't target because it can't write into .config...
|
||||
# FIXME(sops): We might not need this depending on how https://github.com/Mic92/sops-nix/issues/381 is fixed
|
||||
system.activationScripts.sopsSetAgeKeyOwnership = let
|
||||
ageFolder = "${config.hostSpec.home}/.config/sops/age";
|
||||
user = config.users.users.${config.hostSpec.username}.name;
|
||||
group = config.users.users.${config.hostSpec.username}.group;
|
||||
in ''
|
||||
mkdir -p ${ageFolder} || true
|
||||
chown -R ${user}:${group} ${config.hostSpec.home}/.config
|
||||
'';
|
||||
system.activationScripts.sopsSetAgeKeyOwnership =
|
||||
let
|
||||
ageFolder = "${config.hostSpec.home}/.config/sops/age";
|
||||
user = config.users.users.${config.hostSpec.username}.name;
|
||||
group = config.users.users.${config.hostSpec.username}.group;
|
||||
in
|
||||
''
|
||||
mkdir -p ${ageFolder} || true
|
||||
chown -R ${user}:${group} ${config.hostSpec.home}/.config
|
||||
'';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,8 @@
|
|||
|
||||
services.fail2ban = {
|
||||
enable = lib.mkDefault true;
|
||||
ignoreIP = [ # Expected internal IP ranges
|
||||
ignoreIP = [
|
||||
# Expected internal IP ranges
|
||||
"172.16.0.0/12"
|
||||
"192.168.0.0/16"
|
||||
];
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@
|
|||
withSwap ? false,
|
||||
swapSize,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
disko.devices = {
|
||||
disk = {
|
||||
disk0 = {
|
||||
|
|
@ -24,14 +25,14 @@
|
|||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = ["defaults"];
|
||||
mountOptions = [ "defaults" ];
|
||||
};
|
||||
};
|
||||
root = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = ["-f"]; # Override existing partition
|
||||
extraArgs = [ "-f" ]; # Override existing partition
|
||||
# Subvolumes must set a mountpoint in order to be mounted,
|
||||
# unless their parent is mounted
|
||||
subvolumes = {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@
|
|||
swapSize,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
fileSystems."/persist".neededForBoot = true;
|
||||
disko.devices = {
|
||||
disk = {
|
||||
|
|
@ -25,14 +26,14 @@
|
|||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = ["defaults"];
|
||||
mountOptions = [ "defaults" ];
|
||||
};
|
||||
};
|
||||
root = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = ["-f"]; # Override existing partition
|
||||
extraArgs = [ "-f" ]; # Override existing partition
|
||||
# Subvolumes must set a mountpoint in order to be mounted,
|
||||
# unless their parent is mounted
|
||||
subvolumes = {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@
|
|||
withSwap ? false,
|
||||
swapSize,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
disko.devices = {
|
||||
disk = {
|
||||
disk0 = {
|
||||
|
|
@ -26,14 +27,14 @@
|
|||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = ["umask=0077"];
|
||||
mountOptions = [ "umask=0077" ];
|
||||
};
|
||||
};
|
||||
root = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = ["-f"]; # Override existing partition
|
||||
extraArgs = [ "-f" ]; # Override existing partition
|
||||
# Subvolumes must set a mountpoint in order to be mounted,
|
||||
# unless their parent is mounted
|
||||
subvolumes = {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
services.keyd = {
|
||||
enable = true;
|
||||
keyboards.default = {
|
||||
ids = ["*"];
|
||||
ids = [ "*" ];
|
||||
settings = {
|
||||
main = {
|
||||
capslock = "layer(standardL2)";
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
services.mysql = {
|
||||
enable = true;
|
||||
package = pkgs.mariadb_118;
|
||||
};
|
||||
services.mysql = {
|
||||
enable = true;
|
||||
package = pkgs.mariadb_118;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
services.printing = {
|
||||
enable = true;
|
||||
drivers = with pkgs; [
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
services.glances = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
mycli
|
||||
];
|
||||
|
|
@ -6,7 +7,7 @@
|
|||
networking.firewall.allowedTCPPorts = [
|
||||
3306
|
||||
];
|
||||
|
||||
|
||||
services.mysql = {
|
||||
enable = true;
|
||||
package = pkgs.mariadb_118;
|
||||
|
|
|
|||
|
|
@ -7,15 +7,23 @@
|
|||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = [];
|
||||
boot.extraModulePackages = [];
|
||||
boot.initrd.availableKernelModules = [
|
||||
"nvme"
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"usbhid"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
hardware.coral.usb.enable = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,15 +7,21 @@
|
|||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "usb_storage" "sd_mod"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-intel"];
|
||||
boot.extraModulePackages = [];
|
||||
boot.initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
hardware.graphics.extraPackages = with pkgs; [
|
||||
rocmPackages.clr.icd
|
||||
];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue