several changes to home and nixos configs

This commit is contained in:
Thilo Billerbeck 2025-02-23 02:20:22 +01:00
parent ab894097d1
commit bc909ffbf4
12 changed files with 139 additions and 60 deletions

View file

@ -13,30 +13,21 @@
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [
"nvme"
"xhci_pci"
"ahci"
"usbhid"
"usb_storage"
"sd_mod"
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/7b55546f-7bd5-4b46-b5b1-1c81fdd8509c";
fsType = "ext4";
fileSystems."/" =
{ device = "/dev/disk/by-uuid/caa83e18-f2f2-46f9-8c27-0842c3051dc1";
fsType = "btrfs";
options = [ "subvol=@" ];
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/5A04-0844";
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/DADB-44A9";
fsType = "vfat";
options = [
"fmask=0077"
"dmask=0077"
];
options = [ "fmask=0077" "dmask=0077" ];
};
fileSystems = {
@ -47,10 +38,6 @@
};
};
swapDevices = [
{ device = "/dev/disk/by-uuid/da98aab4-f3a5-439b-aab5-b78624c219d3"; }
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
@ -60,5 +47,6 @@
# networking.interfaces.wlp5s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -33,6 +33,8 @@
};
*/
fonts.fontconfig.enable = true;
nix = {
package = lib.mkDefault pkgs.lix;
};

View file

@ -14,15 +14,13 @@
# Bootloader.
boot = {
loader = {
systemd-boot = {
enable = true;
# extraInstallCommands = ''
# ${pkgs.gnused}/bin/sed -i "/default/c\default @saved" /boot/loader/loader.conf
# '';
grub = {
efiSupport = true;
device = "nodev";
};
efi.canTouchEfiVariables = true;
};
# kernelPackages = pkgs.linuxPackages_latest;
kernelPackages = pkgs.linuxPackages_xanmod_latest;
binfmt.registrations.appimage = {
wrapInterpreterInShell = false;
interpreter = "${pkgs.appimage-run}/bin/appimage-run";
@ -31,6 +29,7 @@
mask = ''\xff\xff\xff\xff\x00\x00\x00\x00\xff\xff\xff'';
magicOrExtension = ''\x7fELF....AI\x02'';
};
plymouth.enable = true;
};
networking.hostName = "thilo-pc";
@ -44,15 +43,14 @@
layout = "us";
variant = "";
};
blueman.enable = true;
# AI
ollama = {
enable = true;
acceleration = "rocm";
};
open-webui = {
enable = true;
};
# ollama = {
# enable = true;
# acceleration = "rocm";
# };
# open-webui = {
# enable = true;
# };
};
programs.kdeconnect.enable = true;
@ -167,6 +165,7 @@
};
hardware.bluetooth.enable = true;
hardware.bluetooth.powerOnBoot = true;
programs.steam.gamescopeSession = {
enable = false;
@ -192,5 +191,16 @@
];
};
programs.gamescope.enable = true;
system.stateVersion = "24.11";
environment.systemPackages = with pkgs; [
kdePackages.skanpage
];
services.resolved = {
enable = true;
domains = [ "~." ];
};
}

View file

@ -22,10 +22,6 @@
url = "github:thilobillerbeck/muse-sounds-manager-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
w17 = {
url = "git+https://git.darmstadt.ccc.de/avocadoom/w17-cli.git";
inputs.nixpkgs.follows = "nixpkgs";
};
suyu.url = "github:Noodlez1232/suyu-flake";
nix-alien.url = "github:thiagokokada/nix-alien";
};
@ -36,12 +32,14 @@
"https://nix-community.cachix.org"
"https://nixpkgs-update.cachix.org"
"https://devenv.cachix.org"
"https://cache.garnix.io"
];
trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"nixpkgs-update.cachix.org-1:6y6Z2JdoL3APdu6/+Iy8eZX2ajf09e4EE9SnxSML1W8="
"devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw="
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
];
};
@ -50,7 +48,6 @@
nixpkgs,
home-manager,
nixgl,
w17,
...
}@inputs:
let

10
fonts.nix Normal file
View file

@ -0,0 +1,10 @@
{ pkgs, ... }:
{
fonts = with pkgs; [
nerd-fonts.jetbrains-mono
nerd-fonts.fira-code
nerd-fonts.fira-mono
inter
];
}

View file

@ -8,6 +8,7 @@
with lib;
let
fontfile = import ./../../fonts.nix { inherit pkgs; };
nixGL = config.lib.nixGL.wrap;
electronFlags = "--enable-features=UseOzonePlatform --ozone-platform=wayland --enable-wayland-ime --disable-gpu-shader-disk-cache -n";
in
@ -76,11 +77,8 @@ in
nil
nixd
unrar
inputs.w17.packages.x86_64-linux.default
# inputs.w17.packages.x86_64-linux.default
aichat
nerd-fonts.jetbrains-mono
nerd-fonts.fira-code
nerd-fonts.fira-mono
nix-output-monitor
nodePackages.pnpm
npm-check-updates
@ -102,11 +100,10 @@ in
++ (
if (!config.machine.isGeneric) then
[
toolbox
distrobox
]
else
[ ]
fontfile.fonts
)
++ (
if (config.machine.isGraphical) then
@ -167,6 +164,8 @@ in
audacity
signal-desktop
telegram-desktop
thunderbird
gearlever
]
else
[ ]

