summaryrefslogtreecommitdiff
path: root/machines/bosco
diff options
context:
space:
mode:
Diffstat (limited to 'machines/bosco')
-rw-r--r--machines/bosco/default.nix53
-rw-r--r--machines/bosco/hardware-configuration.nix17
2 files changed, 32 insertions, 38 deletions
diff --git a/machines/bosco/default.nix b/machines/bosco/default.nix
index 143db1d..a4e338f 100644
--- a/machines/bosco/default.nix
+++ b/machines/bosco/default.nix
@@ -8,25 +8,26 @@
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
- ./disko.nix
-
./reverse-proxy.nix
- ../biski/portforward.nix
../../modules/nixos/headscale.nix
../../modules/nixos/cgit.nix
];
- nixpkgs.hostPlatform = "x86_64-linux";
- # boot.loader.systemd-boot.enable = true;
- # boot.loader.efi.efiSysMountPoint = "/boot";
- # boot.loader.efi.canTouchEfiVariables = true;
- boot.loader.grub = {
- enable = true;
- device = "nodev";
- efiSupport = true;
- efiInstallAsRemovable = true;
- };
- boot.loader.timeout = 3;
+
+ # Use the GRUB 2 boot loader.
+ boot.loader.grub.enable = true;
+ # boot.loader.grub.efiSupport = true;
+ # boot.loader.grub.efiInstallAsRemovable = true;
+ # boot.loader.efi.efiSysMountPoint = "/boot/efi";
+ # Define on which hard drive you want to install Grub.
+ boot.loader.grub.device = "nodev";
+ boot.loader.timeout = 10;
+ boot.loader.grub.forceInstall = true;
+ boot.loader.grub.extraConfig = ''
+ serial --speed=19200 --unit=0 --word=8 --parity=no --stop=1;
+ terminal_input serial;
+ terminal_output serial
+ '';
networking.hostName = "bosco"; # Define your hostname.
@@ -39,25 +40,7 @@
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
- # networking.usePredictableInterfaceNames = false;
-
- networking.interfaces."eth0".ipv4 = {
- addresses = [{
- address = "23.131.76.82";
- prefixLength = 32;
- }
- {
- address = "172.16.101.82";
- prefixLength = 24;
- }];
- };
- networking.nameservers = [ "9.9.9.9" ];
- networking.localCommands = ''
- ip route add default via 172.16.101.1 src 23.131.76.82
- ip addr del 172.16.101.82/24 dev eth0
- '';
- # ip addr add 23.131.76.82/32 dev ens18
- # ip route del default
+ networking.usePredictableInterfaceNames = false;
# Select internationalisation properties.
# i18n.defaultLocale = "en_US.UTF-8";
@@ -94,7 +77,7 @@
# Enable the OpenSSH daemon.
services.openssh = {
enable = true;
- # settings.PermitRootLogin = "no";
+ settings.PermitRootLogin = "no";
ports = [ 22 ];
extraConfig = "LoginGraceTime = 0";
};
@@ -126,7 +109,7 @@
# and migrated your data accordingly.
#
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
- system.stateVersion = "25.11"; # Did you read the comment?
+ system.stateVersion = "23.11"; # Did you read the comment?
}
diff --git a/machines/bosco/hardware-configuration.nix b/machines/bosco/hardware-configuration.nix
index ac2c0ba..34dd9bf 100644
--- a/machines/bosco/hardware-configuration.nix
+++ b/machines/bosco/hardware-configuration.nix
@@ -8,17 +8,28 @@
[ (modulesPath + "/profiles/qemu-guest.nix")
];
- boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ahci" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ];
+ boot.initrd.availableKernelModules = [ "virtio_pci" "virtio_scsi" "ahci" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
+ fileSystems."/" =
+ { device = "/dev/sda";
+ fsType = "ext4";
+ };
+
+ swapDevices =
+ [ { device = "/dev/sdb"; }
+ ];
+
# 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.ens18.useDHCP = lib.mkDefault true;
+ # networking.useDHCP = lib.mkDefault true;
+ networking.interfaces.enp0s5.useDHCP = lib.mkDefault true;
+ # required for ssh?
+ networking.interfaces.eth0.useDHCP = true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}