revisions

This commit is contained in:
alsaiduq-lab 2025-10-07 00:52:19 -06:00
parent 005950d9ea
commit 08417f2299
21 changed files with 474 additions and 177 deletions

2
.gitignore vendored
View file

@ -2,7 +2,7 @@ backup/
.secrets .secrets
result result*
$HOME $HOME
.env .env

83
flake.lock generated
View file

@ -61,11 +61,11 @@
"zon2nix": "zon2nix" "zon2nix": "zon2nix"
}, },
"locked": { "locked": {
"lastModified": 1759677488, "lastModified": 1759784494,
"narHash": "sha256-fhRv6OdFLSfuiDDJpcfmmGRzy0fSSzOHbdMpuvwysTU=", "narHash": "sha256-iqoNDK6hwk+k+NdHabeImjogGaFpHOA5+TEWJDHoqVM=",
"owner": "ghostty-org", "owner": "ghostty-org",
"repo": "ghostty", "repo": "ghostty",
"rev": "fa3bc416ab08a7ab849ef878c01009c0710725b4", "rev": "3d1977ca4338fb217d1bc67567dd91dc7340f053",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -74,6 +74,25 @@
"type": "github" "type": "github"
} }
}, },
"grim-hyprland": {
"inputs": {
"nixpkgs": "nixpkgs_3",
"systems": "systems_2"
},
"locked": {
"lastModified": 1741705247,
"narHash": "sha256-4m2QFT8mY6CM3YSebMJhd/kJWaRxTYOS/nvAs2TaIQs=",
"owner": "eriedaberrie",
"repo": "grim-hyprland",
"rev": "4a3d6f5b87b01e92c404b9393b79057b85f58c60",
"type": "github"
},
"original": {
"owner": "eriedaberrie",
"repo": "grim-hyprland",
"type": "github"
}
},
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -97,7 +116,7 @@
}, },
"hu-tao-cursor": { "hu-tao-cursor": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_3" "nixpkgs": "nixpkgs_4"
}, },
"locked": { "locked": {
"lastModified": 1758768962, "lastModified": 1758768962,
@ -116,11 +135,11 @@
"hyprland-dots": { "hyprland-dots": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1759689455, "lastModified": 1759800466,
"narHash": "sha256-GsuG+Gbs3XMbmmkK1azoWF+ZUJ891OhRMy3S6Fv8qo0=", "narHash": "sha256-XtxsPQphUPG9W335/PK7vgfqLHZ0u0T6Ya7lfpSNq3s=",
"ref": "refs/heads/master", "ref": "refs/heads/master",
"rev": "3c8faf70c7b92a09399f6ab48bb7b06c47a7b833", "rev": "b9180ab4a3f94a5b10a774ade0a340b7d65d5a1b",
"revCount": 19, "revCount": 20,
"type": "git", "type": "git",
"url": "ssh://git@github.com/alsaiduq-lab/hyprland-dots" "url": "ssh://git@github.com/alsaiduq-lab/hyprland-dots"
}, },
@ -137,11 +156,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1759629535, "lastModified": 1759801625,
"narHash": "sha256-VIXcJ2ahRgoqIUySwAz3r5mtITO2dp6tXGCVKVW6FmA=", "narHash": "sha256-hf6YIe5E0RDTe76dJuJGWHdrJXOxOu07KeSo5K6XjqY=",
"owner": "fufexan", "owner": "fufexan",
"repo": "nix-gaming", "repo": "nix-gaming",
"rev": "df388c42b54714bd121796a9cec9322b7fa2894e", "rev": "789f074c93425294989766a75fb0efe27f78a171",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -192,6 +211,22 @@
} }
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": {
"lastModified": 1727802920,
"narHash": "sha256-HP89HZOT0ReIbI7IJZJQoJgxvB2Tn28V6XS3MNKnfLs=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "27e30d177e57d912d614c88c622dcfdb2e6e6515",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1758346548, "lastModified": 1758346548,
"narHash": "sha256-afXE7AJ7MY6wY1pg/Y6UPHNYPy5GtUKeBkrZZ/gC71E=", "narHash": "sha256-afXE7AJ7MY6wY1pg/Y6UPHNYPy5GtUKeBkrZZ/gC71E=",
@ -207,13 +242,13 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_4": { "nixpkgs_5": {
"locked": { "locked": {
"lastModified": 1759580034, "lastModified": 1759735786,
"narHash": "sha256-YWo57PL7mGZU7D4WeKFMiW4ex/O6ZolUS6UNBHTZfkI=", "narHash": "sha256-a0+h02lyP2KwSNrZz4wLJTu9ikujNsTWIC874Bv7IJ0=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "3bcc93c5f7a4b30335d31f21e2f1281cba68c318", "rev": "20c4598c84a671783f741e02bf05cbfaf4907cff",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -262,11 +297,12 @@
"root": { "root": {
"inputs": { "inputs": {
"ghostty": "ghostty", "ghostty": "ghostty",
"grim-hyprland": "grim-hyprland",
"home-manager": "home-manager", "home-manager": "home-manager",
"hu-tao-cursor": "hu-tao-cursor", "hu-tao-cursor": "hu-tao-cursor",
"hyprland-dots": "hyprland-dots", "hyprland-dots": "hyprland-dots",
"nix-gaming": "nix-gaming", "nix-gaming": "nix-gaming",
"nixpkgs": "nixpkgs_4", "nixpkgs": "nixpkgs_5",
"nvim-dots": "nvim-dots", "nvim-dots": "nvim-dots",
"quickshell": "quickshell", "quickshell": "quickshell",
"unstable": "unstable" "unstable": "unstable"
@ -287,6 +323,21 @@
"type": "github" "type": "github"
} }
}, },
"systems_2": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"type": "github"
}
},
"unstable": { "unstable": {
"locked": { "locked": {
"lastModified": 1759632233, "lastModified": 1759632233,

View file

@ -41,14 +41,23 @@
url = "github:ghostty-org/ghostty"; url = "github:ghostty-org/ghostty";
}; };
grim-hyprland = {
url = "github:eriedaberrie/grim-hyprland";
};
# TODO: sops-nix = { # TODO: sops-nix = {
# url = "github:Mic92/sops-nix"; # url = "github:Mic92/sops-nix";
# inputs.nixpkgs.follows = "nixpkgs"; # inputs.nixpkgs.follows = "nixpkgs";
# }; # };
# Hyprspace = { hyprland = {
# url = "github:rich/Hyprspace"; url = "github:hyprwm/Hyprland";
# }; };
hyprspace = {
url = "github:KZDKM/Hyprspace/7a3adf6";
inputs.hyprland.follows = "hyprland";
};
}; };
outputs = { outputs = {
@ -60,6 +69,7 @@
ghostty, ghostty,
hu-tao-cursor, hu-tao-cursor,
#sops-nix, #sops-nix,
hyprspace,
... ...
} @ inputs: let } @ inputs: let
system = "x86_64-linux"; system = "x86_64-linux";
@ -96,9 +106,13 @@
hostPlatform = system; hostPlatform = system;
overlays = [ overlays = [
(final: prev: { (final: prev: {
ollama = unstablePkgs.ollama; ollama = unstablePkgs.ollama-cuda;
rpcs3 = unstablePkgs.rpcs3; rpcs3 = unstablePkgs.rpcs3;
quickshell = unstable.legacyPackages.${system}.quickshell; quickshell = unstable.legacyPackages.${system}.quickshell;
ghostty = inputs.ghostty.packages.${system}.default;
hu-tao-animated-cursor = inputs.hu-tao-cursor.packages.${system}.default;
grim-hyprland = inputs.grim-hyprland.packages.${system}.default;
hyprspace = inputs.hyprspace.packages.${system}.default;
}) })
(final: prev: { (final: prev: {
inherit inherit
@ -114,8 +128,6 @@
clear-sans = prev.clear-sans.clear-sans; clear-sans = prev.clear-sans.clear-sans;
binary-font = prev.binary-font.binary-clock-font; binary-font = prev.binary-font.binary-clock-font;
}) })
(final: prev: {ghostty = inputs.ghostty.packages.${system}.default;})
(final: prev: {hu-tao-animated-cursor = inputs.hu-tao-cursor.packages.${system}.default;})
]; ];
}; };
} }

