code: nixpkgs-fmt to format code

This commit is contained in:
Mateusz Słodkowicz 2024-03-11 16:19:31 +01:00
parent 8ecb892244
commit 04ad6ac1cd
Signed by: materus
GPG Key ID: 28D140BCA60B4FD1
46 changed files with 544 additions and 524 deletions

View File

@ -14,7 +14,7 @@ let
value = let host = builtins.elemAt hosts i; in value = let host = builtins.elemAt hosts i; in
materusFlake.nixosConfigurations.${host}.materusCfg.hm.lib.homeManagerConfiguration { materusFlake.nixosConfigurations.${host}.materusCfg.hm.lib.homeManagerConfiguration {
pkgs = materusFlake.nixosConfigurations.${host}.pkgs; pkgs = materusFlake.nixosConfigurations.${host}.pkgs;
extraSpecialArgs = { materusCfg = materusFlake.nixosConfigurations.${host}.materusCfg // {homePath = materusFlake.selfPath + "/configurations/home/${username}"; isHm = true;}; }; extraSpecialArgs = { materusCfg = materusFlake.nixosConfigurations.${host}.materusCfg // { homePath = materusFlake.selfPath + "/configurations/home/${username}"; isHm = true; }; };
modules = [ modules = [
./${username} ./${username}
../host/${host}/extraHome.nix ../host/${host}/extraHome.nix
@ -30,17 +30,19 @@ let
(builtins.listToAttrs (_for 0)) // { (builtins.listToAttrs (_for 0)) // {
#Make generic x86_64-linux user profile "username" #Make generic x86_64-linux user profile "username"
${username} = ${username} =
let materusCfg = { let
stable = false; materusCfg = {
inherit materusFlake; stable = false;
host = "Generic"; inherit materusFlake;
hm = inputs.configInputs.home-manager; host = "Generic";
nixerus = inputs.configInputs.nixerus; hm = inputs.configInputs.home-manager;
configInputs = inputs.configInputs; nixerus = inputs.configInputs.nixerus;
path = materusFlake.selfPath; configInputs = inputs.configInputs;
homePath = materusFlake.selfPath + "/configurations/home/${username}"; path = materusFlake.selfPath;
isHm = true; homePath = materusFlake.selfPath + "/configurations/home/${username}";
}; in isHm = true;
};
in
inputs.configInputs.home-manager.lib.homeManagerConfiguration { inputs.configInputs.home-manager.lib.homeManagerConfiguration {
pkgs = import inputs.nixpkgs { system = "x86_64-linux"; config = { allowUnfree = true; }; }; pkgs = import inputs.nixpkgs { system = "x86_64-linux"; config = { allowUnfree = true; }; };
extraSpecialArgs = { inherit materusCfg; }; extraSpecialArgs = { inherit materusCfg; };

View File

@ -1,7 +1,7 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
{ {
home.username = "materus"; home.username = "materus";
home.packages = [ ]; home.packages = [ ];
programs.git.signing.key = lib.mkDefault "28D140BCA60B4FD1"; programs.git.signing.key = lib.mkDefault "28D140BCA60B4FD1";

View File

@ -136,8 +136,8 @@ in
services.fstrim = { services.fstrim = {
enable = true; enable = true;
interval = "weekly"; interval = "weekly";
}; };
# Configure network proxy if necessary # Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/"; # networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
@ -163,12 +163,12 @@ in
hardware.opengl.enable = true; hardware.opengl.enable = true;
hardware.opengl.driSupport32Bit = true; hardware.opengl.driSupport32Bit = true;
/* hardware.opengl.extraPackages = with pkgs; [ /* hardware.opengl.extraPackages = with pkgs; [
vaapiVdpau vaapiVdpau
nvidia-vaapi-driver nvidia-vaapi-driver
libvdpau-va-gl libvdpau-va-gl
]; ];
hardware.opengl.extraPackages32 = with pkgs.pkgsi686Linux; [ hardware.opengl.extraPackages32 = with pkgs.pkgsi686Linux; [
vaapiVdpau vaapiVdpau
nvidia-vaapi-driver nvidia-vaapi-driver
libvdpau-va-gl libvdpau-va-gl
@ -177,26 +177,26 @@ in
#hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable; #hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
/* /*
#GNOME #GNOME
services.xserver.displayManager.gdm.wayland = false; services.xserver.displayManager.gdm.wayland = false;
services.xserver.displayManager.gdm.enable = true; services.xserver.displayManager.gdm.enable = true;
services.xserver.desktopManager.gnome.enable = true; services.xserver.desktopManager.gnome.enable = true;
security.pam.services.gdm.enableGnomeKeyring = true; security.pam.services.gdm.enableGnomeKeyring = true;
services.gnome.rygel.enable = true; services.gnome.rygel.enable = true;
services.gnome.sushi.enable = true; services.gnome.sushi.enable = true;
services.gnome.tracker.enable = true; services.gnome.tracker.enable = true;
services.gnome.gnome-online-accounts.enable = true; services.gnome.gnome-online-accounts.enable = true;
services.gnome.gnome-browser-connector.enable = true; services.gnome.gnome-browser-connector.enable = true;
services.gnome.gnome-settings-daemon.enable = true; services.gnome.gnome-settings-daemon.enable = true;
services.gnome.core-utilities.enable = true; services.gnome.core-utilities.enable = true;
services.gnome.core-shell.enable = true; services.gnome.core-shell.enable = true;
services.gnome.core-os-services.enable = true; services.gnome.core-os-services.enable = true;
programs.gnome-terminal.enable = true; programs.gnome-terminal.enable = true;
services.gnome.gnome-keyring.enable = true; services.gnome.gnome-keyring.enable = true;
services.udev.packages = with pkgs; [ gnome.gnome-settings-daemon gnome2.GConf ]; services.udev.packages = with pkgs; [ gnome.gnome-settings-daemon gnome2.GConf ];
*/ */
@ -215,7 +215,7 @@ in
# Enable the Plasma 5 Desktop Environment. # Enable the Plasma 5 Desktop Environment.
security.pam.services.sddm.enableKwallet = true; security.pam.services.sddm.enableKwallet = true;
@ -628,20 +628,20 @@ in
binutils binutils
/* /*
gnome3.adwaita-icon-theme gnome3.adwaita-icon-theme
gnome3.gnome-tweaks gnome3.gnome-tweaks
gnome3.gnome-color-manager gnome3.gnome-color-manager
gnome3.gnome-shell-extensions gnome3.gnome-shell-extensions
gnomeExtensions.appindicator gnomeExtensions.appindicator
gnomeExtensions.desktop-clock gnomeExtensions.desktop-clock
gnomeExtensions.gtk4-desktop-icons-ng-ding gnomeExtensions.gtk4-desktop-icons-ng-ding
gnomeExtensions.compiz-windows-effect gnomeExtensions.compiz-windows-effect
gnomeExtensions.burn-my-windows gnomeExtensions.burn-my-windows
gnomeExtensions.user-themes gnomeExtensions.user-themes
gnomeExtensions.gsconnect gnomeExtensions.gsconnect
gnomeExtensions.dash-to-panel gnomeExtensions.dash-to-panel
gnomeExtensions.dash-to-dock gnomeExtensions.dash-to-dock
*/ */
@ -665,7 +665,7 @@ in
fonts.fontconfig.enable = true; fonts.fontconfig.enable = true;
fonts.fontconfig.cache32Bit = true; fonts.fontconfig.cache32Bit = true;
fonts.fontconfig.defaultFonts.sansSerif = [ "Noto Sans" "DejaVu Sans" "WenQuanYi Zen Hei" "Noto Color Emoji" ]; fonts.fontconfig.defaultFonts.sansSerif = [ "Noto Sans" "DejaVu Sans" "WenQuanYi Zen Hei" "Noto Color Emoji" ];
fonts.fontconfig.defaultFonts.serif = [ "Noto Serif" "DejaVu Serif" "WenQuanYi Zen Hei" "Noto Color Emoji"]; fonts.fontconfig.defaultFonts.serif = [ "Noto Serif" "DejaVu Serif" "WenQuanYi Zen Hei" "Noto Color Emoji" ];
fonts.fontconfig.defaultFonts.emoji = [ "Noto Color Emoji" "OpenMoji Color" ]; fonts.fontconfig.defaultFonts.emoji = [ "Noto Color Emoji" "OpenMoji Color" ];
fonts.fontconfig.defaultFonts.monospace = [ "FiraCode Nerd Font Mono" "Noto Sans Mono" "WenQuanYi Zen Hei Mono" ]; fonts.fontconfig.defaultFonts.monospace = [ "FiraCode Nerd Font Mono" "Noto Sans Mono" "WenQuanYi Zen Hei Mono" ];
@ -753,8 +753,8 @@ in
}; };
# Open ports in the firewall. # Open ports in the firewall.
networking.firewall.allowedTCPPorts = [ 24800 5900 5357 4656]; networking.firewall.allowedTCPPorts = [ 24800 5900 5357 4656 ];
networking.firewall.allowedUDPPorts = [ 24800 5900 3702 4656]; networking.firewall.allowedUDPPorts = [ 24800 5900 3702 4656 ];
# Or disable the firewall altogether. # Or disable the firewall altogether.
networking.firewall.enable = true; networking.firewall.enable = true;

View File

@ -4,14 +4,14 @@
home.homeDirectory = "/home/materus"; home.homeDirectory = "/home/materus";
programs.git = { programs.git = {
userEmail = "materus@podkos.pl"; userEmail = "materus@podkos.pl";
userName = "materus"; userName = "materus";
signing.signByDefault = true; signing.signByDefault = true;
signing.key = "${materusArg.cfg.path}/extraFiles/keys/ssh/materus.pub"; signing.key = "${materusArg.cfg.path}/extraFiles/keys/ssh/materus.pub";
extraConfig = { extraConfig = {
commit.gpgsign = true; commit.gpgsign = true;
gpg.format = "ssh"; gpg.format = "ssh";
}; };
}; };
materus.profile = { materus.profile = {
fonts.enable = lib.mkDefault true; fonts.enable = lib.mkDefault true;
@ -21,7 +21,7 @@
enableTerminalExtra = lib.mkDefault true; enableTerminalExtra = lib.mkDefault true;
enableNixDevel = lib.mkDefault true; enableNixDevel = lib.mkDefault true;
editor.code.fhs.enable = true; editor.code.fhs.enable = true;
editor.code.fhs.packages = (ps: with ps; let llvmpkgs = llvmPackages_16; in[ editor.code.fhs.packages = (ps: with ps; let llvmpkgs = llvmPackages_16; in [
llvmpkgs.clang llvmpkgs.clang
llvmpkgs.llvm llvmpkgs.llvm
llvmpkgs.bintools llvmpkgs.bintools
@ -36,7 +36,7 @@
cmake cmake
gnumake gnumake
ninja ninja
binutils binutils
coreutils coreutils
util-linux util-linux
@ -70,7 +70,7 @@
]); ]);
editor.emacs.enable = false; editor.emacs.enable = false;
}; };
home.packages = [ home.packages = [

View File

@ -5,14 +5,15 @@
{ {
imports = imports =
[ (modulesPath + "/installer/scan/not-detected.nix") [
(modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
boot.kernel.sysctl = {"vm.swappiness" = 10;}; boot.kernel.sysctl = { "vm.swappiness" = 10; };
swapDevices = [ swapDevices = [
{ {
device = "/swapfile"; device = "/swapfile";
@ -20,42 +21,49 @@
} }
]; ];
fileSystems."/" = fileSystems."/" =
{ device = "/dev/disk/by-label/NixOS_Root"; {
device = "/dev/disk/by-label/NixOS_Root";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=@" "noatime" "ssd" "space_cache=v2" ]; options = [ "subvol=@" "noatime" "ssd" "space_cache=v2" ];
}; };
fileSystems."/nix" = fileSystems."/nix" =
{ device = "/dev/disk/by-label/NixOS_Root"; {
device = "/dev/disk/by-label/NixOS_Root";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=@nix" "noatime" "compress=zstd" "ssd" "space_cache=v2" ]; options = [ "subvol=@nix" "noatime" "compress=zstd" "ssd" "space_cache=v2" ];
}; };
fileSystems."/materus" = fileSystems."/materus" =
{ device = "/dev/disk/by-label/NixOS_Root"; {
device = "/dev/disk/by-label/NixOS_Root";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=@materus" "noatime" "compress=zstd" "ssd" "space_cache=v2"]; options = [ "subvol=@materus" "noatime" "compress=zstd" "ssd" "space_cache=v2" ];
}; };
fileSystems."/etc/nixos" = fileSystems."/etc/nixos" =
{ device = "/materus/config/nixos-config"; {
device = "/materus/config/nixos-config";
fsType = "none"; fsType = "none";
options = [ "bind" ]; options = [ "bind" ];
}; };
fileSystems."/home" = fileSystems."/home" =
{ device = "/dev/disk/by-label/NixOS_Home"; {
device = "/dev/disk/by-label/NixOS_Home";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=@home" "nossd" "noatime" "compress=zstd" "space_cache=v2" "autodefrag" ]; options = [ "subvol=@home" "nossd" "noatime" "compress=zstd" "space_cache=v2" "autodefrag" ];
}; };
fileSystems."/materus/data" = fileSystems."/materus/data" =
{ device = "/dev/disk/by-label/NixOS_Home"; {
device = "/dev/disk/by-label/NixOS_Home";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=@data" "nossd" "noatime" "compress=zstd" "space_cache=v2" "autodefrag" ]; options = [ "subvol=@data" "nossd" "noatime" "compress=zstd" "space_cache=v2" "autodefrag" ];
}; };
fileSystems."/boot" = fileSystems."/boot" =
{ device = "/dev/disk/by-label/NixOS_Root"; {
device = "/dev/disk/by-label/NixOS_Root";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=@boot" "ssd" ]; options = [ "subvol=@boot" "ssd" ];
}; };
@ -63,7 +71,8 @@
fileSystems."/boot/efi" = fileSystems."/boot/efi" =
{ device = "/dev/disk/by-label/NixOS_EFI"; {
device = "/dev/disk/by-label/NixOS_EFI";
fsType = "vfat"; fsType = "vfat";
}; };

View File

@ -115,7 +115,7 @@
isNormalUser = true; isNormalUser = true;
description = "Mateusz Słodkowicz"; description = "Mateusz Słodkowicz";
extraGroups = [ "networkmanager" "wheel" ]; extraGroups = [ "networkmanager" "wheel" ];
openssh.authorizedKeys.keyFiles = [ ("${materusArg.cfg.path}" + "/extraFiles/keys/ssh/materus.pub") ]; openssh.authorizedKeys.keyFiles = [ ("${materusArg.cfg.path}" + "/extraFiles/keys/ssh/materus.pub") ];
packages = with pkgs; [ packages = with pkgs; [
kate kate
]; ];
@ -135,7 +135,7 @@
lshw lshw
steamcmd steamcmd
distrobox distrobox
config.materus.profile.packages.firefox config.materus.profile.packages.firefox
config.programs.java.package config.programs.java.package

View File

@ -20,7 +20,7 @@
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=@" "noatime" "ssd" "space_cache=v2" "compress=zstd" ]; options = [ "subvol=@" "noatime" "ssd" "space_cache=v2" "compress=zstd" ];
}; };
fileSystems."/nix" = fileSystems."/nix" =
{ {
device = "/dev/disk/by-label/NixOS_Root_Laptop"; device = "/dev/disk/by-label/NixOS_Root_Laptop";
fsType = "btrfs"; fsType = "btrfs";

View File

@ -14,34 +14,35 @@
}; };
hardware.pulseaudio.enable = false; hardware.pulseaudio.enable = false;
environment.sessionVariables = let environment.sessionVariables =
makePluginPath = format: let
makePluginPath = format:
(lib.makeSearchPath format [ (lib.makeSearchPath format [
"$HOME/.nix-profile/lib" "$HOME/.nix-profile/lib"
"/run/current-system/sw/lib" "/run/current-system/sw/lib"
"/etc/profiles/per-user/$USER/lib" "/etc/profiles/per-user/$USER/lib"
]) ])
+ ":$HOME/.${format}"; + ":$HOME/.${format}";
in in
{ {
ALSOFT_DRIVERS = "pulse"; ALSOFT_DRIVERS = "pulse";
DSSI_PATH = makePluginPath "dssi"; DSSI_PATH = makePluginPath "dssi";
LADSPA_PATH = makePluginPath "ladspa"; LADSPA_PATH = makePluginPath "ladspa";
LV2_PATH = makePluginPath "lv2"; LV2_PATH = makePluginPath "lv2";
LXVST_PATH = makePluginPath "lxvst"; LXVST_PATH = makePluginPath "lxvst";
VST_PATH = makePluginPath "vst"; VST_PATH = makePluginPath "vst";
VST3_PATH = makePluginPath "vst3"; VST3_PATH = makePluginPath "vst3";
}; };
services.udev = { services.udev = {
extraRules = '' extraRules = ''
KERNEL=="rtc0", GROUP="audio" KERNEL=="rtc0", GROUP="audio"
KERNEL=="hpet", GROUP="audio" KERNEL=="hpet", GROUP="audio"
''; '';
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
openal openal
pulseaudio pulseaudio
@ -59,4 +60,4 @@
]; ];
} }

View File

@ -15,7 +15,7 @@
./audio.nix ./audio.nix
]; ];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
system.copySystemConfiguration = false; system.copySystemConfiguration = false;

View File

@ -30,7 +30,7 @@
nixpkgs-fmt nixpkgs-fmt
cmake cmake
gnumake gnumake
ninja ninja
binutils binutils
coreutils coreutils
util-linux util-linux
@ -54,12 +54,12 @@
libGLU.dev libGLU.dev
vulkan-loader.dev vulkan-loader.dev
xorg.xorgproto xorg.xorgproto
xorg.libX11.dev xorg.libX11.dev
xorg.libXrandr.dev xorg.libXrandr.dev
xorg.libXrender.dev xorg.libXrender.dev
rustup rustup
freetype.dev freetype.dev
fpc fpc
openjdk21 openjdk21
bison bison
@ -71,7 +71,7 @@
]); ]);
editor.emacs.enable = false; editor.emacs.enable = false;
}; };
home.packages = [ home.packages = [

View File

@ -1,5 +1,4 @@
{ config, pkgs, lib, ... }:
{ config, pkgs, lib,... }:
{ {
@ -19,27 +18,27 @@
services.gnome.core-os-services.enable = true; services.gnome.core-os-services.enable = true;
programs.gnupg.agent.pinentryFlavor = "gnome3"; programs.gnupg.agent.pinentryFlavor = "gnome3";
programs.gnome-terminal.enable = true; programs.gnome-terminal.enable = true;
services.udev.packages = with pkgs; [ gnome.gnome-settings-daemon ]; services.udev.packages = with pkgs; [ gnome.gnome-settings-daemon ];
services.dbus.packages = with pkgs; [ gnome2.GConf ]; services.dbus.packages = with pkgs; [ gnome2.GConf ];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
gnome3.adwaita-icon-theme gnome3.adwaita-icon-theme
gnome3.gnome-tweaks gnome3.gnome-tweaks
gnome3.gnome-color-manager gnome3.gnome-color-manager
gnome3.gnome-shell-extensions gnome3.gnome-shell-extensions
gnomeExtensions.appindicator
gnomeExtensions.desktop-clock
gnomeExtensions.gtk4-desktop-icons-ng-ding
gnomeExtensions.compiz-windows-effect
gnomeExtensions.burn-my-windows
gnomeExtensions.user-themes
gnomeExtensions.gsconnect
gnomeExtensions.appindicator
gnomeExtensions.desktop-clock
gnomeExtensions.gtk4-desktop-icons-ng-ding
gnomeExtensions.compiz-windows-effect
gnomeExtensions.burn-my-windows
gnomeExtensions.user-themes
gnomeExtensions.gsconnect
]; ];
} }

View File

@ -29,7 +29,7 @@ in
services.xserver.displayManager.sddm.settings = { services.xserver.displayManager.sddm.settings = {
General = { General = {
#DisplayServer = "wayland"; #DisplayServer = "wayland";
InputMethod=""; InputMethod = "";
}; };
Theme = { Theme = {
CursorTheme = "breeze_cursors"; CursorTheme = "breeze_cursors";
@ -37,25 +37,25 @@ in
}; };
Wayland = { Wayland = {
#CompositorCommand = "${pkgs.weston}/bin/weston -c ${westonSddm}"; #CompositorCommand = "${pkgs.weston}/bin/weston -c ${westonSddm}";
}; };
}; };
services.xserver.desktopManager.plasma6.enable = true; services.xserver.desktopManager.plasma6.enable = true;
services.xserver.desktopManager.plasma6.enableQt5Integration = true; services.xserver.desktopManager.plasma6.enableQt5Integration = true;
programs.gnupg.agent.pinentryFlavor = "gnome3"; programs.gnupg.agent.pinentryFlavor = "gnome3";
environment.plasma6.excludePackages = with pkgs.kdePackages; [ kwallet kwalletmanager kwallet-pam ]; environment.plasma6.excludePackages = with pkgs.kdePackages; [ kwallet kwalletmanager kwallet-pam ];
environment.variables = { environment.variables = {
# Old fix for black cursor on amdgpu, seems to work fine now # Old fix for black cursor on amdgpu, seems to work fine now
#KWIN_DRM_NO_AMS = "1"; #KWIN_DRM_NO_AMS = "1";
#Fix for amdgpu crashes #Fix for amdgpu crashes
KWIN_DRM_USE_MODIFIERS="0"; KWIN_DRM_USE_MODIFIERS = "0";
KWIN_DRM_NO_DIRECT_SCANOUT="1"; KWIN_DRM_NO_DIRECT_SCANOUT = "1";
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
]; ];
materus.profile.steam.extraPkgs = [pkgs.kdePackages.breeze pkgs.kdePackages.breeze-gtk pkgs.kdePackages.dolphin]; materus.profile.steam.extraPkgs = [ pkgs.kdePackages.breeze pkgs.kdePackages.breeze-gtk pkgs.kdePackages.dolphin ];
} }

