flakify
This commit is contained in:
parent
d4bea4c7c5
commit
29cbf8b2d8
9 changed files with 124 additions and 55 deletions
26
flake.lock
generated
Normal file
26
flake.lock
generated
Normal 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
22
flake.nix
Normal 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];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -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"; };
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -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"
|
|
||||||
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{...}: {
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./caddy.nix
|
./caddy.nix
|
||||||
./tor.nix
|
./tor.nix
|
||||||
|
|
@ -6,7 +6,6 @@
|
||||||
./nextcloud.nix
|
./nextcloud.nix
|
||||||
./forgejo.nix
|
./forgejo.nix
|
||||||
./akkoma.nix
|
./akkoma.nix
|
||||||
#./matrix.nix
|
|
||||||
./prosody.nix
|
./prosody.nix
|
||||||
./lldap.nix
|
./lldap.nix
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,5 @@
|
||||||
{pkgs, ...}: {
|
{pkgs, ...}: {
|
||||||
imports = [
|
environment.systemPackages = with pkgs; [vim btop git alejandra statix deadnix];
|
||||||
./hardware-configuration.nix
|
|
||||||
./networking.nix # generated at runtime by nixos-infect
|
|
||||||
./services
|
|
||||||
];
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [ vim btop git alejandra ];
|
|
||||||
|
|
||||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||||
|
|
||||||
7
system/default.nix
Normal file
7
system/default.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./configuration.nix
|
||||||
|
./hardware-configuration.nix
|
||||||
|
./networking.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
10
system/hardware-configuration.nix
Normal file
10
system/hardware-configuration.nix
Normal 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
55
system/networking.nix
Normal 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"
|
||||||
|
|
||||||
|
'';
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue