igor: Prepare configuration of igor
This commit is contained in:
parent
ef1f55cd8d
commit
76fbe957a7
4 changed files with 144 additions and 0 deletions
65
hosts/igor/default.nix
Normal file
65
hosts/igor/default.nix
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
{ config, inputs, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
inputs.disko.nixosModules.disko
|
||||
../../modules/security.nix
|
||||
../../modules/nix-config.nix
|
||||
../../modules/iohk.nix
|
||||
../../modules/timezone.nix
|
||||
../../modules/keybase.nix
|
||||
../../modules/ssh.nix
|
||||
./disko-config.nix
|
||||
];
|
||||
|
||||
networking = let extIface = "ens3";
|
||||
in {
|
||||
hostName = "igor";
|
||||
domain = "failco.de";
|
||||
wireless.enable = false;
|
||||
useDHCP = false;
|
||||
enableIPv6 = false;
|
||||
interfaces.${extIface} = {
|
||||
ipv4.addresses = [{
|
||||
address = "192.168.0.2";
|
||||
prefixLength = 24;
|
||||
}];
|
||||
};
|
||||
defaultGateway = "192.168.0.1";
|
||||
nameservers = [ "1.1.1.1" "8.8.8.8" ];
|
||||
firewall = {
|
||||
allowedTCPPorts = [ 22 80 443 ];
|
||||
allowedUDPPorts = [ ];
|
||||
};
|
||||
};
|
||||
|
||||
security.sudo = {
|
||||
enable = true;
|
||||
execWheelOnly = true;
|
||||
};
|
||||
|
||||
# Select internationalization properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
console = {
|
||||
font = "Lat2-Terminus16";
|
||||
keyMap = "dvorak";
|
||||
};
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.me = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
};
|
||||
|
||||
programs.zsh.enable = true;
|
||||
|
||||
system.stateVersion = "23.11";
|
||||
}
|
||||
49
hosts/igor/disko-config.nix
Normal file
49
hosts/igor/disko-config.nix
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
{
|
||||
disko.devices = {
|
||||
disk.main = {
|
||||
type = "disk";
|
||||
device = "/dev/mmcblk0";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
priority = 1;
|
||||
name = "ESP";
|
||||
start = "1M";
|
||||
end = "512M";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
};
|
||||
};
|
||||
|
||||
root = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = [ "-f" ];
|
||||
|
||||
subvolumes = {
|
||||
"/rootfs" = { mountpoint = "/"; };
|
||||
"/home" = {
|
||||
mountOptions = [ "compress=zstd" ];
|
||||
mountpoint = "/home";
|
||||
};
|
||||
"/nix" = {
|
||||
mountOptions = [ "compress=zstd" "noatime" ];
|
||||
mountpoint = "/nix";
|
||||
};
|
||||
"/swap" = {
|
||||
mountpoint = "/.swapvol";
|
||||
swap = { swapfile.size = "2G"; };
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue