refactor(repo): change a bunch of everything
This commit is contained in:
parent
81f367e3aa
commit
81bee82c34
26 changed files with 352 additions and 127 deletions
3
.editorconfig
Normal file
3
.editorconfig
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
[*.nix]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1 +1 @@
|
||||||
**/result
|
result
|
||||||
|
|
|
@ -1,50 +0,0 @@
|
||||||
From 34ef90c1f4eb33123f975b5a07497e794f5bc57a Mon Sep 17 00:00:00 2001
|
|
||||||
From: Artur Manuel <balkenix@outlook.com>
|
|
||||||
Date: Mon, 10 Feb 2025 03:18:21 +0000
|
|
||||||
Subject: [PATCH] feat(config): add --config flag
|
|
||||||
|
|
||||||
---
|
|
||||||
src/cmd_line.rs | 4 ++++
|
|
||||||
src/settings/config.rs | 11 ++++++++++-
|
|
||||||
2 files changed, 14 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/cmd_line.rs b/src/cmd_line.rs
|
|
||||||
index f2da7b5..7679383 100644
|
|
||||||
--- a/src/cmd_line.rs
|
|
||||||
+++ b/src/cmd_line.rs
|
|
||||||
@@ -53,6 +53,10 @@ pub struct CmdLineSettings {
|
|
||||||
#[arg(long, env = "NEOVIDE_WSL")]
|
|
||||||
pub wsl: bool,
|
|
||||||
|
|
||||||
+ /// Run Neovide with a config path
|
|
||||||
+ #[arg(long, env = "NEOVIDE_CONFIG")]
|
|
||||||
+ pub config: Option<String>,
|
|
||||||
+
|
|
||||||
/// Which window decorations to use (do note that the window might not be resizable
|
|
||||||
/// if this is "none")
|
|
||||||
#[arg(long, env = "NEOVIDE_FRAME", default_value_t)]
|
|
||||||
diff --git a/src/settings/config.rs b/src/settings/config.rs
|
|
||||||
index 705f046..166095f 100644
|
|
||||||
--- a/src/settings/config.rs
|
|
||||||
+++ b/src/settings/config.rs
|
|
||||||
@@ -28,7 +28,16 @@ fn neovide_config_dir() -> PathBuf {
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn config_path() -> PathBuf {
|
|
||||||
- let mut config_path = neovide_config_dir();
|
|
||||||
+ let mut config_path = match env::var("NEOVIDE_CONFIG") {
|
|
||||||
+ Ok(val) => PathBuf::from(val),
|
|
||||||
+ Err(e) => {
|
|
||||||
+ if e != env::VarError::NotPresent {
|
|
||||||
+ println!("Not a valid config path! Using default value.");
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ neovide_config_dir()
|
|
||||||
+ },
|
|
||||||
+ };
|
|
||||||
config_path.push(CONFIG_FILE);
|
|
||||||
config_path
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.47.2
|
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
{neovide}:
|
|
||||||
neovide.overrideAttrs (finalAttrs: {
|
|
||||||
patches = (finalAttrs.patches or []) ++ [
|
|
||||||
./0001-feat-config-add-config-flag.patch
|
|
||||||
];
|
|
||||||
})
|
|
6
flake.lock
generated
6
flake.lock
generated
|
@ -2,11 +2,11 @@
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1739020877,
|
"lastModified": 1739580444,
|
||||||
"narHash": "sha256-mIvECo/NNdJJ/bXjNqIh8yeoSjVLAuDuTUzAo7dzs8Y=",
|
"narHash": "sha256-+/bSz4EAVbqz8/HsIGLroF8aNaO8bLRL7WfACN+24g4=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "a79cfe0ebd24952b580b1cf08cd906354996d547",
|
"rev": "8bb37161a0488b89830168b81c48aed11569cb93",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
69
flake.nix
69
flake.nix
|
@ -5,7 +5,7 @@
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {
|
outputs = inputs @ {
|
||||||
self,
|
self,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
}: let
|
}: let
|
||||||
|
@ -14,49 +14,32 @@
|
||||||
f {
|
f {
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
});
|
});
|
||||||
in {
|
filterAttrs = f: attrs: let
|
||||||
overlays.default = final: prev: let
|
names = builtins.attrNames attrs;
|
||||||
packages = {
|
filtered = builtins.filter (n: f n attrs.${n}) names;
|
||||||
amadaluzian-neovide = prev.callPackage ./amadaluzian-neovide {};
|
|
||||||
amadaluzian-starship = prev.callPackage ./amadaluzian-starship {};
|
|
||||||
amadaluzian-xonsh = prev.callPackage ./amadaluzian-xonsh {inherit (packages) amadaluzian-starship;};
|
|
||||||
amadaluzian-nu = prev.callPackage ./amadaluzian-nu {inherit (packages) amadaluzian-starship;};
|
|
||||||
fairfax = prev.callPackage ./fairfax {};
|
|
||||||
river-bedload = prev.callPackage ./river-bedload {};
|
|
||||||
tela-circle-icon-theme = prev.callPackage ./tela-circle-icon-theme-patched {};
|
|
||||||
nicotine-plus-libadwaita = prev.symlinkJoin {
|
|
||||||
name = "nicotine";
|
|
||||||
paths = [prev.nicotine-plus];
|
|
||||||
nativeBuildInputs = [prev.makeWrapper];
|
|
||||||
postBuild = ''
|
|
||||||
wrapProgram $out/bin/nicotine \
|
|
||||||
--set-default NICOTINE_LIBADWAITA 1
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
colloid-icon-theme-git = prev.colloid-icon-theme.overrideAttrs (_finalAttrs: {
|
|
||||||
version = "master";
|
|
||||||
src = prev.fetchFromGitHub {
|
|
||||||
owner = "vinceliuice";
|
|
||||||
repo = "Colloid-icon-theme";
|
|
||||||
rev = "main";
|
|
||||||
hash = "sha256-x2SSaIkKm1415avO7R6TPkpghM30HmMdjMFUUyPWZsk=";
|
|
||||||
};
|
|
||||||
});
|
|
||||||
rose-pine-gtk-theme-git = prev.rose-pine-gtk-theme.overrideAttrs (_finalAttrs: {
|
|
||||||
version = "master";
|
|
||||||
src = prev.fetchFromGitHub {
|
|
||||||
owner = "rose-pine";
|
|
||||||
repo = "gtk";
|
|
||||||
tag = "master";
|
|
||||||
hash = "sha256-vCWs+TOVURl18EdbJr5QAHfB+JX9lYJ3TPO6IklKeFE=";
|
|
||||||
};
|
|
||||||
});
|
|
||||||
vesktop-electron32 = prev.vesktop.override {
|
|
||||||
electron = prev.electron_32;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
packages;
|
builtins.listToAttrs (
|
||||||
|
map (
|
||||||
|
name: {
|
||||||
|
inherit name;
|
||||||
|
value = attrs.${name};
|
||||||
|
}
|
||||||
|
)
|
||||||
|
filtered
|
||||||
|
);
|
||||||
|
in {
|
||||||
|
overlays.default = _: prev: (builtins.listToAttrs (
|
||||||
|
builtins.map (
|
||||||
|
name: {
|
||||||
|
inherit name;
|
||||||
|
value = prev.callPackage ./packages/${name} {inherit inputs;};
|
||||||
|
}
|
||||||
|
) (builtins.attrNames (
|
||||||
|
filterAttrs (
|
||||||
|
_: v: v == "directory"
|
||||||
|
) (builtins.readDir ./packages)
|
||||||
|
))
|
||||||
|
));
|
||||||
|
|
||||||
packages = eachSystem ({pkgs}: self.overlays.default pkgs pkgs);
|
packages = eachSystem ({pkgs}: self.overlays.default pkgs pkgs);
|
||||||
formatter = eachSystem ({pkgs}: pkgs.alejandra);
|
formatter = eachSystem ({pkgs}: pkgs.alejandra);
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
From 7973ea6a0e2e94a3b31a4c7b87834d49b7f195bb Mon Sep 17 00:00:00 2001
|
||||||
|
From: Artur Manuel <balkenix@outlook.com>
|
||||||
|
Date: Tue, 11 Feb 2025 16:42:07 +0000
|
||||||
|
Subject: [PATCH] feat(env): add NEOVIDE_CONFIG env var
|
||||||
|
|
||||||
|
---
|
||||||
|
src/settings/config.rs | 11 ++++++++---
|
||||||
|
1 file changed, 8 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/settings/config.rs b/src/settings/config.rs
|
||||||
|
index 705f046..bd8c764 100644
|
||||||
|
--- a/src/settings/config.rs
|
||||||
|
+++ b/src/settings/config.rs
|
||||||
|
@@ -28,9 +28,14 @@ fn neovide_config_dir() -> PathBuf {
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn config_path() -> PathBuf {
|
||||||
|
- let mut config_path = neovide_config_dir();
|
||||||
|
- config_path.push(CONFIG_FILE);
|
||||||
|
- config_path
|
||||||
|
+ env::var("NEOVIDE_CONFIG")
|
||||||
|
+ .ok()
|
||||||
|
+ .map(PathBuf::from)
|
||||||
|
+ .filter(|path| path.is_file() && path.exists())
|
||||||
|
+ .unwrap_or_else(|| {
|
||||||
|
+ eprintln!("Not a valid config path! Using XDG_CONFIG_HOME.");
|
||||||
|
+ neovide_config_dir().join("config.toml")
|
||||||
|
+ })
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Deserialize, Default, Clone)]
|
||||||
|
--
|
||||||
|
2.47.2
|
||||||
|
|
8
packages/amadaluzian-neovide/default.nix
Normal file
8
packages/amadaluzian-neovide/default.nix
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{neovide, ...}:
|
||||||
|
neovide.overrideAttrs (finalAttrs: {
|
||||||
|
patches =
|
||||||
|
(finalAttrs.patches or [])
|
||||||
|
++ [
|
||||||
|
./0001-feat-env-add-NEOVIDE_CONFIG-env-var.patch
|
||||||
|
];
|
||||||
|
})
|
|
@ -0,0 +1,147 @@
|
||||||
|
From fafce5e8cc92f11c476c1c8079f73cdd038acc54 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Artur Manuel <amad@atl.tools>
|
||||||
|
Date: Sun, 16 Feb 2025 03:31:46 +0000
|
||||||
|
Subject: [PATCH] ipc: _{90,180,270} => Normal{90,180,270}
|
||||||
|
|
||||||
|
---
|
||||||
|
niri-ipc/src/lib.rs | 6 +++---
|
||||||
|
src/dbus/mutter_display_config.rs | 12 ++++++------
|
||||||
|
src/ipc/client.rs | 6 +++---
|
||||||
|
src/protocols/output_management.rs | 6 +++---
|
||||||
|
src/render_helpers/clipped_surface.rs | 4 ++--
|
||||||
|
src/utils/mod.rs | 12 ++++++------
|
||||||
|
6 files changed, 23 insertions(+), 23 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/niri-ipc/src/lib.rs b/niri-ipc/src/lib.rs
|
||||||
|
index 3a585eb3..a6b90d25 100644
|
||||||
|
--- a/niri-ipc/src/lib.rs
|
||||||
|
+++ b/niri-ipc/src/lib.rs
|
||||||
|
@@ -903,13 +903,13 @@ pub enum Transform {
|
||||||
|
Normal,
|
||||||
|
/// Rotated by 90°.
|
||||||
|
#[serde(rename = "90")]
|
||||||
|
- _90,
|
||||||
|
+ Normal90,
|
||||||
|
/// Rotated by 180°.
|
||||||
|
#[serde(rename = "180")]
|
||||||
|
- _180,
|
||||||
|
+ Normal180,
|
||||||
|
/// Rotated by 270°.
|
||||||
|
#[serde(rename = "270")]
|
||||||
|
- _270,
|
||||||
|
+ Normal270,
|
||||||
|
/// Flipped horizontally.
|
||||||
|
Flipped,
|
||||||
|
/// Rotated by 90° and flipped horizontally.
|
||||||
|
diff --git a/src/dbus/mutter_display_config.rs b/src/dbus/mutter_display_config.rs
|
||||||
|
index b8ab08f9..dd553555 100644
|
||||||
|
--- a/src/dbus/mutter_display_config.rs
|
||||||
|
+++ b/src/dbus/mutter_display_config.rs
|
||||||
|
@@ -136,9 +136,9 @@ impl DisplayConfig {
|
||||||
|
if let Some(logical) = output.logical.as_ref() {
|
||||||
|
let transform = match logical.transform {
|
||||||
|
niri_ipc::Transform::Normal => 0,
|
||||||
|
- niri_ipc::Transform::_90 => 1,
|
||||||
|
- niri_ipc::Transform::_180 => 2,
|
||||||
|
- niri_ipc::Transform::_270 => 3,
|
||||||
|
+ niri_ipc::Transform::Normal90 => 1,
|
||||||
|
+ niri_ipc::Transform::Normal180 => 2,
|
||||||
|
+ niri_ipc::Transform::Normal270 => 3,
|
||||||
|
niri_ipc::Transform::Flipped => 4,
|
||||||
|
niri_ipc::Transform::Flipped90 => 5,
|
||||||
|
niri_ipc::Transform::Flipped180 => 6,
|
||||||
|
@@ -201,9 +201,9 @@ impl DisplayConfig {
|
||||||
|
scale: Some(niri_config::FloatOrInt(requested_config.scale)),
|
||||||
|
transform: match requested_config.transform {
|
||||||
|
0 => niri_ipc::Transform::Normal,
|
||||||
|
- 1 => niri_ipc::Transform::_90,
|
||||||
|
- 2 => niri_ipc::Transform::_180,
|
||||||
|
- 3 => niri_ipc::Transform::_270,
|
||||||
|
+ 1 => niri_ipc::Transform::Normal90,
|
||||||
|
+ 2 => niri_ipc::Transform::Normal180,
|
||||||
|
+ 3 => niri_ipc::Transform::Normal270,
|
||||||
|
4 => niri_ipc::Transform::Flipped,
|
||||||
|
5 => niri_ipc::Transform::Flipped90,
|
||||||
|
6 => niri_ipc::Transform::Flipped180,
|
||||||
|
diff --git a/src/ipc/client.rs b/src/ipc/client.rs
|
||||||
|
index 8682d8d3..db1b614a 100644
|
||||||
|
--- a/src/ipc/client.rs
|
||||||
|
+++ b/src/ipc/client.rs
|
||||||
|
@@ -466,9 +466,9 @@ fn print_output(output: Output) -> anyhow::Result<()> {
|
||||||
|
|
||||||
|
let transform = match transform {
|
||||||
|
Transform::Normal => "normal",
|
||||||
|
- Transform::_90 => "90° counter-clockwise",
|
||||||
|
- Transform::_180 => "180°",
|
||||||
|
- Transform::_270 => "270° counter-clockwise",
|
||||||
|
+ Transform::Normal90 => "90° counter-clockwise",
|
||||||
|
+ Transform::Normal180 => "180°",
|
||||||
|
+ Transform::Normal270 => "270° counter-clockwise",
|
||||||
|
Transform::Flipped => "flipped horizontally",
|
||||||
|
Transform::Flipped90 => "90° counter-clockwise, flipped horizontally",
|
||||||
|
Transform::Flipped180 => "flipped vertically",
|
||||||
|
diff --git a/src/protocols/output_management.rs b/src/protocols/output_management.rs
|
||||||
|
index 4f1ac8c0..411e9eb6 100644
|
||||||
|
--- a/src/protocols/output_management.rs
|
||||||
|
+++ b/src/protocols/output_management.rs
|
||||||
|
@@ -666,9 +666,9 @@ where
|
||||||
|
zwlr_output_configuration_head_v1::Request::SetTransform { transform } => {
|
||||||
|
let transform = match transform {
|
||||||
|
WEnum::Value(WlTransform::Normal) => Transform::Normal,
|
||||||
|
- WEnum::Value(WlTransform::_90) => Transform::_90,
|
||||||
|
- WEnum::Value(WlTransform::_180) => Transform::_180,
|
||||||
|
- WEnum::Value(WlTransform::_270) => Transform::_270,
|
||||||
|
+ WEnum::Value(WlTransform::_90) => Transform::Normal90,
|
||||||
|
+ WEnum::Value(WlTransform::_180) => Transform::Normal180,
|
||||||
|
+ WEnum::Value(WlTransform::_270) => Transform::Normal270,
|
||||||
|
WEnum::Value(WlTransform::Flipped) => Transform::Flipped,
|
||||||
|
WEnum::Value(WlTransform::Flipped90) => Transform::Flipped90,
|
||||||
|
WEnum::Value(WlTransform::Flipped180) => Transform::Flipped180,
|
||||||
|
diff --git a/src/render_helpers/clipped_surface.rs b/src/render_helpers/clipped_surface.rs
|
||||||
|
index f8d074e9..303b81b3 100644
|
||||||
|
--- a/src/render_helpers/clipped_surface.rs
|
||||||
|
+++ b/src/render_helpers/clipped_surface.rs
|
||||||
|
@@ -55,8 +55,8 @@ impl<R: NiriRenderer> ClippedSurfaceRenderElement<R> {
|
||||||
|
let transform = elem.transform();
|
||||||
|
// HACK: ??? for some reason flipped ones are fine.
|
||||||
|
let transform = match transform {
|
||||||
|
- Transform::_90 => Transform::_270,
|
||||||
|
- Transform::_270 => Transform::_90,
|
||||||
|
+ Transform::Normal90 => Transform::Normal270,
|
||||||
|
+ Transform::Normal270 => Transform::Normal90,
|
||||||
|
x => x,
|
||||||
|
};
|
||||||
|
let transform_matrix = Mat3::from_translation(Vec2::new(0.5, 0.5))
|
||||||
|
diff --git a/src/utils/mod.rs b/src/utils/mod.rs
|
||||||
|
index e43bad89..274e45ca 100644
|
||||||
|
--- a/src/utils/mod.rs
|
||||||
|
+++ b/src/utils/mod.rs
|
||||||
|
@@ -148,9 +148,9 @@ pub fn logical_output(output: &Output) -> niri_ipc::LogicalOutput {
|
||||||
|
let size = output_size(output);
|
||||||
|
let transform = match output.current_transform() {
|
||||||
|
Transform::Normal => niri_ipc::Transform::Normal,
|
||||||
|
- Transform::_90 => niri_ipc::Transform::_90,
|
||||||
|
- Transform::_180 => niri_ipc::Transform::_180,
|
||||||
|
- Transform::_270 => niri_ipc::Transform::_270,
|
||||||
|
+ Transform::Normal90 => niri_ipc::Transform::Normal90,
|
||||||
|
+ Transform::Normal180 => niri_ipc::Transform::Normal180,
|
||||||
|
+ Transform::Normal270 => niri_ipc::Transform::Normal270,
|
||||||
|
Transform::Flipped => niri_ipc::Transform::Flipped,
|
||||||
|
Transform::Flipped90 => niri_ipc::Transform::Flipped90,
|
||||||
|
Transform::Flipped180 => niri_ipc::Transform::Flipped180,
|
||||||
|
@@ -169,9 +169,9 @@ pub fn logical_output(output: &Output) -> niri_ipc::LogicalOutput {
|
||||||
|
pub fn ipc_transform_to_smithay(transform: niri_ipc::Transform) -> Transform {
|
||||||
|
match transform {
|
||||||
|
niri_ipc::Transform::Normal => Transform::Normal,
|
||||||
|
- niri_ipc::Transform::_90 => Transform::_90,
|
||||||
|
- niri_ipc::Transform::_180 => Transform::_180,
|
||||||
|
- niri_ipc::Transform::_270 => Transform::_270,
|
||||||
|
+ niri_ipc::Transform::Normal90 => Transform::Normal90,
|
||||||
|
+ niri_ipc::Transform::Normal180 => Transform::Normal180,
|
||||||
|
+ niri_ipc::Transform::Normal270 => Transform::Normal270,
|
||||||
|
niri_ipc::Transform::Flipped => Transform::Flipped,
|
||||||
|
niri_ipc::Transform::Flipped90 => Transform::Flipped90,
|
||||||
|
niri_ipc::Transform::Flipped180 => Transform::Flipped180,
|
||||||
|
--
|
||||||
|
2.47.2
|
||||||
|
|
19
packages/amadaluzian-niri/default.nix
Normal file
19
packages/amadaluzian-niri/default.nix
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
{
|
||||||
|
niri,
|
||||||
|
fetchFromGitHub,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
niri.overrideAttrs (finalAttrs: {
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "YaLTeR";
|
||||||
|
repo = "niri";
|
||||||
|
rev = "master";
|
||||||
|
hash = "sha256-BVTlrmelSAq+rlxwlRvsyZxHrmcviRu3aHJYG37Yq8c=";
|
||||||
|
};
|
||||||
|
patches =
|
||||||
|
(finalAttrs.patches or [])
|
||||||
|
++ [
|
||||||
|
./0001-ipc-_-90-180-270-Normal-90-180-270.patch
|
||||||
|
];
|
||||||
|
cargoHash = "";
|
||||||
|
})
|
|
@ -0,0 +1,42 @@
|
||||||
|
From 8c96feb6397d4a5756dbeab1aedb7d2266c9218f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Artur Manuel <balkenix@outlook.com>
|
||||||
|
Date: Tue, 11 Feb 2025 23:22:35 +0000
|
||||||
|
Subject: [PATCH] feat(config): add NUSHELL_CONFIG_DIR env var
|
||||||
|
|
||||||
|
---
|
||||||
|
crates/nu-path/src/helpers.rs | 14 ++++++++++----
|
||||||
|
1 file changed, 10 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/crates/nu-path/src/helpers.rs b/crates/nu-path/src/helpers.rs
|
||||||
|
index 931b3f9d0..cd3c07d95 100644
|
||||||
|
--- a/crates/nu-path/src/helpers.rs
|
||||||
|
+++ b/crates/nu-path/src/helpers.rs
|
||||||
|
@@ -1,4 +1,5 @@
|
||||||
|
use std::path::PathBuf;
|
||||||
|
+use std::env;
|
||||||
|
|
||||||
|
use crate::AbsolutePathBuf;
|
||||||
|
|
||||||
|
@@ -18,10 +19,15 @@ pub fn cache_dir() -> Option<AbsolutePathBuf> {
|
||||||
|
|
||||||
|
/// Return the nushell config directory.
|
||||||
|
pub fn nu_config_dir() -> Option<AbsolutePathBuf> {
|
||||||
|
- configurable_dir_path("XDG_CONFIG_HOME", dirs::config_dir).map(|mut p| {
|
||||||
|
- p.push("nushell");
|
||||||
|
- p
|
||||||
|
- })
|
||||||
|
+ let NUSHELL_CONFIG_DIR: Result<String, env::VarError> = env::var("NUSHELL_CONFIG_DIR");
|
||||||
|
+
|
||||||
|
+ match NUSHELL_CONFIG_DIR {
|
||||||
|
+ Ok(val) => Some(AbsolutePathBuf::try_from(val).unwrap()),
|
||||||
|
+ Err(_) => configurable_dir_path("XDG_CONFIG_HOME", dirs::config_dir).map(|mut p| {
|
||||||
|
+ p.push("nushell");
|
||||||
|
+ p
|
||||||
|
+ })
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
fn configurable_dir_path(
|
||||||
|
--
|
||||||
|
2.47.2
|
||||||
|
|
|
@ -1,16 +1,17 @@
|
||||||
{
|
{
|
||||||
symlinkJoin,
|
symlinkJoin,
|
||||||
nushell,
|
nushell,
|
||||||
amadaluzian-starship,
|
|
||||||
zoxide,
|
zoxide,
|
||||||
makeWrapper,
|
makeWrapper,
|
||||||
|
system,
|
||||||
|
inputs,
|
||||||
}:
|
}:
|
||||||
symlinkJoin {
|
symlinkJoin {
|
||||||
name = "nu";
|
name = "nu";
|
||||||
|
|
||||||
paths = [
|
paths = [
|
||||||
nushell
|
nushell
|
||||||
amadaluzian-starship
|
inputs.self.packages.${system}.amadaluzian-starship
|
||||||
zoxide
|
zoxide
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -28,10 +29,10 @@ symlinkJoin {
|
||||||
|
|
||||||
postBuild = ''
|
postBuild = ''
|
||||||
wrapProgram $out/bin/nu \
|
wrapProgram $out/bin/nu \
|
||||||
--set NU_CONFIG_DIR "${./cfg}" \
|
--set NUSHELL_CONFIG_DIR "${./cfg}" \
|
||||||
--add-flags '--env-config' \
|
--add-flags "--env-config" \
|
||||||
--add-flags '$NU_CONFIG_DIR/env.nu' \
|
--add-flags "${./cfg/env.nu}" \
|
||||||
--add-flags '--config' \
|
--add-flags "--config" \
|
||||||
--add-flags '$NU_CONFIG_DIR/config.nu' \
|
--add-flags "${./cfg/config.nu}" \
|
||||||
'';
|
'';
|
||||||
}
|
}
|
|
@ -3,6 +3,7 @@
|
||||||
starship,
|
starship,
|
||||||
makeWrapper,
|
makeWrapper,
|
||||||
writers,
|
writers,
|
||||||
|
...
|
||||||
}: let
|
}: let
|
||||||
config = writers.writeTOML "starship.toml" {
|
config = writers.writeTOML "starship.toml" {
|
||||||
aws = {symbol = "aws ";};
|
aws = {symbol = "aws ";};
|
|
@ -3,24 +3,14 @@
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
symlinkJoin,
|
symlinkJoin,
|
||||||
python3,
|
python3,
|
||||||
amadaluzian-starship,
|
inputs,
|
||||||
|
system,
|
||||||
zoxide,
|
zoxide,
|
||||||
}: let
|
}: let
|
||||||
xonsh =
|
xonsh =
|
||||||
(python3.override {
|
python3
|
||||||
packageOverrides = pyprev: _pyfinal: {
|
|
||||||
custom-xonsh = pyprev.xonsh.overrideAttrs (finalAttrs: {
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "xonsh";
|
|
||||||
repo = finalAttrs.pname;
|
|
||||||
rev = "0292b43e64c72ef16a75128d6346ce7d3b316d66";
|
|
||||||
hash = "sha256-kCtn8ujD0UahOLxtV9DD81awOYl6xirgnBoW/ywZxs0=";
|
|
||||||
};
|
|
||||||
});
|
|
||||||
};
|
|
||||||
})
|
|
||||||
.withPackages (ps: [
|
.withPackages (ps: [
|
||||||
ps.custom-xonsh
|
ps.xonsh
|
||||||
(let
|
(let
|
||||||
pname = "xontrib-fish-completer";
|
pname = "xontrib-fish-completer";
|
||||||
version = "0.0.1";
|
version = "0.0.1";
|
||||||
|
@ -59,7 +49,7 @@
|
||||||
ps.wheel
|
ps.wheel
|
||||||
];
|
];
|
||||||
dependencies = [
|
dependencies = [
|
||||||
ps.custom-xonsh
|
ps.xonsh
|
||||||
];
|
];
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "amadaluzia";
|
owner = "amadaluzia";
|
||||||
|
@ -88,7 +78,7 @@ in
|
||||||
|
|
||||||
paths = [
|
paths = [
|
||||||
xonsh
|
xonsh
|
||||||
amadaluzian-starship
|
inputs.self.packages.${system}.amadaluzian-starship
|
||||||
zoxide
|
zoxide
|
||||||
];
|
];
|
||||||
|
|
14
packages/colloid-icon-theme-git/default.nix
Normal file
14
packages/colloid-icon-theme-git/default.nix
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
colloid-icon-theme,
|
||||||
|
fetchFromGitHub,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
colloid-icon-theme.overrideAttrs (_finalAttrs: {
|
||||||
|
version = "master";
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "vinceliuice";
|
||||||
|
repo = "Colloid-icon-theme";
|
||||||
|
rev = "main";
|
||||||
|
hash = "sha256-x2SSaIkKm1415avO7R6TPkpghM30HmMdjMFUUyPWZsk=";
|
||||||
|
};
|
||||||
|
})
|
|
@ -2,6 +2,7 @@
|
||||||
stdenvNoCC,
|
stdenvNoCC,
|
||||||
fetchzip,
|
fetchzip,
|
||||||
lib,
|
lib,
|
||||||
|
...
|
||||||
}:
|
}:
|
||||||
stdenvNoCC.mkDerivation {
|
stdenvNoCC.mkDerivation {
|
||||||
pname = "fairfax";
|
pname = "fairfax";
|
15
packages/nicotine-plus-libadwaita/default.nix
Normal file
15
packages/nicotine-plus-libadwaita/default.nix
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{
|
||||||
|
symlinkJoin,
|
||||||
|
nicotine-plus,
|
||||||
|
makeWrapper,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
symlinkJoin {
|
||||||
|
name = "nicotine";
|
||||||
|
paths = [nicotine-plus];
|
||||||
|
nativeBuildInputs = [makeWrapper];
|
||||||
|
postBuild = ''
|
||||||
|
wrapProgram $out/bin/nicotine \
|
||||||
|
--set-default NICOTINE_LIBADWAITA 1
|
||||||
|
'';
|
||||||
|
}
|
|
@ -7,6 +7,7 @@
|
||||||
wayland-protocols,
|
wayland-protocols,
|
||||||
wayland,
|
wayland,
|
||||||
pkg-config,
|
pkg-config,
|
||||||
|
...
|
||||||
}:
|
}:
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "river-bedload";
|
pname = "river-bedload";
|
14
packages/rose-pine-gtk-theme-git/default.nix
Normal file
14
packages/rose-pine-gtk-theme-git/default.nix
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
rose-pine-gtk-theme,
|
||||||
|
fetchFromGitHub,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
rose-pine-gtk-theme.overrideAttrs (_finalAttrs: {
|
||||||
|
version = "master";
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "rose-pine";
|
||||||
|
repo = "gtk";
|
||||||
|
tag = "master";
|
||||||
|
hash = "sha256-vCWs+TOVURl18EdbJr5QAHfB+JX9lYJ3TPO6IklKeFE=";
|
||||||
|
};
|
||||||
|
})
|
|
@ -1,4 +1,4 @@
|
||||||
{tela-circle-icon-theme}:
|
{tela-circle-icon-theme, ...}:
|
||||||
tela-circle-icon-theme.overrideAttrs (finalAttrs: {
|
tela-circle-icon-theme.overrideAttrs (finalAttrs: {
|
||||||
patches =
|
patches =
|
||||||
(finalAttrs.patches or [])
|
(finalAttrs.patches or [])
|
8
packages/vesktop-electron32/default.nix
Normal file
8
packages/vesktop-electron32/default.nix
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
vesktop,
|
||||||
|
electron_32,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
vesktop.override {
|
||||||
|
electron = electron_32;
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue