From c7353452ee35d3c510b27107e7c9262e63caaa82 Mon Sep 17 00:00:00 2001 From: Asmir A Date: Fri, 29 Sep 2023 21:13:48 +0200 Subject: [PATCH] meta: format blue/configuration.nix --- blue/configuration.nix | 74 +++++++++++++++++++++++------------------- 1 file changed, 40 insertions(+), 34 deletions(-) diff --git a/blue/configuration.nix b/blue/configuration.nix index e3cd396..7f5f824 100644 --- a/blue/configuration.nix +++ b/blue/configuration.nix @@ -1,13 +1,14 @@ # Edit this configuration file to define what should be installed on # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). - -{ config, pkgs, lib, ... }: { - imports = - [ - ]; - + config, + pkgs, + lib, + ... +}: { + imports = [ + ]; system.stateVersion = "23.05"; system.autoUpgrade.enable = true; @@ -17,13 +18,13 @@ gc.automatic = true; gc.options = "--delete-older-than 7d"; package = pkgs.nixUnstable; - settings.experimental-features = [ "nix-command" "flakes" ]; + settings.experimental-features = ["nix-command" "flakes"]; }; boot = { kernelPackages = pkgs.linuxPackages_latest; - kernelParams = [ "msr.allow_writes=on" ]; - supportedFilesystems = [ "btrfs" ]; + kernelParams = ["msr.allow_writes=on"]; + supportedFilesystems = ["btrfs"]; tmpOnTmpfs = true; initrd.compressor = "zstd"; loader.systemd-boot.enable = true; @@ -36,11 +37,13 @@ allowSimultaneousMultithreading = true; sudo.enable = false; doas.enable = true; - doas.extraRules = [{ - users = [ "akill" ]; - keepEnv = true; - persist = true; - }]; + doas.extraRules = [ + { + users = ["akill"]; + keepEnv = true; + persist = true; + } + ]; }; powerManagement = { @@ -50,15 +53,16 @@ networking = { firewall.enable = true; hostName = "blue"; - nameservers = [ "127.0.0.1" "::1" ]; + nameservers = ["127.0.0.1" "::1"]; dhcpcd.extraConfig = "nohook resolv.conf"; networkmanager = { enable = true; dns = "none"; - /*wifi.backend = "iwd"; */ + /* + wifi.backend = "iwd"; + */ }; - }; time.timeZone = "Europe/Sarajevo"; @@ -72,7 +76,10 @@ }; programs = { - gnupg.agent = { enable = true; enableSSHSupport = true; }; + gnupg.agent = { + enable = true; + enableSSHSupport = true; + }; zsh.enable = true; firejail.enable = true; adb.enable = true; @@ -85,8 +92,8 @@ services = { "caps2esc" = { description = "Intercepts keyboard udev events"; - wants = [ "systemd-udevd.service" ]; - wantedBy = [ "multi-user.target" ]; + wants = ["systemd-udevd.service"]; + wantedBy = ["multi-user.target"]; serviceConfig.Nice = -20; script = '' ${pkgs.interception-tools}/bin/intercept \ @@ -145,7 +152,7 @@ windowManager.i3.enable = true; }; - udev.packages = [ pkgs.rtl-sdr pkgs.openhantek6022 ]; + udev.packages = [pkgs.rtl-sdr pkgs.openhantek6022]; tlp = { enable = true; @@ -154,34 +161,33 @@ actkbd = { enable = true; bindings = [ - { - keys = [ 113 ]; - events = [ "key" ]; + keys = [113]; + events = ["key"]; command = "/run/current-system/sw/bin/runuser -l akill -c 'amixer -q set Master toggle'"; } { - keys = [ 114 ]; - events = [ "key" "rep" ]; + keys = [114]; + events = ["key" "rep"]; command = "/run/current-system/sw/bin/runuser -l akill -c 'amixer -q set Master 5%- unmute'"; } { - keys = [ 115 ]; - events = [ "key" "rep" ]; + keys = [115]; + events = ["key" "rep"]; command = "/run/current-system/sw/bin/runuser -l akill -c 'amixer -q set Master 5%+ unmute'"; } { - keys = [ 224 ]; - events = [ "key" ]; + keys = [224]; + events = ["key"]; command = "${pkgs.light}/bin/light -U 5"; } { - keys = [ 225 ]; - events = [ "key" ]; + keys = [225]; + events = ["key"]; command = "${pkgs.light}/bin/light -A 5"; } ]; @@ -231,7 +237,7 @@ allowBitmaps = true; useEmbeddedBitmaps = true; defaultFonts = { - monospace = [ "JetBrainsMono" ]; + monospace = ["JetBrainsMono"]; }; }; @@ -300,6 +306,6 @@ users.users.akill = { isNormalUser = true; shell = pkgs.zsh; - extraGroups = [ "wireshark" "kvm" "tty" "audio" "sound" "adbusers" "dialout" ]; + extraGroups = ["wireshark" "kvm" "tty" "audio" "sound" "adbusers" "dialout"]; }; }