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,31 +13,22 @@
(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = [ boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
"nvme"
"xhci_pci"
"ahci"
"usbhid"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ]; boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = { fileSystems."/" =
device = "/dev/disk/by-uuid/7b55546f-7bd5-4b46-b5b1-1c81fdd8509c"; { device = "/dev/disk/by-uuid/caa83e18-f2f2-46f9-8c27-0842c3051dc1";
fsType = "ext4"; fsType = "btrfs";
}; options = [ "subvol=@" ];
};
fileSystems."/boot" = { fileSystems."/boot" =
device = "/dev/disk/by-uuid/5A04-0844"; { device = "/dev/disk/by-uuid/DADB-44A9";
fsType = "vfat"; fsType = "vfat";
options = [ options = [ "fmask=0077" "dmask=0077" ];
"fmask=0077" };
"dmask=0077"
];
};
fileSystems = { fileSystems = {
"/data" = { "/data" = {
@ -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 # 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 # (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 # 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; # networking.interfaces.wlp5s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
} }

View file

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

View file

@ -14,15 +14,13 @@
# Bootloader. # Bootloader.
boot = { boot = {
loader = { loader = {
systemd-boot = { grub = {
enable = true; efiSupport = true;
# extraInstallCommands = '' device = "nodev";
# ${pkgs.gnused}/bin/sed -i "/default/c\default @saved" /boot/loader/loader.conf
# '';
}; };
efi.canTouchEfiVariables = true; efi.canTouchEfiVariables = true;
}; };
# kernelPackages = pkgs.linuxPackages_latest; kernelPackages = pkgs.linuxPackages_xanmod_latest;
binfmt.registrations.appimage = { binfmt.registrations.appimage = {
wrapInterpreterInShell = false; wrapInterpreterInShell = false;
interpreter = "${pkgs.appimage-run}/bin/appimage-run"; interpreter = "${pkgs.appimage-run}/bin/appimage-run";
@ -31,6 +29,7 @@
mask = ''\xff\xff\xff\xff\x00\x00\x00\x00\xff\xff\xff''; mask = ''\xff\xff\xff\xff\x00\x00\x00\x00\xff\xff\xff'';
magicOrExtension = ''\x7fELF....AI\x02''; magicOrExtension = ''\x7fELF....AI\x02'';
}; };
plymouth.enable = true;
}; };
networking.hostName = "thilo-pc"; networking.hostName = "thilo-pc";
@ -44,15 +43,14 @@
layout = "us"; layout = "us";
variant = ""; variant = "";
}; };
blueman.enable = true;
# AI # AI
ollama = { # ollama = {
enable = true; # enable = true;
acceleration = "rocm"; # acceleration = "rocm";
}; # };
open-webui = { # open-webui = {
enable = true; # enable = true;
}; # };
}; };
programs.kdeconnect.enable = true; programs.kdeconnect.enable = true;
@ -167,6 +165,7 @@
}; };
hardware.bluetooth.enable = true; hardware.bluetooth.enable = true;
hardware.bluetooth.powerOnBoot = true;
programs.steam.gamescopeSession = { programs.steam.gamescopeSession = {
enable = false; enable = false;
@ -192,5 +191,16 @@
]; ];
}; };
programs.gamescope.enable = true;
system.stateVersion = "24.11"; 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"; url = "github:thilobillerbeck/muse-sounds-manager-nix";
inputs.nixpkgs.follows = "nixpkgs"; 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"; suyu.url = "github:Noodlez1232/suyu-flake";
nix-alien.url = "github:thiagokokada/nix-alien"; nix-alien.url = "github:thiagokokada/nix-alien";
}; };
@ -36,12 +32,14 @@
"https://nix-community.cachix.org" "https://nix-community.cachix.org"
"https://nixpkgs-update.cachix.org" "https://nixpkgs-update.cachix.org"
"https://devenv.cachix.org" "https://devenv.cachix.org"
"https://cache.garnix.io"
]; ];
trusted-public-keys = [ trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"nixpkgs-update.cachix.org-1:6y6Z2JdoL3APdu6/+Iy8eZX2ajf09e4EE9SnxSML1W8=" "nixpkgs-update.cachix.org-1:6y6Z2JdoL3APdu6/+Iy8eZX2ajf09e4EE9SnxSML1W8="
"devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=" "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw="
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
]; ];
}; };
@ -50,7 +48,6 @@
nixpkgs, nixpkgs,
home-manager, home-manager,
nixgl, nixgl,
w17,
... ...
}@inputs: }@inputs:
let 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; with lib;
let let
fontfile = import ./../../fonts.nix { inherit pkgs; };
nixGL = config.lib.nixGL.wrap; nixGL = config.lib.nixGL.wrap;
electronFlags = "--enable-features=UseOzonePlatform --ozone-platform=wayland --enable-wayland-ime --disable-gpu-shader-disk-cache -n"; electronFlags = "--enable-features=UseOzonePlatform --ozone-platform=wayland --enable-wayland-ime --disable-gpu-shader-disk-cache -n";
in in
@ -76,11 +77,8 @@ in
nil nil
nixd nixd
unrar unrar
inputs.w17.packages.x86_64-linux.default # inputs.w17.packages.x86_64-linux.default
aichat aichat
nerd-fonts.jetbrains-mono
nerd-fonts.fira-code
nerd-fonts.fira-mono
nix-output-monitor nix-output-monitor
nodePackages.pnpm nodePackages.pnpm
npm-check-updates npm-check-updates
@ -102,11 +100,10 @@ in
++ ( ++ (
if (!config.machine.isGeneric) then if (!config.machine.isGeneric) then
[ [
toolbox
distrobox distrobox
] ]
else else
[ ] fontfile.fonts
) )
++ ( ++ (
if (config.machine.isGraphical) then if (config.machine.isGraphical) then
@ -167,6 +164,8 @@ in
audacity audacity
signal-desktop signal-desktop
telegram-desktop telegram-desktop
thunderbird
gearlever
] ]
else else
[ ] [ ]

View file

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

View file

@ -15,14 +15,15 @@ in
assume_yes = true; assume_yes = true;
ignore_failures = [ "git_repos" ]; ignore_failures = [ "git_repos" ];
no_retry = true; no_retry = true;
pre_sudo = false; pre_sudo = if (config.machine.isGeneric) then false else true;
cleanup = true; cleanup = if (config.machine.isGeneric) then true else false;
skip_notify = true; skip_notify = true;
disable = [ disable = [
"bun" "bun"
"tldr" "tldr"
"flutter" "flutter"
"nix" "nix"
"uv"
]; ];
}; };
git.repos = [ configPath ]; git.repos = [ configPath ];
@ -32,10 +33,19 @@ in
pre_commands = { pre_commands = {
flakeUpgrade = "cd ${configPath} && ${pkgs.nixVersions.latest}/bin/nix flake update --commit-lock-file --verbose --repair"; flakeUpgrade = "cd ${configPath} && ${pkgs.nixVersions.latest}/bin/nix flake update --commit-lock-file --verbose --repair";
}; };
post_commands = { post_commands =
nixCollectGarbage = "nix-collect-garbage -d"; {
dockerPrune = "docker system prune -f"; 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 = { programs.zed-editor = {
enable = if (config.machine.isGraphical && !config.machine.isGeneric) then true else false; 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; enable = true;
autosuggestion.enable = true; autosuggestion.enable = true;
enableCompletion = true; enableCompletion = true;
completionInit = "autoload -U compinit && compinit -i";
enableVteIntegration = true; enableVteIntegration = true;
syntaxHighlighting.enable = true; syntaxHighlighting.enable = true;
shellAliases = { shellAliases = {

View file

@ -17,12 +17,14 @@
"https://nix-community.cachix.org" "https://nix-community.cachix.org"
"https://nixpkgs-update.cachix.org" "https://nixpkgs-update.cachix.org"
"https://devenv.cachix.org" "https://devenv.cachix.org"
"https://cache.garnix.io"
]; ];
trusted-public-keys = [ trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"nixpkgs-update.cachix.org-1:6y6Z2JdoL3APdu6/+Iy8eZX2ajf09e4EE9SnxSML1W8=" "nixpkgs-update.cachix.org-1:6y6Z2JdoL3APdu6/+Iy8eZX2ajf09e4EE9SnxSML1W8="
"devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=" "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 ]; imports = [ ./../nix.nix ];
@ -71,13 +74,17 @@
virtualisation = { virtualisation = {
docker.enable = true; docker.enable = true;
podman.enable = false; podman.enable = true;
}; };
environment.sessionVariables.NIXOS_OZONE_WL = "1"; environment.sessionVariables.NIXOS_OZONE_WL = "1";
programs = { programs = {
steam.enable = true; steam = {
enable = true;
localNetworkGameTransfers.openFirewall = true;
protontricks.enable = true;
};
zsh.enable = true; zsh.enable = true;
adb.enable = true; adb.enable = true;
noisetorch.enable = false; noisetorch.enable = false;
@ -107,8 +114,8 @@
}; };
flatpak.enable = true; flatpak.enable = true;
avahi = { avahi = {
enable = true; # enable = true;
nssmdns4 = true; # nssmdns4 = true;
}; };
mullvad-vpn = { mullvad-vpn = {
enable = true; enable = true;
@ -119,6 +126,7 @@
packages = [ pkgs.dconf ]; packages = [ pkgs.dconf ];
}; };
bamf.enable = true; bamf.enable = true;
fwupd.enable = true;
}; };
hardware = { hardware = {
@ -132,4 +140,11 @@
security.rtkit.enable = true; security.rtkit.enable = true;
time.hardwareClockInLocalTime = true; time.hardwareClockInLocalTime = true;
fonts.packages =
fontfile.fonts
++ (with pkgs; [
noto-fonts
]);
fonts.enableDefaultPackages = true;
} }