View file

@ -7,12 +7,12 @@
... ...
}: { }: {
imports = [ imports = [
../settings.nix
./init.nix ./init.nix
./modules/fish.nix ./modules/fish.nix
./modules/ghostty.nix ./modules/ghostty.nix
./modules/lazygit.nix ./modules/lazygit.nix
./modules/nvim.nix ./modules/nvim.nix
./modules/rofi.nix
./modules/starship.nix ./modules/starship.nix
./modules/zellij.nix ./modules/zellij.nix
./modules/ffmpeg.nix ./modules/ffmpeg.nix
@ -22,23 +22,24 @@
./modules/spotify.nix ./modules/spotify.nix
./modules/obs.nix ./modules/obs.nix
./modules/mpv.nix ./modules/mpv.nix
./modules/waybar.nix
./modules/ani-cli.nix ./modules/ani-cli.nix
./modules/quickshell.nix ./modules/quickshell.nix
# currently broken ./modules/hyprspace.nix
# ./modules/hyprspace.nix
./modules/cava.nix ./modules/cava.nix
./modules/matugen.nix ./modules/matugen.nix
./modules/rgb.nix ./modules/rgb.nix
./modules/anyrun.nix
]; ];
home.username = "cobray"; home.username = "${config.theme.user}";
home.homeDirectory = "/home/cobray"; home.homeDirectory = "/home/${config.theme.user}";
home.stateVersion = "24.11"; home.stateVersion = "24.11";
programs.home-manager.enable = true; programs.home-manager.enable = true;
home.enableNixpkgsReleaseCheck = false; home.enableNixpkgsReleaseCheck = false;
xdg.mime.enable = false; xdg.mime.enable = false;
# TODO: move these somewhere else; undecided
home.packages = with pkgs; [ home.packages = with pkgs; [
btop btop
nvtopPackages.full nvtopPackages.full

View file

@ -0,0 +1,286 @@
{
config,
pkgs,
...
}: {
programs.anyrun = {
enable = true;
config = {
x = {fraction = 0.5;};
y = {fraction = 0.3;};
width = {absolute = 600;};
height = {absolute = 0;};
hideIcons = false;
ignoreExclusiveZones = false;
layer = "overlay";
hidePluginInfo = false;
closeOnClick = true;
showResultsImmediately = false;
maxEntries = 8;
plugins = [
"${pkgs.anyrun}/lib/libapplications.so"
"${pkgs.anyrun}/lib/libdictionary.so"
"${pkgs.anyrun}/lib/libkidex.so"
"${pkgs.anyrun}/lib/librandr.so"
"${pkgs.anyrun}/lib/librink.so"
"${pkgs.anyrun}/lib/libshell.so"
"${pkgs.anyrun}/lib/libstdin.so"
"${pkgs.anyrun}/lib/libsymbols.so"
"${pkgs.anyrun}/lib/libtranslate.so"
"${pkgs.anyrun}/lib/libwebsearch.so"
];
};
extraCss = ''
* {
all: unset;
font-family: "Clear Sans", monospace;
font-size: 12px;
}
#window {
background: transparent;
}
#main {
background-color: rgba(30, 32, 48, 0.95);
border: 2px solid #82aaff;
border-radius: 16px;
padding: 8px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}
#entry {
background-color: transparent;
color: #c8d3f5;
padding: 12px 16px;
border-radius: 8px;
margin: 4px 0;
transition: all 0.2s ease;
}
#entry:selected {
background-color: #2f334d;
border-left: 3px solid #82aaff;
}
#entry:hover {
background-color: rgba(47, 51, 77, 0.5);
}
#entry #match {
color: #c8d3f5;
padding: 4px;
}
#entry #match:selected {
color: #82aaff;
font-weight: bold;
}
box#main entry {
color: #828bb8;
}
box#main entry:selected {
color: #86e1fc;
}
#plugin {
color: #86e1fc;
font-weight: bold;
padding: 8px 16px;
margin-top: 4px;
border-top: 1px solid rgba(130, 170, 255, 0.3);
}
#match-desc {
color: #828bb8;
font-size: 12px;
opacity: 0.8;
}
list#main {
padding: 8px;
}
scrollbar {
background-color: transparent;
}
scrollbar slider {
background-color: #2f334d;
border-radius: 8px;
min-width: 6px;
}
scrollbar slider:hover {
background-color: #82aaff;
}
image {
margin-right: 8px;
opacity: 0.9;
}
'';
extraConfigFiles = {
"websearch.ron".text = ''
Config(
prefix: "?",
engines: [Custom]
)
Custom(
name: "searxng",
url: "127.0.0.1:11212",
)
'';
"dictionary.ron".text = ''
Config(
prefix: "D ",
max_entries: 5,
)
'';
"translate.ron".text = ''
Config(
prefix: "T ",
language_delimiter: ">",
max_entries: 5,
)
'';
"symbols.ron".text = ''
Config(
prefix: "S ",
symbols: {
"alpha": "α",
"beta": "β",
"gamma": "γ",
"delta": "δ",
"epsilon": "ε",
"lambda": "λ",
"mu": "μ",
"pi": "π",
"sigma": "σ",
"omega": "ω",
"check": "",
"cross": "",
"star": "",
"heart": "",
"shrug": "¯\\_()_/¯",
"jhha": "",
"jhhe": "",
"jhwo": "",
"jhn": "",
"jhka": "",
"jhki": "",
"jhku": "",
"jhke": "",
"jhko": "",
"jhsa": "",
"jhshi": "",
"jhsu": "",
"jhse": "",
"jhso": "",
"jhta": "",
"jhchi": "",
"jhtsu": "",
"jhte": "",
"jhto": "",
"jhna": "",
"jhni": "",
"jhnu": "",
"jhne": "",
"jhno": "",
"jhma": "",
"jhmi": "",
"jhmu": "",
"jhme": "",
"jhmo": "",
"jhya": "",
"jhyu": "",
"jhyo": "",
"jhra": "",
"jhri": "",
"jhru": "",
"jhre": "",
"jhro": "",
"jhwa": "",
"jkha": "",
"jkhe": "",
"jkwo": "",
"jkn": "",
"jkka": "",
"jkki": "",
"jkku": "",
"jkku": "",
"jkko": "",
"jksa": "",
"jkshi": "",
"jksu": "",
"jkse": "",
"jkso": "",
"jkta": "",
"jkchi": "",
"jktsu": "",
"jkte": "",
"jkto": "",
"ichiK": "",
"niK": "",
"sanK": "",
"yonK": "",
"goK": "",
"rokuK": "",
"nanaK": "",
"hachi": "",
"kyuu": "",
"jyuu": "",
"hyaku": "",
"senK": "",
"manK": "",
"j~": "",
"j,": "",
"j.": "",
},
max_entries: 5,
)
'';
"shell.ron".text = ''
Config(
prefix: "SH ",
shell: Some("${config.theme.Shell}"),
)
'';
"randr.ron".text = ''
Config(
prefix: ":randr",
max_entries: 5,
)
'';
"applications.ron".text = ''
Config(
desktop_actions: false,
max_entries: 10,
terminal: Some("${config.theme.Terminal}"),
)
'';
# cant get this to work for some reason
#"nix-run.ron".text = ''
# Config(
# prefix: ":nr",
# allow_unfree: true,
# channel: "nixpkgs-unstable",
# max_entries: 5,
# )
#'';
};
};
}