View File

@ -6,8 +6,8 @@
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
#networking.networkmanager.wifi.backend = "iwd"; #networking.networkmanager.wifi.backend = "iwd";
networking.firewall.enable = true; networking.firewall.enable = true;
networking.firewall.allowedTCPPorts = [ 24800 5900 5357 4656 8080 9943 9944]; networking.firewall.allowedTCPPorts = [ 24800 5900 5357 4656 8080 9943 9944 ];
networking.firewall.allowedUDPPorts = [ 24800 5900 3702 4656 6000 9943 9944]; networking.firewall.allowedUDPPorts = [ 24800 5900 3702 4656 6000 9943 9944 ];
#Fix warning #Fix warning
networking.networkmanager.extraConfig = lib.mkDefault '' networking.networkmanager.extraConfig = lib.mkDefault ''
[connectivity] [connectivity]

View File

@ -1,50 +1,50 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
let let
valkyrie-sync = pkgs.writeShellScriptBin "valkyrie-sync" '' valkyrie-sync = pkgs.writeShellScriptBin "valkyrie-sync" ''
${pkgs.rsync}/bin/rsync -avzrh --delete --exclude ".git*" --exclude "flake.lock" /materus/config/nixos-config materus@valkyrie:/materus/config/ && \ ${pkgs.rsync}/bin/rsync -avzrh --delete --exclude ".git*" --exclude "flake.lock" /materus/config/nixos-config materus@valkyrie:/materus/config/ && \
${pkgs.rsync}/bin/rsync -avzrh --delete --exclude ".git*" /materus/config/private/valkyrie materus@valkyrie:/materus/config/private ${pkgs.rsync}/bin/rsync -avzrh --delete --exclude ".git*" /materus/config/private/valkyrie materus@valkyrie:/materus/config/private
''; '';
valkyrie-flakelock = pkgs.writeShellScriptBin "valkyrie-flakelock" '' valkyrie-flakelock = pkgs.writeShellScriptBin "valkyrie-flakelock" ''
${pkgs.openssh}/bin/ssh materus@valkyrie "nix flake update /materus/config/nixos-config --override-input nixpkgs github:NixOS/nixpkgs/23.05 \ ${pkgs.openssh}/bin/ssh materus@valkyrie "nix flake update /materus/config/nixos-config --override-input nixpkgs github:NixOS/nixpkgs/23.05 \
--override-input home-manager github:nix-community/home-manager/release-23.05 \ --override-input home-manager github:nix-community/home-manager/release-23.05 \
--override-input private /materus/config/private/valkyrie/flake" --override-input private /materus/config/private/valkyrie/flake"
''; '';
valkyrie-rebuild-boot = pkgs.writeShellScriptBin "valkyrie-rebuild-boot" '' valkyrie-rebuild-boot = pkgs.writeShellScriptBin "valkyrie-rebuild-boot" ''
${pkgs.openssh}/bin/ssh -t materus@valkyrie "sudo nixos-rebuild boot --flake /materus/config/nixos-config#valkyrie \ ${pkgs.openssh}/bin/ssh -t materus@valkyrie "sudo nixos-rebuild boot --flake /materus/config/nixos-config#valkyrie \
--override-input private /materus/config/private/valkyrie/flake" --override-input private /materus/config/private/valkyrie/flake"
''; '';
valkyrie-rebuild-switch = pkgs.writeShellScriptBin "valkyrie-rebuild-switch" '' valkyrie-rebuild-switch = pkgs.writeShellScriptBin "valkyrie-rebuild-switch" ''
${pkgs.openssh}/bin/ssh -t materus@valkyrie "sudo nixos-rebuild switch --flake /materus/config/nixos-config#valkyrie \ ${pkgs.openssh}/bin/ssh -t materus@valkyrie "sudo nixos-rebuild switch --flake /materus/config/nixos-config#valkyrie \
--override-input private /materus/config/private/valkyrie/flake" --override-input private /materus/config/private/valkyrie/flake"
''; '';
flamaster-sync = pkgs.writeShellScriptBin "flamaster-sync" '' flamaster-sync = pkgs.writeShellScriptBin "flamaster-sync" ''
${pkgs.rsync}/bin/rsync -avzrh --delete --exclude ".git*" --exclude "flake.lock" /materus/config/nixos-config materus@flamaster:/materus/config/ && \ ${pkgs.rsync}/bin/rsync -avzrh --delete --exclude ".git*" --exclude "flake.lock" /materus/config/nixos-config materus@flamaster:/materus/config/ && \
${pkgs.rsync}/bin/rsync -avzrh --delete --exclude ".git*" /materus/config/private/flamaster materus@flamaster:/materus/config/private ${pkgs.rsync}/bin/rsync -avzrh --delete --exclude ".git*" /materus/config/private/flamaster materus@flamaster:/materus/config/private
''; '';
flamaster-flakelock = pkgs.writeShellScriptBin "flamaster-flakelock" '' flamaster-flakelock = pkgs.writeShellScriptBin "flamaster-flakelock" ''
${pkgs.openssh}/bin/ssh materus@flamaster "nix flake update /materus/config/nixos-config --override-input nixpkgs github:NixOS/nixpkgs/23.05 \ ${pkgs.openssh}/bin/ssh materus@flamaster "nix flake update /materus/config/nixos-config --override-input nixpkgs github:NixOS/nixpkgs/23.05 \
--override-input home-manager github:nix-community/home-manager/release-23.05 \ --override-input home-manager github:nix-community/home-manager/release-23.05 \
--override-input private /materus/config/private/flamaster/flake" --override-input private /materus/config/private/flamaster/flake"
''; '';
flamaster-rebuild-boot = pkgs.writeShellScriptBin "flamaster-rebuild-boot" '' flamaster-rebuild-boot = pkgs.writeShellScriptBin "flamaster-rebuild-boot" ''
${pkgs.openssh}/bin/ssh -t materus@flamaster "sudo nixos-rebuild boot --flake /materus/config/nixos-config#flamaster \ ${pkgs.openssh}/bin/ssh -t materus@flamaster "sudo nixos-rebuild boot --flake /materus/config/nixos-config#flamaster \
--override-input private /materus/config/private/flamaster/flake" --override-input private /materus/config/private/flamaster/flake"
''; '';
flamaster-rebuild-switch = pkgs.writeShellScriptBin "flamaster-rebuild-switch" '' flamaster-rebuild-switch = pkgs.writeShellScriptBin "flamaster-rebuild-switch" ''
${pkgs.openssh}/bin/ssh -t materus@flamaster "sudo nixos-rebuild switch --flake /materus/config/nixos-config#flamaster \ ${pkgs.openssh}/bin/ssh -t materus@flamaster "sudo nixos-rebuild switch --flake /materus/config/nixos-config#flamaster \
--override-input private /materus/config/private/flamaster/flake" --override-input private /materus/config/private/flamaster/flake"
''; '';
in in
{ {
environment.systemPackages = [ environment.systemPackages = [
valkyrie-rebuild-boot valkyrie-rebuild-boot
valkyrie-rebuild-switch valkyrie-rebuild-switch
@ -55,5 +55,5 @@ in
flamaster-rebuild-switch flamaster-rebuild-switch
flamaster-sync flamaster-sync
flamaster-flakelock flamaster-flakelock
]; ];
} }

