diff options
| author | Raghuram Subramani <raghus2247@gmail.com> | 2024-11-04 10:06:11 +0530 | 
|---|---|---|
| committer | Raghuram Subramani <raghus2247@gmail.com> | 2024-11-04 10:06:11 +0530 | 
| commit | 53a39bc6f60b8d19964a64583fbf10088b7c8d20 (patch) | |
| tree | 48fbaf3ed1cf3450a570d373a95fb23db88636d2 | |
| parent | b13a66ee6f5c5bad7425a2cdbb64ddb4267bcf9a (diff) | |
(update): dwl, vm config
| -rw-r--r-- | config/dwl.nix | 5 | ||||
| -rw-r--r-- | config/swaylock/config | 2 | ||||
| -rw-r--r-- | machines/v/home.nix | 40 | ||||
| -rw-r--r-- | machines/vm/home.nix (renamed from machines/d/home.nix) | 10 | ||||
| -rw-r--r-- | machines/x/configuration.nix | 13 | ||||
| -rw-r--r-- | machines/x/home.nix | 10 | ||||
| -rw-r--r-- | modules/core/bluetooth.nix | 2 | ||||
| -rw-r--r-- | modules/laptop.nix | 4 | ||||
| -rw-r--r-- | modules/login.nix | 3 | ||||
| -rw-r--r-- | modules/virtualization.nix | 1 | ||||
| -rw-r--r-- | modules/wm_utils.nix | 4 | ||||
| -rw-r--r-- | packages/dwl.nix | 2 | ||||
| -rw-r--r-- | packages/wayland-protocols.nix | 55 | ||||
| -rw-r--r-- | packages/wlroots.nix | 4 | 
14 files changed, 91 insertions, 64 deletions
| diff --git a/config/dwl.nix b/config/dwl.nix index 241d7f9..72c59e1 100644 --- a/config/dwl.nix +++ b/config/dwl.nix @@ -1,8 +1,9 @@  { pkgs, home, ... }:  let -  wlroots = pkgs.callPackage ../packages/wlroots.nix {}; -  dwl = (pkgs.callPackage ../packages/dwl.nix { inherit wlroots; }); +  wayland-protocols = pkgs.callPackage ../packages/wayland-protocols.nix {}; +  wlroots = pkgs.callPackage ../packages/wlroots.nix { inherit wayland-protocols; }; +  dwl = (pkgs.callPackage ../packages/dwl.nix { inherit wlroots; inherit wayland-protocols; });    dwlb = (pkgs.callPackage ../packages/dwlb.nix {});  in {    home.packages = [ dwl dwlb ]; diff --git a/config/swaylock/config b/config/swaylock/config index 4ca899f..3294324 100644 --- a/config/swaylock/config +++ b/config/swaylock/config @@ -1,4 +1,4 @@ -image=/etc/nixos/dist/wallpaper.jpg +image=/config/dist/wallpaper.jpg  font=UbuntuMono Nerd Font Mono  bs-hl-color=f5e0dc diff --git a/machines/v/home.nix b/machines/v/home.nix deleted file mode 100644 index 201d8db..0000000 --- a/machines/v/home.nix +++ /dev/null @@ -1,40 +0,0 @@ -{ pkgs, ... }: - -{ -  nixpkgs.config.allowUnfree = true; - -  home = { -    username = "vagrant"; -    homeDirectory = "/home/vagrant"; -  }; - -  home.packages = with pkgs; [ -    wget - -    tmux -    fzf -    fd -    ripgrep - -    unzip -    zip - -    pyright -    git-lfs -  ]; - -  programs.bash.initExtra = '' -    . "$HOME/.nix-profile/etc/profile.d/nix.sh" -    alias ls="ls --color=auto" -  ''; - -  imports = (map (path: ../../config/${path}) [ -    "bash.nix" -    "dotfiles.nix" -    "git" -    "nvim" -  ]); - -  home.stateVersion = "23.11"; -  programs.home-manager.enable = true; -} diff --git a/machines/d/home.nix b/machines/vm/home.nix index 41b1380..7aca730 100644 --- a/machines/d/home.nix +++ b/machines/vm/home.nix @@ -22,6 +22,16 @@      git-lfs    ]; +  programs = { +    direnv = { +      enable = true; +      enableBashIntegration = true; +      nix-direnv.enable = true; +    }; + +    bash.enable = true; +  }; +    programs.bash.initExtra = ''      . "$HOME/.nix-profile/etc/profile.d/nix.sh"      alias ls="ls --color=auto" diff --git a/machines/x/configuration.nix b/machines/x/configuration.nix index fbd553f..c26d6b5 100644 --- a/machines/x/configuration.nix +++ b/machines/x/configuration.nix @@ -27,10 +27,10 @@ in {      "virtualization.nix"      "remapcapslock.nix" -    # "wm_utils.nix" -    # "polkit.nix" +    "wm_utils.nix" +    "polkit.nix"      "login.nix" -    "plasma.nix" +    # "plasma.nix"    ]);    boot.loader = { @@ -56,10 +56,6 @@ in {    networking.hostName = "x"; -  environment.variables = { -    XCURSOR_SIZE = "16"; -  }; -    programs.fuse.userAllowOther = true;    home-manager = {      extraSpecialArgs = { inherit inputs; }; @@ -70,7 +66,6 @@ in {    networking.extraHosts =    '' -    127.0.0.1 download.labsmartlis.local -    192.168.1.186 cacer.local c +    192.168.122.100 android    '';  } diff --git a/machines/x/home.nix b/machines/x/home.nix index a769073..6a3cd25 100644 --- a/machines/x/home.nix +++ b/machines/x/home.nix @@ -54,11 +54,11 @@      "nvim"      # "qtile" -    # "dwl.nix" -    # "themes.nix" -    # "way-displays" -    # "swaylock" -    # "dunst" +    "dwl.nix" +    "themes.nix" +    "way-displays" +    "swaylock" +    "dunst"      "alacritty"    ]); diff --git a/modules/core/bluetooth.nix b/modules/core/bluetooth.nix index fbd9b48..5e64d97 100644 --- a/modules/core/bluetooth.nix +++ b/modules/core/bluetooth.nix @@ -3,5 +3,5 @@  {    hardware.bluetooth.enable = true;    hardware.bluetooth.powerOnBoot = true; -  # services.blueman.enable = true; +  services.blueman.enable = true;  } diff --git a/modules/laptop.nix b/modules/laptop.nix index 092e61f..3dfdd29 100644 --- a/modules/laptop.nix +++ b/modules/laptop.nix @@ -1,7 +1,7 @@  { pkgs, config, ... }:  { -  /* services.tlp = { +  services.tlp = {      enable = true;      settings = {        CPU_SCALING_GOVERNOR_ON_AC = "performance"; @@ -10,7 +10,7 @@        CPU_ENERGY_PERF_POLICY_ON_BAT = "power";        CPU_ENERGY_PERF_POLICY_ON_AC = "performance";      }; -  }; */ +  };    boot = {      kernelModules = [ "acpi_call" ]; diff --git a/modules/login.nix b/modules/login.nix index ab32e2d..0789cff 100644 --- a/modules/login.nix +++ b/modules/login.nix @@ -10,7 +10,8 @@      enable = true;      settings = {        default_session = { -        command = "tuigreet --time --remember --cmd \"startplasma-wayland\""; +        # command = "tuigreet --time --remember --cmd \"startplasma-wayland\""; +        command = "tuigreet --time --remember --cmd \"dwl -s dwlb\"";          user = "greeter";        };      }; diff --git a/modules/virtualization.nix b/modules/virtualization.nix index 8ea8fed..28d9fe1 100644 --- a/modules/virtualization.nix +++ b/modules/virtualization.nix @@ -27,6 +27,7 @@      pkgs.libvirt      #pkgs.vagrant      pkgs.virt-viewer +    pkgs.guestfs-tools      (pkgs.writeShellScriptBin "pin-cpu" ''        if [[ $1 == "" ]]; then diff --git a/modules/wm_utils.nix b/modules/wm_utils.nix index c61bba4..da5c672 100644 --- a/modules/wm_utils.nix +++ b/modules/wm_utils.nix @@ -22,5 +22,9 @@    xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-wlr pkgs.xdg-desktop-portal ];    xdg.portal.config.common.default = "wlr"; +  environment.variables = { +    XCURSOR_SIZE = "16"; +  }; +    services.dbus.enable = true;  } diff --git a/packages/dwl.nix b/packages/dwl.nix index 28f3cdd..5a9e9dd 100644 --- a/packages/dwl.nix +++ b/packages/dwl.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation (finalAttrs: {      owner = "compromyse";      repo = "dwl";      rev = "compromyse"; -    hash = "sha256-PP9abXvvnfig9rErtMLI50DwydLKng6XuOhXbYys2EY="; +    hash = "sha256-nyMxMuhtk/VczZmheknnFitbKZwYeBV3G7xyVFPzi4M=";    };    nativeBuildInputs = [ diff --git a/packages/wayland-protocols.nix b/packages/wayland-protocols.nix new file mode 100644 index 0000000..76976be --- /dev/null +++ b/packages/wayland-protocols.nix @@ -0,0 +1,55 @@ +{ lib, stdenv, fetchurl +, pkg-config +, meson, ninja, wayland-scanner +, python3, wayland +, gitUpdater, testers +}: + +stdenv.mkDerivation (finalAttrs: { +  pname = "wayland-protocols"; +  version = "1.38"; + +  doCheck = stdenv.hostPlatform == stdenv.buildPlatform && +  # https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/48 +  stdenv.hostPlatform.linker == "bfd" && lib.meta.availableOn stdenv.hostPlatform wayland; + +  src = fetchurl { +    url = "https://gitlab.freedesktop.org/wayland/${finalAttrs.pname}/-/releases/${finalAttrs.version}/downloads/${finalAttrs.pname}-${finalAttrs.version}.tar.xz"; +    hash = "sha256-/xcpLAUVnSsgzmys/kLX4xooGY+hQpp2mwOvfDhYHb4="; +  }; + +  postPatch = lib.optionalString finalAttrs.doCheck '' +    patchShebangs tests/ +  ''; + +  depsBuildBuild = [ pkg-config ]; +  nativeBuildInputs = [ meson ninja wayland-scanner ]; +  nativeCheckInputs = [ python3 ]; +  checkInputs = [ wayland ]; + +  mesonFlags = [ "-Dtests=${lib.boolToString finalAttrs.doCheck}" ]; + +  meta = { +    description = "Wayland protocol extensions"; +    longDescription = '' +      wayland-protocols contains Wayland protocols that add functionality not +      available in the Wayland core protocol. Such protocols either add +      completely new functionality, or extend the functionality of some other +      protocol either in Wayland core, or some other protocol in +      wayland-protocols. +    ''; +    homepage    = "https://gitlab.freedesktop.org/wayland/wayland-protocols"; +    license     = lib.licenses.mit; # Expat version +    platforms   = lib.platforms.all; +    maintainers = with lib.maintainers; [ primeos ]; +    pkgConfigModules = [ "wayland-protocols" ]; +  }; + +  passthru.updateScript = gitUpdater { +    url = "https://gitlab.freedesktop.org/wayland/wayland-protocols.git"; +  }; +  passthru.version = finalAttrs.version; +  passthru.tests.pkg-config = testers.hasPkgConfigModules { +    package = finalAttrs.finalPackage; +  }; +}) diff --git a/packages/wlroots.nix b/packages/wlroots.nix index 6d8a2b3..c632018 100644 --- a/packages/wlroots.nix +++ b/packages/wlroots.nix @@ -15,8 +15,8 @@ let      repo = "wlroots";      repo_git = "https://${domain}/${owner}/${repo}";      branch = "master"; -    rev = "47fb00f66d5a8367d0108bd960f99e51ab1a1318"; -    sha256 = "sha256-HkpTML14tbYBLiHkqoFRSn/qKsVny/oso2TuG6LY/fk="; +    rev = "d835fa813f82501eb668708af33afc42010707cf"; +    sha256 = "sha256-YXLa0fjqND7Gys4KK/CZmRqGU70gMVqU3T+j+e6S9qw=";    };    ignore = [      "wlroots" | 
