feat: add a lot of stuff
This commit is contained in:
parent
8eb88574fb
commit
6067f0ff0b
47 changed files with 578 additions and 136 deletions
12
flake.lock
generated
12
flake.lock
generated
|
|
@ -7,11 +7,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1693399033,
|
||||
"narHash": "sha256-yXhiMo8MnE86sGtPIHAKaLHhmhe8v9tqGGotlUgKJvY=",
|
||||
"lastModified": 1702203126,
|
||||
"narHash": "sha256-4BhN2Vji19MzRC7SUfPZGmtZ2WZydQeUk/ogfRBIZMs=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "f5c15668f9842dd4d5430787d6aa8a28a07f7c10",
|
||||
"rev": "defbb9c5857e157703e8fc7cf3c2ceb01cb95883",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -22,11 +22,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1693377291,
|
||||
"narHash": "sha256-vYGY9bnqEeIncNarDZYhm6KdLKgXMS+HA2mTRaWEc80=",
|
||||
"lastModified": 1702151865,
|
||||
"narHash": "sha256-9VAt19t6yQa7pHZLDbil/QctAgVsA66DLnzdRGqDisg=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "e7f38be3775bab9659575f192ece011c033655f0",
|
||||
"rev": "666fc80e7b2afb570462423cb0e1cf1a3a34fedd",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@
|
|||
specialArgs = inputs;
|
||||
modules = [
|
||||
|
||||
./hosts/W530
|
||||
./modules
|
||||
./hosts/W530
|
||||
|
||||
home-manager.nixosModules.home-manager
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,24 @@
|
|||
{ ... }: {
|
||||
|
||||
imports = [ ./hardware.nix ];
|
||||
|
||||
networking.hostName = "W530"; # Define your hostname.
|
||||
|
||||
bchmnn = {
|
||||
|
||||
gui = {
|
||||
enable = true;
|
||||
flavour = [ "sway" "i3" ];
|
||||
};
|
||||
nvidia.enable = false;
|
||||
audio.enable = true;
|
||||
bluetooth.enable = true;
|
||||
vpn.enable = true;
|
||||
|
||||
devenv.enable = true;
|
||||
virtualisation.enable = true;
|
||||
games.enable = true;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
{ config, lib, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
|
|
|
|||
|
|
@ -15,4 +15,6 @@
|
|||
nec = "sudo -E nvim -u $HOME/.config/nvim/init.lua --cmd 'cd /etc/nixos'";
|
||||
ncc = "sudo nixos-rebuild switch --upgrade-all --flake /etc/nixos";
|
||||
nup = "sudo nix-channel --update && sudo nixos-rebuild switch --upgrade-all --flake /etc/nixos";
|
||||
nuf = "sudo nix flake update --nix-path /etc/nixos && sudo nixos-rebuild switch --upgrade-all --flake /etc/nixos";
|
||||
wip = "curl -s 'https://nordvpn.com/wp-admin/admin-ajax.php?action=get_user_info_data' | jq";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{ ... }: {
|
||||
{ config, lib, ... }: lib.mkIf config.bchmnn.audio.enable {
|
||||
# Enable pipewire - audio
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{ ... }: {
|
||||
{ config, lib, ... }: lib.mkIf config.bchmnn.bluetooth.enable {
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,50 @@
|
|||
{
|
||||
{ lib, ... }: {
|
||||
|
||||
# options affecting multiple modules
|
||||
options.bchmnn = with lib; {
|
||||
|
||||
gui = {
|
||||
enable = mkEnableOption "gui";
|
||||
flavour = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ "sway" ];
|
||||
example = [ "sway" "i3" ];
|
||||
description = ''
|
||||
The flavour (WM) for your system to use
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
nvidia = {
|
||||
enable = mkEnableOption "nvidia";
|
||||
};
|
||||
|
||||
audio = {
|
||||
enable = mkEnableOption "audio";
|
||||
};
|
||||
|
||||
bluetooth = {
|
||||
enable = mkEnableOption "bluetooth";
|
||||
};
|
||||
|
||||
vpn = {
|
||||
enable = mkEnableOption "vpn";
|
||||
};
|
||||
|
||||
devenv = {
|
||||
enable = mkEnableOption "devenv";
|
||||
};
|
||||
|
||||
virtualisation = {
|
||||
enable = mkEnableOption "virtualisation";
|
||||
};
|
||||
|
||||
games = {
|
||||
enable = mkEnableOption "games";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
imports = [
|
||||
./audio.nix
|
||||
./bluetooth.nix
|
||||
|
|
@ -6,19 +52,24 @@
|
|||
./dbus.nix
|
||||
./fonts.nix
|
||||
./i18n.nix
|
||||
./kdeconnect.nix
|
||||
./keyd.nix
|
||||
./mozillavpn.nix
|
||||
./network.nix
|
||||
./nix.nix
|
||||
./nvidia.nix
|
||||
./opengl.nix
|
||||
./openssh.nix
|
||||
./power.nix
|
||||
./packages.nix
|
||||
./printing.nix
|
||||
./security.nix
|
||||
./shell.nix
|
||||
./steam.nix
|
||||
./udisks2.nix
|
||||
./unfree.nix
|
||||
./virtualisation.nix
|
||||
./xdg-portal.nix
|
||||
./xorg.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
3
modules/kdeconnect.nix
Normal file
3
modules/kdeconnect.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{ config, ... }: {
|
||||
programs.kdeconnect.enable = config.bchmnn.gui.enable;
|
||||
}
|
||||
|
|
@ -1,18 +1,4 @@
|
|||
{ ... }: {
|
||||
# Enable keyd and remap keys
|
||||
services.keyd = {
|
||||
enable = true;
|
||||
keyboards.default.settings = {
|
||||
main = {
|
||||
leftalt = "layer(meta)";
|
||||
leftmeta = "layer(alt)";
|
||||
altgr = "layer(control)";
|
||||
rightalt = "layer(control)";
|
||||
capslock = "layer(nav)";
|
||||
};
|
||||
meta = {
|
||||
capslock = "overload(nav, capslock)";
|
||||
};
|
||||
{ ... }: let
|
||||
nav = {
|
||||
h = "left";
|
||||
j = "down";
|
||||
|
|
@ -23,6 +9,54 @@
|
|||
u = "pageup";
|
||||
d = "pagedown";
|
||||
};
|
||||
alt = {
|
||||
a = "";
|
||||
o = "";
|
||||
u = "";
|
||||
s = "";
|
||||
e = "";
|
||||
};
|
||||
altShift = {
|
||||
a = "";
|
||||
o = "";
|
||||
u = "";
|
||||
};
|
||||
in {
|
||||
# Enable keyd and remap keys
|
||||
services.keyd = {
|
||||
enable = true;
|
||||
keyboards.default = {
|
||||
ids = [ "*" "-04fe:0020" ];
|
||||
settings = {
|
||||
main = {
|
||||
leftalt = "layer(meta)";
|
||||
leftmeta = "layer(alt)";
|
||||
altgr = "layer(control)";
|
||||
rightalt = "layer(control)";
|
||||
capslock = "layer(nav)";
|
||||
};
|
||||
alt = alt;
|
||||
"alt+shift" = altShift;
|
||||
meta = {
|
||||
capslock = "overload(nav, capslock)";
|
||||
};
|
||||
nav = nav;
|
||||
};
|
||||
};
|
||||
keyboards.hhkb = {
|
||||
ids = [ "04fe:0020" ];
|
||||
settings = {
|
||||
main = {
|
||||
rightmeta = "layer(control)";
|
||||
leftcontrol = "layer(nav)";
|
||||
};
|
||||
alt = alt;
|
||||
"alt+shift" = altShift;
|
||||
meta = {
|
||||
leftcontrol = "overload(nav, capslock)";
|
||||
};
|
||||
nav = nav;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
11
modules/mozillavpn.nix
Normal file
11
modules/mozillavpn.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{ config, lib, pkgs, ... }: lib.mkIf config.bchmnn.vpn.enable {
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
mozillavpn
|
||||
];
|
||||
|
||||
services.mozillavpn = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
{ config, ... }: {
|
||||
{ config, lib, pkgs, ... }: lib.mkIf config.bchmnn.nvidia.enable {
|
||||
|
||||
# services.xserver.videoDrivers = [ "nouveau" ];
|
||||
services.xserver.videoDrivers = [ "nouveau" ];
|
||||
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
# services.xserver.videoDrivers = [ "nvidia" ];
|
||||
|
||||
hardware.nvidia = {
|
||||
# Modesetting is needed for most Wayland compositors
|
||||
|
|
|
|||
8
modules/openssh.nix
Normal file
8
modules/openssh.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{ ... }: {
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
@ -1,10 +1,7 @@
|
|||
{ pkgs, ... }: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
{ lib, pkgs, config, ... }: {
|
||||
environment.systemPackages = with pkgs; with config.bchmnn; [
|
||||
pciutils
|
||||
qt5.qtwayland
|
||||
qt6.qtwayland
|
||||
xdg-utils # for opening default programs
|
||||
glib # gsettings
|
||||
usbutils
|
||||
git
|
||||
mercurial # contains 'hg'
|
||||
wget
|
||||
|
|
@ -12,8 +9,8 @@
|
|||
lsd
|
||||
ripgrep
|
||||
expect # contains 'unbuffer'
|
||||
# libs
|
||||
libnotify
|
||||
jq # parse json
|
||||
] ++ lib.optionals (devenv.enable) [
|
||||
# languages
|
||||
gcc13
|
||||
go
|
||||
|
|
@ -22,5 +19,14 @@
|
|||
gradle_7
|
||||
python312
|
||||
nodenv
|
||||
rustc
|
||||
cargo
|
||||
] ++ lib.optionals (gui.enable) [
|
||||
libnotify
|
||||
glib # gsettings
|
||||
xdg-utils # for opening default programs
|
||||
] ++ lib.optionals (gui.enable && lib.elem "sway" gui.flavour) [
|
||||
qt5.qtwayland
|
||||
qt6.qtwayland
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,13 @@
|
|||
{ ... }: {
|
||||
{ config, lib, ... }: {
|
||||
security.polkit.enable = true;
|
||||
|
||||
# rtkit is optional but recommended
|
||||
security.rtkit.enable = true;
|
||||
|
||||
} // (lib.mkIf (lib.elem "sway" config.bchmnn.gui.flavour) {
|
||||
|
||||
# TODO workaround to get swaylock accepting pw
|
||||
# https://github.com/NixOS/nixpkgs/issues/158025
|
||||
security.pam.services.swaylock = {};
|
||||
security.pam.services.swaylock = { };
|
||||
|
||||
}
|
||||
})
|
||||
|
|
|
|||
5
modules/steam.nix
Normal file
5
modules/steam.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{ config, lib, ... }: lib.mkIf config.bchmnn.games.enable {
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, ... }: {
|
||||
{ config, lib, pkgs, ... }: lib.mkIf config.bchmnn.virtualisation.enable {
|
||||
|
||||
# virt-manager
|
||||
virtualisation.libvirtd.enable = true;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
{ pkgs, ... }: {
|
||||
{ lib, config, ... }: lib.mkIf config.bchmnn.gui.enable {
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
wlr.enable = true;
|
||||
# gtk portal needed to make gtk apps happy
|
||||
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
||||
# extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
||||
# upper has been replaced by following
|
||||
config.common.default = "*";
|
||||
};
|
||||
}
|
||||
|
|
|
|||
12
modules/xorg.nix
Normal file
12
modules/xorg.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{ lib, config, ... }: with config.bchmnn; lib.mkIf (gui.enable && lib.elem "i3" gui.flavour) {
|
||||
|
||||
environment.pathsToLink = [ "/libexec" ]; # links /libexec from derivations to /run/current-system/sw
|
||||
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
displayManager.startx.enable = true;
|
||||
libinput.enable = true;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -27,5 +27,4 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
# programs.home-manager.enable = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{ ... }: {
|
||||
{ lib, nixosConfig, ... }: {
|
||||
|
||||
dconf.settings = {
|
||||
dconf.settings = lib.mkIf nixosConfig.bchmnn.virtualisation.enable {
|
||||
"org/virt-manager/virt-manager/connections" = {
|
||||
autoconnect = ["qemu:///system"];
|
||||
uris = ["qemu:///system"];
|
||||
|
|
|
|||
|
|
@ -1,25 +1,15 @@
|
|||
{
|
||||
imports = [
|
||||
./alacritty.nix
|
||||
./chromium.nix
|
||||
./dconf.nix
|
||||
./fzf.nix
|
||||
./gui
|
||||
./git.nix
|
||||
./gnupg.nix
|
||||
./kanshi.nix
|
||||
./keyring.nix
|
||||
./neovim.nix
|
||||
./obs.nix
|
||||
./packages.nix
|
||||
./playerctl.nix
|
||||
./ssh.nix
|
||||
./sway.nix
|
||||
./swaync
|
||||
./tmux.nix
|
||||
./udiskie.nix
|
||||
./vscode.nix
|
||||
./waybar.nix
|
||||
./wofi.nix
|
||||
./zsh.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
import ./flameshot.nix
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
{ pkgs, lib, ... }: {
|
||||
colorschemes = rec {
|
||||
custom = {
|
||||
black = "#000000";
|
||||
|
|
@ -18,4 +18,10 @@
|
|||
font = "DejaVuSansM Nerd Font";
|
||||
font-size = "14";
|
||||
gtk = "Adwaita";
|
||||
|
||||
wallpaper = pkgs.fetchurl {
|
||||
url = "https://live.staticflickr.com/65535/52797919139_2444712a38_o_d.png";
|
||||
sha256 = "1a9148d8911fa25afa82d3b843ee620173955a7ca705d525f3e9d00e00696308";
|
||||
meta.licenses = lib.licenses.cc0;
|
||||
};
|
||||
}
|
||||
12
users/gandalf/modules/gui/default.nix
Normal file
12
users/gandalf/modules/gui/default.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{ lib, nixosConfig, ... }: {
|
||||
|
||||
imports = with lib; with nixosConfig.bchmnn;
|
||||
optionals gui.enable [
|
||||
./programs
|
||||
] ++ optionals (gui.enable && elem "sway" gui.flavour) [
|
||||
./sway
|
||||
] ++ optionals (gui.enable && elem "i3" gui.flavour) [
|
||||
./i3
|
||||
];
|
||||
|
||||
}
|
||||
42
users/gandalf/modules/gui/i3/autorandr.nix
Normal file
42
users/gandalf/modules/gui/i3/autorandr.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{ ... }: {
|
||||
|
||||
programs.autorandr = {
|
||||
enable = true;
|
||||
|
||||
profiles = {
|
||||
|
||||
nomad = {
|
||||
config = {
|
||||
"LVDS-1" = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
station = {
|
||||
|
||||
config = {
|
||||
"LVDS-1" = {
|
||||
enable = false;
|
||||
};
|
||||
"DP-1-3" = {
|
||||
enable = true;
|
||||
mode = "1920x1080";
|
||||
position = "0x0";
|
||||
};
|
||||
"DP-1-2" = {
|
||||
enable = true;
|
||||
mode = "1920x1080";
|
||||
position = "1920x0";
|
||||
};
|
||||
"VGA-1-2" = {
|
||||
enable = true;
|
||||
mode = "1920x1080";
|
||||
position = "3840x0";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
187
users/gandalf/modules/gui/i3/default.nix
Normal file
187
users/gandalf/modules/gui/i3/default.nix
Normal file
|
|
@ -0,0 +1,187 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
let
|
||||
|
||||
cfg = config.xsession.windowManager.i3.config;
|
||||
# common = (import ../common.nix) { pkgs = pkgs; lib = lib; };
|
||||
common = (import ../common.nix) { inherit pkgs; inherit lib; };
|
||||
|
||||
in {
|
||||
|
||||
imports = [
|
||||
./autorandr.nix
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
alacritty
|
||||
dmenu
|
||||
wireplumber
|
||||
feh # lightweight image viewer (also sets wallpaper)
|
||||
brightnessctl # control screen brightness
|
||||
pavucontrol # control audio
|
||||
playerctl # control player
|
||||
networkmanagerapplet # control network
|
||||
blueman # control bluetooth
|
||||
nextcloud-client # nextcloud client to connect to any instance
|
||||
plasma5Packages.kdeconnect-kde # sync phone and pc
|
||||
];
|
||||
|
||||
xsession.windowManager.i3 = {
|
||||
enable = true;
|
||||
config = {
|
||||
modifier = "Mod4";
|
||||
terminal = "${pkgs.alacritty}/bin/alacritty";
|
||||
menu = "${pkgs.dmenu}/bin/dmenu_run";
|
||||
startup = with pkgs; [
|
||||
{ command = "${feh}/bin/feh --bg-fill ${common.wallpaper}"; }
|
||||
{ command = "${networkmanagerapplet}/bin/nm-applet"; }
|
||||
{ command = "${blueman}/bin/blueman-applet"; }
|
||||
{ command = "${nextcloud-client}/bin/nextcloud"; }
|
||||
{ command = "${plasma5Packages.kdeconnect-kde}/bin/kdeconnect-indicator"; }
|
||||
];
|
||||
fonts = {
|
||||
names = [ common.font ];
|
||||
style = "Bold";
|
||||
size = 12.0;
|
||||
};
|
||||
window = {
|
||||
titlebar = false;
|
||||
border = 4;
|
||||
};
|
||||
gaps = {
|
||||
inner = 5;
|
||||
};
|
||||
colors = {
|
||||
focused = {
|
||||
border = common.colorschemes.default.active;
|
||||
background = common.colorschemes.default.active;
|
||||
text = common.colorschemes.default.black;
|
||||
indicator = common.colorschemes.default.activeDark;
|
||||
childBorder = common.colorschemes.default.active;
|
||||
};
|
||||
focusedInactive = {
|
||||
border = common.colorschemes.default.inactive;
|
||||
background = common.colorschemes.default.inactive;
|
||||
text = common.colorschemes.default.white;
|
||||
indicator = common.colorschemes.default.inactive;
|
||||
childBorder = common.colorschemes.default.inactive;
|
||||
};
|
||||
unfocused = {
|
||||
border = common.colorschemes.default.inactiveDark;
|
||||
background = common.colorschemes.default.inactiveDark;
|
||||
text = common.colorschemes.default.white;
|
||||
indicator = common.colorschemes.default.inactiveDark;
|
||||
childBorder = common.colorschemes.default.inactiveDark;
|
||||
};
|
||||
urgent = {
|
||||
border = common.colorschemes.default.alert;
|
||||
background = common.colorschemes.default.alert;
|
||||
text = common.colorschemes.default.white;
|
||||
indicator = common.colorschemes.default.black;
|
||||
childBorder = common.colorschemes.default.alert;
|
||||
};
|
||||
placeholder = {
|
||||
border = common.colorschemes.default.active;
|
||||
background = common.colorschemes.default.active;
|
||||
text = common.colorschemes.default.black;
|
||||
indicator = common.colorschemes.default.activeDark;
|
||||
childBorder = common.colorschemes.default.active;
|
||||
};
|
||||
};
|
||||
keybindings = {
|
||||
# Basics
|
||||
"${cfg.modifier}+Return" = "exec ${cfg.terminal}";
|
||||
"${cfg.modifier}+q" = "kill";
|
||||
"${cfg.modifier}+i" = "exec ${cfg.menu}";
|
||||
"${cfg.modifier}+space" = "exec ${cfg.menu}";
|
||||
"${cfg.modifier}+Shift+c" = "reload";
|
||||
"${cfg.modifier}+Shift+q" = "exec i3-nagbar -t warning -m 'Do you want to exit i3?' -b 'Yes' 'i3-msg exit'";
|
||||
"${cfg.modifier}+Shift+r" = "restart";
|
||||
|
||||
# Focus
|
||||
"${cfg.modifier}+h" = "focus left";
|
||||
"${cfg.modifier}+j" = "focus down";
|
||||
"${cfg.modifier}+k" = "focus up";
|
||||
"${cfg.modifier}+l" = "focus right";
|
||||
|
||||
"${cfg.modifier}+p" = "focus output left";
|
||||
"${cfg.modifier}+n" = "focus output right";
|
||||
|
||||
# Moving
|
||||
"${cfg.modifier}+Shift+h" = "move left";
|
||||
"${cfg.modifier}+Shift+j" = "move down";
|
||||
"${cfg.modifier}+Shift+k" = "move up";
|
||||
"${cfg.modifier}+Shift+l" = "move right";
|
||||
|
||||
# Workspaces
|
||||
"${cfg.modifier}+1" = "workspace number 1";
|
||||
"${cfg.modifier}+2" = "workspace number 2";
|
||||
"${cfg.modifier}+3" = "workspace number 3";
|
||||
"${cfg.modifier}+4" = "workspace number 4";
|
||||
"${cfg.modifier}+5" = "workspace number 5";
|
||||
"${cfg.modifier}+6" = "workspace number 6";
|
||||
"${cfg.modifier}+7" = "workspace number 7";
|
||||
"${cfg.modifier}+8" = "workspace number 8";
|
||||
"${cfg.modifier}+9" = "workspace number 9";
|
||||
"${cfg.modifier}+0" = "workspace number 10";
|
||||
|
||||
"${cfg.modifier}+Shift+1" = "move container to workspace number 1";
|
||||
"${cfg.modifier}+Shift+2" = "move container to workspace number 2";
|
||||
"${cfg.modifier}+Shift+3" = "move container to workspace number 3";
|
||||
"${cfg.modifier}+Shift+4" = "move container to workspace number 4";
|
||||
"${cfg.modifier}+Shift+5" = "move container to workspace number 5";
|
||||
"${cfg.modifier}+Shift+6" = "move container to workspace number 6";
|
||||
"${cfg.modifier}+Shift+7" = "move container to workspace number 7";
|
||||
"${cfg.modifier}+Shift+8" = "move container to workspace number 8";
|
||||
"${cfg.modifier}+Shift+9" = "move container to workspace number 9";
|
||||
"${cfg.modifier}+Shift+0" = "move container to workspace number 10";
|
||||
|
||||
"${cfg.modifier}+Control+j" = "workspace prev";
|
||||
"${cfg.modifier}+Control+k" = "workspace next";
|
||||
"${cfg.modifier}+Control+Shift+j" = "move workspace to output left";
|
||||
"${cfg.modifier}+Control+Shift+k" = "move workspace to output right";
|
||||
|
||||
# Splits
|
||||
"${cfg.modifier}+b" = "split h";
|
||||
"${cfg.modifier}+v" = "split v";
|
||||
|
||||
# Layouts
|
||||
"${cfg.modifier}+s" = "layout stacking";
|
||||
"${cfg.modifier}+w" = "layout tabbed";
|
||||
"${cfg.modifier}+e" = "layout toggle split";
|
||||
"${cfg.modifier}+f" = "fullscreen toggle";
|
||||
|
||||
"${cfg.modifier}+a" = "focus parent";
|
||||
|
||||
"${cfg.modifier}+d" = "floating toggle";
|
||||
"${cfg.modifier}+Shift+d" = "focus mode_toggle";
|
||||
|
||||
# Scratchpad
|
||||
"${cfg.modifier}+Shift+minus" = "move scratchpad";
|
||||
"${cfg.modifier}+minus" = "scratchpad show";
|
||||
|
||||
# Resize mode
|
||||
"${cfg.modifier}+r" = "mode resize";
|
||||
|
||||
# Multimedia Keys
|
||||
"XF86AudioRaiseVolume" = "exec ${pkgs.wireplumber}/bin/wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+";
|
||||
"XF86AudioLowerVolume" = "exec ${pkgs.wireplumber}/bin/wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%-";
|
||||
"XF86AudioMute" = "exec ${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
||||
"XF86AudioMicMute" = "exec ${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle";
|
||||
|
||||
"XF86MonBrightnessDown" = "exec ${pkgs.brightnessctl}/bin/brightnessctl -q set 5%-";
|
||||
"XF86MonBrightnessUp" = "exec ${pkgs.brightnessctl}/bin/brightnessctl -q set 5%+";
|
||||
|
||||
"XF86AudioPrev" = "exec ${pkgs.playerctl}/bin/playerctl previous";
|
||||
"XF86AudioNext" = "exec ${pkgs.playerctl}/bin/playerctl next";
|
||||
"XF86AudioPlay" = "exec ${pkgs.playerctl}/bin/playerctl play-pause";
|
||||
"XF86AudioPause" = "exec ${pkgs.playerctl}/bin/playerctl play-pause";
|
||||
|
||||
# Programs
|
||||
"${cfg.modifier}+Shift+v" = "exec ${pkgs.pavucontrol}/bin/pavucontrol";
|
||||
"${cfg.modifier}+Shift+b" = "exec ${pkgs.blueman}/bin/blueman-manager";
|
||||
"${cfg.modifier}+Shift+n" = "exec ${pkgs.networkmanagerapplet}/bin/nm-connection-editor";
|
||||
"${cfg.modifier}+Shift+a" = "exec ${pkgs.swaynotificationcenter}/bin/swaync-client -t -sw";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
{ ... }:
|
||||
{ pkgs, lib, ... }:
|
||||
let
|
||||
common = import ./common.nix;
|
||||
common = (import ../common.nix) { pkgs = pkgs; lib = lib; };
|
||||
in
|
||||
{
|
||||
# alacritty - a cross-platform, GPU-accelerated terminal emulator
|
||||
|
|
@ -22,6 +22,11 @@ let
|
|||
sha256 = "565fff2ed6a3c4c98daf7a2b56aad386c2d076f4f5b88199785593eb380eb3d4";
|
||||
meta.licenses = lib.licenses.publicDomain;
|
||||
};
|
||||
whatsapp = pkgs.fetchurl {
|
||||
url = "https://upload.wikimedia.org/wikipedia/commons/thumb/6/6b/WhatsApp.svg/240px-WhatsApp.svg.png";
|
||||
sha256 = "65b4eeab9b5a02c46f75f26abeac3c72a479cf8fce829b7f9c46f59e9a7f9785";
|
||||
meta.licenses = lib.licenses.publicDomain;
|
||||
};
|
||||
};
|
||||
|
||||
in
|
||||
|
|
@ -68,6 +73,14 @@ in
|
|||
Terminal=false
|
||||
Icon=${icons.outlook}
|
||||
'';
|
||||
"applications/whatsapp.desktop".text = ''
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=WhatsApp
|
||||
Exec=${pkgs.chromium}/bin/chromium --app=https://web.whatsapp.com
|
||||
Terminal=false
|
||||
Icon=${icons.whatsapp}
|
||||
'';
|
||||
};
|
||||
|
||||
}
|
||||
24
users/gandalf/modules/gui/programs/default.nix
Normal file
24
users/gandalf/modules/gui/programs/default.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ pkgs, ... }: {
|
||||
|
||||
imports = [
|
||||
./alacritty.nix
|
||||
./chromium.nix
|
||||
./discord.nix
|
||||
./keyring.nix
|
||||
./obs.nix
|
||||
./vscode.nix
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
firefox
|
||||
speechd # https://support.mozilla.org/en-US/kb/speechd-setup
|
||||
gnome.nautilus
|
||||
gimp
|
||||
vlc
|
||||
qbittorrent
|
||||
gnome.simple-scan
|
||||
telegram-desktop
|
||||
signal-desktop
|
||||
];
|
||||
|
||||
}
|
||||
|
|
@ -1,7 +1,5 @@
|
|||
{ pkgs, ... }: {
|
||||
|
||||
home.packages = with pkgs; [
|
||||
playerctl
|
||||
discord
|
||||
];
|
||||
|
||||
}
|
||||
3
users/gandalf/modules/gui/programs/flameshot/default.nix
Normal file
3
users/gandalf/modules/gui/programs/flameshot/default.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
import ./flameshot.nix
|
||||
# include with:
|
||||
# flameshot = pkgs.libsForQt5.callPackage ./flameshot/build.nix { };
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
{ pkgs, ... }:
|
||||
{ pkgs, lib, ... }:
|
||||
let
|
||||
common = import ./common.nix;
|
||||
common = (import ../common.nix) { pkgs = pkgs; lib = lib; };
|
||||
in
|
||||
{
|
||||
programs.vscode = {
|
||||
|
|
@ -1,20 +1,19 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{ pkgs, lib, config, ... }:
|
||||
let
|
||||
|
||||
cfg = config.wayland.windowManager.sway.config;
|
||||
common = import ./common.nix;
|
||||
|
||||
wallpaper = pkgs.fetchurl {
|
||||
url = "https://live.staticflickr.com/65535/52797919139_2444712a38_o_d.png";
|
||||
sha256 = "1a9148d8911fa25afa82d3b843ee620173955a7ca705d525f3e9d00e00696308";
|
||||
meta.licenses = lib.licenses.cc0;
|
||||
};
|
||||
|
||||
# flameshot = pkgs.libsForQt5.callPackage ./flameshot/build.nix { };
|
||||
common = (import ../common.nix) { pkgs = pkgs; lib = lib; };
|
||||
|
||||
in
|
||||
{
|
||||
|
||||
imports = [
|
||||
./kanshi.nix
|
||||
./swaync
|
||||
./waybar.nix
|
||||
./wofi.nix
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
brightnessctl # control screen brightness
|
||||
pavucontrol # control audio
|
||||
|
|
@ -26,6 +25,9 @@ in
|
|||
sway-contrib.grimshot
|
||||
wdisplays
|
||||
wlr-randr
|
||||
kanshi # display manager
|
||||
nextcloud-client # self hosted cloud client
|
||||
plasma5Packages.kdeconnect-kde # sync phone and pc
|
||||
];
|
||||
|
||||
programs.swaylock = {
|
||||
|
|
@ -60,15 +62,27 @@ in
|
|||
# use this if they aren't displayed properly:
|
||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||
export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on";
|
||||
|
||||
# Nvidia
|
||||
# export WLR_RENDERER=vulkan;
|
||||
# export GBM_BACKEND=nvidia-drm;
|
||||
# export __GL_GSYNC_ALLOWED=0;
|
||||
# export __GL_VRR_ALLOWED=0;
|
||||
# export __GLX_VENDOR_LIBRARY_NAME=nvidia;
|
||||
# Xwayland compat
|
||||
# export XWAYLAND_NO_GLAMOR=1;
|
||||
'';
|
||||
config = {
|
||||
modifier = "Mod4";
|
||||
terminal = "${pkgs.alacritty}/bin/alacritty";
|
||||
menu = "${pkgs.wofi}/bin/wofi";
|
||||
startup = [
|
||||
{ command = "blueman-applet"; }
|
||||
{ command = "nm-applet"; }
|
||||
{ command = "swaync"; }
|
||||
startup = with pkgs; [
|
||||
{ command = "${kanshi}/bin/kanshi"; }
|
||||
{ command = "${networkmanagerapplet}/bin/nm-applet"; }
|
||||
{ command = "${blueman}/bin/blueman-applet"; }
|
||||
{ command = "${swaynotificationcenter}/bin/swaync"; }
|
||||
{ command = "${nextcloud-client}/bin/nextcloud"; }
|
||||
{ command = "${plasma5Packages.kdeconnect-kde}/bin/kdeconnect-indicator"; }
|
||||
];
|
||||
input = {
|
||||
"2:7:SynPS/2_Synaptics_TouchPad" = {
|
||||
|
|
@ -86,7 +100,7 @@ in
|
|||
};
|
||||
};
|
||||
output = {
|
||||
"*".bg = "${wallpaper} fill";
|
||||
"*".bg = "${common.wallpaper} fill";
|
||||
};
|
||||
left = "h";
|
||||
down = "j";
|
||||
|
|
@ -109,10 +123,8 @@ in
|
|||
"${cfg.modifier}+${cfg.up}" = "focus up";
|
||||
"${cfg.modifier}+${cfg.right}" = "focus right";
|
||||
|
||||
"${cfg.modifier}+Left" = "focus left";
|
||||
"${cfg.modifier}+Down" = "focus down";
|
||||
"${cfg.modifier}+Up" = "focus up";
|
||||
"${cfg.modifier}+Right" = "focus right";
|
||||
"${cfg.modifier}+p" = "focus output left";
|
||||
"${cfg.modifier}+n" = "focus output right";
|
||||
|
||||
# Moving
|
||||
"${cfg.modifier}+Shift+${cfg.left}" = "move left";
|
||||
|
|
@ -120,11 +132,6 @@ in
|
|||
"${cfg.modifier}+Shift+${cfg.up}" = "move up";
|
||||
"${cfg.modifier}+Shift+${cfg.right}" = "move right";
|
||||
|
||||
"${cfg.modifier}+Shift+Left" = "move left";
|
||||
"${cfg.modifier}+Shift+Down" = "move down";
|
||||
"${cfg.modifier}+Shift+Up" = "move up";
|
||||
"${cfg.modifier}+Shift+Right" = "move right";
|
||||
|
||||
# Workspaces
|
||||
"${cfg.modifier}+1" = "workspace number 1";
|
||||
"${cfg.modifier}+2" = "workspace number 2";
|
||||
|
|
@ -301,6 +308,7 @@ in
|
|||
|
||||
# show existing or start new dropdown terminal
|
||||
bindsym ${cfg.modifier}+grave exec swaymsg '[app_id="$ddterm-id"] scratchpad show' || $ddterm && sleep .1 && swaymsg '[app_id="$ddterm-id"] $ddterm-resize'
|
||||
bindsym ${cfg.modifier}+Escape exec swaymsg '[app_id="$ddterm-id"] scratchpad show' || $ddterm && sleep .1 && swaymsg '[app_id="$ddterm-id"] $ddterm-resize'
|
||||
# ^-- resize again, case moving to different output
|
||||
'';
|
||||
};
|
||||
45
users/gandalf/modules/gui/sway/kanshi.nix
Normal file
45
users/gandalf/modules/gui/sway/kanshi.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
{ ... }: {
|
||||
|
||||
services.kanshi = {
|
||||
enable = true;
|
||||
|
||||
profiles = {
|
||||
|
||||
nomad = {
|
||||
outputs = [
|
||||
{
|
||||
criteria = "LVDS-1";
|
||||
status = "enable";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
station = {
|
||||
outputs = [
|
||||
{
|
||||
criteria = "LVDS-1";
|
||||
status = "disable";
|
||||
}
|
||||
{
|
||||
criteria = "Dell Inc. DELL U2515H 9X2VY5490XUL";
|
||||
status = "enable";
|
||||
mode = "1920x1080";
|
||||
position = "0,0";
|
||||
}
|
||||
{
|
||||
criteria = "Dell Inc. DELL U2515H 9X2VY5C7138L";
|
||||
status = "enable";
|
||||
mode = "1920x1080";
|
||||
position = "1920,0";
|
||||
}
|
||||
{
|
||||
criteria = "HJW VGA TO HDMI 0x00000100";
|
||||
status = "enable";
|
||||
mode = "1920x1080";
|
||||
position = "3840,0";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
{ ... }:
|
||||
{ pkgs, lib, ... }:
|
||||
let
|
||||
common = import ./common.nix;
|
||||
common = (import ../common.nix) { pkgs = pkgs; lib = lib; };
|
||||
in
|
||||
{
|
||||
programs.wofi = {
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
{ ... }: {
|
||||
|
||||
services.kanshi = {
|
||||
enable = true;
|
||||
|
||||
profiles = {
|
||||
|
||||
home = {
|
||||
outputs = [
|
||||
{
|
||||
criteria = "DP-3";
|
||||
mode = "1920x1080";
|
||||
position = "0,0";
|
||||
}
|
||||
{
|
||||
criteria = "DP-2";
|
||||
mode = "1920x1080";
|
||||
position = "1920,0";
|
||||
}
|
||||
{
|
||||
criteria = "LVDS-1";
|
||||
mode = "1920x1080";
|
||||
position = "3840,0";
|
||||
scale = 1.33;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
@ -1,14 +1,8 @@
|
|||
{ pkgs, ... }: {
|
||||
|
||||
home.packages = with pkgs; [
|
||||
firefox
|
||||
speechd # https://support.mozilla.org/en-US/kb/speechd-setup
|
||||
gopass
|
||||
gopass-jsonapi
|
||||
gnome.nautilus
|
||||
gimp
|
||||
vlc
|
||||
gnome.simple-scan
|
||||
];
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue