many changes i made in the last weeks
This commit is contained in:
@@ -1 +1 @@
|
|||||||
flake-profile-1-link
|
flake-profile-16-link
|
||||||
@@ -1 +0,0 @@
|
|||||||
/nix/store/3s8w643mwrfiwd3n4bg45m142bdiibcc-nix-shell-env
|
|
||||||
1
.direnv/flake-profile-16-link
Symbolic link
1
.direnv/flake-profile-16-link
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
/nix/store/3yjs9x851rdcql4lrlhb77075l1a8zn4-nix-shell-env
|
||||||
12
.gitmodules
vendored
12
.gitmodules
vendored
@@ -1,3 +1,15 @@
|
|||||||
[submodule "mize"]
|
[submodule "mize"]
|
||||||
path = mize
|
path = mize
|
||||||
url = git@git.ppc.social:ppc/ppc.git
|
url = git@git.ppc.social:ppc/ppc.git
|
||||||
|
[submodule "element"]
|
||||||
|
path = element
|
||||||
|
url = git@github.com:c2vi/element-web.git
|
||||||
|
[submodule "grid"]
|
||||||
|
path = grid
|
||||||
|
url = git@github.com:theCheeseboard/theGrid.git
|
||||||
|
[submodule "marts"]
|
||||||
|
path = marts
|
||||||
|
url = https://git.ppc.social/ppc/marts.git
|
||||||
|
[submodule "forked-zed"]
|
||||||
|
path = forked-zed
|
||||||
|
url = git@github.com:c2vi/zed.git
|
||||||
|
|||||||
1176
Cargo.lock
generated
1176
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
22
Cargo.toml
22
Cargo.toml
@@ -1,12 +1,10 @@
|
|||||||
[package]
|
[workspace]
|
||||||
name = "c2vi-part"
|
members = [
|
||||||
version = "0.1.0"
|
"mize/mize",
|
||||||
edition = "2024"
|
"mize/marts",
|
||||||
|
"mize/macros",
|
||||||
[lib]
|
"generated",
|
||||||
name = "c2vi_part"
|
"dev-part",
|
||||||
path = "c2vi-part.rs"
|
"mize/marts/spacetime",
|
||||||
|
]
|
||||||
[dependencies]
|
resolver = "2"
|
||||||
mize = { path = "./mize/packages/mize" }
|
|
||||||
marts = { path = "./mize/packages/marts" }
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ lib, inputs, self, secretsDir, specialArgs, pkgsUnstable, ... }:
|
{ lib, inputs, self, secretsDir, specialArgs, pkgsUnstable, config, ... }:
|
||||||
|
|
||||||
# config that i use on all my hosts
|
# config that i use on all my hosts
|
||||||
|
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
home-manager.extraSpecialArgs = specialArgs // { inherit pkgsUnstable; };
|
home-manager.extraSpecialArgs = specialArgs // { inherit pkgsUnstable; hostName = config.networking.hostName; };
|
||||||
|
|
||||||
programs.dconf.enable = true;
|
programs.dconf.enable = true;
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
# - win + D command
|
# - win + D command
|
||||||
# - kernel output for luks pwd on all displays
|
# - kernel output for luks pwd on all displays
|
||||||
|
|
||||||
{ lib, pkgs, nur, unstable, inputs, ... }:
|
{ lib, pkgs, nur, unstable, inputs, config, ... }:
|
||||||
let
|
let
|
||||||
|
|
||||||
newerUnstableSrc = builtins.getFlake "nixpkgs/d0fc30899600b9b3466ddb260fd83deb486c32f1";
|
newerUnstableSrc = builtins.getFlake "nixpkgs/d0fc30899600b9b3466ddb260fd83deb486c32f1";
|
||||||
@@ -269,6 +269,18 @@ in {
|
|||||||
### Output configuration
|
### Output configuration
|
||||||
output * scale 1 bg #121212 solid_color
|
output * scale 1 bg #121212 solid_color
|
||||||
|
|
||||||
|
|
||||||
|
### always open alacritty on super+f
|
||||||
|
exec_always --no-startup-id alacritty --class scratchterm
|
||||||
|
for_window [app_id="scratchterm"] move scratchpad
|
||||||
|
bindsym $mod+f [app_id="scratchterm"] scratchpad show
|
||||||
|
for_window [app_id="scratchterm"] {
|
||||||
|
floating enable
|
||||||
|
resize set width 2400 px height 1400 px
|
||||||
|
move position center
|
||||||
|
move scratchpad
|
||||||
|
}
|
||||||
|
|
||||||
#################### from nwg-display
|
#################### from nwg-display
|
||||||
# Generated by nwg-displays on 2025-10-20 at 18:16:29. Do not edit manually.
|
# Generated by nwg-displays on 2025-10-20 at 18:16:29. Do not edit manually.
|
||||||
|
|
||||||
@@ -374,6 +386,9 @@ output "HDMI-A-1" {
|
|||||||
### Key bindings
|
### Key bindings
|
||||||
# ppc ne
|
# ppc ne
|
||||||
bindsym F12 exec ppc ne
|
bindsym F12 exec ppc ne
|
||||||
|
bindsym F11 exec ppc ne -b
|
||||||
|
bindsym XF86AudioRaiseVolume exec ppc ne
|
||||||
|
bindsym XF86AudioLowerVolume exec ppc ne -b
|
||||||
|
|
||||||
# QuickLaunch
|
# QuickLaunch
|
||||||
bindsym $mod+i mode "QuickLaunch"
|
bindsym $mod+i mode "QuickLaunch"
|
||||||
@@ -620,29 +635,39 @@ output "HDMI-A-1" {
|
|||||||
position = "top";
|
position = "top";
|
||||||
|
|
||||||
modules-left = [
|
modules-left = [
|
||||||
"group/options"
|
#"group/options"
|
||||||
"sway/workspaces"
|
"custom/timetrack_current"
|
||||||
"sway/window#protocol"
|
|
||||||
"sway/window#name"
|
|
||||||
];
|
];
|
||||||
modules-center = [
|
modules-center = [
|
||||||
"clock"
|
|
||||||
];
|
];
|
||||||
modules-right = [
|
modules-right = [
|
||||||
|
"sway/window#protocol"
|
||||||
|
"sway/window#name"
|
||||||
"tray"
|
"tray"
|
||||||
"pulseaudio"
|
|
||||||
"custom/gpu"
|
|
||||||
"memory"
|
|
||||||
"cpu"
|
|
||||||
"temperature"
|
|
||||||
"battery"
|
"battery"
|
||||||
"disk"
|
"clock"
|
||||||
|
#"pulseaudio"
|
||||||
|
#"custom/gpu"
|
||||||
|
#"memory"
|
||||||
|
#"cpu"
|
||||||
|
#"temperature"
|
||||||
|
#"disk"
|
||||||
|
#"sway/workspaces"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
"custom/timetrack_current" = {
|
||||||
|
"exec" =
|
||||||
|
if config.networking.hostName == "main" then "~/work/config/target/debug/timetrack-waybar"
|
||||||
|
else if config.networking.hostName == "mac" then "/data/external/config/target/debug/timetrack-waybar"
|
||||||
|
else "~/here/config/target/debug/timetrack-waybar";
|
||||||
|
"tail" = true;
|
||||||
|
};
|
||||||
|
|
||||||
"custom/separator" = {
|
"custom/separator" = {
|
||||||
format = " ";
|
format = " ";
|
||||||
tooltip = false;
|
tooltip = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
"custom/options" = {
|
"custom/options" = {
|
||||||
format = " ";
|
format = " ";
|
||||||
tooltip = false;
|
tooltip = false;
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
|
|
||||||
# the hosts file
|
# the hosts file
|
||||||
networking.extraHosts = ''
|
networking.extraHosts = ''
|
||||||
${builtins.readFile "${self}/misc/my-hosts"}
|
${builtins.readFile "${self}/mods/my-hosts"}
|
||||||
${builtins.readFile "${self}/misc/my-hosts-t"}
|
${builtins.readFile "${self}/mods/my-hosts-t"}
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|||||||
8167
dev-part/Cargo.lock
generated
Normal file
8167
dev-part/Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
24
dev-part/Cargo.toml
Normal file
24
dev-part/Cargo.toml
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
[package]
|
||||||
|
name = "c2vi-dev-part"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2024"
|
||||||
|
|
||||||
|
[lib]
|
||||||
|
name = "c2vi_part"
|
||||||
|
path = "dpart.rs"
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
mize = { path = "../mize/mize" }
|
||||||
|
marts = { path = "../mize/marts" }
|
||||||
|
cmd_lib = "2.0.0"
|
||||||
|
indoc = "2.0.7"
|
||||||
|
clap = "4.6.1"
|
||||||
|
ciborium = "0.2.2"
|
||||||
|
dioxus = { version = "0.7.9", features = ["desktop"] }
|
||||||
|
tracing = "0.1.44"
|
||||||
|
chrono = "0.4.45"
|
||||||
|
|
||||||
|
[features]
|
||||||
|
target-os = []
|
||||||
|
target-js = []
|
||||||
|
target-obsidian = []
|
||||||
2
dev-part/Partfile
Normal file
2
dev-part/Partfile
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
|
||||||
|
name = "c2vi"
|
||||||
771
dev-part/dpart.rs
Normal file
771
dev-part/dpart.rs
Normal file
@@ -0,0 +1,771 @@
|
|||||||
|
#![feature(oneshot_channel)]
|
||||||
|
|
||||||
|
use std::fs;
|
||||||
|
use std::fs::OpenOptions;
|
||||||
|
use std::io::BufReader;
|
||||||
|
use std::io::Read;
|
||||||
|
use std::io::Write;
|
||||||
|
use std::sync::oneshot;
|
||||||
|
use std::thread;
|
||||||
|
use std::time::Duration;
|
||||||
|
use chrono::TimeDelta;
|
||||||
|
use clap::ArgAction;
|
||||||
|
use marts::generated::spacetime::RemoteProcedures;
|
||||||
|
use marts::generated::spacetime::export_timetrack;
|
||||||
|
|
||||||
|
use chrono::Local;
|
||||||
|
use marts::generated::spacetime::first_timetrack_date;
|
||||||
|
use marts::timetrack;
|
||||||
|
use marts::generated::spacetime::add_thought;
|
||||||
|
use tracing::info;
|
||||||
|
use ciborium::Value;
|
||||||
|
use clap::Arg;
|
||||||
|
use clap::ArgMatches;
|
||||||
|
use clap::Command;
|
||||||
|
use cmd_lib::run_cmd as sh;
|
||||||
|
use cmd_lib::run_fun as shc;
|
||||||
|
use dioxus::html::g::format;
|
||||||
|
use indoc::concatdoc as str;
|
||||||
|
use marts::CliPart;
|
||||||
|
use marts::ClientAuth;
|
||||||
|
use mize::Mize;
|
||||||
|
use mize::MizeError;
|
||||||
|
use mize::MizePart;
|
||||||
|
use mize::MizePartCreate;
|
||||||
|
use mize::MizeResult;
|
||||||
|
use mize::data;
|
||||||
|
use mize::item::{IntoItemData, ItemData};
|
||||||
|
use mize::mize_err;
|
||||||
|
use mize::mize_part;
|
||||||
|
use mize::prelude::*;
|
||||||
|
use mize::proto::MessageCmd;
|
||||||
|
use mize::proto::MizeMessage;
|
||||||
|
|
||||||
|
static MIZE_SRC: &str = "/home/me/work/config/mize";
|
||||||
|
static SRC: &str = "/home/me/work/config";
|
||||||
|
static RSYNC_EXCLUDES: &str = "--exclude=node_modules --exclude=target --exclude=mize_config.toml --exclude=rust_dist --exclude=deno_dist --exclude=dist --exclude=result --exclude=pkg";
|
||||||
|
|
||||||
|
pub fn lush_os_main() -> MizeResult<()> {
|
||||||
|
println!("main on lush...");
|
||||||
|
|
||||||
|
let mut config = ItemData::from_cbor(data! {
|
||||||
|
//spacetime.url = ""
|
||||||
|
});
|
||||||
|
config.set_path("store", "/home/me/host/mize")?;
|
||||||
|
config.set_path("data_dir", "/home/me/host/mize/misc")?;
|
||||||
|
config.set_path("log.level", "debug")?;
|
||||||
|
config.set_path("log.stderr.enable", true)?;
|
||||||
|
config.set_path("cli.daemonMode", true)?;
|
||||||
|
config.set_path("c2vi.dash.enable", true)?;
|
||||||
|
config.set_path("auth.client.refresh_thread", true)?;
|
||||||
|
|
||||||
|
let mut mize = mize::Mize::with_config(config)?;
|
||||||
|
|
||||||
|
marts::cli(&mut mize)?;
|
||||||
|
marts::part_client_auth(&mut mize)?;
|
||||||
|
|
||||||
|
marts::spacetime(&mut mize)?;
|
||||||
|
marts::timetrack::timetrack(&mut mize)?;
|
||||||
|
|
||||||
|
marts::c2vi(&mut mize)?;
|
||||||
|
|
||||||
|
mize.run()
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn remote_deploy(matches: &ArgMatches, _: Mize, hostname: &str) -> MizeResult<()> {
|
||||||
|
unsafe {
|
||||||
|
/*
|
||||||
|
std::env::set_var(
|
||||||
|
"PATH",
|
||||||
|
"/home/me/work/path-extra/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/home/me/.local/state/nix/profile/bin:/home/me/.nix-profile/bin",
|
||||||
|
);
|
||||||
|
*/
|
||||||
|
std::env::set_var("SRC", SRC);
|
||||||
|
std::env::set_var("HOSTNAME", hostname);
|
||||||
|
}
|
||||||
|
|
||||||
|
let mut do_mize_restart = false;
|
||||||
|
|
||||||
|
let bin = match matches.get_one::<String>("bin") {
|
||||||
|
Some(val) => val.to_owned(),
|
||||||
|
None => {
|
||||||
|
do_mize_restart = true;
|
||||||
|
format!("{}-os", hostname)
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
let remote_src_dir = match hostname {
|
||||||
|
"lush" => "/home/me/here/config",
|
||||||
|
"mac" => "/data/external/config",
|
||||||
|
"files" => "/home/files/here/config",
|
||||||
|
"nico" => "/root/work/config-c2vi",
|
||||||
|
"ppc-hosting" => "/root/host/c2vi-config",
|
||||||
|
_ => "main-idk",
|
||||||
|
};
|
||||||
|
let mize_store_dir = match hostname {
|
||||||
|
"lush" => "/home/me/host/mize",
|
||||||
|
"mac" => "/home/me/host/mize",
|
||||||
|
"files" => "/home/files/storage/files/mize",
|
||||||
|
"nico" => "/root/work/app-data/mize",
|
||||||
|
"ppc-hosting" => "/root/host/mize",
|
||||||
|
_ => "/tmp/idk",
|
||||||
|
};
|
||||||
|
let rclone_flag = match hostname {
|
||||||
|
"nico" => "--chown=root:root",
|
||||||
|
_ => "",
|
||||||
|
};
|
||||||
|
|
||||||
|
sh!(rsync -r -u -v -a --delete --perms $rclone_flag --include=".git/" --include=".git/**" --exclude="target" --mkpath $RSYNC_EXCLUDES $SRC/ $hostname:$remote_src_dir)?;
|
||||||
|
|
||||||
|
let ssh_cmd = format!(
|
||||||
|
r#"
|
||||||
|
if ! tmux has-session -t mize-deploy 2>/dev/null; then
|
||||||
|
echo "Created new tmux session...."
|
||||||
|
tmux new-session -d -s mize-deploy "nix develop git+file://{remote_src_dir}/mize#buildShell --max-jobs 1"
|
||||||
|
else
|
||||||
|
echo "using existing session..."
|
||||||
|
fi
|
||||||
|
|
||||||
|
tmux send-keys -t mize-deploy "DO_MIZE_RESTART={do_mize_restart}" Enter
|
||||||
|
tmux send-keys -t mize-deploy "cargo build --manifest-path {remote_src_dir}/Cargo.toml --bin {bin}" Enter
|
||||||
|
tmux send-keys -t mize-deploy 'BUILD_SUCCESS=$?' Enter
|
||||||
|
tmux send-keys -t mize-deploy '[[ "$BUILD_SUCCESS" == "0" ]] && echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" > {mize_store_dir}/daemon.env' Enter
|
||||||
|
tmux send-keys -t mize-deploy '[[ "$BUILD_SUCCESS" == "0" ]] && echo "MIZE_CONFIG_FILES={mize_store_dir}/config.toml" >> {mize_store_dir}/daemon.env' Enter
|
||||||
|
tmux send-keys -t mize-deploy '[[ "$BUILD_SUCCESS" == "0" ]] && [[ "$HOSTNAME" == "nico" ]] && echo "PATH=/root/work/path-extra:$PATH" >> {mize_store_dir}/daemon.env' Enter
|
||||||
|
tmux send-keys -t mize-deploy '[[ "$BUILD_SUCCESS" == "0" ]] && [[ "$DO_MIZE_RESTART" == "true" ]] && systemctl --user restart mize' Enter
|
||||||
|
"#
|
||||||
|
);
|
||||||
|
|
||||||
|
sh!(ssh $hostname $ssh_cmd)?;
|
||||||
|
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
|
#[mize_part]
|
||||||
|
#[derive(Default)]
|
||||||
|
struct MizeDev {
|
||||||
|
mize: Mize,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl MizePart for MizeDev {}
|
||||||
|
impl MizePartCreate for MizeDev {}
|
||||||
|
|
||||||
|
pub fn md(mize: &mut Mize) -> MizeResult<()> {
|
||||||
|
let mut cli = mize.get_part_native::<CliPart>("cli")?;
|
||||||
|
cli.set_command("md");
|
||||||
|
|
||||||
|
let bin_arg = Arg::new("bin").short('b');
|
||||||
|
|
||||||
|
cli.subcommand(
|
||||||
|
Command::new("deploy-lush").alias("dlu").arg(&bin_arg),
|
||||||
|
Box::new(move |matches: &ArgMatches, mize| remote_deploy(matches, mize, "lush")),
|
||||||
|
)?;
|
||||||
|
cli.subcommand(
|
||||||
|
Command::new("deploy-mac").alias("dmc").arg(&bin_arg),
|
||||||
|
Box::new(move |matches: &ArgMatches, mize| remote_deploy(matches, mize, "mac")),
|
||||||
|
)?;
|
||||||
|
cli.subcommand(
|
||||||
|
Command::new("deploy-files").alias("dfi").arg(&bin_arg),
|
||||||
|
Box::new(move |matches: &ArgMatches, mize| remote_deploy(matches, mize, "files")),
|
||||||
|
)?;
|
||||||
|
cli.subcommand(
|
||||||
|
Command::new("deploy-ppc").alias("dpp").arg(&bin_arg),
|
||||||
|
Box::new(move |matches: &ArgMatches, mize| remote_deploy(matches, mize, "ppc-hosting")),
|
||||||
|
)?;
|
||||||
|
cli.subcommand(
|
||||||
|
Command::new("deploy-nico").alias("dni").arg(&bin_arg),
|
||||||
|
Box::new(move |matches: &ArgMatches, mize| remote_deploy(matches, mize, "nico")),
|
||||||
|
)?;
|
||||||
|
cli.subcommand(
|
||||||
|
Command::new("deploy-main").alias("dma").arg(&bin_arg),
|
||||||
|
Box::new(main_deploy),
|
||||||
|
)?;
|
||||||
|
cli.subcommand(
|
||||||
|
Command::new("deploy-obsidian").alias("do").arg(&bin_arg),
|
||||||
|
Box::new(obsidian_deploy),
|
||||||
|
)?;
|
||||||
|
cli.subcommand(
|
||||||
|
Command::new("deploy-spacetime").alias("dsp").arg(&bin_arg),
|
||||||
|
Box::new(deploy_spacetime),
|
||||||
|
)?;
|
||||||
|
cli.subcommand(
|
||||||
|
Command::new("generate").alias("gen").arg(&bin_arg),
|
||||||
|
Box::new(md_generate),
|
||||||
|
)?;
|
||||||
|
|
||||||
|
mize.register_part(Box::new(MizeDev { mize: mize.clone() }))
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn gen_file(path: &str, content: &str) -> MizeResult<()> {
|
||||||
|
sh!(touch $SRC/generated/$path)?;
|
||||||
|
std::fs::write(format!("{}/generated/{}", SRC, path), content)?;
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn gen_file_absolute(path: &str, content: &str) -> MizeResult<()> {
|
||||||
|
sh!(touch $path)?;
|
||||||
|
std::fs::write(path, content)?;
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn gen_main_rs(name: &str) -> MizeResult<()> {
|
||||||
|
let fn_name = name.replace("-", "_");
|
||||||
|
let fn_name = format!("{}_main", fn_name);
|
||||||
|
gen_file(format!("{}.rs", name).as_str(), format!(r#"
|
||||||
|
fn main() {{
|
||||||
|
if let Err(err) = c2vi_part::{fn_name}() {{
|
||||||
|
err.log();
|
||||||
|
}}
|
||||||
|
}}
|
||||||
|
"#).as_str())?;
|
||||||
|
OpenOptions::new().append(true).open(format!("{}/generated/Cargo.toml", SRC))?.write(format!(r#"
|
||||||
|
[[bin]]
|
||||||
|
name = "{name}"
|
||||||
|
path = "{name}.rs"
|
||||||
|
"#).as_bytes())?;
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn md_generate(_: &ArgMatches, mize: Mize) -> MizeResult<()> {
|
||||||
|
|
||||||
|
sh!(touch $SRC/generated/Cargo.toml)?;
|
||||||
|
sh!(mkdir -p $SRC/generated/src)?;
|
||||||
|
fs::write(format!("{}/generated/Cargo.toml", SRC), format!(r#"
|
||||||
|
[package]
|
||||||
|
name = "generated-c2vi-dev-part"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2024"
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
c2vi-dev-part.path = "../dev-part"
|
||||||
|
"#).as_bytes())?;
|
||||||
|
|
||||||
|
gen_main_rs("lush-os")?;
|
||||||
|
gen_main_rs("main-os")?;
|
||||||
|
gen_main_rs("mac-os")?;
|
||||||
|
gen_main_rs("nico-os")?;
|
||||||
|
|
||||||
|
gen_main_rs("mppc")?;
|
||||||
|
gen_main_rs("timetrack-waybar")?;
|
||||||
|
gen_main_rs("md")?;
|
||||||
|
gen_main_rs("dev")?;
|
||||||
|
|
||||||
|
gen_file_absolute(format!("{SRC}/mize/marts/generated/Cargo.toml").as_str(), str!(r#"
|
||||||
|
[package]
|
||||||
|
name = "generated"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2021"
|
||||||
|
|
||||||
|
[lib]
|
||||||
|
name = "generated"
|
||||||
|
path = "src/lib.rs"
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
spacetimedb-sdk = "2.6.0"
|
||||||
|
|
||||||
|
[features]
|
||||||
|
target-js = [ "spacetimedb-sdk/browser" ]
|
||||||
|
"#))?;
|
||||||
|
gen_file_absolute(format!("{SRC}/mize/marts/generated/src/lib.rs").as_str(), str!(r#"
|
||||||
|
pub mod spacetime;
|
||||||
|
"#))?;
|
||||||
|
|
||||||
|
sh!(RUST_LOG=error RUST_BACKTRACE=0 spacetime generate --build-options="--lint-dir=" -p $SRC/mize/marts/spacetime -o $SRC/mize/marts/generated/src/spacetime --lang rust)?;
|
||||||
|
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn deploy_spacetime(_: &ArgMatches, _: Mize) -> MizeResult<()> {
|
||||||
|
unsafe {
|
||||||
|
/*
|
||||||
|
std::env::set_var(
|
||||||
|
"PATH",
|
||||||
|
"/home/me/work/path-extra/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/home/me/.local/state/nix/profile/bin:/home/me/.nix-profile/bin",
|
||||||
|
);
|
||||||
|
*/
|
||||||
|
std::env::set_var("SRC", SRC);
|
||||||
|
}
|
||||||
|
|
||||||
|
let cmd = format!(
|
||||||
|
r#"
|
||||||
|
if ! tmux has-session -t mize-deploy 2>/dev/null; then
|
||||||
|
echo "Created new tmux session...."
|
||||||
|
systemd-run --user --scope --description="mize deploy tmux session" tmux new-session -d -s mize-deploy "nix develop git+file://$SRC/mize --impure"
|
||||||
|
else
|
||||||
|
echo "using existing session..."
|
||||||
|
tmux send-keys -t mize-deploy "echo hoooooooooooooo" Enter
|
||||||
|
fi
|
||||||
|
|
||||||
|
tmux send-keys -t mize-deploy "spacetime publish -p $SRC/mize/packages/spacetime/ --yes mize" Enter
|
||||||
|
"#
|
||||||
|
);
|
||||||
|
sh!(/bin/sh -c "$cmd")?;
|
||||||
|
Ok(())
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn obsidian_deploy(_: &ArgMatches, _: Mize) -> MizeResult<()> {
|
||||||
|
unsafe {
|
||||||
|
std::env::set_var(
|
||||||
|
"PATH",
|
||||||
|
"/home/me/work/path-extra/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/home/me/.local/state/nix/profile/bin:/home/me/.nix-profile/bin",
|
||||||
|
);
|
||||||
|
std::env::set_var("SRC", SRC);
|
||||||
|
}
|
||||||
|
let cmd = format!(
|
||||||
|
r#"
|
||||||
|
if ! tmux has-session -t mize-deploy 2>/dev/null; then
|
||||||
|
echo "Created new tmux session...."
|
||||||
|
systemd-run --user --scope --description="mize deploy tmux session" tmux new-session -d -s mize-deploy "nix develop git+file://$SRC/mize --impure"
|
||||||
|
else
|
||||||
|
echo "using existing session..."
|
||||||
|
fi
|
||||||
|
tmux send-keys -t mize-deploy "deno run --config {SRC}/mize/packages/ppc/platform/obsidian/deno.json build" Enter
|
||||||
|
tmux send-keys -t mize-deploy "cp -r {SRC}/mize/packages/ppc/platform/obsidian/dist/* ~/work/things/.obsidian/plugins/mize/" Enter
|
||||||
|
"#
|
||||||
|
);
|
||||||
|
sh!(/bin/sh -c "$cmd")?;
|
||||||
|
Ok(())
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn main_deploy(_: &ArgMatches, _: Mize) -> MizeResult<()> {
|
||||||
|
unsafe {
|
||||||
|
std::env::set_var(
|
||||||
|
"PATH",
|
||||||
|
"/home/me/work/path-extra/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/home/me/.local/state/nix/profile/bin:/home/me/.nix-profile/bin",
|
||||||
|
);
|
||||||
|
std::env::set_var("SRC", SRC);
|
||||||
|
}
|
||||||
|
let cmd = str!(
|
||||||
|
r#"
|
||||||
|
if ! tmux has-session -t mize-deploy 2>/dev/null; then
|
||||||
|
systemd-run --user --scope --description="mize deploy tmux session" tmux new-session -d -s mize-deploy "nix develop git+file://$SRC/mize#buildShell"
|
||||||
|
tmux send-keys -t mize-deploy "set -e" Enter
|
||||||
|
tmux send-keys -t mize-deploy "cargo build --manifest-path $SRC/parts/Cargo.toml --bin main-os" Enter
|
||||||
|
tmux send-keys -t mize-deploy 'echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" > /home/me/work/app-data/mize/daemon.env' Enter
|
||||||
|
tmux send-keys -t mize-deploy "systemctl --user restart mize" Enter
|
||||||
|
else
|
||||||
|
echo "using existing session..."
|
||||||
|
tmux send-keys -t mize-deploy "cargo build --manifest-path $SRC/parts/Cargo.toml --bin main-os" Enter
|
||||||
|
tmux send-keys -t mize-deploy 'echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" > /home/me/work/app-data/mize/daemon.env' Enter
|
||||||
|
tmux send-keys -t mize-deploy "systemctl --user restart mize" Enter
|
||||||
|
fi
|
||||||
|
"#
|
||||||
|
);
|
||||||
|
sh!(/bin/sh -c "$cmd")?;
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn main_os_main() -> MizeResult<()> {
|
||||||
|
println!("os daemon on main...");
|
||||||
|
|
||||||
|
let mut config = ItemData::new();
|
||||||
|
config.set_path("store", "/home/me/work/app-data/mize")?;
|
||||||
|
config.set_path("log.level", "debug")?;
|
||||||
|
config.set_path("log.stderr.enable", true)?;
|
||||||
|
config.set_path("cli.daemonMode", true)?;
|
||||||
|
config.set_path("c2vi.dash.enable", false)?;
|
||||||
|
config.set_path("auth.client.refresh_thread", true)?;
|
||||||
|
|
||||||
|
unsafe {
|
||||||
|
std::env::set_var("RUST_BACKTRACE", "1");
|
||||||
|
}
|
||||||
|
|
||||||
|
let mut mize = mize::Mize::with_config(config)?;
|
||||||
|
|
||||||
|
marts::cli(&mut mize)?;
|
||||||
|
marts::part_client_auth(&mut mize)?;
|
||||||
|
let mut auth = mize.get_part_native::<marts::auth::client::ClientAuth>("client_auth")?;
|
||||||
|
if auth.secrets().is_none() {
|
||||||
|
auth.login()?;
|
||||||
|
}
|
||||||
|
drop(auth);
|
||||||
|
|
||||||
|
md(&mut mize)?;
|
||||||
|
|
||||||
|
marts::spacetime(&mut mize)?;
|
||||||
|
marts::timetrack::timetrack(&mut mize)?;
|
||||||
|
part_add_thought(&mut mize)?;
|
||||||
|
|
||||||
|
marts::c2vi(&mut mize)?;
|
||||||
|
|
||||||
|
//ppc::daemon(&mut mize)?;
|
||||||
|
|
||||||
|
// testing(&mut mize)?;
|
||||||
|
|
||||||
|
mize.run()?;
|
||||||
|
mize.wait();
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn testing(mize: &mut mize::Mize) -> MizeResult<()> {
|
||||||
|
let test = str! {r#"
|
||||||
|
a = "hello"
|
||||||
|
# a comment
|
||||||
|
b = true
|
||||||
|
"#};
|
||||||
|
//let a = mizelang::parse(test)?;
|
||||||
|
//println!("data: {}", a);
|
||||||
|
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn mize_thin_cli_client(bin_name: Option<&str>) -> MizeResult<()> {
|
||||||
|
use std::io::Write;
|
||||||
|
use std::os::unix::net::UnixStream;
|
||||||
|
|
||||||
|
let store_path =
|
||||||
|
std::env::var("MIZE_STORE").map_err(|_| mize_err!("MIZE_STORE not set in environment"))?;
|
||||||
|
let sock_path = store_path + "/sock";
|
||||||
|
println!("sock_path: {}", sock_path);
|
||||||
|
let mut cmd_line = std::env::args().collect::<Vec<_>>();
|
||||||
|
if let Some(bin_name) = bin_name {
|
||||||
|
cmd_line[0] = bin_name.to_owned();
|
||||||
|
}
|
||||||
|
let msg = MizeMessage::new_custom("cli", cmd_line, 0);
|
||||||
|
|
||||||
|
let mut stream = UnixStream::connect(sock_path)?;
|
||||||
|
|
||||||
|
stream.write_all(&msg.bytes())?;
|
||||||
|
|
||||||
|
// Optional: Ensure all buffered data is pushed to the socket
|
||||||
|
stream.flush()?;
|
||||||
|
let mut reader = BufReader::new(stream.try_clone()?);
|
||||||
|
|
||||||
|
loop {
|
||||||
|
let msg: Value = ciborium::from_reader(&mut reader)?;
|
||||||
|
let mut msg = MizeMessage::new(msg, 0);
|
||||||
|
match msg.cmd()? {
|
||||||
|
MessageCmd::Custom(kind) => {
|
||||||
|
if kind == "cli.done".into_item_data() {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if kind == "cli.stdout".into_item_data() {
|
||||||
|
println!("{}", msg.data()?.value_string()?);
|
||||||
|
}
|
||||||
|
if kind == "cli.stderr".into_item_data() {
|
||||||
|
eprintln!("{}", msg.data()?.value_string()?);
|
||||||
|
}
|
||||||
|
if kind == "cli.spawn".into_item_data() {
|
||||||
|
let cmd = msg.data()?.value_string()?;
|
||||||
|
std::process::Command::new("/bin/sh")
|
||||||
|
.arg("-c")
|
||||||
|
.arg(&cmd)
|
||||||
|
.status()?;
|
||||||
|
let done_msg = MizeMessage::new_custom("cli.spawn_done", ItemData::new(), 0);
|
||||||
|
stream.write_all(&done_msg.bytes())?;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_ => {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn dma_local() -> MizeResult<()> {
|
||||||
|
println!("running dma_local...");
|
||||||
|
unsafe {
|
||||||
|
std::env::set_var(
|
||||||
|
"PATH",
|
||||||
|
"/home/me/work/path-extra/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/home/me/.local/state/nix/profile/bin:/home/me/.nix-profile/bin",
|
||||||
|
);
|
||||||
|
std::env::set_var("SRC", SRC);
|
||||||
|
}
|
||||||
|
let cmd = str!(
|
||||||
|
r#"
|
||||||
|
if ! tmux has-session -t mize-deploy 2>/dev/null; then
|
||||||
|
echo "Created new tmux session...."
|
||||||
|
systemd-run --user --scope --description="mize deploy tmux session" tmux new-session -d -s mize-deploy "NIXPKGS_ALLOW_UNFREE=1 nix develop git+file://$SRC/mize --impure"
|
||||||
|
else
|
||||||
|
echo "using existing session..."
|
||||||
|
fi
|
||||||
|
|
||||||
|
tmux send-keys -t mize-deploy "cargo build --manifest-path $SRC/Cargo.toml --bin main-os" Enter
|
||||||
|
tmux send-keys -t mize-deploy 'echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" > /home/me/work/app-data/mize/daemon.env' Enter
|
||||||
|
tmux send-keys -t mize-deploy 'echo "PATH=$PATH" >> /home/me/work/app-data/mize/daemon.env' Enter
|
||||||
|
tmux send-keys -t mize-deploy "systemctl --user restart mize" Enter
|
||||||
|
"#
|
||||||
|
);
|
||||||
|
sh!(/bin/sh -c "$cmd")?;
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn md_main() -> MizeResult<()> {
|
||||||
|
// run md dma locally
|
||||||
|
let args: Vec<String> = std::env::args().collect();
|
||||||
|
if args.get(1).map(|s| s.as_str()) == Some("dma") {
|
||||||
|
dma_local()?;
|
||||||
|
return Ok(());
|
||||||
|
}
|
||||||
|
if args.get(1).map(|s| s.as_str()) == Some("dev") {
|
||||||
|
sh!(dx serve --hot-reload true --bin dev)?;
|
||||||
|
return Ok(());
|
||||||
|
}
|
||||||
|
|
||||||
|
mize_thin_cli_client(None)
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn mppc_main() -> MizeResult<()> {
|
||||||
|
mize_thin_cli_client(Some("ppc"))
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn dev_main() -> MizeResult<()> {
|
||||||
|
use dioxus::desktop::{Config, WindowBuilder, muda::Menu};
|
||||||
|
use dioxus::prelude::*;
|
||||||
|
|
||||||
|
let mize = Mize::new();
|
||||||
|
let mize_clone = mize.clone();
|
||||||
|
LaunchBuilder::new()
|
||||||
|
.with_context_provider(move || Box::new(mize_clone.clone()))
|
||||||
|
.with_cfg(desktop! {
|
||||||
|
Config::new().with_window(WindowBuilder::new().with_decorations(false).with_title("PPC"))
|
||||||
|
})
|
||||||
|
.launch(marts::ppc::main_page);
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn timetrack_waybar_main() -> MizeResult<()> {
|
||||||
|
use std::io::Write;
|
||||||
|
use std::os::unix::net::UnixStream;
|
||||||
|
|
||||||
|
let store_path =
|
||||||
|
std::env::var("MIZE_STORE").map_err(|_| mize_err!("MIZE_STORE not set in environment"))?;
|
||||||
|
let sock_path = store_path + "/sock";
|
||||||
|
let out_msg = MizeMessage::new_custom("timetrack.sub_current", ItemData::new(), 0);
|
||||||
|
|
||||||
|
let mut stream = UnixStream::connect(&sock_path)?;
|
||||||
|
|
||||||
|
stream.write_all(&out_msg.bytes())?;
|
||||||
|
|
||||||
|
// Optional: Ensure all buffered data is pushed to the socket
|
||||||
|
stream.flush()?;
|
||||||
|
let mut reader = BufReader::new(stream.try_clone()?);
|
||||||
|
|
||||||
|
loop {
|
||||||
|
let msg: Value = match ciborium::from_reader(&mut reader) {
|
||||||
|
Ok(val) => val,
|
||||||
|
Err(_) => {
|
||||||
|
fn read_msg(out_msg: &MizeMessage, sock_path: &String) -> MizeResult<Value> {
|
||||||
|
thread::sleep(Duration::from_secs(12));
|
||||||
|
let mut stream = UnixStream::connect(sock_path)?;
|
||||||
|
|
||||||
|
stream.write_all(&out_msg.bytes())?;
|
||||||
|
|
||||||
|
stream.flush()?;
|
||||||
|
let mut reader = BufReader::new(stream.try_clone()?);
|
||||||
|
let val: Value = ciborium::from_reader(&mut reader)?;
|
||||||
|
Ok(val)
|
||||||
|
};
|
||||||
|
match read_msg(&out_msg, &sock_path) {
|
||||||
|
Ok(val) => val,
|
||||||
|
Err(_) => {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
let mut msg = MizeMessage::new(msg, 0);
|
||||||
|
match msg.cmd()? {
|
||||||
|
MessageCmd::Custom(kind) => {
|
||||||
|
if kind == "timetrack.current".into_item_data() {
|
||||||
|
//println!("----> {} <----", msg.data()?.value_string()?);
|
||||||
|
println!("<b>{}</b>", msg.data()?.value_string()?);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_ => {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn mac_os_main() -> MizeResult<()> {
|
||||||
|
println!("os daemon on mac...");
|
||||||
|
|
||||||
|
let mut config = ItemData::new();
|
||||||
|
config.set_path("store", "/home/me/host/mize")?;
|
||||||
|
config.set_path("data_dir", "/home/me/host/mize/misc")?;
|
||||||
|
config.set_path("log.level", "debug")?;
|
||||||
|
config.set_path("log.stderr.enable", true)?;
|
||||||
|
config.set_path("cli.daemonMode", true)?;
|
||||||
|
config.set_path("c2vi.dash.enable", false)?;
|
||||||
|
config.set_path("auth.client.refresh_thread", true)?;
|
||||||
|
|
||||||
|
//unsafe { std::env::set_var("RUST_BACKTRACE", "1"); }
|
||||||
|
|
||||||
|
let mut mize = mize::Mize::with_config(config)?;
|
||||||
|
|
||||||
|
marts::cli(&mut mize)?;
|
||||||
|
marts::part_client_auth(&mut mize)?;
|
||||||
|
|
||||||
|
let mut auth = mize.get_part_native::<ClientAuth>("client_auth")?;
|
||||||
|
if auth.secrets().is_none() {
|
||||||
|
tracing::info!("main: auth.secrets is none");
|
||||||
|
auth.login()?;
|
||||||
|
}
|
||||||
|
drop(auth);
|
||||||
|
|
||||||
|
md(&mut mize)?;
|
||||||
|
|
||||||
|
marts::spacetime(&mut mize)?;
|
||||||
|
marts::timetrack::timetrack(&mut mize)?;
|
||||||
|
part_add_thought(&mut mize)?;
|
||||||
|
|
||||||
|
marts::c2vi(&mut mize)?;
|
||||||
|
|
||||||
|
mize.run()?;
|
||||||
|
mize.wait();
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn nico_os_main() -> MizeResult<()> {
|
||||||
|
println!("os daemon on nico...");
|
||||||
|
|
||||||
|
let mut config = ItemData::new();
|
||||||
|
config.set_path("store", "/root/work/app-data/mize")?;
|
||||||
|
config.set_path("data_dir", "/root/work/app-data/mize/misc")?;
|
||||||
|
config.set_path("log.level", "debug")?;
|
||||||
|
config.set_path("log.stderr.enable", true)?;
|
||||||
|
config.set_path("cli.daemonMode", true)?;
|
||||||
|
config.set_path("c2vi.dash.enable", false)?;
|
||||||
|
config.set_path("auth.client.refresh_thread", true)?;
|
||||||
|
config.set_path("sc2.userNotesDir", "/root/work/nico/notes/c2vi")?;
|
||||||
|
|
||||||
|
let mut mize = mize::Mize::with_config(config)?;
|
||||||
|
|
||||||
|
marts::cli(&mut mize)?;
|
||||||
|
marts::part_client_auth(&mut mize)?;
|
||||||
|
|
||||||
|
let mut auth = mize.get_part_native::<ClientAuth>("client_auth")?;
|
||||||
|
if auth.secrets().is_none() {
|
||||||
|
tracing::info!("main: auth.secrets is none");
|
||||||
|
auth.login()?;
|
||||||
|
}
|
||||||
|
drop(auth);
|
||||||
|
|
||||||
|
marts::spacetime(&mut mize)?;
|
||||||
|
|
||||||
|
part_timetrack_export(&mut mize)?;
|
||||||
|
|
||||||
|
// notes sync
|
||||||
|
let mize_clone = mize.clone();
|
||||||
|
mize.spawn_background("nico_notes_sync", || nico_notes_sync_thread(mize_clone))?;
|
||||||
|
|
||||||
|
|
||||||
|
marts::c2vi(&mut mize)?;
|
||||||
|
|
||||||
|
mize.run()?;
|
||||||
|
mize.wait();
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
pub fn part_add_thought(mize: &mut Mize) -> MizeResult<()> {
|
||||||
|
use marts::generated::spacetime::add_thought;
|
||||||
|
let mut cli = mize.get_part_native::<marts::CliPart>("cli")?;
|
||||||
|
cli.set_command("ppc");
|
||||||
|
cli.subcommand(Command::new("inputThought").alias("ti"), |matches, mut mize| {
|
||||||
|
|
||||||
|
let tmp_file = std::env::temp_dir().join(format!(
|
||||||
|
"sc2-input-thought-{}.txt",
|
||||||
|
chrono::Utc::now().timestamp()
|
||||||
|
));
|
||||||
|
marts::cli_spawn(format!("nvim {}", tmp_file.display()))?;
|
||||||
|
let new_file_content = std::fs::read_to_string(&tmp_file)
|
||||||
|
.map_err(|e| mize_err!("Failed to read temp file: {}", e))?;
|
||||||
|
let _ = std::fs::remove_file(&tmp_file);
|
||||||
|
let spacetime = mize.get_part_native::<marts::SpacetimePart>("spacetime")?;
|
||||||
|
spacetime.con().reducers.add_thought(new_file_content)?;
|
||||||
|
Ok(())
|
||||||
|
})?;
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn part_timetrack_export(mize: &mut Mize) -> MizeResult<()> {
|
||||||
|
use std::path::Path;
|
||||||
|
let mut cli = mize.get_part_native::<marts::CliPart>("cli")?;
|
||||||
|
|
||||||
|
cli.set_command("ppc");
|
||||||
|
cli.subcommand(Command::new("exportTimetrack").alias("et").arg(Arg::new("date").short('d')).arg(Arg::new("all").short('a').action(ArgAction::SetTrue)), |matches , mut mize| {
|
||||||
|
let spacetime = mize.get_part_native::<marts::SpacetimePart>("spacetime")?;
|
||||||
|
let notes_dir = mize.get_config("sc2.userNotesDir").unwrap_or_default().value_string()?;
|
||||||
|
let today = Local::now().format("%Y-%m-%d").to_string();
|
||||||
|
let mut date = matches.get_one::<String>("date").unwrap_or(&today);
|
||||||
|
std::fs::create_dir_all(Path::new(¬es_dir).join("timetrack_exports"))?;
|
||||||
|
let all = matches.get_flag("all");
|
||||||
|
if all {
|
||||||
|
let (tx, rx) = oneshot::channel();
|
||||||
|
spacetime.con().procedures.first_timetrack_date_then("c2vi".to_string(), |_, res| {tx.send(res);});
|
||||||
|
let res = rx.recv()???;
|
||||||
|
let dates = dates_until_today(&res)?;
|
||||||
|
for date in dates {
|
||||||
|
out!("date: {}", date);
|
||||||
|
let (tx, rx) = oneshot::channel();
|
||||||
|
spacetime.con().procedures.export_timetrack_then("c2vi".to_string(), date.to_owned(), |_, res| {tx.send(res);});
|
||||||
|
let res = rx.recv()???;
|
||||||
|
let mut file = OpenOptions::new().create(true).write(true).open(Path::new(¬es_dir).join("timetrack_exports").join(format!("timetrack_export_{}.md", date)))?;
|
||||||
|
file.write_all(res.as_bytes())?;
|
||||||
|
}
|
||||||
|
return Ok(());
|
||||||
|
}
|
||||||
|
out!("date: {}", date);
|
||||||
|
let (tx, rx) = oneshot::channel();
|
||||||
|
spacetime.con().procedures.export_timetrack_then("c2vi".to_string(), date.to_owned(), |_, res| {tx.send(res);});
|
||||||
|
let res = rx.recv()???;
|
||||||
|
let mut file = OpenOptions::new().create(true).write(true).open(Path::new(¬es_dir).join("timetrack_exports").join(format!("timetrack_export_{}.md", date)))?;
|
||||||
|
file.write_all(res.as_bytes())?;
|
||||||
|
|
||||||
|
Ok(())
|
||||||
|
})?;
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
|
fn dates_until_today(start: &str) -> Result<Vec<String>, chrono::ParseError> {
|
||||||
|
use chrono::NaiveDate;
|
||||||
|
let mut current = NaiveDate::parse_from_str(start, "%Y-%m-%d")?;
|
||||||
|
let today = Local::now().date_naive();
|
||||||
|
|
||||||
|
let mut dates = Vec::new();
|
||||||
|
|
||||||
|
while current <= today {
|
||||||
|
dates.push(current.format("%Y-%m-%d").to_string());
|
||||||
|
current += TimeDelta::days(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
Ok(dates)
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn nico_notes_sync_thread(mize: Mize) -> MizeResult<()> {
|
||||||
|
tracing::info!("starting nico_notes_sync_thread");
|
||||||
|
loop {
|
||||||
|
let res = sh!(/bin/bash -c r#"
|
||||||
|
cd /root/work/nico/notes/c2vi
|
||||||
|
git add .
|
||||||
|
git commit -m "nico notes sync"
|
||||||
|
git pull --rebase
|
||||||
|
git push
|
||||||
|
|
||||||
|
cd /root/work/nico/notes/nexus
|
||||||
|
git add .
|
||||||
|
git commit -m "nico nexus notes sync"
|
||||||
|
git pull --rebase
|
||||||
|
git push
|
||||||
|
|
||||||
|
cd /root/work/nico/notes/ppc-wiki
|
||||||
|
git add .
|
||||||
|
git commit -m "nico ppc-wiki notes sync"
|
||||||
|
git pull --rebase
|
||||||
|
git push
|
||||||
|
"#);
|
||||||
|
if let Err(e) = res {
|
||||||
|
tracing::error!("error in nico_notes_sync_thread: {}", e);
|
||||||
|
};
|
||||||
|
std::thread::sleep(std::time::Duration::from_mins(2));
|
||||||
|
}
|
||||||
|
}
|
||||||
108
dev-part/vibed/mize-website/server.rs
Normal file
108
dev-part/vibed/mize-website/server.rs
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
use axum::{Json, http::StatusCode};
|
||||||
|
use serde_json::{Value, json};
|
||||||
|
use std::str::FromStr;
|
||||||
|
|
||||||
|
use axum::{
|
||||||
|
Router,
|
||||||
|
error_handling::HandleErrorLayer,
|
||||||
|
http::Uri,
|
||||||
|
response::IntoResponse,
|
||||||
|
routing::{any, get},
|
||||||
|
};
|
||||||
|
use axum_oidc::handle_oidc_redirect;
|
||||||
|
use axum_oidc::{
|
||||||
|
EmptyAdditionalClaims, OidcAuthLayer, OidcClaims, OidcClient, OidcLoginLayer,
|
||||||
|
OidcRpInitiatedLogout, error::MiddlewareError,
|
||||||
|
};
|
||||||
|
use base64::{
|
||||||
|
Engine,
|
||||||
|
alphabet::STANDARD,
|
||||||
|
engine::{GeneralPurpose, GeneralPurposeConfig},
|
||||||
|
};
|
||||||
|
use clap::Command;
|
||||||
|
use dioxus::prelude::*;
|
||||||
|
use mize::Mize;
|
||||||
|
use mize::MizeResult;
|
||||||
|
use openidconnect::Scope;
|
||||||
|
use openidconnect::{ClientId, ClientSecret, IssuerUrl};
|
||||||
|
use tower::ServiceBuilder;
|
||||||
|
use tower_sessions::{
|
||||||
|
Expiry, MemoryStore, SessionManagerLayer,
|
||||||
|
cookie::{SameSite, time::Duration},
|
||||||
|
};
|
||||||
|
|
||||||
|
pub async fn server(mize: &mut Mize) -> MizeResult<()> {
|
||||||
|
dioxus::logger::initialize_default();
|
||||||
|
|
||||||
|
let listen_addr = mize.get_config("server.listen_addr")?.value_string()?;
|
||||||
|
let port = mize.get_config("server.port")?.value_string()?;
|
||||||
|
let issuer = mize.get_config("auth.issuer")?.value_string()?;
|
||||||
|
let client_id = mize.get_config("auth.client_id")?.value_string()?;
|
||||||
|
let client_secret = mize.get_config("auth.client_secret")?.value_string()?;
|
||||||
|
let url = mize.get_config("web.url")?.value_string()?;
|
||||||
|
let redirect_url = format!("{url}/oidc");
|
||||||
|
|
||||||
|
let session_store = MemoryStore::default();
|
||||||
|
let session_layer = SessionManagerLayer::new(session_store)
|
||||||
|
.with_secure(false)
|
||||||
|
.with_same_site(SameSite::Lax)
|
||||||
|
.with_expiry(Expiry::OnInactivity(Duration::seconds(120)));
|
||||||
|
|
||||||
|
let oidc_login_service = ServiceBuilder::new()
|
||||||
|
.layer(HandleErrorLayer::new(|e: MiddlewareError| async {
|
||||||
|
dbg!(&e);
|
||||||
|
e.into_response()
|
||||||
|
}))
|
||||||
|
.layer(OidcLoginLayer::<EmptyAdditionalClaims>::new());
|
||||||
|
|
||||||
|
let oidc_client = OidcClient::<EmptyAdditionalClaims>::builder()
|
||||||
|
.with_default_http_client()
|
||||||
|
.with_redirect_url(Uri::from_str(redirect_url.as_str())?)
|
||||||
|
.with_client_id(ClientId::new(client_id))
|
||||||
|
.add_scope(Scope::new("profile".into()))
|
||||||
|
.add_scope(Scope::new("email".into()))
|
||||||
|
// Optional: add untrusted audiences. If the `aud` claim contains any of these audiences, the token is rejected.
|
||||||
|
//.add_untrusted_audience(Audience::new("123456789".to_string()))
|
||||||
|
.with_client_secret(ClientSecret::new(client_secret))
|
||||||
|
.discover(IssuerUrl::new(issuer.into()).expect("Invalid IssuerUrl"))
|
||||||
|
.await
|
||||||
|
.unwrap()
|
||||||
|
.build();
|
||||||
|
|
||||||
|
let oidc_auth_service = ServiceBuilder::new()
|
||||||
|
.layer(HandleErrorLayer::new(|e: MiddlewareError| async {
|
||||||
|
dbg!(&e);
|
||||||
|
e.into_response()
|
||||||
|
}))
|
||||||
|
.layer(OidcAuthLayer::new(oidc_client));
|
||||||
|
|
||||||
|
let app = Router::new()
|
||||||
|
// private routes
|
||||||
|
.route("/foo", get(authenticated))
|
||||||
|
.route("/logout", get(logout))
|
||||||
|
.layer(oidc_login_service)
|
||||||
|
.route("/bar", get(maybe_authenticated))
|
||||||
|
.route("/oidc", any(handle_oidc_redirect::<EmptyAdditionalClaims>))
|
||||||
|
.layer(oidc_auth_service)
|
||||||
|
.layer(session_layer)
|
||||||
|
.layer(tower_http::trace::TraceLayer::new_for_http())
|
||||||
|
//
|
||||||
|
// not authenticated routes
|
||||||
|
.route("/", get(mize_main_page))
|
||||||
|
.route("/oidc_display_code_and_state", get(display_code_and_state))
|
||||||
|
|
||||||
|
tracing::info!("Running on http://{listen_addr}:{port}");
|
||||||
|
|
||||||
|
let listener = tokio::net::TcpListener::bind(format!("{listen_addr}:{port}"))
|
||||||
|
.await
|
||||||
|
.unwrap();
|
||||||
|
axum::serve(listener, app.into_make_service())
|
||||||
|
.await
|
||||||
|
.unwrap();
|
||||||
|
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
|
fn mize_main_page() -> impl IntoResponse {
|
||||||
|
|
||||||
|
}
|
||||||
8
flake.lock
generated
8
flake.lock
generated
@@ -2519,11 +2519,11 @@
|
|||||||
"rust-overlay": "rust-overlay_2"
|
"rust-overlay": "rust-overlay_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1778739421,
|
"lastModified": 1780921813,
|
||||||
"narHash": "sha256-TB1sLnYG50VW5OraR0MJUuPgt8rBv4NmoN7outA+9qk=",
|
"narHash": "sha256-yqQ4OmdWs691nfjxKcrDrbnjeQQwlXnmLj8IG0AbWyU=",
|
||||||
"ref": "refs/heads/master",
|
"ref": "refs/heads/master",
|
||||||
"rev": "2907d7e2366ddea16d1a8e021e0af2e30dc6f8eb",
|
"rev": "c57849f748ba20134f79b76e42e0c85786dd637f",
|
||||||
"revCount": 200,
|
"revCount": 203,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.ppc.social/ppc/ppc"
|
"url": "https://git.ppc.social/ppc/ppc"
|
||||||
},
|
},
|
||||||
|
|||||||
1
forked-zed
Submodule
1
forked-zed
Submodule
Submodule forked-zed added at 790dcefb01
41
generated/Cargo.toml
Normal file
41
generated/Cargo.toml
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
|
||||||
|
[package]
|
||||||
|
name = "generated-c2vi-dev-part"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2024"
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
c2vi-dev-part.path = "../dev-part"
|
||||||
|
|
||||||
|
[[bin]]
|
||||||
|
name = "lush-os"
|
||||||
|
path = "lush-os.rs"
|
||||||
|
|
||||||
|
[[bin]]
|
||||||
|
name = "main-os"
|
||||||
|
path = "main-os.rs"
|
||||||
|
|
||||||
|
[[bin]]
|
||||||
|
name = "mac-os"
|
||||||
|
path = "mac-os.rs"
|
||||||
|
|
||||||
|
[[bin]]
|
||||||
|
name = "nico-os"
|
||||||
|
path = "nico-os.rs"
|
||||||
|
|
||||||
|
[[bin]]
|
||||||
|
name = "mppc"
|
||||||
|
path = "mppc.rs"
|
||||||
|
|
||||||
|
[[bin]]
|
||||||
|
name = "timetrack-waybar"
|
||||||
|
path = "timetrack-waybar.rs"
|
||||||
|
|
||||||
|
[[bin]]
|
||||||
|
name = "md"
|
||||||
|
path = "md.rs"
|
||||||
|
|
||||||
|
[[bin]]
|
||||||
|
name = "dev"
|
||||||
|
path = "dev.rs"
|
||||||
|
|
||||||
7
generated/dev.rs
Normal file
7
generated/dev.rs
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
|
||||||
|
fn main() {
|
||||||
|
if let Err(err) = c2vi_part::dev_main() {
|
||||||
|
err.log();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
7
generated/lush-os.rs
Normal file
7
generated/lush-os.rs
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
|
||||||
|
fn main() {
|
||||||
|
if let Err(err) = c2vi_part::lush_os_main() {
|
||||||
|
err.log();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
7
generated/mac-os.rs
Normal file
7
generated/mac-os.rs
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
|
||||||
|
fn main() {
|
||||||
|
if let Err(err) = c2vi_part::mac_os_main() {
|
||||||
|
err.log();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
7
generated/main-os.rs
Normal file
7
generated/main-os.rs
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
|
||||||
|
fn main() {
|
||||||
|
if let Err(err) = c2vi_part::main_os_main() {
|
||||||
|
err.log();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
7
generated/md.rs
Normal file
7
generated/md.rs
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
|
||||||
|
fn main() {
|
||||||
|
if let Err(err) = c2vi_part::md_main() {
|
||||||
|
err.log();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
7
generated/mppc.rs
Normal file
7
generated/mppc.rs
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
|
||||||
|
fn main() {
|
||||||
|
if let Err(err) = c2vi_part::mppc_main() {
|
||||||
|
err.log();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
7
generated/nico-os.rs
Normal file
7
generated/nico-os.rs
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
|
||||||
|
fn main() {
|
||||||
|
if let Err(err) = c2vi_part::nico_os_main() {
|
||||||
|
err.log();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
7
generated/timetrack-waybar.rs
Normal file
7
generated/timetrack-waybar.rs
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
|
||||||
|
fn main() {
|
||||||
|
if let Err(err) = c2vi_part::timetrack_waybar_main() {
|
||||||
|
err.log();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -66,13 +66,15 @@ in {
|
|||||||
boot.zfs.forceImportRoot = false;
|
boot.zfs.forceImportRoot = false;
|
||||||
networking.hostId = "7552c83e";
|
networking.hostId = "7552c83e";
|
||||||
|
|
||||||
fileSystems."/home/files/storage" = {
|
|
||||||
device = "storage";
|
|
||||||
fsType = "zfs";
|
|
||||||
};
|
|
||||||
fileSystems."/data" = {
|
fileSystems."/data" = {
|
||||||
device = "storage";
|
device = "storage";
|
||||||
fsType = "zfs";
|
fsType = "zfs";
|
||||||
|
options = [ "defaults" "nofail" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/home/files/storage" = {
|
||||||
|
device = "/data";
|
||||||
|
options = [ "bind" "defaults" "nofail" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Use the GRUB 2 boot loader.
|
# Use the GRUB 2 boot loader.
|
||||||
|
|||||||
@@ -144,9 +144,13 @@
|
|||||||
|
|
||||||
####################### MIZE ###########################
|
####################### MIZE ###########################
|
||||||
mize.enable = true;
|
mize.enable = true;
|
||||||
mize.debugConfigFile = "/home/me/host/mize-config.toml";
|
mize.enableConfigFile = false;
|
||||||
mize.debugBinary = "/home/me/here/mize/target/debug/mize";
|
mize.debugBinary = "/home/me/here/config/target/debug/lush-os";
|
||||||
systemd.user.services.mize.environment.LOG= "trace";
|
systemd.user.services.mize.environment.LOG= "trace";
|
||||||
|
systemd.user.services.mize.environment.MIZE_STORE= "/home/me/host/mize";
|
||||||
|
systemd.user.services.mize.serviceConfig.EnvironmentFile = "/home/me/host/mize/daemon.env";
|
||||||
|
#systemd.user.services.mize.environment.WAYLAND_DISPLAY= "wayland-1";
|
||||||
|
systemd.user.services.mize.environment.DISPLAY= ":0";
|
||||||
|
|
||||||
|
|
||||||
home-manager.users.me.home.file = {
|
home-manager.users.me.home.file = {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ lib, secretsDir, pkgs, inputs, unstable, ... }: let
|
{ lib, secretsDir, pkgs, inputs, unstable, config, ... }: let
|
||||||
|
|
||||||
myobs = pkgs.wrapOBS {
|
myobs = pkgs.wrapOBS {
|
||||||
plugins = with pkgs.obs-studio-plugins; [
|
plugins = with pkgs.obs-studio-plugins; [
|
||||||
@@ -24,11 +24,21 @@ in {
|
|||||||
inputs.mize.nixosModules.default
|
inputs.mize.nixosModules.default
|
||||||
];
|
];
|
||||||
mize.enable = true;
|
mize.enable = true;
|
||||||
mize.debugBinary = "/home/me/here/mize/target/debug/mize";
|
mize.debugBinary = "/data/external/config/target/debug/mac-os";
|
||||||
mize.debugConfigFile = "/home/me/host/mize-config.toml";
|
mize.debugConfigFile = "/home/me/host/mize-config.toml";
|
||||||
systemd.user.services.mize.environment.LOG= "trace";
|
systemd.user.services.mize.environment.LOG= "trace";
|
||||||
|
systemd.user.services.mize.serviceConfig.EnvironmentFile = "/home/me/host/mize/daemon.env";
|
||||||
programs.nix-ld.enable = true;
|
programs.nix-ld.enable = true;
|
||||||
|
|
||||||
|
# https://nixos.wiki/wiki/OBS_Studio
|
||||||
|
boot.extraModulePackages = with config.boot.kernelPackages; lib.mkForce [
|
||||||
|
v4l2loopback
|
||||||
|
];
|
||||||
|
boot.extraModprobeConfig = ''
|
||||||
|
options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1 kvm_intel nested=1
|
||||||
|
'';
|
||||||
|
security.polkit.enable = true;
|
||||||
|
|
||||||
#services.pid-fan-controller.enable = true;
|
#services.pid-fan-controller.enable = true;
|
||||||
|
|
||||||
networking.hostName = "mac";
|
networking.hostName = "mac";
|
||||||
@@ -69,7 +79,6 @@ in {
|
|||||||
swapDevices = [ { device = "/swapfile"; } ];
|
swapDevices = [ { device = "/swapfile"; } ];
|
||||||
|
|
||||||
boot.kernelModules = [ "usbip_core" ];
|
boot.kernelModules = [ "usbip_core" ];
|
||||||
boot.extraModprobeConfig = "options kvm_intel nested=1";
|
|
||||||
|
|
||||||
# to build rpi images
|
# to build rpi images
|
||||||
boot.binfmt.emulatedSystems = [
|
boot.binfmt.emulatedSystems = [
|
||||||
@@ -147,6 +156,12 @@ in {
|
|||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
fileSystems."/data/external" = {
|
||||||
|
device = "/dev/disk/by-uuid/62933892-a6b9-4a10-8b9d-f47dc1380e85";
|
||||||
|
fsType = "ext4";
|
||||||
|
options = [ "defaults" "nofail" ];
|
||||||
|
};
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
nameservers = [ "1.1.1.1" "8.8.8.8" ];
|
nameservers = [ "1.1.1.1" "8.8.8.8" ];
|
||||||
};
|
};
|
||||||
@@ -182,7 +197,7 @@ in {
|
|||||||
{
|
{
|
||||||
position = "left";
|
position = "left";
|
||||||
hostname = "main";
|
hostname = "main";
|
||||||
activate_on_startup = true;
|
activate_on_startup = false;
|
||||||
ips = [ "192.168.4.2" "100.88.218.34" ];
|
ips = [ "192.168.4.2" "100.88.218.34" ];
|
||||||
port = 4410;
|
port = 4410;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,6 +34,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
services.openssh.enable = true;
|
services.openssh.enable = true;
|
||||||
|
boot.kernelModules = [ "vhci-hcd" ];
|
||||||
|
|
||||||
programs.obs-studio = {
|
programs.obs-studio = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -271,8 +272,9 @@ fileSystems."/home/me/nico" = {
|
|||||||
####################### MIZE ###########################
|
####################### MIZE ###########################
|
||||||
mize.enable = true;
|
mize.enable = true;
|
||||||
mize.debugConfigFile = "/home/me/secrets/mize-config.toml";
|
mize.debugConfigFile = "/home/me/secrets/mize-config.toml";
|
||||||
mize.debugBinary = "/home/me/work/path-extra/mize";
|
mize.debugBinary = "/home/me/work/config/target/debug/main-os";
|
||||||
systemd.user.services.mize.environment.LOG= "trace";
|
systemd.user.services.mize.environment.LOG= "trace";
|
||||||
|
systemd.user.services.mize.serviceConfig.EnvironmentFile = "/home/me/work/app-data/mize/daemon.env";
|
||||||
|
|
||||||
|
|
||||||
#services.udev.packages = [ inputs.waveforms.packages.${system}.adept2-runtime ];
|
#services.udev.packages = [ inputs.waveforms.packages.${system}.adept2-runtime ];
|
||||||
@@ -474,7 +476,7 @@ fileSystems."/home/me/nico" = {
|
|||||||
elif [[ "$host" == "phone" ]]
|
elif [[ "$host" == "phone" ]]
|
||||||
then
|
then
|
||||||
ssh phone "source ~/.bashrc && on" &
|
ssh phone "source ~/.bashrc && on" &
|
||||||
${pkgs.rustdesk}/bin/rustdesk --connect 100.77.80.77
|
${pkgs.rustdesk}/bin/rustdesk --connect 100.88.245.227
|
||||||
|
|
||||||
elif [[ "$host" == "vnc-fwin" ]]
|
elif [[ "$host" == "vnc-fwin" ]]
|
||||||
then
|
then
|
||||||
@@ -550,6 +552,8 @@ fileSystems."/home/me/nico" = {
|
|||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [
|
networking.firewall.allowedTCPPorts = [
|
||||||
5357 # wsdd
|
5357 # wsdd
|
||||||
|
1234 # for general use
|
||||||
|
12345 # for general use
|
||||||
8888 # for general usage
|
8888 # for general usage
|
||||||
9999 # for general usage
|
9999 # for general usage
|
||||||
8080 # for mitm proxy
|
8080 # for mitm proxy
|
||||||
|
|||||||
8
hosts/nico/setup.sh
Executable file
8
hosts/nico/setup.sh
Executable file
@@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
SRC=root//work/config-c2vi
|
||||||
|
|
||||||
|
# ~/.hermes link
|
||||||
|
ln -fs ~/work/nico/hermes ~/.hermes
|
||||||
|
|
||||||
|
# ssh config
|
||||||
|
ln -fs $SRC/hosts/nico/ssh_config ~/.ssh/config
|
||||||
2
hosts/nico/ssh_config
Normal file
2
hosts/nico/ssh_config
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
Host *
|
||||||
|
IdentityFile /root/work/nico/private-key
|
||||||
20
hosts/te.nix
20
hosts/te.nix
@@ -61,6 +61,26 @@ in {
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
services.keyd = {
|
||||||
|
enable = true;
|
||||||
|
/*
|
||||||
|
keyboards.bluetooth-3-0-keyboard = {
|
||||||
|
ids = [ "05ac:0255:f22563e9" ];
|
||||||
|
settings.main = {
|
||||||
|
leftalt = "meta";
|
||||||
|
leftcontrol = "leftalt";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
*/
|
||||||
|
#keyboards.default.ids = [ "-05ac:0255" ]; completely disables my rebinding...... hmmmm
|
||||||
|
keyboards.default.settings = {
|
||||||
|
main = {
|
||||||
|
leftalt = "leftcontrol";
|
||||||
|
leftcontrol = "leftalt";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
boot.kernelModules = [ "usbip_core" ];
|
boot.kernelModules = [ "usbip_core" ];
|
||||||
boot.extraModprobeConfig = "options kvm_intel nested=1";
|
boot.extraModprobeConfig = "options kvm_intel nested=1";
|
||||||
|
|
||||||
|
|||||||
821
log
821
log
@@ -1,821 +0,0 @@
|
|||||||
warning: Git tree '/home/me/work/config' is dirty
|
|
||||||
evaluation warning: You have set specialArgs.pkgs, which means that options like nixpkgs.config
|
|
||||||
and nixpkgs.overlays will be ignored. If you wish to reuse an already created
|
|
||||||
pkgs, which you know is configured correctly for this NixOS configuration,
|
|
||||||
please import the `nixosModules.readOnlyPkgs` module from the nixpkgs flake or
|
|
||||||
`(modulesPath + "/misc/nixpkgs/read-only.nix"), and set `{ nixpkgs.pkgs = <your pkgs>; }`.
|
|
||||||
This properly disables the ignored options to prevent future surprises.
|
|
||||||
evaluation warning: nix-index-database: flake output `hmModules` has been renamed to `homeModules`
|
|
||||||
evaluation warning: In order to support declarative extension configuration,
|
|
||||||
extension installation has been moved from
|
|
||||||
programs.firefox.profiles.<profile>.extensions
|
|
||||||
to
|
|
||||||
programs.firefox.profiles.<profile>.extensions.packages
|
|
||||||
evaluation warning: 'system' has been renamed to/replaced by 'stdenv.hostPlatform.system'
|
|
||||||
error:
|
|
||||||
… while calling anonymous lambda
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/attrsets.nix:1691:14:
|
|
||||||
1690| zipAttrsWith (
|
|
||||||
1691| n: values:
|
|
||||||
| ^
|
|
||||||
1692| let
|
|
||||||
|
|
||||||
… while calling the 'head' builtin
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/attrsets.nix:1696:13:
|
|
||||||
1695| if length values == 1 || pred here (elemAt values 1) (head values) then
|
|
||||||
1696| head values
|
|
||||||
| ^
|
|
||||||
1697| else
|
|
||||||
|
|
||||||
… while calling anonymous lambda
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/attrsets.nix:1188:17:
|
|
||||||
1187| mapAttrs (
|
|
||||||
1188| name: value:
|
|
||||||
| ^
|
|
||||||
1189| if isAttrs value && cond value then recurse (path ++ [ name ]) value else f (path ++ [ name ]) value
|
|
||||||
|
|
||||||
… from call site
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/attrsets.nix:1189:85:
|
|
||||||
1188| name: value:
|
|
||||||
1189| if isAttrs value && cond value then recurse (path ++ [ name ]) value else f (path ++ [ name ]) value
|
|
||||||
| ^
|
|
||||||
1190| );
|
|
||||||
|
|
||||||
… while calling anonymous lambda
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/modules.nix:275:71:
|
|
||||||
274| # For definitions that have an associated option
|
|
||||||
275| declaredConfig = mapAttrsRecursiveCond (v: !isOption v) (_: v: v.value) options;
|
|
||||||
| ^
|
|
||||||
276|
|
|
||||||
|
|
||||||
… while evaluating the attribute 'value'
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/modules.nix:1118:7:
|
|
||||||
1117| // {
|
|
||||||
1118| value = addErrorContext "while evaluating the option `${showOption loc}':" value;
|
|
||||||
| ^
|
|
||||||
1119| inherit (res.defsFinal') highestPrio;
|
|
||||||
|
|
||||||
… while evaluating the option `system.build.toplevel':
|
|
||||||
|
|
||||||
… while evaluating the attribute 'mergedValue'
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/modules.nix:1192:5:
|
|
||||||
1191| # Type-check the remaining definitions, and merge them. Or throw if no definitions.
|
|
||||||
1192| mergedValue =
|
|
||||||
| ^
|
|
||||||
1193| if isDefined then
|
|
||||||
|
|
||||||
… while evaluating a branch condition
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/modules.nix:1193:7:
|
|
||||||
1192| mergedValue =
|
|
||||||
1193| if isDefined then
|
|
||||||
| ^
|
|
||||||
1194| if type.merge ? v2 then
|
|
||||||
|
|
||||||
… while evaluating the attribute 'values'
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/modules.nix:1186:9:
|
|
||||||
1185| {
|
|
||||||
1186| values = defsSorted;
|
|
||||||
| ^
|
|
||||||
1187| inherit (defsFiltered) highestPrio;
|
|
||||||
|
|
||||||
… while evaluating a branch condition
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/modules.nix:1180:11:
|
|
||||||
1179| # Avoid sorting if we don't have to.
|
|
||||||
1180| if any (def: def.value._type or "" == "order") defsFiltered.values then
|
|
||||||
| ^
|
|
||||||
1181| sortProperties defsFiltered.values
|
|
||||||
|
|
||||||
… while calling the 'any' builtin
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/modules.nix:1180:14:
|
|
||||||
1179| # Avoid sorting if we don't have to.
|
|
||||||
1180| if any (def: def.value._type or "" == "order") defsFiltered.values then
|
|
||||||
| ^
|
|
||||||
1181| sortProperties defsFiltered.values
|
|
||||||
|
|
||||||
… while evaluating the attribute 'values'
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/modules.nix:1360:7:
|
|
||||||
1359| {
|
|
||||||
1360| values = concatMap (def: if getPrio def == highestPrio then [ (strip def) ] else [ ]) defs;
|
|
||||||
| ^
|
|
||||||
1361| inherit highestPrio;
|
|
||||||
|
|
||||||
… while calling the 'concatMap' builtin
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/modules.nix:1360:16:
|
|
||||||
1359| {
|
|
||||||
1360| values = concatMap (def: if getPrio def == highestPrio then [ (strip def) ] else [ ]) defs;
|
|
||||||
| ^
|
|
||||||
1361| inherit highestPrio;
|
|
||||||
|
|
||||||
… while calling the 'concatMap' builtin
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/modules.nix:1160:26:
|
|
||||||
1159| # Process mkMerge and mkIf properties.
|
|
||||||
1160| defsNormalized = concatMap (
|
|
||||||
| ^
|
|
||||||
1161| m:
|
|
||||||
|
|
||||||
… while calling anonymous lambda
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/modules.nix:1161:11:
|
|
||||||
1160| defsNormalized = concatMap (
|
|
||||||
1161| m:
|
|
||||||
| ^
|
|
||||||
1162| map (
|
|
||||||
|
|
||||||
… while calling the 'map' builtin
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/modules.nix:1162:11:
|
|
||||||
1161| m:
|
|
||||||
1162| map (
|
|
||||||
| ^
|
|
||||||
1163| value:
|
|
||||||
|
|
||||||
… while evaluating definitions from `/nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/nixos/modules/system/activation/top-level.nix':
|
|
||||||
|
|
||||||
… from call site
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/modules.nix:1171:80:
|
|
||||||
1170| }
|
|
||||||
1171| ) (addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
|
|
||||||
| ^
|
|
||||||
1172| ) defs;
|
|
||||||
|
|
||||||
… while calling 'dischargeProperties'
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/modules.nix:1311:5:
|
|
||||||
1310| dischargeProperties =
|
|
||||||
1311| def:
|
|
||||||
| ^
|
|
||||||
1312| if def._type or "" == "merge" then
|
|
||||||
|
|
||||||
… while evaluating a branch condition
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/modules.nix:1312:5:
|
|
||||||
1311| def:
|
|
||||||
1312| if def._type or "" == "merge" then
|
|
||||||
| ^
|
|
||||||
1313| concatMap dischargeProperties def.contents
|
|
||||||
|
|
||||||
… while evaluating the attribute 'value'
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/modules.nix:805:21:
|
|
||||||
804| inherit (module) file;
|
|
||||||
805| inherit value;
|
|
||||||
| ^
|
|
||||||
806| }) module.config
|
|
||||||
|
|
||||||
… from call site
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/nixos/modules/system/activation/top-level.nix:81:26:
|
|
||||||
80| # Handle assertions and warnings
|
|
||||||
81| baseSystemAssertWarn = lib.asserts.checkAssertWarn config.assertions config.warnings baseSystem;
|
|
||||||
| ^
|
|
||||||
82|
|
|
||||||
|
|
||||||
… while calling 'checkAssertWarn'
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/asserts.nix:193:27:
|
|
||||||
192| checkAssertWarn =
|
|
||||||
193| assertions: warnings: val:
|
|
||||||
| ^
|
|
||||||
194| let
|
|
||||||
|
|
||||||
… from call site
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/asserts.nix:200:7:
|
|
||||||
199| else
|
|
||||||
200| showWarnings warnings val;
|
|
||||||
| ^
|
|
||||||
201|
|
|
||||||
|
|
||||||
… while calling 'showWarnings'
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/trivial.nix:982:28:
|
|
||||||
981|
|
|
||||||
982| showWarnings = warnings: res: lib.foldr (w: x: warn w x) res warnings;
|
|
||||||
| ^
|
|
||||||
983|
|
|
||||||
|
|
||||||
… from call site
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/trivial.nix:982:33:
|
|
||||||
981|
|
|
||||||
982| showWarnings = warnings: res: lib.foldr (w: x: warn w x) res warnings;
|
|
||||||
| ^
|
|
||||||
983|
|
|
||||||
|
|
||||||
… while calling 'foldr'
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/lists.nix:139:14:
|
|
||||||
138| foldr =
|
|
||||||
139| op: nul: list:
|
|
||||||
| ^
|
|
||||||
140| let
|
|
||||||
|
|
||||||
… from call site
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/lists.nix:144:5:
|
|
||||||
143| in
|
|
||||||
144| fold' 0;
|
|
||||||
| ^
|
|
||||||
145|
|
|
||||||
|
|
||||||
… while calling 'fold''
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/lists.nix:142:15:
|
|
||||||
141| len = length list;
|
|
||||||
142| fold' = n: if n == len then nul else op (elemAt list n) (fold' (n + 1));
|
|
||||||
| ^
|
|
||||||
143| in
|
|
||||||
|
|
||||||
… while evaluating a branch condition
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/lists.nix:142:18:
|
|
||||||
141| len = length list;
|
|
||||||
142| fold' = n: if n == len then nul else op (elemAt list n) (fold' (n + 1));
|
|
||||||
| ^
|
|
||||||
143| in
|
|
||||||
|
|
||||||
… while calling the 'length' builtin
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/lists.nix:141:13:
|
|
||||||
140| let
|
|
||||||
141| len = length list;
|
|
||||||
| ^
|
|
||||||
142| fold' = n: if n == len then nul else op (elemAt list n) (fold' (n + 1));
|
|
||||||
|
|
||||||
… from call site
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/nixos/modules/system/activation/top-level.nix:81:72:
|
|
||||||
80| # Handle assertions and warnings
|
|
||||||
81| baseSystemAssertWarn = lib.asserts.checkAssertWarn config.assertions config.warnings baseSystem;
|
|
||||||
| ^
|
|
||||||
82|
|
|
||||||
|
|
||||||
… while calling anonymous lambda
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/attrsets.nix:1188:17:
|
|
||||||
1187| mapAttrs (
|
|
||||||
1188| name: value:
|
|
||||||
| ^
|
|
||||||
1189| if isAttrs value && cond value then recurse (path ++ [ name ]) value else f (path ++ [ name ]) value
|
|
||||||
|
|
||||||
… from call site
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/attrsets.nix:1189:85:
|
|
||||||
1188| name: value:
|
|
||||||
1189| if isAttrs value && cond value then recurse (path ++ [ name ]) value else f (path ++ [ name ]) value
|
|
||||||
| ^
|
|
||||||
1190| );
|
|
||||||
|
|
||||||
… while calling anonymous lambda
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/modules.nix:275:71:
|
|
||||||
274| # For definitions that have an associated option
|
|
||||||
275| declaredConfig = mapAttrsRecursiveCond (v: !isOption v) (_: v: v.value) options;
|
|
||||||
| ^
|
|
||||||
276|
|
|
||||||
|
|
||||||
… while evaluating the attribute 'value'
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/modules.nix:1118:7:
|
|
||||||
1117| // {
|
|
||||||
1118| value = addErrorContext "while evaluating the option `${showOption loc}':" value;
|
|
||||||
| ^
|
|
||||||
1119| inherit (res.defsFinal') highestPrio;
|
|
||||||
|
|
||||||
… while evaluating the option `warnings':
|
|
||||||
|
|
||||||
(10 duplicate frames omitted)
|
|
||||||
|
|
||||||
… while evaluating definitions from `/nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/nixos/modules/system/boot/systemd.nix':
|
|
||||||
|
|
||||||
… from call site
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/modules.nix:1171:80:
|
|
||||||
1170| }
|
|
||||||
1171| ) (addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
|
|
||||||
| ^
|
|
||||||
1172| ) defs;
|
|
||||||
|
|
||||||
… while calling 'dischargeProperties'
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/modules.nix:1311:5:
|
|
||||||
1310| dischargeProperties =
|
|
||||||
1311| def:
|
|
||||||
| ^
|
|
||||||
1312| if def._type or "" == "merge" then
|
|
||||||
|
|
||||||
… while evaluating a branch condition
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/modules.nix:1312:5:
|
|
||||||
1311| def:
|
|
||||||
1312| if def._type or "" == "merge" then
|
|
||||||
| ^
|
|
||||||
1313| concatMap dischargeProperties def.contents
|
|
||||||
|
|
||||||
… while evaluating the attribute 'value'
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/modules.nix:805:21:
|
|
||||||
804| inherit (module) file;
|
|
||||||
805| inherit value;
|
|
||||||
| ^
|
|
||||||
806| }) module.config
|
|
||||||
|
|
||||||
… while calling the 'concatLists' builtin
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/nixos/modules/system/boot/systemd.nix:494:7:
|
|
||||||
493| in
|
|
||||||
494| concatLists (
|
|
||||||
| ^
|
|
||||||
495| mapAttrsToList (
|
|
||||||
|
|
||||||
… while calling anonymous lambda
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/nixos/modules/system/boot/systemd.nix:496:17:
|
|
||||||
495| mapAttrsToList (
|
|
||||||
496| name: service:
|
|
||||||
| ^
|
|
||||||
497| let
|
|
||||||
|
|
||||||
… while calling the 'concatLists' builtin
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/nixos/modules/system/boot/systemd.nix:502:11:
|
|
||||||
501| in
|
|
||||||
502| concatLists [
|
|
||||||
| ^
|
|
||||||
503| (optional (type == "oneshot" && (restart == "always" || restart == "on-success"))
|
|
||||||
|
|
||||||
… from call site
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/nixos/modules/system/boot/systemd.nix:503:14:
|
|
||||||
502| concatLists [
|
|
||||||
503| (optional (type == "oneshot" && (restart == "always" || restart == "on-success"))
|
|
||||||
| ^
|
|
||||||
504| "Service '${name}.service' with 'Type=oneshot' cannot have 'Restart=always' or 'Restart=on-success'"
|
|
||||||
|
|
||||||
… while calling 'optional'
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/lists.nix:777:20:
|
|
||||||
776| */
|
|
||||||
777| optional = cond: elem: if cond then [ elem ] else [ ];
|
|
||||||
| ^
|
|
||||||
778|
|
|
||||||
|
|
||||||
… while evaluating a branch condition
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/lists.nix:777:26:
|
|
||||||
776| */
|
|
||||||
777| optional = cond: elem: if cond then [ elem ] else [ ];
|
|
||||||
| ^
|
|
||||||
778|
|
|
||||||
|
|
||||||
… in the left operand of the AND (&&) operator
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/nixos/modules/system/boot/systemd.nix:503:42:
|
|
||||||
502| concatLists [
|
|
||||||
503| (optional (type == "oneshot" && (restart == "always" || restart == "on-success"))
|
|
||||||
| ^
|
|
||||||
504| "Service '${name}.service' with 'Type=oneshot' cannot have 'Restart=always' or 'Restart=on-success'"
|
|
||||||
|
|
||||||
… from call site
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/nixos/modules/system/boot/systemd.nix:498:20:
|
|
||||||
497| let
|
|
||||||
498| type = service.serviceConfig.Type or "";
|
|
||||||
| ^
|
|
||||||
499| restart = service.serviceConfig.Restart or "no";
|
|
||||||
|
|
||||||
… while calling anonymous lambda
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/attrsets.nix:1188:17:
|
|
||||||
1187| mapAttrs (
|
|
||||||
1188| name: value:
|
|
||||||
| ^
|
|
||||||
1189| if isAttrs value && cond value then recurse (path ++ [ name ]) value else f (path ++ [ name ]) value
|
|
||||||
|
|
||||||
… from call site
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/attrsets.nix:1189:85:
|
|
||||||
1188| name: value:
|
|
||||||
1189| if isAttrs value && cond value then recurse (path ++ [ name ]) value else f (path ++ [ name ]) value
|
|
||||||
| ^
|
|
||||||
1190| );
|
|
||||||
|
|
||||||
… while calling anonymous lambda
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/modules.nix:275:71:
|
|
||||||
274| # For definitions that have an associated option
|
|
||||||
275| declaredConfig = mapAttrsRecursiveCond (v: !isOption v) (_: v: v.value) options;
|
|
||||||
| ^
|
|
||||||
276|
|
|
||||||
|
|
||||||
… while evaluating the attribute 'value'
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/modules.nix:1118:7:
|
|
||||||
1117| // {
|
|
||||||
1118| value = addErrorContext "while evaluating the option `${showOption loc}':" value;
|
|
||||||
| ^
|
|
||||||
1119| inherit (res.defsFinal') highestPrio;
|
|
||||||
|
|
||||||
… while evaluating the option `systemd.services.home-manager-me.serviceConfig':
|
|
||||||
|
|
||||||
… while evaluating the attribute 'mergedValue'
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/modules.nix:1192:5:
|
|
||||||
1191| # Type-check the remaining definitions, and merge them. Or throw if no definitions.
|
|
||||||
1192| mergedValue =
|
|
||||||
| ^
|
|
||||||
1193| if isDefined then
|
|
||||||
|
|
||||||
… while evaluating the attribute 'value'
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/types.nix:878:17:
|
|
||||||
877| headError = checkDefsForError check loc defs;
|
|
||||||
878| value = mapAttrs (
|
|
||||||
| ^
|
|
||||||
879| n: v:
|
|
||||||
|
|
||||||
… while calling the 'mapAttrs' builtin
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/types.nix:878:25:
|
|
||||||
877| headError = checkDefsForError check loc defs;
|
|
||||||
878| value = mapAttrs (
|
|
||||||
| ^
|
|
||||||
879| n: v:
|
|
||||||
|
|
||||||
… from call site
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/types.nix:872:21:
|
|
||||||
871| # Meaning it is less lazy
|
|
||||||
872| filterAttrs (n: v: v.optionalValue ? value) (
|
|
||||||
| ^
|
|
||||||
873| zipAttrsWith (name: defs: mergeDefinitions (loc ++ [ name ]) elemType defs) (pushPositions defs)
|
|
||||||
|
|
||||||
… while calling 'filterAttrs'
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/attrsets.nix:663:23:
|
|
||||||
662| */
|
|
||||||
663| filterAttrs = pred: set: removeAttrs set (filter (name: !pred name set.${name}) (attrNames set));
|
|
||||||
| ^
|
|
||||||
664|
|
|
||||||
|
|
||||||
… while calling the 'removeAttrs' builtin
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/attrsets.nix:663:28:
|
|
||||||
662| */
|
|
||||||
663| filterAttrs = pred: set: removeAttrs set (filter (name: !pred name set.${name}) (attrNames set));
|
|
||||||
| ^
|
|
||||||
664|
|
|
||||||
|
|
||||||
… while calling the 'filter' builtin
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/attrsets.nix:663:45:
|
|
||||||
662| */
|
|
||||||
663| filterAttrs = pred: set: removeAttrs set (filter (name: !pred name set.${name}) (attrNames set));
|
|
||||||
| ^
|
|
||||||
664|
|
|
||||||
|
|
||||||
… while calling anonymous lambda
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/attrsets.nix:663:53:
|
|
||||||
662| */
|
|
||||||
663| filterAttrs = pred: set: removeAttrs set (filter (name: !pred name set.${name}) (attrNames set));
|
|
||||||
| ^
|
|
||||||
664|
|
|
||||||
|
|
||||||
… in the argument of the not operator
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/attrsets.nix:663:60:
|
|
||||||
662| */
|
|
||||||
663| filterAttrs = pred: set: removeAttrs set (filter (name: !pred name set.${name}) (attrNames set));
|
|
||||||
| ^
|
|
||||||
664|
|
|
||||||
|
|
||||||
… from call site
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/attrsets.nix:663:60:
|
|
||||||
662| */
|
|
||||||
663| filterAttrs = pred: set: removeAttrs set (filter (name: !pred name set.${name}) (attrNames set));
|
|
||||||
| ^
|
|
||||||
664|
|
|
||||||
|
|
||||||
… while calling anonymous lambda
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/types.nix:872:37:
|
|
||||||
871| # Meaning it is less lazy
|
|
||||||
872| filterAttrs (n: v: v.optionalValue ? value) (
|
|
||||||
| ^
|
|
||||||
873| zipAttrsWith (name: defs: mergeDefinitions (loc ++ [ name ]) elemType defs) (pushPositions defs)
|
|
||||||
|
|
||||||
… while evaluating the attribute 'optionalValue'
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/modules.nix:1256:5:
|
|
||||||
1255|
|
|
||||||
1256| optionalValue = if isDefined then { value = mergedValue; } else { };
|
|
||||||
| ^
|
|
||||||
1257| };
|
|
||||||
|
|
||||||
… while evaluating a branch condition
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/modules.nix:1256:21:
|
|
||||||
1255|
|
|
||||||
1256| optionalValue = if isDefined then { value = mergedValue; } else { };
|
|
||||||
| ^
|
|
||||||
1257| };
|
|
||||||
|
|
||||||
(8 duplicate frames omitted)
|
|
||||||
|
|
||||||
… while evaluating definitions from `/nix/store/s7l9ap273g9f7jkci4i2m6mi87lax03b-source/nixos':
|
|
||||||
|
|
||||||
… from call site
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/modules.nix:1171:80:
|
|
||||||
1170| }
|
|
||||||
1171| ) (addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
|
|
||||||
| ^
|
|
||||||
1172| ) defs;
|
|
||||||
|
|
||||||
… while calling 'dischargeProperties'
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/modules.nix:1311:5:
|
|
||||||
1310| dischargeProperties =
|
|
||||||
1311| def:
|
|
||||||
| ^
|
|
||||||
1312| if def._type or "" == "merge" then
|
|
||||||
|
|
||||||
… while evaluating a branch condition
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/modules.nix:1312:5:
|
|
||||||
1311| def:
|
|
||||||
1312| if def._type or "" == "merge" then
|
|
||||||
| ^
|
|
||||||
1313| concatMap dischargeProperties def.contents
|
|
||||||
|
|
||||||
… while evaluating the attribute 'value'
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/types.nix:819:15:
|
|
||||||
818| inherit (def) file;
|
|
||||||
819| value = v;
|
|
||||||
| ^
|
|
||||||
820| }) def.value
|
|
||||||
|
|
||||||
… while calling the 'getAttr' builtin
|
|
||||||
at <nix/derivation-internal.nix>:50:17:
|
|
||||||
49| value = commonAttrs // {
|
|
||||||
50| outPath = builtins.getAttr outputName strict;
|
|
||||||
| ^
|
|
||||||
51| drvPath = strict.drvPath;
|
|
||||||
|
|
||||||
… while calling the 'derivationStrict' builtin
|
|
||||||
at <nix/derivation-internal.nix>:37:12:
|
|
||||||
36|
|
|
||||||
37| strict = derivationStrict drvAttrs;
|
|
||||||
| ^
|
|
||||||
38|
|
|
||||||
|
|
||||||
… while evaluating derivation 'home-manager-generation'
|
|
||||||
whose name attribute is located at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/pkgs/stdenv/generic/make-derivation.nix:541:13
|
|
||||||
|
|
||||||
… while evaluating attribute 'buildCommand' of derivation 'home-manager-generation'
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/pkgs/build-support/trivial-builders/default.nix:80:17:
|
|
||||||
79| enableParallelBuilding = true;
|
|
||||||
80| inherit buildCommand name;
|
|
||||||
| ^
|
|
||||||
81| passAsFile = [ "buildCommand" ] ++ (derivationArgs.passAsFile or [ ]);
|
|
||||||
|
|
||||||
… while calling the 'getAttr' builtin
|
|
||||||
at <nix/derivation-internal.nix>:50:17:
|
|
||||||
49| value = commonAttrs // {
|
|
||||||
50| outPath = builtins.getAttr outputName strict;
|
|
||||||
| ^
|
|
||||||
51| drvPath = strict.drvPath;
|
|
||||||
|
|
||||||
… while calling the 'derivationStrict' builtin
|
|
||||||
at <nix/derivation-internal.nix>:37:12:
|
|
||||||
36|
|
|
||||||
37| strict = derivationStrict drvAttrs;
|
|
||||||
| ^
|
|
||||||
38|
|
|
||||||
|
|
||||||
… while evaluating derivation 'activation-script'
|
|
||||||
whose name attribute is located at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/pkgs/stdenv/generic/make-derivation.nix:541:13
|
|
||||||
|
|
||||||
… while evaluating attribute 'text' of derivation 'activation-script'
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/pkgs/build-support/trivial-builders/default.nix:129:13:
|
|
||||||
128| inherit
|
|
||||||
129| text
|
|
||||||
| ^
|
|
||||||
130| executable
|
|
||||||
|
|
||||||
… while calling the 'concatStringsSep' builtin
|
|
||||||
at /nix/store/s7l9ap273g9f7jkci4i2m6mi87lax03b-source/modules/home-environment.nix:756:13:
|
|
||||||
755| if sortedCommands ? result then
|
|
||||||
756| lib.concatStringsSep "\n" (map mkCmd sortedCommands.result)
|
|
||||||
| ^
|
|
||||||
757| else
|
|
||||||
|
|
||||||
… while calling 'mkCmd'
|
|
||||||
at /nix/store/s7l9ap273g9f7jkci4i2m6mi87lax03b-source/modules/home-environment.nix:749:17:
|
|
||||||
748| let
|
|
||||||
749| mkCmd = res: ''
|
|
||||||
| ^
|
|
||||||
750| _iNote "Activating %s" "${res.name}"
|
|
||||||
|
|
||||||
… while evaluating the attribute 'data'
|
|
||||||
at /nix/store/s7l9ap273g9f7jkci4i2m6mi87lax03b-source/modules/lib/dag.nix:100:45:
|
|
||||||
99| {
|
|
||||||
100| result = map (v: { inherit (v) name data; }) sorted.result;
|
|
||||||
| ^
|
|
||||||
101| }
|
|
||||||
|
|
||||||
… while evaluating the attribute 'data'
|
|
||||||
at /nix/store/s7l9ap273g9f7jkci4i2m6mi87lax03b-source/modules/lib/dag.nix:92:9:
|
|
||||||
91| name = n;
|
|
||||||
92| data = v.data;
|
|
||||||
| ^
|
|
||||||
93| after = v.after ++ dagBefore dag n;
|
|
||||||
|
|
||||||
… from call site
|
|
||||||
at /nix/store/s7l9ap273g9f7jkci4i2m6mi87lax03b-source/modules/lib/dag.nix:92:16:
|
|
||||||
91| name = n;
|
|
||||||
92| data = v.data;
|
|
||||||
| ^
|
|
||||||
93| after = v.after ++ dagBefore dag n;
|
|
||||||
|
|
||||||
… while calling anonymous lambda
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/attrsets.nix:1188:17:
|
|
||||||
1187| mapAttrs (
|
|
||||||
1188| name: value:
|
|
||||||
| ^
|
|
||||||
1189| if isAttrs value && cond value then recurse (path ++ [ name ]) value else f (path ++ [ name ]) value
|
|
||||||
|
|
||||||
… from call site
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/attrsets.nix:1189:85:
|
|
||||||
1188| name: value:
|
|
||||||
1189| if isAttrs value && cond value then recurse (path ++ [ name ]) value else f (path ++ [ name ]) value
|
|
||||||
| ^
|
|
||||||
1190| );
|
|
||||||
|
|
||||||
… while calling anonymous lambda
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/modules.nix:275:71:
|
|
||||||
274| # For definitions that have an associated option
|
|
||||||
275| declaredConfig = mapAttrsRecursiveCond (v: !isOption v) (_: v: v.value) options;
|
|
||||||
| ^
|
|
||||||
276|
|
|
||||||
|
|
||||||
… while evaluating the attribute 'value'
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/modules.nix:1118:7:
|
|
||||||
1117| // {
|
|
||||||
1118| value = addErrorContext "while evaluating the option `${showOption loc}':" value;
|
|
||||||
| ^
|
|
||||||
1119| inherit (res.defsFinal') highestPrio;
|
|
||||||
|
|
||||||
… while evaluating the option `home-manager.users.me.home.activation.installPackages.data':
|
|
||||||
|
|
||||||
(10 duplicate frames omitted)
|
|
||||||
|
|
||||||
… while evaluating definitions from `/nix/store/s7l9ap273g9f7jkci4i2m6mi87lax03b-source/modules/home-environment.nix':
|
|
||||||
|
|
||||||
(6 duplicate frames omitted)
|
|
||||||
|
|
||||||
… while evaluating derivation 'home-manager-path'
|
|
||||||
whose name attribute is located at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/pkgs/stdenv/generic/make-derivation.nix:541:13
|
|
||||||
|
|
||||||
… while evaluating attribute 'passAsFile' of derivation 'home-manager-path'
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/pkgs/build-support/trivial-builders/default.nix:81:9:
|
|
||||||
80| inherit buildCommand name;
|
|
||||||
81| passAsFile = [ "buildCommand" ] ++ (derivationArgs.passAsFile or [ ]);
|
|
||||||
| ^
|
|
||||||
82| }
|
|
||||||
|
|
||||||
… while evaluating the attribute 'passAsFile'
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/pkgs/build-support/buildenv/default.nix:114:9:
|
|
||||||
113| # XXX: The size is somewhat arbitrary
|
|
||||||
114| passAsFile = if builtins.stringLength pkgs >= 128 * 1024 then [ "pkgs" ] else [ ];
|
|
||||||
| ^
|
|
||||||
115| }
|
|
||||||
|
|
||||||
… while evaluating a branch condition
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/pkgs/build-support/buildenv/default.nix:114:22:
|
|
||||||
113| # XXX: The size is somewhat arbitrary
|
|
||||||
114| passAsFile = if builtins.stringLength pkgs >= 128 * 1024 then [ "pkgs" ] else [ ];
|
|
||||||
| ^
|
|
||||||
115| }
|
|
||||||
|
|
||||||
… in the argument of the not operator
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/pkgs/build-support/buildenv/default.nix:114:52:
|
|
||||||
113| # XXX: The size is somewhat arbitrary
|
|
||||||
114| passAsFile = if builtins.stringLength pkgs >= 128 * 1024 then [ "pkgs" ] else [ ];
|
|
||||||
| ^
|
|
||||||
115| }
|
|
||||||
|
|
||||||
… while calling the 'lessThan' builtin
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/pkgs/build-support/buildenv/default.nix:114:52:
|
|
||||||
113| # XXX: The size is somewhat arbitrary
|
|
||||||
114| passAsFile = if builtins.stringLength pkgs >= 128 * 1024 then [ "pkgs" ] else [ ];
|
|
||||||
| ^
|
|
||||||
115| }
|
|
||||||
|
|
||||||
… while calling the 'stringLength' builtin
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/pkgs/build-support/buildenv/default.nix:114:25:
|
|
||||||
113| # XXX: The size is somewhat arbitrary
|
|
||||||
114| passAsFile = if builtins.stringLength pkgs >= 128 * 1024 then [ "pkgs" ] else [ ];
|
|
||||||
| ^
|
|
||||||
115| }
|
|
||||||
|
|
||||||
… while calling the 'toJSON' builtin
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/pkgs/build-support/buildenv/default.nix:109:16:
|
|
||||||
108| pathsToLinkJSON = builtins.toJSON pathsToLink;
|
|
||||||
109| pkgs = builtins.toJSON chosenOutputs;
|
|
||||||
| ^
|
|
||||||
110| extraPathsFrom = lib.optional includeClosures (writeClosure pathsForClosure);
|
|
||||||
|
|
||||||
… while evaluating list element at index 34
|
|
||||||
|
|
||||||
… while evaluating attribute 'paths'
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/pkgs/build-support/buildenv/default.nix:68:7:
|
|
||||||
67| chosenOutputs = map (drv: {
|
|
||||||
68| paths =
|
|
||||||
| ^
|
|
||||||
69| # First add the usual output(s): respect if user has chosen explicitly,
|
|
||||||
|
|
||||||
… while evaluating list element at index 0
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/pkgs/build-support/buildenv/default.nix:68:7:
|
|
||||||
67| chosenOutputs = map (drv: {
|
|
||||||
68| paths =
|
|
||||||
| ^
|
|
||||||
69| # First add the usual output(s): respect if user has chosen explicitly,
|
|
||||||
|
|
||||||
… while calling the 'getAttr' builtin
|
|
||||||
at <nix/derivation-internal.nix>:50:17:
|
|
||||||
49| value = commonAttrs // {
|
|
||||||
50| outPath = builtins.getAttr outputName strict;
|
|
||||||
| ^
|
|
||||||
51| drvPath = strict.drvPath;
|
|
||||||
|
|
||||||
… while calling the 'derivationStrict' builtin
|
|
||||||
at <nix/derivation-internal.nix>:37:12:
|
|
||||||
36|
|
|
||||||
37| strict = derivationStrict drvAttrs;
|
|
||||||
| ^
|
|
||||||
38|
|
|
||||||
|
|
||||||
… while evaluating derivation 'python3-3.10.19-env'
|
|
||||||
whose name attribute is located at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/pkgs/stdenv/generic/make-derivation.nix:541:13
|
|
||||||
|
|
||||||
… while evaluating attribute 'passAsFile' of derivation 'python3-3.10.19-env'
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/pkgs/build-support/trivial-builders/default.nix:81:9:
|
|
||||||
80| inherit buildCommand name;
|
|
||||||
81| passAsFile = [ "buildCommand" ] ++ (derivationArgs.passAsFile or [ ]);
|
|
||||||
| ^
|
|
||||||
82| }
|
|
||||||
|
|
||||||
(6 duplicate frames omitted)
|
|
||||||
|
|
||||||
… while calling the 'map' builtin
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/pkgs/build-support/buildenv/default.nix:67:21:
|
|
||||||
66| let
|
|
||||||
67| chosenOutputs = map (drv: {
|
|
||||||
| ^
|
|
||||||
68| paths =
|
|
||||||
|
|
||||||
… from call site
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/pkgs/development/interpreters/python/wrapper.nix:26:15:
|
|
||||||
25| let
|
|
||||||
26| paths = requiredPythonModules (extraLibs ++ [ python ]) ++ [
|
|
||||||
| ^
|
|
||||||
27| (runCommand "bin" { } ''
|
|
||||||
|
|
||||||
… while calling 'requiredPythonModules'
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/pkgs/development/interpreters/python/python-packages-base.nix:94:5:
|
|
||||||
93| requiredPythonModules =
|
|
||||||
94| drvs:
|
|
||||||
| ^
|
|
||||||
95| let
|
|
||||||
|
|
||||||
… while calling the 'foldl'' builtin
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/pkgs/development/interpreters/python/python-packages-base.nix:98:5:
|
|
||||||
97| in
|
|
||||||
98| lib.unique (
|
|
||||||
| ^
|
|
||||||
99| [ python ] ++ modules ++ lib.concatLists (lib.catAttrs "requiredPythonModules" modules)
|
|
||||||
|
|
||||||
… while calling the 'concatLists' builtin
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/pkgs/development/interpreters/python/python-packages-base.nix:99:32:
|
|
||||||
98| lib.unique (
|
|
||||||
99| [ python ] ++ modules ++ lib.concatLists (lib.catAttrs "requiredPythonModules" modules)
|
|
||||||
| ^
|
|
||||||
100| );
|
|
||||||
|
|
||||||
… while calculating requiredPythonModules for python3.10-pandas-2.3.1:
|
|
||||||
|
|
||||||
… from call site
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/pkgs/development/interpreters/python/python-packages-base.nix:121:11:
|
|
||||||
120| requiredPythonModules = builtins.addErrorContext "while calculating requiredPythonModules for ${drv.name or drv.pname}:" (
|
|
||||||
121| requiredPythonModules drv.propagatedBuildInputs
|
|
||||||
| ^
|
|
||||||
122| );
|
|
||||||
|
|
||||||
… while calling 'requiredPythonModules'
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/pkgs/development/interpreters/python/python-packages-base.nix:94:5:
|
|
||||||
93| requiredPythonModules =
|
|
||||||
94| drvs:
|
|
||||||
| ^
|
|
||||||
95| let
|
|
||||||
|
|
||||||
… while calling the 'foldl'' builtin
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/pkgs/development/interpreters/python/python-packages-base.nix:98:5:
|
|
||||||
97| in
|
|
||||||
98| lib.unique (
|
|
||||||
| ^
|
|
||||||
99| [ python ] ++ modules ++ lib.concatLists (lib.catAttrs "requiredPythonModules" modules)
|
|
||||||
|
|
||||||
… while calling anonymous lambda
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/lists.nix:1857:25:
|
|
||||||
1856| */
|
|
||||||
1857| unique = foldl' (acc: e: if elem e acc then acc else acc ++ [ e ]) [ ];
|
|
||||||
| ^
|
|
||||||
1858|
|
|
||||||
|
|
||||||
… while evaluating a branch condition
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/lists.nix:1857:28:
|
|
||||||
1856| */
|
|
||||||
1857| unique = foldl' (acc: e: if elem e acc then acc else acc ++ [ e ]) [ ];
|
|
||||||
| ^
|
|
||||||
1858|
|
|
||||||
|
|
||||||
… while calling the 'elem' builtin
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/lists.nix:1857:31:
|
|
||||||
1856| */
|
|
||||||
1857| unique = foldl' (acc: e: if elem e acc then acc else acc ++ [ e ]) [ ];
|
|
||||||
| ^
|
|
||||||
1858|
|
|
||||||
|
|
||||||
… in the condition of the assert statement
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/lib/customisation.nix:412:15:
|
|
||||||
411| outPath =
|
|
||||||
412| assert condition;
|
|
||||||
| ^
|
|
||||||
413| drv.${outputName}.outPath;
|
|
||||||
|
|
||||||
… in the right operand of the IMPL (->) operator
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/pkgs/development/interpreters/python/mk-python-derivation.nix:464:11:
|
|
||||||
463| drv.disabled
|
|
||||||
464| -> throw "${removePrefix namePrefix drv.name} not supported for interpreter ${python.executable}"
|
|
||||||
| ^
|
|
||||||
465| ) { } drv
|
|
||||||
|
|
||||||
… while calling the 'throw' builtin
|
|
||||||
at /nix/store/ql735ybqjzwjdsjhywplx17cfvq9s1fm-source/pkgs/development/interpreters/python/mk-python-derivation.nix:464:14:
|
|
||||||
463| drv.disabled
|
|
||||||
464| -> throw "${removePrefix namePrefix drv.name} not supported for interpreter ${python.executable}"
|
|
||||||
| ^
|
|
||||||
465| ) { } drv
|
|
||||||
|
|
||||||
error: numpy-2.3.4 not supported for interpreter python3.10
|
|
||||||
2
mize
2
mize
Submodule mize updated: 19573502d2...b2ed9efff2
@@ -43,6 +43,8 @@
|
|||||||
- 8002 git
|
- 8002 git
|
||||||
- 8003 git ssh
|
- 8003 git ssh
|
||||||
- 8004 matrix http
|
- 8004 matrix http
|
||||||
|
- 8005 ppc spacetime instance
|
||||||
|
- 8006 atproto pds http
|
||||||
|
|
||||||
## hosting container ips (on the interface br-proxy)
|
## hosting container ips (on the interface br-proxy)
|
||||||
- fusu 192.168.1.2
|
- fusu 192.168.1.2
|
||||||
@@ -365,6 +367,7 @@ in {
|
|||||||
|
|
||||||
users.users.root.openssh.authorizedKeys.keys = [
|
users.users.root.openssh.authorizedKeys.keys = [
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM82mBUZqo7nfU8XJQDoEcOa+DfQyJE7T7ddFjQVhg93 me@main"
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM82mBUZqo7nfU8XJQDoEcOa+DfQyJE7T7ddFjQVhg93 me@main"
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKNXOPxlnSxkhm050ui56D5SHrkhuFwUOU0Gf0C+Vmks melektron@goarnix"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -375,7 +378,7 @@ in {
|
|||||||
services.nfs.server = {
|
services.nfs.server = {
|
||||||
enable = true;
|
enable = true;
|
||||||
exports = ''
|
exports = ''
|
||||||
/data/incus/default-pool/containers/nico/rootfs/root/work/ 100.88.0.0/16(rw,sync,no_subtree_check)
|
/data/incus/default-pool/containers/nico/rootfs/root/work/ 100.88.0.0/16(rw,sync,no_subtree_check,all_squash,anonuid=0,anongid=0)
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
# Open necessary firewall ports
|
# Open necessary firewall ports
|
||||||
@@ -402,26 +405,6 @@ in {
|
|||||||
after = [ "network.target" ];
|
after = [ "network.target" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
############################ ppc app #########################
|
|
||||||
systemd.services.ppc = {
|
|
||||||
enable = true;
|
|
||||||
description = "PPC website";
|
|
||||||
unitConfig = {
|
|
||||||
Type = "simple";
|
|
||||||
};
|
|
||||||
environment = {
|
|
||||||
MIZE_CONFIG_FILES = "/home/server/here/ppc.toml";
|
|
||||||
};
|
|
||||||
serviceConfig = {
|
|
||||||
User = "server";
|
|
||||||
Group = "server";
|
|
||||||
Restart = "always";
|
|
||||||
RestartSec = "500s";
|
|
||||||
ExecStart = "/home/server/here/ppc server";
|
|
||||||
};
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
after = [ "network.target" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -491,6 +474,7 @@ in {
|
|||||||
{ name = "gitea"; domain = "git.ppc.social"; host = "ppc-hosting"; port = 8002; }
|
{ name = "gitea"; domain = "git.ppc.social"; host = "ppc-hosting"; port = 8002; }
|
||||||
{ name = "nico"; domain = "nico.ppc.social"; host = "192.168.1.14"; port = 18789; middlewares = [ "oidc-nico" ]; }
|
{ name = "nico"; domain = "nico.ppc.social"; host = "192.168.1.14"; port = 18789; middlewares = [ "oidc-nico" ]; }
|
||||||
{ name = "ppc-matrix"; domain = "matrix.ppc.social"; host = "ppc-hosting"; port = 8004; }
|
{ name = "ppc-matrix"; domain = "matrix.ppc.social"; host = "ppc-hosting"; port = 8004; }
|
||||||
|
{ name = "ppc-pds"; domain = "pds.ppc.social"; host = "ppc-hosting"; port = 8006; }
|
||||||
#{ name = "spacetime"; domain = "spacetime.ppc.social"; host = "ppc-hosting"; port = 8005; extraRouterConfig = {
|
#{ name = "spacetime"; domain = "spacetime.ppc.social"; host = "ppc-hosting"; port = 8005; extraRouterConfig = {
|
||||||
# rule = "Host(`spacetime.ppc.social`) && PathPrefix(`/v1/database`)";
|
# rule = "Host(`spacetime.ppc.social`) && PathPrefix(`/v1/database`)";
|
||||||
# };
|
# };
|
||||||
|
|||||||
0
mods/hello.md
Normal file
0
mods/hello.md
Normal file
3
mods/my-hosts
Normal file
3
mods/my-hosts
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
127.0.0.1 localhost
|
||||||
|
192.168.3.1 gw.c2vi.dev
|
||||||
|
|
||||||
11
mods/my-hosts-h
Normal file
11
mods/my-hosts-h
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
192.168.1.6 hpm
|
||||||
|
192.168.1.4 fe
|
||||||
|
192.168.1.2 fusu
|
||||||
|
192.168.1.2 files
|
||||||
|
192.168.1.5 acern
|
||||||
|
192.168.1.22 fasu
|
||||||
|
192.168.1.1 rou
|
||||||
|
192.168.1.1 router
|
||||||
|
192.168.1.33 mac
|
||||||
|
192.168.1.36 mosatop
|
||||||
|
192.168.1.44 lush
|
||||||
4
mods/my-hosts-pt
Normal file
4
mods/my-hosts-pt
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
192.168.44.1 phone
|
||||||
|
192.168.44.11 main
|
||||||
|
192.168.44.22 lush
|
||||||
|
|
||||||
0
mods/my-hosts-pw
Normal file
0
mods/my-hosts-pw
Normal file
4
mods/my-hosts-r
Normal file
4
mods/my-hosts-r
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
home.c2vi.dev rpi
|
||||||
|
home.c2vi.dev fusu
|
||||||
|
home.c2vi.dev rpis
|
||||||
|
home.c2vi.dev files
|
||||||
11
mods/my-hosts-t
Normal file
11
mods/my-hosts-t
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
100.107.67.76 te
|
||||||
|
100.93.225.52 fasu
|
||||||
|
100.88.42.194 fwin
|
||||||
|
100.88.28.123 fe
|
||||||
|
100.88.79.207 fusu
|
||||||
|
100.88.79.207 files
|
||||||
|
100.88.164.39 lush
|
||||||
|
100.88.112.181 mac
|
||||||
|
100.88.116.225 nico
|
||||||
|
100.88.245.227 phone
|
||||||
|
100.88.69.32 ti
|
||||||
25
mods/nurPkgs/mcping.nix
Normal file
25
mods/nurPkgs/mcping.nix
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
{ pkgs ? import <nixpkgs> {} }:
|
||||||
|
|
||||||
|
pkgs.stdenv.mkDerivation rec {
|
||||||
|
pname = "mcping";
|
||||||
|
version = "1.2.0";
|
||||||
|
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "theodik";
|
||||||
|
repo = "mcping";
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "sha256-miCRVDyyNM9MITnHdYZYpYpvKWx5n8ZvzNF9zvpZt9k=";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
gcc mcping.c -o mcping
|
||||||
|
mkdir -p $out/bin
|
||||||
|
cp mcping $out/bin/
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with pkgs.lib; {
|
||||||
|
description = "A simple C program to ping Minecraft servers";
|
||||||
|
license = licenses.mit;
|
||||||
|
platforms = platforms.all;
|
||||||
|
};
|
||||||
|
}
|
||||||
BIN
mods/settings.zip
Executable file
BIN
mods/settings.zip
Executable file
Binary file not shown.
74
mods/xmobar.hs
Normal file
74
mods/xmobar.hs
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
Config {
|
||||||
|
|
||||||
|
-- appearance
|
||||||
|
font = "xft:Bitstream Vera Sans Mono:size=15:bold:antialias=true"
|
||||||
|
, bgColor = "black"
|
||||||
|
, fgColor = "#646464"
|
||||||
|
, position = Top
|
||||||
|
, border = BottomB
|
||||||
|
, borderColor = "#646464"
|
||||||
|
|
||||||
|
-- layout
|
||||||
|
, sepChar = "%" -- delineator between plugin names and straight text
|
||||||
|
, alignSep = "}{" -- separator between left-right alignment
|
||||||
|
, template = "HI | %dynnetwork% }{ %battery% | %date%"
|
||||||
|
--, template = "%battery% | %multicpu% | %coretemp% | %memory% | %dynnetwork% }{ %RJTT% | %date% || %kbd% "
|
||||||
|
--, template = "%battery% | %multicpu% | %coretemp% | %memory% | %dynnetwork% }{ %RJTT% | %date% || %kbd% "
|
||||||
|
|
||||||
|
-- general behavior
|
||||||
|
, lowerOnStart = True -- send to bottom of window stack on start
|
||||||
|
, hideOnStart = False -- start with window unmapped (hidden)
|
||||||
|
, allDesktops = True -- show on all desktops
|
||||||
|
, overrideRedirect = True -- set the Override Redirect flag (Xlib)
|
||||||
|
, pickBroadest = False -- choose widest display (multi-monitor)
|
||||||
|
, persistent = True -- enable/disable hiding (True = disabled)
|
||||||
|
|
||||||
|
-- plugins
|
||||||
|
-- Numbers can be automatically colored according to their value. xmobar
|
||||||
|
-- decides color based on a three-tier/two-cutoff system, controlled by
|
||||||
|
-- command options:
|
||||||
|
-- --Low sets the low cutoff
|
||||||
|
-- --High sets the high cutoff
|
||||||
|
--
|
||||||
|
-- --low sets the color below --Low cutoff
|
||||||
|
-- --normal sets the color between --Low and --High cutoffs
|
||||||
|
-- --High sets the color above --High cutoff
|
||||||
|
--
|
||||||
|
-- The --template option controls how the plugin is displayed. Text
|
||||||
|
-- color can be set by enclosing in <fc></fc> tags. For more details
|
||||||
|
-- see http://projects.haskell.org/xmobar/#system-monitor-plugins.
|
||||||
|
, commands =
|
||||||
|
[
|
||||||
|
-- network
|
||||||
|
Run DynNetwork [ "--template" , "<dev>: <tx>kB/s|<rx>kB/s"
|
||||||
|
, "--Low" , "1000" -- units: B/s
|
||||||
|
, "--High" , "5000" -- units: B/s
|
||||||
|
, "--low" , "darkgreen"
|
||||||
|
, "--normal" , "darkorange"
|
||||||
|
, "--high" , "darkred"
|
||||||
|
] 10
|
||||||
|
|
||||||
|
-- batery
|
||||||
|
, Run Battery [ "--template" , "Batt: <acstatus>"
|
||||||
|
, "--Low" , "10" -- units: %
|
||||||
|
, "--High" , "80" -- units: %
|
||||||
|
, "--low" , "darkred"
|
||||||
|
, "--normal" , "darkorange"
|
||||||
|
, "--high" , "darkgreen"
|
||||||
|
|
||||||
|
, "--" -- battery specific options
|
||||||
|
-- discharging status
|
||||||
|
, "-o" , "<left>% (<timeleft>)"
|
||||||
|
-- AC "on" status
|
||||||
|
, "-O" , "<fc=#dAA520>Charging</fc>"
|
||||||
|
-- charged status
|
||||||
|
, "-i" , "<fc=#006000>Charged</fc>"
|
||||||
|
] 50
|
||||||
|
|
||||||
|
-- time and date indicator
|
||||||
|
-- (%F = y-m-d date, %a = day of week, %T = h:m:s time)
|
||||||
|
, Run Date "<fc=#ABABAB>%F (%a) %T</fc>" "date" 10
|
||||||
|
|
||||||
|
]
|
||||||
|
|
||||||
|
}
|
||||||
401
mods/xmonad.hs
Normal file
401
mods/xmonad.hs
Normal file
@@ -0,0 +1,401 @@
|
|||||||
|
-- xmonad example config file.
|
||||||
|
--
|
||||||
|
-- A template showing all available configuration hooks,
|
||||||
|
-- and how to override the defaults in your own xmonad.hs conf file.
|
||||||
|
--
|
||||||
|
-- Normally, you'd only override those defaults you care about.
|
||||||
|
--
|
||||||
|
|
||||||
|
import XMonad
|
||||||
|
import Data.Monoid
|
||||||
|
import System.Exit
|
||||||
|
|
||||||
|
--for xmobar
|
||||||
|
import XMonad.Hooks.DynamicLog
|
||||||
|
import XMonad.Hooks.StatusBar
|
||||||
|
import XMonad.Hooks.StatusBar.PP
|
||||||
|
import XMonad.Hooks.SetWMName
|
||||||
|
import XMonad.Hooks.EwmhDesktops
|
||||||
|
|
||||||
|
|
||||||
|
import Data.Monoid
|
||||||
|
import qualified Data.Map as M
|
||||||
|
|
||||||
|
import XMonad
|
||||||
|
import Control.Monad
|
||||||
|
|
||||||
|
|
||||||
|
import qualified XMonad.StackSet as W
|
||||||
|
import qualified Data.Map as M
|
||||||
|
|
||||||
|
-- The preferred terminal program, which is used in a binding below and by
|
||||||
|
-- certain contrib modules.
|
||||||
|
--
|
||||||
|
myTerminal = "alacritty"
|
||||||
|
|
||||||
|
-- Whether focus follows the mouse pointer.
|
||||||
|
myFocusFollowsMouse :: Bool
|
||||||
|
myFocusFollowsMouse = True
|
||||||
|
|
||||||
|
-- Whether clicking on a window to focus also passes the click to the window
|
||||||
|
myClickJustFocuses :: Bool
|
||||||
|
myClickJustFocuses = False
|
||||||
|
|
||||||
|
-- Width of the window border in pixels.
|
||||||
|
--
|
||||||
|
myBorderWidth = 2
|
||||||
|
-- myBorderWidth = 0
|
||||||
|
|
||||||
|
-- modMask lets you specify which modkey you want to use. The default
|
||||||
|
-- is mod1Mask ("left alt"). You may also consider using mod3Mask
|
||||||
|
-- ("right alt"), which does not conflict with emacs keybindings. The
|
||||||
|
-- "windows key" is usually mod4Mask.
|
||||||
|
--
|
||||||
|
myModMask = mod4Mask
|
||||||
|
|
||||||
|
-- The default number of workspaces (virtual screens) and their names.
|
||||||
|
-- By default we use numeric strings, but any string may be used as a
|
||||||
|
-- workspace name. The number of workspaces is determined by the length
|
||||||
|
-- of this list.
|
||||||
|
--
|
||||||
|
-- A tagging example:
|
||||||
|
--
|
||||||
|
-- > workspaces = ["web", "irc", "code" ] ++ map show [4..9]
|
||||||
|
--
|
||||||
|
myWorkspaces = ["1","2","3","4","5","6","7","8","9"]
|
||||||
|
|
||||||
|
-- Border colors for unfocused and focused windows, respectively.
|
||||||
|
--
|
||||||
|
myNormalBorderColor = "#dddddd"
|
||||||
|
myFocusedBorderColor = "#ff0000"
|
||||||
|
-- myFocusedBorderColor = "#68cedc"
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
-- Key bindings. Add, modify or remove key bindings here.
|
||||||
|
--
|
||||||
|
myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
|
||||||
|
|
||||||
|
[
|
||||||
|
|
||||||
|
-- launch a terminal
|
||||||
|
((modm , xK_BackSpace), spawn $ XMonad.terminal conf),
|
||||||
|
|
||||||
|
((modm .|. shiftMask, xK_Return), spawn $ XMonad.terminal conf),
|
||||||
|
|
||||||
|
-- enable keyboard
|
||||||
|
--((button2), spawn "xinput enable 17"),
|
||||||
|
--((modm .|. button2, \w -> focus w >> windows W.shiftMaster),
|
||||||
|
|
||||||
|
((noModMask, xK_Page_Up), spawn "alacritty" ),
|
||||||
|
|
||||||
|
-- player next
|
||||||
|
((modm, xK_n), spawn "playerctl next"),
|
||||||
|
-- player previous
|
||||||
|
((modm .|. shiftMask, xK_n), spawn "playerctl previous"),
|
||||||
|
-- player play-pause
|
||||||
|
((modm , xK_c), spawn "playerctl play-pause"),
|
||||||
|
-- player volume up
|
||||||
|
((modm , xK_v), spawn "amixer set Master 3%+"),
|
||||||
|
-- player volume down
|
||||||
|
((modm .|. shiftMask, xK_v), spawn "amixer set Master 3%-"),
|
||||||
|
|
||||||
|
-- xrandr
|
||||||
|
((modm .|. shiftMask, xK_d), spawn "xrandr --output eDP-1 --off"),
|
||||||
|
|
||||||
|
((modm .|. shiftMask, xK_f), spawn "bash -c \"kill -9 $(pgrep firefox)\""),
|
||||||
|
|
||||||
|
((modm , xK_d), spawn "xrandr --output eDP-1 --auto"),
|
||||||
|
|
||||||
|
-- launch mshot
|
||||||
|
((modm .|. shiftMask, xK_m), spawn "mshot"),
|
||||||
|
|
||||||
|
|
||||||
|
-- launch dmenu
|
||||||
|
((modm, xK_p ), spawn "nice -n 7 rofi -show run"),
|
||||||
|
|
||||||
|
-- close focused window
|
||||||
|
((modm .|. shiftMask, xK_c ), kill),
|
||||||
|
|
||||||
|
-- Rotate through the available layout algorithms
|
||||||
|
((modm, xK_space ), sendMessage NextLayout),
|
||||||
|
|
||||||
|
-- Reset the layouts on the current workspace to default
|
||||||
|
((modm .|. shiftMask, xK_space ), setLayout $ XMonad.layoutHook conf),
|
||||||
|
|
||||||
|
-- Resize viewed windows to the correct size
|
||||||
|
--((modm, xK_n ), refresh),
|
||||||
|
|
||||||
|
-- Move focus to the next window
|
||||||
|
((modm, xK_Tab ), windows W.focusDown),
|
||||||
|
|
||||||
|
-- Move focus to the next window
|
||||||
|
((modm, xK_j ), windows W.focusDown),
|
||||||
|
|
||||||
|
-- Move focus to the previous window
|
||||||
|
((modm, xK_k ), windows W.focusUp ),
|
||||||
|
|
||||||
|
-- Move focus to the master window
|
||||||
|
--((modm, xK_m ), windows W.focusMaster ),
|
||||||
|
|
||||||
|
-- Swap the focused window and the master window
|
||||||
|
((modm, xK_Return), windows W.swapMaster),
|
||||||
|
|
||||||
|
-- Swap the focused window with the next window
|
||||||
|
((modm .|. shiftMask, xK_j ), windows W.swapDown ),
|
||||||
|
|
||||||
|
-- Swap the focused window with the previous window
|
||||||
|
((modm .|. shiftMask, xK_k ), windows W.swapUp ),
|
||||||
|
|
||||||
|
-- Shrink the master area
|
||||||
|
((modm, xK_h ), sendMessage Shrink),
|
||||||
|
|
||||||
|
-- Expand the master area
|
||||||
|
((modm, xK_l ), sendMessage Expand),
|
||||||
|
|
||||||
|
-- Push window back into tiling
|
||||||
|
((modm, xK_t ), withFocused $ windows . W.sink),
|
||||||
|
|
||||||
|
-- Increment the number of windows in the master area
|
||||||
|
((modm , xK_comma ), sendMessage (IncMasterN 1)),
|
||||||
|
|
||||||
|
-- Deincrement the number of windows in the master area
|
||||||
|
((modm , xK_period), sendMessage (IncMasterN (-1))),
|
||||||
|
|
||||||
|
-- Toggle the status bar gap
|
||||||
|
-- Use this binding with avoidStruts from Hooks.ManageDocks.
|
||||||
|
-- See also the statusBar function from Hooks.DynamicLog.
|
||||||
|
--
|
||||||
|
-- , ((modm , xK_b ), sendMessage ToggleStruts)
|
||||||
|
|
||||||
|
-- Quit xmonad
|
||||||
|
((modm .|. shiftMask, xK_q ), io exitSuccess),
|
||||||
|
|
||||||
|
-- Restart xmonad
|
||||||
|
((modm , xK_q ), spawn "xmonad --recompile; xmonad --restart")
|
||||||
|
|
||||||
|
-- Run xmessage with a summary of the default keybindings (useful for beginners)
|
||||||
|
--, ((modm .|. shiftMask, xK_slash ), xmessage help)
|
||||||
|
]
|
||||||
|
++
|
||||||
|
|
||||||
|
--
|
||||||
|
-- mod-[1..9], Switch to workspace N
|
||||||
|
-- mod-shift-[1..9], Move client to workspace N
|
||||||
|
--
|
||||||
|
[((m .|. modm, k), windows $ f i)
|
||||||
|
| (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9]
|
||||||
|
, (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]]
|
||||||
|
++
|
||||||
|
|
||||||
|
--
|
||||||
|
-- mod-{w,e,r}, Switch to physical/Xinerama screens 1, 2, or 3
|
||||||
|
-- mod-shift-{w,e,r}, Move client to screen 1, 2, or 3
|
||||||
|
--
|
||||||
|
[((m .|. modm, key), screenWorkspace sc >>= flip whenJust (windows . f))
|
||||||
|
| (key, sc) <- zip [xK_w, xK_e, xK_r] [0..]
|
||||||
|
, (f, m) <- [(W.view, 0), (W.shift, shiftMask)]]
|
||||||
|
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
-- Mouse bindings: default actions bound to mouse events
|
||||||
|
--
|
||||||
|
myMouseBindings (XConfig {XMonad.modMask = modm}) = M.fromList
|
||||||
|
|
||||||
|
-- mod-button1, Set the window to floating mode and move by dragging
|
||||||
|
[ ((modm, button1), \w -> focus w >> mouseMoveWindow w
|
||||||
|
>> windows W.shiftMaster)
|
||||||
|
|
||||||
|
-- mod-button2, Raise the window to the top of the stack
|
||||||
|
-- , ((button2), spawn "xinput enable 17")
|
||||||
|
|
||||||
|
-- mod-button3, Set the window to floating mode and resize by dragging
|
||||||
|
, ((modm, button3), \w -> focus w >> mouseResizeWindow w
|
||||||
|
>> windows W.shiftMaster)
|
||||||
|
|
||||||
|
-- you may also bind events to the mouse scroll wheel (button4 and button5)
|
||||||
|
]
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
-- Layouts:
|
||||||
|
|
||||||
|
-- You can specify and transform your layouts by modifying these values.
|
||||||
|
-- If you change layout bindings be sure to use 'mod-shift-space' after
|
||||||
|
-- restarting (with 'mod-q') to reset your layout state to the new
|
||||||
|
-- defaults, as xmonad preserves your old layout settings by default.
|
||||||
|
--
|
||||||
|
-- The available layouts. Note that each layout is separated by |||,
|
||||||
|
-- which denotes layout choice.
|
||||||
|
--
|
||||||
|
myLayout = tiled ||| Full
|
||||||
|
where
|
||||||
|
-- default tiling algorithm partitions the screen into two panes
|
||||||
|
tiled = Tall nmaster delta ratio
|
||||||
|
|
||||||
|
-- The default number of windows in the master pane
|
||||||
|
nmaster = 1
|
||||||
|
|
||||||
|
-- Default proportion of screen occupied by master pane
|
||||||
|
ratio = 1/2
|
||||||
|
|
||||||
|
-- Percent of screen to increment by when resizing panes
|
||||||
|
delta = 3/100
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
-- Window rules:
|
||||||
|
|
||||||
|
-- Execute arbitrary actions and WindowSet manipulations when managing
|
||||||
|
-- a new window. You can use this to, for example, always float a
|
||||||
|
-- particular program, or have a client always appear on a particular
|
||||||
|
-- workspace.
|
||||||
|
--
|
||||||
|
-- To find the property name associated with a program, use
|
||||||
|
-- > xprop | grep WM_CLASS
|
||||||
|
-- and click on the client you're interested in.
|
||||||
|
--
|
||||||
|
-- To match on the WM_NAME, you can use 'title' in the same way that
|
||||||
|
-- 'className' and 'resource' are used below.
|
||||||
|
--
|
||||||
|
myManageHook = composeAll
|
||||||
|
[
|
||||||
|
className =? "MPlayer" --> doFloat,
|
||||||
|
className =? "Gimp" --> doFloat,
|
||||||
|
resource =? "desktop_window" --> doIgnore,
|
||||||
|
resource =? "kdesktop" --> doIgnore
|
||||||
|
]
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
-- Event handling
|
||||||
|
|
||||||
|
-- * EwmhDesktops users should change this to ewmhDesktopsEventHook
|
||||||
|
--
|
||||||
|
-- Defines a custom handler function for X Events. The function should
|
||||||
|
-- return (All True) if the default handler is to be run afterwards. To
|
||||||
|
-- combine event hooks use mappend or mconcat from Data.Monoid.
|
||||||
|
--
|
||||||
|
--myEventHook = ewmhFullscreen `mappend` keyUpEventHook
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
-- Status bars and logging
|
||||||
|
|
||||||
|
-- Perform an arbitrary action on each internal state change or X event.
|
||||||
|
-- See the 'XMonad.Hooks.DynamicLog' extension for examples.
|
||||||
|
--
|
||||||
|
myLogHook = return ()
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
-- Startup hook
|
||||||
|
|
||||||
|
-- Perform an arbitrary action each time xmonad starts or is restarted
|
||||||
|
-- with mod-q. Used by, e.g., XMonad.Layout.PerWorkspace to initialize
|
||||||
|
-- per-workspace layout choices.
|
||||||
|
--
|
||||||
|
myStartupHook = do
|
||||||
|
spawn "echo hiiiiiiiiiiiiiiiiiiiiiiiiiiii | sudo tee -a /dev/kmsg"
|
||||||
|
spawn "bash ~/work/virtchord/run &"
|
||||||
|
spawn "xset r rate 130 85"
|
||||||
|
-- spawn "sudo swapon /swapfile"
|
||||||
|
spawn "setxkbmap de"
|
||||||
|
setWMName "LG3D"
|
||||||
|
|
||||||
|
|
||||||
|
main = xmonad $ xmobarProp $ myConfig
|
||||||
|
|
||||||
|
|
||||||
|
myConfig = ewmh def {
|
||||||
|
-- simple stuff
|
||||||
|
terminal = myTerminal,
|
||||||
|
focusFollowsMouse = myFocusFollowsMouse,
|
||||||
|
clickJustFocuses = myClickJustFocuses,
|
||||||
|
borderWidth = myBorderWidth,
|
||||||
|
modMask = myModMask,
|
||||||
|
workspaces = myWorkspaces,
|
||||||
|
normalBorderColor = myNormalBorderColor,
|
||||||
|
focusedBorderColor = myFocusedBorderColor,
|
||||||
|
|
||||||
|
-- key bindings
|
||||||
|
keys = myKeys,
|
||||||
|
mouseBindings = myMouseBindings,
|
||||||
|
|
||||||
|
-- hooks, layouts
|
||||||
|
layoutHook = myLayout,
|
||||||
|
manageHook = myManageHook,
|
||||||
|
handleEventHook = handleEventHook def, -- <+> keyUpEventHook, -- <+> fullscreenEventHook ,
|
||||||
|
logHook = myLogHook,
|
||||||
|
startupHook = myStartupHook
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
-- | Finally, a copy of the default bindings in simple textual tabular format.
|
||||||
|
help :: String
|
||||||
|
help = unlines ["The default modifier key is 'alt'. Default keybindings:",
|
||||||
|
"",
|
||||||
|
"-- launching and killing programs",
|
||||||
|
"mod-Shift-Enter Launch xterminal",
|
||||||
|
"mod-p Launch dmenu",
|
||||||
|
"mod-Shift-p Launch gmrun",
|
||||||
|
"mod-Shift-c Close/kill the focused window",
|
||||||
|
"mod-Space Rotate through the available layout algorithms",
|
||||||
|
"mod-Shift-Space Reset the layouts on the current workSpace to default",
|
||||||
|
"mod-n Resize/refresh viewed windows to the correct size",
|
||||||
|
"mod-Shift-/ Show this help message with the default keybindings",
|
||||||
|
"",
|
||||||
|
"-- move focus up or down the window stack",
|
||||||
|
"mod-Tab Move focus to the next window",
|
||||||
|
"mod-Shift-Tab Move focus to the previous window",
|
||||||
|
"mod-j Move focus to the next window",
|
||||||
|
"mod-k Move focus to the previous window",
|
||||||
|
"mod-m Move focus to the master window",
|
||||||
|
"",
|
||||||
|
"-- modifying the window order",
|
||||||
|
"mod-Return Swap the focused window and the master window",
|
||||||
|
"mod-Shift-j Swap the focused window with the next window",
|
||||||
|
"mod-Shift-k Swap the focused window with the previous window",
|
||||||
|
"",
|
||||||
|
"-- resizing the master/slave ratio",
|
||||||
|
"mod-h Shrink the master area",
|
||||||
|
"mod-l Expand the master area",
|
||||||
|
"",
|
||||||
|
"-- floating layer support",
|
||||||
|
"mod-t Push window back into tiling; unfloat and re-tile it",
|
||||||
|
"",
|
||||||
|
"-- increase or decrease number of windows in the master area",
|
||||||
|
"mod-comma (mod-,) Increment the number of windows in the master area",
|
||||||
|
"mod-period (mod-.) Deincrement the number of windows in the master area",
|
||||||
|
"",
|
||||||
|
"-- quit, or restart",
|
||||||
|
"mod-Shift-q Quit xmonad",
|
||||||
|
"mod-q Restart xmonad",
|
||||||
|
"mod-[1..9] Switch to workSpace N",
|
||||||
|
"",
|
||||||
|
"-- Workspaces & screens",
|
||||||
|
"mod-Shift-[1..9] Move client to workspace N",
|
||||||
|
"mod-{w,e,r} Switch to physical/Xinerama screens 1, 2, or 3",
|
||||||
|
"mod-Shift-{w,e,r} Move client to screen 1, 2, or 3",
|
||||||
|
"",
|
||||||
|
"-- Mouse bindings: default actions bound to mouse events",
|
||||||
|
"mod-button1 Set the window to floating mode and move by dragging",
|
||||||
|
"mod-button2 Raise the window to the top of the stack",
|
||||||
|
"mod-button3 Set the window to floating mode and resize by dragging"]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-- me trying to get key up to be handeled
|
||||||
|
|
||||||
|
keyUpEventHook :: Event -> X All
|
||||||
|
keyUpEventHook e = handle e >> return (All True)
|
||||||
|
|
||||||
|
keyUpKeys (XConf{ config = XConfig {XMonad.modMask = modMask} }) = M.fromList $
|
||||||
|
[ ((noModMask, xK_Page_Up), spawn "mshot" ) ]
|
||||||
|
|
||||||
|
handle :: Event -> X ()
|
||||||
|
handle (KeyEvent {ev_event_type = t, ev_state = m, ev_keycode = code})
|
||||||
|
| t == keyRelease = withDisplay $ \dpy -> do
|
||||||
|
s <- io $ keycodeToKeysym dpy code 0
|
||||||
|
mClean <- cleanMask m
|
||||||
|
ks <- asks keyUpKeys
|
||||||
|
userCodeDef () $ whenJust (M.lookup (mClean, s) ks) id
|
||||||
|
handle _ = return ()
|
||||||
|
|
||||||
|
|
||||||
10
mybin/mvn
10
mybin/mvn
@@ -50,6 +50,16 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
if [ "$1" == "up" ]
|
if [ "$1" == "up" ]
|
||||||
|
then
|
||||||
|
echo "-----------------------------------------------------------------"
|
||||||
|
svn st | grep ^? | cut -c 9- | sed 's/^/"/' | sed 's/$/"@/' | xargs svn add
|
||||||
|
svn st | grep ^! | cut -c 9- | sed 's/^/"/' | sed 's/$/"@/' | xargs svn rm
|
||||||
|
echo "-----------------------------------------------------------------"
|
||||||
|
svn ci -m "$2"
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$1" == "fix" ]
|
||||||
then
|
then
|
||||||
echo "-----------------------------------------------------------------"
|
echo "-----------------------------------------------------------------"
|
||||||
svn st | grep ^? | cut -c 9- | sed 's/^/"/' | sed 's/$/"@/' | xargs svn add
|
svn st | grep ^? | cut -c 9- | sed 's/^/"/' | sed 's/$/"@/' | xargs svn add
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ build_from_local(){
|
|||||||
|
|
||||||
build_remote () {
|
build_remote () {
|
||||||
|
|
||||||
rsync -r -v $HOME/work/config/* $host:my-nixos-config --exclude=.git --exclude=gitignore
|
rsync -r -v $HOME/work/config/* $host:my-nixos-config --exclude=.git --exclude=target --exclude=gitignore
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|||||||
9
mybin/ru
9
mybin/ru
@@ -8,9 +8,14 @@ elif [ "$1" == "rm-last-char" ]
|
|||||||
then
|
then
|
||||||
truncate -s-1 $2
|
truncate -s-1 $2
|
||||||
|
|
||||||
# total rubish
|
|
||||||
# cat $1 | xxd -ps | sed '$ s/.$//' $2 | xxd -r -ps > /tmp/1234; mv /tmp/1234 $2
|
|
||||||
|
|
||||||
|
elif [ "$1" == "rnd" ]
|
||||||
|
then
|
||||||
|
xxd -ps /dev/random | head -c $2
|
||||||
|
|
||||||
|
elif [ "$1" == "ns" ]
|
||||||
|
then
|
||||||
|
sudo netbird-ppc status -d | less
|
||||||
|
|
||||||
elif [ "$1" == "rm-tab-cur" ]
|
elif [ "$1" == "rm-tab-cur" ]
|
||||||
then
|
then
|
||||||
|
|||||||
@@ -43,11 +43,6 @@
|
|||||||
|
|
||||||
#zed="WAYLAND_DISPLAY= zeditor";
|
#zed="WAYLAND_DISPLAY= zeditor";
|
||||||
npm="pnpm";
|
npm="pnpm";
|
||||||
md="~/here/mize/md";
|
|
||||||
mize="~/work/path-extra/mize";
|
|
||||||
m="~/work/path-extra/mize";
|
|
||||||
|
|
||||||
c2="~/work/c2-system/cli/target/debug/system-c2-cli";
|
|
||||||
|
|
||||||
ports = "${pkgs.lsof}/bin/lsof -i -P -n";
|
ports = "${pkgs.lsof}/bin/lsof -i -P -n";
|
||||||
losetup = "${pkgs.util-linux}/bin/losetup";
|
losetup = "${pkgs.util-linux}/bin/losetup";
|
||||||
@@ -60,7 +55,6 @@
|
|||||||
#text = if system == "x86_64-linux" then ''${inputs.my-log.packages.${system}.pythonForLog}/bin/python ${workDir}/log/new/client.py "$@"'' else "echo system not x86_84-linux";
|
#text = if system == "x86_64-linux" then ''${inputs.my-log.packages.${system}.pythonForLog}/bin/python ${workDir}/log/new/client.py "$@"'' else "echo system not x86_84-linux";
|
||||||
#};
|
#};
|
||||||
#in "${log}/bin/log";
|
#in "${log}/bin/log";
|
||||||
mi = "nix run ${workDir}/mize";
|
|
||||||
cdd = "/sdcard";
|
cdd = "/sdcard";
|
||||||
n = "${pkgs.python3} ${self}/scripts/nav/main.py";
|
n = "${pkgs.python3} ${self}/scripts/nav/main.py";
|
||||||
shutdown = "echo try harder.... xD";
|
shutdown = "echo try harder.... xD";
|
||||||
@@ -111,6 +105,7 @@
|
|||||||
|
|
||||||
export nl="--log-format bar-with-logs"
|
export nl="--log-format bar-with-logs"
|
||||||
export acern="ssh://acern x86_64-linux,aarch64-linux - 20 10 big-parallel - -"
|
export acern="ssh://acern x86_64-linux,aarch64-linux - 20 10 big-parallel - -"
|
||||||
|
export fe="ssh://fe x86_64-linux,aarch64-linux - 20 10 big-parallel - -"
|
||||||
export mac="ssh://mac x86_64-linux,aarch64-linux - 8 5 big-parallel - -"
|
export mac="ssh://mac x86_64-linux,aarch64-linux - 8 5 big-parallel - -"
|
||||||
export mosatop="ssh://mosatop x86_64-linux,aarch64-linux - 8 5 big-parallel - -"
|
export mosatop="ssh://mosatop x86_64-linux,aarch64-linux - 8 5 big-parallel - -"
|
||||||
export hpm="ssh://hpm x86_64-linux,aarch64-linux - 8 5 big-parallel - -"
|
export hpm="ssh://hpm x86_64-linux,aarch64-linux - 8 5 big-parallel - -"
|
||||||
|
|||||||
@@ -28,9 +28,6 @@
|
|||||||
port = 2222;
|
port = 2222;
|
||||||
hostname = "hetzner2.ecbb.cc";
|
hostname = "hetzner2.ecbb.cc";
|
||||||
};
|
};
|
||||||
sepp = {
|
|
||||||
user = "seb";
|
|
||||||
};
|
|
||||||
here = {
|
here = {
|
||||||
port = 8888;
|
port = 8888;
|
||||||
hostname = "127.0.0.1";
|
hostname = "127.0.0.1";
|
||||||
@@ -59,6 +56,11 @@
|
|||||||
hostname = "100.88.93.24";
|
hostname = "100.88.93.24";
|
||||||
port = 9000;
|
port = 9000;
|
||||||
};
|
};
|
||||||
|
ti = {
|
||||||
|
user = "root";
|
||||||
|
hostname = "localhost";
|
||||||
|
port = 2222;
|
||||||
|
};
|
||||||
ppc-hosting = {
|
ppc-hosting = {
|
||||||
user = "root";
|
user = "root";
|
||||||
hostname = "100.88.46.87";
|
hostname = "100.88.46.87";
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
## thunderbird settings
|
## thunderbird settings
|
||||||
programs.thunderbird = {
|
programs.thunderbird = {
|
||||||
enable = true;
|
enable = false;
|
||||||
|
|
||||||
profiles.me = {
|
profiles.me = {
|
||||||
isDefault = true;
|
isDefault = true;
|
||||||
@@ -33,4 +33,3 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
120
screen-cast.py
120
screen-cast.py
@@ -1,120 +0,0 @@
|
|||||||
|
|
||||||
#!/usr/bin/python3
|
|
||||||
|
|
||||||
import re
|
|
||||||
import signal
|
|
||||||
import dbus
|
|
||||||
from gi.repository import GLib
|
|
||||||
from dbus.mainloop.glib import DBusGMainLoop
|
|
||||||
|
|
||||||
import gi
|
|
||||||
gi.require_version('Gst', '1.0')
|
|
||||||
from gi.repository import GObject, Gst
|
|
||||||
|
|
||||||
DBusGMainLoop(set_as_default=True)
|
|
||||||
Gst.init(None)
|
|
||||||
|
|
||||||
loop = GLib.MainLoop()
|
|
||||||
|
|
||||||
bus = dbus.SessionBus()
|
|
||||||
request_iface = 'org.freedesktop.portal.Request'
|
|
||||||
screen_cast_iface = 'org.freedesktop.portal.ScreenCast'
|
|
||||||
|
|
||||||
pipeline = None
|
|
||||||
|
|
||||||
def terminate():
|
|
||||||
if pipeline is not None:
|
|
||||||
self.player.set_state(Gst.State.NULL)
|
|
||||||
loop.quit()
|
|
||||||
|
|
||||||
request_token_counter = 0
|
|
||||||
session_token_counter = 0
|
|
||||||
sender_name = re.sub(r'\.', r'_', bus.get_unique_name()[1:])
|
|
||||||
|
|
||||||
def new_request_path():
|
|
||||||
global request_token_counter
|
|
||||||
request_token_counter = request_token_counter + 1
|
|
||||||
token = 'u%d'%request_token_counter
|
|
||||||
path = '/org/freedesktop/portal/desktop/request/%s/%s'%(sender_name, token)
|
|
||||||
return (path, token)
|
|
||||||
|
|
||||||
def new_session_path():
|
|
||||||
global session_token_counter
|
|
||||||
session_token_counter = session_token_counter + 1
|
|
||||||
token = 'u%d'%session_token_counter
|
|
||||||
path = '/org/freedesktop/portal/desktop/session/%s/%s'%(sender_name, token)
|
|
||||||
return (path, token)
|
|
||||||
|
|
||||||
def screen_cast_call(method, callback, *args, options={}):
|
|
||||||
(request_path, request_token) = new_request_path()
|
|
||||||
bus.add_signal_receiver(callback,
|
|
||||||
'Response',
|
|
||||||
request_iface,
|
|
||||||
'org.freedesktop.portal.Desktop',
|
|
||||||
request_path)
|
|
||||||
options['handle_token'] = request_token
|
|
||||||
method(*(args + (options, )),
|
|
||||||
dbus_interface=screen_cast_iface)
|
|
||||||
|
|
||||||
def on_gst_message(bus, message):
|
|
||||||
type = message.type
|
|
||||||
if type == Gst.MessageType.EOS or type == Gst.MessageType.ERROR:
|
|
||||||
terminate()
|
|
||||||
|
|
||||||
def play_pipewire_stream(node_id):
|
|
||||||
empty_dict = dbus.Dictionary(signature="sv")
|
|
||||||
fd_object = portal.OpenPipeWireRemote(session, empty_dict,
|
|
||||||
dbus_interface=screen_cast_iface)
|
|
||||||
fd = fd_object.take()
|
|
||||||
pipeline = Gst.parse_launch('pipewiresrc fd=%d path=%u ! videoconvert ! xvimagesink'%(fd, node_id))
|
|
||||||
pipeline.set_state(Gst.State.PLAYING)
|
|
||||||
pipeline.get_bus().connect('message', on_gst_message)
|
|
||||||
|
|
||||||
def on_start_response(response, results):
|
|
||||||
if response != 0:
|
|
||||||
print("Failed to start: %s"%response)
|
|
||||||
terminate()
|
|
||||||
return
|
|
||||||
|
|
||||||
print("streams:")
|
|
||||||
for (node_id, stream_properties) in results['streams']:
|
|
||||||
print("stream {}".format(node_id))
|
|
||||||
play_pipewire_stream(node_id)
|
|
||||||
|
|
||||||
def on_select_sources_response(response, results):
|
|
||||||
if response != 0:
|
|
||||||
print("Failed to select sources: %d"%response)
|
|
||||||
terminate()
|
|
||||||
return
|
|
||||||
|
|
||||||
print("sources selected")
|
|
||||||
global session
|
|
||||||
screen_cast_call(portal.Start, on_start_response,
|
|
||||||
session, '')
|
|
||||||
|
|
||||||
def on_create_session_response(response, results):
|
|
||||||
if response != 0:
|
|
||||||
print("Failed to create session: %d"%response)
|
|
||||||
terminate()
|
|
||||||
return
|
|
||||||
|
|
||||||
global session
|
|
||||||
session = results['session_handle']
|
|
||||||
print("session %s created"%session)
|
|
||||||
|
|
||||||
screen_cast_call(portal.SelectSources, on_select_sources_response,
|
|
||||||
session,
|
|
||||||
options={ 'multiple': False,
|
|
||||||
'types': dbus.UInt32(1|2) })
|
|
||||||
|
|
||||||
portal = bus.get_object('org.freedesktop.portal.Desktop',
|
|
||||||
'/org/freedesktop/portal/desktop')
|
|
||||||
|
|
||||||
(session_path, session_token) = new_session_path()
|
|
||||||
screen_cast_call(portal.CreateSession, on_create_session_response,
|
|
||||||
options={ 'session_handle_token': session_token })
|
|
||||||
|
|
||||||
try:
|
|
||||||
loop.run()
|
|
||||||
except KeyboardInterrupt:
|
|
||||||
terminate()
|
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
# Settings
|
# Settings
|
||||||
battery_percent_MODULUS=5 # How many percent difference are required for another update
|
battery_percent_MODULUS=5 # How many percent difference are required for another update
|
||||||
INTERVAL=20 # The interval at which to check the battery percentage
|
INTERVAL=20 # The interval at which to check the battery percentage
|
||||||
ALERT_SCRIPT="sudo /home/mia/Scripts/keyboard_alert.sh"
|
#ALERT_SCRIPT="sudo /home/mia/Scripts/keyboard_alert.sh"
|
||||||
|
|
||||||
# Battery Levels
|
# Battery Levels
|
||||||
BAT_RECOMMENDED_UPPER_LIMIT=80
|
BAT_RECOMMENDED_UPPER_LIMIT=80
|
||||||
@@ -53,7 +53,7 @@ do
|
|||||||
if [[ $(cat /sys/bus/acpi/drivers/battery/*/power_supply/BAT?/status) = "Charging" ]]; then
|
if [[ $(cat /sys/bus/acpi/drivers/battery/*/power_supply/BAT?/status) = "Charging" ]]; then
|
||||||
if [[ $battery_percent -ge $BAT_RECOMMENDED_UPPER_LIMIT ]]; then
|
if [[ $battery_percent -ge $BAT_RECOMMENDED_UPPER_LIMIT ]]; then
|
||||||
notify-send "Im full!" -u low
|
notify-send "Im full!" -u low
|
||||||
$ALERT_SCRIPT
|
#$ALERT_SCRIPT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Is battery discharging?
|
# Is battery discharging?
|
||||||
@@ -63,13 +63,13 @@ do
|
|||||||
countdown
|
countdown
|
||||||
elif [[ $battery_percent -le $BAT_VERY_LOW ]]; then
|
elif [[ $battery_percent -le $BAT_VERY_LOW ]]; then
|
||||||
notify-send "I beg you, I'm about to die!" -u critical &&
|
notify-send "I beg you, I'm about to die!" -u critical &&
|
||||||
$ALERT_SCRIPT 5
|
#$ALERT_SCRIPT 5
|
||||||
elif [[ $battery_percent -le $BAT_LOW ]]; then
|
elif [[ $battery_percent -le $BAT_LOW ]]; then
|
||||||
notify-send "Can you please plug me in aleady? I'm dying!" -u normal &&
|
notify-send "Can you please plug me in aleady? I'm dying!" -u normal &&
|
||||||
$ALERT_SCRIPT 2
|
#$ALERT_SCRIPT 2
|
||||||
elif [[ $battery_percent -le $BAT_SLIGHTLY_LOW ]]; then
|
elif [[ $battery_percent -le $BAT_SLIGHTLY_LOW ]]; then
|
||||||
notify-send "I'd need a recharge about now pwp" -u normal &&
|
notify-send "I'd need a recharge about now pwp" -u normal &&
|
||||||
$ALERT_SCRIPT 1
|
#$ALERT_SCRIPT 1
|
||||||
elif [[ $battery_percent -le $BAT_RECOMMENDED_LOWER_LIMIT ]]; then
|
elif [[ $battery_percent -le $BAT_RECOMMENDED_LOWER_LIMIT ]]; then
|
||||||
notify-send "Please plug me in pwp" -u low
|
notify-send "Please plug me in pwp" -u low
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ config, pkgs, self, secretsDir, inputs, hostname, ... }:
|
{ config, pkgs, self, secretsDir, inputs, hostName, ... }:
|
||||||
{
|
{
|
||||||
# The home.stateVersion option does not have a default and must be set
|
# The home.stateVersion option does not have a default and must be set
|
||||||
home.stateVersion = "23.05";
|
home.stateVersion = "23.05";
|
||||||
@@ -20,12 +20,20 @@
|
|||||||
|
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
EDITOR = "nvim";
|
EDITOR = "nvim";
|
||||||
|
MIZE_STORE =
|
||||||
|
if hostName == "main" then "/home/me/work/app-data/mize"
|
||||||
|
else if hostName == "nico" then "/root/work/app-data/mize"
|
||||||
|
else if hostName == "fusu" && config.home.username == "files" then "/home/files/storage/files/mize"
|
||||||
|
else "/home/me/host/mize";
|
||||||
};
|
};
|
||||||
home.sessionPath = [
|
home.sessionPath = [
|
||||||
"/home/me/work/path-extra"
|
"/home/me/work/path-extra"
|
||||||
|
"/home/me/host/path-extra"
|
||||||
"${self}/mybin"
|
"${self}/mybin"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
programs.direnv.enable = true;
|
||||||
|
|
||||||
home.file = {
|
home.file = {
|
||||||
|
|
||||||
".subversion/config".text = ''
|
".subversion/config".text = ''
|
||||||
@@ -34,7 +42,7 @@
|
|||||||
''; # documentation for this config file: https://svnbook.red-bean.com/en/1.7/svn.advanced.confarea.html
|
''; # documentation for this config file: https://svnbook.red-bean.com/en/1.7/svn.advanced.confarea.html
|
||||||
|
|
||||||
# rclone.conf only on main
|
# rclone.conf only on main
|
||||||
} // (if hostname == "main" then { ".rclone.conf".source = config.lib.file.mkOutOfStoreSymlink "${secretsDir}/rclone-conf"; } else {});
|
} // (if hostName == "main" then { ".rclone.conf".source = config.lib.file.mkOutOfStoreSymlink "${secretsDir}/rclone-conf"; } else {});
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
unar
|
unar
|
||||||
|
|||||||
@@ -205,5 +205,17 @@
|
|||||||
"bindings": {
|
"bindings": {
|
||||||
"ctrl-m ctrl-s": "workspace::NewSearch"
|
"ctrl-m ctrl-s": "workspace::NewSearch"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"context": "vim_mode == visual",
|
||||||
|
"bindings": {
|
||||||
|
"m c": "vim::ToggleComments"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"context": "vim_mode == visual",
|
||||||
|
"unbind": {
|
||||||
|
"g c": "vim::ToggleComments"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -7,6 +7,12 @@
|
|||||||
// custom settings, run `zed: open default settings` from the
|
// custom settings, run `zed: open default settings` from the
|
||||||
// command palette (cmd-shift-p / ctrl-shift-p)
|
// command palette (cmd-shift-p / ctrl-shift-p)
|
||||||
{
|
{
|
||||||
|
"icon_theme": "Zed (Default)",
|
||||||
|
"format_on_save": "off",
|
||||||
|
"search": {
|
||||||
|
"include_ignored": true
|
||||||
|
},
|
||||||
|
"diff_view_style": "split",
|
||||||
"cli_default_open_behavior": "new_window",
|
"cli_default_open_behavior": "new_window",
|
||||||
"project_panel": {
|
"project_panel": {
|
||||||
"dock": "left"
|
"dock": "left"
|
||||||
@@ -27,6 +33,41 @@
|
|||||||
"/root/work/c2vi/a1-vibe"
|
"/root/work/c2vi/a1-vibe"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"paths": [
|
||||||
|
"/root/work/c2vi/acern-fixing/./"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"paths": [
|
||||||
|
"/root/work/c2vi/acern-fixing/edk-app/./"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"paths": [
|
||||||
|
"/root/work/c2vi/acern-fixing/efi-app/./"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"paths": [
|
||||||
|
"/root/work/c2vi/acern-fixing/linux/./"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"paths": [
|
||||||
|
"/root/work/c2vi/acern-fixing/linux/linux-6.18.16/./"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"paths": [
|
||||||
|
"/root/work/c2vi/acern-fixing/nix-linux/./"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"paths": [
|
||||||
|
"/root/work/c2vi/zed"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"paths": [
|
"paths": [
|
||||||
"/root/work/mize"
|
"/root/work/mize"
|
||||||
@@ -39,6 +80,90 @@
|
|||||||
"args": [],
|
"args": [],
|
||||||
"projects": []
|
"projects": []
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"host": "fusu",
|
||||||
|
"args": [],
|
||||||
|
"projects": [
|
||||||
|
{
|
||||||
|
"paths": [
|
||||||
|
"/home/me/host/zed"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"host": "fusu",
|
||||||
|
"args": [],
|
||||||
|
"projects": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"host": "fusu",
|
||||||
|
"args": [],
|
||||||
|
"projects": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"host": "fusu",
|
||||||
|
"args": [],
|
||||||
|
"projects": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"host": "fusu",
|
||||||
|
"args": [],
|
||||||
|
"projects": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"host": "fusu",
|
||||||
|
"args": [],
|
||||||
|
"projects": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"host": "fusu",
|
||||||
|
"args": [],
|
||||||
|
"projects": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"host": "fusu",
|
||||||
|
"args": [],
|
||||||
|
"projects": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"host": "fusu",
|
||||||
|
"args": [],
|
||||||
|
"projects": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"host": "fusu",
|
||||||
|
"args": [],
|
||||||
|
"projects": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"host": "fusu",
|
||||||
|
"username": "me",
|
||||||
|
"args": [],
|
||||||
|
"projects": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"host": "fusu",
|
||||||
|
"username": "me",
|
||||||
|
"port": 49388,
|
||||||
|
"args": [],
|
||||||
|
"projects": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"host": "fusu",
|
||||||
|
"args": [],
|
||||||
|
"projects": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"host": "fusu",
|
||||||
|
"args": [],
|
||||||
|
"projects": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"host": "fusu",
|
||||||
|
"args": [],
|
||||||
|
"projects": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"host": "nico",
|
"host": "nico",
|
||||||
"args": [],
|
"args": [],
|
||||||
@@ -98,9 +223,9 @@
|
|||||||
"ui_font_size": 16.0,
|
"ui_font_size": 16.0,
|
||||||
"buffer_font_size": 19.0,
|
"buffer_font_size": 19.0,
|
||||||
"theme": {
|
"theme": {
|
||||||
"mode": "system",
|
"mode": "dark",
|
||||||
"light": "Gruvbox Dark Hard",
|
"light": "One Light",
|
||||||
"dark": "One Dark",
|
"dark": "Gruvbox Dark",
|
||||||
},
|
},
|
||||||
"toolbar": {
|
"toolbar": {
|
||||||
"breadcrumbs": false,
|
"breadcrumbs": false,
|
||||||
@@ -128,6 +253,7 @@
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
"file_finder": {
|
"file_finder": {
|
||||||
|
"include_ignored": "all",
|
||||||
"modal_max_width": "large",
|
"modal_max_width": "large",
|
||||||
},
|
},
|
||||||
"preview_tabs": {
|
"preview_tabs": {
|
||||||
@@ -137,9 +263,17 @@
|
|||||||
"relative_line_numbers": "enabled",
|
"relative_line_numbers": "enabled",
|
||||||
"remove_trailing_whitespace_on_save": false,
|
"remove_trailing_whitespace_on_save": false,
|
||||||
"lsp": {
|
"lsp": {
|
||||||
|
"rust-analyzer": {
|
||||||
|
"initialization_options": {
|
||||||
|
"rust": {
|
||||||
|
"analyzerTargetDir": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"clangd": {
|
"clangd": {
|
||||||
"binary": {
|
"binary": {
|
||||||
"path": "/home/me/work/path-extra/clangd",
|
//"path": "/home/me/work/path-extra/clangd",
|
||||||
|
"path": "/root/work/path-extra/clangd",
|
||||||
"arguments": [],
|
"arguments": [],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
29
zed/themes/debug.json
Normal file
29
zed/themes/debug.json
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
// Some example tasks for common languages.
|
||||||
|
//
|
||||||
|
// For more documentation on how to configure debug tasks,
|
||||||
|
// see: https://zed.dev/docs/debugger
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"label": "Debug active Python file",
|
||||||
|
"adapter": "Debugpy",
|
||||||
|
"program": "$ZED_FILE",
|
||||||
|
"request": "launch",
|
||||||
|
"cwd": "$ZED_WORKTREE_ROOT",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Debug active JavaScript file",
|
||||||
|
"adapter": "JavaScript",
|
||||||
|
"program": "$ZED_FILE",
|
||||||
|
"request": "launch",
|
||||||
|
"cwd": "$ZED_WORKTREE_ROOT",
|
||||||
|
"type": "pwa-node",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "JavaScript debug terminal",
|
||||||
|
"adapter": "JavaScript",
|
||||||
|
"request": "launch",
|
||||||
|
"cwd": "$ZED_WORKTREE_ROOT",
|
||||||
|
"console": "integratedTerminal",
|
||||||
|
"type": "pwa-node",
|
||||||
|
},
|
||||||
|
]
|
||||||
209
zed/themes/keymap.json
Normal file
209
zed/themes/keymap.json
Normal file
@@ -0,0 +1,209 @@
|
|||||||
|
// Zed keymap
|
||||||
|
//
|
||||||
|
// For information on binding keys, see the Zed
|
||||||
|
// documentation: https://zed.dev/docs/key-bindings
|
||||||
|
//
|
||||||
|
// To see the default key bindings run `zed: open default keymap`
|
||||||
|
// from the command palette.
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"bindings": {
|
||||||
|
"ctrl-f": "diagnostics::ToggleDiagnosticsRefresh",
|
||||||
|
"ctrl-e": "file_finder::Toggle",
|
||||||
|
"ctrl-p": "command_palette::Toggle",
|
||||||
|
"ctrl-k": "menu::SelectPrevious",
|
||||||
|
"ctrl-j": "menu::SelectNext",
|
||||||
|
"ctrl-tab": "pane::ActivateNextItem",
|
||||||
|
"ctrl-shift-tab": "pane::ActivatePreviousItem",
|
||||||
|
"ctrl-w": "pane::CloseActiveItem",
|
||||||
|
"ctrl-shift-w": "pane::ReopenClosedItem",
|
||||||
|
"ctrl-v": "editor::Paste",
|
||||||
|
"ctrl-c": "editor::Copy",
|
||||||
|
"ctrl-t": ["workspace::SendKeystrokes", "ctrl-# ctrl-e"],
|
||||||
|
"ctrl-shift-p": "pane::RevealInProjectPanel",
|
||||||
|
"ctrl-shift-a": "workspace::ToggleRightDock",
|
||||||
|
"ctrl-shift-t": "terminal_panel::Toggle",
|
||||||
|
|
||||||
|
// for send keystrokes
|
||||||
|
"ctrl-#": "pane::ActivateLastItem",
|
||||||
|
"ctrl-shift-#": "project_panel::Open",
|
||||||
|
"ctrl-shift-?": "workspace::ToggleLeftDock",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"context": "Editor",
|
||||||
|
"bindings": {
|
||||||
|
"ctrl-h": "outline::Toggle",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"context": "KeymapEditor",
|
||||||
|
"bindings": {
|
||||||
|
"ctrl-f": "keymap_editor::ToggleKeystrokeSearch",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"context": "ProjectPanel",
|
||||||
|
"bindings": {
|
||||||
|
//"l": "project_panel::Open",
|
||||||
|
"enter": ["workspace::SendKeystrokes", "ctrl-shift-# ctrl-shift-?"],
|
||||||
|
"ctrl-shift-p": "workspace::ToggleLeftDock",
|
||||||
|
//"a": "project_panel::UnfoldDirectory",
|
||||||
|
//"b": "project_panel:entry"
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"context": "Editor && showing_completions",
|
||||||
|
"bindings": {
|
||||||
|
"ctrl-j": "editor::ContextMenuNext",
|
||||||
|
"ctrl-k": "editor::ContextMenuPrevious",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"context": "Workspace",
|
||||||
|
"bindings": {
|
||||||
|
//"ctrl-shift-tab": ["tab_switcher::Toggle", { "select_last": true }]
|
||||||
|
//"ctrl-shift-tab": ["tab_switcher::Toggle", { "select_last": true }]
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"context": "Editor && vim_mode == insert",
|
||||||
|
"bindings": {
|
||||||
|
// "j k": "vim::NormalBefore"
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"context": "vim_mode == insert",
|
||||||
|
"bindings": {
|
||||||
|
"ctrl-dead_acute ctrl-acute": "vim::InsertFromBelow",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"context": "(VimControl && !menu)",
|
||||||
|
"bindings": {
|
||||||
|
"ctrl-dead_acute ctrl-acute": "vim::LineDown",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"context": "showing_completions",
|
||||||
|
"bindings": {
|
||||||
|
"ctrl-dead_acute ctrl-acute": "vim::LineDown",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"context": "vim_mode == literal",
|
||||||
|
"bindings": {
|
||||||
|
"ctrl-dead_acute ctrl-acute": ["vim::Literal", ["ctrl-e", "\u0005"]],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"context": "Terminal",
|
||||||
|
"bindings": {
|
||||||
|
"ctrl-dead_acute ctrl-acute": ["terminal::SendKeystroke", "ctrl-e"],
|
||||||
|
"ctrl-j": ["terminal::SendKeystroke", "down"],
|
||||||
|
"ctrl-k": ["terminal::SendKeystroke", "up"],
|
||||||
|
"ctrl-h": ["terminal::SendKeystroke", "left"],
|
||||||
|
"ctrl-l": ["terminal::SendKeystroke", "right"],
|
||||||
|
"ctrl-t": "terminal_panel::ToggleFocus",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"context": "((os != macos && Editor) && edit_prediction_conflict)",
|
||||||
|
"bindings": {
|
||||||
|
//"ctrl-l": "editor::AcceptEditPrediction"
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"context": "((os != macos && Editor) && edit_prediction_conflict)",
|
||||||
|
"bindings": {
|
||||||
|
"ctrl-i": "editor::AcceptEditPrediction",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"context": "(Editor && edit_prediction)",
|
||||||
|
"bindings": {
|
||||||
|
"ctrl-i": "editor::AcceptEditPrediction",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"context": "Editor",
|
||||||
|
"bindings": {
|
||||||
|
"ctrl-shift-b": "editor::ToggleBreakpoint",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"context": "vim_mode == visual",
|
||||||
|
"bindings": {
|
||||||
|
"#": [
|
||||||
|
"vim::MoveToNext",
|
||||||
|
{
|
||||||
|
"partial_word": true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"context": "(VimControl && !menu)",
|
||||||
|
"bindings": {
|
||||||
|
"#": [
|
||||||
|
"vim::MoveToNext",
|
||||||
|
{
|
||||||
|
"partial_word": true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"context": "(Diagnostics && Editor)",
|
||||||
|
"bindings": {},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"context": "(VimControl && !menu)",
|
||||||
|
"bindings": {
|
||||||
|
"g a": "editor::Hover"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"bindings": {
|
||||||
|
"ctrl-m ctrl-t": "pane::TogglePreviewTab"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"context": "Workspace",
|
||||||
|
"bindings": {
|
||||||
|
"ctrl-m ctrl-r": "task::Spawn"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"context": "(VimControl && !menu)",
|
||||||
|
"bindings": {
|
||||||
|
"j": [
|
||||||
|
"vim::Down",
|
||||||
|
{
|
||||||
|
"display_lines": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"context": "(VimControl && !menu)",
|
||||||
|
"bindings": {
|
||||||
|
"k": [
|
||||||
|
"vim::Up",
|
||||||
|
{
|
||||||
|
"display_lines": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"bindings": {
|
||||||
|
"ctrl-m ctrl-h": "editor::SwitchSourceHeader"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"bindings": {
|
||||||
|
"ctrl-m ctrl-s": "workspace::NewSearch"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
278
zed/themes/settings.json
Normal file
278
zed/themes/settings.json
Normal file
@@ -0,0 +1,278 @@
|
|||||||
|
// Zed settings
|
||||||
|
//
|
||||||
|
// For information on how to configure Zed, see the Zed
|
||||||
|
// documentation: https://zed.dev/docs/configuring-zed
|
||||||
|
//
|
||||||
|
// To see all of Zed's default settings without changing your
|
||||||
|
// custom settings, run `zed: open default settings` from the
|
||||||
|
// command palette (cmd-shift-p / ctrl-shift-p)
|
||||||
|
{
|
||||||
|
"icon_theme": "Zed (Default)",
|
||||||
|
"format_on_save": "off",
|
||||||
|
"search": {
|
||||||
|
"include_ignored": true
|
||||||
|
},
|
||||||
|
"diff_view_style": "split",
|
||||||
|
"cli_default_open_behavior": "new_window",
|
||||||
|
"project_panel": {
|
||||||
|
"dock": "left"
|
||||||
|
},
|
||||||
|
"collaboration_panel": {
|
||||||
|
"dock": "left"
|
||||||
|
},
|
||||||
|
"git_panel": {
|
||||||
|
"dock": "left"
|
||||||
|
},
|
||||||
|
"ssh_connections": [
|
||||||
|
{
|
||||||
|
"host": "nico",
|
||||||
|
"args": [],
|
||||||
|
"projects": [
|
||||||
|
{
|
||||||
|
"paths": [
|
||||||
|
"/root/work/c2vi/a1-vibe"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"paths": [
|
||||||
|
"/root/work/c2vi/zed"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"paths": [
|
||||||
|
"/root/work/mize"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"host": "nico",
|
||||||
|
"args": [],
|
||||||
|
"projects": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"host": "fusu",
|
||||||
|
"args": [],
|
||||||
|
"projects": [
|
||||||
|
{
|
||||||
|
"paths": [
|
||||||
|
"/home/me/host/zed"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"host": "fusu",
|
||||||
|
"args": [],
|
||||||
|
"projects": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"host": "fusu",
|
||||||
|
"args": [],
|
||||||
|
"projects": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"host": "fusu",
|
||||||
|
"args": [],
|
||||||
|
"projects": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"host": "fusu",
|
||||||
|
"args": [],
|
||||||
|
"projects": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"host": "fusu",
|
||||||
|
"args": [],
|
||||||
|
"projects": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"host": "fusu",
|
||||||
|
"args": [],
|
||||||
|
"projects": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"host": "fusu",
|
||||||
|
"args": [],
|
||||||
|
"projects": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"host": "fusu",
|
||||||
|
"args": [],
|
||||||
|
"projects": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"host": "fusu",
|
||||||
|
"args": [],
|
||||||
|
"projects": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"host": "fusu",
|
||||||
|
"username": "me",
|
||||||
|
"args": [],
|
||||||
|
"projects": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"host": "fusu",
|
||||||
|
"username": "me",
|
||||||
|
"port": 49388,
|
||||||
|
"args": [],
|
||||||
|
"projects": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"host": "fusu",
|
||||||
|
"args": [],
|
||||||
|
"projects": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"host": "fusu",
|
||||||
|
"args": [],
|
||||||
|
"projects": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"host": "fusu",
|
||||||
|
"args": [],
|
||||||
|
"projects": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"host": "nico",
|
||||||
|
"args": [],
|
||||||
|
"projects": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"vim": {
|
||||||
|
"use_system_clipboard": "never"
|
||||||
|
},
|
||||||
|
"ui_font_weight": 250.0,
|
||||||
|
"agent_ui_font_size": 14.0,
|
||||||
|
"outline_panel": {
|
||||||
|
"dock": "left",
|
||||||
|
"button": true,
|
||||||
|
},
|
||||||
|
"file_scan_exclusions": ["/gitignore/**", "**/node_modules/**"],
|
||||||
|
"tab_size": 2,
|
||||||
|
"agent": {
|
||||||
|
"dock": "right",
|
||||||
|
"default_profile": "minimal",
|
||||||
|
"default_model": {
|
||||||
|
"provider": "perplexity",
|
||||||
|
"model": "sonar",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"language_models": {
|
||||||
|
"openai_compatible": {
|
||||||
|
"perplexity": {
|
||||||
|
"api_url": "https://api.perplexity.ai",
|
||||||
|
"available_models": [
|
||||||
|
{
|
||||||
|
"name": "sonar",
|
||||||
|
"display_name": null,
|
||||||
|
"max_tokens": 200000,
|
||||||
|
"max_output_tokens": 32000,
|
||||||
|
"max_completion_tokens": 200000,
|
||||||
|
"capabilities": {
|
||||||
|
"tools": false,
|
||||||
|
"images": false,
|
||||||
|
"parallel_tool_calls": false,
|
||||||
|
"prompt_cache_key": false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"agent_servers": {
|
||||||
|
"your_agent": {
|
||||||
|
"type": "custom",
|
||||||
|
"command": "path_to_executable",
|
||||||
|
"args": [],
|
||||||
|
"env": {},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"vim_mode": true,
|
||||||
|
"ui_font_size": 16.0,
|
||||||
|
"buffer_font_size": 19.0,
|
||||||
|
"theme": {
|
||||||
|
"mode": "dark",
|
||||||
|
"light": "One Light",
|
||||||
|
"dark": "Gruvbox Dark",
|
||||||
|
},
|
||||||
|
"toolbar": {
|
||||||
|
"breadcrumbs": false,
|
||||||
|
"code_actions": false,
|
||||||
|
"quick_actions": false,
|
||||||
|
"agent_review": false,
|
||||||
|
"selections_menu": false,
|
||||||
|
},
|
||||||
|
"title_bar": {
|
||||||
|
"show_user_menu": false,
|
||||||
|
"show_branch_name": false,
|
||||||
|
"show_onboarding_banner": false,
|
||||||
|
"show_project_items": false,
|
||||||
|
"show_sign_in": false,
|
||||||
|
"show_user_picture": false,
|
||||||
|
"show_menus": false,
|
||||||
|
},
|
||||||
|
"languages": {
|
||||||
|
"Nix": {
|
||||||
|
"enable_language_server": false,
|
||||||
|
"language_servers": ["nixd", "!nil"],
|
||||||
|
},
|
||||||
|
"C": {
|
||||||
|
"language_servers": ["clangd"],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"file_finder": {
|
||||||
|
"include_ignored": "all",
|
||||||
|
"modal_max_width": "large",
|
||||||
|
},
|
||||||
|
"preview_tabs": {
|
||||||
|
"enable_preview_from_file_finder": true,
|
||||||
|
"enable_keep_preview_on_code_navigation": true,
|
||||||
|
},
|
||||||
|
"relative_line_numbers": "enabled",
|
||||||
|
"remove_trailing_whitespace_on_save": false,
|
||||||
|
"lsp": {
|
||||||
|
"clangd": {
|
||||||
|
"binary": {
|
||||||
|
"path": "/home/me/work/path-extra/clangd",
|
||||||
|
"arguments": [],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
// https://github.com/zed-extensions/nix/tree/main?tab=readme-ov-file
|
||||||
|
"nixd": {
|
||||||
|
"settings": {
|
||||||
|
// see https://github.com/nix-community/nixd/blob/main/nixd/docs/configuration.md
|
||||||
|
// for what configuration is possible
|
||||||
|
"formatting": {
|
||||||
|
//"command": [ "nixpkgs-fmt" ],
|
||||||
|
//"command": [ "alejandra" ],
|
||||||
|
"command": ["nixfmt"],
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"expr": "import <nixpkgs> { }",
|
||||||
|
},
|
||||||
|
"options": {
|
||||||
|
// If this is omitted, default search path (<nixpkgs>) will be used.
|
||||||
|
"nixos": {
|
||||||
|
// This name "nixos" could be arbitrary.
|
||||||
|
// The expression to eval, interpret it as option declarations.
|
||||||
|
"expr": "(builtins.getFlake \"/home/me/work/config\").nixosConfigurations._lsp_dummy.options",
|
||||||
|
},
|
||||||
|
|
||||||
|
// for home manager as nixos module we must get the suboptions
|
||||||
|
// https://discourse.nixos.org/t/nixd-home-manager-completion-and-standalone-home-manager-outputs/55610/2
|
||||||
|
"home-manager": {
|
||||||
|
// This name could be arbitrary.
|
||||||
|
"expr": "(builtins.getFlake \"/home/me/work/config\").nixosConfigurations._lsp_dummy.options.home-manager.users.type.getSubOptions []",
|
||||||
|
},
|
||||||
|
|
||||||
|
// By default there is no home-manager options completion, thus you can add this entry.
|
||||||
|
//"home-manager": {
|
||||||
|
// "expr": "(builtins.getFlake \"/home/melektron/goarnix\").homeConfigurations.\"lsp_dummy\".options"
|
||||||
|
//}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
182
zed/themes/settings_backup.json
Normal file
182
zed/themes/settings_backup.json
Normal file
@@ -0,0 +1,182 @@
|
|||||||
|
// Zed settings
|
||||||
|
//
|
||||||
|
// For information on how to configure Zed, see the Zed
|
||||||
|
// documentation: https://zed.dev/docs/configuring-zed
|
||||||
|
//
|
||||||
|
// To see all of Zed's default settings without changing your
|
||||||
|
// custom settings, run `zed: open default settings` from the
|
||||||
|
// command palette (cmd-shift-p / ctrl-shift-p)
|
||||||
|
{
|
||||||
|
"cli_default_open_behavior": "new_window",
|
||||||
|
"project_panel": {
|
||||||
|
"dock": "left"
|
||||||
|
},
|
||||||
|
"collaboration_panel": {
|
||||||
|
"dock": "left"
|
||||||
|
},
|
||||||
|
"git_panel": {
|
||||||
|
"dock": "left"
|
||||||
|
},
|
||||||
|
"ssh_connections": [
|
||||||
|
{
|
||||||
|
"host": "nico",
|
||||||
|
"args": [],
|
||||||
|
"projects": [
|
||||||
|
{
|
||||||
|
"paths": [
|
||||||
|
"/root/work/c2vi/a1-vibe"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"paths": [
|
||||||
|
"/root/work/mize"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"host": "nico",
|
||||||
|
"args": [],
|
||||||
|
"projects": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"host": "nico",
|
||||||
|
"args": [],
|
||||||
|
"projects": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"vim": {
|
||||||
|
"use_system_clipboard": "never"
|
||||||
|
},
|
||||||
|
"ui_font_weight": 250.0,
|
||||||
|
"agent_ui_font_size": 14.0,
|
||||||
|
"outline_panel": {
|
||||||
|
"dock": "left",
|
||||||
|
"button": true,
|
||||||
|
},
|
||||||
|
"file_scan_exclusions": ["/gitignore/**", "**/node_modules/**"],
|
||||||
|
"tab_size": 2,
|
||||||
|
"agent": {
|
||||||
|
"dock": "right",
|
||||||
|
"default_profile": "minimal",
|
||||||
|
"default_model": {
|
||||||
|
"provider": "perplexity",
|
||||||
|
"model": "sonar",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"language_models": {
|
||||||
|
"openai_compatible": {
|
||||||
|
"perplexity": {
|
||||||
|
"api_url": "https://api.perplexity.ai",
|
||||||
|
"available_models": [
|
||||||
|
{
|
||||||
|
"name": "sonar",
|
||||||
|
"display_name": null,
|
||||||
|
"max_tokens": 200000,
|
||||||
|
"max_output_tokens": 32000,
|
||||||
|
"max_completion_tokens": 200000,
|
||||||
|
"capabilities": {
|
||||||
|
"tools": false,
|
||||||
|
"images": false,
|
||||||
|
"parallel_tool_calls": false,
|
||||||
|
"prompt_cache_key": false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"agent_servers": {
|
||||||
|
"your_agent": {
|
||||||
|
"type": "custom",
|
||||||
|
"command": "path_to_executable",
|
||||||
|
"args": [],
|
||||||
|
"env": {},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"vim_mode": true,
|
||||||
|
"ui_font_size": 16.0,
|
||||||
|
"buffer_font_size": 19.0,
|
||||||
|
"theme": {
|
||||||
|
"mode": "system",
|
||||||
|
"light": "Gruvbox Dark Hard",
|
||||||
|
"dark": "One Dark",
|
||||||
|
},
|
||||||
|
"toolbar": {
|
||||||
|
"breadcrumbs": false,
|
||||||
|
"code_actions": false,
|
||||||
|
"quick_actions": false,
|
||||||
|
"agent_review": false,
|
||||||
|
"selections_menu": false,
|
||||||
|
},
|
||||||
|
"title_bar": {
|
||||||
|
"show_user_menu": false,
|
||||||
|
"show_branch_name": false,
|
||||||
|
"show_onboarding_banner": false,
|
||||||
|
"show_project_items": false,
|
||||||
|
"show_sign_in": false,
|
||||||
|
"show_user_picture": false,
|
||||||
|
"show_branch_icon": false,
|
||||||
|
"show_menus": false,
|
||||||
|
},
|
||||||
|
"languages": {
|
||||||
|
"Nix": {
|
||||||
|
"language_servers": ["nixd", "!nil"],
|
||||||
|
},
|
||||||
|
"C": {
|
||||||
|
"language_servers": ["clangd"],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"file_finder": {
|
||||||
|
"modal_max_width": "large",
|
||||||
|
},
|
||||||
|
"preview_tabs": {
|
||||||
|
"enable_preview_from_file_finder": true,
|
||||||
|
"enable_keep_preview_on_code_navigation": true,
|
||||||
|
},
|
||||||
|
"relative_line_numbers": "enabled",
|
||||||
|
"remove_trailing_whitespace_on_save": false,
|
||||||
|
"lsp": {
|
||||||
|
"clangd": {
|
||||||
|
"binary": {
|
||||||
|
"path": "/home/me/work/path-extra/clangd",
|
||||||
|
"arguments": [],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
// https://github.com/zed-extensions/nix/tree/main?tab=readme-ov-file
|
||||||
|
"nixd": {
|
||||||
|
"settings": {
|
||||||
|
// see https://github.com/nix-community/nixd/blob/main/nixd/docs/configuration.md
|
||||||
|
// for what configuration is possible
|
||||||
|
"formatting": {
|
||||||
|
//"command": [ "nixpkgs-fmt" ],
|
||||||
|
//"command": [ "alejandra" ],
|
||||||
|
"command": ["nixfmt"],
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"expr": "import <nixpkgs> { }",
|
||||||
|
},
|
||||||
|
"options": {
|
||||||
|
// If this is omitted, default search path (<nixpkgs>) will be used.
|
||||||
|
"nixos": {
|
||||||
|
// This name "nixos" could be arbitrary.
|
||||||
|
// The expression to eval, interpret it as option declarations.
|
||||||
|
"expr": "(builtins.getFlake \"/home/me/work/config\").nixosConfigurations._lsp_dummy.options",
|
||||||
|
},
|
||||||
|
|
||||||
|
// for home manager as nixos module we must get the suboptions
|
||||||
|
// https://discourse.nixos.org/t/nixd-home-manager-completion-and-standalone-home-manager-outputs/55610/2
|
||||||
|
"home-manager": {
|
||||||
|
// This name could be arbitrary.
|
||||||
|
"expr": "(builtins.getFlake \"/home/me/work/config\").nixosConfigurations._lsp_dummy.options.home-manager.users.type.getSubOptions []",
|
||||||
|
},
|
||||||
|
|
||||||
|
// By default there is no home-manager options completion, thus you can add this entry.
|
||||||
|
//"home-manager": {
|
||||||
|
// "expr": "(builtins.getFlake \"/home/melektron/goarnix\").homeConfigurations.\"lsp_dummy\".options"
|
||||||
|
//}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
54
zed/themes/tasks.json
Normal file
54
zed/themes/tasks.json
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
// Project tasks configuration. See https://zed.dev/docs/tasks for documentation.
|
||||||
|
//
|
||||||
|
// Example:
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"label": "Example task",
|
||||||
|
"command": "for i in {1..5}; do echo \"Hello $i/5\"; sleep 1; done",
|
||||||
|
//"args": [],
|
||||||
|
// Env overrides for the command, will be appended to the terminal's environment from the settings.
|
||||||
|
"env": { "foo": "bar" },
|
||||||
|
// Current working directory to spawn the command into, defaults to current project root.
|
||||||
|
//"cwd": "/path/to/working/directory",
|
||||||
|
// Whether to use a new terminal tab or reuse the existing one to spawn the process, defaults to `false`.
|
||||||
|
"use_new_terminal": false,
|
||||||
|
// Whether to allow multiple instances of the same task to be run, or rather wait for the existing ones to finish, defaults to `false`.
|
||||||
|
"allow_concurrent_runs": false,
|
||||||
|
// What to do with the terminal pane and tab, after the command was started:
|
||||||
|
// * `always` — always show the task's pane, and focus the corresponding tab in it (default)
|
||||||
|
// * `no_focus` — always show the task's pane, add the task's tab in it, but don't focus it
|
||||||
|
// * `never` — do not alter focus, but still add/reuse the task's tab in its pane
|
||||||
|
"reveal": "always",
|
||||||
|
// Where to place the task's terminal item after starting the task:
|
||||||
|
// * `dock` — in the terminal dock, "regular" terminal items' place (default)
|
||||||
|
// * `center` — in the central pane group, "main" editor area
|
||||||
|
"reveal_target": "dock",
|
||||||
|
// What to do with the terminal pane and tab, after the command had finished:
|
||||||
|
// * `never` — Do nothing when the command finishes (default)
|
||||||
|
// * `always` — always hide the terminal tab, hide the pane also if it was the last tab in it
|
||||||
|
// * `on_success` — hide the terminal tab on task success only, otherwise behaves similar to `always`
|
||||||
|
"hide": "never",
|
||||||
|
// Which shell to use when running a task inside the terminal.
|
||||||
|
// May take 3 values:
|
||||||
|
// 1. (default) Use the system's default terminal configuration in /etc/passwd
|
||||||
|
// "shell": "system"
|
||||||
|
// 2. A program:
|
||||||
|
// "shell": {
|
||||||
|
// "program": "sh"
|
||||||
|
// }
|
||||||
|
// 3. A program with arguments:
|
||||||
|
// "shell": {
|
||||||
|
// "with_arguments": {
|
||||||
|
// "program": "/bin/bash",
|
||||||
|
// "args": ["--login"]
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
"shell": "system",
|
||||||
|
// Whether to show the task line in the output of the spawned task, defaults to `true`.
|
||||||
|
"show_summary": true,
|
||||||
|
// Whether to show the command line in the output of the spawned task, defaults to `true`.
|
||||||
|
"show_command": true,
|
||||||
|
// Represents the tags for inline runnable indicators, or spawning multiple tasks at once.
|
||||||
|
// "tags": []
|
||||||
|
},
|
||||||
|
]
|
||||||
Reference in New Issue
Block a user