View File

@ -2,25 +2,25 @@
{ {
imports = imports =
[ [
] ++ (if (materusCfg.materusFlake.decrypted) then [ ./private ] else [] );
sops.age.generateKey = false; ] ++ (if (materusCfg.materusFlake.decrypted) then [ ./private ] else [ ]);
sops.gnupg.home = null;
sops.gnupg.sshKeyPaths = [];
sops.defaultSopsFile = materusCfg.hostPath + "/secrets/secrets.yaml";
sops.secrets."users/materus" = {};
services.openssh.hostKeys = [ sops.age.generateKey = false;
{ sops.gnupg.home = null;
bits = 4096; sops.gnupg.sshKeyPaths = [ ];
path = "/materus/root/ssh_host_rsa_key"; sops.defaultSopsFile = materusCfg.hostPath + "/secrets/secrets.yaml";
type = "rsa"; sops.secrets."users/materus" = { };
}
{ services.openssh.hostKeys = [
path = "/materus/root/ssh_host_ed25519_key"; {
type = "ed25519"; bits = 4096;
} path = "/materus/root/ssh_host_rsa_key";
]; type = "rsa";
}
{
path = "/materus/root/ssh_host_ed25519_key";
type = "ed25519";
}
];
} }

View File

@ -103,10 +103,10 @@
XDG_BIN_HOME = "\${HOME}/.local/bin"; XDG_BIN_HOME = "\${HOME}/.local/bin";
XDG_DATA_HOME = "\${HOME}/.local/share"; XDG_DATA_HOME = "\${HOME}/.local/share";
QT_XKB_CONFIG_ROOT = "\${XKB_CONFIG_ROOT}"; QT_XKB_CONFIG_ROOT = "\${XKB_CONFIG_ROOT}";
GTK_IM_MODULE="fcitx"; GTK_IM_MODULE = "fcitx";
QT_IM_MODULE="fcitx"; QT_IM_MODULE = "fcitx";
XMODIFIERS="@im=fcitx"; XMODIFIERS = "@im=fcitx";
SDL_IM_MODULE="fcitx"; SDL_IM_MODULE = "fcitx";
#SDL_AUDIODRIVER = "pipewire"; #SDL_AUDIODRIVER = "pipewire";
#SSH_ASKPASS_REQUIRE = "prefer"; #SSH_ASKPASS_REQUIRE = "prefer";
@ -122,7 +122,7 @@
''; '';
i18n.inputMethod.enabled = "fcitx5"; i18n.inputMethod.enabled = "fcitx5";
i18n.inputMethod.fcitx5.addons = [ pkgs.fcitx5-configtool pkgs.fcitx5-lua pkgs.fcitx5-mozc pkgs.fcitx5-gtk pkgs.kdePackages.fcitx5-qt]; i18n.inputMethod.fcitx5.addons = [ pkgs.fcitx5-configtool pkgs.fcitx5-lua pkgs.fcitx5-mozc pkgs.fcitx5-gtk pkgs.kdePackages.fcitx5-qt ];
# Some programs need SUID wrappers, can be configured further or are # Some programs need SUID wrappers, can be configured further or are
@ -260,7 +260,7 @@
monkeysphere monkeysphere
gparted gparted
virt-viewer virt-viewer
@ -274,7 +274,7 @@
bubblewrap bubblewrap
bindfs bindfs
binutils binutils
config.materus.profile.packages.firefox config.materus.profile.packages.firefox

