This commit is contained in:
root 2025-11-02 15:04:04 +00:00
parent d4bea4c7c5
commit 29cbf8b2d8
9 changed files with 124 additions and 55 deletions

26
flake.lock generated Normal file
View file

@ -0,0 +1,26 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1761597516,
"narHash": "sha256-wxX7u6D2rpkJLWkZ2E932SIvDJW8+ON/0Yy8+a5vsDU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "daf6dc47aa4b44791372d6139ab7b25269184d55",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-25.05",
"type": "indirect"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

22
flake.nix Normal file
View file

@ -0,0 +1,22 @@
{
description = "distrust.network Flake";
inputs = {
nixpkgs.url = "nixpkgs/nixos-25.05";
};
outputs = {
self,
nixpkgs,
...
}: let
lib = nixpkgs.lib;
in {
nixosConfigurations = {
distrust = lib.nixosSystem {
system = "x86_64-linux";
modules = [./system ./services];
};
};
};
}

View file

@ -1,9 +0,0 @@
{ modulesPath, ... }:
{
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
boot.loader.grub.device = "/dev/sda";
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "xen_blkfront" "vmw_pvscsi" ];
boot.initrd.kernelModules = [ "nvme" ];
fileSystems."/" = { device = "/dev/sda1"; fsType = "ext4"; };
}

View file

@ -1,35 +0,0 @@
{ lib, ... }: {
# This file was populated at runtime with the networking
# details gathered from the active system.
networking = {
nameservers = [ "213.136.95.10"
"213.136.95.11"
"2a02:c207::1" "8.8.8.8"
];
defaultGateway = "157.173.112.1";
defaultGateway6 = {
address = "fe80::1";
interface = "eth0";
};
dhcpcd.enable = false;
usePredictableInterfaceNames = lib.mkForce false;
interfaces = {
eth0 = {
ipv4.addresses = [
{ address="157.173.124.100"; prefixLength=20; }
];
ipv6.addresses = [
{ address="2a02:c207:2288:2816::1"; prefixLength=64; }
{ address="fe80::250:56ff:fe5d:f07e"; prefixLength=64; }
];
ipv4.routes = [ { address = "157.173.112.1"; prefixLength = 32; } ];
ipv6.routes = [ { address = "fe80::1"; prefixLength = 128; } ];
};
};
};
services.udev.extraRules = ''
ATTR{address}=="00:50:56:5d:f0:7e", NAME="eth0"
'';
}

View file

@ -1,4 +1,4 @@
{...}: {
{
imports = [
./caddy.nix
./tor.nix
@ -6,7 +6,6 @@
./nextcloud.nix
./forgejo.nix
./akkoma.nix
#./matrix.nix
./prosody.nix
./lldap.nix
];

View file

@ -1,11 +1,5 @@
{pkgs, ...}: {
imports = [
./hardware-configuration.nix
./networking.nix # generated at runtime by nixos-infect
./services
];
environment.systemPackages = with pkgs; [ vim btop git alejandra ];
environment.systemPackages = with pkgs; [vim btop git alejandra statix deadnix];
nix.settings.experimental-features = ["nix-command" "flakes"];

7
system/default.nix Normal file
View file

@ -0,0 +1,7 @@
{
imports = [
./configuration.nix
./hardware-configuration.nix
./networking.nix
];
}

View file

@ -0,0 +1,10 @@
{modulesPath, ...}: {
imports = [(modulesPath + "/profiles/qemu-guest.nix")];
boot.loader.grub.device = "/dev/sda";
boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "xen_blkfront" "vmw_pvscsi"];
boot.initrd.kernelModules = ["nvme"];
fileSystems."/" = {
device = "/dev/sda1";
fsType = "ext4";
};
}

55
system/networking.nix Normal file
View file

@ -0,0 +1,55 @@
{lib, ...}: {
# This file was populated at runtime with the networking
# details gathered from the active system.
networking = {
nameservers = [
"213.136.95.10"
"213.136.95.11"
"2a02:c207::1"
"8.8.8.8"
];
defaultGateway = "157.173.112.1";
defaultGateway6 = {
address = "fe80::1";
interface = "eth0";
};
dhcpcd.enable = false;
usePredictableInterfaceNames = lib.mkForce false;
interfaces = {
eth0 = {
ipv4.addresses = [
{
address = "157.173.124.100";
prefixLength = 20;
}
];
ipv6.addresses = [
{
address = "2a02:c207:2288:2816::1";
prefixLength = 64;
}
{
address = "fe80::250:56ff:fe5d:f07e";
prefixLength = 64;
}
];
ipv4.routes = [
{
address = "157.173.112.1";
prefixLength = 32;
}
];
ipv6.routes = [
{
address = "fe80::1";
prefixLength = 128;
}
];
};
};
};
services.udev.extraRules = ''
ATTR{address}=="00:50:56:5d:f0:7e", NAME="eth0"
'';
}