hardware specific pi4 stuff
This commit is contained in:
@@ -11,6 +11,10 @@ creation_rules:
|
|||||||
key_groups:
|
key_groups:
|
||||||
- age:
|
- age:
|
||||||
- *laptop
|
- *laptop
|
||||||
|
- path_regex: pi4/secrets.yaml$
|
||||||
|
key_groups:
|
||||||
|
- age:
|
||||||
|
- *laptop
|
||||||
- path_regex: nathan/secrets.yaml$
|
- path_regex: nathan/secrets.yaml$
|
||||||
key_groups:
|
key_groups:
|
||||||
- age:
|
- age:
|
||||||
|
|||||||
@@ -92,7 +92,7 @@
|
|||||||
system.stateVersion = "23.05"; # Did you read the comment?
|
system.stateVersion = "23.05"; # Did you read the comment?
|
||||||
|
|
||||||
sops = {
|
sops = {
|
||||||
age.keyFile = "/home/nathan/.config/sops/age/keys.txt";
|
age.keyFile = "/var/lib/sops/age/keys.txt";
|
||||||
defaultSopsFile = ./secrets.yaml;
|
defaultSopsFile = ./secrets.yaml;
|
||||||
defaultSopsFormat = "yaml";
|
defaultSopsFormat = "yaml";
|
||||||
|
|
||||||
|
|||||||
@@ -162,7 +162,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
sops = {
|
sops = {
|
||||||
age.keyFile = "/home/nathan/.config/sops/age/keys.txt";
|
age.keyFile = "/var/lib/sops/age/keys.txt";
|
||||||
defaultSopsFile = ./secrets.yaml;
|
defaultSopsFile = ./secrets.yaml;
|
||||||
defaultSopsFormat = "yaml";
|
defaultSopsFormat = "yaml";
|
||||||
secrets."nathan/pass".neededForUsers = true;
|
secrets."nathan/pass".neededForUsers = true;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ pkgs, inputs, ... }: {
|
{ config, pkgs, inputs, ... }: {
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
@@ -14,15 +14,17 @@
|
|||||||
|
|
||||||
config = {
|
config = {
|
||||||
|
|
||||||
users.users.nathan.initialPassword = "7567";
|
|
||||||
|
|
||||||
sysconfig = {
|
sysconfig = {
|
||||||
remoteBuildClient = true;
|
remoteBuildClient = true;
|
||||||
|
|
||||||
users = {
|
users = {
|
||||||
nathan = {
|
nathan = {
|
||||||
#hashedPasswordFile = config.sops.secrets."nathan/pass".path;
|
hashedPasswordFile = config.sops.secrets."nathan/pass".path;
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
|
sshKeys = [
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAsU69CxfQk58CvItPN426h5Alnpb60SH37wet97Vb57 nathan@laptop"
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEnUhN2uHwAJF/SLRX3wlGRmfhV3zpP88JQAYB+gh8jW nathan@localhost"
|
||||||
|
];
|
||||||
extraGroups = [
|
extraGroups = [
|
||||||
"wheel"
|
"wheel"
|
||||||
"networkmanager"
|
"networkmanager"
|
||||||
@@ -101,11 +103,15 @@
|
|||||||
|
|
||||||
services = {
|
services = {
|
||||||
udev.extraRules = ''
|
udev.extraRules = ''
|
||||||
|
SUBSYSTEM=="bcm2835-gpiomem", KERNEL=="gpiomem", GROUP="gpio",MODE="0660"
|
||||||
|
SUBSYSTEM=="gpio", KERNEL=="gpiochip*", ACTION=="add", RUN+="${pkgs.bash}/bin/bash -c 'chown root:gpio /sys/class/gpio/export /sys/class/gpio/unexport ; chmod 220 /sys/class/gpio/export /sys/class/gpio/unexport'"
|
||||||
|
SUBSYSTEM=="gpio", KERNEL=="gpio*", ACTION=="add",RUN+="${pkgs.bash}/bin/bash -c 'chown root:gpio /sys%p/active_low /sys%p/direction /sys%p/edge /sys%p/value ; chmod 660 /sys%p/active_low /sys%p/direction /sys%p/edge /sys%p/value'"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
pulseaudio = {
|
pulseaudio = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
|
load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -121,21 +127,13 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
nix = {
|
|
||||||
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
|
||||||
settings = {
|
|
||||||
experimental-features = [ "nix-command" "flakes" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
sops = {
|
sops = {
|
||||||
age.keyFile = "/home/nathan/.config/sops/age/keys.txt";
|
age.keyFile = "/var/lib/sops/age/keys.txt";
|
||||||
defaultSopsFile = ./secrets.yaml;
|
defaultSopsFile = ./secrets.yaml;
|
||||||
defaultSopsFormat = "yaml";
|
defaultSopsFormat = "yaml";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
fonts.packages = with pkgs; [ nerd-fonts.fira-code ];
|
fonts.packages = with pkgs; [ nerd-fonts.fira-code ];
|
||||||
|
|
||||||
sound.enable = true;
|
sound.enable = true;
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
services.netbird = {
|
services.netbird = {
|
||||||
enable = config.sysconfig.services.netbird.enable;
|
enable = config.sysconfig.services.netbird.enable;
|
||||||
|
ui.enable = true;
|
||||||
/*package = let
|
/*package = let
|
||||||
pkgs-us = import inputs.nixpkgs-us {
|
pkgs-us = import inputs.nixpkgs-us {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
|
|||||||
Reference in New Issue
Block a user