diff options
-rw-r--r-- | nixos/ags.nix | 2 | ||||
-rw-r--r-- | nixos/bootloader.nix | 23 | ||||
-rw-r--r-- | nixos/configuration.nix | 79 | ||||
-rw-r--r-- | nixos/custom-hosts.nix | 9 | ||||
-rw-r--r-- | nixos/fonts.nix | 2 | ||||
-rw-r--r-- | nixos/greetd.nix | 15 | ||||
-rw-r--r-- | nixos/hardware-configuration.nix | 23 | ||||
-rw-r--r-- | nixos/ly.nix | 9 | ||||
-rw-r--r-- | nixos/nvidia.nix | 13 | ||||
-rw-r--r-- | nixos/sddm-theme.nix | 2 | ||||
-rw-r--r-- | nixos/services/avahi.service.nix | 2 | ||||
-rw-r--r-- | nixos/services/laptop.preset.nix | 3 | ||||
-rw-r--r-- | nixos/services/logind.service.nix | 9 | ||||
-rw-r--r-- | nixos/services/misc.service.nix | 2 | ||||
-rw-r--r-- | nixos/services/nginx.service.nix | 11 | ||||
-rw-r--r-- | nixos/services/pipewire.service.nix | 58 | ||||
-rw-r--r-- | nixos/services/power_management.service.nix | 9 | ||||
-rw-r--r-- | nixos/services/printing.service.nix | 4 | ||||
-rw-r--r-- | nixos/services/seatd.service.nix | 9 | ||||
-rw-r--r-- | nixos/services/syncthing.service.nix | 13 | ||||
-rw-r--r-- | nixos/services/tailscale.service.nix | 7 | ||||
-rw-r--r-- | nixos/virtualisation.nix | 11 |
22 files changed, 151 insertions, 164 deletions
diff --git a/nixos/ags.nix b/nixos/ags.nix index 036fee1..e1f8b28 100644 --- a/nixos/ags.nix +++ b/nixos/ags.nix @@ -1,4 +1,4 @@ -{pkgs, ...}: { +{ pkgs, ... }: { environment.systemPackages = [ pkgs.ags ]; diff --git a/nixos/bootloader.nix b/nixos/bootloader.nix index e18e85e..00691b2 100644 --- a/nixos/bootloader.nix +++ b/nixos/bootloader.nix @@ -1,8 +1,8 @@ -{ - config, - pkgs, - ... -}: let +{ config +, pkgs +, ... +}: +let distro-grub-themes = pkgs.stdenv.mkDerivation { pname = "distro-grub-themes"; version = "3.1"; @@ -25,8 +25,9 @@ }; installPhase = "cp -r xenlism-grub-1080p-nixos/Xenlism-Nixos $out"; }; -in { - environment.systemPackages = with pkgs; [hack-font]; +in +{ + environment.systemPackages = with pkgs; [ hack-font ]; #fileSystems."/mnt/winsys" = { # device = "/dev/nvme0n1p5"; # fsType = "ntfs-3g"; @@ -43,7 +44,7 @@ in { theme = "rings"; themePackages = with pkgs; [ # By default we would install all themes - (adi1090x-plymouth-themes.override {selected_themes = ["rings"];}) + (adi1090x-plymouth-themes.override { selected_themes = [ "rings" ]; }) ]; }; @@ -62,16 +63,16 @@ in { # Hide the OS choice for bootloaders. # It's still possible to open the bootloader list by pressing any key # It will just not appear on screen unless a key is pressed - supportedFilesystems = ["ntfs"]; + supportedFilesystems = [ "ntfs" ]; loader = { #timeout = 0; - efi = {canTouchEfiVariables = true;}; + efi = { canTouchEfiVariables = true; }; grub = { enable = true; efiSupport = true; device = "nodev"; fsIdentifier = "label"; - devices = ["nodev"]; + devices = [ "nodev" ]; extraConfig = '' function load_video { if [ x$feature_all_video_module = xy ]; then diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 7348d2b..8eae995 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -1,16 +1,14 @@ # This is your system's configuration file. # Use this to configure your system environment (it replaces /etc/nixos/configuration.nix) -{ - inputs, - lib, - config, - pkgs, - ... +{ inputs +, lib +, config +, pkgs +, ... }: { imports = [ ../common/variables.nix ./greetd.nix - #./ly.nix ./bootloader.nix ./nvidia.nix ./fonts.nix @@ -23,13 +21,14 @@ FLAKE = config.myConfigLocation; MANPAGER = "nvim +Man!"; NVD_BACKEND = "direct"; + NIXOS_OZONE_WL = "1"; # GTK_IM_MODULE = lib.mkForce ""; }; services.keyd = { enable = true; keyboards = { default = { - ids = ["*"]; + ids = [ "*" ]; settings = { main = { capslock = "overload(control, esc)"; @@ -49,7 +48,7 @@ enable = true; capSysNice = true; }; - security.pam.services.hyprlock = {}; + security.pam.services.hyprlock = { }; i18n.inputMethod = { type = "fcitx5"; enable = true; @@ -65,7 +64,7 @@ hardware.bluetooth = { enable = true; powerOnBoot = true; - settings = {General = {Disable = "Handsfree,Headset";};}; + settings = { General = { Disable = "Handsfree,Headset"; }; }; }; specialisation = { in-china.configuration = { @@ -77,13 +76,13 @@ }; xdg.portal = { enable = true; - extraPortals = with pkgs; [xdg-desktop-portal-gtk]; - config = {common.default = ["gtk"];}; + extraPortals = with pkgs; [ xdg-desktop-portal-gtk ]; + config = { common.default = [ "gtk" ]; }; }; systemd.user.services.mpris-proxy = { description = "Mpris proxy"; - after = ["network.target" "sound.target"]; - wantedBy = ["default.target"]; + after = [ "network.target" "sound.target" ]; + wantedBy = [ "default.target" ]; serviceConfig.ExecStart = "${pkgs.bluez}/bin/mpris-proxy"; }; programs = { @@ -96,13 +95,13 @@ true; # Open ports in the firewall for Source Dedicated Server localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers - extraCompatPackages = with pkgs; [proton-ge-bin]; + extraCompatPackages = with pkgs; [ proton-ge-bin ]; }; gamemode.enable = true; }; boot = { kernelPackages = pkgs.linuxPackages_zen; - supportedFilesystems = ["ntfs"]; + supportedFilesystems = [ "ntfs" ]; }; documentation = { enable = true; @@ -114,7 +113,7 @@ environment.systemPackages = with pkgs; [ man-pages-posix man-pages - (pass-wayland.withExtensions (exts: [exts.pass-otp exts.pass-import])) + (pass-wayland.withExtensions (exts: [ exts.pass-otp exts.pass-import ])) gparted zed-editor libsForQt5.qt5.qtquickcontrols2 @@ -122,7 +121,7 @@ /* (blender.override { cudaSupport = true; - }) + }) */ trash-cli #inputs.hyprswitch.packages.x86_64-linux.default @@ -154,28 +153,30 @@ # wrapperFeatures.gtk = true; #}; nixpkgs = { - overlays = []; + overlays = [ ]; config = { allowUnfree = true; - permittedInsecurePackages = ["dotnet-core-combined"]; + permittedInsecurePackages = [ "dotnet-core-combined" ]; }; }; - nix = let - flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs; - in { - settings = { - experimental-features = "nix-command flakes"; - # flake-registry = ""; - nix-path = config.nix.nixPath; + nix = + let + flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs; + in + { + settings = { + experimental-features = "nix-command flakes"; + # flake-registry = ""; + nix-path = config.nix.nixPath; + }; + extraOptions = '' + trusted-users = root stvnliu + ''; + channel.enable = false; + registry = lib.mapAttrs (_: flake: { inherit flake; }) flakeInputs; + nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs; }; - extraOptions = '' - trusted-users = root stvnliu - ''; - channel.enable = false; - registry = lib.mapAttrs (_: flake: {inherit flake;}) flakeInputs; - nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs; - }; systemd.network.wait-online.enable = false; networking = { @@ -188,15 +189,15 @@ "${config.myUserName}" = { initialPassword = "stevenpassword"; isNormalUser = true; - openssh.authorizedKeys.keys = []; - packages = with pkgs; [nh]; - extraGroups = ["wheel" "input" "networkmanager"]; + openssh.authorizedKeys.keys = [ ]; + packages = with pkgs; [ nh ]; + extraGroups = [ "wheel" "input" "networkmanager" ]; }; "xi_jinping" = { initialPassword = "bingchilling"; isNormalUser = true; - packages = with pkgs; [git]; - extraGroups = ["input"]; + packages = with pkgs; [ git ]; + extraGroups = [ "input" ]; }; }; # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion diff --git a/nixos/custom-hosts.nix b/nixos/custom-hosts.nix index 942bc4f..954eaf4 100644 --- a/nixos/custom-hosts.nix +++ b/nixos/custom-hosts.nix @@ -1,8 +1,7 @@ -{ - config, - lib, - pkgs, - ... +{ config +, lib +, pkgs +, ... }: { networking.extraHosts = '' # home IP mapping diff --git a/nixos/fonts.nix b/nixos/fonts.nix index 2c29f8c..4de6abf 100644 --- a/nixos/fonts.nix +++ b/nixos/fonts.nix @@ -1,4 +1,4 @@ -{pkgs, ...}: { +{ pkgs, ... }: { fonts.packages = with pkgs; [ helvetica-neue-lt-std diff --git a/nixos/greetd.nix b/nixos/greetd.nix index 212cde7..ae2f3ce 100644 --- a/nixos/greetd.nix +++ b/nixos/greetd.nix @@ -1,11 +1,12 @@ -{ - pkgs, - config, - lib, - ... -}: let +{ pkgs +, config +, lib +, ... +}: +let tuigreet = "${pkgs.greetd.tuigreet}/bin/tuigreet"; -in { +in +{ services.greetd = { enable = true; settings = { diff --git a/nixos/hardware-configuration.nix b/nixos/hardware-configuration.nix index 020471e..1dc6755 100644 --- a/nixos/hardware-configuration.nix +++ b/nixos/hardware-configuration.nix @@ -1,21 +1,20 @@ # Do not modify this file! It was generated by ‘nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. -{ - config, - lib, - pkgs, - modulesPath, - ... +{ config +, lib +, pkgs +, modulesPath +, ... }: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "usbhid"]; - boot.initrd.kernelModules = []; - boot.kernelModules = ["kvm-amd"]; - boot.extraModulePackages = []; + boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usbhid" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; fileSystems."/" = { device = "/dev/disk/by-uuid/f9ff609f-6e72-43cf-917c-3bd3fde6c410"; @@ -25,7 +24,7 @@ fileSystems."/boot" = { device = "/dev/disk/by-uuid/2E4F-3060"; fsType = "vfat"; - options = ["fmask=0022" "dmask=0022"]; + options = [ "fmask=0022" "dmask=0022" ]; }; fileSystems."/games" = { @@ -33,7 +32,7 @@ fsType = "ext4"; }; - swapDevices = []; + swapDevices = [ ]; # 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 diff --git a/nixos/ly.nix b/nixos/ly.nix deleted file mode 100644 index 20482d0..0000000 --- a/nixos/ly.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - pkgs, - config, - ... -}: { - services.displayManager.ly = { - enable = true; - }; -} diff --git a/nixos/nvidia.nix b/nixos/nvidia.nix index e28d41e..bb2f679 100644 --- a/nixos/nvidia.nix +++ b/nixos/nvidia.nix @@ -1,8 +1,7 @@ -{ - config, - lib, - pkgs, - ... +{ config +, lib +, pkgs +, ... }: { specialisation = { powersave.configuration = { @@ -15,14 +14,14 @@ }; }; }; - boot.kernelModules = ["nvidia_uvm"]; + boot.kernelModules = [ "nvidia_uvm" ]; hardware.graphics = { enable = true; extraPackages = with pkgs; [ libvdpau-va-gl ]; }; - services.xserver.videoDrivers = ["nvidia"]; + services.xserver.videoDrivers = [ "nvidia" ]; hardware.nvidia = { dynamicBoost.enable = true; prime = { diff --git a/nixos/sddm-theme.nix b/nixos/sddm-theme.nix index 463038d..b285337 100644 --- a/nixos/sddm-theme.nix +++ b/nixos/sddm-theme.nix @@ -1,4 +1,4 @@ -{pkgs, ...}: +{ pkgs, ... }: pkgs.stdenv.mkDerivation { name = "sddm-theme"; src = pkgs.fetchFromGitHub { diff --git a/nixos/services/avahi.service.nix b/nixos/services/avahi.service.nix index 4187309..b0bd53f 100644 --- a/nixos/services/avahi.service.nix +++ b/nixos/services/avahi.service.nix @@ -1,4 +1,4 @@ -{...}: { +{ ... }: { services.avahi = { enable = true; nssmdns4 = true; diff --git a/nixos/services/laptop.preset.nix b/nixos/services/laptop.preset.nix index 17f72ae..96e097e 100644 --- a/nixos/services/laptop.preset.nix +++ b/nixos/services/laptop.preset.nix @@ -1,4 +1,4 @@ -{...}: { +{ ... }: { imports = [ ./nginx.service.nix ./pipewire.service.nix @@ -10,5 +10,6 @@ ./power_management.service.nix ./seatd.service.nix ./logind.service.nix + #./mpd.service.nix ]; } diff --git a/nixos/services/logind.service.nix b/nixos/services/logind.service.nix index 6d54e20..7de7ea0 100644 --- a/nixos/services/logind.service.nix +++ b/nixos/services/logind.service.nix @@ -1,8 +1,7 @@ -{ - pkgs, - config, - lib, - ... +{ pkgs +, config +, lib +, ... }: { services.logind.extraConfig = '' # don't shutdown in short press diff --git a/nixos/services/misc.service.nix b/nixos/services/misc.service.nix index 72fcd2c..86f490d 100644 --- a/nixos/services/misc.service.nix +++ b/nixos/services/misc.service.nix @@ -1,4 +1,4 @@ -{...}: { +{ ... }: { specialisation.powersave.configuration = { services.auto-cpufreq.enable = true; }; diff --git a/nixos/services/nginx.service.nix b/nixos/services/nginx.service.nix index bd8b2ef..53025c3 100644 --- a/nixos/services/nginx.service.nix +++ b/nixos/services/nginx.service.nix @@ -1,7 +1,6 @@ -{ - pkgs, - config, - ... +{ pkgs +, config +, ... }: { services.nginx = { enable = true; @@ -15,8 +14,8 @@ ''; }; }; - listenAddresses = ["127.0.0.1" "[::1]"]; + listenAddresses = [ "127.0.0.1" "[::1]" ]; }; }; - networking.firewall.allowedTCPPorts = [80]; + networking.firewall.allowedTCPPorts = [ 80 ]; } diff --git a/nixos/services/pipewire.service.nix b/nixos/services/pipewire.service.nix index be0cc76..83548a4 100644 --- a/nixos/services/pipewire.service.nix +++ b/nixos/services/pipewire.service.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: let +{ pkgs, ... }: +let pw_rnnoise_config = { "context.modules" = [ { @@ -13,11 +14,11 @@ "name" = "rnnoise"; "plugin" = "${pkgs.rnnoise-plugin}/lib/ladspa/librnnoise_ladspa.so"; "label" = "noise_suppressor_stereo"; - "control" = {"VAD Threshold (%)" = 50.0;}; + "control" = { "VAD Threshold (%)" = 50.0; }; } ]; }; - "audio.position" = ["FL" "FR"]; + "audio.position" = [ "FL" "FR" ]; "capture.props" = { "node.name" = "effect_input.rnnoise"; "node.passive" = true; @@ -30,7 +31,8 @@ } ]; }; -in { +in +{ services.pipewire = { enable = true; alsa = { @@ -42,33 +44,33 @@ in { wireplumber.configPackages = [ (pkgs.writeTextDir "share/wireplumber/wireplumber.conf.d/52-profile-switch.conf" '' - wireplumber.settings = { - bluetooth.autoswitch-to-headset-profile = false - } + wireplumber.settings = { + bluetooth.autoswitch-to-headset-profile = false + } - monitor.bluez.properties = { - ## Supported roles: hsp_hs (HSP Headset), - ## hsp_ag (HSP Audio Gateway), - ## hfp_hf (HFP Hands-Free), - ## hfp_ag (HFP Audio Gateway) - ## a2dp_sink (A2DP Audio Sink) - ## a2dp_source (A2DP Audio Source) - ## bap_sink (LE Audio Basic Audio Profile Sink) - ## bap_source (LE Audio Basic Audio Profile Source) - ## -- - ## Only enable A2DP here and disable HFP. See note at the top as to why. - bluez5.roles = [ a2dp_sink a2dp_source ] - } - '') + monitor.bluez.properties = { + ## Supported roles: hsp_hs (HSP Headset), + ## hsp_ag (HSP Audio Gateway), + ## hfp_hf (HFP Hands-Free), + ## hfp_ag (HFP Audio Gateway) + ## a2dp_sink (A2DP Audio Sink) + ## a2dp_source (A2DP Audio Source) + ## bap_sink (LE Audio Basic Audio Profile Sink) + ## bap_source (LE Audio Basic Audio Profile Source) + ## -- + ## Only enable A2DP here and disable HFP. See note at the top as to why. + bluez5.roles = [ a2dp_sink a2dp_source ] + } + '') (pkgs.writeTextDir "share/wireplumber/bluetooth.lua.d/51-bluez-config.lua" '' - bluez_monitor.properties = { - ["bluez5.enable-sbc-xq"] = true, - ["bluez5.enable-msbc"] = true, - ["bluez5.enable-hw-volume"] = true, - ["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]" - } - '') + bluez_monitor.properties = { + ["bluez5.enable-sbc-xq"] = true, + ["bluez5.enable-msbc"] = true, + ["bluez5.enable-hw-volume"] = true, + ["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]" + } + '') ]; #extraConfig.pipewire."99-input-denoising" = pw_rnnoise_config; }; diff --git a/nixos/services/power_management.service.nix b/nixos/services/power_management.service.nix index 06d638b..e86d18c 100644 --- a/nixos/services/power_management.service.nix +++ b/nixos/services/power_management.service.nix @@ -1,8 +1,7 @@ -{ - pkgs, - config, - lib, - ... +{ pkgs +, config +, lib +, ... }: { services.tlp = { enable = true; diff --git a/nixos/services/printing.service.nix b/nixos/services/printing.service.nix index a89c732..88c01b2 100644 --- a/nixos/services/printing.service.nix +++ b/nixos/services/printing.service.nix @@ -1,6 +1,6 @@ -{...}: { +{ ... }: { services.printing = { enable = true; - drivers = []; + drivers = [ ]; }; } diff --git a/nixos/services/seatd.service.nix b/nixos/services/seatd.service.nix index 8207217..fe75f90 100644 --- a/nixos/services/seatd.service.nix +++ b/nixos/services/seatd.service.nix @@ -1,8 +1,7 @@ -{ - pkgs, - config, - lib, - ... +{ pkgs +, config +, lib +, ... }: { services.seatd = { enable = true; diff --git a/nixos/services/syncthing.service.nix b/nixos/services/syncthing.service.nix index 47015e2..bd53243 100644 --- a/nixos/services/syncthing.service.nix +++ b/nixos/services/syncthing.service.nix @@ -1,8 +1,7 @@ -{ - pkgs, - config, - lib, - ... +{ pkgs +, config +, lib +, ... }: { services = { syncthing = { @@ -12,6 +11,6 @@ configDir = "/home/${config.myUserName}/.config/syncthing"; }; }; - networking.firewall.allowedTCPPorts = [8384 22000]; - networking.firewall.allowedUDPPorts = [22000 21027]; + networking.firewall.allowedTCPPorts = [ 8384 22000 ]; + networking.firewall.allowedUDPPorts = [ 22000 21027 ]; } diff --git a/nixos/services/tailscale.service.nix b/nixos/services/tailscale.service.nix index d0fbde1..d373aa9 100644 --- a/nixos/services/tailscale.service.nix +++ b/nixos/services/tailscale.service.nix @@ -1,7 +1,6 @@ -{ - pkgs, - config, - ... +{ pkgs +, config +, ... }: { services.tailscale = { enable = true; diff --git a/nixos/virtualisation.nix b/nixos/virtualisation.nix index ccf9fe9..c91d0e2 100644 --- a/nixos/virtualisation.nix +++ b/nixos/virtualisation.nix @@ -1,8 +1,7 @@ -{ - pkgs, - lib, - config, - ... +{ pkgs +, lib +, config +, ... }: { virtualisation = { libvirtd.enable = true; @@ -13,5 +12,5 @@ #virtualisation.virtualbox.host = { # enable = true; #}; - users.users."${config.myUserName}".extraGroups = ["libvirtd"]; + users.users."${config.myUserName}".extraGroups = [ "libvirtd" ]; } |