nixos-dotfiles/hosts/ultrapi/configuration.nix
Alex Stan 5232a60f0d changes
Signed-off-by: Alex S <stan.alexandru@ichb.ro>
2023-05-07 19:20:12 +00:00

105 lines
2.2 KiB
Nix

{ config, pkgs, lib, inputs, ... }:
let
user = "ultra";
hashedPassword = "$6$OBjnSQhhJgHsr5LE$jFtUz.2qv0l2viv86exXmfHWC0fDFXKD3rqH41NmqgkdoBrwY2rPkDBCPjdq7PSoeudYcQ0nXxJvh1N7EIUs90";
hostname = "ultrapi";
helix = inputs.helix.packages.${pkgs.system}.default;
/*
nixosHardware = pkgs.fetchFromGitHub {
owner = "NixOS";
repo = "nixos-hardware";
rev = "51559e691f1493a26f94f1df1aaf516bb507e78b";
sha256 = "0spswivyk006h5xr0a0yhr7wr9fh0kg7cfyxqmk521svf3x1pnr8";
};
*/
in {
# imports = ["${fetchTarball "https://github.com/NixOS/nixos-hardware/archive/936e4649098d6a5e0762058cb7687be1b2d90550.tar.gz" }/raspberry-pi/4"];
imports = [
# "${nixosHardware}/raspberry-pi/4"
"${inputs.nixos-hardware}/raspberry-pi/4"
];
fileSystems = {
"/" = {
device = "/dev/disk/by-label/NIXOS_SD";
fsType = "ext4";
options = [ "noatime" ];
};
};
networking = {
hostName = hostname;
};
environment.systemPackages = with pkgs; [
vim
helix
docker
git
];
services = {
openssh.enable = true;
adguardhome = {
enable = true;
openFirewall = true;
settings = {
bind_host = "192.168.1.221";
bind_port = 3000;
# bootstrap_dns = "8.8.8.8, 8.8.4.4";
};
};
};
users = {
mutableUsers = false;
users."${user}" = {
isNormalUser = true;
hashedPassword = "${hashedPassword}";
extraGroups = [ "wheel" ];
};
};
# Enable GPU acceleration
hardware.raspberry-pi."4".fkms-3d.enable = true;
services.xserver = {
enable = false;
};
virtualisation = {
docker = {
enable = true;
enableOnBoot = true;
rootless = {
enable = true;
};
};
};
security = {
sudo = {
extraConfig = ''
Defaults insults,pwfeedback
'';
};
};
nixpkgs = {
config = {
allowUnfree = true;
};
};
system = {
stateVersion = "23.05"; # Do NOT change.
};
}