Compare commits
3 commits
5e9fa217f2
...
cadab2f9aa
Author | SHA1 | Date | |
---|---|---|---|
Alexandre Cavalheiro | cadab2f9aa | ||
Alexandre Cavalheiro | cc8717c4ae | ||
Alexandre Cavalheiro | f75542ade9 |
58
flake.lock
58
flake.lock
|
@ -56,11 +56,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1726785354,
|
||||
"narHash": "sha256-SLorVhoorZwjM1aS04bBX4fufEXIfkMdAGkj9bu2QAQ=",
|
||||
"lastModified": 1726902823,
|
||||
"narHash": "sha256-Gkc7pwTVLKj4HSvRt8tXNvosl8RS9hrBAEhOjAE0Tt4=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "1786e2afdbc48e9038f7cff585069736e1d0ed44",
|
||||
"rev": "14929f7089268481d86b83ed31ffd88713dcd415",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -110,11 +110,11 @@
|
|||
"xdph": "xdph"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1726761214,
|
||||
"narHash": "sha256-xaecVNHaxiAXDCUFZzDLMP3jbxpBjQTqT4Bku2z5vGA=",
|
||||
"lastModified": 1726918033,
|
||||
"narHash": "sha256-I0U4OLssUlNd6/KXHwErmgmYZURTJYJNHbeoKaMH4iI=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "9856378384539e35cd943604e6a4d696a9d25447",
|
||||
"revCount": 5240,
|
||||
"rev": "8579066c7a1ceb745499ea4e11d5d420b1387ec0",
|
||||
"revCount": 5246,
|
||||
"submodules": true,
|
||||
"type": "git",
|
||||
"url": "https://github.com/hyprwm/Hyprland"
|
||||
|
@ -193,11 +193,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1724966483,
|
||||
"narHash": "sha256-WXDgKIbzjYKczxSZOsJplCS1i1yrTUpsDPuJV/xpYLo=",
|
||||
"lastModified": 1726874949,
|
||||
"narHash": "sha256-PNnIpwGqpTvMU3N2r0wMQwK1E+t4Bb5fbJwblQvr+80=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprutils",
|
||||
"rev": "8976e3f6a5357da953a09511d0c7f6a890fb6ec2",
|
||||
"rev": "d97af4f6bd068c03a518b597675e598f57ea2291",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -218,11 +218,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1721324119,
|
||||
"narHash": "sha256-SOOqIT27/X792+vsLSeFdrNTF+OSRp5qXv6Te+fb2Qg=",
|
||||
"lastModified": 1726840673,
|
||||
"narHash": "sha256-HIPEXyRRVZoqD6U+lFS1B0tsIU7p83FaB9m7KT/x6mQ=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprwayland-scanner",
|
||||
"rev": "a048a6cb015340bd82f97c1f40a4b595ca85cc30",
|
||||
"rev": "b68dab23fc922eae99306988133ee80a40b39ca5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -233,11 +233,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1725983898,
|
||||
"narHash": "sha256-4b3A9zPpxAxLnkF9MawJNHDtOOl6ruL0r6Og1TEDGCE=",
|
||||
"lastModified": 1726755586,
|
||||
"narHash": "sha256-PmUr/2GQGvFTIJ6/Tvsins7Q43KTMvMFhvG6oaYK+Wk=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "1355a0cbfeac61d785b7183c0caaec1f97361b43",
|
||||
"rev": "c04d5652cfa9742b1d519688f65d1bbccea9eb7e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -249,11 +249,11 @@
|
|||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1726463316,
|
||||
"narHash": "sha256-gI9kkaH0ZjakJOKrdjaI/VbaMEo9qBbSUl93DnU7f4c=",
|
||||
"lastModified": 1726755586,
|
||||
"narHash": "sha256-PmUr/2GQGvFTIJ6/Tvsins7Q43KTMvMFhvG6oaYK+Wk=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "99dc8785f6a0adac95f5e2ab05cc2e1bf666d172",
|
||||
"rev": "c04d5652cfa9742b1d519688f65d1bbccea9eb7e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -279,11 +279,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1726719408,
|
||||
"narHash": "sha256-r/dXHHa6py/fKy087nGt4k3GoBjqFvpyZCsyRsXl0IA=",
|
||||
"lastModified": 1726892163,
|
||||
"narHash": "sha256-LZkatWOJcdJ1FvhWNFl54r8aDcnIfeZC5MLtzN15vMc=",
|
||||
"owner": "Gerg-L",
|
||||
"repo": "spicetify-nix",
|
||||
"rev": "49bb2ac8bdca209d235feabb9551dd09a5eb8ec9",
|
||||
"rev": "426f126ac7014ba7076ddcbf2fafa87c2962d908",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -314,6 +314,14 @@
|
|||
"hyprland",
|
||||
"hyprlang"
|
||||
],
|
||||
"hyprutils": [
|
||||
"hyprland",
|
||||
"hyprutils"
|
||||
],
|
||||
"hyprwayland-scanner": [
|
||||
"hyprland",
|
||||
"hyprwayland-scanner"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"hyprland",
|
||||
"nixpkgs"
|
||||
|
@ -324,11 +332,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1726046979,
|
||||
"narHash": "sha256-6SEsjurq9cdTkITA6d49ncAJe4O/8CgRG5/F//s6Xh8=",
|
||||
"lastModified": 1726851729,
|
||||
"narHash": "sha256-1z0esr5lBeUMlrPZ9gZmqZT8oTQekxJi53HAW4cH0Ms=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "xdg-desktop-portal-hyprland",
|
||||
"rev": "e695669fd8e1d1be9eaae40f35e00f8bd8b64c18",
|
||||
"rev": "73b8c4f1150040644cf678aa8bbf2cec48a433cf",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -70,71 +70,6 @@
|
|||
source = ./scripts;
|
||||
recursive = true;
|
||||
};
|
||||
|
||||
".local/share/scripts/hyprland/start_services.sh" = {
|
||||
executable = true;
|
||||
text = # sh
|
||||
''
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Make sure xdg-desktop-portal-hyprland has access to what it needs
|
||||
#
|
||||
dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP &
|
||||
|
||||
#
|
||||
# Start waybar.
|
||||
#
|
||||
waybar &
|
||||
|
||||
#
|
||||
# Start xwaylandvideobridge
|
||||
#
|
||||
xwaylandvideobridge &
|
||||
|
||||
|
||||
#
|
||||
# Start wallpaper daemon
|
||||
#
|
||||
~/.local/share/scripts/wallpaper.sh &
|
||||
|
||||
#
|
||||
# Start notification daemon.
|
||||
#
|
||||
mako &
|
||||
|
||||
#
|
||||
# Start polkit agent
|
||||
#
|
||||
${pkgs.libsForQt5.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1
|
||||
|
||||
#
|
||||
# Start kwallet service
|
||||
#
|
||||
kwalletd6 &
|
||||
|
||||
#
|
||||
# Start kdeconnect daemon
|
||||
#
|
||||
kdeconnectd &
|
||||
|
||||
#
|
||||
# Clipboard manager
|
||||
#
|
||||
wl-paste --type text --watch cliphist store &
|
||||
wl-paste --type image --watch cliphist store &
|
||||
|
||||
#
|
||||
# Start Fcitx5
|
||||
#
|
||||
fcitx5 &
|
||||
|
||||
#
|
||||
# Start the blueman applet for managing bluetooth devices
|
||||
#
|
||||
blueman-applet &
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
# Configure XDG
|
||||
|
|
|
@ -1,15 +1,30 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
options.modules.hyprland.extraConfig = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
example = # hyprlang
|
||||
''
|
||||
monitor = DP-3, 1920x1080@74.973, 2560x0, 1
|
||||
monitor = DP-2, 2560x1440@165.00301, 0x0, 1
|
||||
'';
|
||||
description = "Configuration to be appended to my own.";
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.modules.hyprland;
|
||||
in
|
||||
{
|
||||
options.modules.hyprland = {
|
||||
extraConfig = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
example = # hyprlang
|
||||
''
|
||||
monitor = DP-3, 1920x1080@74.973, 2560x0, 1
|
||||
monitor = DP-2, 2560x1440@165.00301, 0x0, 1
|
||||
'';
|
||||
description = "Configuration to be appended to my own.";
|
||||
};
|
||||
|
||||
scripts = {
|
||||
screenshot.enable = lib.mkEnableOption "screenshot";
|
||||
startup.enable = lib.mkEnableOption "startup";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
|
@ -138,11 +153,23 @@
|
|||
'';
|
||||
};
|
||||
|
||||
# Set-up the scripts for services and apps.
|
||||
home.packages = lib.mkIf cfg.scripts.startup.enable [
|
||||
(import ./scripts/start_services.nix pkgs)
|
||||
(import ./scripts/start_apps.nix pkgs)
|
||||
];
|
||||
|
||||
# Then add the hyprland screenshot scripts.
|
||||
xdg.dataFile = lib.mkIf cfg.scripts.screenshot.enable {
|
||||
"scripts/hyprland/screenshot.sh".source = ./scripts/screenshot.sh;
|
||||
"scripts/hyprland/screenshot_area.sh".source = ./scripts/screenshot_area.sh;
|
||||
};
|
||||
|
||||
# Configure hyprland - we enable it in NixOS.
|
||||
xdg.configFile."hypr/hyprland.conf".text = # hyprlang
|
||||
''
|
||||
source = $HOME/.config/hypr/frappe.conf
|
||||
${config.modules.hyprland.extraConfig}
|
||||
${cfg.extraConfig}
|
||||
|
||||
#
|
||||
# Please note not all available settings / options are set here.
|
||||
|
@ -157,10 +184,10 @@
|
|||
exec-once = /etc/profiles/per-user/wizardlink/etc/profile.d/hm-session-vars.sh
|
||||
|
||||
# Start the core services of my desktop
|
||||
exec-once = ~/.local/share/scripts/hyprland/start_services.sh
|
||||
exec-once = start_services
|
||||
|
||||
# Open the apps I always use
|
||||
exec-once = ~/.local/share/scripts/hyprland/start_apps.sh
|
||||
exec-once = start_apps
|
||||
|
||||
# Set cursor size.
|
||||
env = HYPRCURSOR_SIZE, 36
|
||||
|
|
15
modules/home-manager/programs/hyprland/scripts/start_apps.nix
Executable file
15
modules/home-manager/programs/hyprland/scripts/start_apps.nix
Executable file
|
@ -0,0 +1,15 @@
|
|||
pkgs:
|
||||
|
||||
pkgs.writeShellScriptBin "start_apps" ''
|
||||
# Open qbittorrent
|
||||
qbittorrent &
|
||||
|
||||
# Open vesktop
|
||||
vesktop &
|
||||
|
||||
# Open steam
|
||||
steam &
|
||||
|
||||
# Open firefox
|
||||
firefox
|
||||
''
|
|
@ -0,0 +1,59 @@
|
|||
pkgs:
|
||||
|
||||
pkgs.writeShellScriptBin "start_services" ''
|
||||
#
|
||||
# Make sure xdg-desktop-portal-hyprland has access to what it needs
|
||||
#
|
||||
dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP &
|
||||
|
||||
#
|
||||
# Start waybar.
|
||||
#
|
||||
waybar &
|
||||
|
||||
#
|
||||
# Start xwaylandvideobridge
|
||||
#
|
||||
xwaylandvideobridge &
|
||||
|
||||
|
||||
#
|
||||
# Start wallpaper daemon
|
||||
#
|
||||
~/.local/share/scripts/wallpaper.sh &
|
||||
|
||||
#
|
||||
# Start notification daemon.
|
||||
#
|
||||
mako &
|
||||
|
||||
#
|
||||
# Start polkit agent
|
||||
#
|
||||
${pkgs.libsForQt5.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1 &
|
||||
|
||||
#
|
||||
# Start kwallet service
|
||||
#
|
||||
kwalletd6 &
|
||||
|
||||
#
|
||||
# Start kdeconnect daemon
|
||||
#
|
||||
kdeconnectd &
|
||||
|
||||
#
|
||||
# Start Fcitx5
|
||||
#
|
||||
fcitx5 &
|
||||
|
||||
#
|
||||
# Start the blueman applet for managing bluetooth devices
|
||||
#
|
||||
blueman-applet &
|
||||
|
||||
#
|
||||
# Clipboard manager
|
||||
#
|
||||
${pkgs.wl-clipboard}/bin/wl-paste --watch cliphist store &
|
||||
''
|
|
@ -1,13 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Open qbittorrent
|
||||
qbittorrent &
|
||||
|
||||
# Open vesktop
|
||||
vesktop &
|
||||
|
||||
# Open steam
|
||||
steam &
|
||||
|
||||
# Open firefox
|
||||
firefox
|
|
@ -79,23 +79,31 @@
|
|||
# MODULES #
|
||||
#
|
||||
|
||||
# Add monitor configuration to hyprland
|
||||
modules.hyprland.extraConfig = # hyprlang
|
||||
''
|
||||
# See https://wiki.hyprland.org/Configuring/Monitors/
|
||||
monitor = DP-3, 1920x1080@74.973, 2560x0, 1
|
||||
monitor = DP-2, 2560x1440@165.00301, 0x0, 1
|
||||
modules.hyprland = {
|
||||
# Enable scripts
|
||||
scripts = {
|
||||
startup.enable = true;
|
||||
screenshot.enable = true;
|
||||
};
|
||||
|
||||
# Bind workspaces to specific monitors
|
||||
workspace = 1, monitor:DP-2
|
||||
workspace = 2, monitor:DP-3
|
||||
workspace = 3, monitor:DP-2
|
||||
workspace = 4, monitor:DP-3
|
||||
workspace = 5, monitor:DP-2
|
||||
workspace = 6, monitor:DP-3
|
||||
workspace = 7, monitor:DP-2
|
||||
workspace = 8, monitor:DP-3
|
||||
workspace = 9, monitor:DP-2
|
||||
workspace = 0, monitor:DP-3
|
||||
'';
|
||||
# Add monitor configuration to hyprland
|
||||
extraConfig = # hyprlang
|
||||
''
|
||||
# See https://wiki.hyprland.org/Configuring/Monitors/
|
||||
monitor = DP-3, 1920x1080@74.973, 2560x0, 1
|
||||
monitor = DP-2, 2560x1440@165.00301, 0x0, 1
|
||||
|
||||
# Bind workspaces to specific monitors
|
||||
workspace = 1, monitor:DP-2
|
||||
workspace = 2, monitor:DP-3
|
||||
workspace = 3, monitor:DP-2
|
||||
workspace = 4, monitor:DP-3
|
||||
workspace = 5, monitor:DP-2
|
||||
workspace = 6, monitor:DP-3
|
||||
workspace = 7, monitor:DP-2
|
||||
workspace = 8, monitor:DP-3
|
||||
workspace = 9, monitor:DP-2
|
||||
workspace = 0, monitor:DP-3
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -142,6 +142,7 @@
|
|||
#
|
||||
# PACKAGES #
|
||||
#
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
## Tools
|
||||
# Utilities
|
||||
|
|
|
@ -68,21 +68,30 @@
|
|||
#
|
||||
|
||||
# Add monitor configuration to hyprland
|
||||
modules.hyprland.extraConfig = # hyprlang
|
||||
''
|
||||
# See https://wiki.hyprland.org/Configuring/Monitors/
|
||||
monitor = eDP-1, 1920x1080@60.01, 0x0, 1
|
||||
modules.hyprland = {
|
||||
# Enable scripts
|
||||
scripts = {
|
||||
startup.enable = true;
|
||||
screenshot.enable = true;
|
||||
};
|
||||
|
||||
# Bind workspaces to specific monitors
|
||||
workspace = 1, monitor:eDP-1
|
||||
workspace = 2, monitor:eDP-1
|
||||
workspace = 3, monitor:eDP-1
|
||||
workspace = 4, monitor:eDP-1
|
||||
workspace = 5, monitor:eDP-1
|
||||
workspace = 6, monitor:eDP-1
|
||||
workspace = 7, monitor:eDP-1
|
||||
workspace = 8, monitor:eDP-1
|
||||
workspace = 9, monitor:eDP-1
|
||||
workspace = 0, monitor:eDP-1
|
||||
'';
|
||||
# Add monitor configuration to hyprland
|
||||
extraConfig = # hyprlang
|
||||
''
|
||||
# See https://wiki.hyprland.org/Configuring/Monitors/
|
||||
monitor = eDP-1, 1920x1080@60.01, 0x0, 1
|
||||
|
||||
# Bind workspaces to specific monitors
|
||||
workspace = 1, monitor:eDP-1
|
||||
workspace = 2, monitor:eDP-1
|
||||
workspace = 3, monitor:eDP-1
|
||||
workspace = 4, monitor:eDP-1
|
||||
workspace = 5, monitor:eDP-1
|
||||
workspace = 6, monitor:eDP-1
|
||||
workspace = 7, monitor:eDP-1
|
||||
workspace = 8, monitor:eDP-1
|
||||
workspace = 9, monitor:eDP-1
|
||||
workspace = 0, monitor:eDP-1
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue