Compare commits

..

2 Commits

Author SHA1 Message Date
ae304c6902 update 2024-12-25 16:28:38 +01:00
d341f7280b multisystem init 2024-12-05 20:09:11 +01:00
5 changed files with 97 additions and 330 deletions

0
.gitmodules vendored Normal file
View File

View File

@ -23,14 +23,14 @@ in
# Use the systemd-boot EFI boot loader.
boot = {
kernelPackages = pkgs.linuxPackages_zen;
extraModulePackages = [
config.boot.kernelPackages.ddcci-driver # ddcci-driver
];
kernelModules = [
"ddcci-driver" # Brightness Controll (even on OLEDS)
"i2c-dev" # Brightness Controll (even on OLEDS)
];
kernelParams = [ "module_blacklist=i915" "nvidia_drm.modeset=1" ];
#extraModulePackages = [
# config.boot.kernelPackages.ddcci-driver # ddcci-driver
#];
#kernelModules = [
# "ddcci-driver" # Brightness Controll (even on OLEDS)
# "i2c-dev" # Brightness Controll (even on OLEDS)
#];
#kernelParams = [ "module_blacklist=i915" "nvidia_drm.modeset=1" ];
#kernelPatches = [ {
# name = "hdr";
# patch = null;
@ -38,32 +38,34 @@ in
# AMD_PRIVATE_COLOR y
# '';
# } ];
extraModprobeConfig = ''
options nvidia_drm modes.et=1 fbdev=1
options nvidia NVreg_PreserveVideoMemoryAllocations=1
'';
#extraModprobeConfig = ''
# options nvidia_drm modes.et=1 fbdev=1
# options nvidia NVreg_PreserveVideoMemoryAllocations=1
#'';
loader = {
efi.canTouchEfiVariables = true;
systemd-boot = {
consoleMode = "max";
memtest86.enable = true;
efi.efiSysMountPoint = "/boot";
#systemd-boot = {
# consoleMode = "max";
# memtest86.enable = true;
#};
grub = {
enable = true;
efiSupport = true;
device = "nodev";
};
};
initrd.systemd.enable = true;
kernel.sysctl = {
"kernel.perf_event_paranoid" = true;
"kernel.kptr_restrict" = false;
};
};
# Filesystems
fileSystems =
{
"/share" = {
options = [
"nofail"
];
};
#"/share" = {
# options = [
# "nofail"
# ];
#};
};
# Graphics
@ -71,19 +73,26 @@ in
graphics = {
enable = true;
enable32Bit = true;
extraPackages = with pkgs; [
vpl-gpu-rt # newer gpus
intel-media-sdk # older gpus
];
};
nvidia = {
modesetting.enable = true; # required
powerManagement.enable = false; # Experimental
open = false; # Support limited to Turing and later: https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
nvidiaSettings = true; # accessible via nvidia-settings
package = config.boot.kernelPackages.nvidiaPackages.latest;
};
bluetooth.enable = true;
#nvidia = {
# modesetting.enable = true; # required
# powerManagement.enable = false; # Experimental
# open = false; # Support limited to Turing and later: https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
# nvidiaSettings = true; # accessible via nvidia-settings
# package = config.boot.kernelPackages.nvidiaPackages.stable;
#};
};
networking =
{
hostName = "Zuse1"; # Define your hostname.
hostName = "Zuse2"; # Define your hostname
networkmanager.enable = true;
wireless.userControlled.enable = true;
#nameservers = [
# "127.0.0.1"
# "::1"
@ -121,13 +130,13 @@ networking =
services.xserver = {
enable = true;
videoDrivers = [ "nvidia" ];
#videoDrivers = [ "nvidia" ];
excludePackages = with pkgs; [
xterm # why the fuck is this garbage even shipped?
];
# Configure keymap in X11
xkb.layout = "us";
xkb.layout = "de";
xkb.options = "eurosign:e,caps:escape";
# DWM (minimal Xorg Fallback)
@ -152,21 +161,20 @@ services.displayManager.sddm =
enable = true;
autoNumlock = true; # Enable NumLock at login
wayland.enable = true;
settings = {
Autologin = {
Session = "hyprland-systemd.desktop";
};
};
theme = "catppuccin-mocha";
package = pkgs.kdePackages.sddm;
};
services.xserver.displayManager.startx.enable = true;
services.desktopManager.plasma6.enable = true;
# GNOME Keyring
services.gnome.gnome-keyring.enable = true;
security.pam.services.sddm.enableGnomeKeyring = true;
security.pam.services.hyprlock.enableGnomeKeyring = true;
# Bluetooth managment
services.blueman.enable = true;
# Enable CUPS to print documents.
services.printing.enable = true;
@ -193,11 +201,6 @@ services.transmission = {
webHome = pkgs.flood-for-transmission;
};
services.jellyfin = {
enable = true;
openFirewall = true;
};
# (p)locate, quickly find files
services.locate.package = {
enable = true;
@ -224,6 +227,7 @@ security.krb5 = {
# Enable touchpad support (enabled default in most desktopManager).
# services.libinput.enable = true;
# /share
users.groups.share = {};
@ -260,15 +264,11 @@ systemd.tmpfiles.rules = [
shell = pkgs.zsh;
};
users.users.leila = {
isNormalUser = true;
extraGroups = [
"steam" # /steam
"audio" # audio
"video" # video
"i2c" # needed for ddcci
];
shell = pkgs.bash;
users.users.kiosk = {
isNormalUser = true;
home = "/var/kiosk";
homeMode = "700";
extraGroups = ["audio"];
};
# Font Config
@ -331,13 +331,21 @@ environment.etc.crypttab = {
home-manager # Nix's Home-Manager
egl-wayland # NVIDIA compat
nvidia-vaapi-driver # NVIDIA compat
catppuccin-cursors.mochaDark # Catppuccin Mouse Cursors
(catppuccin-sddm.override {
flavor = "mocha";
font = "Fira Sans";
fontSize = "9";
#backgroundbin = "$XDG_PICTURES_DIR/Wallpapers/current";
loginBackground = true;
})
networkmanagerapplet # Network Manager GUI
];
programs = {
hyprland = {
enable = true;
xwayland.enable = true;
withUWSM = true;
};
steam = {
enable = true;
@ -356,7 +364,7 @@ environment.etc.crypttab = {
];
};
virt-manager.enable = true;
#seahorse.enable = true; # managed by plasma6
seahorse.enable = true;
zsh.enable = true;
neovim.enable = true;
git.enable = true;
@ -371,11 +379,13 @@ environment.etc.crypttab = {
# started in user sessions.
# programs.mtr.enable = true;
programs.gnupg.agent = {
enable = false;
enableSSHSupport = false;
enable = true;
enableSSHSupport = true;
};
security.polkit.extraConfig = ''
security.polkit = {
enable = true;
extraConfig = ''
polkit.addRule(function(action, subject) {
if (
subject.isInGroup("users")
@ -391,23 +401,7 @@ security.polkit.extraConfig = ''
}
})
'';
systemd.user.services =
{
polkit-gnome-authentication-agent-1 = {
description = "polkit-gnome-authentication-agent-1";
wantedBy = [ "graphical-session.target" ];
wants = [ "graphical-session.target" ];
after = [ "graphical-session.target" ];
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
Restart = "on-failure";
RestartSec = 1;
TimeoutStopSec = 10;
};
};
};
};
system.userActivationScripts.linktosharedfolder.text = ''
if [[ ! -h "$XDG_MUSIC_DIR" ]]; then
@ -426,17 +420,6 @@ virtualisation.docker = {
virtualisation.libvirtd.enable = true;
catppuccin = {
enable = true;
accent = "blue";
sddm = {
enable = true;
font = "Fira Sans";
fontSize = "9";
loginBackground = true;
background = "/home/leon/Pictures/Wallpapers/current";
};
};
# Man pages
documentation.dev.enable = true;

232
flake.lock generated
View File

@ -1,57 +1,5 @@
{
"nodes": {
"catppuccin": {
"inputs": {
"catppuccin-v1_1": "catppuccin-v1_1",
"catppuccin-v1_2": "catppuccin-v1_2",
"home-manager": "home-manager",
"home-manager-stable": "home-manager-stable",
"nixpkgs": "nixpkgs",
"nixpkgs-stable": "nixpkgs-stable",
"nuscht-search": "nuscht-search"
},
"locked": {
"lastModified": 1736957255,
"narHash": "sha256-qZZ/K5XheRMjCNYgle90QESuys0PIFJNPJJswMJ0GEA=",
"owner": "catppuccin",
"repo": "nix",
"rev": "f06fcadf9a61b6581b392e72f230fa6783fe36e4",
"type": "github"
},
"original": {
"owner": "catppuccin",
"repo": "nix",
"type": "github"
}
},
"catppuccin-v1_1": {
"locked": {
"lastModified": 1734055249,
"narHash": "sha256-pCWJgwo77KD7EJpwynwKrWPZ//dwypHq2TfdzZWqK68=",
"rev": "7221d6ca17ac36ed20588e1c3a80177ac5843fa7",
"revCount": 326,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/catppuccin/nix/1.1.1/0193bdc0-b045-7eed-bbec-95611a8ecdf5/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/catppuccin/nix/1.1.%2A.tar.gz"
}
},
"catppuccin-v1_2": {
"locked": {
"lastModified": 1734734291,
"narHash": "sha256-CFX4diEQHKvZYjnhf7TLg20m3ge1O4vqgplsk/Kuaek=",
"rev": "1e4c3803b8da874ff75224ec8512cb173036bbd8",
"revCount": 344,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/catppuccin/nix/1.2.1/0193e646-1107-7f69-a402-f2a3988ecf1d/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/catppuccin/nix/1.2.%2A.tar.gz"
}
},
"crane": {
"locked": {
"lastModified": 1731098351,
@ -104,24 +52,6 @@
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
@ -144,77 +74,6 @@
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"catppuccin",
"nixpkgs"
]
},
"locked": {
"lastModified": 1736508663,
"narHash": "sha256-ZOaGwa+WnB7Zn3YXimqjmIugAnHePdXCmNu+AHkq808=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "2532b500c3ed2b8940e831039dcec5a5ea093afc",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"home-manager-stable": {
"inputs": {
"nixpkgs": [
"catppuccin",
"nixpkgs-stable"
]
},
"locked": {
"lastModified": 1736373539,
"narHash": "sha256-dinzAqCjenWDxuy+MqUQq0I4zUSfaCvN9rzuCmgMZJY=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "bd65bc3cde04c16755955630b344bc9e35272c56",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-24.11",
"repo": "home-manager",
"type": "github"
}
},
"ixx": {
"inputs": {
"flake-utils": [
"catppuccin",
"nuscht-search",
"flake-utils"
],
"nixpkgs": [
"catppuccin",
"nuscht-search",
"nixpkgs"
]
},
"locked": {
"lastModified": 1729958008,
"narHash": "sha256-EiOq8jF4Z/zQe0QYVc3+qSKxRK//CFHMB84aYrYGwEs=",
"owner": "NuschtOS",
"repo": "ixx",
"rev": "9fd01aad037f345350eab2cd45e1946cc66da4eb",
"type": "github"
},
"original": {
"owner": "NuschtOS",
"ref": "v0.0.6",
"repo": "ixx",
"type": "github"
}
},
"lanzaboote": {
"inputs": {
"crane": "crane",
@ -227,11 +86,11 @@
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1737299073,
"narHash": "sha256-hOydnO9trHDo3qURqLSDdmE/pHNWDzlhkmyZ/gcBX2s=",
"lastModified": 1734994463,
"narHash": "sha256-S9MgfQjNt4J3I7obdLOVY23h+Yl/hnyibwGfOl+1uOE=",
"owner": "nix-community",
"repo": "lanzaboote",
"rev": "64d20cb2afaad8b73f4e38de41d27fb30a782bb5",
"rev": "93e6f0d77548be8757c11ebda5c4235ef4f3bc67",
"type": "github"
},
"original": {
@ -242,37 +101,21 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1736012469,
"narHash": "sha256-/qlNWm/IEVVH7GfgAIyP6EsVZI6zjAx1cV5zNyrs+rI=",
"owner": "NixOS",
"lastModified": 1734649271,
"narHash": "sha256-4EVBRhOjMDuGtMaofAIqzJbg4Ql7Ai0PSeuVZTHjyKQ=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "8f3e1f807051e32d8c95cd12b9b421623850a34d",
"rev": "d70bd19e0a38ad4790d3913bf08fcbfc9eeca507",
"type": "github"
},
"original": {
"owner": "NixOS",
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1736061677,
"narHash": "sha256-DjkQPnkAfd7eB522PwnkGhOMuT9QVCZspDpJJYyOj60=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "cbd8ec4de4469333c82ff40d057350c30e9f7d36",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable_2": {
"locked": {
"lastModified": 1730741070,
"narHash": "sha256-edm8WG19kWozJ/GqyYx2VjW99EdhjKwbY3ZwdlPAAlo=",
@ -288,45 +131,6 @@
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1737062831,
"narHash": "sha256-Tbk1MZbtV2s5aG+iM99U8FqwxU/YNArMcWAv6clcsBc=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "5df43628fdf08d642be8ba5b3625a6c70731c19c",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nuscht-search": {
"inputs": {
"flake-utils": "flake-utils",
"ixx": "ixx",
"nixpkgs": [
"catppuccin",
"nixpkgs"
]
},
"locked": {
"lastModified": 1735854821,
"narHash": "sha256-Iv59gMDZajNfezTO0Fw6LHE7uKAShxbvMidmZREit7c=",
"owner": "NuschtOS",
"repo": "search",
"rev": "836908e3bddd837ae0f13e215dd48767aee355f0",
"type": "github"
},
"original": {
"owner": "NuschtOS",
"repo": "search",
"type": "github"
}
},
"pre-commit-hooks-nix": {
"inputs": {
"flake-compat": [
@ -338,7 +142,7 @@
"lanzaboote",
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable_2"
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1731363552,
@ -356,9 +160,8 @@
},
"root": {
"inputs": {
"catppuccin": "catppuccin",
"lanzaboote": "lanzaboote",
"nixpkgs": "nixpkgs_2"
"nixpkgs": "nixpkgs"
}
},
"rust-overlay": {
@ -381,21 +184,6 @@
"repo": "rust-overlay",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",

View File

@ -3,7 +3,6 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
catppuccin.url = "github:catppuccin/nix";
lanzaboote = {
url = "github:nix-community/lanzaboote";
@ -12,14 +11,13 @@
};
};
outputs = inputs@{ nixpkgs, lanzaboote, catppuccin, ... }: {
outputs = inputs@{ nixpkgs, lanzaboote, ... }: {
nixosConfigurations = {
Zuse1 = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./configuration.nix
lanzaboote.nixosModules.lanzaboote
catppuccin.nixosModules.catppuccin
({ pkgs, lib, ... }: {
environment.systemPackages = [
@ -40,6 +38,12 @@
})
];
};
Zuse2 = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./configuration.nix
];
};
};
};
}

View File

@ -8,39 +8,30 @@
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" "sr_mod" ];
boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "rtsx_pci_sdmmc" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/2ba31f86-69eb-448c-a224-7bb228803f95";
{ device = "/dev/disk/by-uuid/445ce2b5-db78-48b5-bde7-1aa3057bafae";
fsType = "btrfs";
};
boot.initrd.luks.devices."root".device = "/dev/disk/by-uuid/b9457757-75bc-494e-adaa-87d772b93cbd";
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/12CE-A600";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
fileSystems."/share" =
{ device = "/dev/disk/by-uuid/61d599a8-170a-4e97-abb3-cd0cb32edac2";
fsType = "btrfs";
};
boot.initrd.luks.devices."share".device = "/dev/disk/by-uuid/87aa812d-b5dd-44b7-bb4d-303d6ac7c11a";
fileSystems."/var/lib/docker/btrfs" =
{ device = "/var/lib/docker/btrfs";
fsType = "none";
options = [ "bind" ];
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/3139-13CA";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/a07a0f5b-012b-4b37-b052-8e2da8615413"; }
[ { device = "/dev/disk/by-uuid/4fc7c055-f053-4bfa-a609-58ad9444450f"; }
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
@ -50,6 +41,7 @@
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.docker0.useDHCP = lib.mkDefault true;
# networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;