View File

@ -5,24 +5,27 @@
]; ];
systemd.mounts = [ systemd.mounts = [
{ where = "/dev/hugepages"; {
enable = false; where = "/dev/hugepages";
} enable = false;
{ where = "/dev/hugepages/hugepages-2048kB"; }
enable = true; {
what = "hugetlbfs"; where = "/dev/hugepages/hugepages-2048kB";
type = "hugetlbfs"; enable = true;
options = "pagesize=2M"; what = "hugetlbfs";
requiredBy = [ "basic.target" ]; type = "hugetlbfs";
} options = "pagesize=2M";
{ where = "/dev/hugepages/hugepages-1048576kB"; requiredBy = [ "basic.target" ];
enable = true; }
what = "hugetlbfs"; {
type = "hugetlbfs"; where = "/dev/hugepages/hugepages-1048576kB";
options = "pagesize=1G"; enable = true;
requiredBy = [ "basic.target" ]; what = "hugetlbfs";
} type = "hugetlbfs";
]; options = "pagesize=1G";
requiredBy = [ "basic.target" ];
}
];
virtualisation.libvirtd = { virtualisation.libvirtd = {
enable = true; enable = true;

View File

@ -14,36 +14,36 @@ let
'' ''
+*/ +*/
'' ''
# Make sure nothing renders on gpu to prevent "sysfs: cannot create duplicate filename" after rebinding to amdgpu # Make sure nothing renders on gpu to prevent "sysfs: cannot create duplicate filename" after rebinding to amdgpu
chmod 0 /dev/dri/renderD128 chmod 0 /dev/dri/renderD128
fuser -k /dev/dri/renderD128 fuser -k /dev/dri/renderD128
# Seems to fix reset bug for 7900 XTX # Seems to fix reset bug for 7900 XTX
echo "0" > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/d3cold_allowed" echo "0" > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/d3cold_allowed"
systemctl stop mountWin10Share.service systemctl stop mountWin10Share.service
echo ''$VIRSH_GPU_VIDEO > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/driver/unbind" echo ''$VIRSH_GPU_VIDEO > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/driver/unbind"
echo ''$VIRSH_GPU_AUDIO > "/sys/bus/pci/devices/''${VIRSH_GPU_AUDIO}/driver/unbind" echo ''$VIRSH_GPU_AUDIO > "/sys/bus/pci/devices/''${VIRSH_GPU_AUDIO}/driver/unbind"
sleep 1s sleep 1s
echo "10" > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/resource0_resize" echo "10" > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/resource0_resize"
echo "8" > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/resource2_resize" echo "8" > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/resource2_resize"
echo "3" > /proc/sys/vm/drop_caches echo "3" > /proc/sys/vm/drop_caches
echo "1" > /proc/sys/vm/compact_memory echo "1" > /proc/sys/vm/compact_memory
#echo "8192" > /sys/devices/system/node/node1/hugepages/hugepages-2048kB/nr_hugepages #echo "8192" > /sys/devices/system/node/node1/hugepages/hugepages-2048kB/nr_hugepages
systemctl set-property --runtime -- user.slice AllowedCPUs=0-7,16-23 systemctl set-property --runtime -- user.slice AllowedCPUs=0-7,16-23
systemctl set-property --runtime -- system.slice AllowedCPUs=0-7,16-23 systemctl set-property --runtime -- system.slice AllowedCPUs=0-7,16-23
systemctl set-property --runtime -- init.scope AllowedCPUs=0-7,16-23 systemctl set-property --runtime -- init.scope AllowedCPUs=0-7,16-23
''; '';
stopHook = '' stopHook = ''
# Debugging # Debugging

View File

@ -10,7 +10,7 @@
# Include the results of the hardware scan. # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
./services ./services
]; ];
materus.profile.nix.enable = true; materus.profile.nix.enable = true;

View File

@ -1,15 +1,15 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
imports = imports =
[ [
./pleroma.nix ./pleroma.nix
./pihole.nix ./pihole.nix
]; ];
services.adguardhome.enable = true; services.adguardhome.enable = true;
valkyrieService.pihole.enable = false; valkyrieService.pihole.enable = false;
valkyrieService.pleroma.enable = true; valkyrieService.pleroma.enable = true;
} }

View File

