summaryrefslogtreecommitdiff
path: root/hosts
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-10-26 13:56:18 -0700
committerFuwn <[email protected]>2024-10-26 13:56:18 -0700
commite7da0d538fa1f709fe295110976ebae0329fa024 (patch)
tree203055e9cef2090ff55cc0f0edb754e812fc8f31 /hosts
parenthome: fill out mpv configuration (diff)
downloadnixos-config-e7da0d538fa1f709fe295110976ebae0329fa024.tar.xz
nixos-config-e7da0d538fa1f709fe295110976ebae0329fa024.zip
hosts: initialise simple kioku configuration
Diffstat (limited to 'hosts')
-rw-r--r--hosts/default.nix1
-rw-r--r--hosts/kioku/configuration.nix41
-rw-r--r--hosts/kioku/default.nix36
-rw-r--r--hosts/kioku/hardware-configuration.nix22
4 files changed, 100 insertions, 0 deletions
diff --git a/hosts/default.nix b/hosts/default.nix
index 0fe5332..49546fc 100644
--- a/hosts/default.nix
+++ b/hosts/default.nix
@@ -43,5 +43,6 @@
(import ./akashi pcInherits)
(import ./himeji (commonInherits // { inherit commonModules; }))
(import ./kansai pcInherits)
+ (import ./kioku commonInherits)
];
}
diff --git a/hosts/kioku/configuration.nix b/hosts/kioku/configuration.nix
new file mode 100644
index 0000000..31f18eb
--- /dev/null
+++ b/hosts/kioku/configuration.nix
@@ -0,0 +1,41 @@
+{ pkgs, secrets, ... }:
+{
+ time.timeZone = secrets.i18n.timezone;
+ environment.systemPackages = [ pkgs.fastfetch ];
+ system.stateVersion = "24.05";
+
+ users.users.root = {
+ initialHashedPassword = secrets.initial_hashed_password;
+ openssh.authorizedKeys.keys = [ secrets.kioku_openssh_public_key ];
+ };
+
+ zramSwap = {
+ enable = true;
+ algorithm = "zstd";
+ };
+
+ services = {
+ sshd.enable = true;
+ timesyncd.enable = true;
+ };
+
+ networking = {
+ hostName = "kioku";
+ useDHCP = false;
+
+ interfaces = {
+ wlan0.useDHCP = true;
+ eth0.useDHCP = true;
+ };
+
+ wireless =
+ let
+ network = builtins.elemAt secrets.wifi 0;
+ in
+ {
+ enable = true;
+ interfaces = [ "wlan0" ];
+ networks."${network.ssid}".psk = network.psk;
+ };
+ };
+}
diff --git a/hosts/kioku/default.nix b/hosts/kioku/default.nix
new file mode 100644
index 0000000..88cacb9
--- /dev/null
+++ b/hosts/kioku/default.nix
@@ -0,0 +1,36 @@
+{
+ inputs,
+ outputs,
+ secrets,
+ self,
+ kansaiPkgs,
+ lib,
+}:
+{
+ flake.nixosConfigurations.kioku =
+ let
+ pkgs =
+ (kansaiPkgs
+ {
+ }
+ )."aarch64-linux";
+ in
+ lib.nixosSystem {
+ inherit pkgs;
+
+ modules = [
+ inputs.raspberry-pi-nix.nixosModules.raspberry-pi
+ ./configuration.nix
+ ./hardware-configuration.nix
+ ];
+
+ specialArgs = {
+ inherit
+ inputs
+ outputs
+ secrets
+ self
+ ;
+ };
+ };
+}
diff --git a/hosts/kioku/hardware-configuration.nix b/hosts/kioku/hardware-configuration.nix
new file mode 100644
index 0000000..95154e1
--- /dev/null
+++ b/hosts/kioku/hardware-configuration.nix
@@ -0,0 +1,22 @@
+{
+ raspberry-pi-nix.board = "bcm2711";
+
+ hardware.raspberry-pi.config.all = {
+ base-dt-params = {
+ BOOT_UART = {
+ value = 1;
+ enable = true;
+ };
+
+ uart_2ndstage = {
+ value = 1;
+ enable = true;
+ };
+ };
+
+ dt-overlays.disable-bt = {
+ enable = true;
+ params = { };
+ };
+ };
+}