View file

@ -19,7 +19,7 @@ let
"bmnlcjabgnpnenekpadlanbbkooimhnj" # Honey
"kbfnbcaeplbcioakkpcpgfkobkghlhen" # Grammarly
];
isEnabled = if (config.machine.isGraphical && !config.machine.isGeneric) then true else false;
isEnabled = if (config.machine.isGraphical) then true else false;
dictionaries = with pkgs.hunspellDictsChromium; [
en_US
de_DE
@ -33,10 +33,12 @@ let
"--enable-features=WaylandWindowDecorations,VaapiVideoDecoder,VaapiVideoEncoder,VaapiVideoDecodeLinuxGL,WebRTCPipeWireCapturer"
];
extensions = map (eid: { id = eid; }) chromium_extension;
nixGL = config.lib.nixGL.wrap;
in
{
programs.brave = {
# inherit commandLineArgs;
enable = isEnabled;
package = if (!config.machine.isGeneric) then pkgs.brave else (nixGL pkgs.brave);
};
}

View file

@ -15,14 +15,15 @@ in
assume_yes = true;
ignore_failures = [ "git_repos" ];
no_retry = true;
pre_sudo = false;
cleanup = true;
pre_sudo = if (config.machine.isGeneric) then false else true;
cleanup = if (config.machine.isGeneric) then true else false;
skip_notify = true;
disable = [
"bun"
"tldr"
"flutter"
"nix"
"uv"
];
};
git.repos = [ configPath ];
@ -32,10 +33,19 @@ in
pre_commands = {
flakeUpgrade = "cd ${configPath} && ${pkgs.nixVersions.latest}/bin/nix flake update --commit-lock-file --verbose --repair";
};
post_commands = {
nixCollectGarbage = "nix-collect-garbage -d";
post_commands =
{
dockerPrune = "docker system prune -f";
};
}
// (
if (config.machine.isGeneric) then
{
nixCollectGarbage = "nix-collect-garbage -d";
}
else
{
}
);
};
};
}

View file

@ -3,5 +3,48 @@
{
programs.zed-editor = {
enable = if (config.machine.isGraphical && !config.machine.isGeneric) then true else false;
extensions = [
"xy-zed"
"nix"
"material-icon-theme"
];
userSettings = {
telemetry = {
metrics = false;
};
theme = {
mode = "system";
dark = "XY-Zed";
light = "XY-Zed";
};
ui_font_family = "JetBrainsMono Nerd Font";
ui_font_size = 16;
buffer_font_family = "JetBrainsMono Nerd Font";
buffer_font_size = 18;
restore_on_startup = "none";
auto_update = false;
icon_theme = "Material Icon Theme";
hour_format = "hour24";
tabs = {
file_icons = true;
git_status = true;
};
indent_guides = {
enable = true;
};
languages = {
Nix = {
formatter = {
external = {
command = "nixfmt";
arguments = [
"--quiet"
"--"
];
};
};
};
};
};
};
}

View file

@ -5,6 +5,7 @@
enable = true;
autosuggestion.enable = true;
enableCompletion = true;
completionInit = "autoload -U compinit && compinit -i";
enableVteIntegration = true;
syntaxHighlighting.enable = true;
shellAliases = {

View file

@ -17,12 +17,14 @@
"https://nix-community.cachix.org"
"https://nixpkgs-update.cachix.org"
"https://devenv.cachix.org"
"https://cache.garnix.io"
];
trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"nixpkgs-update.cachix.org-1:6y6Z2JdoL3APdu6/+Iy8eZX2ajf09e4EE9SnxSML1W8="
"devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw="
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
];
};
};

View file

@ -6,6 +6,9 @@
...
}:
let
fontfile = import ./../fonts.nix { inherit pkgs; };
in
{
imports = [ ./../nix.nix ];
@ -71,13 +74,17 @@
virtualisation = {
docker.enable = true;
podman.enable = false;
podman.enable = true;
};
environment.sessionVariables.NIXOS_OZONE_WL = "1";
programs = {
steam.enable = true;
steam = {
enable = true;
localNetworkGameTransfers.openFirewall = true;
protontricks.enable = true;
};
zsh.enable = true;
adb.enable = true;
noisetorch.enable = false;
@ -107,8 +114,8 @@
};
flatpak.enable = true;
avahi = {
enable = true;
nssmdns4 = true;
# enable = true;
# nssmdns4 = true;
};
mullvad-vpn = {
enable = true;
@ -119,6 +126,7 @@
packages = [ pkgs.dconf ];
};
bamf.enable = true;
fwupd.enable = true;
};
hardware = {
@ -132,4 +140,11 @@
security.rtkit.enable = true;
time.hardwareClockInLocalTime = true;
fonts.packages =
fontfile.fonts
++ (with pkgs; [
noto-fonts
]);
fonts.enableDefaultPackages = true;
}