Skip to content

Commit

Permalink
Add hob
Browse files Browse the repository at this point in the history
  • Loading branch information
mcwitt committed Nov 23, 2024
1 parent bff86bc commit 5b1f4b4
Show file tree
Hide file tree
Showing 5 changed files with 116 additions and 8 deletions.
25 changes: 23 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,10 @@
self.nixosModules.common
self.nixosModules.nixos
./hosts/hal/configuration
{ nixpkgs = nixpkgsArgs; }
{
nixpkgs = nixpkgsArgs;
profiles.home-automation.enable = true;
}
];
specialArgs = { inherit inputs; };
};
Expand All @@ -144,7 +147,25 @@
self.nixosModules.common
self.nixosModules.nixos
./hosts/hestia/configuration
{ nixpkgs = nixpkgsArgs; }
{
nixpkgs = nixpkgsArgs;
profiles.home-automation.enable = true;
}
];
specialArgs = { inherit inputs; };
};

hob = nixpkgs.lib.makeOverridable nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
modules = [
nur.nixosModules.nur
self.nixosModules.common
self.nixosModules.nixos
./hosts/hob/configuration
{
nixpkgs = nixpkgsArgs;
profiles.home-automation.enable = true;
}
];
specialArgs = { inherit inputs; };
};
Expand Down
3 changes: 0 additions & 3 deletions hosts/hal/configuration/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
settings.trusted-public-keys = [ "golem:eibXP6qvkaDB9Jvh/MkR4D/dVL7HYDBJI2srJZgVhGE=" ];
};

profiles.home-automation.enable = true;

time.timeZone = "America/Los_Angeles";

services.xserver.xkb.layout = "us";
Expand All @@ -38,7 +36,6 @@
};

environment.systemPackages = with pkgs; [
home-assistant-cli
vim
];

Expand Down
3 changes: 0 additions & 3 deletions hosts/hestia/configuration/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
console.useXkbConfig = true;

environment.systemPackages = with pkgs; [
home-assistant-cli
vim
];

Expand All @@ -22,8 +21,6 @@
settings.trusted-public-keys = [ "golem:eibXP6qvkaDB9Jvh/MkR4D/dVL7HYDBJI2srJZgVhGE=" ];
};

profiles.home-automation.enable = true;

services.avahi = {
enable = true;
nssmdns4 = true;
Expand Down
56 changes: 56 additions & 0 deletions hosts/hob/configuration/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{ inputs, pkgs, ... }:

{
imports = [
./hardware-configuration.nix
"${inputs.nixos-hardware}/raspberry-pi/5"
];

boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = false;

networking.hostName = "hob";

nix.gc.automatic = true;
nix.gc.dates = "weekly";
nix.settings.trusted-public-keys = [ "golem:eibXP6qvkaDB9Jvh/MkR4D/dVL7HYDBJI2srJZgVhGE=" ];

time.timeZone = "America/Los_Angeles";

services.xserver.xkb.layout = "us";

users.users.matt = {
isNormalUser = true;
extraGroups = [ "wheel" ];
};

environment.systemPackages = with pkgs; [
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
];

services.avahi = {
enable = true;
nssmdns4 = true;
publish = {
enable = true;
addresses = true;
};
};

services.earlyoom.enable = true;

services.openssh = {
enable = true;
settings.PasswordAuthentication = false;
};

# https://docs.paperless-ngx.com/setup/#less-powerful-devices
services.paperless.settings = {
PAPERLESS_TASK_WORKERS = 2;
PAPERLESS_THREADS_PER_WORKER = 1;
PAPERLESS_CONVERT_MEMORY_LIMIT = "1gb";
};

system.stateVersion = "24.11";
}

37 changes: 37 additions & 0 deletions hosts/hob/configuration/hardware-configuration.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Do not modify this file! It was generated by ‘nixos-generate-config’
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:

{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];

boot.initrd.availableKernelModules = [ "uas" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];

fileSystems."/" =
{ device = "/dev/disk/by-uuid/3754479d-7b8e-4137-9654-cce32e32c6fd";
fsType = "ext4";
};

fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/8364-F88C";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};

swapDevices = [ ];

# 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.wlan0.useDHCP = lib.mkDefault true;

nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
}

0 comments on commit 5b1f4b4

Please sign in to comment.