Initial commit
This commit is contained in:
commit
c734c9e5ff
|
@ -0,0 +1,65 @@
|
|||
# Build with:
|
||||
# nix build -L .#packages.aarch64-linux.sdcard
|
||||
|
||||
{
|
||||
description = "Base system for raspberry pi 4";
|
||||
inputs = {
|
||||
nixpkgs.url = "nixpkgs/nixos-unstable";
|
||||
nixos-generators = {
|
||||
url = "github:nix-community/nixos-generators";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, nixos-generators, ... }:
|
||||
{
|
||||
nixosModules = {
|
||||
system = {
|
||||
networking.hostName = "nixos-pi4";
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PermitRootLogin = "no";
|
||||
PasswordAuthentication = true;
|
||||
};
|
||||
};
|
||||
|
||||
zramSwap.enable = true;
|
||||
zramSwap.algorithm = "zstd";
|
||||
zramSwap.memoryPercent = 200;
|
||||
|
||||
# Disabling the whole `profiles/base.nix` module, which is responsible
|
||||
# for adding ZFS and a bunch of other unnecessary programs:
|
||||
disabledModules = [
|
||||
"profiles/base.nix"
|
||||
];
|
||||
|
||||
system.stateVersion = "23.11";
|
||||
};
|
||||
users = {
|
||||
users.users = {
|
||||
lauren_lagarde = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ];
|
||||
hashedPassword = "$y$j9T$vMFQoTCECmj5tTo9zQw5c.$UcPOVWR/YmlwmZNKkWpUI4ID3OsetfmR6jSTD0j1gKB";
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCl881A1gvgCx+4ECrmJnO2QCTiqjaOLfAegKAAkvWNFKL0rDfsj8tZULUcyn87HYsRrdmqCOQ62GOjQyK803azq7QTxwY4vjczkJxico4LnIToTobcz+JkgF6Rf/h74bs9dHk4ZU853FRBz3wi/14rI10Iwckt37B1ayJacpELuzFobKYip2FjiL1vNH3tiAFR131z+YBByvNX+uJYEhpsI0xry9zbsSUWUq5/YFpmjezblzYRokfsReYiKJeQBeROSeRC/xFBSnikECSylNI4sw5VIpGXFIxL5xhss+s+3dnb+LFQ+zInOYxkVRydYc/In9Wz6Tu7v07K8bjvE7nQwHenoGtRW590Xu0rJApS+k8Cu16sCO2QFj/aI+gCrhU0ymM0aicr0hFAME6Y7j9HcR6PxYxnXZjI7cfqhO5TG8jot25SPzJcvH3EV5oPKtAkw9XA+8+nAI9czFlUgHnuMJAqw1IGOD3qozwqZ5yn1+kG7FZJRpvaPc5pK2HtqaAKJmnRuVaWcFuNALh86gr7Qn8IEp8Q+YyKmDqrMZ4KLJUMnVqn4y0HVS1eB5nVujaJZUGJWA4q3og0FE/2kH74WEp2ZtuJAoEPcgfZ6Ns7BmmXIZU7qu4kQoQ73b3mn6hCi5xlQ/sClzwHYkRPo4tST64ED/UIRPCYe1byNUWSww== cardno:000613461973"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
packages.aarch64-linux = {
|
||||
sdcard = nixos-generators.nixosGenerate {
|
||||
system = "aarch64-linux";
|
||||
format = "sd-aarch64";
|
||||
modules = [
|
||||
self.nixosModules.system
|
||||
self.nixosModules.users
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue