remove last spinning rust

This commit is contained in:
Markus Heurung 2025-03-25 14:00:32 +01:00
parent 80cdc6d8d4
commit 788bab3ba1
8 changed files with 378 additions and 13 deletions

View file

@ -33,11 +33,6 @@
fsType = "xfs";
};
fileSystems."/storage/muhh" =
{ device = "/dev/disk/by-uuid/8b716713-359b-4bac-8951-a35405dccd4c";
fsType = "xfs";
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }:
{ config, pkgs, inputs, ... }:
{
imports =
@ -113,11 +113,14 @@
wget
];
fonts.packages = with pkgs; [
fonts = {
enableDefaultPackages = true;
packages = with pkgs; [
atkinson-hyperlegible
iosevka
nerd-fonts.iosevka
# secret-config.packages.x86_64-linux.default
];
};
programs = {
@ -144,12 +147,12 @@
# };
};
virtualisation = {
docker.enable = true;
docker.enable = false;
libvirtd = {
enable = true;
};
podman = {
enable = false;
enable = true;
dockerCompat = true;
};
};

View file

@ -0,0 +1,9 @@
{ modulesPath, ... }:
{
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
boot.loader.grub.device = "/dev/sda";
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "xen_blkfront" "vmw_pvscsi" ];
boot.initrd.kernelModules = [ "nvme" ];
fileSystems."/" = { device = "/dev/sda1"; fsType = "ext4"; };
}

33
hosts/ze-networking.nix Normal file
View file

@ -0,0 +1,33 @@
{ lib, ... }: {
# This file was populated at runtime with the networking
# details gathered from the active system.
networking = {
nameservers = [ "8.8.8.8"
];
defaultGateway = "172.31.1.1";
defaultGateway6 = {
address = "fe80::1";
interface = "eth0";
};
dhcpcd.enable = false;
usePredictableInterfaceNames = lib.mkForce false;
interfaces = {
eth0 = {
ipv4.addresses = [
{ address="188.34.164.224"; prefixLength=32; }
];
ipv6.addresses = [
{ address="2a01:4f8:c013:2152::1"; prefixLength=64; }
{ address="fe80::9400:3ff:fe70:5f0d"; prefixLength=64; }
];
ipv4.routes = [ { address = "172.31.1.1"; prefixLength = 32; } ];
ipv6.routes = [ { address = "fe80::1"; prefixLength = 128; } ];
};
};
};
services.udev.extraRules = ''
ATTR{address}=="96:00:03:70:5f:0d", NAME="eth0"
'';
}

115
hosts/ze.nix Normal file
View file

@ -0,0 +1,115 @@
{ config, pkgs, inputs, ... }:
{
imports =
[
./ze-hardware-configuration.nix
./ze-networking.nix
./common.nix
];
# Bootloader.
boot.loader.systemd-boot.enable = false;
boot.loader.grub = {
enable = true;
device = "nodev";
efiSupport = true;
useOSProber = true;
};
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "ze"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Enable networking
networking.networkmanager.enable = true;
networking.hosts = {
# "178.63.121.197" = ["www.boell.de"];
};
# Workaround for broken networkmanager/systemd thing
# https://github.com/NixOS/nixpkgs/issues/180175#issuecomment-1658731959
systemd.services.NetworkManager-wait-online = {
serviceConfig = {
ExecStart = [ "" "${pkgs.networkmanager}/bin/nm-online -q" ];
};
};
security = {
sudo = {
wheelNeedsPassword = false;
};
};
services.openssh = {
enable = true;
settings.PasswordAuthentication = true;
settings.PubkeyAuthentication = true;
};
services.tailscale = {
enable = true;
authKeyFile = config.sops.secrets.tailscale_auth_key.path;
};
sops.defaultSopsFile = ../secrets/secrets.yaml;
sops.age.keyFile = "/home/muhh/.config/sops/age/keys.txt";
sops.secrets.tailscale_auth_key = {};
# Define a user account. Don't forget to set a password with passwd.
users.users.muhh = {
isNormalUser = true;
name = "muhh";
description = "Markus Heurung";
extraGroups = [ "audio" "docker" "libvirtd" "input" "networkmanager" "plugdev" "qemu-libvirtd" "video" "wheel"];
shell = pkgs.fish;
linger = true;
};
nixpkgs.config = {
allowUnfree = true;
allowUnfreePredicate = pkg: true;
};
environment.shells = with pkgs; [ bash fish zsh ];
environment.systemPackages = with pkgs; [
git
home-manager
mosh
neovim
vim
wget
];
programs = {
fish.enable = true;
};
virtualisation = {
docker.enable = false;
libvirtd = {
enable = true;
};
podman = {
enable = true;
dockerCompat = true;
};
};
# Open ports in the firewall.
# FIREWALL IS ENABLED BY DEFAULT - muhh
# networking.firewall.allowedTCPPorts = [ 19132 ];
# networking.firewall.allowedUDPPorts = [ 19132 ];
# 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. Its 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 = "23.11"; # Did you read the comment?
}

View file

@ -0,0 +1,2 @@
{
}

12
modules/niri/default.nix Normal file
View file

@ -0,0 +1,12 @@
{
programs.niri = {
enable = true;
# settings = {
# environment = {
# "NIXOS_OZONE_WL" = "1";
# "QT_QPA_PLATFORM" = "wayland";
# };
# };
};
}

