refactor
This commit is contained in:
parent
dbd88aea66
commit
8fbd9d06b4
29 changed files with 130 additions and 101 deletions
20
mod/common/boot.nix
Normal file
20
mod/common/boot.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
boot = {
|
||||
loader = {
|
||||
efi.canTouchEfiVariables = true;
|
||||
grub = {
|
||||
enable = true;
|
||||
efiSupport = true;
|
||||
device = "nodev";
|
||||
};
|
||||
};
|
||||
|
||||
# otherwise /tmp is on disk. This *may* be problematic as nix
|
||||
# builds in /tmp but I think my swap is large enough...
|
||||
tmp.useTmpfs = true;
|
||||
|
||||
kernelPackages = pkgs.linuxPackages_6_13;
|
||||
kernel.sysctl."kernel.sysrq" = 1;
|
||||
};
|
||||
}
|
||||
25
mod/common/locale.nix
Normal file
25
mod/common/locale.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ ... }:
|
||||
{
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "de_DE.UTF-8";
|
||||
LC_IDENTIFICATION = "de_DE.UTF-8";
|
||||
LC_MEASUREMENT = "de_DE.UTF-8";
|
||||
LC_MONETARY = "de_DE.UTF-8";
|
||||
LC_NAME = "de_DE.UTF-8";
|
||||
LC_NUMERIC = "de_DE.UTF-8";
|
||||
LC_PAPER = "de_DE.UTF-8";
|
||||
LC_TELEPHONE = "de_DE.UTF-8";
|
||||
LC_TIME = "de_DE.UTF-8";
|
||||
};
|
||||
|
||||
console.keyMap = "de";
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver.xkb = {
|
||||
layout = "de";
|
||||
variant = "";
|
||||
};
|
||||
}
|
||||
18
mod/common/nix.nix
Normal file
18
mod/common/nix.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
lib,
|
||||
inputs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
nix.settings = {
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
trusted-users = [ "root" ];
|
||||
auto-optimise-store = true;
|
||||
};
|
||||
|
||||
nixpkgs.config.allowUnfree = false;
|
||||
}
|
||||
49
mod/common/shell.nix
Normal file
49
mod/common/shell.nix
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
{ pkgs, inputs, ... }:
|
||||
{
|
||||
environment.shells = with pkgs; [
|
||||
bashInteractive
|
||||
fish
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
bc
|
||||
docker-compose
|
||||
fd
|
||||
gh
|
||||
htop
|
||||
killall
|
||||
ripgrep
|
||||
starship
|
||||
stow
|
||||
unzip
|
||||
wget
|
||||
wl-clipboard
|
||||
inputs.colmena.packages."x86_64-linux".colmena # todo use overlay
|
||||
];
|
||||
|
||||
programs = {
|
||||
fish.enable = true;
|
||||
git.enable = true;
|
||||
tmux = {
|
||||
enable = true;
|
||||
clock24 = true;
|
||||
};
|
||||
neovim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
};
|
||||
};
|
||||
|
||||
# --- Excludes ---
|
||||
programs.nano.enable = false;
|
||||
|
||||
# Enabled by fish but takes soooo long.
|
||||
# This is apparently used by some of fish's
|
||||
# autocomplete features.
|
||||
documentation.man.generateCaches = false;
|
||||
|
||||
# To stop the annoying error on entering wrong commands
|
||||
programs.command-not-found.enable = false;
|
||||
}
|
||||
38
mod/common/users.nix
Normal file
38
mod/common/users.nix
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
options,
|
||||
...
|
||||
}:
|
||||
{
|
||||
users = {
|
||||
mutableUsers = false;
|
||||
users."hd" = {
|
||||
description = "Henri";
|
||||
isNormalUser = true;
|
||||
createHome = true;
|
||||
home = "/home/hd";
|
||||
extraGroups = [ "wheel" ];
|
||||
shell = pkgs.fish;
|
||||
packages = [ ];
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEG+dd4m98aKEWfFa/7VZUlJNX0axvIlHVihT8w7RLyY"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIsoj2+esEebRwDV2PuNRt9Vz28oolOy+Hc2THwrWTAB"
|
||||
];
|
||||
hashedPassword = "$y$jDT$dhvO.xqs8mopz.sFFul.q/$ud5642o7CnVetU6QEu0ctiVMFh7ngZznDf0wp4cXos8";
|
||||
};
|
||||
users.root = {
|
||||
hashedPassword = "!";
|
||||
|
||||
# I don't like the unprivileged users to have unrestricted access to root
|
||||
# but this is required for colmena. Better options are
|
||||
# - only authorize root's pubkey
|
||||
# - create password protected key
|
||||
# TODO: do one of the above
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEG+dd4m98aKEWfFa/7VZUlJNX0axvIlHVihT8w7RLyY"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIsoj2+esEebRwDV2PuNRt9Vz28oolOy+Hc2THwrWTAB"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue