From ce3af3b61e530d9c19d1af7478e05bce1c7ce527 Mon Sep 17 00:00:00 2001 From: Dmitriy Kholkin Date: Wed, 14 Dec 2022 23:51:59 +0300 Subject: [PATCH] update --- profiles/applications/packages.nix | 2 +- profiles/applications/vscode/default.nix | 52 +++++++++--------- profiles/boot.nix | 4 +- profiles/overlay.nix | 2 +- profiles/security.nix | 4 +- profiles/services.nix | 14 +++-- profiles/sound/easyeffects/Bluetooth.json | 65 +++++++++++++++++------ profiles/workspace/locale.nix | 8 +-- profiles/workspace/proxy.nix | 18 +++++-- profiles/workspace/waybar/default.nix | 2 +- 10 files changed, 114 insertions(+), 57 deletions(-) diff --git a/profiles/applications/packages.nix b/profiles/applications/packages.nix index d563b77..e833006 100644 --- a/profiles/applications/packages.nix +++ b/profiles/applications/packages.nix @@ -80,7 +80,7 @@ with config.deviceSpecific; { duf zsh-z - inputs.webcord.packages.${pkgs.system}.default + inputs.webcord.packages.${pkgs.hostPlatform.system}.default ] ++ lib.optionals (!(isVM || isISO)) [ audacity blueman diff --git a/profiles/applications/vscode/default.nix b/profiles/applications/vscode/default.nix index ab7d9ba..f3913a7 100644 --- a/profiles/applications/vscode/default.nix +++ b/profiles/applications/vscode/default.nix @@ -28,7 +28,9 @@ in with inputs.nix-vscode-marketplace.packages.${pkgs.system}.open-vsx; with pkgs.vscode-extensions; let - nixpkgs-extensions = pkgs.vscode-extensions; + vscode = inputs.nix-vscode-marketplace.packages.${pkgs.system}.vscode; + open-vsx = inputs.nix-vscode-marketplace.packages.${pkgs.system}.open-vsx; + nixpkgs = pkgs.vscode-extensions; in [ (inputs.direnv-vscode.packages.${pkgs.system}.vsix.overrideAttrs (_: { buildPhase = "yarn run build"; @@ -39,31 +41,31 @@ in })) (pkgs.callPackage ./theme.nix { mainuser = config.mainuser; } config.lib.base16.theme) - aaron-bond.better-comments - alefragnani.bookmarks - alefragnani.project-manager - # arrterian.nix-env-selector - # bbenoist.nix - bungcip.better-toml - catppuccin.catppuccin-vsc - christian-kohler.path-intellisense - codezombiech.gitignore - dart-code.dart-code + vscode.aaron-bond.better-comments + vscode.alefragnani.bookmarks + vscode.alefragnani.project-manager + # vscode.arrterian.nix-env-selector + # vscode.bbenoist.nix + vscode.bungcip.better-toml + vscode.catppuccin.catppuccin-vsc + vscode.christian-kohler.path-intellisense + vscode.codezombiech.gitignore + vscode.dart-code.dart-code # dlasagno.wal-theme - eamodio.gitlens - enkia.tokyo-night - equinusocio.vsc-material-theme-icons - felixangelov.bloc - github.vscode-pull-request-github - irongeek.vscode-env - jebbs.plantuml - jnoortheen.nix-ide - lucax88x.codeacejumper - marcelovelasquez.flutter-tree - mhutchie.git-graph - ms-azuretools.vscode-docker - ms-vscode-remote.remote-ssh - # ms-vscode-remote.remote-ssh-edit + vscode.eamodio.gitlens-insiders + vscode.enkia.tokyo-night + vscode.equinusocio.vsc-material-theme-icons + vscode.felixangelov.bloc + vscode.github.vscode-pull-request-github + vscode.irongeek.vscode-env + vscode.jebbs.plantuml + vscode.jnoortheen.nix-ide + vscode.lucax88x.codeacejumper + vscode.marcelovelasquez.flutter-tree + vscode.mhutchie.git-graph + vscode.ms-azuretools.vscode-docker + vscode.ms-vscode-remote.remote-ssh + # vscode.ms-vscode-remote.remote-ssh-edit ]; # ++ [ (import ./extensions.nix).extensions ]; # extensions = with pkgs.vscode-extensions; diff --git a/profiles/boot.nix b/profiles/boot.nix index 9f3dd52..cc43041 100644 --- a/profiles/boot.nix +++ b/profiles/boot.nix @@ -12,11 +12,11 @@ with config.deviceSpecific; { boot = if !isServer && !isISO then { loader = { timeout = lib.mkForce 4; - systemd-boot.enable = pkgs.system == "x86_64-linux"; + systemd-boot.enable = pkgs.hostPlatform.system == "x86_64-linux"; }; kernelParams = [ "zswap.enabled=0" "quiet" "scsi_mod.use_blk_mq=1" "modeset" "nofb" ] - ++ lib.optionals (pkgs.system == "x86_64-linux") [ + ++ lib.optionals (pkgs.hostPlatform.system == "x86_64-linux") [ "rd.systemd.show_status=auto" "rd.udev.log_priority=3" "pti=off" diff --git a/profiles/overlay.nix b/profiles/overlay.nix index d9c3b96..899c123 100644 --- a/profiles/overlay.nix +++ b/profiles/overlay.nix @@ -1,6 +1,6 @@ { pkgs, config, lib, inputs, ... }: let - inherit (pkgs) system; + inherit (pkgs.hostPlatform) system; master = import inputs.nixpkgs-master ({ config = config.nixpkgs.config; localSystem = { inherit system; }; diff --git a/profiles/security.nix b/profiles/security.nix index 84566ae..c59f361 100644 --- a/profiles/security.nix +++ b/profiles/security.nix @@ -22,13 +22,15 @@ with config.deviceSpecific; { "podman" "qemu-libvirtd" "scanner" + "systemd-journal" "smbuser" "video" # "wheel" # remove? ]; description = "AtaraxiaDev"; uid = 1000; - hashedPassword = "$6$kDBGyd99tto$9LjQwixa7NYB9Kaey002MD94zHob1MmNbVz9kx3yX6Q4AmVgsFMGUyNuHozXprxyuXHIbOlTcf8nd4rK8MWfI/"; + hashedPassword = "$y$j9T$ZC44T3XYOPapB26cyPsA4.$8wlYEbwXFszC9nrg0vafqBZFLMPabXdhnzlT3DhUit6"; + shell = pkgs.zsh; }; # Safe, because we using doas diff --git a/profiles/services.nix b/profiles/services.nix index 74d7642..e0da796 100644 --- a/profiles/services.nix +++ b/profiles/services.nix @@ -34,14 +34,22 @@ with config.deviceSpecific; { freeSwapThreshold = 100; }; - services.fstrim = { - enable = isSSD && devInfo.fileSystem != "zfs"; + services.fstrim = lib.mkIf (devInfo.fileSystem != "zfs") { + enable = isSSD; interval = "weekly"; }; - services.zfs.trim.enable = isSSD && devInfo.fileSystem == "zfs"; + + services.zfs = lib.mkIf (devInfo.fileSystem == "zfs") { + autoScrub.enable = true; + autoScrub.interval = "daily"; + trim.enable = isSSD; + trim.interval = "weekly"; + }; services.gvfs.enable = !isServer; + services.nscd.enableNsncd = true; + # FIX! #services.thermald.enable = isLaptop; diff --git a/profiles/sound/easyeffects/Bluetooth.json b/profiles/sound/easyeffects/Bluetooth.json index e716edd..ec0a713 100644 --- a/profiles/sound/easyeffects/Bluetooth.json +++ b/profiles/sound/easyeffects/Bluetooth.json @@ -2,11 +2,13 @@ "output": { "blocklist": [], "equalizer": { + "balance": 0.0, + "bypass": false, "input-gain": 0.0, "left": { "band0": { "frequency": 22.0, - "gain": 2.6, + "gain": 3.0, "mode": "APO (DR)", "mute": false, "q": 0.5, @@ -16,7 +18,7 @@ }, "band1": { "frequency": 237.0, - "gain": 0.0, + "gain": 2.0, "mode": "APO (DR)", "mute": false, "q": 0.9200000166893005, @@ -108,10 +110,12 @@ "mode": "IIR", "num-bands": 10, "output-gain": 0.0, + "pitch-left": 0.0, + "pitch-right": 0.0, "right": { "band0": { "frequency": 22.0, - "gain": 2.6, + "gain": 3.0, "mode": "APO (DR)", "mute": false, "q": 0.5, @@ -121,7 +125,7 @@ }, "band1": { "frequency": 237.0, - "gain": 0.0, + "gain": 2.0, "mode": "APO (DR)", "mute": false, "q": 0.9200000166893005, @@ -213,19 +217,50 @@ "split-channels": false }, "limiter": { - "asc": false, - "asc-level": 0.5, - "auto-level": false, - "input-gain": -4.0, - "limit": 0.0, + "alr": false, + "alr-attack": 5.0, + "alr-knee": 0.0, + "alr-release": 50.0, + "attack": 5.0, + "bypass": false, + "dithering": "None", + "external-sidechain": false, + "gain-boost": true, + "input-gain": 0.0, "lookahead": 5.0, - "output-gain": 0.0, - "oversampling": 1, - "release": 50.0 + "mode": "Herm Thin", + "output-gain": -3.0, + "oversampling": "None", + "release": 5.0, + "sidechain-preamp": 0.0, + "stereo-link": 100.0, + "threshold": 0.0 }, "plugins_order": [ "limiter", - "equalizer" - ] + "equalizer", + "stereo_tools" + ], + "stereo_tools": { + "balance-in": 0.0, + "balance-out": 0.12000000000000006, + "bypass": false, + "delay": 0.0, + "input-gain": 0.0, + "middle-level": 0.0, + "middle-panorama": 0.0, + "mode": "LR > LR (Stereo Default)", + "mutel": false, + "muter": false, + "output-gain": 0.0, + "phasel": false, + "phaser": false, + "sc-level": 1.0, + "side-balance": 0.0, + "side-level": 0.0, + "softclip": false, + "stereo-base": 0.0, + "stereo-phase": 0.0 + } } -} +} \ No newline at end of file diff --git a/profiles/workspace/locale.nix b/profiles/workspace/locale.nix index 4bf978b..9b56ab9 100644 --- a/profiles/workspace/locale.nix +++ b/profiles/workspace/locale.nix @@ -1,6 +1,6 @@ { pkgs, config, lib, ... }: with config.deviceSpecific; { - i18n.defaultLocale = "en_GB.utf8"; + i18n.defaultLocale = "en_GB.UTF-8"; console.font = "cyr-sun16"; # console.keyMap = "ruwin_cplk-UTF-8"; @@ -8,7 +8,7 @@ with config.deviceSpecific; { environment.sessionVariables = { XKB_DEFAULT_LAYOUT = "us,ru"; XKB_DEFAULT_OPTIONS = "grp:win_space_toggle"; - LANG = lib.mkForce "en_GB.utf8"; + LANG = lib.mkForce "en_GB.UTF-8"; }; time.timeZone = "Europe/Moscow"; @@ -21,8 +21,8 @@ with config.deviceSpecific; { home-manager.users.${config.mainuser} = { home.language = let - en = "en_GB.utf8"; - ru = "ru_RU.utf8"; + en = "en_GB.UTF-8"; + ru = "ru_RU.UTF-8"; in { address = ru; monetary = ru; diff --git a/profiles/workspace/proxy.nix b/profiles/workspace/proxy.nix index 507dc05..f347abe 100644 --- a/profiles/workspace/proxy.nix +++ b/profiles/workspace/proxy.nix @@ -10,17 +10,27 @@ }; containers.tor = { + autoStart = true; - privateNetwork = true; + + ephemeral = true; + # extraFlags = [ "-U" ]; # unprivileged hostAddress = "192.168.1.10"; localAddress = "192.168.1.11"; + privateNetwork = true; + tmpfs = [ "/" ]; bindMounts."/var/secrets" = { hostPath = "/var/secrets"; isReadOnly = true; }; - tmpfs = [ "/" ]; - ephemeral = true; config = { config, pkgs, ... }: { + # users.mutableUsers = false; + # users.users.${config.mainuser} = { + # isNormalUser = true; + # extraGroups = [ "wheel" ]; + # hashedPassword = "$6$kDBGyd99tto$9LjQwixa7NYB9Kaey002MD94zHob1MmNbVz9kx3yX6Q4AmVgsFMGUyNuHozXprxyuXHIbOlTcf8nd4rK8MWfI/"; + # }; + services.tor.enable = true; systemd.services.tor-config = { @@ -42,7 +52,7 @@ networking.firewall = { enable = true; allowedTCPPorts = [ 9050 ]; - rejectPackets = true; + rejectPackets = false; }; # environment.etc."resolv.conf".text = "nameserver 192.168.0.1"; system.stateVersion = "22.11"; diff --git a/profiles/workspace/waybar/default.nix b/profiles/workspace/waybar/default.nix index 9a675c9..02f098d 100644 --- a/profiles/workspace/waybar/default.nix +++ b/profiles/workspace/waybar/default.nix @@ -2,7 +2,7 @@ with config.deviceSpecific; { home-manager.users.${config.mainuser}.programs.waybar = { enable = true; - # package = inputs.nixpkgs-wayland.packages.${pkgs.system}.waybar; + # package = inputs.nixpkgs-wayland.packages.${pkgs.hostPlatform.system}.waybar; settings = { mainBar = { layer = "top";