From 467a13922d53985fb185277616c748f41db3b13c Mon Sep 17 00:00:00 2001 From: Rhea Date: Sun, 13 Oct 2024 20:01:55 +0200 Subject: [PATCH] =?UTF-8?q?feat:=20Hyprland=20l=C3=A4uft=20jetzt=20und=20g?= =?UTF-8?q?it=20hoffentlich=20auch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- flake.nix | 2 ++ home/default.nix | 31 +++++++++++++++++++++++++------ home/git.nix | 7 +++++++ home/hyprland.nix | 19 +++++++------------ modules/configuration.nix | 13 ++++++------- modules/shell.nix | 5 +++++ modules/wayland.nix | 11 +++++++++++ 7 files changed, 63 insertions(+), 25 deletions(-) create mode 100644 home/git.nix create mode 100644 modules/shell.nix create mode 100644 modules/wayland.nix diff --git a/flake.nix b/flake.nix index d1b5db2..4a200cd 100644 --- a/flake.nix +++ b/flake.nix @@ -19,6 +19,8 @@ modules = [ ./modules/configuration.nix ./modules/hardware-configuration.nix + ./modules/shell.nix + ./modules/wayland.nix ./home # ./modules/hyprland.nix ]; diff --git a/home/default.nix b/home/default.nix index ce63538..d078641 100644 --- a/home/default.nix +++ b/home/default.nix @@ -3,13 +3,32 @@ imports = [ # inputs.home-manager.nixosModules.home-manager - ./hyprland.nix ]; - home-manager.users.rhea = { - /* The home.stateVersion option does not have a default and must be set */ - home.stateVersion = "18.09"; - /* Here goes the rest of your home-manager config, e.g. home.packages = [ pkgs.foo ]; */ - # inherit ./hyprland.nix; + home-manager = { + useUserPackages = true; + useGlobalPkgs = true; + users.rhea = { + /* The home.stateVersion option does not have a default and must be set */ + home.stateVersion = "24.05"; + /* Here goes the rest of your home-manager config, e.g. home.packages = [ pkgs.foo ]; */ + # inherit ./hyprland.nix; + home.username = "rhea"; + home.homeDirectory = "/home/rhea"; + programs.home-manager.enable = true; + + imports = [ + ./hyprland.nix + ]; + }; }; + + users.users.rhea = { + isNormalUser = true; + description = "Rhea"; + extraGroups = [ "networkmanager" "wheel" ]; + shell = pkgs.zsh; + }; + + nix.settings.allowed-users = [ "rhea" ]; } diff --git a/home/git.nix b/home/git.nix new file mode 100644 index 0000000..fb898c8 --- /dev/null +++ b/home/git.nix @@ -0,0 +1,7 @@ +{ + programs.git = { + enable = true; + userName = "EinEtwas"; + userEmail = "ein@etwas.me"; + }; +} diff --git a/home/hyprland.nix b/home/hyprland.nix index e18dcc5..fdb68b7 100644 --- a/home/hyprland.nix +++ b/home/hyprland.nix @@ -1,9 +1,4 @@ { lib, inputs, pkgs, ... }: { - imports = [ - # - inputs.home-manager.nixosModules.home-manager - ]; - wayland.windowManager.hyprland = { enable = true; #package = pkgs.hyprland-patched; @@ -16,15 +11,15 @@ monitor = ",highres,auto,auto"; input = { - kb_layout = "us"; - kb_variant = ""; + kb_layout = "de"; + kb_variant = "neo_qwertz"; kb_model = ""; kb_options = ""; kb_rules = ""; follow_mouse = 1; touchpad = { - natural_scroll = true; + natural_scroll = false; disable_while_typing = false; }; @@ -71,7 +66,7 @@ master = { # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more - # new_is_master = true; + new_status = "master"; }; misc = { @@ -93,7 +88,7 @@ gestures = { # See https://wiki.hyprland.org/Configuring/Variables/ for more workspace_swipe = true; - workspace_swipe_fingers = 4; + workspace_swipe_fingers = 3; }; windowrulev2 = [ @@ -109,7 +104,7 @@ bind = let #wlogout = lib.getExe pkgs.wlogout; #wofi = lib.getExe pkgs.wofi; - #alacritty = lib.getExe pkgs.alacritty; + alacritty = lib.getExe pkgs.alacritty; #firefox = lib.getExe pkgs.firefox; #thunar = lib.getExe pkgs.xfce.thunar; #grimblast = lib.getExe inputs.hyprwm-contrib.packages.${pkgs.system}.grimblast; @@ -117,7 +112,7 @@ in [ "$mod,M,exit," - #"$mod,Return,exec,${alacritty}" + "$mod,Return,exec,${alacritty}" "$mod,Q,killactive," #"$mod SHIFT,W,exec,${firefox}" #"$mod,E,exec,${thunar}" diff --git a/modules/configuration.nix b/modules/configuration.nix index f1cbc2c..5693f6b 100644 --- a/modules/configuration.nix +++ b/modules/configuration.nix @@ -51,12 +51,12 @@ services.fprintd.enable = true; # Define a user account. Don't forget to set a password with ‘passwd’. - users.users.rhea = { - isNormalUser = true; - description = "Rhea"; - extraGroups = [ "networkmanager" "wheel" ]; - packages = with pkgs; [ wayland ]; - }; + #users.users.rhea = { + # isNormalUser = true; + # description = "Rhea"; + # extraGroups = [ "networkmanager" "wheel" ]; + # packages = with pkgs; [ ]; + #}; # Allow unfree packages nixpkgs.config.allowUnfree = true; @@ -70,7 +70,6 @@ kitty chromium #home-manager - wayland ]; # Enable Flakes diff --git a/modules/shell.nix b/modules/shell.nix new file mode 100644 index 0000000..e11c81e --- /dev/null +++ b/modules/shell.nix @@ -0,0 +1,5 @@ +{ + programs.zsh.enable = true; + programs.zsh.ohMyZsh.enable = true; + programs.zsh.ohMyZsh.theme = "agnoster"; +} diff --git a/modules/wayland.nix b/modules/wayland.nix new file mode 100644 index 0000000..dbaf82c --- /dev/null +++ b/modules/wayland.nix @@ -0,0 +1,11 @@ +{ inputs, pkgs, ... }: { + programs.hyprland.enable = true; + xdg.portal = { + enable = true; + wlr.enable = true; + xdgOpenUsePortal = true; + extraPortals = [ + pkgs.xdg-desktop-portal-hyprland + ]; + }; +}