diff options
Diffstat (limited to 'share/system')
| -rw-r--r-- | share/system/client-common.nix | 25 | ||||
| -rw-r--r-- | share/system/common.nix | 8 | ||||
| -rw-r--r-- | share/system/spotifyd.nix | 6 | ||||
| -rw-r--r-- | share/system/steam.nix | 12 | ||||
| -rw-r--r-- | share/system/virt.nix | 18 |
5 files changed, 49 insertions, 20 deletions
diff --git a/share/system/client-common.nix b/share/system/client-common.nix index 4d3c3ca..e3d2b60 100644 --- a/share/system/client-common.nix +++ b/share/system/client-common.nix @@ -1,9 +1,13 @@ # Common configuration options for client machines (i.e. not servers) -{ pkgs, ... }: { +{ pkgs, ... }: +{ imports = [ ./steam.nix ]; programs.hyprland.enable = true; - boot.supportedFilesystems = [ "ntfs" "bcachefs" ]; + boot.supportedFilesystems = [ + "ntfs" + "bcachefs" + ]; nixpkgs.config.allowUnfree = true; nix.gc = { @@ -17,7 +21,11 @@ useNetworkd = true; firewall = { enable = true; - allowedTCPPorts = [ 80 443 34197 ]; + allowedTCPPorts = [ + 80 + 443 + 34197 + ]; }; }; services.mullvad-vpn.enable = true; @@ -34,7 +42,9 @@ enable = true; enableSSHSupport = true; pinentryPackage = pkgs.pinentry-gnome3; - settings = { default-cache-ttl = 1200; }; + settings = { + default-cache-ttl = 1200; + }; }; sound.enable = true; @@ -49,7 +59,12 @@ noto-fonts-cjk noto-fonts-emoji proggyfonts - (nerdfonts.override { fonts = [ "FiraCode" "CascadiaCode" ]; }) + (nerdfonts.override { + fonts = [ + "FiraCode" + "CascadiaCode" + ]; + }) overpass inter ]; diff --git a/share/system/common.nix b/share/system/common.nix index b280667..a785573 100644 --- a/share/system/common.nix +++ b/share/system/common.nix @@ -1,8 +1,12 @@ # Common system settings shared across every machine # Used mostly for adding substituters and such -{ ... }: { +{ ... }: +{ nix.settings = { - experimental-features = [ "nix-command" "flakes" ]; + experimental-features = [ + "nix-command" + "flakes" + ]; auto-optimise-store = true; }; } diff --git a/share/system/spotifyd.nix b/share/system/spotifyd.nix index 5e04898..406d5bf 100644 --- a/share/system/spotifyd.nix +++ b/share/system/spotifyd.nix @@ -1,6 +1,8 @@ { config, ... }: -let secrets = config.sops.secrets; -in { +let + secrets = config.sops.secrets; +in +{ services.spotifyd = { enable = true; settings.global = { diff --git a/share/system/steam.nix b/share/system/steam.nix index 7137bfa..4217d9d 100644 --- a/share/system/steam.nix +++ b/share/system/steam.nix @@ -1,23 +1,23 @@ -{ lib, ... }: { +{ lib, ... }: +{ programs.steam.enable = true; nixpkgs.config = { - allowUnfreePredicate = pkg: + allowUnfreePredicate = + pkg: builtins.elem (lib.getName pkg) [ "steam" "steam-original" "steam-runtime" ]; packageOverrides = pkgs: { - steam = - pkgs.steam.override { extraPkgs = pkgs: with pkgs; [ libgdiplus ]; }; + steam = pkgs.steam.override { extraPkgs = pkgs: with pkgs; [ libgdiplus ]; }; }; }; environment.sessionVariables = rec { # Steam needs this to find Proton-GE - STEAM_EXTRA_COMPAT_TOOLS_PATHS = - "\${HOME}/.steam/root/compatibilitytools.d"; + STEAM_EXTRA_COMPAT_TOOLS_PATHS = "\${HOME}/.steam/root/compatibilitytools.d"; # note: this doesn't replace PATH, it just adds this to it PATH = [ "\${XDG_BIN_HOME}" ]; }; diff --git a/share/system/virt.nix b/share/system/virt.nix index 6f5a9fe..ac74332 100644 --- a/share/system/virt.nix +++ b/share/system/virt.nix @@ -1,10 +1,18 @@ -{ pkgs, virt-users ? [ ], ... }: +{ + pkgs, + virt-users ? [ ], + ... +}: let # https://stackoverflow.com/questions/75855410/nix-map-list-of-keys-to-attribute-set-members - attrSetRepeatValue = value: list: - let acc = { }; # accumulator - in builtins.foldl' (acc: key: acc // { "${key}" = value; }) acc list; -in { + attrSetRepeatValue = + value: list: + let + acc = { }; # accumulator + in + builtins.foldl' (acc: key: acc // { "${key}" = value; }) acc list; +in +{ users.users = attrSetRepeatValue { extraGroups = [ "libvirtd" ]; } virt-users; home-manager.users = attrSetRepeatValue { |
