Compare commits

...

8 commits

7 changed files with 50 additions and 197 deletions

72
flake.lock generated
View file

@ -20,11 +20,11 @@
]
},
"locked": {
"lastModified": 1744289235,
"narHash": "sha256-ZFkHLdimtFzQACsVVyZkZlfYdj4iNy3PkzXfrwmlse8=",
"lastModified": 1745357003,
"narHash": "sha256-jYwzQkv1r7HN/4qrAuKp+NR4YYNp2xDrOX5O9YVqkWo=",
"owner": "hyprwm",
"repo": "aquamarine",
"rev": "c8282f4982b56dfa5e9b9f659809da93f8d37e7a",
"rev": "a19cf76ee1a15c1c12083fa372747ce46387289f",
"type": "github"
},
"original": {
@ -40,11 +40,11 @@
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1745432946,
"narHash": "sha256-6JNCfG67V5muUwEGdv5HmnbW6UlGrjcblVObvJCVXy4=",
"lastModified": 1746206240,
"narHash": "sha256-bKe8SSg1HPWE7b4iRQJwiOVCrvvgttuHCOIa4U/38AY=",
"owner": "Saghen",
"repo": "blink.cmp",
"rev": "5d90bfc6245eb89b6c6f22f4fa3a7202df17cb24",
"rev": "4f38ce99a472932d5776337f08f7a8180f1f571a",
"type": "github"
},
"original": {
@ -158,11 +158,11 @@
]
},
"locked": {
"lastModified": 1745427103,
"narHash": "sha256-J4v65MKoXt95nmCYr6a7Cdiyl9QmPp6u3+7aJ71zxbk=",
"lastModified": 1746317522,
"narHash": "sha256-/jZ4Wd4HHUEWPSlNj48k1E4Mh+1fUbwI/vSlPPIMG3U=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "6d1f834ca63700604a96d8c38aa8ac272d95071a",
"rev": "621986fed37c5d0cb8df010ed8369694dc47c09b",
"type": "github"
},
"original": {
@ -207,11 +207,11 @@
]
},
"locked": {
"lastModified": 1742215578,
"narHash": "sha256-zfs71PXVVPEe56WEyNi2TJQPs0wabU4WAlq0XV7GcdE=",
"lastModified": 1745948457,
"narHash": "sha256-lzTV10FJTCGNtMdgW5YAhCAqezeAzKOd/97HbQK8GTU=",
"owner": "hyprwm",
"repo": "hyprcursor",
"rev": "2fd36421c21aa87e2fe3bee11067540ae612f719",
"rev": "ac903e80b33ba6a88df83d02232483d99f327573",
"type": "github"
},
"original": {
@ -265,11 +265,11 @@
"xdph": "xdph"
},
"locked": {
"lastModified": 1745328209,
"narHash": "sha256-eP3x+JNE1T6RjXhimaEnoc4GvNJcyzppW1vpAs287Zg=",
"lastModified": 1746310409,
"narHash": "sha256-iSyQZMaYjVfr+vb7jO0N9Bh8V9m51ZYUqxWd9BimUpQ=",
"owner": "hyprwm",
"repo": "Hyprland",
"rev": "241a4935a244f403fa7108259075b04c81ed258f",
"rev": "adbae0f74d951e06c575bad3c81a944027dfe413",
"type": "github"
},
"original": {
@ -358,11 +358,11 @@
]
},
"locked": {
"lastModified": 1739048983,
"narHash": "sha256-REhTcXq4qs3B3cCDtLlYDz0GZvmsBSh947Ub6pQWGTQ=",
"lastModified": 1745951494,
"narHash": "sha256-2dModE32doiyQMmd6EDAQeZnz+5LOs6KXyE0qX76WIg=",
"owner": "hyprwm",
"repo": "hyprland-qtutils",
"rev": "3504a293c8f8db4127cb0f7cfc1a318ffb4316f8",
"rev": "4be1d324faf8d6e82c2be9f8510d299984dfdd2e",
"type": "github"
},
"original": {
@ -387,11 +387,11 @@
]
},
"locked": {
"lastModified": 1744468525,
"narHash": "sha256-9HySx+EtsbbKlZDlY+naqqOV679VdxP6x6fP3wxDXJk=",
"lastModified": 1745357019,
"narHash": "sha256-q/C3qj9FWHQenObXuw/nGIT8iIsWFjgmcQYcA+ZfpPs=",
"owner": "hyprwm",
"repo": "hyprlang",
"rev": "f1000c54d266e6e4e9d646df0774fac5b8a652df",
"rev": "397600c42b8d7a443a5b4e92aa15f46650a90f18",
"type": "github"
},
"original": {
@ -412,11 +412,11 @@
]
},
"locked": {
"lastModified": 1743950287,
"narHash": "sha256-/6IAEWyb8gC/NKZElxiHChkouiUOrVYNq9YqG0Pzm4Y=",
"lastModified": 1745975815,
"narHash": "sha256-s3GzsRxBL/N/xYgUXZhQh4t62uR1BN4zxXgWBtJ3lWM=",
"owner": "hyprwm",
"repo": "hyprutils",
"rev": "f2dc70e448b994cef627a157ee340135bd68fbc6",
"rev": "05878d9470c9e5cbc8807813f9ec2006627a0ca0",
"type": "github"
},
"original": {
@ -527,11 +527,11 @@
},
"nixpkgs_4": {
"locked": {
"lastModified": 1744932701,
"narHash": "sha256-fusHbZCyv126cyArUwwKrLdCkgVAIaa/fQJYFlCEqiU=",
"lastModified": 1746141548,
"narHash": "sha256-IgBWhX7A2oJmZFIrpRuMnw5RAufVnfvOgHWgIdds+hc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b024ced1aac25639f8ca8fdfc2f8c4fbd66c48ef",
"rev": "f02fddb8acef29a8b32f10a335d44828d7825b78",
"type": "github"
},
"original": {
@ -543,11 +543,11 @@
},
"nixpkgs_5": {
"locked": {
"lastModified": 1745234285,
"narHash": "sha256-GfpyMzxwkfgRVN0cTGQSkTC0OHhEkv3Jf6Tcjm//qZ0=",
"lastModified": 1746232882,
"narHash": "sha256-MHmBH2rS8KkRRdoU/feC/dKbdlMkcNkB5mwkuipVHeQ=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "c11863f1e964833214b767f4a369c6e6a7aba141",
"rev": "7a2622e2c0dbad5c4493cb268aba12896e28b008",
"type": "github"
},
"original": {
@ -616,11 +616,11 @@
"systems": "systems_3"
},
"locked": {
"lastModified": 1745151211,
"narHash": "sha256-qFXfTdO1yvW6DmUPfVLIJgDHfkSd5yimZWvBMrlP/ow=",
"lastModified": 1746287507,
"narHash": "sha256-XzxmpEUbCXcBS7H00QmTAQf9xrMdvaFHrprkwb4i9CU=",
"owner": "Gerg-L",
"repo": "spicetify-nix",
"rev": "1dd4328f82115887901a685ecd9fa6e1d1db2d0c",
"rev": "c09c8cbc0d650d451e4b48d00c63831437dae1b2",
"type": "github"
},
"original": {
@ -720,11 +720,11 @@
]
},
"locked": {
"lastModified": 1744644585,
"narHash": "sha256-p0D/e4J6Sv6GSb+9u8OQcVHSE2gPNYB5ygIfGDyEiXQ=",
"lastModified": 1745871725,
"narHash": "sha256-M24SNc2flblWGXFkGQfqSlEOzAGZnMc9QG3GH4K/KbE=",
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"rev": "be6771e754345f18244fb00aae5c9e5ab21ccc26",
"rev": "76bbf1a6b1378e4ab5230bad00ad04bc287c969e",
"type": "github"
},
"original": {

View file

@ -134,12 +134,8 @@
screenshot.enable = true;
};
# Enable hypridle and hyprlock
# Enable hypridle
hypridle.enable = true;
hyprlock = {
enable = true;
background = "/mnt/internal/personal/wallpapers/wallhaven-2em8y6.jpg";
};
# Add monitor configuration to hyprland
extraConfig = # hyprlang

View file

@ -1,6 +1,6 @@
The [NixOS] module installs [Hyprland] onto the system.
Whilst the [Home Manager] module generates the dotfiles for [Hyprland] and optionally [hyprlock] and [hypridle].
Whilst the [Home Manager] module generates the dotfiles for [Hyprland] and optionally [hypridle].
It can be configured through `modules.hyprland`.
@ -18,15 +18,6 @@ There are no monitors configured by default, so you should use this option to do
Whether to configure and enable the [hypridle] package. Be mindful that it may not auto-start, I have yet to find why but
even though it configures to start after `graphical-session.target`, that isn't reached in Hyprland sometimes.
### hyprlock.enable
Whether to configure and enable the [hyprlock] package, by itself it does nothing but when [hypridle] is also enabled it
will automatically call [hyprlock] after a 120 second timeout.
### hyprlock.background
A path to an image that will be used as background when [hyprlock] is invoked.
### scripts.screenshot.enable
When enabled it will create two script files in `$XDG_DATA_HOME/scripts/hyprland` and two keybinds for you to run these
@ -54,7 +45,6 @@ services. If this module ever gets actually used by someone, then I'll refine it
<!-- REFERENCES -->
[hyprland]: https://hyprland.org/
[hyprlock]: https://github.com/hyprwm/hyprlock
[hypridle]: https://github.com/hyprwm/hypridle
[home manager]: https://github.com/nix-community/home-manager
[nixos]: https://nixos.org

View file

@ -23,16 +23,6 @@ in
hypridle.enable = lib.mkEnableOption "hypridle";
hyprlock = {
enable = lib.mkEnableOption "hyprlock";
background = lib.mkOption {
type = lib.types.path;
default = "";
example = "~/wallpapers/abc.png";
description = "The image to be used as background for hyprlock.";
};
};
scripts = {
screenshot.enable = lib.mkEnableOption "screenshot";
startup.enable = lib.mkEnableOption "startup";
@ -50,129 +40,21 @@ in
sha256 = "1clw669i1n3dhawdw4clmjv75fy3smycb5iqk3sanzpr3y0i4vwx";
};
# Enable hypridle and hyprlock
# Enable hypridle
services.hypridle = lib.mkIf cfg.hypridle.enable {
enable = true;
settings = {
general = {
after_sleep_cmd = "hyprctl dispatch dpms on";
ignore_dbus_inhibit = false;
lock_cmd = "hyprlock";
};
listener =
[
{
timeout = 180;
on-timeout = "hyprctl dispatch dpms off";
on-resume = "hyprctl dispatch dpms on";
}
]
++ lib.optionals cfg.hyprlock.enable [
{
timeout = 120;
on-timeout = "hyprlock";
}
];
listener = [
{
timeout = 180;
on-timeout = "hyprctl dispatch dpms off";
on-resume = "hyprctl dispatch dpms on";
}
];
};
};
programs.hyprlock = lib.mkIf cfg.hyprlock.enable {
enable = true;
extraConfig = # hyprlang
''
source = $HOME/.config/hypr/frappe.conf
$accent = $mauve
$accentAlpha = $mauveAlpha
$font = JetBrainsMono Nerd Font
# GENERAL
general {
disable_loading_bar = true
hide_cursor = true
}
# BACKGROUND
background {
monitor =
path = ${cfg.hyprlock.background}
blur_passes = 0
color = $base
}
# LAYOUT
label {
monitor =
text = Layout: $LAYOUT
color = $text
font_size = 25
font_family = $font
position = 30, -30
halign = left
valign = top
}
# TIME
label {
monitor =
text = $TIME
color = $text
font_size = 90
font_family = $font
position = -30, 0
halign = right
valign = top
}
# DATE
label {
monitor =
text = cmd[update:43200000] date +"%A, %d %B %Y"
color = $text
font_size = 25
font_family = $font
position = -30, -150
halign = right
valign = top
}
# USER AVATAR
image {
monitor =
path = $HOME/.face
size = 100
border_color = $accent
position = 0, 75
halign = center
valign = center
}
# INPUT FIELD
input-field {
monitor =
size = 300, 60
outline_thickness = 4
dots_size = 0.2
dots_spacing = 0.2
dots_center = true
outer_color = $accent
inner_color = $surface0
font_color = $text
fade_on_empty = false
placeholder_text = <span foreground="##$textAlpha"><i>󰌾 Logged in as </i><span foreground="##$accentAlpha">$USER</span></span>
hide_input = false
check_color = $accent
fail_color = $red
fail_text = <i>$FAIL <b>($ATTEMPTS)</b></i>
capslock_color = $yellow
position = 0, -47
halign = center
valign = center
}
'';
};
# Set-up the scripts for services and apps.
home.packages = lib.mkIf cfg.scripts.startup.enable [
(import ./scripts/start_services.nix pkgs)

View file

@ -9,7 +9,7 @@ return {
---@param opts AstroLSPOpts
---@return AstroLSPOpts
opts = function(_, opts)
local system_flake_path = vim.fn.getenv "FLAKE" or error "FLAKE environment variable must be set."
local system_flake_path = os.getenv "FLAKE" or os.getenv "NH_FLAKE" or error "FLAKE environment variable must be set."
local hostname = vim.fn.hostname()
---@type AstroLSPOpts

View file

@ -71,16 +71,6 @@ return {
})
end,
},
{
"nvim-telescope/telescope.nvim",
optional = true,
opts = {
highlight = {
enable = true,
additional_vim_regex_highlighting = false,
},
},
},
},
},
@ -145,11 +135,6 @@ return {
dependencies = {
"nvim-treesitter/nvim-treesitter",
},
opts = {},
},
-- Better UI hooks
{
"stevearc/dressing.nvim",
event = "VeryLazy",
},
}

View file

@ -17,7 +17,7 @@
heroic
protontricks
r2modman
wineWowPackages.unstableFull
wineWowPackages.stableFull
winetricks
# Games