summaryrefslogtreecommitdiffstats
path: root/lass/1systems/prism
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2018-05-12 15:51:24 +0200
committerlassulus <lassulus@lassul.us>2018-05-12 15:51:24 +0200
commit0c0d527bec3a6a3d6435203253edb2ef27f9655b (patch)
treec557aa36ab0eb475bab5c78c046caea3610f84bf /lass/1systems/prism
parent079396f9e11573228bd6cf498f161c49660a7549 (diff)
l: hw config into physical.nix
Diffstat (limited to 'lass/1systems/prism')
-rw-r--r--lass/1systems/prism/config.nix83
-rw-r--r--lass/1systems/prism/physical.nix85
2 files changed, 86 insertions, 82 deletions
diff --git a/lass/1systems/prism/config.nix b/lass/1systems/prism/config.nix
index d4be2faaf..c7b877deb 100644
--- a/lass/1systems/prism/config.nix
+++ b/lass/1systems/prism/config.nix
@@ -1,90 +1,9 @@
{ config, lib, pkgs, ... }:
with import <stockholm/lib>;
-let
- ip = config.krebs.build.host.nets.internet.ip4.addr;
-
-in {
+{
imports = [
<stockholm/lass>
- {
- networking.interfaces.et0.ipv4.addresses = [
- {
- address = ip;
- prefixLength = 27;
- }
- {
- address = "46.4.114.243";
- prefixLength = 27;
- }
- ];
- networking.defaultGateway = "46.4.114.225";
- networking.nameservers = [
- "8.8.8.8"
- ];
- services.udev.extraRules = ''
- SUBSYSTEM=="net", ATTR{address}=="08:60:6e:e7:87:04", NAME="et0"
- '';
- }
- {
- imports = [ <nixpkgs/nixos/modules/installer/scan/not-detected.nix> ];
-
- boot.loader.grub = {
- devices = [
- "/dev/sda"
- "/dev/sdb"
- ];
- splashImage = null;
- };
-
- boot.initrd.availableKernelModules = [
- "ata_piix"
- "vmw_pvscsi"
- "ahci" "sd_mod"
- ];
-
- boot.kernelModules = [ "kvm-intel" ];
-
- fileSystems."/" = {
- device = "/dev/pool/nix_root";
- fsType = "ext4";
- };
-
- fileSystems."/tmp" = {
- device = "tmpfs";
- fsType = "tmpfs";
- options = ["nosuid" "nodev" "noatime"];
- };
-
- fileSystems."/var/download" = {
- device = "/dev/pool/download";
- fsType = "ext4";
- };
-
- fileSystems."/srv/http" = {
- device = "/dev/pool/http";
- fsType = "ext4";
- };
-
- fileSystems."/home" = {
- device = "/dev/pool/home";
- fsType = "ext4";
- };
-
- fileSystems."/bku" = {
- device = "/dev/pool/bku";
- fsType = "ext4";
- };
-
- swapDevices = [
- { label = "swap1"; }
- { label = "swap2"; }
- ];
-
- sound.enable = false;
- nixpkgs.config.allowUnfree = true;
- time.timeZone = "Europe/Berlin";
- }
<stockholm/lass/2configs/retiolum.nix>
<stockholm/lass/2configs/libvirt.nix>
{
diff --git a/lass/1systems/prism/physical.nix b/lass/1systems/prism/physical.nix
new file mode 100644
index 000000000..83f127c22
--- /dev/null
+++ b/lass/1systems/prism/physical.nix
@@ -0,0 +1,85 @@
+{ config, lib, pkgs, ... }:
+{
+ imports = [
+ ./config.nix
+ {
+ networking.interfaces.et0.ipv4.addresses = [
+ {
+ address = config.krebs.build.host.nets.internet.ip4.addr;
+ prefixLength = 27;
+ }
+ {
+ address = "46.4.114.243";
+ prefixLength = 27;
+ }
+ ];
+ networking.defaultGateway = "46.4.114.225";
+ networking.nameservers = [
+ "8.8.8.8"
+ ];
+ services.udev.extraRules = ''
+ SUBSYSTEM=="net", ATTR{address}=="08:60:6e:e7:87:04", NAME="et0"
+ '';
+ }
+ {
+ imports = [ <nixpkgs/nixos/modules/installer/scan/not-detected.nix> ];
+
+ boot.loader.grub = {
+ devices = [
+ "/dev/sda"
+ "/dev/sdb"
+ ];
+ splashImage = null;
+ };
+
+ boot.initrd.availableKernelModules = [
+ "ata_piix"
+ "vmw_pvscsi"
+ "ahci" "sd_mod"
+ ];
+
+ boot.kernelModules = [ "kvm-intel" ];
+
+ fileSystems."/" = {
+ device = "/dev/pool/nix_root";
+ fsType = "ext4";
+ };
+
+ fileSystems."/tmp" = {
+ device = "tmpfs";
+ fsType = "tmpfs";
+ options = ["nosuid" "nodev" "noatime"];
+ };
+
+ fileSystems."/var/download" = {
+ device = "/dev/pool/download";
+ fsType = "ext4";
+ };
+
+ fileSystems."/srv/http" = {
+ device = "/dev/pool/http";
+ fsType = "ext4";
+ };
+
+ fileSystems."/home" = {
+ device = "/dev/pool/home";
+ fsType = "ext4";
+ };
+
+ fileSystems."/bku" = {
+ device = "/dev/pool/bku";
+ fsType = "ext4";
+ };
+
+ swapDevices = [
+ { label = "swap1"; }
+ { label = "swap2"; }
+ ];
+
+ sound.enable = false;
+ nixpkgs.config.allowUnfree = true;
+ time.timeZone = "Europe/Berlin";
+ }
+ ];
+
+}