overhaul for pi4
This commit is contained in:
@@ -111,7 +111,8 @@
|
||||
|
||||
users.users."nathan" = {
|
||||
isNormalUser = true;
|
||||
hashedPasswordFile = config.sops.secrets."nathan/pass".path;
|
||||
initialPassword = "7567";
|
||||
#hashedPasswordFile = config.sops.secrets."nathan/pass".path;
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
]; # Enable ‘sudo’ for the user.
|
||||
@@ -160,6 +161,8 @@
|
||||
calcurse.enable = true;
|
||||
rofi.enable = true;
|
||||
firefox.enable = true;
|
||||
git.enable = true;
|
||||
nh.enable = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
@@ -178,8 +181,6 @@
|
||||
pipewire.enable = true;
|
||||
ags.enable = true;
|
||||
hyprland.enable = true;
|
||||
git.enable = true;
|
||||
nh.enable = true;
|
||||
netbird.enable = true;
|
||||
minecraft.enable = false;
|
||||
steam.enable = false;
|
||||
|
||||
149
system-config/configuration/pi4/default.nix
Normal file
149
system-config/configuration/pi4/default.nix
Normal file
@@ -0,0 +1,149 @@
|
||||
{ config, lib, pkgs, inputs, ... }: {
|
||||
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
|
||||
inputs.disko.nixosModules.default
|
||||
|
||||
(import ./disko.nix { device1 = "/dev/mmcblk0"; })
|
||||
|
||||
inputs.home-manager.nixosModules.default
|
||||
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
];
|
||||
|
||||
config = {
|
||||
|
||||
sysconfig.opts = {
|
||||
openssh.enable = true;
|
||||
#pipewire.enable = true;
|
||||
git.enable = true;
|
||||
nh.enable = true;
|
||||
netbird.enable = true;
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
backupFileExtension = "backup";
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
sharedModules = [ inputs.sops-nix.homeManagerModules.sops ];
|
||||
users = {
|
||||
"nathan" = lib.mkMerge [
|
||||
{
|
||||
config.homeconfig = {
|
||||
homeScripts.enable = false;
|
||||
minimal = true;
|
||||
mpd.enable = true;
|
||||
};
|
||||
}
|
||||
inputs.nathan-home-manager
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
boot = {
|
||||
loader = {
|
||||
grub.enable = false;
|
||||
generic-extlinux-compatible.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = "pi4";
|
||||
nameservers = [ "1.1.1.1" "1.0.0.1" ];
|
||||
networkmanager.enable = true;
|
||||
};
|
||||
|
||||
time.timeZone = "America/Chicago";
|
||||
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_US.UTF-8";
|
||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||
LC_MEASUREMENT = "en_US.UTF-8";
|
||||
LC_MONETARY = "en_US.UTF-8";
|
||||
LC_NAME = "en_US.UTF-8";
|
||||
LC_NUMERIC = "en_US.UTF-8";
|
||||
LC_PAPER = "en_US.UTF-8";
|
||||
LC_TELEPHONE = "en_US.UTF-8";
|
||||
LC_TIME = "en_US.UTF-8";
|
||||
};
|
||||
|
||||
hardware = {
|
||||
bluetooth.enable = true;
|
||||
|
||||
};
|
||||
|
||||
programs.zsh.enable = true;
|
||||
|
||||
environment.shells = with pkgs; [ zsh ];
|
||||
|
||||
users = {
|
||||
defaultUserShell = pkgs.zsh;
|
||||
|
||||
groups.gpio = {};
|
||||
|
||||
users = {
|
||||
nathan = {
|
||||
isNormalUser = true;
|
||||
description = "Nathan";
|
||||
initialPassword = "7567";
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
"networkmanager"
|
||||
"gpio"
|
||||
"spi"
|
||||
"audio"
|
||||
"pulse"
|
||||
"pulse-access"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
udev.extraRules = ''
|
||||
'';
|
||||
|
||||
pulseaudio = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
'';
|
||||
};
|
||||
|
||||
services.avahi = {
|
||||
|
||||
enable = true;
|
||||
ipv4 = true;
|
||||
ipv6 = true;
|
||||
openFirewall = true;
|
||||
nssmdns4 = true;
|
||||
wideArea = true;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
nix = {
|
||||
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
||||
settings = {
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
};
|
||||
};
|
||||
|
||||
sops = {
|
||||
age.keyFile = "/home/nathan/.config/sops/age/keys.txt";
|
||||
defaultSopsFile = ./secrets.yaml;
|
||||
defaultSopsFormat = "yaml";
|
||||
};
|
||||
|
||||
|
||||
|
||||
fonts.packages = with pkgs; [ nerd-fonts.fira-code ];
|
||||
|
||||
sound.enable = true;
|
||||
|
||||
security.rtkit.enable = true;
|
||||
|
||||
system.stateVersion = "25.05";
|
||||
};
|
||||
}
|
||||
66
system-config/configuration/pi4/disko.nix
Normal file
66
system-config/configuration/pi4/disko.nix
Normal file
@@ -0,0 +1,66 @@
|
||||
{
|
||||
device1 ? throw "Set this to your disk device, e.g. /dev/sda",
|
||||
...
|
||||
}: {
|
||||
disko.devices = {
|
||||
disk = {
|
||||
main = {
|
||||
device = device1;
|
||||
type = "disk";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
boot = {
|
||||
name = "boot";
|
||||
size = "1M";
|
||||
type = "EF02";
|
||||
};
|
||||
esp = {
|
||||
name = "ESP";
|
||||
size = "500M";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
};
|
||||
};
|
||||
root = {
|
||||
name = "root";
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "lvm_pv";
|
||||
vg = "root_vg";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
lvm_vg = {
|
||||
root_vg = {
|
||||
type = "lvm_vg";
|
||||
lvs = {
|
||||
root = {
|
||||
size = "100%FREE";
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = ["-f"];
|
||||
|
||||
subvolumes = {
|
||||
"/root" = {
|
||||
mountpoint = "/";
|
||||
};
|
||||
|
||||
"/nix" = {
|
||||
mountOptions = ["subvol=nix" "noatime"];
|
||||
mountpoint = "/nix";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
27
system-config/configuration/pi4/hardware-configuration.nix
Normal file
27
system-config/configuration/pi4/hardware-configuration.nix
Normal file
@@ -0,0 +1,27 @@
|
||||
# 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 = [ "xhci_pci" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
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.end0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlan0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
|
||||
}
|
||||
17
system-config/configuration/pi4/secrets.yaml
Normal file
17
system-config/configuration/pi4/secrets.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
nathan:
|
||||
pass: ENC[AES256_GCM,data:O8d4PQ==,iv:CClnfFd/xUrfLBIb2ZDlBYm1GQVWwawMqePRYnRtSeE=,tag:mk++Mml+x5xT7aHiOQv25Q==,type:str]
|
||||
sops:
|
||||
age:
|
||||
- recipient: age1yqgyp2uxz4lzrc9f9ka0mfjl5fr6ahf8nf24nlmran2wulg6fpvq9hyp9q
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB2MEIyRjR0a25UU3hnR2Zw
|
||||
WXFaaXJYNWFSMmZsR1FsYVB1WlBkZWptSHhzCkRGRitnNkc3MEtjV05KRXlXT3RR
|
||||
TVhnVlpUdzFiSEwxbHNOT3dyQ0dzbG8KLS0tIElMc3g4SHRxZTVnOCtVcktRb25D
|
||||
Y2ZpR25VNGVoMi9ibW8wbW5rYTQ3R00Ka6/KLXSSRP9WJDV0RBHHS5nALfd/3xDu
|
||||
y+QS+Ueh56kQT2zbYpYBRIPDgI3LZgwlTifQCDJ9ZPq0LGgu4XbEqQ==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2025-08-01T23:42:11Z"
|
||||
mac: ENC[AES256_GCM,data:7kHz3rhmzaieuY97ISA7RmEQnPn6E7Ta6sioPXvVBCLOmgwqhtITDXZw7be7/Da/BZr7O2rFcw6RaFiOdreLEzz9Kp8c5AzqXa5V6Mxhs0XJPFZ4Xkabzc3cBrm6QqKVi5PSUjPv6wDmZP7tvgzS/pny9SBmzlWOItSvs3Dw+5I=,iv:yNdtnJkmt3veZj6sDrbuNpBFc9UQVYaWlG6zmfdyfI4=,tag:tRwXGMHtQtXWrTzzMFFN0w==,type:str]
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.10.2
|
||||
@@ -3,8 +3,6 @@
|
||||
imports = [
|
||||
./hyprland
|
||||
./ags
|
||||
./git
|
||||
./nh
|
||||
./steam
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
{ config, lib, ... }: {
|
||||
|
||||
options.sysconfig.opts.git.enable = lib.options.mkOption {};
|
||||
|
||||
config = lib.mkIf config.sysconfig.opts.git.enable {
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
config = {
|
||||
user = {
|
||||
name = "Nathan";
|
||||
email = "nathanblunkall5@gmail.com";
|
||||
};
|
||||
init = {
|
||||
defaultBranch = "master";
|
||||
};
|
||||
url = {
|
||||
"ssh://gitea@gitea.blunkall.us/" = {
|
||||
insteadOf = [
|
||||
"blunkall:"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
{ config, lib, ... }: {
|
||||
|
||||
options.sysconfig.opts.nh.enable = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.sysconfig.opts.nh.enable {
|
||||
|
||||
programs.nh = {
|
||||
enable = true;
|
||||
#flake = "/home/nathan/Projects/Olympus";
|
||||
|
||||
clean = {
|
||||
enable = true;
|
||||
dates = "weekly";
|
||||
extraArgs = "--keep 5 --keep-since 3d";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user