-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
322 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
imports = [ | ||
../../config | ||
../../config/applications/tty | ||
../../config/desktop | ||
../../config/services | ||
../../config/shell | ||
../../config/xdg-settings.nix | ||
|
||
../../config/work/famedly.nix | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,6 @@ | |
|
||
./greeter | ||
./sway.nix | ||
./wireguard.nix | ||
./yubikey.nix | ||
../modules | ||
]; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{lib, flake-inputs, ...}: { | ||
imports = [ | ||
flake-inputs.disko.nixosModules.disko | ||
|
||
../../networks/personal.nix | ||
|
||
./hardware-configuration.nix | ||
./disko.nix | ||
|
||
./hardware-policy.nix | ||
]; | ||
|
||
home-manager.users.tlater = import "${flake-inputs.self}/home-config/hosts/rin"; | ||
|
||
sops = { | ||
gnupg = lib.mkForce {}; | ||
age.keyFile = "/var/lib/sops/host.age"; | ||
}; | ||
|
||
networking = { | ||
hostName = "rin"; | ||
hostId = "e6aaf496"; | ||
wireless.interfaces = ["wlp2s0"]; | ||
}; | ||
|
||
systemd.network = { | ||
networks = { | ||
"40-wlp2s0" = { | ||
matchConfig.Name = "wlp2s0"; | ||
networkConfig.DHCP = "yes"; | ||
linkConfig.RequiredForOnline = "yes"; | ||
}; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
{ | ||
disko.devices.disk = { | ||
nvme0n1 = { | ||
type = "disk"; | ||
device = "/dev/nvme0n1"; | ||
content = { | ||
type = "gpt"; | ||
partitions = { | ||
ESP = { | ||
label = "EFI"; | ||
name = "ESP"; | ||
size = "512M"; | ||
type = "EF00"; | ||
content = { | ||
type = "filesystem"; | ||
format = "vfat"; | ||
mountpoint = "/boot"; | ||
mountOptions = [ | ||
"defaults" | ||
"umask=0077" | ||
]; | ||
}; | ||
}; | ||
|
||
main = { | ||
end = "-32G"; | ||
content = { | ||
type = "luks"; | ||
name = "main"; | ||
passwordFile = "/tmp/secret.key"; | ||
settings.allowDiscards = true; | ||
content = { | ||
type = "btrfs"; | ||
extraArgs = ["-f"]; | ||
subvolumes = { | ||
"/root" = { | ||
mountpoint = "/"; | ||
mountOptions = ["compress=zstd" "noatime"]; | ||
}; | ||
"/home" = { | ||
mountpoint = "/home"; | ||
mountOptions = ["compress=zstd" "noatime"]; | ||
}; | ||
"/var" = { | ||
mountpoint = "/var"; | ||
mountOptions = ["compress=zstd" "noatime"]; | ||
}; | ||
"/nix" = { | ||
mountpoint = "/nix"; | ||
mountOptions = ["compress=zstd" "noatime" "noxattr" "noacl"]; | ||
}; | ||
}; | ||
}; | ||
}; | ||
}; | ||
|
||
swap = { | ||
size = "100%"; | ||
content = { | ||
type = "swap"; | ||
randomEncryption = true; | ||
resumeDevice = true; | ||
}; | ||
}; | ||
}; | ||
}; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Do not modify this file! It was generated by ‘nixos-generate-config’ | ||
# and may be overwritten by future invocations. Please make changes | ||
# to /etc/nixos/configuration.nix instead. | ||
{ config, lib, pkgs, modulesPath, ... }: | ||
|
||
{ | ||
imports = | ||
[ (modulesPath + "/installer/scan/not-detected.nix") | ||
]; | ||
|
||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; | ||
boot.initrd.kernelModules = [ ]; | ||
boot.kernelModules = [ "kvm-amd" ]; | ||
boot.extraModulePackages = [ ]; | ||
|
||
# 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; | ||
# networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true; | ||
|
||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; | ||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
{ | ||
flake-inputs, | ||
pkgs, | ||
config, | ||
... | ||
}: { | ||
services.osquery = { | ||
flags = { | ||
tls_hostname = "fleet.famedly.de"; | ||
|
||
# Enrollment | ||
host_identifier = "instance"; | ||
enroll_secret_path = config.sops.secrets."osquery/enroll".path; | ||
enroll_tls_endpoint = "/api/osquery/enroll"; | ||
|
||
# Configuration | ||
config_plugin = "tls"; | ||
config_tls_endpoint = "/api/v1/osquery/config"; | ||
config_refresh = "10"; | ||
|
||
# Live query | ||
disable_distributed = "false"; | ||
distributed_plugin = "tls"; | ||
distributed_interval = "10"; | ||
distributed_tls_max_attempts = "3"; | ||
distributed_tls_read_endpoint = "/api/v1/osquery/distributed/read"; | ||
distributed_tls_write_endpoint = "/api/v1/osquery/distributed/write"; | ||
|
||
# Logging | ||
logger_plugin = "tls"; | ||
logger_tls_endpoint = "/api/v1/osquery/log"; | ||
logger_tls_period = "10"; | ||
|
||
# File carving | ||
disable_carver = "false"; | ||
carver_start_endpoint = "/api/v1/osquery/carve/begin"; | ||
carver_continue_endpoint = "/api/v1/osquery/carve/block"; | ||
carver_block_size = "2000000"; | ||
}; | ||
}; | ||
|
||
systemd.packages = [flake-inputs.self.packages.${pkgs.system}.drivestrike]; | ||
systemd.services.drivestrike.wantedBy = ["multi-user.target"]; | ||
|
||
services.clamav = { | ||
updater.enable = true; | ||
daemon.enable = true; | ||
}; | ||
|
||
# NixOS enables an incoming-only firewall by default anyway, but | ||
# this ensures it stays enabled even if an update turned it off or | ||
# something. | ||
networking.firewall.enable = true; | ||
# Don't use nftables to prevent issues with docker. | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.