From 7e1758bfb28fa11ab33f7e3eb5ba765761db4aeb Mon Sep 17 00:00:00 2001 From: teutat3s Date: Thu, 18 May 2023 00:04:39 +0200 Subject: [PATCH] wip: track nixos-unstable --- flake.lock | 91 ++++++++++-------------- flake.nix | 4 +- modules/audio/default.nix | 47 +++++++----- modules/audio/pipewire-pulse.conf.json | 36 ---------- modules/core/packages.nix | 1 + modules/core/services.nix | 2 +- modules/graphical/default.nix | 2 +- modules/terminal-life/bash/default.nix | 2 +- overlays/blesh.nix | 7 +- pkgs/sources.toml | 6 -- profiles/base-user/session-variables.nix | 2 +- 11 files changed, 78 insertions(+), 122 deletions(-) delete mode 100644 modules/audio/pipewire-pulse.conf.json diff --git a/flake.lock b/flake.lock index 421c2065..65b4feed 100644 --- a/flake.lock +++ b/flake.lock @@ -91,15 +91,15 @@ }, "devshell_2": { "inputs": { - "flake-utils": "flake-utils_4", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs", + "systems": "systems" }, "locked": { - "lastModified": 1682700442, - "narHash": "sha256-qjaAAcCYgp1pBBG7mY9z95ODUBZMtUpf0Qp3Gt/Wha0=", + "lastModified": 1683635384, + "narHash": "sha256-9goJTd05yOyD/McaMqZ4BUB8JW+mZMnZQJZ7VQ6C/Lw=", "owner": "numtide", "repo": "devshell", - "rev": "fb6673fe9fe4409e3f43ca86968261e970918a83", + "rev": "5143ea68647c4cf5227e4ad2100db6671fc4c369", "type": "github" }, "original": { @@ -232,23 +232,8 @@ } }, "flake-utils_4": { - "locked": { - "lastModified": 1642700792, - "narHash": "sha256-XqHrk7hFb+zBvRg6Ghl+AZDq03ov6OshJLiSWOoX5es=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "846b2ae0fc4cc943637d3d1def4454213e203cba", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_5": { "inputs": { - "systems": "systems" + "systems": "systems_2" }, "locked": { "lastModified": 1681202837, @@ -268,31 +253,29 @@ "inputs": { "nixpkgs": [ "nixos" - ], - "utils": "utils_2" + ] }, "locked": { - "lastModified": 1681092193, - "narHash": "sha256-JerCqqOqbT2tBnXQW4EqwFl0hHnuZp21rIQ6lu/N4rI=", + "lastModified": 1684157850, + "narHash": "sha256-xGHTCgvAxO5CgAL6IAgE/VGRX2wob2Y+DPyqpXJ32oQ=", "owner": "nix-community", "repo": "home-manager", - "rev": "f9edbedaf015013eb35f8caacbe0c9666bbc16af", + "rev": "c0deab0effd576e70343cb5df0c64428e0e0d010", "type": "github" }, "original": { "owner": "nix-community", - "ref": "release-22.11", "repo": "home-manager", "type": "github" } }, "latest": { "locked": { - "lastModified": 1684139381, - "narHash": "sha256-YPLMeYE+UzxxP0qbkBzv3RBDvyGR5I4d7v2n8dI3+fY=", + "lastModified": 1684215771, + "narHash": "sha256-fsum28z+g18yreNa1Y7MPo9dtps5h1VkHfZbYQ+YPbk=", "owner": "nixos", "repo": "nixpkgs", - "rev": "17a689596b72d1906883484838eb1aaf51ab8001", + "rev": "963006aab35e3e8ebbf6052b6bf4ea712fdd3c28", "type": "github" }, "original": { @@ -320,16 +303,16 @@ }, "nixos": { "locked": { - "lastModified": 1684130981, - "narHash": "sha256-5IPp/rUAOogega5xuRoxcpfkwlGDAyWdizL0Tp2GA4s=", + "lastModified": 1684215771, + "narHash": "sha256-fsum28z+g18yreNa1Y7MPo9dtps5h1VkHfZbYQ+YPbk=", "owner": "nixos", "repo": "nixpkgs", - "rev": "d41eea2839de7de0f2cbe4aa90fde5db8afcd30a", + "rev": "963006aab35e3e8ebbf6052b6bf4ea712fdd3c28", "type": "github" }, "original": { "owner": "nixos", - "ref": "nixos-22.11", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } @@ -429,6 +412,21 @@ "type": "github" } }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "triton-vmtools": { "inputs": { "flake-utils": "flake-utils_3", @@ -456,17 +454,17 @@ "tritonshell": { "inputs": { "devshell": "devshell_2", - "flake-utils": "flake-utils_5", + "flake-utils": "flake-utils_4", "nixpkgs": [ "latest" ] }, "locked": { - "lastModified": 1683541034, - "narHash": "sha256-zoPZTRtvJg5gFvm5lZHZDYqlTvPsJ5SS+Tec5a6fhQQ=", + "lastModified": 1684242426, + "narHash": "sha256-kvFD6WP6I1fK9DMCPpuRDZxsAGKpzXMMd2G5MYP42kU=", "ref": "main", - "rev": "6bf0cc114bbe1e49483281ba89423e87eddd9a0c", - "revCount": 60, + "rev": "d227038987158fa894872868f25bbf911c9cb8d1", + "revCount": 61, "type": "git", "url": "https://git.greenbaum.cloud/dev/tritonshell" }, @@ -490,21 +488,6 @@ "repo": "flake-utils", "type": "github" } - }, - "utils_2": { - "locked": { - "lastModified": 1667395993, - "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index ed85b2fa..47203015 100644 --- a/flake.nix +++ b/flake.nix @@ -6,7 +6,7 @@ inputs = { # Track channels with commits tested and built by hydra nixos-22-05.url = "github:nixos/nixpkgs/nixos-22.05"; - nixos.url = "github:nixos/nixpkgs/nixos-22.11"; + nixos.url = "github:nixos/nixpkgs/nixos-unstable"; latest.url = "github:nixos/nixpkgs/nixos-unstable"; master.url = "github:nixos/nixpkgs/master"; @@ -21,7 +21,7 @@ digga.inputs.darwin.follows = "darwin"; digga.inputs.flake-compat.follows = "flake-compat"; - home.url = "github:nix-community/home-manager/release-22.11"; + home.url = "github:nix-community/home-manager"; home.inputs.nixpkgs.follows = "nixos"; darwin.url = "github:LnL7/nix-darwin"; diff --git a/modules/audio/default.nix b/modules/audio/default.nix index 9a69301b..8ff6f2e6 100644 --- a/modules/audio/default.nix +++ b/modules/audio/default.nix @@ -66,31 +66,31 @@ in { # rtkit is optional but recommended security.rtkit.enable = true; - # Enable sound using pipewire-pulse + # Enable sound using pipewire-pulse, default config: + # https://gitlab.freedesktop.org/pipewire/pipewire/-/blob/master/src/daemon/pipewire.conf.in services.pipewire = { enable = true; alsa.enable = true; alsa.support32Bit = true; pulse.enable = true; - - config.pipewire = { - context.default.clock = { - allowed-rates = [44100 48000 88200 96000]; - rate = 44100; - }; - }; - config.pipewire-pulse = builtins.fromJSON (builtins.readFile ./pipewire-pulse.conf.json); }; - # Bluetooth configuration using wireplumber - # https://nixos.wiki/wiki/PipeWire#Bluetooth_Configuration - environment.etc = mkIf cfg.bluetooth.enable { - "wireplumber/bluetooth.lua.d/51-bluez-config.lua".text = '' - 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 ]" + # Make pulseaudio listen on port 4713 for mopidy, extending the default + # config: https://gitlab.freedesktop.org/pipewire/pipewire/-/blob/master/src/daemon/pipewire-pulse.conf.in + environment.etc = mkIf cfg.mopidy.enable { + "pipewire/pipewire-pulse.conf.d/99-custom.conf".text = '' + { + "context.modules": [ + { + "name": "libpipewire-module-protocol-pulse", + "args": { + "server.address": ["unix:native", "tcp:4713"], + "vm.overrides": { + "pulse.min.quantum": "1024/48000" + } + } + } + ] } ''; }; @@ -98,10 +98,19 @@ in { # Enable bluetooth hardware.bluetooth = mkIf cfg.bluetooth.enable { enable = true; - # disable useless SIM Access Profile plugin + # Disable bluetooth on startup to save battery + powerOnBoot = false; + # Disable useless SIM Access Profile plugin disabledPlugins = [ "sap" ]; + settings = { + General = { + # Enables experimental features and interfaces. + # Makes BlueZ Battery Provider available + Experimental = true; + }; + }; }; services.blueman.enable = mkIf cfg.bluetooth.enable true; diff --git a/modules/audio/pipewire-pulse.conf.json b/modules/audio/pipewire-pulse.conf.json deleted file mode 100644 index 97bedaaa..00000000 --- a/modules/audio/pipewire-pulse.conf.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "context.properties": {}, - "context.spa-libs": { - "audio.convert.*": "audioconvert/libspa-audioconvert", - "support.*": "support/libspa-support" - }, - "context.modules": [ - { - "name": "libpipewire-module-rtkit", - "args": {}, - "flags": ["ifexists", "nofail"] - }, - { - "name": "libpipewire-module-protocol-native" - }, - { - "name": "libpipewire-module-client-node" - }, - { - "name": "libpipewire-module-adapter" - }, - { - "name": "libpipewire-module-metadata" - }, - { - "name": "libpipewire-module-protocol-pulse", - "args": { - "server.address": ["unix:native", "tcp:4713"], - "vm.overrides": { - "pulse.min.quantum": "1024/48000" - } - } - } - ], - "stream.properties": {} -} diff --git a/modules/core/packages.nix b/modules/core/packages.nix index f0a35d17..807b282c 100644 --- a/modules/core/packages.nix +++ b/modules/core/packages.nix @@ -24,6 +24,7 @@ in { openssh curl htop + btop lsof psmisc file diff --git a/modules/core/services.nix b/modules/core/services.nix index 2d53dd74..475945e6 100644 --- a/modules/core/services.nix +++ b/modules/core/services.nix @@ -10,7 +10,7 @@ # If you don't want the host to have SSH actually opened up to the net, # set `services.openssh.openFirewall` to false in your config. openFirewall = lib.mkDefault true; - passwordAuthentication = lib.mkDefault false; + settings.PasswordAuthentication = lib.mkDefault false; }; # Service that makes Out of Memory Killer more effective diff --git a/modules/graphical/default.nix b/modules/graphical/default.nix index a2d8cbb3..5966e73e 100644 --- a/modules/graphical/default.nix +++ b/modules/graphical/default.nix @@ -66,7 +66,7 @@ in { services.getty.autologinUser = mkIf cfg.autologin.enable (mkForce "${psCfg.user.name}"); - qt5 = { + qt = { enable = true; platformTheme = "gtk2"; style = "gtk2"; diff --git a/modules/terminal-life/bash/default.nix b/modules/terminal-life/bash/default.nix index 53ad3e37..393ab898 100644 --- a/modules/terminal-life/bash/default.nix +++ b/modules/terminal-life/bash/default.nix @@ -32,7 +32,7 @@ in { # Syntax highlighting, auto suggestions, vim modes, etc. # https://github.com/akinomyoga/ble.sh/wiki/Manual-A1-Installation#user-content-nixpkgs - source "$(blesh-share)" --attach=none + source "$(blesh-share)"/ble.sh --attach=none # ctrl + space to accept autocomplete suggestion ble-bind -m 'auto_complete' -f 'C-@' 'auto_complete/insert-on-end' # Meta (Alt) + Backspace to delete a word diff --git a/overlays/blesh.nix b/overlays/blesh.nix index f3c93d73..ee25e015 100644 --- a/overlays/blesh.nix +++ b/overlays/blesh.nix @@ -1,5 +1,10 @@ final: prev: { blesh = prev.blesh.overrideAttrs (oldAttrs: rec { - inherit (prev.sources.blesh-nvfetcher) version src; + #inherit (prev.sources.blesh-nvfetcher) version src; + version = "0.4.0-devel3"; + src = prev.fetchzip { + url = "https://github.com/akinomyoga/ble.sh/releases/download/v${version}/ble-${version}.tar.xz"; + sha256 = "sha256-kGLp8RaInYSrJEi3h5kWEOMAbZV/gEPFUjOLgBuMhCI="; + }; }); } diff --git a/pkgs/sources.toml b/pkgs/sources.toml index 7cb2f674..30264e12 100644 --- a/pkgs/sources.toml +++ b/pkgs/sources.toml @@ -35,12 +35,6 @@ fetch.github = "zeekay/vim-beautify" src.git = "https://github.com/romainl/Apprentice" fetch.github = "romainl/Apprentice" -[blesh-nvfetcher] -src.git = "https://github.com/akinomyoga/ble.sh" -fetch.github = "akinomyoga/ble.sh" -git.fetchSubmodules = true -git.leaveDotGit = true - [waybar-nvfetcher] src.git = "https://github.com/Alexays/Waybar" fetch.github = "Alexays/Waybar" diff --git a/profiles/base-user/session-variables.nix b/profiles/base-user/session-variables.nix index fb816046..d21a9f80 100644 --- a/profiles/base-user/session-variables.nix +++ b/profiles/base-user/session-variables.nix @@ -85,7 +85,7 @@ VUEDX_TELEMETRY = "off"; # FZF shell history widget default colors - FZF_DEFAULT_OPTS = "--color=bg+:#2d2a2e,bg:#1a181a,spinner:#ef9062,hl:#7accd7 --color=fg:#d3d1d4,header:#7accd7,info:#e5c463,pointer:#ef9062 --color=marker:#ef9062,fg+:#d3d1d4,prompt:#e5c463,hl+:#7accd7"; + FZF_DEFAULT_OPTS = lib.mkForce "--color=bg+:#2d2a2e,bg:#1a181a,spinner:#ef9062,hl:#7accd7 --color=fg:#d3d1d4,header:#7accd7,info:#e5c463,pointer:#ef9062 --color=marker:#ef9062,fg+:#d3d1d4,prompt:#e5c463,hl+:#7accd7"; }; envListNames = lib.attrsets.mapAttrsToList (name: value: name) variables;