refactoring complete!

This commit is contained in:
Charlie Root 2024-05-21 20:51:26 +02:00
commit d456d62999
9 changed files with 71 additions and 96 deletions

37
flake.lock generated
View file

@ -764,26 +764,23 @@
"hyprland": { "hyprland": {
"inputs": { "inputs": {
"hyprcursor": "hyprcursor", "hyprcursor": "hyprcursor",
"hyprland-protocols": "hyprland-protocols",
"hyprlang": "hyprlang", "hyprlang": "hyprlang",
"hyprwayland-scanner": "hyprwayland-scanner", "hyprwayland-scanner": "hyprwayland-scanner",
"nixpkgs": "nixpkgs_3", "nixpkgs": "nixpkgs_3",
"systems": "systems_3", "systems": "systems_3",
"wlroots": "wlroots",
"xdph": "xdph" "xdph": "xdph"
}, },
"locked": { "locked": {
"lastModified": 1714837352, "lastModified": 1716316196,
"narHash": "sha256-UxpPPS5uiyE4FDO3trfJObOm6sE7jnkVguHH6IdkQqs=", "narHash": "sha256-ynu+Ii1PTtnz4YdjP2CJbnxaie9aETNAds9lwDzeQus=",
"ref": "refs/tags/v0.40.0", "ref": "refs/heads/main",
"rev": "cba1ade848feac44b2eda677503900639581c3f4", "rev": "e419ef1873de01b0762f7f1a411994170a4d8cab",
"revCount": 4606, "revCount": 4723,
"submodules": true, "submodules": true,
"type": "git", "type": "git",
"url": "https://github.com/hyprwm/Hyprland" "url": "https://github.com/hyprwm/Hyprland"
}, },
"original": { "original": {
"ref": "refs/tags/v0.40.0",
"submodules": true, "submodules": true,
"type": "git", "type": "git",
"url": "https://github.com/hyprwm/Hyprland" "url": "https://github.com/hyprwm/Hyprland"
@ -818,10 +815,12 @@
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"hyprland", "hyprland",
"xdph",
"nixpkgs" "nixpkgs"
], ],
"systems": [ "systems": [
"hyprland", "hyprland",
"xdph",
"systems" "systems"
] ]
}, },
@ -1584,29 +1583,9 @@
"type": "github" "type": "github"
} }
}, },
"wlroots": {
"flake": false,
"locked": {
"lastModified": 1713731601,
"narHash": "sha256-bdcKdtLkusvv85DNuJsajZLFeq7bXp+x5AGP1Sd4wD8=",
"owner": "hyprwm",
"repo": "wlroots-hyprland",
"rev": "5c1d51c5a2793480f5b6c4341ad0797052aec2ea",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "wlroots-hyprland",
"rev": "5c1d51c5a2793480f5b6c4341ad0797052aec2ea",
"type": "github"
}
},
"xdph": { "xdph": {
"inputs": { "inputs": {
"hyprland-protocols": [ "hyprland-protocols": "hyprland-protocols",
"hyprland",
"hyprland-protocols"
],
"hyprlang": [ "hyprlang": [
"hyprland", "hyprland",
"hyprlang" "hyprlang"

View file

@ -7,7 +7,8 @@
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
hyprland.url = hyprland.url =
"git+https://github.com/hyprwm/Hyprland?ref=refs/tags/v0.40.0&submodules=1"; # "git+https://github.com/hyprwm/Hyprland?ref=refs/tags/v0.40.0&submodules=1";
"git+https://github.com/hyprwm/Hyprland?submodules=1";
hyprland-plugins = { hyprland-plugins = {
url = "github:hyprwm/hyprland-plugins"; url = "github:hyprwm/hyprland-plugins";
inputs.hyprland.follows = "hyprland"; inputs.hyprland.follows = "hyprland";

View file

@ -10,7 +10,7 @@
settings = { settings = {
substituters = [ "https://hyprland.cachix.org" ]; substituters = [ "https://hyprland.cachix.org" ];
trusted-public-keys = [ trusted-public-keys = [
# "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
]; ];
# enable flakes # enable flakes
experimental-features = [ "nix-command" "flakes" ]; experimental-features = [ "nix-command" "flakes" ];
@ -55,7 +55,6 @@
foot.enable = true; foot.enable = true;
fish.enable = true; fish.enable = true;
stylix.enable = true; stylix.enable = true;
helix.enable = true;
nh.enable = true; nh.enable = true;
waybar.enable = true; waybar.enable = true;
spicetify.enable = true; spicetify.enable = true;

View file

@ -1,10 +1,10 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
with lib; with lib;
let let
cfg = config.modules.programs.helix; cfg = config.modules.editors.helix;
username = config.modules.other.system.username; username = config.modules.other.system.username;
in { in {
options.modules.programs.helix.enable = mkEnableOption "helix"; options.modules.editors.helix.enable = mkEnableOption "helix";
config = mkIf cfg.enable { config = mkIf cfg.enable {
home-manager.users.${username} = { home-manager.users.${username} = {

View file

@ -1,11 +1,11 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
with lib; with lib;
let let
cfg = config.modules.programs.kakoune; cfg = config.modules.editors.kakoune;
username = config.modules.other.system.username; username = config.modules.other.system.username;
# inherit (inputs.kakoune.packages.${pkgs.system}) kakoun; # inherit (inputs.kakoune.packages.${pkgs.system}) kakoun;
in { in {
options.modules.programs.kakoune.enable = mkEnableOption "kakoune"; options.modules.editors.kakoune.enable = mkEnableOption "kakoune";
config = mkIf cfg.enable { config = mkIf cfg.enable {
home-manager.users.${username} = { home-manager.users.${username} = {

View file

@ -13,7 +13,6 @@ _: {
./rofi.nix ./rofi.nix
./kitty.nix ./kitty.nix
./vivado.nix ./vivado.nix
./firefox.nix
./steam.nix ./steam.nix
./waybar.nix ./waybar.nix
./schizofox.nix ./schizofox.nix

View file

@ -1,10 +1,3 @@
_: { _: {
imports = [ imports = [ ./btop.nix ./neovim.nix ./newsboat.nix ./ncmpcpp.nix ./yazi.nix ];
./btop.nix
./helix.nix
./neovim.nix
./newsboat.nix
./ncmpcpp.nix
./yazi.nix
];
} }

View file

@ -5,9 +5,10 @@ let
hyprland = config.modules.wms.wayland.hyprland; hyprland = config.modules.wms.wayland.hyprland;
in { in {
options.modules.wms.wayland.enable = mkEnableOption "wayland"; options.modules.wms.wayland.enable = mkEnableOption "wayland";
options.modules.wms.wayland.hyprland.enable = mkEnableOption "hyprland"; # options.modules.wms.wayland.hyprland.enable = mkEnableOption "hyprland";
config = mkIf cfg.enable lib.mkMerge [ config = mkIf cfg.enable {
{ # lib.mkMerge [
# {
environment.variables = { environment.variables = {
NIXOS_OZONE_WL = "1"; NIXOS_OZONE_WL = "1";
__GL_GSYNC_ALLOWED = "0"; __GL_GSYNC_ALLOWED = "0";
@ -30,24 +31,24 @@ in {
SDL_VIDEODRIVER = "wayland"; SDL_VIDEODRIVER = "wayland";
CLUTTER_BACKEND = "wayland"; CLUTTER_BACKEND = "wayland";
# WLR_DRM_DEVICES = "/dev/dri/card1:/dev/dri/card0"; # WLR_DRM_DEVICES = "/dev/dri/card1:/dev/dri/card0";
}; # };
} # }
# Session variables for Hyprland # Session variables for Hyprland
(lib.mkIf (hyprland.enable) { # (lib.mkIf (hyprland.enable) {
environment.variables = { # environment.variables = {
LIBVA_DRIVER_NAME = "nvidia"; LIBVA_DRIVER_NAME = "nvidia";
GTK_USE_PORTAL = "1"; GTK_USE_PORTAL = "1";
NIXOS_XDG_OPEN_USE_PORTAL = "1"; NIXOS_XDG_OPEN_USE_PORTAL = "1";
XDG_CURRENT_DESKTOP = "Hyprland"; XDG_CURRENT_DESKTOP = "Hyprland";
XDG_SESSION_DESKTOP = "Hyprland"; XDG_SESSION_DESKTOP = "Hyprland";
SDL_VIDEODRIVER = "wayland";
# GDK_BACKEND = "wayland"; # GDK_BACKEND = "wayland";
WLR_RENDERER_ALLOW_SOFTWARE = "1"; WLR_RENDERER_ALLOW_SOFTWARE = "1";
QT_QPA_PLATFORM = "wayland"; # QT_QPA_PLATFORM = "wayland";
# Needed anymore? # Needed anymore?
LIBSEAT_BACKEND = "logind"; LIBSEAT_BACKEND = "logind";
# WLR_NO_HARDWARE_CURSORS = "1"; # WLR_NO_HARDWARE_CURSORS = "1";
}; };
}) # })
]; # ];
};
} }

View file

@ -1,8 +1,4 @@
{ pkgs, config, inputs, ... }: { pkgs, config, inputs, ... }: {
let
# pkgs-unstable =
# inputs.hyprland.inputs.nixpkgs.legacyPackages.${pkgs.stdenv.hostPlatform.system};
in {
services.xserver.videoDrivers = [ "nvidia" ]; services.xserver.videoDrivers = [ "nvidia" ];
hardware.opengl = { hardware.opengl = {
enable = true; enable = true;
@ -16,7 +12,14 @@ in {
powerManagement.enable = false; powerManagement.enable = false;
powerManagement.finegrained = false; powerManagement.finegrained = false;
nvidiaSettings = false; nvidiaSettings = false;
package = config.boot.kernelPackages.nvidiaPackages.beta; # package = config.boot.kernelPackages.nvidiaPackages.beta;
package = config.boot.kernelPackages.nvidiaPackages.mkDriver {
version = "555.42.02";
sha256_64bit = "sha256-k7cI3ZDlKp4mT46jMkLaIrc2YUx1lh1wj/J4SVSHWyk=";
openSha256 = "sha256-3/eI1VsBzuZ3Y6RZmt3Q5HrzI2saPTqUNs6zPh5zy6w=";
settingsSha256 = "";
persistencedSha256 = "";
};
}; };
} }