This commit is contained in:
Daniel Ziltener 2024-08-22 18:04:26 +02:00
parent 634c79c3bd
commit 5e1eaae67d
Signed by: zilti
GPG Key ID: B38976E82C9DAE42
4 changed files with 317 additions and 24 deletions

View File

@ -2,7 +2,7 @@
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running `nixos-help`).
{ config, pkgs, lib, ... }:
{ config, inputs, pkgs, lib, ... }:
{
imports =
@ -85,7 +85,11 @@
services.libinput.enable = true;
programs.hyprland.enable = true;
programs.hyprland = {
enable = true;
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
};
services.flatpak.enable = true;
nixpkgs.config.allowUnfree = true;

View File

@ -1,5 +1,38 @@
{
"nodes": {
"aquamarine": {
"inputs": {
"hyprutils": [
"hyprland",
"hyprutils"
],
"hyprwayland-scanner": [
"hyprland",
"hyprwayland-scanner"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1724273991,
"narHash": "sha256-+aUSOXKGpS5CRm1oTitgNAr05ThQNbKIXalZHl3nC6Y=",
"owner": "hyprwm",
"repo": "aquamarine",
"rev": "9a3161ad4c78dc420d1cbb3aae638222608c7de4",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "aquamarine",
"type": "github"
}
},
"flatpaks": {
"inputs": {
"nixpkgs": "nixpkgs",
@ -41,6 +74,189 @@
"type": "github"
}
},
"hyprcursor": {
"inputs": {
"hyprlang": [
"hyprland",
"hyprlang"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1722623071,
"narHash": "sha256-sLADpVgebpCBFXkA1FlCXtvEPu1tdEsTfqK1hfeHySE=",
"owner": "hyprwm",
"repo": "hyprcursor",
"rev": "912d56025f03d41b1ad29510c423757b4379eb1c",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprcursor",
"type": "github"
}
},
"hyprland": {
"inputs": {
"aquamarine": "aquamarine",
"hyprcursor": "hyprcursor",
"hyprlang": "hyprlang",
"hyprutils": "hyprutils",
"hyprwayland-scanner": "hyprwayland-scanner",
"nixpkgs": "nixpkgs_2",
"systems": "systems_2",
"xdph": "xdph"
},
"locked": {
"lastModified": 1723058230,
"narHash": "sha256-deu8zvgseDg2gQEnZiCda4TrbA6pleE9iItoZlsoMtE=",
"ref": "refs/tags/v0.42.0",
"rev": "9a09eac79b85c846e3a865a9078a3f8ff65a9259",
"revCount": 5069,
"submodules": true,
"type": "git",
"url": "https://github.com/hyprwm/Hyprland"
},
"original": {
"ref": "refs/tags/v0.42.0",
"submodules": true,
"type": "git",
"url": "https://github.com/hyprwm/Hyprland"
}
},
"hyprland-protocols": {
"inputs": {
"nixpkgs": [
"hyprland",
"xdph",
"nixpkgs"
],
"systems": [
"hyprland",
"xdph",
"systems"
]
},
"locked": {
"lastModified": 1721326555,
"narHash": "sha256-zCu4R0CSHEactW9JqYki26gy8h9f6rHmSwj4XJmlHgg=",
"owner": "hyprwm",
"repo": "hyprland-protocols",
"rev": "5a11232266bf1a1f5952d5b179c3f4b2facaaa84",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprland-protocols",
"type": "github"
}
},
"hyprlang": {
"inputs": {
"hyprutils": [
"hyprland",
"hyprutils"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1724174162,
"narHash": "sha256-fOOBLwil6M9QWMCiSULwjMQzrXhHXUnEqmjHX5ZHeVI=",
"owner": "hyprwm",
"repo": "hyprlang",
"rev": "16e5c9465f04477d8a3dd48a0a26bf437986336c",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprlang",
"type": "github"
}
},
"hyprsplit": {
"inputs": {
"hyprland": [
"hyprland"
]
},
"locked": {
"lastModified": 1723077859,
"narHash": "sha256-2KwSOv+7XzQWxxGrAlBPwRjYMUyMYDwXjTEAY1I8H8w=",
"owner": "shezdy",
"repo": "hyprsplit",
"rev": "d4c59ca20581b04ef9348944377a12b911d9b5e3",
"type": "github"
},
"original": {
"owner": "shezdy",
"repo": "hyprsplit",
"type": "github"
}
},
"hyprutils": {
"inputs": {
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1722869141,
"narHash": "sha256-0KU4qhyMp441qfwbirNg3+wbm489KnEjXOz2I/RbeFs=",
"owner": "hyprwm",
"repo": "hyprutils",
"rev": "0252fd13e78e60fb0da512a212e56007515a49f7",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprutils",
"type": "github"
}
},
"hyprwayland-scanner": {
"inputs": {
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1721324119,
"narHash": "sha256-SOOqIT27/X792+vsLSeFdrNTF+OSRp5qXv6Te+fb2Qg=",
"owner": "hyprwm",
"repo": "hyprwayland-scanner",
"rev": "a048a6cb015340bd82f97c1f40a4b595ca85cc30",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprwayland-scanner",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1701156937,
@ -58,6 +274,22 @@
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1724224976,
"narHash": "sha256-Z/ELQhrSd7bMzTO8r7NZgi9g5emh+aRKoCdaAv5fiO0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c374d94f1536013ca8e92341b540eba4c22f9c62",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1723991338,
"narHash": "sha256-Grh5PF0+gootJfOJFenTTxDTYPidA3V28dqJ/WV7iis=",
@ -77,7 +309,9 @@
"inputs": {
"flatpaks": "flatpaks",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs_2"
"hyprland": "hyprland",
"hyprsplit": "hyprsplit",
"nixpkgs": "nixpkgs_3"
}
},
"systems": {
@ -95,6 +329,21 @@
"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"
}
},
"utils": {
"inputs": {
"systems": "systems"
@ -112,6 +361,36 @@
"repo": "flake-utils",
"type": "github"
}
},
"xdph": {
"inputs": {
"hyprland-protocols": "hyprland-protocols",
"hyprlang": [
"hyprland",
"hyprlang"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1724073926,
"narHash": "sha256-nWlUL43jOFHf+KW6Hqrx+W/r1XdXuDyb0wC/SrHsOu4=",
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"rev": "a08ecbbf33598924e93542f737fc6169a26b481e",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"type": "github"
}
}
},
"root": "root",

View File

@ -24,13 +24,18 @@
inputs.nixpkgs.follows = "nixpkgs";
};
flatpaks.url = "github:GermanBread/declarative-flatpak/stable";
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1&ref=refs/tags/v0.42.0";
hyprsplit = {
url = "github:shezdy/hyprsplit";
inputs.hyprland.follows = "hyprland";
};
};
outputs = inputs@{ nixpkgs, home-manager, flatpaks, ... }: {
nixosConfigurations = {
"ziltis-desktop" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
#specialArgs = { inherit inputs; };
specialArgs = { inherit inputs; };
modules = [
/etc/nixos/configuration.nix
home-manager.nixosModules.home-manager
@ -38,7 +43,7 @@
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.zilti = import ./home.nix;
home-manager.extraSpecialArgs = inputs;
home-manager.extraSpecialArgs = { inherit inputs; };
home-manager.sharedModules = [
flatpaks.homeManagerModules.default
];

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, wayland, ... }:
args@{ config, lib, inputs, pkgs, wayland, ... }:
{
@ -17,6 +17,9 @@
wayland.windowManager.hyprland = {
enable = true;
systemd.enable = true;
plugins = [
inputs.hyprsplit.packages.${pkgs.stdenv.hostPlatform.system}.hyprsplit
];
settings = {
source =
[
@ -127,25 +130,27 @@
"$mainMod SHIFT, T, lockactivegroup, toggle"
# Switch workspaces
"$mainMod, 1, workspace, 1"
"$mainMod, 2, workspace, 2"
"$mainMod, 3, workspace, 3"
"$mainMod, 4, workspace, 4"
"$mainMod, 5, workspace, 5"
"$mainMod, 6, workspace, 6"
"$mainMod, 7, workspace, 7"
"$mainMod, 8, workspace, 8"
"$mainMod, 9, workspace, 9"
"$mainMod, 1, split:workspace, 1"
"$mainMod, 2, split:workspace, 2"
"$mainMod, 3, split:workspace, 3"
"$mainMod, 4, split:workspace, 4"
"$mainMod, 5, split:workspace, 5"
"$mainMod, 6, split:workspace, 6"
"$mainMod, 7, split:workspace, 7"
"$mainMod, 8, split:workspace, 8"
"$mainMod, 9, split:workspace, 9"
# Move windows to workspaces
"$mainMod SHIFT, 1, movetoworkspace, 1"
"$mainMod SHIFT, 2, movetoworkspace, 2"
"$mainMod SHIFT, 3, movetoworkspace, 3"
"$mainMod SHIFT, 4, movetoworkspace, 4"
"$mainMod SHIFT, 5, movetoworkspace, 5"
"$mainMod SHIFT, 6, movetoworkspace, 6"
"$mainMod SHIFT, 7, movetoworkspace, 7"
"$mainMod SHIFT, 8, movetoworkspace, 8"
"$mainMod SHIFT, 9, movetoworkspace, 9"
"$mainMod SHIFT, 1, split:movetoworkspace, 1"
"$mainMod SHIFT, 2, split:movetoworkspace, 2"
"$mainMod SHIFT, 3, split:movetoworkspace, 3"
"$mainMod SHIFT, 4, split:movetoworkspace, 4"
"$mainMod SHIFT, 5, split:movetoworkspace, 5"
"$mainMod SHIFT, 6, split:movetoworkspace, 6"
"$mainMod SHIFT, 7, split:movetoworkspace, 7"
"$mainMod SHIFT, 8, split:movetoworkspace, 8"
"$mainMod SHIFT, 9, split:movetoworkspace, 9"
# Swap workspaces
"$mainMod SHIFT, m, split:swapactiveworkspaces, current +1"
# Scroll through workspaces
"$mainMod, mouse_down, workspace, e+1"
"$mainMod, mouse_up, workspace, e-1"