196
modules/sway/default.nix Normal file
View file

@ -0,0 +1,196 @@
{
services = {
swayidle = {
enable = true;
events = [
{ event = "before-sleep"; command = "${pkgs.swaylock}/bin/swaylock -fF"; }
];
timeouts = [
{
timeout = 300;
command = "${pkgs.swaylock}/bin/swaylock -fF";
}
{
timeout = 330;
command = "${pkgs.sway}/bin/swaymsg 'output * dpms off'";
resumeCommand = "${pkgs.sway}/bin/swaymsg 'output * dpms on'";
}
];
};
swaync = {
enable = true;
};
swayosd = {
enable = true;
display = "DP-1";
};
};
swaylock.enable = true;
waybar = {
enable = true;
systemd.enable = true;
settings = {
mainBar = {
layer = "top";
position = "top";
height = 24;
spacing = 3;
output = [ "DP-1" ];
modules-left = [
"sway/workspaces"
"sway/mode"
"sway/scratchpad"
"sway/window"
"custom/media"
];
modules-center = [
"clock"
"idle_inhibitor"
];
modules-right = [
"pulseaudio"
"backlight"
"network"
"tray"
"custom/notification"
"custom/power"
];
"sway/scratchpad" = {
format = "{icon} {count}";
show-empty = false;
format-icons = ["" "<U+F2D2>"];
tooltip = true;
tooltip-format = "{app}: {title}";
};
"backlight" = {
device = "ddcci6";
format = "{percent}% {icon}";
format-icons = [ "<U+F5D9>" "<U+F5DA>" "<U+F5DB>" "<U+F5DC>" "<U+F5DD>" "<U+F5DE>" "<U+F5DF>"];
};
"clock" = {
format = "{:%d. %B | %H:%M}";
tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
format-alt = "{: KW %OV, %A, %d. %B %Y | %H:%M}";
calendar = {
mode = "year";
mode-mon-col = 3;
weeks-pos = "right";
on-scroll = 1;
on-click-right = "mode";
format = {
months = "<span color='#ffead3'><b>{}</b></span>";
days = "<span color='#ecc6d9'><b>{}</b></span>";
weeks = "<span color='#99ffdd'><b>W{}</b></span>";
weekdays = "<span color='#ffcc66'><b>{}</b></span>";
today = "<span color='#ff6699'><b><u>{}</u></b></span>";
};
};
"actions" = {
on-click-right = "mode";
on-click-forward = "tz_up";
on-click-backward = "tz_down";
on-scroll-up = "shift_up";
on-scroll-down = "shift_down";
};
};
"tray" = {
icon-size = 16;
spacing = 6;
};
};
};
};
wayland.windowManager = {
sway = {
enable = true;
extraConfig = ''
smart_gaps inverse_outer
font pango:Atkinson Hyperlegible 16
'';
config = {
bars = [];
window = {
commands = [
{
command = "floating enable, sticky enable, resize set 20 ppt 40 ppt, border pixel 10";
criteria = {
app_id = "^launcher";
};
}
];
};
gaps = {
inner = 30;
vertical = 50;
horizontal = 400;
# smartGaps = true;
smartBorders = "on";
};
input = {
"type:keyboard" = {
xkb_layout = "eu";
xkb_options = "compose:rwin";
};
"type:touchpad" = {
tap = "enabled";
natural_scroll = "enabled";
dwt = "enabled";
accel_profile = "adaptive";
pointer_accel = "0.5";
};
};
keybindings = let
modifier = config.wayland.windowManager.sway.config.modifier;
in lib.mkOptionDefault {
"XF86AudioRaiseVolume" = "exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+";
"XF86AudioLowerVolume" = "exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-";
"XF86AudioMute" = "exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
"XF86MonBrightnessUp" = "exec brightnessctl set 10%+";
"XF86MonBrightnessDown" = "exec brightnessctl set 10%-";
"XF86AudioPlay" = "exec playerctl play-pause";
"XF86AudioNext" = "exec playerctl next";
"XF86AudioPrev" = "exec playerctl previous";
"${modifier}+o" = "for_window [class=obsidian] scratchpad show";
};
menu = "kitty --app-id launcher -e sway-launcher-desktop";
modifier = "Mod4";
output = {
DP-1 = {
resolution = "3840x2160@30Hz";
position = "0 1080";
# background = "/home/muhh/Sync/Backgrounds/wald.jpg fill";
scale = "1.5";
};
HDMI-A-1 = {
resolution = "1920x1080@60.000Hz";
transform = "flipped";
position = "3840 0";
scale = "1.5";
# background = "/home/muhh/Sync/Backgrounds/pfuetze.jpg fill";
};
};
seat = {
"*" = {
hide_cursor = "5000";
};
};
terminal = "kitty";
# terminal = "ghostty";
window = {
titlebar = false;
};
workspaceOutputAssign =
map (x: {
workspace = x;
output = "DP-1";
}) ["1" "2" "3" "4" "5" "6" "7"]
++ map (x: {
workspace = x;
output = "HDMI-A-1";
}) ["8" "9" "10"];
};
wrapperFeatures.gtk = true;
};
};
}