@ -1,54 +1,56 @@
{ config, pkgs, lib, materusArg, ... }: { config, pkgs, lib, materusArg, ... }:
{ {
options.valkyrieService.pihole.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable pihole"; options.valkyrieService.pihole.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable pihole";
options.valkyrieService.pihole.dnsIP = lib.mkOption { default = "127.0.0.1";}; options.valkyrieService.pihole.dnsIP = lib.mkOption { default = "127.0.0.1"; };
options.valkyrieService.pihole.webIP = lib.mkOption { default = "127.0.0.1";}; options.valkyrieService.pihole.webIP = lib.mkOption { default = "127.0.0.1"; };
config = let
cfg = config.valkyrieService.pihole;
dnsmasqConf = pkgs.writeText "02-dnsmasq-custom.conf" ''
no-hosts
'';
in lib.mkIf config.valkyrieService.pihole.enable { config =
systemd.tmpfiles.rules = [ let
"d /var/lib/dnsmasq.d 0776 root root -" cfg = config.valkyrieService.pihole;
"d /var/lib/pihole 0776 root root -" dnsmasqConf = pkgs.writeText "02-dnsmasq-custom.conf" ''
"L+ /var/lib/dnsmasq.d/02-dnsmasq-custom.conf 0776 root root - ${dnsmasqConf}" no-hosts
]; '';
virtualisation.oci-containers.containers.pihole = { in
image = "pihole/pihole:latest"; lib.mkIf config.valkyrieService.pihole.enable {
ports = systemd.tmpfiles.rules = [
[ "d /var/lib/dnsmasq.d 0776 root root -"
"${cfg.dnsIP}:53:53/tcp" "d /var/lib/pihole 0776 root root -"
"${cfg.dnsIP}:53:53/udp" "L+ /var/lib/dnsmasq.d/02-dnsmasq-custom.conf 0776 root root - ${dnsmasqConf}"
"${cfg.webIP}:3000:80"
];
environment = {
TZ = "Europe/Warsaw";
FTLCONF_LOCAL_IPV4="127.0.0.1";
DNSMASQ_USER="root";
VIRTUAL_HOST="pi.hole";
PROXY_LOCATION="pi.hole";
};
volumes = [
"/var/lib/pihole/:/etc/pihole/"
"/var/lib/dnsmasq.d:/etc/dnsmasq.d/"
"/nix/store:/nix/store"
]; ];
extraOptions =
[
"--cap-add=NET_ADMIN"
"--dns=127.0.0.1"
"--dns=9.9.9.9"
"--hostname=pi.hole"
];
};
}; virtualisation.oci-containers.containers.pihole = {
image = "pihole/pihole:latest";
ports =
[
"${cfg.dnsIP}:53:53/tcp"
"${cfg.dnsIP}:53:53/udp"
"${cfg.webIP}:3000:80"
];
environment = {
TZ = "Europe/Warsaw";
FTLCONF_LOCAL_IPV4 = "127.0.0.1";
DNSMASQ_USER = "root";
VIRTUAL_HOST = "pi.hole";
PROXY_LOCATION = "pi.hole";
};
volumes = [
"/var/lib/pihole/:/etc/pihole/"
"/var/lib/dnsmasq.d:/etc/dnsmasq.d/"
"/nix/store:/nix/store"
];
extraOptions =
[
"--cap-add=NET_ADMIN"
"--dns=127.0.0.1"
"--dns=9.9.9.9"
"--hostname=pi.hole"
];
};
};
} }

View File

@ -6,7 +6,8 @@
{ {
imports = imports =
[ # Include the results of the hardware scan. [
# Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
@ -15,15 +16,15 @@
git git
]; ];
sound.enable = false; sound.enable = false;
boot.tmp.useTmpfs = true; boot.tmp.useTmpfs = true;
services.xserver.enable = false; services.xserver.enable = false;
networking.hostName = "waffentrager"; networking.hostName = "waffentrager";
services.openssh.enable = true; services.openssh.enable = true;
users.users.materus = { users.users.materus = {
isNormalUser = true; isNormalUser = true;
extraGroups = [ "wheel" ]; extraGroups = [ "wheel" ];
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPEDY+H8Hc/RSLE064AAh8IojvqxPd8BE5gec2aOfYMh materus@podkos.pl" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPEDY+H8Hc/RSLE064AAh8IojvqxPd8BE5gec2aOfYMh materus@podkos.pl"
]; ];
}; };
@ -37,7 +38,7 @@
"https://cache.nixos.org/" "https://cache.nixos.org/"
"https://nixerus.cachix.org/" "https://nixerus.cachix.org/"
]; ];
trusted-public-keys = [ "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" "nixerus.cachix.org-1:2x7sIG7y1vAoxc8BNRJwsfapZsiX4hIl4aTi9V5ZDdE="]; trusted-public-keys = [ "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" "nixerus.cachix.org-1:2x7sIG7y1vAoxc8BNRJwsfapZsiX4hIl4aTi9V5ZDdE=" ];
}; };
}; };
# Use the extlinux boot loader. (NixOS wants to enable GRUB by default) # Use the extlinux boot loader. (NixOS wants to enable GRUB by default)
@ -69,7 +70,7 @@
# services.xserver.enable = true; # services.xserver.enable = true;
# Configure keymap in X11 # Configure keymap in X11
# services.xserver.layout = "us"; # services.xserver.layout = "us";

View File

@ -5,4 +5,4 @@
materusCfg.configInputs.nixos-hardware.nixosModules.raspberry-pi-4 materusCfg.configInputs.nixos-hardware.nixosModules.raspberry-pi-4
./configuration.nix ./configuration.nix
]; ];
} }

View File

