c3terminal/config.nix

194 lines
4.5 KiB
Nix
Raw Permalink Normal View History

2024-12-10 21:22:01 +01:00
{
pkgs,
lib,
2024-12-10 23:00:15 +01:00
config,
2024-12-10 21:22:01 +01:00
...
2024-12-10 23:00:15 +01:00
}:
let
lock = value: {
Value = value;
Status = "locked";
2024-12-10 21:22:01 +01:00
};
2024-12-10 23:00:15 +01:00
in
{
system.stateVersion = "24.11";
2024-12-10 21:22:01 +01:00
networking.hostName = "c3terminal";
time.timeZone = "Europe/Berlin";
facter.reportPath = ./facter.json;
2024-12-13 17:58:43 +01:00
programs.vim.enable = true;
programs.vim.defaultEditor = true;
services = {
xserver = {
xkb.layout = "de";
};
};
console = {
enable = true;
useXkbConfig = true;
};
2024-12-10 21:22:01 +01:00
2024-12-10 23:16:03 +01:00
system.autoUpgrade = {
enable = true;
flake = "git+https://git.hamburg.ccc.de/jopejoe1/c3terminal";
dates = "5min";
};
2024-12-10 21:22:01 +01:00
users.users.c3terminal = {
isNormalUser = true;
password = "test";
extraGroups = [
"wheel"
"networkmanager"
];
openssh.authorizedKeys.keys = [
2024-12-13 18:00:50 +01:00
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFZDUoC+1lNR2JTY1Q+vhXpuLmKMdVl2OMFLVbQ3cGkw jopejoe1"
2024-12-10 21:22:01 +01:00
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPHns90pKP8pDOKM7ziCiG7ZjO3kFvScnbq7uBlUWG5H n0th1ng"
2024-12-13 19:49:16 +01:00
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDA/2vtzv7k2eEm7aedvy6U+hWp9SfLsjRnyY5xraBc1 toxicity@Opeth"
2024-12-10 21:22:01 +01:00
];
2024-12-10 23:00:15 +01:00
};
2024-12-13 18:05:23 +01:00
home-manager = {
users.c3terminal = {
home = {
username = config.users.users.c3terminal.name;
homeDirectory = config.users.users.c3terminal.home;
stateVersion = config.system.stateVersion;
2024-12-13 18:23:43 +01:00
sessionVariables = {
MOZ_ENABLE_WAYLAND = 1;
};
2024-12-13 18:25:47 +01:00
packages = with pkgs; [
git
2024-12-13 19:53:45 +01:00
chromium
2024-12-13 18:25:47 +01:00
];
2024-12-13 18:05:23 +01:00
};
programs = {
firefox = {
enable = true;
package = pkgs.firefox-esr;
2024-12-13 19:23:36 +01:00
policies = {
SupportMenu = {
Title = "Config";
URL = "https://git.hamburg.ccc.de/jopejoe1/c3terminal";
};
Preferences = {
"browser.ssb.enabled" = lock true;
#"ui.osk.detected_physical_keyboard" = lock false;
#"browser.gesture.pinch.in" = lock false;
#"browser.gesture.pinch.out" = lock false;
"zoom.maxPercent" = lock 100;
"zoom.minPercent" = lock 100;
};
};
2024-12-10 23:00:15 +01:00
};
};
2024-12-10 23:23:32 +01:00
};
2024-12-10 21:22:01 +01:00
};
users.users.demo = {
isNormalUser = true;
2024-12-10 21:40:01 +01:00
password = "test";
2024-12-10 21:22:01 +01:00
};
users.users.root = {
password = "test";
shell = lib.mkForce (lib.getExe pkgs.bash);
extraGroups = [
"wheel"
"networkmanager"
];
openssh.authorizedKeys.keys = [
2024-12-13 18:00:50 +01:00
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFZDUoC+1lNR2JTY1Q+vhXpuLmKMdVl2OMFLVbQ3cGkw jopejoe1"
2024-12-10 21:22:01 +01:00
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPHns90pKP8pDOKM7ziCiG7ZjO3kFvScnbq7uBlUWG5H n0th1ng"
2024-12-13 19:49:16 +01:00
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDA/2vtzv7k2eEm7aedvy6U+hWp9SfLsjRnyY5xraBc1 toxicity@Opeth"
2024-12-10 21:22:01 +01:00
];
};
boot = {
loader = {
grub = {
enable = true;
};
efi = {
canTouchEfiVariables = true;
};
};
};
services = {
openssh = {
enable = true;
settings = {
PermitRootLogin = "no";
};
};
2024-12-10 22:13:12 +01:00
};
2024-12-10 21:22:01 +01:00
2024-12-10 22:13:12 +01:00
programs.sway = {
enable = true;
wrapperFeatures.gtk = true;
2024-12-10 21:22:01 +01:00
};
2024-12-10 21:42:54 +01:00
nix = {
settings = {
substituters = lib.mkForce [
"https://cache.nixos.org"
"https://nix-community.cachix.org"
];
trusted-public-keys = lib.mkForce [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
sandbox = true;
require-sigs = true;
max-jobs = "auto";
allowed-users = [ "*" ];
trusted-users = [
"root"
];
experimental-features = [
"nix-command"
"flakes"
];
use-xdg-base-directories = true;
};
package = pkgs.lix;
};
2024-12-10 21:22:01 +01:00
disko.devices = {
disk = {
main = {
type = "disk";
device = "/dev/disk/by-id/wwn-0x502b2a201d1c1b1a";
content = {
type = "gpt";
partitions = {
boot = {
size = "1M";
type = "EF02"; # for grub MBR
};
ESP = {
size = "512M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0077" ];
};
};
root = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
};
};
};
};
};
}