View file

@ -5,5 +5,6 @@
retroarch retroarch
waydroid waydroid
rpcs3 rpcs3
input-remapper
]; ];
} }

View file

@ -1,5 +1,6 @@
{pkgs, ...}: { {pkgs, ...}: {
home.packages = [ home.packages = with pkgs; [
pkgs.ffmpeg ffmpeg
wf-recorder
]; ];
} }

View file

@ -7,5 +7,6 @@
fd fd
ugrep ugrep
yazi yazi
chafa
]; ];
} }

View file

@ -10,12 +10,13 @@
]; ];
programs.ghostty = { programs.ghostty = {
# TODO: figure another way to do this
enable = true; enable = true;
enableFishIntegration = true; enableFishIntegration = true;
settings = { settings = {
command = "${pkgs.fish}/bin/fish --login --interactive"; command = "${pkgs.fish}/bin/fish --login --interactive";
font-family = "0xProto Nerd Font"; font-family = "${config.theme.TerminalFont}";
font-size = 12; font-size = 12;
theme = "TokyoNight Storm"; theme = "TokyoNight Storm";
window-padding-x = 10; window-padding-x = 10;

View file

@ -1,5 +0,0 @@
{pkgs, ...}: {
home.packages = with pkgs; [
rofi
];
}

View file

@ -4,6 +4,7 @@
{...}: { {...}: {
imports = [ imports = [
# Include the results of the hardware scan. # Include the results of the hardware scan.
../settings.nix
./hardware-configuration.nix ./hardware-configuration.nix
./system-packages.nix ./system-packages.nix
]; ];

View file

@ -8,12 +8,20 @@
efi.canTouchEfiVariables = true; efi.canTouchEfiVariables = true;
timeout = 5; timeout = 5;
}; };
tmp = { tmp.cleanOnBoot = true;
cleanOnBoot = true;
};
kernelPackages = pkgs.linuxPackages; kernelPackages = pkgs.linuxPackages;
consoleLogLevel = 3;
initrd.verbose = false;
kernelParams = [
"quiet"
"splash"
"boot.shell_on_fail"
"udev.log_priority=3"
"rd.systemd.show_status=auto"
];
}; };
# some people really like putting #/bin/sh or #/bin/bash
system.activationScripts.binbash = { system.activationScripts.binbash = {
deps = []; deps = [];
text = '' text = ''

View file

@ -1,11 +1,8 @@
{pkgs, ...}: { {pkgs, ...}: {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
tree busybox # in case im missing something random
fd fd
jq jq
gawk
psmisc
unzip
wrk wrk
bitwarden bitwarden
hashcat hashcat
@ -27,7 +24,6 @@
argc argc
appimage-run appimage-run
clang clang
rsync
openssl openssl
]; ];
} }

View file

@ -1,7 +0,0 @@
{pkgs, ...}: {
environment.systemPackages = with pkgs; [
go
go-tools
gopls
];
}

View file

@ -28,14 +28,12 @@
hyprland.default = ["hyprland" "gtk"]; hyprland.default = ["hyprland" "gtk"];
}; };
}; };
systemd.user.services.xdg-desktop-portal-hyprland.unitConfig.ConditionPathExists = "%t/wayland-0";
security.polkit.enable = true; security.polkit.enable = true;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
qt5.qtwayland qt5.qtwayland
qt6.qtwayland qt6.qtwayland
polkit_gnome
candy-icons candy-icons
hu-tao-animated-cursor hu-tao-animated-cursor
tokyonight-gtk-theme tokyonight-gtk-theme
@ -46,12 +44,18 @@
wofi wofi
hyprshot hyprshot
hypridle hypridle
polkit_gnome hyprpolkitagent
grim grim-hyprland
slurp slurp
swappy swappy
satty
imv imv
syshud syshud
hyprpaper hyprpaper
hyprpicker
nwg-look
gsimplecal
hyprspace
kdePackages.xwaylandvideobridge
]; ];
} }

