random changes

This commit is contained in:
chayleaf 2023-04-06 09:45:02 +07:00
parent 00b2c78723
commit db89ba3f10
19 changed files with 117 additions and 23 deletions

View file

@ -47,7 +47,6 @@
xdg.userDirs.enable = true; xdg.userDirs.enable = true;
# TODO sort out this mess with colors
programs.mpv = { programs.mpv = {
enable = true; enable = true;
defaultProfiles = [ "gpu-hq" ]; defaultProfiles = [ "gpu-hq" ];
@ -154,7 +153,8 @@
# vaapi-device / vulkan-device # vaapi-device / vulkan-device
# screen / vulkan-display-display # screen / vulkan-display-display
audio-device = "pipewire"; audio-device = "pipewire";
ao = "pipewire,pulse,alsa,jack,"; # because ao=pipewire doesn't work for whatever reason...
ao = "pulse,alsa,jack,pipewire,";
audio-file-auto = "fuzzy"; audio-file-auto = "fuzzy";
sub-auto = "fuzzy"; sub-auto = "fuzzy";
gpu-context = "waylandvk"; gpu-context = "waylandvk";

View file

@ -80,7 +80,7 @@ commonConfig = {
inherit modifier; inherit modifier;
startup = [ startup = [
{ command = builtins.toString (with pkgs; writeShellScript "init-wm" '' { command = builtins.toString (with pkgs; writeShellScript "init-wm" ''
${callPackage ../home-daemon {}}/bin/dotfiles-home-daemon system76-scheduler& ${callPackage ../pkgs/home-daemon {}}/bin/dotfiles-home-daemon system76-scheduler&
${gnome.zenity}/bin/zenity --password | (${keepassxc}/bin/keepassxc --pw-stdin ~/Nextcloud/keepass.kdbx&) ${gnome.zenity}/bin/zenity --password | (${keepassxc}/bin/keepassxc --pw-stdin ~/Nextcloud/keepass.kdbx&)
# nextcloud and nheko need secret service access # nextcloud and nheko need secret service access
${nextcloud-client}/bin/nextcloud --background& ${nextcloud-client}/bin/nextcloud --background&
@ -448,7 +448,7 @@ in
}; };
terminal = config.terminalBin; terminal = config.terminalBin;
extraConfig = { extraConfig = {
modi = [ "steam:${pkgs.callPackage ../rofi-steam-game-list {}}/bin/rofi-steam-game-list" "drun" "run" "ssh" ]; modi = [ "steam:${pkgs.callPackage ../pkgs/rofi-steam-game-list {}}/bin/rofi-steam-game-list" "drun" "run" "ssh" ];
icon-theme = "hicolor"; icon-theme = "hicolor";
drun-match-fields = [ "name" "generic" "exec" "keywords" ]; drun-match-fields = [ "name" "generic" "exec" "keywords" ];
show-icons = true; show-icons = true;

View file

@ -239,7 +239,7 @@
}; };
}; };
formatting = { formatting = {
format = arg1: vim_item: let kind = PROP vim_item "kind"; in L [ format = entry: vim_item: let kind = PROP vim_item "kind"; in L [
SET kind (string.format "%s %s" (IDX lspkind kind) kind) _ SET kind (string.format "%s %s" (IDX lspkind kind) kind) _
vim_item vim_item
]; ];

View file

@ -61,11 +61,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1679313651, "lastModified": 1679341830,
"narHash": "sha256-SwYtZhHqcr5V5IF4XNHx8du+E5WLgZXzpiTp/6qy6W4=", "narHash": "sha256-7+tqtNEpj/rtL55KntBI1gKo3YEu8JuKOHoK4dMx58k=",
"owner": "chayleaf", "owner": "chayleaf",
"repo": "notlua", "repo": "notlua",
"rev": "f04a6916767ebed80e5560d529c5bd8d95edebbc", "rev": "8a36fec181a1fdd314064f55aa90ec9e4744ebd1",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -26,8 +26,21 @@
getPriv = (hostname: with builtins; if hasAttr hostname priv then (getAttr hostname priv) else {}); getPriv = (hostname: with builtins; if hasAttr hostname priv then (getAttr hostname priv) else {});
in { in {
homeConfigurations = { homeConfigurations = {
"user@nixmsi" = home-manager.lib.homeManagerConfiguration { "user@nixmsi" = let system = "x86_64-linux"; in home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages."x86_64-linux"; pkgs = import nixpkgs {
inherit system;
binaryCachePublicKeys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
# "nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA="
];
binaryCaches = [
"https://cache.nixos.org"
# "https://nixpkgs-wayland.cachix.org"
];
};
extraSpecialArgs = {
# pkgs-wayland = nixpkgs-wayland.packages.${system};
};
modules = [ modules = [
notlua.nixosModules.default notlua.nixosModules.default
nur.nixosModules.nur nur.nixosModules.nur

View file

@ -1,4 +1,4 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, pkgs-wayland, ... }:
{ {
imports = [ imports = [
../common/general.nix ../common/general.nix
@ -62,7 +62,34 @@
})) cutter })) cutter
openrgb piper openrgb piper
steam-run steam steam-run steam
osu-lazer-bin taisei ((osu-lazer-bin.override {
gmrun_enable = false;
}).overrideAttrs (old: {
paths = assert builtins.length old.paths == 2;
let
osu = builtins.head old.paths;
osu' = osu.overrideAttrs (old: {
installPhase = builtins.replaceStrings
["runHook postInstall"]
["sed -i 's:exec :exec ${obs-studio-plugins.obs-vkcapture}/bin/obs-gamecapture :g' $out/bin/osu-lazer\nrunHook postInstall"]
old.installPhase;
});
in assert osu.pname == "osu-lazer-bin"; [
osu'
(makeDesktopItem {
name = osu'.pname;
exec = "${osu'.outPath}/bin/osu-lazer";
icon = "${osu'.outPath}/osu.png";
comment = "A free-to-win rhythm game. Rhythm is just a *click* away!";
desktopName = "osu!";
categories = ["Game"];
})
];
}))
taisei
(wrapOBS {
plugins = with obs-studio-plugins; [ wlrobs obs-vkcapture ];
})
easyeffects easyeffects
# wineWowPackages.waylandFull # wineWowPackages.waylandFull
winetricks winetricks
@ -72,6 +99,10 @@
gimp krita blender gimp krita blender
tdesktop tdesktop
clang_latest rustc rustfmt cargo clippy clang_latest rustc rustfmt cargo clippy
kdenlive
mediainfo
glaxnimate
(pkgs.callPackage ../pkgs/lalrpop { })
# waiting until the PR gets merged # waiting until the PR gets merged
(looking-glass-client.overrideAttrs (old: { (looking-glass-client.overrideAttrs (old: {
version = "B6"; version = "B6";

View file

@ -0,0 +1,44 @@
{ lib
, rustPlatform
, rust
, fetchFromGitHub
, substituteAll
, stdenv
}:
rustPlatform.buildRustPackage rec {
pname = "lalrpop";
version = "0.19.9";
src = fetchFromGitHub {
owner = "lalrpop";
repo = "lalrpop";
rev = version;
hash = "sha256-1jXLcIlyObo9eIg0q6CyUTGhcAyZ8TDGmxxYhVxgcS8=";
};
cargoHash = "sha256-o1zpkwBmU1f/BZ4RrWuF5YvgjLhQOBOEdSbmouLPKAo=";
patches = [
(substituteAll {
src = ./use-correct-binary-path-in-tests.patch;
target_triple = rust.toRustTarget stdenv.hostPlatform;
})
];
buildAndTestSubdir = "lalrpop";
# there are some tests in lalrpop-test and some in lalrpop
checkPhase = ''
buildAndTestSubdir=lalrpop-test cargoCheckHook
cargoCheckHook
'';
meta = with lib; {
description = "LR(1) parser generator for Rust";
homepage = "https://github.com/lalrpop/lalrpop";
changelog = "https://github.com/lalrpop/lalrpop/blob/${src.rev}/RELEASES.md";
license = with licenses; [ asl20 /* or */ mit ];
maintainers = with maintainers; [ chayleaf ];
};
}

View file

@ -0,0 +1,13 @@
diff --git a/lalrpop-test/src/lib.rs b/lalrpop-test/src/lib.rs
index 087df01..9361a9e 100644
--- a/lalrpop-test/src/lib.rs
+++ b/lalrpop-test/src/lib.rs
@@ -1031,7 +1031,7 @@ fn verify_lalrpop_generates_itself() {
// Don't remove the .rs file that already exist
fs::copy(&grammar_file, &copied_grammar_file).expect("no grammar file found");
- assert!(Command::new("../target/debug/lalrpop")
+ assert!(Command::new("../target/@target_triple@/release/lalrpop")
.args(&[
"--force",
"--no-whitespace",

View file

@ -402,14 +402,6 @@ fn write_cache(k: &str, time: SystemTime, ids: &[(u32, String)]) {
} }
} }
struct PendingFut;
impl std::future::Future for PendingFut {
type Output = ();
fn poll(self: std::pin::Pin<&mut Self>, _: &mut std::task::Context<'_>) -> std::task::Poll<()> {
std::task::Poll::Pending
}
}
fn main() { fn main() {
let target_type = std::env::var("STEAM_GAME_LIST_TYPE").map_or_else( let target_type = std::env::var("STEAM_GAME_LIST_TYPE").map_or_else(
|_| "game,application".to_owned(), |_| "game,application".to_owned(),
@ -484,13 +476,14 @@ fn main() {
}) })
.collect::<Vec<_>>(); .collect::<Vec<_>>();
app_info_2.sort_by_key(|x| u32::MAX - history.get(&x.0).unwrap_or(&0)); app_info_2.sort_by_key(|x| u32::MAX - history.get(&x.0).unwrap_or(&0));
let mut stdout = std::io::stdout().lock();
for (app_id, n) in &app_info_2 { for (app_id, n) in &app_info_2 {
let icon = format!("{xdg_home3}/Steam/appcache/librarycache/{app_id}_icon.jpg"); let icon = format!("{xdg_home3}/Steam/appcache/librarycache/{app_id}_icon.jpg");
print!("{n}\0info\x1f{app_id}");
if std::fs::metadata(&icon).is_ok() { if std::fs::metadata(&icon).is_ok() {
print!("\x1ficon\x1f{icon}"); writeln!(stdout, "{n}\0info\x1f{app_id}\x1ficon\x1f{icon}").unwrap();
} else {
writeln!(stdout, "{n}\0info\x1f{app_id}").unwrap();
} }
println!();
} }
let _ = daemon(true, false); let _ = daemon(true, false);
if is_cache { if is_cache {