Skip to content

Commit

Permalink
[chore]: updates
Browse files Browse the repository at this point in the history
  • Loading branch information
rxyhn committed Dec 30, 2023
1 parent 015827d commit eb2c9e3
Show file tree
Hide file tree
Showing 12 changed files with 188 additions and 44 deletions.
34 changes: 25 additions & 9 deletions flake.lock

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

14 changes: 4 additions & 10 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions";
nur.url = "github:nix-community/NUR";
lanzaboote.url = "github:nix-community/lanzaboote";

flake-parts = {
url = "github:hercules-ci/flake-parts";
Expand Down Expand Up @@ -35,21 +37,13 @@
inputs.nixpkgs.follows = "nixpkgs";
};

hyprland = {
url = "github:hyprwm/Hyprland/";
inputs.nixpkgs.follows = "nixpkgs";
};

hyprland.url = "github:hyprwm/Hyprland";
hyprpaper.url = "github:hyprwm/hyprpaper";
hyprland-contrib = {
url = "github:hyprwm/contrib";
inputs.nixpkgs.follows = "nixpkgs";
};

hyprpaper = {
url = "github:hyprwm/hyprpaper";
inputs.nixpkgs.follows = "nixpkgs";
};

hyprpicker = {
url = "github:hyprwm/hyprpicker";
inputs.nixpkgs.follows = "nixpkgs";
Expand Down
2 changes: 1 addition & 1 deletion home/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{self, ...}: {
{
home = {
username = "rxyhn";
homeDirectory = "/home/rxyhn";
Expand Down
25 changes: 25 additions & 0 deletions home/modules/programs/firefox.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
config,
pkgs,
inputs,
...
}: let
firefox-gnome-theme = inputs.self.packages.${pkgs.system}.firefox-gnome-theme;
in {
programs.firefox = {
enable = true;
profiles = {
rxyhn = {
userChrome = ''
@import "${firefox-gnome-theme}/share/firefox-gnome-theme/userChrome.css";
'';

userContent = ''
@import "${firefox-gnome-theme}/share/firefox-gnome-theme/userContent.css";
'';

extraConfig = builtins.readFile "${firefox-gnome-theme}/share/firefox-gnome-theme/configuration/user.js";
};
};
};
}
43 changes: 43 additions & 0 deletions home/modules/programs/xdg.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
config,
pkgs,
...
}: let
browser = ["firefox"];
associations = {
"text/html" = browser;
"x-scheme-handler/http" = browser;
"x-scheme-handler/https" = browser;
"x-scheme-handler/ftp" = browser;
"x-scheme-handler/about" = browser;
"x-scheme-handler/unknown" = browser;
"application/x-extension-htm" = browser;
"application/x-extension-html" = browser;
"application/x-extension-shtml" = browser;
"application/xhtml+xml" = browser;
"application/x-extension-xhtml" = browser;
"application/x-extension-xht" = browser;

"audio/*" = ["mpv.desktop"];
"video/*" = ["mpv.dekstop"];
"image/*" = ["imv.desktop"];
"application/json" = browser;
"application/pdf" = ["org.pwmt.zathura.desktop.desktop"];
"x-scheme-handler/tg" = ["telegramdesktop.desktop"];
};
in {
xdg = {
enable = true;

mimeApps = {
enable = true;
associations.added = associations;
defaultApplications = associations;
};

userDirs = {
enable = true;
createDirectories = true;
};
};
}
1 change: 1 addition & 0 deletions home/modules/shell/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
./starship.nix
./zsh.nix
../programs/git.nix
../programs/xdg.nix
];

home = {
Expand Down
55 changes: 40 additions & 15 deletions home/modules/windowManager/hyprland/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,48 @@
pkgs,
...
}: {
imports = [./config];

home.packages = with pkgs; [
inputs.hyprland-contrib.packages.${pkgs.system}.grimblast
libnotify
wf-recorder
brightnessctl
pamixer
slurp
grim
hyprpicker
swappy
grimblast
wl-clipboard
cliphist
imports = [
./config
../../programs/gtk.nix
];

home = {
packages = with pkgs; [
inputs.hyprland-contrib.packages.${pkgs.system}.grimblast
libnotify
wf-recorder
brightnessctl
pamixer
slurp
grim
hyprpicker
swappy
grimblast
wl-clipboard
wl-screenrec
cliphist
wlr-randr
];

sessionVariables = {
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
QT_QPA_PLATFORM = "wayland;xcb";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
SDL_VIDEODRIVER = "wayland";
CLUTTER_BACKEND = "wayland";
GDK_BACKEND = "wayland,x11";
XDG_SESSION_TYPE = "wayland";
MOZ_ENABLE_WAYLAND = "1";
};
};

systemd.user.targets.tray = {
Unit = {
Description = "Home Manager System Tray";
Requires = ["graphical-session-pre.target"];
};
};

wayland.windowManager.hyprland = {
enable = true;
package = inputs.hyprland.packages.${pkgs.system}.default;
Expand Down
2 changes: 1 addition & 1 deletion home/profiles/hiru/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
imports = [
../../modules/programs/gtk.nix
../../modules/programs/firefox.nix
../../modules/programs/kitty.nix
../../modules/programs/vscode.nix

Expand Down
20 changes: 14 additions & 6 deletions hosts/yuki/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,20 @@ in {
};
};

environment.systemPackages = with pkgs; [
acpi
vulkan-loader
vulkan-validation-layers
vulkan-tools
];
environment = {
systemPackages = with pkgs; [
acpi
vulkan-loader
vulkan-validation-layers
vulkan-tools
];

variables = {
_JAVA_AWT_WM_NONEREPARENTING = "1";
WLR_NO_HARDWARE_CURSORS = "1";
GDK_SCALE = "2";
};
};

hardware = {
enableAllFirmware = true;
Expand Down
2 changes: 1 addition & 1 deletion modules/nix.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
config,
pkgs,
self,
inputs,
lib,
...
Expand Down Expand Up @@ -64,6 +63,7 @@

overlays = [
inputs.nixpkgs-wayland.overlay
inputs.nur.overlay
];
};
};
Expand Down
3 changes: 2 additions & 1 deletion pkgs/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{default, ...}: {
{
systems = ["x86_64-linux"];

perSystem = {
Expand All @@ -7,6 +7,7 @@
...
}: {
packages = {
firefox-gnome-theme = pkgs.callPackage ./firefox-gnome-theme {};
};
};
}
31 changes: 31 additions & 0 deletions pkgs/firefox-gnome-theme/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
lib,
stdenv,
fetchFromGitHub,
}:
stdenv.mkDerivation rec {
pname = "firefox-gnome-theme";
version = "108.1";

src = fetchFromGitHub {
repo = pname;
owner = "rafaelmardojai";
rev = "v${version}";
sha256 = "sha256-1nGpcIG2OLwVi9Y93rJGZXCjJM9mSHHta+6WeqEjZng=";
};

dontConfigure = true;
dontBuild = true;
doCheck = false;

installPhase = ''
mkdir -p $out/share/firefox-gnome-theme
cp -r $src/* $out/share/firefox-gnome-theme
'';

meta = with lib; {
description = "A GNOME theme for Firefox";
homepage = "https://github.com/rafaelmardojai/firefox-gnome-theme";
license = licenses.unlicense;
};
}

0 comments on commit eb2c9e3

Please sign in to comment.