Co-authored-by: MFlossmann <michael.flossmann@posteo.net> Reviewed-on: http://192.168.178.49:3000/prunebutt/nixConfig/pulls/2
134 lines
3.2 KiB
Nix
134 lines
3.2 KiB
Nix
{
|
||
config,
|
||
pkgs,
|
||
outputs,
|
||
...
|
||
}:
|
||
let
|
||
hostName = "muffinman";
|
||
static_ip = "192.168.178.2";
|
||
gateway = "192.168.178.1";
|
||
in
|
||
{
|
||
imports = [
|
||
./hardware-configuration.nix
|
||
outputs.nixosModules.default
|
||
];
|
||
|
||
# Bootloader.
|
||
boot = {
|
||
loader.grub = {
|
||
enable = true;
|
||
device = "nodev";
|
||
efiSupport = true;
|
||
};
|
||
# systemd-boot.enable = true;
|
||
loader.efi.canTouchEfiVariables = true;
|
||
|
||
kernelParams = [ "ip=${static_ip}::${gateway}:255.255.255.0:${hostName}:" ];
|
||
initrd = {
|
||
availableKernelModules = [ "igb" ];
|
||
# systemd.users.root.shell = "/bin/conspy";
|
||
network = {
|
||
enable = true;
|
||
ssh = {
|
||
enable = true;
|
||
port = 2222;
|
||
authorizedKeys = [
|
||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJlwh35h9AfYwTJ94V4UNo08o/Nt0qXrg8axNWsw0JlF prunebutt@remus"
|
||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHxf7B+zlQWPqKZ0LSHHCKUSWORIvbCOd0vwbsYinXcD prunebutt@LittleUmbrella"
|
||
];
|
||
hostKeys = [ "/etc/secrets/initrd/ssh_host_rsa_key" ];
|
||
extraConfig = ''ForceCommand cryptsetup-askpass'';
|
||
};
|
||
};
|
||
};
|
||
};
|
||
|
||
networking = {
|
||
hostName = hostName;
|
||
networkmanager.enable = true;
|
||
|
||
interfaces = {
|
||
eno2.ipv4.addresses = [
|
||
{
|
||
address = static_ip;
|
||
prefixLength = 24;
|
||
}
|
||
];
|
||
};
|
||
defaultGateway = gateway;
|
||
nameservers = [
|
||
gateway
|
||
"9.9.9.9"
|
||
];
|
||
};
|
||
|
||
services.xserver.enable = false;
|
||
|
||
console = {
|
||
font = "ter-powerline-v16b";
|
||
packages = [
|
||
pkgs.terminus_font
|
||
pkgs.powerline-fonts
|
||
];
|
||
};
|
||
|
||
myNixOS = {
|
||
services.syncthing = {
|
||
enable = true;
|
||
remoteGui = true;
|
||
};
|
||
|
||
home-users = {
|
||
"prunebutt" = {
|
||
userConfig = ./home.nix;
|
||
userSettings = {
|
||
extraGroups = ["networkmanager" "wheel" "libvirtd" "docker"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
|
||
|
||
# Allow unfree packages
|
||
nixpkgs.config.allowUnfree = true;
|
||
|
||
# List packages installed in system profile. To search, run:
|
||
# $ nix search wget
|
||
environment.systemPackages = with pkgs; [
|
||
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
||
wget
|
||
git
|
||
|
||
mdadm
|
||
];
|
||
|
||
# Some programs need SUID wrappers, can be configured further or are
|
||
# started in user sessions.
|
||
# programs.mtr.enable = true;
|
||
# programs.gnupg.agent = {
|
||
# enable = true;
|
||
# enableSSHSupport = true;
|
||
# };
|
||
|
||
# List services that you want to enable:
|
||
|
||
# Enable the OpenSSH daemon.
|
||
services.openssh.enable = true;
|
||
|
||
# Open ports in the firewall.
|
||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||
# Or disable the firewall altogether.
|
||
# networking.firewall.enable = false;
|
||
|
||
# This value determines the NixOS release from which the default
|
||
# settings for stateful data, like file locations and database versions
|
||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||
# this value at the release version of the first install of this system.
|
||
# Before changing this value read the documentation for this option
|
||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||
system.stateVersion = "24.05"; # Did you read the comment?
|
||
|
||
}
|