Skip to content

Commit

Permalink
➕ Add rustowl
Browse files Browse the repository at this point in the history
  • Loading branch information
turtton committed Feb 20, 2025
1 parent a7d744b commit 2b3ce26
Show file tree
Hide file tree
Showing 13 changed files with 507 additions and 384 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ jobs:
- noto-fonts-cjk-serif
- noto-fonts
- zen-browser
- rustowl
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v26
Expand Down
35 changes: 30 additions & 5 deletions _sources/generated.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,16 @@
"repo": "ghr",
"rev": "v0.4.4",
"sha256": "sha256-L9+rcdt+MGZSCOJyCE4t/TT6Fjtxvfr9LBJYyRrx208=",
"sparseCheckout": [],
"type": "github"
},
"version": "v0.4.4"
},
"hyprpanel-tokyonight": {
"cargoLocks": null,
"date": "2024-11-12",
"date": "2025-02-19",
"extract": {
"themes/tokyo_night.json": "./hyprpanel-tokyonight-e71a2dfe2dc0418d53841f0831ce7425d9f402e1/themes/tokyo_night.json"
"themes/tokyo_night.json": "./hyprpanel-tokyonight-3419315e658e67f8fb5e9f020b322e3387e2a239/themes/tokyo_night.json"
},
"name": "hyprpanel-tokyonight",
"passthru": null,
Expand All @@ -35,11 +36,12 @@
"name": null,
"owner": "Jas-SinghFSU",
"repo": "HyprPanel",
"rev": "e71a2dfe2dc0418d53841f0831ce7425d9f402e1",
"sha256": "sha256-Nuy9PsojpPgezPY6+mjkt1bp+PqKADcjT4iEwqygs3U=",
"rev": "3419315e658e67f8fb5e9f020b322e3387e2a239",
"sha256": "sha256-C9iN0eOwgHJz7/SETer/tD+SrIRLOomeRIBJmkgug4o=",
"sparseCheckout": [],
"type": "github"
},
"version": "e71a2dfe2dc0418d53841f0831ce7425d9f402e1"
"version": "3419315e658e67f8fb5e9f020b322e3387e2a239"
},
"jetbrains-dolphin": {
"cargoLocks": null,
Expand All @@ -57,6 +59,7 @@
"repo": "JetBrainsDolphinPlugin",
"rev": "1.4.2",
"sha256": "sha256-T8ueCqYIKDRo4Ds/o0dCeNjK3dD8fNT9oNEDfzqLg0Y=",
"sparseCheckout": [],
"type": "github"
},
"version": "1.4.2"
Expand All @@ -77,10 +80,32 @@
"repo": "jetbrains-nautilus",
"rev": "c79f6ab6504bd1f1a9d1068f284c24f3227f51c1",
"sha256": "sha256-f78dMegKVe2fed5I0ogiaG+s9DkSF13s59fhhTr5U5c=",
"sparseCheckout": [],
"type": "github"
},
"version": "c79f6ab6504bd1f1a9d1068f284c24f3227f51c1"
},
"rustowl": {
"cargoLocks": null,
"date": null,
"extract": null,
"name": "rustowl",
"passthru": null,
"pinned": false,
"src": {
"deepClone": false,
"fetchSubmodules": false,
"leaveDotGit": false,
"name": null,
"owner": "cordx56",
"repo": "rustowl",
"rev": "v0.1.3",
"sha256": "sha256-BSBg1ekytSs4D17tc2J36BRW21505uDksKTBm0Jpjms=",
"sparseCheckout": [],
"type": "github"
},
"version": "v0.1.3"
},
"wallpaper-springcity": {
"cargoLocks": null,
"date": null,
Expand Down
21 changes: 16 additions & 5 deletions _sources/generated.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@
};
hyprpanel-tokyonight = {
pname = "hyprpanel-tokyonight";
version = "e71a2dfe2dc0418d53841f0831ce7425d9f402e1";
version = "3419315e658e67f8fb5e9f020b322e3387e2a239";
src = fetchFromGitHub {
owner = "Jas-SinghFSU";
repo = "HyprPanel";
rev = "e71a2dfe2dc0418d53841f0831ce7425d9f402e1";
rev = "3419315e658e67f8fb5e9f020b322e3387e2a239";
fetchSubmodules = false;
sha256 = "sha256-Nuy9PsojpPgezPY6+mjkt1bp+PqKADcjT4iEwqygs3U=";
sha256 = "sha256-C9iN0eOwgHJz7/SETer/tD+SrIRLOomeRIBJmkgug4o=";
};
"themes/tokyo_night.json" = builtins.readFile ./hyprpanel-tokyonight-e71a2dfe2dc0418d53841f0831ce7425d9f402e1/themes/tokyo_night.json;
date = "2024-11-12";
"themes/tokyo_night.json" = builtins.readFile ./hyprpanel-tokyonight-3419315e658e67f8fb5e9f020b322e3387e2a239/themes/tokyo_night.json;
date = "2025-02-19";
};
jetbrains-dolphin = {
pname = "jetbrains-dolphin";
Expand All @@ -48,6 +48,17 @@
};
date = "2021-05-17";
};
rustowl = {
pname = "rustowl";
version = "v0.1.3";
src = fetchFromGitHub {
owner = "cordx56";
repo = "rustowl";
rev = "v0.1.3";
fetchSubmodules = false;
sha256 = "sha256-BSBg1ekytSs4D17tc2J36BRW21505uDksKTBm0Jpjms=";
};
};
wallpaper-springcity = {
pname = "wallpaper-springcity";
version = "Golden-hour-latest";
Expand Down

Large diffs are not rendered by default.

This file was deleted.

21 changes: 21 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 8 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -58,20 +58,25 @@
inputs.nixpkgs.follows = "nixpkgs";
};
zen-browser.url = "github:0xc000022070/zen-browser-flake";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs@{ nixpkgs, flake-utils, hyprland, hyprpanel, hyprpolkitagent, ... }: {
outputs = inputs@{ nixpkgs, flake-utils, hyprland, hyprpanel, hyprpolkitagent, rust-overlay, ... }: {
nixosConfigurations = (import ./hosts inputs).nixos;
homeConfigurations = (import ./hosts inputs).home-manager;
darwinConfigurations = (import ./hosts inputs).darwin;
} // flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; config.allowUnfree = true; };
overlays = pkgs.lib.attrsets.mergeAttrsList (map (overlay: overlay pkgs pkgs) (import ./overlay/d-linux.nix { inherit pkgs; }).nixpkgs.overlays);
pkgs = import nixpkgs { inherit system; config.allowUnfree = true; overlays = [ (import rust-overlay) ]; };
overlays = pkgs.lib.attrsets.mergeAttrsList (map (overlay: overlay pkgs pkgs) (import ./overlay/d-linux.nix { inherit pkgs inputs; }).nixpkgs.overlays);
in
with pkgs; {
formatter = nixpkgs-fmt;
packages = {
ghr = overlays.ghr;
rustowl = overlays.rustowl;
jetbrains-dolphin-qt5 = overlays.jetbrains-dolphin-qt5;
jetbrains-dolphin-qt6 = overlays.jetbrains-dolphin-qt6;
jetbrains-nautilus = overlays.jetbrains-nautilus;
Expand Down
17 changes: 2 additions & 15 deletions home-manager/cli/dev/cargo.nix
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
{ pkgs, ... }:
let
cargo-features-manager = with pkgs; rustPlatform.buildRustPackage rec {
pname = "cargo-features-manager";
version = "0.6.0";
src = fetchFromGitHub {
owner = "ToBinio";
repo = "cargo-features-manager";
rev = "v${version}";
hash = "sha256-34XYDeimYY4lx/IhjrFe8ZgrvnXb7+nSjyzIcOJZjLc=";
};
cargoHash = "sha256-Cf9n5whzwL1QzrNFIqOOz/JF+Uesn05JMbXDP0TZMCc=";
};
in
{
{ pkgs, ... }: {
home.packages = with pkgs; [
rustup
cargo-deny # dependency license checker
Expand All @@ -24,6 +10,7 @@ in
cargo-watch # auto-reload
# cargo-vet # crate security checker TODO: https://github.com/NixOS/nixpkgs/pull/370510
crate2nix
rustowl
];
# clang+mold could not resolve devEnv libraries defined in flake
# home.file.".cargo/config.toml".text = ''
Expand Down
2 changes: 2 additions & 0 deletions home-manager/gui/dev/idea/ideavimrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ source ~/.config/nvim/keybindings.vim
map Q gq

"" -- Map IDE actions to IdeaVim -- https://jb.gg/abva4t
map <leader>e <Action>(ActivateProjectToolWindow)
map <C-t> <Action>(Terminal)
"" Map \r to the Reformat Code action
"map \r <Action>(ReformatCode)

Expand Down
5 changes: 5 additions & 0 deletions nvfetcher.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
src.github_tag = "siketyan/ghr"
fetch.github = "siketyan/ghr"

# https://github.com/NixOS/nixpkgs/issues/383059
[rustowl]
src.github = "cordx56/rustowl"
fetch.github = "cordx56/rustowl"

[wallpaper-springcity]
src.github = "MrVivekRajan/Hypr-Dots"
fetch.url = "https://raw.githubusercontent.com/MrVivekRajan/Hypr-Dots/refs/heads/Type-2/Spring-City/.config/swww/wall.png"
Expand Down
4 changes: 3 additions & 1 deletion overlay/d-darwin.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Reference: https://github.com/colonelpanic8/dotfiles/blob/4e3e75c3e27372f3b7694fc3239bff6013d64ed9/nixos/overlay.nix
{ pkgs, ... }:
{ pkgs, inputs, ... }:
let
generated = pkgs.callPackage ../_sources/generated.nix { };
in
{
nixpkgs.overlays = [
inputs.rust-overlay.overlays.default
(import ./ghr.nix generated.ghr)
(import ./rustowl.nix generated.rustowl)
];
}
4 changes: 3 additions & 1 deletion overlay/d-linux.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Reference: https://github.com/colonelpanic8/dotfiles/blob/4e3e75c3e27372f3b7694fc3239bff6013d64ed9/nixos/overlay.nix
{ pkgs, ... }:
{ pkgs, inputs, ... }:
let
generated = pkgs.callPackage ../_sources/generated.nix { };
in
Expand All @@ -11,6 +11,8 @@ in
(import ./noto-fonts-cjk-sans.nix)
(import ./noto-fonts.nix)
(import ./ghr.nix generated.ghr)
inputs.rust-overlay.overlays.default
(import ./rustowl.nix generated.rustowl)
(import ./hyprpanel-tokyonight.nix generated.hyprpanel-tokyonight)
(import ./jetbrains-dolphin.nix generated.jetbrains-dolphin)
(import ./jetbrains-nautilus.nix generated.jetbrains-nautilus)
Expand Down
28 changes: 28 additions & 0 deletions overlay/rustowl.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
gen: self: prev:
# https://github.com/NixOS/nixpkgs/issues/383059
let
rust-toolchain = gen.src + "/rustowl/rust-toolchain.toml";
toolchain = self.rust-bin.fromRustupToolchainFile rust-toolchain;
nightlyRustPlatform = self.makeRustPlatform { cargo = toolchain; rustc = toolchain; };
in
{
rustowl = with self; nightlyRustPlatform.buildRustPackage rec {
inherit (gen) version;
pname = "cargo-owl";
name = gen.pname;

src = gen.src + "/rustowl";

cargoLock.lockFile = "${src}/Cargo.lock";
useFetchCargoVendor = true;

nativeBuildInputs = [ pkg-config ];
buildInputs = [ curl ];

meta = with lib; {
description = "A Rust library for parsing and manipulating OWL files.";
homepage = "https://github.com/cordx56/rustowl";
license = with licenses; [ mit ];
};
};
}

0 comments on commit 2b3ce26

Please sign in to comment.