Compare commits
20 Commits
wallpapers
...
9d60b1fb94
Author | SHA1 | Date | |
---|---|---|---|
9d60b1fb94
|
|||
26be10bd0c
|
|||
aa5a4e27a3
|
|||
acbe74764d
|
|||
fa07aef5a3
|
|||
ca37ac3837
|
|||
f9cf5758e3
|
|||
f0e0cf2772
|
|||
103564bfab
|
|||
3742b84f63
|
|||
3d2f9a2841
|
|||
634e3a5d99
|
|||
1c7b7c4cae
|
|||
aabecfd68f
|
|||
75506d5acd
|
|||
81a46270b8
|
|||
18f1efdaff
|
|||
47c304833c
|
|||
f47fd2217e
|
|||
4ad4814bed
|
45
flake.lock
generated
45
flake.lock
generated
@@ -86,11 +86,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1702195709,
|
||||
"narHash": "sha256-+zRjWkm5rKqQ57PuLZ3JF3xi3vPMiOJzItb1m/43Cq4=",
|
||||
"lastModified": 1702676849,
|
||||
"narHash": "sha256-XqcREaTS38/QOsN8fk8PP325/UXHyF9enbP5ZPw5aiA=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "6761b8188b860f374b457eddfdb05c82eef9752f",
|
||||
"rev": "aa99c2f4e9847cbb7e46fac0844ea1eb164b3b3a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -100,6 +100,21 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixos-hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1701656485,
|
||||
"narHash": "sha256-xDFormrGCKKGqngHa2Bz1GTeKlFMMjLnHhTDRdMJ1hs=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "fa194fc484fd7270ab324bb985593f71102e84d1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"repo": "nixos-hardware",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1677676435,
|
||||
@@ -118,11 +133,11 @@
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1702233072,
|
||||
"narHash": "sha256-H5G2wgbim2Ku6G6w+NSaQaauv6B6DlPhY9fMvArKqRo=",
|
||||
"lastModified": 1702346276,
|
||||
"narHash": "sha256-eAQgwIWApFQ40ipeOjVSoK4TEHVd6nbSd9fApiHIw5A=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "781e2a9797ecf0f146e81425c822dca69fe4a348",
|
||||
"rev": "cf28ee258fd5f9a52de6b9865cdb93a1f96d09b7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -136,10 +151,28 @@
|
||||
"agenix": "agenix",
|
||||
"firefox-gnome-theme": "firefox-gnome-theme",
|
||||
"home-manager": "home-manager_2",
|
||||
"nixos-hardware": "nixos-hardware",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"secrets": "secrets",
|
||||
"thunderbird-gnome-theme": "thunderbird-gnome-theme"
|
||||
}
|
||||
},
|
||||
"secrets": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1702750793,
|
||||
"narHash": "sha256-w4ajlpX4k+9HBgmRhMaWMfHsNEs1M4ncKtJGXZcHqe8=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "08e2b6b214e43e8bf3b3db9b7819fd27a1038c86",
|
||||
"revCount": 1,
|
||||
"type": "git",
|
||||
"url": "ssh://git@git.vimium.com/jordan/nix-secrets.git"
|
||||
},
|
||||
"original": {
|
||||
"type": "git",
|
||||
"url": "ssh://git@git.vimium.com/jordan/nix-secrets.git"
|
||||
}
|
||||
},
|
||||
"thunderbird-gnome-theme": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
@@ -3,6 +3,7 @@
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "nixpkgs/nixos-23.11";
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
||||
agenix.url = "github:ryantm/agenix";
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-23.11";
|
||||
@@ -12,13 +13,17 @@
|
||||
url = "github:rafaelmardojai/firefox-gnome-theme";
|
||||
flake = false;
|
||||
};
|
||||
secrets = {
|
||||
url = "git+ssh://git@git.vimium.com/jordan/nix-secrets.git";
|
||||
flake = false;
|
||||
};
|
||||
thunderbird-gnome-theme = {
|
||||
url = "github:rafaelmardojai/thunderbird-gnome-theme";
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
|
||||
outputs = inputs @ { self, nixpkgs, agenix, home-manager, ... }:
|
||||
outputs = inputs @ { self, nixpkgs, agenix, home-manager, secrets, ... }:
|
||||
let
|
||||
nixpkgsForSystem = system: inputs.nixpkgs;
|
||||
overlays = [
|
||||
@@ -59,6 +64,7 @@
|
||||
eos = nixosSystem "x86_64-linux" "eos";
|
||||
helios = nixosSystem "x86_64-linux" "helios";
|
||||
odyssey = nixosSystem "x86_64-linux" "odyssey";
|
||||
pi = nixosSystem "aarch64-linux" "pi";
|
||||
};
|
||||
in
|
||||
{ inherit nixosConfigurations; };
|
||||
|
@@ -44,6 +44,12 @@
|
||||
neovim
|
||||
];
|
||||
|
||||
system.autoUpgrade = {
|
||||
enable = true;
|
||||
flake = "git+ssh://git@git.vimium.com/jordan/nix-config.git";
|
||||
randomizedDelaySec = "10min";
|
||||
};
|
||||
|
||||
nix = {
|
||||
settings = {
|
||||
connect-timeout = 5;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{ config, lib, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
@@ -50,23 +50,21 @@
|
||||
};
|
||||
};
|
||||
|
||||
age.secrets."odyssey_borg_passphrase" = {
|
||||
file = ../../secrets/odyssey_borg_passphrase.age;
|
||||
age.secrets."odyssey-passphrase" = {
|
||||
file = "${inputs.secrets}/passwords/services/borg/odyssey-passphrase.age";
|
||||
};
|
||||
|
||||
services.borgmatic = {
|
||||
enable = true;
|
||||
settings = {
|
||||
location = {
|
||||
source_directories = [
|
||||
"/home/jordan/Documents"
|
||||
];
|
||||
repositories = [
|
||||
"ssh://iqwu22oq@iqwu22oq.repo.borgbase.com/./repo"
|
||||
];
|
||||
};
|
||||
source_directories = [
|
||||
"/home/jordan/Documents"
|
||||
];
|
||||
repositories = [
|
||||
{ label = "borgbase"; path = "ssh://iqwu22oq@iqwu22oq.repo.borgbase.com/./repo"; }
|
||||
];
|
||||
storage = {
|
||||
encryption_passcommand = "cat ${config.age.secrets.odyssey_borg_passphrase.path}";
|
||||
encryption_passcommand = "cat ${config.age.secrets.odyssey-passphrase.path}";
|
||||
ssh_command = "ssh -i /etc/ssh/ssh_host_ed25519_key";
|
||||
};
|
||||
retention = {
|
||||
|
18
hosts/pi/README.md
Normal file
18
hosts/pi/README.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# Pi
|
||||
|
||||
## Overview
|
||||
Raspberry Pi 4
|
||||
|
||||
## Specs
|
||||
* SoC - Broadcom BCM2711
|
||||
* CPU - ARM Cortex-A72 @ 1.8 GHz
|
||||
* Memory - 8 GB LPDDR4
|
||||
|
||||
### Disks
|
||||
Device | Partitions _(filesystem, usage)_
|
||||
--- | ---
|
||||
SD card | `/dev/sda1` (ext4, NixOS Root)
|
||||
|
||||
### Networks
|
||||
- DHCP on `10.0.1.0/24` subnet.
|
||||
- Tailscale on `100.64.0.0/10` subnet. FQDN: `pi.mesh.vimium.net`.
|
80
hosts/pi/default.nix
Normal file
80
hosts/pi/default.nix
Normal file
@@ -0,0 +1,80 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
../server.nix
|
||||
];
|
||||
|
||||
networking.hostId = "731d1660";
|
||||
|
||||
hardware = {
|
||||
raspberry-pi."4" = {
|
||||
apply-overlays-dtmerge.enable = true;
|
||||
audio = false;
|
||||
fkms-3d.enable = true;
|
||||
xhci.enable = true;
|
||||
};
|
||||
deviceTree = {
|
||||
enable = true;
|
||||
filter = "*rpi-4-*.dtb";
|
||||
overlays = [
|
||||
{ name = "hifiberry-digi-pro"; dtboFile = "${pkgs.device-tree_rpi.overlays}/hifiberry-digi-pro.dtbo"; }
|
||||
];
|
||||
};
|
||||
firmware = with pkgs; [
|
||||
firmwareLinuxNonfree
|
||||
wireless-regdb
|
||||
];
|
||||
};
|
||||
|
||||
sound.enable = true;
|
||||
console.enable = false;
|
||||
|
||||
age.secrets."passwords/networks.age" = {
|
||||
file = "../../secrets/passwords/networks.age";
|
||||
};
|
||||
|
||||
networking = {
|
||||
wireless = {
|
||||
enable = true;
|
||||
interfaces = [ "wlan0" ];
|
||||
environmentFile = config.age.secrets."passwords/networks.age".path;
|
||||
networks = {
|
||||
"Apollo 600 Mbps".psk = "@PSK_APOLLO@";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
systemWide = true;
|
||||
};
|
||||
|
||||
services.shairport-sync = {
|
||||
enable = true;
|
||||
group = [ "pipewire" ];
|
||||
openFirewall = true;
|
||||
};
|
||||
|
||||
services.zigbee2mqtt = {
|
||||
enable = true;
|
||||
settings = {
|
||||
homeassistant = true;
|
||||
frontend = true;
|
||||
permit_join = true;
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
libraspberrypi
|
||||
raspberrypi-eeprom
|
||||
];
|
||||
|
||||
system.stateVersion = "22.11";
|
||||
}
|
||||
|
18
hosts/pi/hardware-configuration.nix
Normal file
18
hosts/pi/hardware-configuration.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
<nixos-hardware/raspberry-pi/4>
|
||||
];
|
||||
|
||||
boot.cleanTmpDir = true;
|
||||
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "/dev/disk/by-label/NIXOS_SD";
|
||||
fsType = "ext4";
|
||||
options = [ "noatime" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@@ -18,6 +18,8 @@
|
||||
|
||||
console.keyMap = "uk";
|
||||
|
||||
documentation.enable = false;
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
10
secrets.nix
10
secrets.nix
@@ -1,10 +0,0 @@
|
||||
let
|
||||
jordan = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILVHTjsyMIV4THNw6yz0OxAxGnC+41gX72UrPqTzR+OS";
|
||||
users = [ jordan ];
|
||||
|
||||
odyssey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJre8/cjdoUnbTu0x4ClTITcq4lq+FjpEyJBbLbOlox7";
|
||||
systems = [ odyssey ];
|
||||
in
|
||||
{
|
||||
"secrets/odyssey_borg_passphrase.age".publicKeys = [ jordan odyssey ];
|
||||
}
|
Binary file not shown.
Reference in New Issue
Block a user