@ -5,7 +5,8 @@
{ {
imports = imports =
[ (modulesPath + "/installer/scan/not-detected.nix") [
(modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.kernelPackages = pkgs.linuxPackages_rpi4; boot.kernelPackages = pkgs.linuxPackages_rpi4;
boot.initrd.availableKernelModules = [ "xhci_pci" "usb_storage" ]; boot.initrd.availableKernelModules = [ "xhci_pci" "usb_storage" ];
@ -16,7 +17,8 @@
"vm.swappiness" = 10; "vm.swappiness" = 10;
}; };
fileSystems."/" = fileSystems."/" =
{ device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888"; {
device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/etc/nixos" = fileSystems."/etc/nixos" =

View File

@ -1,17 +1,17 @@
{ config, pkgs, lib, materusCfg, ... }: { config, pkgs, lib, materusCfg, ... }:
let let
materusArg = { materusArg = {
pkgs = (import materusCfg.nixerus { inherit pkgs; }) // pkgs = (import materusCfg.nixerus { inherit pkgs; }) //
(if pkgs.system == "x86_64-linux" then { i686Linux = import materusCfg.nixerus { pkgs = pkgs.pkgsi686Linux; }; } else { }); (if pkgs.system == "x86_64-linux" then { i686Linux = import materusCfg.nixerus { pkgs = pkgs.pkgsi686Linux; }; } else { });
cfg = materusCfg; cfg = materusCfg;
}; };
in in
{ {
imports = [ imports = [
./nixpkgs.nix ./nixpkgs.nix
./packages ./packages
]; ];
options.materus.materusArg = lib.mkOption {default = {};}; options.materus.materusArg = lib.mkOption { default = { }; };
config._module.args.materusArg = config.materus.materusArg // materusArg; config._module.args.materusArg = config.materus.materusArg // materusArg;
config.warnings = lib.mkIf (!materusCfg.materusFlake.decrypted) ["Repository not decrypted, private configs not loaded, use crypt.sh to decrypt"]; config.warnings = lib.mkIf (!materusCfg.materusFlake.decrypted) [ "Repository not decrypted, private configs not loaded, use crypt.sh to decrypt" ];
} }

View File

@ -14,78 +14,78 @@ in
options.materus.profile.nixpkgs.enableOverlays = mkBoolOpt (cfg.enable) "Enable materus overlays"; options.materus.profile.nixpkgs.enableOverlays = mkBoolOpt (cfg.enable) "Enable materus overlays";
options.materus.profile.nix.enableRegistry = mkBoolOpt (!materusCfg.isHm) "Enable materus nix registry"; options.materus.profile.nix.enableRegistry = mkBoolOpt (!materusCfg.isHm) "Enable materus nix registry";
config.nixpkgs.config = lib.mkIf cfg.enable{ config.nixpkgs.config = lib.mkIf cfg.enable {
allowUnfree = lib.mkDefault true; allowUnfree = lib.mkDefault true;
joypixels.acceptLicense = lib.mkDefault true; joypixels.acceptLicense = lib.mkDefault true;
firefox.enablePlasmaBrowserIntegration = true; firefox.enablePlasmaBrowserIntegration = true;
}; };
config.nixpkgs.overlays = lib.mkIf cfg.enableOverlays [materusArg.cfg.configInputs.emacs-overlay.overlay]; config.nixpkgs.overlays = lib.mkIf cfg.enableOverlays [ materusArg.cfg.configInputs.emacs-overlay.overlay ];
config.nix.package = lib.mkDefault pkgs.nixUnstable; config.nix.package = lib.mkDefault pkgs.nixUnstable;
config.nix.registry = lib.mkIf config.materus.profile.nix.enableRegistry { config.nix.registry = lib.mkIf config.materus.profile.nix.enableRegistry {
nixpkgs-stable = { nixpkgs-stable = {
from = { type = "indirect"; id = "nixpkgs-stable"; }; from = { type = "indirect"; id = "nixpkgs-stable"; };
flake = materusCfg.materusFlake.inputs.nixpkgs-stable; flake = materusCfg.materusFlake.inputs.nixpkgs-stable;
}; };
nixpkgs-unstable = { nixpkgs-unstable = {
from = { type = "indirect"; id = "nixpkgs-unstable"; }; from = { type = "indirect"; id = "nixpkgs-unstable"; };
flake = materusCfg.materusFlake.inputs.nixpkgs; flake = materusCfg.materusFlake.inputs.nixpkgs;
}; };
nixpkgs = { nixpkgs = {
from = { type = "indirect"; id = "nixpkgs"; }; from = { type = "indirect"; id = "nixpkgs"; };
flake = materusCfg.configInputs.nixpkgs; flake = materusCfg.configInputs.nixpkgs;
}; };
emacs-overlay = { emacs-overlay = {
from = { type = "indirect"; id = "emacs-overlay"; }; from = { type = "indirect"; id = "emacs-overlay"; };
flake = materusCfg.configInputs.emacs-overlay; flake = materusCfg.configInputs.emacs-overlay;
}; };
flake-utils = { flake-utils = {
from = { type = "indirect"; id = "flake-utils"; }; from = { type = "indirect"; id = "flake-utils"; };
flake = materusCfg.configInputs.flake-utils; flake = materusCfg.configInputs.flake-utils;
}; };
nixos-hardware = { nixos-hardware = {
from = { type = "indirect"; id = "nixos-hardware"; }; from = { type = "indirect"; id = "nixos-hardware"; };
flake = materusCfg.configInputs.nixos-hardware; flake = materusCfg.configInputs.nixos-hardware;
}; };
nixerus = { nixerus = {
from = { type = "indirect"; id = "nixerus"; }; from = { type = "indirect"; id = "nixerus"; };
flake = materusCfg.configInputs.nixerus; flake = materusCfg.configInputs.nixerus;
}; };
devshell = { devshell = {
from = { type = "indirect"; id = "devshell"; }; from = { type = "indirect"; id = "devshell"; };
flake = materusCfg.configInputs.devshell; flake = materusCfg.configInputs.devshell;
}; };
home-manager = { home-manager = {
from = { type = "indirect"; id = "home-manager"; }; from = { type = "indirect"; id = "home-manager"; };
flake = materusCfg.configInputs.home-manager; flake = materusCfg.configInputs.home-manager;
}; };
sops-nix = { sops-nix = {
from = { type = "indirect"; id = "sops-nix"; }; from = { type = "indirect"; id = "sops-nix"; };
flake = materusCfg.configInputs.sops-nix; flake = materusCfg.configInputs.sops-nix;
}; };
base16 = { base16 = {
from = { type = "indirect"; id = "base16"; }; from = { type = "indirect"; id = "base16"; };
flake = materusCfg.configInputs.base16; flake = materusCfg.configInputs.base16;
}; };
git-agecrypt = { git-agecrypt = {
from = { type = "indirect"; id = "git-agecrypt"; }; from = { type = "indirect"; id = "git-agecrypt"; };
flake = materusCfg.configInputs.git-agecrypt; flake = materusCfg.configInputs.git-agecrypt;
}; };
nur = { nur = {
from = { type = "indirect"; id = "nur"; }; from = { type = "indirect"; id = "nur"; };
flake = materusCfg.configInputs.nur; flake = materusCfg.configInputs.nur;
}; };
}; };

View File

@ -16,8 +16,8 @@ let
pkgs.noto-fonts-cjk-serif pkgs.noto-fonts-cjk-serif
pkgs.wqy_zenhei pkgs.wqy_zenhei
pkgs.corefonts pkgs.corefonts
(pkgs.nerdfonts.override { fonts = [ "FiraCode"]; }) (pkgs.nerdfonts.override { fonts = [ "FiraCode" ]; })
] ++ defaultFonts; ] ++ defaultFonts;
moreFonts = [ moreFonts = [

View File

@ -1,21 +1,21 @@
{ config, lib, pkgs, materusArg, ... }: { config, lib, pkgs, materusArg, ... }:
let let
cfg = config.materus.profile.browser; cfg = config.materus.profile.browser;
in in
{ {
options= let mkBoolOpt = materusArg.pkgs.lib.mkBoolOpt; in{ options = let mkBoolOpt = materusArg.pkgs.lib.mkBoolOpt; in {
materus.profile.browser.firefox.enable = mkBoolOpt config.materus.profile.enableDesktop "Enable Firefox with materus cfg"; materus.profile.browser.firefox.enable = mkBoolOpt config.materus.profile.enableDesktop "Enable Firefox with materus cfg";
materus.profile.browser.vivaldi.enable = mkBoolOpt config.materus.profile.enableDesktop "Enable Vivaldi with materus cfg"; materus.profile.browser.vivaldi.enable = mkBoolOpt config.materus.profile.enableDesktop "Enable Vivaldi with materus cfg";
materus.profile.browser.brave.enable = mkBoolOpt false "Enable Brave with materus cfg"; materus.profile.browser.brave.enable = mkBoolOpt false "Enable Brave with materus cfg";
}; };
#TODO: Make some config #TODO: Make some config
config.home.packages = [ config.home.packages = [
(lib.mkIf cfg.firefox.enable config.materus.profile.packages.firefox) (lib.mkIf cfg.firefox.enable config.materus.profile.packages.firefox)
(lib.mkIf cfg.vivaldi.enable pkgs.vivaldi) (lib.mkIf cfg.vivaldi.enable pkgs.vivaldi)
(lib.mkIf cfg.brave.enable pkgs.brave) (lib.mkIf cfg.brave.enable pkgs.brave)
]; ];
}
}

View File

@ -20,9 +20,9 @@ in
config = config =
{ {
home.packages = (if cfg.enableDesktop then packages.list.desktopApps else []) ++ home.packages = (if cfg.enableDesktop then packages.list.desktopApps else [ ]) ++
(if cfg.enableNixDevel then packages.list.nixRelated else []) ++ (if cfg.enableNixDevel then packages.list.nixRelated else [ ]) ++
(if cfg.enableTerminal then packages.list.terminalApps else []); (if cfg.enableTerminal then packages.list.terminalApps else [ ]);
#Desktop #Desktop
programs.feh.enable = lib.mkDefault cfg.enableDesktop; programs.feh.enable = lib.mkDefault cfg.enableDesktop;

View File

@ -5,11 +5,11 @@ in
{ {
options.materus.profile.editor.code.enable = materusArg.pkgs.lib.mkBoolOpt config.materus.profile.enableDesktop "Enable VSCodium with materus cfg"; options.materus.profile.editor.code.enable = materusArg.pkgs.lib.mkBoolOpt config.materus.profile.enableDesktop "Enable VSCodium with materus cfg";
options.materus.profile.editor.code.fhs.enable = materusArg.pkgs.lib.mkBoolOpt false "Use fhs vscodium"; options.materus.profile.editor.code.fhs.enable = materusArg.pkgs.lib.mkBoolOpt false "Use fhs vscodium";
options.materus.profile.editor.code.fhs.packages = lib.mkOption { default = (ps: []);}; options.materus.profile.editor.code.fhs.packages = lib.mkOption { default = (ps: [ ]); };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
programs.vscode = { programs.vscode = {
enable = lib.mkDefault true; enable = lib.mkDefault true;
package = lib.mkDefault (if (cfg.fhs.enable) then (pkgs.vscodium.fhsWithPackages cfg.fhs.packages) else pkgs.vscodium); package = lib.mkDefault (if (cfg.fhs.enable) then (pkgs.vscodium.fhsWithPackages cfg.fhs.packages) else pkgs.vscodium);
mutableExtensionsDir = lib.mkDefault true; mutableExtensionsDir = lib.mkDefault true;
}; };
materus.profile.fonts.enable = lib.mkDefault true; materus.profile.fonts.enable = lib.mkDefault true;

View File

@ -5,4 +5,4 @@
./neovim.nix ./neovim.nix
./emacs ./emacs
]; ];
} }

View File

@ -1,74 +1,74 @@
{ config, lib, pkgs, materusArg, ... }: { config, lib, pkgs, materusArg, ... }:
let let
configPath = "${materusArg.cfg.path}" + "/extraFiles/config/emacs/"; configPath = "${materusArg.cfg.path}" + "/extraFiles/config/emacs/";
inits = import ./init.nix {path = configPath; inherit pkgs;}; inits = import ./init.nix { path = configPath; inherit pkgs; };
packages = epkgs: with epkgs; [ packages = epkgs: with epkgs; [
load-relative load-relative
elcord elcord
persp-mode persp-mode
dashboard dashboard
magit magit
helm helm
avy avy
corfu corfu
vterm vterm
centaur-tabs centaur-tabs
projectile projectile
company company
clipetty clipetty
treemacs treemacs
treemacs-nerd-icons treemacs-nerd-icons
treemacs-perspective treemacs-perspective
treemacs-icons-dired treemacs-icons-dired
treemacs-magit treemacs-magit
treemacs-projectile treemacs-projectile
tree-edit tree-edit
vertico vertico
nerd-icons nerd-icons
nerd-icons-completion nerd-icons-completion
perspective perspective
minions minions
telephone-line telephone-line
rainbow-delimiters rainbow-delimiters
use-package use-package
cmake-mode cmake-mode
lsp-mode lsp-mode
lsp-java lsp-java
lsp-jedi lsp-jedi
lsp-haskell lsp-haskell
lsp-ui lsp-ui
lsp-treemacs lsp-treemacs
dap-mode dap-mode
d-mode d-mode
multiple-cursors multiple-cursors
org org
org-rainbow-tags org-rainbow-tags
org-roam org-roam
org-roam-ui org-roam-ui
org-review org-review
markdown-mode markdown-mode
json-mode json-mode
nix-mode nix-mode
minimap
minimap
moe-theme
doom-themes
]; moe-theme
doom-themes
];
default-config = '' default-config = ''
(defvar materus/nix-packages t) (defvar materus/nix-packages t)
(defvar materus/init-from-home nil) (defvar materus/init-from-home nil)
(unless materus/init-from-home (unless materus/init-from-home
(message "Config loading not from homeDir, need \"materus/init-from-home\" variable in init.el") (message "Config loading not from homeDir, need \"materus/init-from-home\" variable in init.el")
${setNixInit} ${setNixInit}
${inits.initText} ${inits.initText}
) )
''; '';
emacsPkgs = with pkgs;[ emacsPkgs = with pkgs;[
@ -93,29 +93,29 @@ in
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
home.activation.emacsCompile = lib.hm.dag.entryAfter [ "linkGeneration" ] '' home.activation.emacsCompile = lib.hm.dag.entryAfter [ "linkGeneration" ] ''
${config.programs.emacs.finalPackage}/bin/emacs --batch \ ${config.programs.emacs.finalPackage}/bin/emacs --batch \
--eval '(setq warning-minimum-log-level :error)' \ --eval '(setq warning-minimum-log-level :error)' \
--eval '(byte-compile-file "${config.xdg.configHome}/emacs/early-init.el")' \ --eval '(byte-compile-file "${config.xdg.configHome}/emacs/early-init.el")' \
--eval '(byte-compile-file "${config.xdg.configHome}/emacs/init.el")' --eval '(byte-compile-file "${config.xdg.configHome}/emacs/init.el")'
''; '';
xdg.configFile."emacs/init.el".text = '' xdg.configFile."emacs/init.el".text = ''
(defvar materus/nix-packages nil) (defvar materus/nix-packages nil)
(defvar materus/init-from-home t) (defvar materus/init-from-home t)
(setq-default materus/init-from-home t) (setq-default materus/init-from-home t)
${setNixInit} ${setNixInit}
${inits.initText} ${inits.initText}
''; '';
xdg.configFile."emacs/early-init.el".text = '' xdg.configFile."emacs/early-init.el".text = ''
${inits.earlyInitText} ${inits.earlyInitText}
''; '';
programs.emacs = { programs.emacs = {
enable = true; enable = true;
package = with pkgs; lib.mkDefault (emacs29.override { withX = true; withGTK3 = true; withAlsaLib = true; withGconf = true; withImageMagick = true; withXwidgets = true; }); package = with pkgs; lib.mkDefault (emacs29.override { withX = true; withGTK3 = true; withAlsaLib = true; withGconf = true; withImageMagick = true; withXwidgets = true; });
extraPackages = epkgs: ((packages epkgs)); extraPackages = epkgs: ((packages epkgs));
extraConfig = default-config; extraConfig = default-config;
}; };
}; };

View File

@ -1,8 +1,8 @@
{path, pkgs}: { path, pkgs }:
{ {
earlyInitText = '' earlyInitText = ''
${builtins.readFile (path + "early-init.el")} ${builtins.readFile (path + "early-init.el")}
''; '';
initText = '' initText = ''
(defvar materus/init-from-home nil) (defvar materus/init-from-home nil)
@ -13,5 +13,5 @@
${builtins.readFile (path + "packages.el")} ${builtins.readFile (path + "packages.el")}
${builtins.readFile (path + "init.el")} ${builtins.readFile (path + "init.el")}
''; '';
} }

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, materusArg, ... }: { config, lib, pkgs, materusArg, ... }:
let let
cfg = config.materus.profile.editor.neovim; cfg = config.materus.profile.editor.neovim;
in in
{ {
options.materus.profile.editor.neovim.enable = materusArg.pkgs.lib.mkBoolOpt config.materus.profile.enableTerminalExtra "Enable neovim with materus cfg"; options.materus.profile.editor.neovim.enable = materusArg.pkgs.lib.mkBoolOpt config.materus.profile.enableTerminalExtra "Enable neovim with materus cfg";
@ -14,21 +14,21 @@ in
extraConfig = '' extraConfig = ''
set number set number
''; '';
plugins = with pkgs.vimPlugins;[
syntastic
vim-fugitive plugins = with pkgs.vimPlugins;[
vim-airline syntastic
vim-nix
nvim-fzf vim-fugitive
nvim-treesitter.withAllGrammars vim-airline
vim-nix
];
nvim-fzf
nvim-treesitter.withAllGrammars
];
}; };
}; };

View File

@ -5,9 +5,9 @@ let
in in
{ {
options.materus.profile.fonts.enable = materusArg.pkgs.lib.mkBoolOpt config.materus.profile.enableDesktop "Enable materus font settings"; options.materus.profile.fonts.enable = materusArg.pkgs.lib.mkBoolOpt config.materus.profile.enableDesktop "Enable materus font settings";
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
fonts.fontconfig.enable = lib.mkDefault true; fonts.fontconfig.enable = lib.mkDefault true;
home.packages = packages.list.fonts; home.packages = packages.list.fonts;
}; };
} }

