summaryrefslogtreecommitdiff
path: root/hosts
diff options
context:
space:
mode:
Diffstat (limited to 'hosts')
-rw-r--r--hosts/dspace/configuration.nix17
-rw-r--r--hosts/dspace/hardware-configuration.nix27
-rw-r--r--hosts/dspace/modules/network.nix18
3 files changed, 62 insertions, 0 deletions
diff --git a/hosts/dspace/configuration.nix b/hosts/dspace/configuration.nix
new file mode 100644
index 0000000..c7dc52b
--- /dev/null
+++ b/hosts/dspace/configuration.nix
@@ -0,0 +1,17 @@
+{ config, ... }:
+
+let
+ user = config.userdata.user;
+in
+{
+ imports = [
+ ./hardware-configuration.nix
+ ./modules/network.nix
+ ../../common.nix
+ ];
+
+
+ users.users.${user}.openssh.authorizedKeys.keys = [
+ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILvR5FliFLq1FJWotnBk9deWmbeGi2uq2XVmx0uAr1Lw sinan@fscusat"
+ ];
+}
diff --git a/hosts/dspace/hardware-configuration.nix b/hosts/dspace/hardware-configuration.nix
new file mode 100644
index 0000000..c355e8b
--- /dev/null
+++ b/hosts/dspace/hardware-configuration.nix
@@ -0,0 +1,27 @@
+{ lib, modulesPath, ... }:
+
+{
+ imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
+
+ boot.initrd.availableKernelModules = [
+ "ata_piix"
+ "uhci_hcd"
+ "virtio_pci"
+ "virtio_scsi"
+ "sd_mod"
+ "sr_mod"
+ ];
+
+ fileSystems = {
+ "/" = {
+ device = "/dev/disk/by-uuid/c5b1077e-52e8-4249-8bd7-d53eafa41f5a";
+ fsType = "ext4";
+ };
+ "/boot" = {
+ device = "/dev/disk/by-uuid/9787-FFFE";
+ fsType = "vfat";
+ };
+ };
+
+ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
+}
diff --git a/hosts/dspace/modules/network.nix b/hosts/dspace/modules/network.nix
new file mode 100644
index 0000000..007cfba
--- /dev/null
+++ b/hosts/dspace/modules/network.nix
@@ -0,0 +1,18 @@
+{ ... }:
+
+let
+ wan = "ens18";
+in
+{
+ networking = {
+ interfaces.${wan}.ipv4.addresses = [{
+ address = "10.0.8.107";
+ prefixLength = 16;
+ }];
+ defaultGateway = {
+ address = "10.0.0.1";
+ interface = wan;
+ };
+ nameservers = [ "10.0.0.2" "10.0.0.3" ];
+ };
+}