From 3b62fac3143bc33a20fbb3a816661e62abedece3 Mon Sep 17 00:00:00 2001 From: Gustav Bruhn Date: Mon, 11 Aug 2025 17:27:05 +0200 Subject: [PATCH] testing --- flake.lock | 24 ++++++++++++------------ hosts/framework/configuration.nix | 11 +++++++---- hosts/framework/home.nix | 3 ++- modules/home-manager/dots/config.kdl | 13 ++++++++----- modules/home-manager/niri.nix | 21 +++++++++++++-------- modules/options.nix | 14 +++++++------- 6 files changed, 49 insertions(+), 37 deletions(-) diff --git a/flake.lock b/flake.lock index 0833840..830574b 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1753056897, - "narHash": "sha256-AVVMBFcuOXqIgmShvRv9TED3fkiZhQ0ZvlhsPoFfkNE=", + "lastModified": 1754886238, + "narHash": "sha256-LTQomWOwG70lZR+78ZYSZ9sYELWNq3HJ7/tdHzfif/s=", "owner": "nix-community", "repo": "home-manager", - "rev": "13a83d1b6545b7f0e8f7689bad62e7a3b1d63771", + "rev": "0d492b89d1993579e63b9dbdaed17fd7824834da", "type": "github" }, "original": { @@ -22,11 +22,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1752666637, - "narHash": "sha256-P8J72psdc/rWliIvp8jUpoQ6qRDlVzgSDDlgkaXQ0Fw=", + "lastModified": 1754564048, + "narHash": "sha256-dz303vGuzWjzOPOaYkS9xSW+B93PSAJxvBd6CambXVA=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "d1bfa8f6ccfb5c383e1eba609c1eb67ca24ed153", + "rev": "26ed7a0d4b8741fe1ef1ee6fa64453ca056ce113", "type": "github" }, "original": { @@ -38,11 +38,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1752950548, - "narHash": "sha256-NS6BLD0lxOrnCiEOcvQCDVPXafX1/ek1dfJHX1nUIzc=", + "lastModified": 1754725699, + "narHash": "sha256-iAcj9T/Y+3DBy2J0N+yF9XQQQ8IEb5swLFzs23CdP88=", "owner": "nixos", "repo": "nixpkgs", - "rev": "c87b95e25065c028d31a94f06a62927d18763fdf", + "rev": "85dbfc7aaf52ecb755f87e577ddbe6dbbdbc1054", "type": "github" }, "original": { @@ -67,11 +67,11 @@ ] }, "locked": { - "lastModified": 1752725859, - "narHash": "sha256-kjpmc7Y164ajPdscAZLFQTtzXP5sEE2dR30NuHe5lQY=", + "lastModified": 1754886070, + "narHash": "sha256-MZDmxOkVKL1HY72bliN8Gxh0SYkHUa3W/1fTU2ke36I=", "owner": "youwen5", "repo": "zen-browser-flake", - "rev": "2276ddce91a949e0819d9e8c4b171c40ce770390", + "rev": "e37d2b326311320c8571111b3ef89b29d26d4b64", "type": "github" }, "original": { diff --git a/hosts/framework/configuration.nix b/hosts/framework/configuration.nix index ba00c92..684898b 100644 --- a/hosts/framework/configuration.nix +++ b/hosts/framework/configuration.nix @@ -28,14 +28,16 @@ x11Support = false; enable = true; }; - niri.enable = true; + myOptions.niri.enable = true; environment.etc."active-specialisation".text = "wm"; programs.niri.enable = true; environment.systemPackages = with pkgs; [ ghostty fuzzel ]; + services.gnome.gnome-keyring.enable = true; + security.pam.services.swaylock = {}; }; }; }; @@ -103,10 +105,11 @@ users.defaultUserShell = pkgs.zsh; home-manager = { - extraSpecialArgs = {inherit inputs;}; - users = { - "bruhng" = import ./home.nix; + extraSpecialArgs = { + inherit inputs pkgs; + myOptions = config.myOptions; }; + users."bruhng" = import ./home.nix; }; # Allow unfree packages diff --git a/hosts/framework/home.nix b/hosts/framework/home.nix index 4d36757..57e57ea 100644 --- a/hosts/framework/home.nix +++ b/hosts/framework/home.nix @@ -1,11 +1,12 @@ { - config, + myOptions, pkgs, ... }: { imports = [ ../../modules/home-manager/helix.nix ../../modules/home-manager/zsh.nix + ../../modules/home-manager/niri.nix ]; home.username = "bruhng"; home.homeDirectory = "/home/bruhng"; diff --git a/modules/home-manager/dots/config.kdl b/modules/home-manager/dots/config.kdl index 0805a3f..2feaeac 100644 --- a/modules/home-manager/dots/config.kdl +++ b/modules/home-manager/dots/config.kdl @@ -23,7 +23,7 @@ input { // Omitting settings disables them, or leaves them at their default values. touchpad { // off - tap + // tap // dwt // dwtp // drag-lock @@ -32,6 +32,7 @@ input { // accel-profile "flat" // scroll-method "two-finger" // disabled-on-external-mouse + click-method "clickfinger" } mouse { @@ -66,7 +67,7 @@ input { // Find more information on the wiki: // https://github.com/YaLTeR/niri/wiki/Configuration:-Outputs // Remember to uncomment the node by removing "/-"! -/-output "eDP-1" { +output "eDP-1" { // Uncomment this line to disable this output. // off @@ -76,10 +77,10 @@ input { // for the resolution. // If the mode is omitted altogether or is invalid, niri will pick one automatically. // Run `niri msg outputs` while inside a niri instance to list all outputs and their modes. - mode "1920x1080@120.030" + mode "2880x1920@120.000" // You can use integer or fractional scale, for example use 1.5 for 150% scale. - scale 2 + scale 1.5 // Transform allows to rotate the output counter-clockwise, valid values are: // normal, 90, 180, 270, flipped, flipped-90, flipped-180 and flipped-270. @@ -94,7 +95,7 @@ input { // so to put another output directly adjacent to it on the right, set its x to 1920. // If the position is unset or results in an overlap, the output is instead placed // automatically. - position x=1280 y=0 + position x=0 y=0 } // Settings that influence how windows are positioned and sized. @@ -248,6 +249,8 @@ layout { // which may be more convenient to use. // See the binds section below for more spawn examples. // spawn-at-startup "alacritty" "-e" "fish" +spawn-at-startup "waybar" +spawn-at-startup "swww-daemon" // Uncomment this line to ask the clients to omit their client-side decorations if possible. // If the client will specifically ask for CSD, the request will be honored. diff --git a/modules/home-manager/niri.nix b/modules/home-manager/niri.nix index dfc2220..f4b6020 100644 --- a/modules/home-manager/niri.nix +++ b/modules/home-manager/niri.nix @@ -1,13 +1,18 @@ { - config, + myOptions, + pkgs, lib, ... -}: { - imprts = [ - ../options.nix +}: +lib.mkIf myOptions.niri.enable +{ + xdg.configFile."niri/config.kdl".source = ./dots/config.kdl; + programs.swaylock.enable = true; + programs.waybar.enable = true; + services.mako.enable = true; + services.swayidle.enable = true; + services.polkit-gnome.enable = true; + home.packages = with pkgs; [ + swww ]; - config = lib.mkIf config.niri.enable { - xdg.configFile."niri/config.kdl".source = ./dots/config.kdl; - progras.swaylock.enable = true; - }; } diff --git a/modules/options.nix b/modules/options.nix index 7681fdd..3499c75 100644 --- a/modules/options.nix +++ b/modules/options.nix @@ -1,8 +1,8 @@ -# /etc/nixos/my-module.nix -{ - config, - lib, - ... -}: { - options.niri.enable = lib.mkEnableOption "Enable niri with all its dependecis"; +# modules/my-options.nix +{lib, ...}: { + options = { + myOptions = { + niri.enable = lib.mkEnableOption "Enable niri with all its dependencies"; + }; + }; }