View File

@ -1,20 +1,20 @@
{ config, pkgs, lib, materusArg, ... }: { config, pkgs, lib, materusArg, ... }:
let let
cfg = config.materus.profile.bash; cfg = config.materus.profile.bash;
in in
{ {
options.materus.profile.bash.enable = materusArg.pkgs.lib.mkBoolOpt config.materus.profile.enableTerminal "Enable materus bash config"; options.materus.profile.bash.enable = materusArg.pkgs.lib.mkBoolOpt config.materus.profile.enableTerminal "Enable materus bash config";
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
programs.bash = { programs.bash = {
enable = lib.mkDefault true; enable = lib.mkDefault true;
enableCompletion = lib.mkDefault true; enableCompletion = lib.mkDefault true;
enableVteIntegration = lib.mkDefault true; enableVteIntegration = lib.mkDefault true;
historyControl = lib.mkDefault ["erasedups" "ignorespace"]; historyControl = lib.mkDefault [ "erasedups" "ignorespace" ];
shellOptions = lib.mkDefault [ "autocd" "checkwinsize" "cmdhist" "expand_aliases" "extglob" "globstar" "checkjobs" "nocaseglob" ]; shellOptions = lib.mkDefault [ "autocd" "checkwinsize" "cmdhist" "expand_aliases" "extglob" "globstar" "checkjobs" "nocaseglob" ];
};
}; };
};
} }

View File

@ -1,9 +1,9 @@
{ {
imports = [ imports = [
./zsh.nix ./zsh.nix
./bash.nix ./bash.nix
./fish.nix ./fish.nix
./starship.nix ./starship.nix
]; ];
} }

View File

@ -1,6 +1,6 @@
{ config, pkgs, lib, materusArg, ... }: { config, pkgs, lib, materusArg, ... }:
let let
cfg = config.materus.profile.fish; cfg = config.materus.profile.fish;
in in
{ {
options.materus.profile.fish.enable = materusArg.pkgs.lib.mkBoolOpt config.materus.profile.enableTerminalExtra "Enable materus fish config"; options.materus.profile.fish.enable = materusArg.pkgs.lib.mkBoolOpt config.materus.profile.enableTerminalExtra "Enable materus fish config";
@ -9,4 +9,4 @@ in
enable = lib.mkDefault true; enable = lib.mkDefault true;
}; };
}; };
} }

View File