View file

@ -1,8 +0,0 @@
{pkgs, ...}: {
environment.systemPackages = with pkgs; [
jdk17
maven
gradle
visualvm
];
}

View file

@ -5,14 +5,24 @@
nix.settings = { nix.settings = {
auto-optimise-store = true; auto-optimise-store = true;
max-jobs = "auto";
cores = 0;
experimental-features = ["nix-command" "flakes"]; experimental-features = ["nix-command" "flakes"];
substituters = [ substituters = [
"https://cache.nixos.org" "https://cache.nixos.org"
"https://nix-gaming.cachix.org" "https://nix-gaming.cachix.org"
"https://anyrun.cachix.org"
"https://ghostty.cachix.org"
"https://hyprland.cachix.org"
"https://nix-community.cachix.org"
]; ];
trusted-public-keys = [ trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4=" "nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="
"anyrun.cachix.org-1:pqBobmOjI7nKlsUMV25u9QHa9btJK65/C8vnO3p346s="
"ghostty.cachix.org-1:QB389yTa6gTyneehvqG58y0WnHjQOqgnA+wBnpWWxns="
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
]; ];
}; };
} }

View file

@ -1,5 +1,9 @@
{ config, pkgs, lib, ... }:
{ {
config,
pkgs,
lib,
...
}: {
options.npm.enable = lib.mkEnableOption "npm setup"; options.npm.enable = lib.mkEnableOption "npm setup";
config = lib.mkIf config.npm.enable { config = lib.mkIf config.npm.enable {
@ -10,46 +14,5 @@
bun bun
nodePackages.typescript nodePackages.typescript
]; ];
systemd.user.services."npm-init" = {
wantedBy = [ "default.target" ];
serviceConfig.Type = "oneshot";
script = ''
set -eu
H="$HOME"
mkdir -p "$H/.npm-global/bin" "$H/.npm"
tmp="$(mktemp)"
cat > "$tmp" <<EOF
prefix=$H/.npm-global
cache=$H/.npm
init-module=$H/.npm-init.js
EOF
if [ ! -f "$H/.npmrc" ] || ! cmp -s "$tmp" "$H/.npmrc"; then
mv "$tmp" "$H/.npmrc"
chmod 600 "$H/.npmrc"
else
rm -f "$tmp"
fi
'';
};
environment.etc."profile.d/50-npm-global.sh".text = ''
case ":$PATH:" in
*:"$HOME/.npm-global/bin":*) ;;
*) if [ -d "$HOME/.npm-global/bin" ]; then
PATH="$HOME/.npm-global/bin:$PATH"
export PATH
fi ;;
esac
'';
environment.etc."fish/conf.d/50-npm-global.fish".text = ''
if test -d "$HOME/.npm-global/bin"
if not contains -- "$HOME/.npm-global/bin" $PATH
set -gx PATH "$HOME/.npm-global/bin" $PATH
end
end
'';
}; };
} }

