testing update

This commit is contained in:
Dmitriy Kholkin 2021-06-14 23:31:09 +03:00
parent 40dc121ba5
commit 4c8bc2797c
15 changed files with 303 additions and 98 deletions

60
flake.lock generated
View File

@ -51,11 +51,11 @@
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_2"
}, },
"locked": { "locked": {
"lastModified": 1616724076, "lastModified": 1623343236,
"narHash": "sha256-SwbPXLjN2sLy4NL/GhodiJrdkIVZwGGTGiCN3JxH1cU=", "narHash": "sha256-Cl/0/WW3AWjkO7gphw9FqUr4P7T98KKyFCX3Vxv22Sk=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "fedfd430f96695997b3eaf8d7e82ca79406afa23", "rev": "666eee4f72979b0ebbd2e065a3846d7a8a16895c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -67,11 +67,11 @@
"i3lock-fancy-rapid": { "i3lock-fancy-rapid": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1604870111, "lastModified": 1618965247,
"narHash": "sha256-5D/8FXX6au9NPzaCS0u5Lv4zSBLGNb3EO/bIR2VDNtQ=", "narHash": "sha256-EoX8ts0yV/zkb4wgEh4P8noU+UraRS4w9pp+76v+Nm0=",
"owner": "yvbbrjdr", "owner": "yvbbrjdr",
"repo": "i3lock-fancy-rapid", "repo": "i3lock-fancy-rapid",
"rev": "c70ecfa8a529cb71f21f475f31d748ce9b154a8b", "rev": "6eeebd4caa177b82fa5010b5e8828cce3f89fb97",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -133,11 +133,11 @@
}, },
"nixpkgs-master": { "nixpkgs-master": {
"locked": { "locked": {
"lastModified": 1616785109, "lastModified": 1623544386,
"narHash": "sha256-kpaULt9vJtCUzYli3fXwtlrDEUBgaSrtGea50AIYEqU=", "narHash": "sha256-AQ8pcr2qUgHJ11SlV4BAIjWKo739mHWliMD9mMDbyLE=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "109d6b3bdbac150c23ac134682c591c679e20a5b", "rev": "722e5ccfea7f42e11cfb10e92d444da1a9c9fc26",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -150,11 +150,11 @@
"nixpkgs-mozilla": { "nixpkgs-mozilla": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1603906276, "lastModified": 1622726979,
"narHash": "sha256-RsNPnEKd7BcogwkqhaV5kI/HuNC4flH/OQCC/4W5y/8=", "narHash": "sha256-JCBPZVQ4aGe3cmnQc1tjJRwaxqz1b60piQz+/F9CMtc=",
"owner": "mozilla", "owner": "mozilla",
"repo": "nixpkgs-mozilla", "repo": "nixpkgs-mozilla",
"rev": "8c007b60731c07dd7a052cce508de3bb1ae849b4", "rev": "3f3fba4e2066f28a1ad7ac60e86a688a92eb5b5f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -165,11 +165,11 @@
}, },
"nixpkgs-old": { "nixpkgs-old": {
"locked": { "locked": {
"lastModified": 1616701903, "lastModified": 1623351452,
"narHash": "sha256-zYjmZqdfetp6XNbJcznCGGR8YkjcZ45c3Zy+Q0GrhMw=", "narHash": "sha256-V7DDbbl6h9OyVVMviURW1+pWU6ttYmuRuQRlFrlKZb0=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "34f85de51bbc74595e63b22ee089adbb31f7c7a2", "rev": "6f3e97e3f8cca69ad2528c8459682900a9b34a2f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -181,11 +181,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1616785109, "lastModified": 1623544386,
"narHash": "sha256-kpaULt9vJtCUzYli3fXwtlrDEUBgaSrtGea50AIYEqU=", "narHash": "sha256-AQ8pcr2qUgHJ11SlV4BAIjWKo739mHWliMD9mMDbyLE=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "109d6b3bdbac150c23ac134682c591c679e20a5b", "rev": "722e5ccfea7f42e11cfb10e92d444da1a9c9fc26",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -210,11 +210,11 @@
}, },
"nixpkgs_4": { "nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1616527350, "lastModified": 1623324058,
"narHash": "sha256-VkMevY2WLU+K7T/P4wVj18Ms8zyeRfp05ILf556m5Y8=", "narHash": "sha256-Jm9GUTXdjXz56gWDKy++EpFfjrBaxqXlLvTLfgEi8lo=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "d3f7e969b9860fb80750147aeb56dab1c730e756", "rev": "432fc2d9a67f92e05438dff5fdc2b39d33f77997",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -246,11 +246,11 @@
"zsh-autosuggestions": { "zsh-autosuggestions": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1578370341, "lastModified": 1622844304,
"narHash": "sha256-xv4eleksJzomCtLsRUj71RngIJFw8+A31O6/p7i4okA=", "narHash": "sha256-KLUYpUu4DHRumQZ3w59m9aTW6TBKMCXl2UcKi4uMd7w=",
"owner": "zsh-users", "owner": "zsh-users",
"repo": "zsh-autosuggestions", "repo": "zsh-autosuggestions",
"rev": "ae315ded4dba10685dbbafbfa2ff3c1aefeb490d", "rev": "a411ef3e0992d4839f0732ebeb9823024afaaaa8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -262,11 +262,11 @@
"zsh-cod": { "zsh-cod": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1615111792, "lastModified": 1620818585,
"narHash": "sha256-kVK7PhYLcy0EJyhz6t3Mm554BdNrNQXAMHOFv2WhVLs=", "narHash": "sha256-mT7OkR8fXXTE3TPx9AmH6ehKGLk4CP9euBPs2zVAJnI=",
"owner": "dim-an", "owner": "dim-an",
"repo": "cod", "repo": "cod",
"rev": "9096c4bd0b4a34121f35c323e174a139c30aa8f6", "rev": "b96ae6df3874ba74d4e6ba3677ba3da6ec6c206d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -278,11 +278,11 @@
"zsh-nix-shell": { "zsh-nix-shell": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1615130687, "lastModified": 1619787649,
"narHash": "sha256-lo89ODpbE31Jannvj3D1ziscIf8JFfPkSniPYl17zJg=", "narHash": "sha256-cml+xyVPGTKh9gG+XRroouLc1AGWfWsBpzjtZMj4MDw=",
"owner": "chisui", "owner": "chisui",
"repo": "zsh-nix-shell", "repo": "zsh-nix-shell",
"rev": "b6ac21e77d6d8e48f6ac08842345c8c9cd3460d5", "rev": "a2139b32fc1429160fc40658c9e16177c20597fc",
"type": "github" "type": "github"
}, },
"original": { "original": {

Binary file not shown.

View File

@ -17,6 +17,7 @@ with config.deviceSpecific; {
home-manager.users.alukard.home.packages = with pkgs; [ home-manager.users.alukard.home.packages = with pkgs; [
# cli # cli
_7zz
advance-touch advance-touch
curl curl
ddgr ddgr
@ -28,6 +29,7 @@ with config.deviceSpecific; {
gptfdisk gptfdisk
lm_sensors lm_sensors
lnav lnav
manix
neofetch neofetch
nix-prefetch-git nix-prefetch-git
nix-prefetch-github nix-prefetch-github
@ -37,6 +39,9 @@ with config.deviceSpecific; {
pciutils pciutils
pinfo pinfo
ripgrep ripgrep
ripgrep-all
samba
sd
tealdeer tealdeer
unzip unzip
usbutils usbutils
@ -47,10 +52,13 @@ with config.deviceSpecific; {
zip zip
# tui # tui
bottom
bpytop bpytop
# gdu
micro micro
ncdu ncdu
nnn nnn
procs
ranger ranger
spotify-tui spotify-tui

View File

@ -1,9 +1,60 @@
{ config, lib, pkgs, ... }: { { config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.spotifyd-user;
tomlFormat = pkgs.formats.toml { };
configFile = tomlFormat.generate "spotifyd.conf" cfg.settings;
in {
options.services.spotifyd-user = {
enable = mkEnableOption "SpotifyD connect";
home-manager.users.alukard = { package = mkOption {
# xdg.configFile."spicetify/Themes/base16/color.ini".source = ./color.ini; type = types.package;
# xdg.configFile."spicetify/Themes/base16/user.css".source = ./user.css; default = pkgs.spotifyd;
services.spotifyd = { defaultText = literalExample "pkgs.spotifyd";
example =
literalExample "(pkgs.spotifyd.override { withKeyring = true; })";
description = ''
The <literal>spotifyd</literal> package to use.
Can be used to specify extensions.
'';
};
settings = mkOption {
type = tomlFormat.type;
default = { };
description = "Configuration for spotifyd";
example = literalExample ''
{
global = {
username = "Alex";
password = "foo";
device_name = "nix";
};
}
'';
};
};
config = mkMerge [
(mkIf cfg.enable {
home-manager.users.alukard.home.packages = [ cfg.package ];
systemd.user.services.spotifyd = {
description = "spotify daemon";
wantedBy = [ "multi-user.target" ];
after = [ "network-online.target" "sound.target" ];
partOf = [ "pulseeffects.service" ];
serviceConfig = {
ExecStart =
"${cfg.package}/bin/spotifyd --no-daemon --config-path ${configFile}";
Restart = "always";
RestartSec = 12;
};
};
})
{
services.spotifyd-user = {
enable = true; enable = true;
package = (pkgs.spotifyd.override { withALSA = false; withPulseAudio = true; withPortAudio = false; }); package = (pkgs.spotifyd.override { withALSA = false; withPulseAudio = true; withPortAudio = false; });
settings = { settings = {
@ -21,5 +72,31 @@
}; };
}; };
}; };
};
} }
];
}
# {
# home-manager.users.alukard = {
# # xdg.configFile."spicetify/Themes/base16/color.ini".source = ./color.ini;
# # xdg.configFile."spicetify/Themes/base16/user.css".source = ./user.css;
# services.spotifyd = {
# enable = true;
# package = (pkgs.spotifyd.override { withALSA = false; withPulseAudio = true; withPortAudio = false; });
# settings = {
# global = {
# username = "${config.secrets.spotify.user}";
# password = "${config.secrets.spotify.password}";
# backend = "pulseaudio";
# volume_controller = "softvol";
# device_name = "nix";
# bitrate = 320;
# no_audio_cache = true;
# volume_normalisation = false;
# device_type = "computer";
# cache_path = "${config.users.users.alukard.home}/.cache/spotifyd";
# };
# };
# };
# };
# }

View File

@ -8,7 +8,8 @@
kernelPackages = if config.deviceSpecific.isVM then kernelPackages = if config.deviceSpecific.isVM then
pkgs.linuxPackages pkgs.linuxPackages
else else
pkgs.linuxPackages_latest; # pkgs.linuxPackages_latest;
pkgs.linuxPackages; # FIXME
supportedFilesystems = [ "ntfs" ]; supportedFilesystems = [ "ntfs" ];

View File

@ -5,6 +5,9 @@ with config.deviceSpecific;
networkmanager.enable = false; networkmanager.enable = false;
wireless = { wireless = {
enable = isLaptop; enable = isLaptop;
interfaces = lib.mkIf (config.device == "Dell-Laptop") [
"wlo1"
];
networks.Alukard_5GHz = { networks.Alukard_5GHz = {
pskRaw = "feee27000fb0d7118d498d4d867416d04d1d9a1a7b5dbdbd888060bbde816fe4"; pskRaw = "feee27000fb0d7118d498d4d867416d04d1d9a1a7b5dbdbd888060bbde816fe4";
priority = 1; priority = 1;

View File

@ -27,20 +27,84 @@ in
bpytop = pkgs.callPackage ./packages/bpytop.nix { }; bpytop = pkgs.callPackage ./packages/bpytop.nix { };
ibm-plex-powerline = pkgs.callPackage ./packages/ibm-plex-powerline.nix { }; ibm-plex-powerline = pkgs.callPackage ./packages/ibm-plex-powerline.nix { };
bibata-cursors = pkgs.callPackage ./packages/bibata-cursors.nix { }; bibata-cursors = pkgs.callPackage ./packages/bibata-cursors.nix { };
spotifyd = pkgs.callPackage ./packages/spotifyd.nix { }; # spotifyd = pkgs.callPackage ./packages/spotifyd.nix { };
foliate = pkgs.callPackage ./packages/foliate.nix { }; foliate = pkgs.callPackage ./packages/foliate.nix { };
vscode = master.vscode; vscode = master.vscode;
vivaldi = master.vivaldi; vivaldi = master.vivaldi;
multimc = super.multimc.overrideAttrs (old: rec { multimc = super.multimc.overrideAttrs (old: rec {
version = "unstable-2021-02-10"; version = "unstable-2021-04-15";
src = super.fetchFromGitHub { src = super.fetchFromGitHub {
owner = "AlukardBF"; owner = "AfoninZ";
repo = "MultiMC5-Cracked"; repo = "MultiMC5-Cracked";
rev = "e377b4d11c8ce7fc71442e4a84a0f93a1579e9e6"; rev = "22008d9267f9c818bd4b0098e3f0f4a303687b5a";
sha256 = "eES2UndRLQ4sNdxufcE8pOmzUWXzWsayVm21ClXRVP4="; sha256 = "9+Hq+0/8HhNURZ3HbJx4ClZgU5pfHl1c7l7wAYFFw1s=";
fetchSubmodules = true; fetchSubmodules = true;
}; };
}); });
steam = super.steam.override {
extraLibraries = pkgs: with pkgs; [
pipewire
];
};
fontbh100dpi = pkgs.callPackage ({ stdenv, pkg-config, fetchurl, bdftopcf, fontutil, mkfontscale }: stdenv.mkDerivation {
name = "font-bh-100dpi-1.0.3";
builder = ./builder.sh;
src = fetchurl {
url = "mirror://xorg/individual/font/font-bh-100dpi-1.0.3.tar.bz2";
sha256 = "10cl4gm38dw68jzln99ijix730y7cbx8np096gmpjjwff1i73h13";
};
hardeningDisable = [ "bindnow" "relro" ];
nativeBuildInputs = [ pkg-config bdftopcf fontutil mkfontscale ];
buildInputs = [ ];
preConfigure = ''
substituteInPlace configure --replace "/bin/sh" "${pkgs.bash}/bin/sh"
'';
configureFlags = [ "--with-fontrootdir=$(out)/lib/X11/fonts" ];
meta.platforms = lib.platforms.unix;
}) {};
fontbhlucidatypewriter100dpi = super.callPackage ({ stdenv, pkg-config, fetchurl, bdftopcf, fontutil, mkfontscale }: stdenv.mkDerivation {
name = "font-bh-lucidatypewriter-100dpi-1.0.3";
builder = ./builder.sh;
src = fetchurl {
url = "mirror://xorg/individual/font/font-bh-lucidatypewriter-100dpi-1.0.3.tar.bz2";
sha256 = "1fqzckxdzjv4802iad2fdrkpaxl4w0hhs9lxlkyraq2kq9ik7a32";
};
hardeningDisable = [ "bindnow" "relro" ];
nativeBuildInputs = [ pkg-config bdftopcf fontutil mkfontscale ];
buildInputs = [ ];
preConfigure = ''
substituteInPlace configure --replace "/bin/sh" "${pkgs.bash}/bin/sh"
'';
configureFlags = [ "--with-fontrootdir=$(out)/lib/X11/fonts" ];
meta.platforms = lib.platforms.unix;
}) {};
fontbhlucidatypewriter75dpi = super.callPackage ({ stdenv, pkg-config, fetchurl, bdftopcf, fontutil, mkfontscale }: stdenv.mkDerivation {
name = "font-bh-lucidatypewriter-75dpi-1.0.3";
builder = ./builder.sh;
src = fetchurl {
url = "mirror://xorg/individual/font/font-bh-lucidatypewriter-75dpi-1.0.3.tar.bz2";
sha256 = "0cfbxdp5m12cm7jsh3my0lym9328cgm7fa9faz2hqj05wbxnmhaa";
};
hardeningDisable = [ "bindnow" "relro" ];
nativeBuildInputs = [ pkg-config bdftopcf fontutil mkfontscale ];
buildInputs = [ ];
preConfigure = ''
substituteInPlace configure --replace "/bin/sh" "${pkgs.bash}/bin/sh"
'';
configureFlags = [ "--with-fontrootdir=$(out)/lib/X11/fonts" ];
meta.platforms = lib.platforms.unix;
}) {};
# qbittorrent = super.qbittorrent.overrideAttrs (old: rec {
# version = "4.3.4.11";
# src = super.fetchFromGitHub {
# owner = "c0re100";
# repo = "qBittorrent-Enhanced-Edition";
# # rev = "71404629f86b8b95ea5e4bef9805068678720673";
# rev = "release-${version}";
# sha256 = "XVjx1fOgNiLGRsvIu0Ny5nai++Mxw4V/uM5zqXCytow=";
# fetchSubmodules = true;
# };
# });
rust-stable = pkgs.latest.rustChannels.stable.rust.override { rust-stable = pkgs.latest.rustChannels.stable.rust.override {
extensions = [ extensions = [
"rls-preview" "rls-preview"

View File

@ -1,5 +1,5 @@
{ config, lib, pkgs, ... }: { { config, lib, pkgs, ... }: {
sound.enable = true; # sound.enable = true;
imports = [ imports = [
./pipewire.nix ./pipewire.nix

View File

@ -1,31 +1,38 @@
{ pkgs, lib, ... }: { { pkgs, lib, ... }: {
sound.enable = false;
services.pipewire = { services.pipewire = {
enable = true; enable = true;
alsa.enable = true; alsa.enable = true;
alsa.support32Bit = true; alsa.support32Bit = true;
pulse.enable = true; pulse.enable = true;
jack.enable = true; # jack.enable = true;
# config = { }; media-session.config.bluez-monitor.rules = [
# media-session = { {
# enable = true; # Matches all cards
# # config = { }; matches = [ { "device.name" = "~bluez_card.*"; } ];
# alsaMonitorConfig = { actions = {
# rules = [ "update-props" = {
# { "bluez5.reconnect-profiles" = [ "hfp_hf" "hsp_hs" "a2dp_sink" ];
# matches = [ # mSBC is not expected to work on all headset + adapter combinations.
# { node.name = "~alsa_input.*"; } "bluez5.msbc-support" = true;
# { node.name = "~alsa_output.*"; } # SBC-XQ is not expected to work on all headset + adapter combinations.
# ]; "bluez5.sbc-xq-support" = true;
# actions = { };
# update-props = { };
# resample.quality = 6; }
# audio.rate = 48000; {
# }; matches = [
# }; # Matches all sources
# } { "node.name" = "~bluez_input.*"; }
# ]; # Matches all outputs
# }; { "node.name" = "~bluez_output.*"; }
# }; ];
actions = {
"node.pause-on-idle" = false;
};
}
];
}; };
security.rtkit.enable = true; security.rtkit.enable = true;

View File

@ -1,4 +1,6 @@
{ config, pkgs, lib, ... }: { { config, pkgs, lib, ... }: {
sound.enable = true;
hardware.pulseaudio = { hardware.pulseaudio = {
enable = true; enable = true;
# package = pkgs.pulseaudioFull; # package = pkgs.pulseaudioFull;

View File

@ -20,7 +20,13 @@ in {
{ class = "^Telegram"; } { class = "^Telegram"; }
]; ];
}; };
fonts = [ "${thm.fontMono} ${thm.microFontSize}" ]; # fonts = [ "${thm.fontMono} ${thm.microFontSize}" ];
fonts = {
names = [ "${thm.fontMono}" ];
style = "Regular";
# size = thm.microFontSize;
size = 10.0;
};
bars = [ ]; bars = [ ];

View File

@ -6,7 +6,13 @@ in {
home-manager.users.alukard = { home-manager.users.alukard = {
xsession.windowManager.i3.config.bars = [{ xsession.windowManager.i3.config.bars = [{
id = "default"; id = "default";
fonts = [ "${thm.iconFont} Solid ${thm.microFontSize}" "${thm.fallbackIcon} ${thm.microFontSize}" "${thm.powerlineFont} SemiBold ${thm.microFontSize}" ]; # fonts = [ "${thm.iconFont} Solid ${thm.microFontSize}" "${thm.fallbackIcon} ${thm.microFontSize}" "${thm.powerlineFont} SemiBold ${thm.microFontSize}" ];
fonts = {
names = [ "${thm.iconFont}" "${thm.fallbackIcon}" "${thm.powerlineFont}" ];
style = "Solid Regular SemiBold";
# size = thm.microFontSize;
size = 10.0;
};
position = "top"; position = "top";
statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs"; statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs";
workspaceNumbers = false; workspaceNumbers = false;
@ -142,17 +148,26 @@ in {
[[block]] [[block]]
block = "sound" block = "sound"
driver = "auto" driver = "auto"
''
(if config.device == "Dell-Laptop" then ''
[[block]]
block = "custom"
command = "${scripts.cputemp}"
interval = 5
'' else "")
''
[[block]] [[block]]
block = "cpu" block = "cpu"
interval = 1 interval = 1
format = "{utilization}% {frequency}GHz" format = "{utilization}% {frequency}"
[[block]] [[block]]
block = "memory" block = "memory"
display_type = "memory" display_type = "memory"
format_mem = "{MAg}GiB" format_mem = "{mem_avail;G}"
format_swap = "{SFg}GiB" format_swap = "{swap_free;G}"
[[block]] [[block]]
block = "custom" block = "custom"

View File

@ -0,0 +1,4 @@
{ iconfont, ... }: ''
#!/usr/bin/env bash
echo `sensors | egrep Package | awk '{print $4}'`
''

View File

@ -14,6 +14,7 @@ let
}; };
in in
builtins.mapAttrs writeScript { builtins.mapAttrs writeScript {
cputemp = ./cputemp.nix;
weather = ./weather.nix; weather = ./weather.nix;
df = ./df.nix; df = ./df.nix;
vpn-status = ./vpn-status.nix; vpn-status = ./vpn-status.nix;

View File

@ -75,6 +75,23 @@
EOF EOF
fi fi
} }
rga-fzf() {
RG_PREFIX="rga --files-with-matches"
local file
file="$(
FZF_DEFAULT_COMMAND="$RG_PREFIX '$1'" \
fzf --sort --preview="[[ ! -z {} ]] && rga --pretty --context 5 {q} {}" \
--phony -q "$1" \
--bind "change:reload:$RG_PREFIX {q}" \
--preview-window="70%:wrap"
)" &&
echo "opening $file" &&
xdg-open "$file"
}
manix-fzf() {
manix "" | grep '^# ' | sed 's/^# \(.*\) (.*/\1/;s/ (.*//;s/^# //' | fzf --preview="manix '{}'" | xargs manix
}
''; '';
}; };