summaryrefslogtreecommitdiff
path: root/hosts
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-11-06 08:03:32 -0800
committerFuwn <[email protected]>2024-11-06 08:03:32 -0800
commit00d3d26ee778013b1aa95a9f7fc645975fbb3169 (patch)
treec78eb1f5dc04399ef2b7c2a58ecc2e969f48688e /hosts
parentlock: tsutsumi (diff)
downloadnixos-config-00d3d26ee778013b1aa95a9f7fc645975fbb3169.tar.xz
nixos-config-00d3d26ee778013b1aa95a9f7fc645975fbb3169.zip
hosts: add hoka host and joint configuration
Diffstat (limited to 'hosts')
-rw-r--r--hosts/default.nix1
-rw-r--r--hosts/hoka/configuration.nix3
-rw-r--r--hosts/hoka/default.nix34
-rw-r--r--hosts/kioku/configuration.nix14
-rw-r--r--hosts/kioku/default.nix2
-rw-r--r--hosts/kioku/hardware-configuration.nix42
-rw-r--r--hosts/shared/pi/configuration.nix17
-rw-r--r--hosts/shared/pi/hardware-configuration.nix43
8 files changed, 102 insertions, 54 deletions
diff --git a/hosts/default.nix b/hosts/default.nix
index c609a4f..e377cb4 100644
--- a/hosts/default.nix
+++ b/hosts/default.nix
@@ -46,6 +46,7 @@
[
(import ./akashi pcOptions)
(import ./himeji minimalOptions)
+ (import ./hoka minimalOptions)
(import ./kansai pcOptions)
(import ./kioku minimalOptions)
];
diff --git a/hosts/hoka/configuration.nix b/hosts/hoka/configuration.nix
new file mode 100644
index 0000000..ef19f59
--- /dev/null
+++ b/hosts/hoka/configuration.nix
@@ -0,0 +1,3 @@
+{
+ networking.hostName = "hoka";
+}
diff --git a/hosts/hoka/default.nix b/hosts/hoka/default.nix
new file mode 100644
index 0000000..fceb188
--- /dev/null
+++ b/hosts/hoka/default.nix
@@ -0,0 +1,34 @@
+{
+ inputs,
+ outputs,
+ secrets,
+ self,
+ kansaiPkgs,
+ lib,
+ commonModules,
+}:
+{
+ flake.nixosConfigurations.hoka = lib.nixosSystem {
+ pkgs =
+ (kansaiPkgs
+ {
+ }
+ )."aarch64-linux";
+
+ modules = [
+ inputs.raspberry-pi-nix.nixosModules.raspberry-pi
+ ./configuration.nix
+ "${self}/hosts/shared/pi/configuration.nix"
+ "${self}/hosts/shared/pi/hardware-configuration.nix"
+ ] ++ commonModules;
+
+ specialArgs = {
+ inherit
+ inputs
+ outputs
+ secrets
+ self
+ ;
+ };
+ };
+}
diff --git a/hosts/kioku/configuration.nix b/hosts/kioku/configuration.nix
index 8d3a630..50b4ebc 100644
--- a/hosts/kioku/configuration.nix
+++ b/hosts/kioku/configuration.nix
@@ -1,18 +1,8 @@
-{
- self,
- ...
-}:
+{ self, ... }:
{
imports = [
- "${self}/modules/core"
- "${self}/modules/options"
"${self}/modules/usb"
];
- config = {
- modules.primaryUser = "ebisu";
- networking.hostName = "kioku";
- system.stateVersion = "24.05";
- raspberry-pi-nix.kernel-version = "v6_10_12";
- };
+ networking.hostName = "kioku";
}
diff --git a/hosts/kioku/default.nix b/hosts/kioku/default.nix
index 714f6ad..2858239 100644
--- a/hosts/kioku/default.nix
+++ b/hosts/kioku/default.nix
@@ -19,6 +19,8 @@
inputs.raspberry-pi-nix.nixosModules.raspberry-pi
./configuration.nix
./hardware-configuration.nix
+ "${self}/hosts/shared/pi/configuration.nix"
+ "${self}/hosts/shared/pi/hardware-configuration.nix"
] ++ commonModules;
specialArgs = {
diff --git a/hosts/kioku/hardware-configuration.nix b/hosts/kioku/hardware-configuration.nix
index 8557493..0707797 100644
--- a/hosts/kioku/hardware-configuration.nix
+++ b/hosts/kioku/hardware-configuration.nix
@@ -1,21 +1,4 @@
-{ lib, secrets, ... }:
{
- raspberry-pi-nix.board = "bcm2711";
-
- networking = {
- useDHCP = lib.mkDefault true;
-
- wireless =
- let
- network = builtins.elemAt secrets.wifi 0;
- in
- {
- enable = true;
- interfaces = [ "wlan0" ];
- networks."${network.ssid}".psk = network.psk;
- };
- };
-
fileSystems."/mnt/usb_share" = {
device = "/piusb.bin";
fsType = "exfat";
@@ -31,29 +14,4 @@
"fmask=000"
];
};
-
- hardware.raspberry-pi.config.all.dt-overlays =
- (
- overlays:
- lib.attrsets.mapAttrs
- (_name: _value: {
- enable = true;
- params = { };
- })
- (
- lib.listToAttrs (
- map (overlay: {
- name = overlay;
- value = { };
- }) overlays
- )
- )
- )
- [
- "disable-bt"
- "dwc2"
- "usb_power"
- "ramlog"
- "hdmi_blanking"
- ];
}
diff --git a/hosts/shared/pi/configuration.nix b/hosts/shared/pi/configuration.nix
new file mode 100644
index 0000000..f3b732a
--- /dev/null
+++ b/hosts/shared/pi/configuration.nix
@@ -0,0 +1,17 @@
+{
+ self,
+ ...
+}:
+{
+ imports = [
+ "${self}/modules/core"
+ "${self}/modules/options"
+ "${self}/modules/pi"
+ ];
+
+ config = {
+ modules.primaryUser = "ebisu";
+ system.stateVersion = "24.05";
+ raspberry-pi-nix.kernel-version = "v6_10_12";
+ };
+}
diff --git a/hosts/shared/pi/hardware-configuration.nix b/hosts/shared/pi/hardware-configuration.nix
new file mode 100644
index 0000000..88a8483
--- /dev/null
+++ b/hosts/shared/pi/hardware-configuration.nix
@@ -0,0 +1,43 @@
+{ lib, secrets, ... }:
+{
+ raspberry-pi-nix.board = "bcm2711";
+
+ networking = {
+ useDHCP = lib.mkDefault true;
+
+ wireless =
+ let
+ network = builtins.elemAt secrets.wifi 0;
+ in
+ {
+ enable = true;
+ interfaces = [ "wlan0" ];
+ networks."${network.ssid}".psk = network.psk;
+ };
+ };
+
+ hardware.raspberry-pi.config.all.dt-overlays =
+ (
+ overlays:
+ lib.attrsets.mapAttrs
+ (_name: _value: {
+ enable = true;
+ params = { };
+ })
+ (
+ lib.listToAttrs (
+ map (overlay: {
+ name = overlay;
+ value = { };
+ }) overlays
+ )
+ )
+ )
+ [
+ "disable-bt"
+ "dwc2"
+ "usb_power"
+ "ramlog"
+ "hdmi_blanking"
+ ];
+}