Adding firefox, sway stuff and initial setup of rofi

This commit is contained in:
Erwin Boskma 2021-11-03 23:05:12 +01:00
parent cc6cdac9c0
commit 3fd137aad3
Signed by: erwin
GPG key ID: B4F4B090E4BD95A9
9 changed files with 113 additions and 1 deletions

View file

@ -22,6 +22,10 @@
inherit (util) user;
inherit (util) host;
inherit (import ./pkgs {
inherit pkgs;
}) myPkgs;
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;

View file

@ -6,8 +6,12 @@ let
in
{
options.erwin.applications = {
enable = mkOption {
enable = mkEnableOption {
description = "Enable a set of common applications";
};
work = mkOption {
description = "Is this a work config?";
type = types.bool;
default = false;
};
@ -31,6 +35,7 @@ in
programs = {
alacritty = import ./alacritty.nix;
firefox = import ./firefox.nix { work = cfg.work; };
};
};
}

View file

@ -0,0 +1,15 @@
{ work }: {
enable = true;
profiles = {
private = {
id = 0;
isDefault = !work;
};
horus = {
id = 1;
isDefault = work;
};
};
}

View file

@ -0,0 +1,19 @@
{ pkgs, config, lib, ... }:
with lib;
let cfg = config.erwin.rofi;
in
{
options.erwin.rofi = {
enable = mkEnableOption {
description = "Enable rofi";
};
};
config = mkIf (cfg.enable) {
programs.rofi = {
enable = true;
package = myPkgs.rofi-wayland;
};
};
}

View file

@ -40,5 +40,12 @@ in
programs.waybar = import ./waybar.nix { inherit pkgs config lib; };
home.file.".wallpapers".source = ./wallpapers;
systemd.user.targets.tray = {
Unit = {
Description = "Home Manager System Tray";
Requires = [ "graphical-session-pre.target" ];
};
};
};
}

View file

@ -54,6 +54,11 @@ in
bg = "~/.wallpapers/river-1920.png fill";
mode = "1920x1080@60Hz";
};
"DP-2" = {
bg = "~/.wallpapers/river-2560.png fill";
mode = "2560x1440@144Hz";
adaptive_sync = "on";
};
};
menu = "${pkgs.wofi}/bin/wofi --show drun -i | ${pkgs.findutils}/bin/xargs swaymsg exec --";

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 MiB

7
pkgs/default.nix Normal file
View file

@ -0,0 +1,7 @@
{ pkgs, ... }:
with pkgs;
{
myPkgs = {
rofi-wayland = callPackage ./rofi-wayland.nix { };
};
}

50
pkgs/rofi-wayland.nix Normal file
View file

@ -0,0 +1,50 @@
{ pkgs, ... }:
with pkgs;
stdenv.mkDerivation rec {
pname = "rofi-wayland-unwrapped";
version = "1.7.0";
src = fetchFromGitHub {
owner = "lbonn";
repo = "rofi";
rev = "${version}+wayland1";
fetchSubmodules = true;
sha256 = "1h6lh4lrkxzs6iy2rzn5g71dnz6qck4j8cxpgy1ja179vrnj1sf7";
};
preConfigure = ''
patchShebangs "script"
# root not present in build /etc/passwd
sed -i 's/~root/~nobody/g' test/helper-expand.c
'';
nativeBuildInputs = [ meson ninja pkgconfig ];
buildInputs = [
libxkbcommon
pango
cairo
git
bison
flex
librsvg
check
libstartup_notification
libxcb
xcbutil
xcbutilwm
xcbutilxrm
which
wayland-protocols
wayland
];
doCheck = false;
meta = with lib; {
description = "Window switcher, run dialog and dmenu replacement";
homepage = "https://github.com/davatorium/rofi";
license = licenses.mit;
maintainers = with maintainers; [ c0deaddict ];
platforms = with platforms; linux;
};
}