nix-configs/modules/desktop/default.nix

175 lines
5.6 KiB
Nix
Raw Normal View History

2023-02-13 11:54:21 +00:00
{ config, lib, pkgs, ... }:
let
cfg = config.jade.desktop;
2023-04-22 11:10:34 +00:00
window-screenshot = pkgs.writeShellScriptBin "window-screenshot.sh" (builtins.readFile ../../other/scripts/desktop/window-screenshot.sh);
2023-02-13 11:54:21 +00:00
# desktop-ctl = pkgs.writeShellScriptBin "desktop-ctl.sh" (builtins.readFile ../scripts/desktop/desktop-ctl.sh);
2023-04-22 11:10:34 +00:00
desktop-ctl = import ../../other/scripts/desktop/desktopctl.nix { inherit pkgs; };
2023-02-13 11:54:21 +00:00
# search and open in browser
2023-04-22 11:10:34 +00:00
searchwolf = import ../../other/scripts/desktop/searchwolf.nix { inherit pkgs; };
2023-02-13 11:54:21 +00:00
# permaclip
2023-04-22 11:10:34 +00:00
pc-get = pkgs.writeShellScriptBin "pc-get.sh" (builtins.readFile ../../other/scripts/desktop/permaclip/pc-get.sh);
pc-set = pkgs.writeShellScriptBin "pc-set.sh" (builtins.readFile ../../other/scripts/desktop/permaclip/pc-set.sh);
em-record = pkgs.writeShellScriptBin "em-record.sh" (builtins.readFile ../../other/scripts/desktop/macros/record.sh);
em-play = pkgs.writeShellScriptBin "em-play.sh" (builtins.readFile ../../other/scripts/desktop/macros/play.sh);
em-play-loop = pkgs.writeShellScriptBin "em-play-loop.sh" (builtins.readFile ../../other/scripts/desktop/macros/play-loop.sh);
ocr-screenshot = pkgs.writeShellScriptBin "ocr-screenshot.sh" (builtins.readFile ../../other/scripts/desktop/ocr-screenshot.sh);
2023-02-13 11:54:21 +00:00
# rofi calculator copied from https://github.com/barbuk/menu-qalc
2023-04-22 11:10:34 +00:00
menu-qalc = pkgs.writeShellScriptBin "menu-qalc" (builtins.readFile ../../other/scripts/desktop/menu-qalc.sh);
2023-02-13 11:54:21 +00:00
#bitw = pkgs.buildGo118Module rec {
#pname = "bitw";
#version = "0.1.0";
#src = pkgs.fetchFromGitHub {
#owner = "mvdan";
#repo = "bitw";
#rev = "9da6ca0287ae8e4b1aa7fcdf7c4e8c2736718c3b";
#sha256 = "sha256-qe9y6BEsfsEiPFXlM/SFliSd+2fnfDMHyw/O6EE5hpA=";
#};
#nativeBuildInputs = with pkgs; [ gitMinimal ];
#doCheck = false;
#vendorHash = "sha256-KQr0DtyH3xzlFwsDl3MGLRRLQC4+EtdTOG7IhmNCzV4=";
#vendorHash = null;
#GOFLAGS = "-mod=readonly";
#proxyVendor = true;
#deleteVendor = true;
#preBuild = ''
#go mod vendor
#'';
#};
in with lib; {
imports = (mkIf cfg.enable [
./audio.nix
./gaming.nix
./creative.nix # TODO: more fine grained choices, not every setup needs fspy or rawtherapee
./compositing.nix
./ios-compat.nix
./syncthing.nix
./kdeconnect.nix
./themeing.nix
./cloud.nix
./networking.nix
./polybar.nix
./social.nix
#./xkeysnail.nix
2023-02-26 20:50:52 +00:00
./mail.nix
2023-03-20 22:40:08 +00:00
./specific-hardware
2023-04-22 10:52:11 +00:00
./xmonad.nix
./i3
2023-02-13 11:54:21 +00:00
]).content;
options.jade.desktop = {
enable = mkEnableOption "Enable the i3 setup";
};
config = mkIf cfg.enable {
fonts.fonts = with pkgs; [
2023-03-20 22:40:08 +00:00
nerdfonts montserrat noto-fonts atkinson-hyperlegible
2023-02-13 11:54:21 +00:00
];
i18n.inputMethod = {
enabled = "fcitx5";
fcitx5.addons = with pkgs; [
fcitx5-mozc
fcitx5-gtk
];
};
2023-02-13 11:54:21 +00:00
hardware.bluetooth.enable = true;
hardware.keyboard.uhk.enable = true;
2023-03-20 22:40:08 +00:00
#hardware.spacenavd.enable = true;
2023-02-13 11:54:21 +00:00
programs.seahorse.enable = true;
security.pam.services.jade.enableGnomeKeyring = true;
virtualisation.libvirtd.enable = true;
2023-04-22 10:52:11 +00:00
environment.systemPackages = with pkgs; [ gnome.gdm ];
2023-02-13 11:54:21 +00:00
services = {
printing.enable = true;
gnome.gnome-keyring.enable = true;
xserver = {
layout = "us";
xkbVariant = "altgr-intl";
enable = true;
wacom.enable = true;
libinput = {
enable = true;
};
desktopManager = {
xterm.enable = false;
};
displayManager = {
2023-04-22 10:52:11 +00:00
#defaultSession = "none+i3";
2023-02-13 11:54:21 +00:00
gdm.enable = true;
};
2023-04-22 10:52:11 +00:00
windowManager.xmonad = {
2023-02-13 11:54:21 +00:00
enable = true;
};
};
};
# sensible modules:
# - [x] audio
# - [x] compositing (picom configs)
# - [x] gaming (steam, lutris, prism...)
# - [x] cloud (pw manager, nextcloud, fluent reader)
# - [x] syncthing
# - [x] social (evolution, discord, matrix?)
# - [ ] set up mail accounts properly
# - [x] creative (obs, blender, gimp n shit)
# - [x] apple-stuff (ifuse etc)
# - [x] themeing
# - [x] vpn/networking stuff
# - [ ] keymap
# - [ ] seperate keymap by modules like autostarts
# - [x] kdeconnect
# - [x] polybar
# - [ ] bluetooth
# - [ ] spacenav support (with custom systemd service)
# - [ ] wacom config
# - [x] xkeysnail
# - [ ] oneko
# also useful:
# - every custom script its own flake n stuff
home-manager.users.jade = { pkgs, ... }: {
2023-04-22 10:52:11 +00:00
programs.rofi.theme = ../../other/rofi-themes/applauncher.rasi;
2023-02-13 11:54:21 +00:00
home.packages = with pkgs; [
2023-04-22 11:10:34 +00:00
i3lock-fancy rofi rofimoji feh xorg.xinput dunst arandr flameshot
tesseract5 imagemagick xclip xmacro libwacom wacomtablet xorg.xev
2023-04-22 10:52:11 +00:00
2023-02-13 11:54:21 +00:00
# categories
2023-03-20 22:40:08 +00:00
# filemanager
2023-04-22 11:10:34 +00:00
xfce.thunar xfce.tumbler xfce.thunar-archive-plugin gnome.file-roller
2023-03-20 22:40:08 +00:00
# media/file viewers
2023-04-22 11:10:34 +00:00
vlc evince nomacs
2023-02-13 11:54:21 +00:00
# from environment.systemPackages cleanup
2023-04-22 11:10:34 +00:00
font-manager xdotool xorg.xwininfo gparted librewolf firefox uhk-agent
cool-retro-term xdg-desktop-portal-gtk nheko obsidian virt-manager
ddccontrol-db firebird-emu godot gitg gpick qdirstat ffmpeg_5
2023-02-13 11:54:21 +00:00
# external
2023-04-22 11:10:34 +00:00
libnotify i3lock-fancy rofi rofimoji feh xorg.xinput dunst arandr
2023-04-22 12:57:32 +00:00
flameshot tesseract5 imagemagick xclip kitty xmacro
2023-04-22 11:10:34 +00:00
brightnessctl drawing libqalculate ddgr jq brillo
2023-02-13 11:54:21 +00:00
# custom scripts
2023-04-22 11:10:34 +00:00
window-screenshot desktop-ctl em-record em-play em-play-loop
ocr-screenshot menu-qalc pc-get pc-set searchwolf
2023-02-13 11:54:21 +00:00
# meow
oneko
];
xsession = {
enable = true;
};
};
};
}