View file

@ -1,6 +1,6 @@
{pkgs, ...}: { {pkgs, ...}: {
imports = [ imports = [
./settings.nix ../settings.nix
./cachix.nix ./cachix.nix
./modules/gtk.nix ./modules/gtk.nix
./modules/audio.nix ./modules/audio.nix
@ -22,8 +22,6 @@
./modules/ollama.nix ./modules/ollama.nix
./modules/cups.nix ./modules/cups.nix
./modules/rust.nix ./modules/rust.nix
./modules/java.nix
./modules/go.nix
./modules/core.nix ./modules/core.nix
./modules/libs.nix ./modules/libs.nix
./modules/rgb.nix ./modules/rgb.nix

View file

@ -45,17 +45,21 @@
libpng, libpng,
freetype, freetype,
fontconfig, fontconfig,
}: let systemd,
tag = "M130.0.6723.174"; pipewire,
gnome-settings-daemon,
}:
stdenvNoCC.mkDerivation rec {
pname = "thorium";
version = "130.0.6723.174"; version = "130.0.6723.174";
variant = "SSE3";
src = fetchurl { src = fetchurl {
url = "https://github.com/Alex313031/Thorium/releases/download/${tag}/thorium-browser_${version}_${variant}.deb"; url = "https://github.com/Alex313031/Thorium/releases/download/M${version}/thorium-browser_${version}_AVX2.deb";
sha256 = "sha256-sr8f4E329VrA1iHjF+72Db4pApTt9uDTzofr3Ak65Wo="; sha256 = "sha256-TeDwx7Bqy0NSaNBMuzCf4O+rgWjB/tmIvDgJQnGVSGY=";
}; };
libs = [ nativeBuildInputs = [autoPatchelfHook makeWrapper dpkg gnutar];
buildInputs = [
nss nss
nspr nspr
glib glib
@ -94,68 +98,49 @@
libpng libpng
freetype freetype
fontconfig fontconfig
systemd
pipewire
]; ];
in
stdenvNoCC.mkDerivation {
pname = "thorium";
inherit version src;
nativeBuildInputs = [autoPatchelfHook makeWrapper dpkg gnutar]; unpackPhase = ''
buildInputs = libs; ar x "$src"
tar --no-same-owner --no-same-permissions -xf data.tar.*
'';
unpackPhase = '' installPhase = ''
ar x "$src" runHook preInstall
tar --no-same-owner --no-same-permissions -xf data.tar.* mkdir -p $out/{opt/thorium,bin,share/{applications,icons}}
''; cp -r $(find opt -type d -name thorium | head -1)/* $out/opt/thorium/
rm -f $out/opt/thorium/libqt{5,6}_shim.so
ln -sf $out/opt/thorium/thorium $out/bin/thorium
ln -sf $out/bin/thorium $out/bin/thorium-browser
[ -f usr/share/applications/thorium*.desktop ] && sed -E \
-e "s|^Exec=.*|Exec=$out/bin/thorium %U|" \
-e "s|^Icon=.*|Icon=thorium|" \
usr/share/applications/thorium*.desktop > $out/share/applications/thorium.desktop
[ -d usr/share/icons ] && cp -r usr/share/icons/* $out/share/icons/
[ -d usr/share/pixmaps ] && cp -r usr/share/pixmaps/* $out/share/icons/
[ ! -d "$out/share/icons/hicolor" ] && mkdir -p $out/share/icons/hicolor/256x256/apps && \
find $out/opt/thorium -name "product_logo_*.png" -exec cp {} $out/share/icons/hicolor/256x256/apps/thorium.png \; -quit
runHook postInstall
'';
installPhase = '' postFixup = ''
runHook preInstall wrapProgram $out/bin/thorium \
mkdir -p $out/opt/thorium $out/bin $out/share/applications $out/share/icons --prefix PATH : ${lib.makeBinPath [xdg-utils gnome-settings-daemon]} \
--prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH:$out/share" \
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath buildInputs} \
--add-flags "--enable-features=VaapiVideoDecoder,VaapiVideoEncoder,UseOzonePlatform" \
--add-flags "--ozone-platform-hint=auto" \
--set-default CHROME_VERSION_EXTRA "Thorium AVX2"
'';
if [ -d opt/chromium.org/thorium ]; then meta = {
srcdir=opt/chromium.org/thorium description = "Thorium Browser (Chromium fork)";
else homepage = "https://github.com/Alex313031/Thorium";
srcdir=opt/thorium-browser license = lib.licenses.bsd3;
fi platforms = ["x86_64-linux"];
maintainers = ["Cobray"];
cp -r "$srcdir"/* $out/opt/thorium/ mainProgram = "thorium";
};
rm -f $out/opt/thorium/libqt5_shim.so $out/opt/thorium/libqt6_shim.so || true }
ln -sf $out/opt/thorium/thorium $out/bin/thorium
ln -sf $out/bin/thorium $out/bin/thorium-browser
desk_in=
for f in usr/share/applications/thorium-browser.desktop usr/share/applications/thorium.desktop; do
[ -f "$f" ] && desk_in="$f" && break
done
if [ -n "$desk_in" ]; then
mkdir -p $out/share/applications
sed -E \
-e "s|^Exec=.*|Exec=thorium %U|" \
-e "s|/opt/[^/]*/thorium|$out/bin/thorium|g" \
"$desk_in" > $out/share/applications/thorium.desktop
fi
if [ -d usr/share/icons ]; then
cp -r usr/share/icons/* $out/share/icons/ || true
fi
runHook postInstall
'';
postFixup = ''
wrapProgram $out/bin/thorium \
--prefix PATH : ${lib.makeBinPath [xdg-utils]} \
--set-default CHROME_VERSION_EXTRA "Thorium" \
--set LD_LIBRARY_PATH ${lib.makeLibraryPath libs}
'';
meta = with lib; {
description = "Thorium Browser (Chromium fork)";
homepage = "https://github.com/Alex313031/Thorium";
license = licenses.unfreeRedistributable;
platforms = ["x86_64-linux"];
mainProgram = "thorium";
maintainers = ["Cobray"];
};
}

View file

@ -20,12 +20,10 @@ with lib; {
}; };
gtkThemeMode = mkOption { gtkThemeMode = mkOption {
type = types.str; type = types.str;
# light or dark mode
default = "dark"; default = "dark";
}; };
qtTheme = mkOption { qtTheme = mkOption {
type = types.str; type = types.str;
# qt5 or 6 it seems
default = "qt6ct"; default = "qt6ct";
}; };
qtOverride = mkOption { qtOverride = mkOption {