From 20e93cb39e334c8b564e960bab33c2c130406364 Mon Sep 17 00:00:00 2001 From: Sakooooo <78461130+Sakooooo@users.noreply.github.com> Date: Thu, 18 Jul 2024 22:05:29 +0400 Subject: [PATCH] add i3 module --- modules/desktop/default.nix | 1 + modules/desktop/i3/default.nix | 109 +++++++++++++++++++++++++++++++++ 2 files changed, 110 insertions(+) create mode 100644 modules/desktop/i3/default.nix diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix index dfc9aed6..c9d121da 100644 --- a/modules/desktop/default.nix +++ b/modules/desktop/default.nix @@ -8,6 +8,7 @@ ./xmonad ./qtile ./exwm + ./i3 # desktop environ men t s s s s ./kde ./gnome diff --git a/modules/desktop/i3/default.nix b/modules/desktop/i3/default.nix new file mode 100644 index 00000000..c0c8915f --- /dev/null +++ b/modules/desktop/i3/default.nix @@ -0,0 +1,109 @@ +{ + outputs, + options, + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.modules.desktop.i3; +in { + options.modules.desktop.i3 = { + enable = mkEnableOption false; + }; + + config = mkIf cfg.enable { + # this is needed for gtk configuration to work + programs.dconf.enable = true; + + # keyring + services.gnome.gnome-keyring.enable = true; + + # ???????????? + services.libinput = { + enable = true; + # no mouse accel + mouse = { + accelProfile = "flat"; + }; + + # no touchpad accel + touchpad = { + accelProfile = "flat"; + }; + }; + + services.displayManager.defaultSession = "none+i3"; + + services.xserver = { + enable = true; + windowManager.i3 = { + enable = true; + extraPackages = with pkgs; [ + dmenu + i3status + i3lock + ]; + }; + displayManager = { + lightdm = { + enable = true; + background = ../../../config/background.png; + greeters.mini = { + enable = true; + user = "sako"; + extraConfig = '' + [greeter] + show-password-label = true + password-label-text = magic word + invalid-password-text = skull issue + ''; + }; + }; + }; + }; + users.users.sako.packages = with pkgs; [ + rofi + # network + networkmanagerapplet + # brightness + brightnessctl + # gee tee k + vimix-gtk-themes + vimix-icon-theme + lxappearance + catppuccin-cursors.mochaDark + # screen shot (s) + flameshot + ]; + + home-manager.users.sako = {pkgs, ...}: { + home.pointerCursor = { + name = "Catppuccin-Mocha-Dark"; + size = 16; + x11 = { + enable = true; + }; + gtk.enable = true; + package = pkgs.catppuccin-cursors.mochaDark; + }; + gtk = { + enable = true; + theme.name = "vimix-dark-ruby"; + iconTheme.name = "Vimix Ruby Dark"; + }; + home.file = { + "background.png" = { + enable = true; + source = ../../../config/background.png; + }; + }; + # xdg.configFile = { + # sxhkd = { + # source = ../../../config/sxhkd; + # }; + # }; + }; + }; +}