@ -17,7 +17,7 @@ in
format = "$username@$hostname$all"; format = "$username@$hostname$all";
right_format = "$cmd_duration $time"; right_format = "$cmd_duration $time";
time = { time = {
disabled = false; disabled = false;
style = "bold bright-black"; style = "bold bright-black";
@ -28,8 +28,8 @@ in
shell = { shell = {
disabled = false; disabled = false;
fish_indicator = "fish"; fish_indicator = "fish";
bash_indicator= "bash"; bash_indicator = "bash";
zsh_indicator= "zsh"; zsh_indicator = "zsh";
style = "blue bold"; style = "blue bold";
}; };

View File

@ -2,8 +2,9 @@
let let
relToDotDir = file: (lib.optionalString (config.programs.zsh.dotDir != null) (config.programs.zsh.dotDir + "/")) + file; relToDotDir = file: (lib.optionalString (config.programs.zsh.dotDir != null) (config.programs.zsh.dotDir + "/")) + file;
pluginsDir = if config.programs.zsh.dotDir != null then pluginsDir =
relToDotDir "plugins" else ".zsh/plugins"; if config.programs.zsh.dotDir != null then
relToDotDir "plugins" else ".zsh/plugins";
@ -14,16 +15,16 @@ let
makeEnv = name: val: ''${name}=''${${name}:-"${val}"}''; makeEnv = name: val: ''${name}=''${${name}:-"${val}"}'';
makeIfVar = var: val: ret: '' makeIfVar = var: val: ret: ''
if [ ''$${var} = "${val}" ]; then if [ ''$${var} = "${val}" ]; then
${ret} ${ret}
fi''; fi'';
makePlugin = nameArg: fileArg: srcArg: rec { makePlugin = nameArg: fileArg: srcArg: rec {
name = nameArg; name = nameArg;
src = srcArg; src = srcArg;
path = pluginsDir + "/" + name; path = pluginsDir + "/" + name;
@ -33,20 +34,20 @@ let
extraPlugins = { extraPlugins = {
powerlevel10k = makePlugin "powerlevel10k" "powerlevel10k.zsh-theme" (pkgs.fetchFromGitHub { powerlevel10k = makePlugin "powerlevel10k" "powerlevel10k.zsh-theme" (pkgs.fetchFromGitHub {
owner = "romkatv"; owner = "romkatv";
repo = "powerlevel10k"; repo = "powerlevel10k";
rev = "v1.20.0"; rev = "v1.20.0";
sha256 = "sha256-ES5vJXHjAKw/VHjWs8Au/3R+/aotSbY7PWnWAMzCR8E="; sha256 = "sha256-ES5vJXHjAKw/VHjWs8Au/3R+/aotSbY7PWnWAMzCR8E=";
}); });
}; };
in in
{ {
options.materus.profile.zsh.enable = materusArg.pkgs.lib.mkBoolOpt config.materus.profile.enableTerminalExtra "Enable materus zsh config"; options.materus.profile.zsh.enable = materusArg.pkgs.lib.mkBoolOpt config.materus.profile.enableTerminalExtra "Enable materus zsh config";
options.materus.profile.zsh.prompt = lib.mkOption { options.materus.profile.zsh.prompt = lib.mkOption {
type = lib.types.enum ["p10k" "starship"]; type = lib.types.enum [ "p10k" "starship" ];
example = "p10k"; example = "p10k";
default = "p10k"; default = "p10k";
}; };
@ -54,8 +55,8 @@ in
home.packages = [ home.packages = [
pkgs.ripgrep pkgs.ripgrep
]; ];
home.file = builtins.foldl' (a: b: a // b) {} (builtins.map (plugin: {${plugin.path}.source = plugin.src;})(builtins.attrValues extraPlugins)); home.file = builtins.foldl' (a: b: a // b) { } (builtins.map (plugin: { ${plugin.path}.source = plugin.src; }) (builtins.attrValues extraPlugins));
programs.zsh = { programs.zsh = {
enable = true; enable = true;
@ -68,8 +69,8 @@ in
envExtra = '' envExtra = ''
${makeEnv "__MATERUS_HM_ZSH" "1"} ${makeEnv "__MATERUS_HM_ZSH" "1"}
${makeEnv "__MATERUS_HM_ZSH_PROMPT" cfg.prompt} ${makeEnv "__MATERUS_HM_ZSH_PROMPT" cfg.prompt}
''; '';
@ -88,7 +89,7 @@ in
plugins = [ plugins = [
]; ];
history = { history = {
extended = true; extended = true;
save = 100000; save = 100000;
@ -106,8 +107,8 @@ in
bindkey -r "^[" bindkey -r "^["
bindkey ";5C" forward-word bindkey ";5C" forward-word
bindkey ";5D" backward-word bindkey ";5D" backward-word
'' + '' +
makeIfVar "__MATERUS_HM_ZSH_PROMPT" "p10k" '' makeIfVar "__MATERUS_HM_ZSH_PROMPT" "p10k" ''
if zmodload zsh/terminfo && (( terminfo[colors] >= 256 )); then if zmodload zsh/terminfo && (( terminfo[colors] >= 256 )); then
[[ ! -f ${p10kcfg}/fullcolor.zsh ]] || source ${p10kcfg}/fullcolor.zsh [[ ! -f ${p10kcfg}/fullcolor.zsh ]] || source ${p10kcfg}/fullcolor.zsh
else else
@ -117,7 +118,7 @@ in
}; };
programs.starship.enableZshIntegration = lib.mkForce false; programs.starship.enableZshIntegration = lib.mkForce false;
}; };

View File

@ -6,8 +6,8 @@
./games ./games
]; ];
/* /*
users.users.nixos-rebuild = { users.users.nixos-rebuild = {
#isSystemUser = true; #isSystemUser = true;
isNormalUser = true; isNormalUser = true;
group = "nixos-rebuild"; group = "nixos-rebuild";
@ -15,9 +15,9 @@
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPEDY+H8Hc/RSLE064AAh8IojvqxPd8BE5gec2aOfYMh materus@podkos.pl" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPEDY+H8Hc/RSLE064AAh8IojvqxPd8BE5gec2aOfYMh materus@podkos.pl"
]; ];
home = "/tmp/nixos-rebuild"; home = "/tmp/nixos-rebuild";
}; };
users.groups.nixos-rebuild = { }; users.groups.nixos-rebuild = { };
security.sudo.extraRules = [ security.sudo.extraRules = [
{ {
users = [ "nixos-rebuild" ]; users = [ "nixos-rebuild" ];
commands = let path = "/run/current-system/sw/bin/"; in commands = let path = "/run/current-system/sw/bin/"; in
@ -56,7 +56,7 @@
} }
]; ];
*/ */
} }

View File

@ -10,14 +10,14 @@ in
fonts.fonts = packages.list.fonts ++ packages.list.moreFonts; fonts.fonts = packages.list.fonts ++ packages.list.moreFonts;
fonts.enableDefaultFonts = lib.mkForce true; fonts.enableDefaultFonts = lib.mkForce true;
fonts.fontconfig.enable = lib.mkForce true;
fonts.fontconfig.cache32Bit = lib.mkForce true;
fonts.fontconfig.defaultFonts.sansSerif = [ "Noto Sans" "DejaVu Sans" "WenQuanYi Zen Hei" "Noto Color Emoji" ]; fonts.fontconfig.enable = lib.mkForce true;
fonts.fontconfig.defaultFonts.serif = [ "Noto Serif" "DejaVu Serif" "WenQuanYi Zen Hei" "Noto Color Emoji" ]; fonts.fontconfig.cache32Bit = lib.mkForce true;
fonts.fontconfig.defaultFonts.emoji = [ "Noto Color Emoji" "OpenMoji Color" ];
fonts.fontconfig.defaultFonts.monospace = [ "FiraCode Nerd Font Mono" "Noto Sans Mono" "WenQuanYi Zen Hei Mono" ]; fonts.fontconfig.defaultFonts.sansSerif = [ "Noto Sans" "DejaVu Sans" "WenQuanYi Zen Hei" "Noto Color Emoji" ];
fonts.fontconfig.defaultFonts.serif = [ "Noto Serif" "DejaVu Serif" "WenQuanYi Zen Hei" "Noto Color Emoji" ];
fonts.fontconfig.defaultFonts.emoji = [ "Noto Color Emoji" "OpenMoji Color" ];
fonts.fontconfig.defaultFonts.monospace = [ "FiraCode Nerd Font Mono" "Noto Sans Mono" "WenQuanYi Zen Hei Mono" ];
fonts.fontDir.enable = lib.mkForce true; fonts.fontDir.enable = lib.mkForce true;
}; };

View File

@ -1,5 +1,5 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
imports = [ imports = [
./steam.nix ./steam.nix
]; ];

View File

@ -1,24 +1,24 @@
{ config, pkgs, lib, materusArg, inputs, ... }: { config, pkgs, lib, materusArg, inputs, ... }:
let let
optHip = pkgs.stdenv.mkDerivation rec { optHip = pkgs.stdenv.mkDerivation rec {
pname = "optHip"; pname = "optHip";
version = pkgs.rocmPackages.clr.version; version = pkgs.rocmPackages.clr.version;
dontFixup = true; dontFixup = true;
dontBuild = true; dontBuild = true;
dontPatchELF = true; dontPatchELF = true;
dontUnpack = true; dontUnpack = true;
sourceRoot = "."; sourceRoot = ".";
buildInputs = [ buildInputs = [
pkgs.rocmPackages.clr pkgs.rocmPackages.clr
]; ];
installPhase = '' installPhase = ''
mkdir -p $out/opt/rocm mkdir -p $out/opt/rocm
ln -s ${pkgs.rocmPackages.clr} $out/opt/rocm/hip ln -s ${pkgs.rocmPackages.clr} $out/opt/rocm/hip
''; '';
}; };
steamPkg = pkgs.steam.override { steamPkg = pkgs.steam.override {
@ -83,7 +83,7 @@ let
pkgs.fontconfig pkgs.fontconfig
pkgs.libxcrypt pkgs.libxcrypt
pkgs.gnutls pkgs.gnutls
pkgs.samba pkgs.samba
pkgs.tdb pkgs.tdb
pkgs.jemalloc pkgs.jemalloc
pkgs.gperftools pkgs.gperftools
@ -109,7 +109,7 @@ in
description = "Package used by steam"; description = "Package used by steam";
}; };
options.materus.profile.steam.extraPkgs = lib.mkOption { options.materus.profile.steam.extraPkgs = lib.mkOption {
default = []; default = [ ];
description = "Extra packages for steam"; description = "Extra packages for steam";
}; };

View File

@ -16,7 +16,7 @@ in
"https://cache.nixos.org/" "https://cache.nixos.org/"
"https://nixerus.cachix.org/" "https://nixerus.cachix.org/"
]; ];
trusted-public-keys = [ "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" "nixerus.cachix.org-1:2x7sIG7y1vAoxc8BNRJwsfapZsiX4hIl4aTi9V5ZDdE="]; trusted-public-keys = [ "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" "nixerus.cachix.org-1:2x7sIG7y1vAoxc8BNRJwsfapZsiX4hIl4aTi9V5ZDdE=" ];
}; };
}; };
} }

View File

@ -10,12 +10,12 @@
nixpkgs = { nixpkgs = {
type = "github"; type = "github";
owner = "NixOS"; owner = "NixOS";
repo = "nixpkgs"; repo = "nixpkgs";
ref = "nixos-unstable"; ref = "nixos-unstable";
}; };
configInputs = { configInputs = {
type = "github"; type = "github";
owner = "materusPL"; owner = "materusPL";
repo = "nixos-config"; repo = "nixos-config";