revamp of structure

This commit is contained in:
strix 2026-08-26 03:57:23 +02:00
parent 275586f9c2
commit b5365e6ab3
26 changed files with 383 additions and 393 deletions

4
modules/boot/default.nix Normal file
View file

@ -0,0 +1,4 @@
{ pkgs, ... }:
{
boot.kernelPackages = pkgs.linuxPackages_latest;
}

25
modules/boot/plymouth.nix Normal file
View file

@ -0,0 +1,25 @@
{pkgs,...}:
{
boot.consoleLogLevel = 3;
boot.initrd.verbose = false;
boot.kernelParams = [
"quiet"
"udev.log_priority=3"
"rd.udev.log_level=3"
"rd.systemd.show_status=auto"
];
boot.plymouth = {
enable = true;
theme = "bgrt";
package = pkgs.plymouth.overrideAttrs (old: {
postInstall = (old.postInstall or "") + ''
sed -i \
-e 's/DialogClearsFirmwareBackground=true/DialogClearsFirmwareBackground=false/' \
-e 's/DialogVerticalAlignment=.382/DialogVerticalAlignment=.55/' \
-e 's/TitleVerticalAlignment=.382/TitleVerticalAlignment=.55/' \
$out/share/plymouth/themes/bgrt/bgrt.plymouth
'';
});
};
}

View file

@ -0,0 +1,20 @@
{ lib, pkgs, inputs, ... }:
{
inputs = [
inputs.lanzaboote.nixosModules.lanzaboote
];
environment.systemPackages = [ pkgs.sbctl ];
boot.loader.systemd-boot.enable = lib.mkForce false;
boot.lanzaboote = {
enable = true;
pkiBundle = "/var/lib/sbctl";
autoGenerateKeys.enable = true;
autoEnrollKeys = {
enable = true;
autoReboot = true;
};
configurationLimit = 5;
};
}

View file

@ -0,0 +1,6 @@
{ }:
{
boot.loader.systemd-boot.enable = true;
boot.loader.timeout = 0;
boot.loader.efi.canTouchEfiVariables = true;
}

11
modules/desktop/audio.nix Normal file
View file

@ -0,0 +1,11 @@
{ }:
{
services.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
}

View file

@ -0,0 +1,7 @@
{ }:
{
nixpkgs.config.allowUnfree = true;
programs.firefox.enable = true;
programs.virt-manager.enable = true;
services.fprintd.enable = true;
}

12
modules/desktop/gnome.nix Normal file
View file

@ -0,0 +1,12 @@
{}:
{
services.xserver.enable = true;
services.displayManager.gdm.enable = true;
services.desktopManager.gnome.enable = true;
services.xserver.xkb = {
layout = "us";
variant = "";
};
}

View file

@ -0,0 +1,6 @@
{ ... }:
{
services.printing = {
enable = true;
};
}

View file

@ -0,0 +1,9 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
cargo
sccache
];
environment.sessionVariables."RUSTC_WRAPPER" = "sccache";
}

View file

@ -0,0 +1,9 @@
{ ... }:
{
programs.git = {
enable = true;
settings = {
init = { defaultBranch = "main"; };
};
};
}

View file

@ -0,0 +1,15 @@
{ ... }: {
dconf.settings = {
"org/gnome/settings-daemon/plugins/media-keys" = {
custom-keybindings = [
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/"
];
};
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = {
name = "terminal";
command = "ghostty";
binding = "<Super>Return";
};
};
}

View file

@ -0,0 +1,8 @@
{ pkgs, ... }:
{
home.file.".cargo/config.toml".text = ''
[target.'cfg(target_os = "linux")']
linker = "${pkgs.clang}/bin/clang"
rustflags = ["-C", "link-arg=-fuse-ld=${pkgs.mold-wrapped}/bin/mold"]
'';
}

View file

@ -0,0 +1,13 @@
{ username, ... }:
{
programs.zsh = {
enable = true;
oh-my-zsh = {
enable = true;
theme = "nanotech";
};
sessionVariables = {
SSH_AUTH_SOCK = "/home/${username}/.bitwarden-ssh-agent.sock";
};
};
}

View file

@ -0,0 +1,5 @@
{ ... }:
{
networking.networkmanager.enable = true;
networking.firewall.enable = true;
}

35
modules/nixos/default.nix Normal file
View file

@ -0,0 +1,35 @@
{ pkgs, ... }:
{
imports = [
./i18n.nix
];
time.timeZone = "Europe/Amsterdam";
environment.systemPackages = with pkgs; [
neovim
htop
];
environment.shellAliases = {
vim = "nvim";
};
services.openssh.enable = true;
programs.nix-ld.enable = true;
programs.home-manager.enable = true;
nix = {
settings = {
auto-optimise-store = true;
allowed-users = [ "@wheel" ];
experimental-features = [
"nix-command"
"flakes"
];
};
};
environment.variables."NIX_AUTO_RUN" = "1";
}

16
modules/nixos/i18n.nix Normal file
View file

@ -0,0 +1,16 @@
{ ... }:
{
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "nl_NL.UTF-8";
LC_IDENTIFICATION = "nl_NL.UTF-8";
LC_MEASUREMENT = "nl_NL.UTF-8";
LC_MONETARY = "nl_NL.UTF-8";
LC_NAME = "nl_NL.UTF-8";
LC_NUMERIC = "nl_NL.UTF-8";
LC_PAPER = "nl_NL.UTF-8";
LC_TELEPHONE = "nl_NL.UTF-8";
LC_TIME = "nl_NL.UTF-8";
};
}

View file

@ -0,0 +1,13 @@
{ pkgs, ... }:
{
virtualisation.libvirtd.enable = true;
virtualisation.docker = {
enable = true;
autoPrune = {
dates = "weekly";
};
};
environment.systemPackages = [ pkgs.dnsmasq ];
}