refactor: Unify Structure
This commit is contained in:
parent
891eaeaf3c
commit
00092b2fac
|
@ -4,7 +4,7 @@ This file contains a small overview over the contents and structure of this repo
|
|||
- `basic/` the basic system configuration, this should be applied for all systems
|
||||
- `system.nix` a far descendant of the original `configuration.nix`
|
||||
any global configuration should be done here first and later moved to their own file if necessary
|
||||
- `hardware/` configuration for specific hardware
|
||||
- `support/` configuration for supporting specific hardware
|
||||
- `optional/` optionally includable configuration
|
||||
- `services/` configuration for independent services
|
||||
- `hosts/` contain nixos configuration for hosts
|
||||
|
@ -30,9 +30,9 @@ This file contains a small overview over the contents and structure of this repo
|
|||
- `secrets.nix.age` global secrets available at deploy
|
||||
- `users/` home manager user configuration
|
||||
- `common/` shared home-manager modules
|
||||
- `graphical/` configuration for graphical programs
|
||||
- `wayland/` configuration for wayland windowmanagers and basic utilities
|
||||
- `xorg/` configuration for xorg windowmanagers and basic utilities
|
||||
- `programs/` configuration for miscellaneous programs
|
||||
- `shells/` configuration for shells
|
||||
- `default.nix` minimal setup for all users
|
||||
- `<username>/` configuration for users
|
||||
- `impermanence.nix` users persistence configuration
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
inputs.nixos-extra-modules.nixosModules.default
|
||||
inputs.nixos-nftables-firewall.nixosModules.default
|
||||
inputs.nixvim.nixosModules.nixvim
|
||||
inputs.stylix.nixosModules.stylix
|
||||
];
|
||||
age.identityPaths = [ "/state/etc/ssh/ssh_host_ed25519_key" ];
|
||||
boot.mode = lib.mkDefault "efi";
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
{
|
||||
stateVersion,
|
||||
inputs,
|
||||
pkgs,
|
||||
nodes,
|
||||
minimal,
|
||||
...
|
||||
|
@ -9,6 +8,7 @@
|
|||
{
|
||||
imports = [
|
||||
../../modules-hm/impermanence.nix
|
||||
../../modules-hm/hm-all.nix
|
||||
];
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
|
@ -16,10 +16,12 @@
|
|||
verbose = true;
|
||||
extraSpecialArgs = {
|
||||
inherit nodes minimal;
|
||||
spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system};
|
||||
};
|
||||
sharedModules = [
|
||||
{ home.stateVersion = stateVersion; }
|
||||
{
|
||||
home.stateVersion = stateVersion;
|
||||
systemd.user.startServices = "sd-switch";
|
||||
}
|
||||
inputs.nix-index-database.hmModules.nix-index
|
||||
inputs.nixos-extra-modules.homeManagerModules.default
|
||||
inputs.nixvim.homeManagerModules.nixvim
|
||||
|
|
|
@ -59,4 +59,7 @@
|
|||
};
|
||||
programs.nix-ld.enable = true;
|
||||
system.stateVersion = stateVersion;
|
||||
hm-all.nixpkgs.config = {
|
||||
allowUnfree = true;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,224 +0,0 @@
|
|||
{
|
||||
config,
|
||||
inputs,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkOption types;
|
||||
in
|
||||
{
|
||||
options.hidpi = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
description = "Enable HighDPI configuration for this host and all installed users";
|
||||
};
|
||||
|
||||
# stylix acceses stylix options on import meaning you can only import this module when you're actually setting stylix options
|
||||
imports = [ inputs.stylix.nixosModules.stylix ];
|
||||
|
||||
config = {
|
||||
environment.systemPackages = with pkgs; [ xdg-utils ];
|
||||
xdg.portal = {
|
||||
xdgOpenUsePortal = true;
|
||||
enable = true;
|
||||
extraPortals = with pkgs; [
|
||||
xdg-desktop-portal-wlr
|
||||
xdg-desktop-portal-gtk
|
||||
];
|
||||
config = {
|
||||
common.default = [
|
||||
"gtk"
|
||||
"hyprland"
|
||||
];
|
||||
sway.default = [ "wlr" ];
|
||||
};
|
||||
};
|
||||
# needed for gnome pinentry
|
||||
services.dbus.packages = [ pkgs.gcr ];
|
||||
fonts = {
|
||||
enableGhostscriptFonts = false;
|
||||
fontDir.enable = false;
|
||||
fontconfig = {
|
||||
localConf = ''
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
<fontconfig>
|
||||
<alias binding="weak">
|
||||
<family>monospace</family>
|
||||
<prefer>
|
||||
<family>emoji</family>
|
||||
</prefer>
|
||||
</alias>
|
||||
<alias binding="weak">
|
||||
<family>sans-serif</family>
|
||||
<prefer>
|
||||
<family>emoji</family>
|
||||
</prefer>
|
||||
</alias>
|
||||
<alias binding="weak">
|
||||
<family>serif</family>
|
||||
<prefer>
|
||||
<family>emoji</family>
|
||||
</prefer>
|
||||
</alias>
|
||||
</fontconfig>
|
||||
'';
|
||||
};
|
||||
packages = with pkgs; [
|
||||
(nerdfonts.override { fonts = [ "NerdFontsSymbolsOnly" ]; })
|
||||
ibm-plex
|
||||
dejavu_fonts
|
||||
unifont
|
||||
freefont_ttf
|
||||
gyre-fonts # TrueType substitutes for standard PostScript fonts
|
||||
liberation_ttf
|
||||
noto-fonts
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-cjk-serif
|
||||
noto-fonts-emoji
|
||||
noto-fonts-extra
|
||||
];
|
||||
};
|
||||
stylix.fonts = {
|
||||
serif = {
|
||||
package = pkgs.dejavu_fonts;
|
||||
name = "IBM Plex Serif";
|
||||
};
|
||||
|
||||
sansSerif = {
|
||||
package = pkgs.dejavu_fonts;
|
||||
name = "IBM Plex Sans";
|
||||
};
|
||||
|
||||
monospace = {
|
||||
# No need for patched nerd fonts, kitty can pick up on them automatically,
|
||||
# and ideally every program should do that: https://sw.kovidgoyal.net/kitty/faq/#kitty-is-not-able-to-use-my-favorite-font
|
||||
package = pkgs.jetbrains-mono;
|
||||
name = "JetBrains Mono";
|
||||
};
|
||||
|
||||
emoji = {
|
||||
package = pkgs.noto-fonts-emoji;
|
||||
name = "Noto Color Emoji";
|
||||
};
|
||||
};
|
||||
stylix = {
|
||||
enable = true;
|
||||
autoEnable = false;
|
||||
polarity = "dark";
|
||||
image = config.lib.stylix.pixel "base00";
|
||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/vice.yaml";
|
||||
# Has to be green
|
||||
override.base0B = "#00CC99";
|
||||
#base16Scheme = {
|
||||
# base00 = "#101419";
|
||||
# base01 = "#171B20";
|
||||
# base02 = "#21262e";
|
||||
# base03 = "#242931";
|
||||
# base04 = "#485263";
|
||||
# base05 = "#b6beca";
|
||||
# base06 = "#dee1e6";
|
||||
# base07 = "#e3e6eb";
|
||||
# base08 = "#e05f65";
|
||||
# base09 = "#f9a872";
|
||||
# base0A = "#f1cf8a";
|
||||
# base0B = "#78dba9";
|
||||
# base0C = "#74bee9";
|
||||
# base0D = "#70a5eb";
|
||||
# base0E = "#c68aee";
|
||||
# base0F = "#9378de";
|
||||
#};
|
||||
## based on decaycs-dark, bright variant
|
||||
#base16Scheme = {
|
||||
# base00 = "#101419";
|
||||
# base01 = "#171B20";
|
||||
# base02 = "#21262e";
|
||||
# base03 = "#242931";
|
||||
# base04 = "#485263";
|
||||
# base05 = "#b6beca";
|
||||
# base06 = "#dee1e6";
|
||||
# base07 = "#e3e6eb";
|
||||
# base08 = "#e5646a";
|
||||
# base09 = "#f7b77c";
|
||||
# base0A = "#f6d48f";
|
||||
# base0B = "#94F7C5";
|
||||
# base0C = "#79c3ee";
|
||||
# base0D = "#75aaf0";
|
||||
# base0E = "#cb8ff3";
|
||||
# base0F = "#9d85e1";
|
||||
#};
|
||||
};
|
||||
|
||||
home-manager.sharedModules = [
|
||||
(
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
nixosConfig,
|
||||
...
|
||||
}:
|
||||
{
|
||||
stylix = {
|
||||
cursor = {
|
||||
package = pkgs.openzone-cursors;
|
||||
name = "OpenZone_White_Slim";
|
||||
size = if nixosConfig.hidpi then 48 else 18;
|
||||
};
|
||||
inherit (nixosConfig.stylix) polarity;
|
||||
targets = {
|
||||
gtk.enable = true;
|
||||
bat.enable = true;
|
||||
dunst.enable = true;
|
||||
zathura.enable = true;
|
||||
xresources.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
xresources.properties = {
|
||||
"Xft.hinting" = true;
|
||||
"Xft.antialias" = true;
|
||||
"Xft.autohint" = false;
|
||||
"Xft.lcdfilter" = "lcddefault";
|
||||
"Xft.hintstyle" = "hintfull";
|
||||
"Xft.rgba" = "rgb";
|
||||
};
|
||||
|
||||
gtk =
|
||||
let
|
||||
gtk34extraConfig = {
|
||||
gtk-application-prefer-dark-theme = 1;
|
||||
gtk-cursor-theme-size = 18;
|
||||
gtk-enable-animations = true;
|
||||
gtk-xft-antialias = 1;
|
||||
gtk-xft-dpi = 96; # XXX: delete for wayland?
|
||||
gtk-xft-hinting = 1;
|
||||
gtk-xft-hintstyle = "hintfull";
|
||||
gtk-xft-rgba = "rgb";
|
||||
};
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
iconTheme = {
|
||||
name = "Vimix-Doder";
|
||||
package = pkgs.vimix-icon-theme;
|
||||
};
|
||||
|
||||
gtk2.extraConfig = "gtk-application-prefer-dark-theme = true";
|
||||
gtk3.extraConfig = gtk34extraConfig;
|
||||
gtk4.extraConfig = gtk34extraConfig;
|
||||
};
|
||||
|
||||
home.sessionVariables.GTK_THEME = config.gtk.theme.name;
|
||||
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme.name = "adwaita";
|
||||
style.name = "Adwaita-Dark";
|
||||
};
|
||||
}
|
||||
)
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
minimal,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
lib.optionalAttrs (!minimal) {
|
||||
programs.gpu-screen-recorder.enable = true;
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
package = pkgs.steam.override {
|
||||
extraPkgs =
|
||||
pkgs: with pkgs; [
|
||||
# vampir überlebende braucht diese pkgs
|
||||
libgdiplus
|
||||
cups
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
# can't play VR until https://github.com/hyprwm/Hyprland/pull/8116 is merged
|
||||
services.monado = {
|
||||
enable = true;
|
||||
defaultRuntime = true;
|
||||
};
|
||||
systemd.user.services.monado.environment = {
|
||||
STEAMVR_LH_ENABLE = "1";
|
||||
XRT_COMPOSITOR_COMPUTE = "1";
|
||||
};
|
||||
}
|
46
config/support/vr.nix
Normal file
46
config/support/vr.nix
Normal file
|
@ -0,0 +1,46 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
# can't play VR until https://github.com/hyprwm/Hyprland/pull/8116 is merged
|
||||
services.monado = {
|
||||
enable = true;
|
||||
defaultRuntime = true;
|
||||
};
|
||||
systemd.user.services.monado.environment = {
|
||||
STEAMVR_LH_ENABLE = "1";
|
||||
XRT_COMPOSITOR_COMPUTE = "1";
|
||||
};
|
||||
hm =
|
||||
{ config, ... }:
|
||||
{
|
||||
home.packages = [ pkgs.wlx-overlay-s ];
|
||||
xdg.configFile."openxr/1/active_runtime.json".text = ''
|
||||
{
|
||||
"file_format_version": "1.0.0",
|
||||
"runtime": {
|
||||
"name": "Monado",
|
||||
"library_path": "${pkgs.monado}/lib/libopenxr_monado.so"
|
||||
}
|
||||
}
|
||||
'';
|
||||
|
||||
xdg.configFile."openvr/openvrpaths.vrpath".text = ''
|
||||
{
|
||||
"config" :
|
||||
[
|
||||
"${config.xdg.dataHome}/Steam/config"
|
||||
],
|
||||
"external_drivers" : null,
|
||||
"jsonid" : "vrpathreg",
|
||||
"log" :
|
||||
[
|
||||
"${config.xdg.dataHome}/Steam/logs"
|
||||
],
|
||||
"runtime" :
|
||||
[
|
||||
"${pkgs.opencomposite}/lib/opencomposite"
|
||||
],
|
||||
"version" : 1
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -13,22 +13,16 @@
|
|||
|
||||
../../config/basic
|
||||
|
||||
../../config/hardware/bluetooth.nix
|
||||
../../config/hardware/nintendo.nix
|
||||
../../config/hardware/nvidia.nix
|
||||
../../config/hardware/physical.nix
|
||||
../../config/hardware/pipewire.nix
|
||||
../../config/hardware/yubikey.nix
|
||||
|
||||
../../config/optional/dev.nix
|
||||
../../config/optional/graphical.nix
|
||||
../../config/optional/printing.nix
|
||||
../../config/optional/secureboot.nix
|
||||
../../config/optional/steam.nix
|
||||
../../config/optional/xserver.nix
|
||||
../../config/optional/wayland.nix
|
||||
../../config/optional/vr.nix
|
||||
../../config/optional/zfs.nix
|
||||
../../config/support/bluetooth.nix
|
||||
../../config/support/nintendo.nix
|
||||
../../config/support/nvidia.nix
|
||||
../../config/support/physical.nix
|
||||
../../config/support/pipewire.nix
|
||||
../../config/support/printing.nix
|
||||
../../config/support/secureboot.nix
|
||||
../../config/support/vr.nix
|
||||
../../config/support/yubikey.nix
|
||||
../../config/support/zfs.nix
|
||||
|
||||
./net.nix
|
||||
./fs.nix
|
||||
|
|
|
@ -13,11 +13,10 @@
|
|||
|
||||
../../config/basic
|
||||
|
||||
../../config/optional/initrd-ssh.nix
|
||||
../../config/optional/secureboot.nix
|
||||
../../config/optional/zfs.nix
|
||||
|
||||
../../config/hardware/physical.nix
|
||||
../../config/support/initrd-ssh.nix
|
||||
../../config/support/physical.nix
|
||||
../../config/support/secureboot.nix
|
||||
../../config/support/zfs.nix
|
||||
|
||||
./net.nix
|
||||
./fs.nix
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
imports = [
|
||||
../../config/basic
|
||||
../../config/optional/initrd-ssh.nix
|
||||
../../config/support/initrd-ssh.nix
|
||||
../../config/services/maddy.nix
|
||||
../../config/optional/zfs.nix
|
||||
../../config/support/zfs.nix
|
||||
|
||||
./net.nix
|
||||
./fs.nix
|
||||
|
|
|
@ -10,33 +10,27 @@
|
|||
|
||||
../../config/basic
|
||||
|
||||
../../config/hardware/bluetooth.nix
|
||||
../../config/hardware/laptop.nix
|
||||
../../config/hardware/nvidia.nix
|
||||
../../config/hardware/physical.nix
|
||||
../../config/hardware/pipewire.nix
|
||||
../../config/hardware/prime-offload.nix
|
||||
../../config/hardware/yubikey.nix
|
||||
|
||||
../../config/optional/dev.nix
|
||||
../../config/optional/graphical.nix
|
||||
../../config/optional/printing.nix
|
||||
../../config/optional/secureboot.nix
|
||||
../../config/optional/steam.nix
|
||||
../../config/optional/wayland.nix
|
||||
../../config/optional/zfs.nix
|
||||
../../config/support/bluetooth.nix
|
||||
../../config/support/laptop.nix
|
||||
../../config/support/nvidia.nix
|
||||
../../config/support/physical.nix
|
||||
../../config/support/pipewire.nix
|
||||
../../config/support/prime-offload.nix
|
||||
../../config/support/printing.nix
|
||||
../../config/support/secureboot.nix
|
||||
../../config/support/yubikey.nix
|
||||
../../config/support/zfs.nix
|
||||
|
||||
./net.nix
|
||||
./fs.nix
|
||||
|
||||
../../users/patrick
|
||||
#../../users/patrick
|
||||
];
|
||||
stylix.fonts.sizes = {
|
||||
terminal = 9;
|
||||
applications = 9;
|
||||
desktop = 8;
|
||||
};
|
||||
hidpi = true;
|
||||
services = {
|
||||
xserver.xkb = {
|
||||
layout = "de";
|
||||
|
|
|
@ -10,10 +10,10 @@
|
|||
inputs.nixos-hardware.nixosModules.common-pc-ssd
|
||||
|
||||
../../config/basic
|
||||
../../config/optional/initrd-ssh.nix
|
||||
|
||||
../../config/hardware/physical.nix
|
||||
../../config/optional/zfs.nix
|
||||
../../config/support/initrd-ssh.nix
|
||||
../../config/support/physical.nix
|
||||
../../config/support/zfs.nix
|
||||
|
||||
./net.nix
|
||||
./fs.nix
|
||||
|
|
40
modules-hm/hm-all.nix
Normal file
40
modules-hm/hm-all.nix
Normal file
|
@ -0,0 +1,40 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
inherit (lib)
|
||||
mkOption
|
||||
mkOptionType
|
||||
types
|
||||
mkIf
|
||||
;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
primaryUser = mkOption {
|
||||
description = "Home-manager primary Username";
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
};
|
||||
hm = mkOption {
|
||||
description = "Home-manager options for the main user";
|
||||
type = mkOptionType {
|
||||
name = "Home-manager options for the main user";
|
||||
merge = _loc: defs: (map (x: x.value) defs);
|
||||
};
|
||||
};
|
||||
hm-all = mkOption {
|
||||
description = "Home-manager options for the primary User and root.";
|
||||
type = mkOptionType {
|
||||
name = "Home-manager options for the all users";
|
||||
merge = _loc: defs: (map (x: x.value) defs);
|
||||
};
|
||||
};
|
||||
};
|
||||
config.home-manager.users = mkIf (config.primaryUser != null) {
|
||||
${config.primaryUser} = {
|
||||
imports = config.hm ++ config.hm-all;
|
||||
};
|
||||
root = {
|
||||
imports = config.hm-all;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -65,24 +65,4 @@ in
|
|||
'';
|
||||
};
|
||||
};
|
||||
config.home-manager.sharedModules = [
|
||||
(
|
||||
{ config, ... }:
|
||||
{
|
||||
options = {
|
||||
userSecretsFile = mkOption {
|
||||
default = ../users/${config._module.args.name}/secrets.nix.age;
|
||||
type = types.path;
|
||||
description = "The global secrets attribute that should be exposed to the user";
|
||||
};
|
||||
userSecrets = mkOption {
|
||||
readOnly = true;
|
||||
default = importEncrypted config.userSecretsFile inputs;
|
||||
type = types.unspecified;
|
||||
description = "User secrets";
|
||||
};
|
||||
};
|
||||
}
|
||||
)
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,77 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
makeWrapper,
|
||||
cacert,
|
||||
gitMinimal,
|
||||
nodejs,
|
||||
yarn,
|
||||
}:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "actual-server";
|
||||
version = "24.10.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "actualbudget";
|
||||
repo = "actual-server";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-VJAD+lNamwuYmiPJLXkum6piGi5zLOHBp8cUeZagb4s=";
|
||||
};
|
||||
# we cannot use fetchYarnDeps because that doesn't support yarn 2/berry lockfiles
|
||||
offlineCache = stdenv.mkDerivation {
|
||||
name = "actual-server-${version}-offline-cache";
|
||||
inherit src;
|
||||
|
||||
nativeBuildInputs = [
|
||||
cacert # needed for git
|
||||
gitMinimal # needed to download git dependencies
|
||||
yarn
|
||||
];
|
||||
|
||||
buildPhase = ''
|
||||
export HOME=$(mktemp -d)
|
||||
yarn config set enableTelemetry 0
|
||||
yarn config set cacheFolder $out
|
||||
yarn config set --json supportedArchitectures.os '[ "linux" ]'
|
||||
yarn config set --json supportedArchitectures.cpu '[ "x64" ]'
|
||||
yarn
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp -r ./node_modules $out/node_modules
|
||||
'';
|
||||
dontFixup = true;
|
||||
|
||||
outputHashMode = "recursive";
|
||||
outputHash = "sha256-siq3JnM0FFmXj5iX48E1A8X0lbdHM9NNCjOcg0Pwg5I=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
makeWrapper
|
||||
yarn
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out
|
||||
cp -r ${offlineCache}/node_modules/ $out/
|
||||
cp -r ./ $out
|
||||
|
||||
mkdir -p $out/bin
|
||||
makeWrapper ${lib.getExe nodejs} "$out/bin/actual-server" \
|
||||
--add-flags "$out/app.js" --set NODE_PATH "$out/node_modules" \
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A super fast privacy-focused app for managing your finances";
|
||||
homepage = "https://actualbudget.com/";
|
||||
license = licenses.mit;
|
||||
mainProgram = "actual-server";
|
||||
maintainers = with maintainers; [ patrickdag ];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
};
|
||||
}
|
|
@ -3,7 +3,6 @@ _inputs: [
|
|||
(_final: prev: {
|
||||
zsh-histdb-skim = prev.callPackage ./zsh-histdb-skim.nix { };
|
||||
zsh-histdb = prev.callPackage ./zsh-histdb.nix { };
|
||||
actual = prev.callPackage ./actual.nix { };
|
||||
pr-tracker = prev.callPackage ./pr-tracker.nix { };
|
||||
deploy = prev.callPackage ./deploy.nix { };
|
||||
signal-to-blog = prev.callPackage ./signal-to-blog.nix { };
|
||||
|
|
|
@ -1,62 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
buildNpmPackage,
|
||||
nodePackages,
|
||||
fetchFromGitHub,
|
||||
runtimeShell,
|
||||
}:
|
||||
# We just package the JS frontend part, not the Python reverse-proxy backend.
|
||||
# NixOS can provide any another reverse proxy such as nginx.
|
||||
buildNpmPackage rec {
|
||||
pname = "ollama-webui";
|
||||
# ollama-webui doesn't tag versions yet.
|
||||
version = "0.0.0-unstable-2023-12-22";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ollama-webui";
|
||||
repo = "ollama-webui";
|
||||
rev = "77c1a77fccb04337ff95440030cd051fd16c2cd8";
|
||||
hash = "sha256-u7h2tpHgtQwYXornslY3CZjKjigqBK2mHmaiK1EoEgk=";
|
||||
};
|
||||
# dependencies are downloaded into a separate node_modules Nix package
|
||||
npmDepsHash = "sha256-SI2dPn1SwbGwl8093VBtcDsA2eHSxr3UUC+ta68w2t8=";
|
||||
|
||||
# We have to bake in the default URL it will use for ollama webserver here,
|
||||
# but it can be overriden in the UI later.
|
||||
PUBLIC_API_BASE_URL = "http://localhost:11434/api";
|
||||
|
||||
# The path '/ollama/api' will be redirected to the specified backend URL
|
||||
OLLAMA_API_BASE_URL = PUBLIC_API_BASE_URL;
|
||||
# "npm run build" creates a static page in the "build" folder.
|
||||
installPhase = ''
|
||||
mkdir -p $out/lib
|
||||
cp -R ./build/. $out/lib
|
||||
|
||||
mkdir -p $out/bin
|
||||
cat <<EOF >>$out/bin/${pname}
|
||||
#!${runtimeShell}
|
||||
${nodePackages.http-server}/bin/http-server $out/lib "\$@"
|
||||
EOF
|
||||
chmod +x $out/bin/${pname}
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "ChatGPT-Style Web Interface for Ollama";
|
||||
longDescription = ''
|
||||
Tools like Ollama make open-source large langue models (LLM) accessible and almost
|
||||
trivial to download and run them locally on a consumer computer.
|
||||
However, Ollama only runs in a terminal and doesn't store any chat history.
|
||||
Ollama-WebUI is a web frontend on top of Ollama that looks and behaves similar to ChatGPT's web frontend.
|
||||
You can have separate chats with different LLMs that are saved in your browser,
|
||||
automatic Markdown and Latex rendering, upload files etc.
|
||||
This package contains two parts:
|
||||
- `<nix-store-package-path>/lib` The WebUI as a compiled, static html folder to bundle in your web server
|
||||
- `<nix-store-package-path>/bin/${pname}` A runnable webserver the serves the WebUI for convenience.
|
||||
'';
|
||||
homepage = "https://github.com/ollama-webui/ollama-webui";
|
||||
license = licenses.mit;
|
||||
mainProgram = pname;
|
||||
maintainers = with maintainers; [ malteneuss ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
Binary file not shown.
|
@ -7,4 +7,7 @@
|
|||
dpi = 1;
|
||||
};
|
||||
};
|
||||
hm.home.persistence."/state".files = [
|
||||
".cache/rofi3.druncache"
|
||||
];
|
||||
}
|
246
users/common/Xorg/sway3.nix
Normal file
246
users/common/Xorg/sway3.nix
Normal file
|
@ -0,0 +1,246 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
# shared sway/i3 config
|
||||
let
|
||||
nixConfig = config;
|
||||
in
|
||||
{
|
||||
hm =
|
||||
{ config, ... }:
|
||||
let
|
||||
modifier = "Mod4";
|
||||
down = "r";
|
||||
left = "n";
|
||||
right = "s";
|
||||
up = "l";
|
||||
terminal = "kitty";
|
||||
cfg = {
|
||||
inherit modifier terminal;
|
||||
focus = {
|
||||
followMouse = false;
|
||||
mouseWarping = false;
|
||||
};
|
||||
#bindkeysToCode = true;
|
||||
window.titlebar = false;
|
||||
floating.titlebar = false;
|
||||
workspaceLayout = "stacking";
|
||||
bars = map (x: x // config.lib.stylix.i3.bar) [
|
||||
{
|
||||
mode = "dock";
|
||||
workspaceButtons = true;
|
||||
workspaceNumbers = false;
|
||||
statusCommand = "${config.programs.i3status-rust.package}/bin/i3status-rs config-main.toml";
|
||||
trayOutput = "primary";
|
||||
}
|
||||
];
|
||||
floating.criteria = [ { class = "Pavucontrol"; } ];
|
||||
|
||||
assigns = {
|
||||
"2:d" = [ { class = "^firefox$"; } ];
|
||||
"2:2" = [ { class = "^spotify$"; } ];
|
||||
"3:u" = [ { class = "^thunderbird$"; } ];
|
||||
"4:a" = [
|
||||
{ class = "^bottles$"; }
|
||||
{ class = "^steam$"; }
|
||||
{ class = "^prismlauncher$"; }
|
||||
];
|
||||
"1:F1" = [ { class = "^discord$"; } ];
|
||||
"2:F2" = [
|
||||
{ class = "^Signal$"; }
|
||||
{ class = "^TelegramDesktop$"; }
|
||||
];
|
||||
};
|
||||
|
||||
workspaceOutputAssign =
|
||||
let
|
||||
output =
|
||||
out:
|
||||
lib.lists.imap1 (
|
||||
i: x: {
|
||||
workspace = "${toString i}:${x}";
|
||||
output = out;
|
||||
}
|
||||
);
|
||||
in
|
||||
{
|
||||
"desktopnix" =
|
||||
output "HDMI-0" [
|
||||
"1"
|
||||
"2"
|
||||
"3"
|
||||
"4"
|
||||
"5"
|
||||
"6"
|
||||
"7"
|
||||
"8"
|
||||
"9"
|
||||
]
|
||||
++ output "DP-4" [
|
||||
"j"
|
||||
"d"
|
||||
"u"
|
||||
"a"
|
||||
"x"
|
||||
"p"
|
||||
]
|
||||
++ output "DVI-D-0" [
|
||||
"F1"
|
||||
"F2"
|
||||
"F3"
|
||||
"F4"
|
||||
];
|
||||
"patricknix" =
|
||||
output "eDP-1" [
|
||||
"1"
|
||||
"2"
|
||||
"3"
|
||||
"4"
|
||||
"5"
|
||||
"6"
|
||||
"7"
|
||||
"8"
|
||||
"9"
|
||||
]
|
||||
++ output "DP-1" [
|
||||
"j"
|
||||
"d"
|
||||
"u"
|
||||
"a"
|
||||
"x"
|
||||
"p"
|
||||
];
|
||||
"gojo" = output "eDP-1" [
|
||||
"1"
|
||||
"2"
|
||||
"3"
|
||||
"4"
|
||||
"5"
|
||||
"6"
|
||||
];
|
||||
}
|
||||
.${nixConfig.node.name} or [ ];
|
||||
|
||||
keybindings =
|
||||
(lib.attrsets.mergeAttrsList (
|
||||
map (
|
||||
x:
|
||||
(
|
||||
let
|
||||
key = lib.elemAt (lib.strings.splitString ":" x.workspace) 1;
|
||||
in
|
||||
{
|
||||
"${modifier}+${key}" = "workspace ${x.workspace}";
|
||||
"${modifier}+Shift+${key}" = "move container to workspace ${x.workspace}";
|
||||
}
|
||||
)
|
||||
) cfg.workspaceOutputAssign
|
||||
))
|
||||
// {
|
||||
"${modifier}+t" = "exec ${terminal}";
|
||||
"${modifier}+b" = "exec firefox";
|
||||
"${modifier}+m" = "exec thunderbird";
|
||||
"${modifier}+q" = "kill";
|
||||
"${modifier}+c" = "exec ${lib.getExe pkgs.scripts.clone-term}";
|
||||
"XF86AudioPlay" = "exec ${pkgs.playerctl}/bin/playerctl play-pause";
|
||||
"XF86AudioPrev" = "exec ${pkgs.playerctl}/bin/playerctl next";
|
||||
"XF86AudioNext" = "exec ${pkgs.playerctl}/bin/playerctl previous";
|
||||
"XF86AudioMute" = "exec ${pkgs.pamixer}/bin/pamixer -t";
|
||||
"XF86AudioLowerVolume" = "exec ${pkgs.pamixer}/bin/pamixer -d 5";
|
||||
"XF86AudioRaiseVolume" = "exec ${pkgs.pamixer}/bin/pamixer -i 5";
|
||||
|
||||
"${modifier}+${left}" = "focus left";
|
||||
"${modifier}+${down}" = "focus down";
|
||||
"${modifier}+${up}" = "focus up";
|
||||
"${modifier}+${right}" = "focus right";
|
||||
|
||||
"${modifier}+Left" = "focus left";
|
||||
"${modifier}+Down" = "focus down";
|
||||
"${modifier}+Up" = "focus up";
|
||||
"${modifier}+Right" = "focus right";
|
||||
|
||||
"${modifier}+Shift+${left}" = "move left";
|
||||
"${modifier}+Shift+${down}" = "move down";
|
||||
"${modifier}+Shift+${up}" = "move up";
|
||||
"${modifier}+Shift+${right}" = "move right";
|
||||
|
||||
"${modifier}+Shift+Left" = "move left";
|
||||
"${modifier}+Shift+Down" = "move down";
|
||||
"${modifier}+Shift+Up" = "move up";
|
||||
"${modifier}+Shift+Right" = "move right";
|
||||
|
||||
"${modifier}+v" = "splith";
|
||||
"${modifier}+udiaeresis" = "splitv";
|
||||
"${modifier}+Return" = "fullscreen toggle";
|
||||
|
||||
"${modifier}+odiaeresis" = "layout stacking";
|
||||
"${modifier}+y" = "layout tabbed";
|
||||
"${modifier}+z" = "layout toggle split";
|
||||
|
||||
"${modifier}+f" = "floating toggle";
|
||||
"${modifier}+space" = "focus mode_toggle";
|
||||
|
||||
"${modifier}+comma" = "workspace prev_on_output";
|
||||
"${modifier}+period" = "workspace next_on_output";
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
wayland.windowManager.sway.config = cfg;
|
||||
xsession.windowManager.i3.config = cfg;
|
||||
|
||||
programs.i3status-rust = {
|
||||
enable = true;
|
||||
bars.main = {
|
||||
blocks =
|
||||
[
|
||||
{ block = "net"; }
|
||||
{
|
||||
block = "cpu";
|
||||
format = " $icon $utilization ";
|
||||
}
|
||||
{
|
||||
block = "nvidia_gpu";
|
||||
format = " $icon $utilization $memory $temperature ";
|
||||
}
|
||||
]
|
||||
++ {
|
||||
"patricknix" = [ { block = "battery"; } ];
|
||||
}
|
||||
.${nixConfig.node.name} or [ ]
|
||||
++ [
|
||||
{
|
||||
block = "sound";
|
||||
click = [
|
||||
{
|
||||
button = "left";
|
||||
action = "toggle_mute";
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
block = "backlight";
|
||||
missing_format = "";
|
||||
}
|
||||
{
|
||||
block = "time";
|
||||
format = "$icon $timestamp.datetime(f:'%a %d.%m.%y %H:%M:%S') ";
|
||||
interval = 1;
|
||||
}
|
||||
];
|
||||
theme = "native";
|
||||
# currently nixpgs-wayland breaks this
|
||||
# icons = "material-nf";
|
||||
settings = {
|
||||
icons.icons = "material-nf";
|
||||
icons.overrides = {
|
||||
cpu = " ";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
home.shellAliases = {
|
||||
hm-all.home.shellAliases = {
|
||||
# Aliases
|
||||
l = "ls -lahF --group-directories-first --show-control-chars --quoting-style=escape --color=auto";
|
||||
ll = "ls -lahF --group-directories-first --show-control-chars --quoting-style=escape --color=auto";
|
|
@ -1,14 +0,0 @@
|
|||
{ minimal, lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
./shells/alias.nix
|
||||
./shells/zsh
|
||||
|
||||
./programs/gpg.nix
|
||||
] ++ lib.optional (!minimal) ./programs/htop.nix;
|
||||
|
||||
programs.bat.enable = true;
|
||||
nixpkgs.config = {
|
||||
allowUnfree = true;
|
||||
};
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
home = {
|
||||
packages = with pkgs; [
|
||||
zathura
|
||||
feh
|
||||
mpv
|
||||
pinentry-gnome3 # for yubikey pinentry
|
||||
];
|
||||
};
|
||||
|
||||
# notification are nice to have
|
||||
services.dunst = {
|
||||
enable = true;
|
||||
settings.global = {
|
||||
monitor = 1;
|
||||
frame_width = 0;
|
||||
highlight = config.lib.stylix.colors.withHashtag.base0C;
|
||||
progress_bar_frame_width = 0;
|
||||
progress_bar_corner_radius = 0;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,240 +0,0 @@
|
|||
{
|
||||
config,
|
||||
nixosConfig,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
# shared sway/i3 config
|
||||
let
|
||||
modifier = "Mod4";
|
||||
down = "r";
|
||||
left = "n";
|
||||
right = "s";
|
||||
up = "l";
|
||||
terminal = "kitty";
|
||||
cfg = {
|
||||
inherit modifier terminal;
|
||||
focus = {
|
||||
followMouse = false;
|
||||
mouseWarping = false;
|
||||
};
|
||||
#bindkeysToCode = true;
|
||||
window.titlebar = false;
|
||||
floating.titlebar = false;
|
||||
workspaceLayout = "stacking";
|
||||
bars = map (x: x // config.lib.stylix.i3.bar) [
|
||||
{
|
||||
mode = "dock";
|
||||
workspaceButtons = true;
|
||||
workspaceNumbers = false;
|
||||
statusCommand = "${config.programs.i3status-rust.package}/bin/i3status-rs config-main.toml";
|
||||
trayOutput = "primary";
|
||||
}
|
||||
];
|
||||
floating.criteria = [ { class = "Pavucontrol"; } ];
|
||||
|
||||
assigns = {
|
||||
"2:d" = [ { class = "^firefox$"; } ];
|
||||
"2:2" = [ { class = "^spotify$"; } ];
|
||||
"3:u" = [ { class = "^thunderbird$"; } ];
|
||||
"4:a" = [
|
||||
{ class = "^bottles$"; }
|
||||
{ class = "^steam$"; }
|
||||
{ class = "^prismlauncher$"; }
|
||||
];
|
||||
"1:F1" = [ { class = "^discord$"; } ];
|
||||
"2:F2" = [
|
||||
{ class = "^Signal$"; }
|
||||
{ class = "^TelegramDesktop$"; }
|
||||
];
|
||||
};
|
||||
|
||||
workspaceOutputAssign =
|
||||
let
|
||||
output =
|
||||
out:
|
||||
lib.lists.imap1 (
|
||||
i: x: {
|
||||
workspace = "${toString i}:${x}";
|
||||
output = out;
|
||||
}
|
||||
);
|
||||
in
|
||||
{
|
||||
"desktopnix" =
|
||||
output "HDMI-0" [
|
||||
"1"
|
||||
"2"
|
||||
"3"
|
||||
"4"
|
||||
"5"
|
||||
"6"
|
||||
"7"
|
||||
"8"
|
||||
"9"
|
||||
]
|
||||
++ output "DP-4" [
|
||||
"j"
|
||||
"d"
|
||||
"u"
|
||||
"a"
|
||||
"x"
|
||||
"p"
|
||||
]
|
||||
++ output "DVI-D-0" [
|
||||
"F1"
|
||||
"F2"
|
||||
"F3"
|
||||
"F4"
|
||||
];
|
||||
"patricknix" =
|
||||
output "eDP-1" [
|
||||
"1"
|
||||
"2"
|
||||
"3"
|
||||
"4"
|
||||
"5"
|
||||
"6"
|
||||
"7"
|
||||
"8"
|
||||
"9"
|
||||
]
|
||||
++ output "DP-1" [
|
||||
"j"
|
||||
"d"
|
||||
"u"
|
||||
"a"
|
||||
"x"
|
||||
"p"
|
||||
];
|
||||
"gojo" = output "eDP-1" [
|
||||
"1"
|
||||
"2"
|
||||
"3"
|
||||
"4"
|
||||
"5"
|
||||
"6"
|
||||
];
|
||||
}
|
||||
.${nixosConfig.node.name} or [ ];
|
||||
|
||||
keybindings =
|
||||
(lib.attrsets.mergeAttrsList (
|
||||
map (
|
||||
x:
|
||||
(
|
||||
let
|
||||
key = lib.elemAt (lib.strings.splitString ":" x.workspace) 1;
|
||||
in
|
||||
{
|
||||
"${modifier}+${key}" = "workspace ${x.workspace}";
|
||||
"${modifier}+Shift+${key}" = "move container to workspace ${x.workspace}";
|
||||
}
|
||||
)
|
||||
) cfg.workspaceOutputAssign
|
||||
))
|
||||
// {
|
||||
"${modifier}+t" = "exec ${terminal}";
|
||||
"${modifier}+b" = "exec firefox";
|
||||
"${modifier}+m" = "exec thunderbird";
|
||||
"${modifier}+q" = "kill";
|
||||
"${modifier}+c" = "exec ${lib.getExe pkgs.scripts.clone-term}";
|
||||
"XF86AudioPlay" = "exec ${pkgs.playerctl}/bin/playerctl play-pause";
|
||||
"XF86AudioPrev" = "exec ${pkgs.playerctl}/bin/playerctl next";
|
||||
"XF86AudioNext" = "exec ${pkgs.playerctl}/bin/playerctl previous";
|
||||
"XF86AudioMute" = "exec ${pkgs.pamixer}/bin/pamixer -t";
|
||||
"XF86AudioLowerVolume" = "exec ${pkgs.pamixer}/bin/pamixer -d 5";
|
||||
"XF86AudioRaiseVolume" = "exec ${pkgs.pamixer}/bin/pamixer -i 5";
|
||||
|
||||
"${modifier}+${left}" = "focus left";
|
||||
"${modifier}+${down}" = "focus down";
|
||||
"${modifier}+${up}" = "focus up";
|
||||
"${modifier}+${right}" = "focus right";
|
||||
|
||||
"${modifier}+Left" = "focus left";
|
||||
"${modifier}+Down" = "focus down";
|
||||
"${modifier}+Up" = "focus up";
|
||||
"${modifier}+Right" = "focus right";
|
||||
|
||||
"${modifier}+Shift+${left}" = "move left";
|
||||
"${modifier}+Shift+${down}" = "move down";
|
||||
"${modifier}+Shift+${up}" = "move up";
|
||||
"${modifier}+Shift+${right}" = "move right";
|
||||
|
||||
"${modifier}+Shift+Left" = "move left";
|
||||
"${modifier}+Shift+Down" = "move down";
|
||||
"${modifier}+Shift+Up" = "move up";
|
||||
"${modifier}+Shift+Right" = "move right";
|
||||
|
||||
"${modifier}+v" = "splith";
|
||||
"${modifier}+udiaeresis" = "splitv";
|
||||
"${modifier}+Return" = "fullscreen toggle";
|
||||
|
||||
"${modifier}+odiaeresis" = "layout stacking";
|
||||
"${modifier}+y" = "layout tabbed";
|
||||
"${modifier}+z" = "layout toggle split";
|
||||
|
||||
"${modifier}+f" = "floating toggle";
|
||||
"${modifier}+space" = "focus mode_toggle";
|
||||
|
||||
"${modifier}+comma" = "workspace prev_on_output";
|
||||
"${modifier}+period" = "workspace next_on_output";
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
wayland.windowManager.sway.config = cfg;
|
||||
xsession.windowManager.i3.config = cfg;
|
||||
|
||||
programs.i3status-rust = {
|
||||
enable = true;
|
||||
bars.main = {
|
||||
blocks =
|
||||
[
|
||||
{ block = "net"; }
|
||||
{
|
||||
block = "cpu";
|
||||
format = " $icon $utilization ";
|
||||
}
|
||||
{
|
||||
block = "nvidia_gpu";
|
||||
format = " $icon $utilization $memory $temperature ";
|
||||
}
|
||||
]
|
||||
++ {
|
||||
"patricknix" = [ { block = "battery"; } ];
|
||||
}
|
||||
.${nixosConfig.node.name} or [ ]
|
||||
++ [
|
||||
{
|
||||
block = "sound";
|
||||
click = [
|
||||
{
|
||||
button = "left";
|
||||
action = "toggle_mute";
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
block = "backlight";
|
||||
missing_format = "";
|
||||
}
|
||||
{
|
||||
block = "time";
|
||||
format = "$icon $timestamp.datetime(f:'%a %d.%m.%y %H:%M:%S') ";
|
||||
interval = 1;
|
||||
}
|
||||
];
|
||||
theme = "native";
|
||||
# currently nixpgs-wayland breaks this
|
||||
# icons = "material-nf";
|
||||
settings = {
|
||||
icons.icons = "material-nf";
|
||||
icons.overrides = {
|
||||
cpu = " ";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
../.
|
||||
./fuzzel.nix
|
||||
./sway.nix
|
||||
./hyprland.nix
|
||||
./waybar
|
||||
./swaync
|
||||
./swww.nix
|
||||
];
|
||||
home.packages = with pkgs; [
|
||||
wdisplays
|
||||
wl-clipboard
|
||||
];
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
stylix.targets.fuzzel.enable = true;
|
||||
programs.fuzzel = {
|
||||
enable = true;
|
||||
settings = {
|
||||
main = {
|
||||
launch-prefix = "uwsm app --";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,306 +0,0 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
nixosConfig,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib)
|
||||
mkMerge
|
||||
optionals
|
||||
elem
|
||||
mkIf
|
||||
flip
|
||||
concatMap
|
||||
;
|
||||
#from https://github.com/hyprwm/Hyprland/issues/3835
|
||||
float_script = pkgs.writeShellScript "hyprland-bitwarden-float" ''
|
||||
handle() {
|
||||
case $1 in
|
||||
windowtitle*)
|
||||
# Extract the window ID from the line
|
||||
window_id=''${1#*>>}
|
||||
|
||||
# Fetch the list of windows and parse it using jq to find the window by its decimal ID
|
||||
window_info=$(hyprctl clients -j | ${pkgs.jq}/bin/jq --arg id "0x$window_id" '.[] | select(.address == ($id))')
|
||||
|
||||
# Extract the title from the window info
|
||||
window_title=$(echo "$window_info" | ${pkgs.jq}/bin/jq '.title')
|
||||
|
||||
# Check if the title matches the characteristics of the Bitwarden popup window
|
||||
if [[ "$window_title" == '"Extension: (Bitwarden Password Manager) - Bitwarden — Mozilla Firefox"' ]]; then
|
||||
|
||||
# echo $window_id, $window_title
|
||||
# hyprctl dispatch togglefloating address:0x$window_id
|
||||
# hyprctl dispatch resizewindowpixel exact 20% 40%,address:0x$window_id
|
||||
# hyprctl dispatch movewindowpixel exact 40% 30%,address:0x$window_id
|
||||
|
||||
hyprctl dispatch togglefloating address:0x$window_id
|
||||
hyprctl dispatch resizewindowpixel exact "512 768",address:0x$window_id
|
||||
hyprctl dispatch movewindowpixel exact "$HYPRLAND_FLOAT_LOCATION",address:0x$window_id
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Listen to the Hyprland socket for events and process each line with the handle function
|
||||
${pkgs.socat}/bin/socat -U - UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock | while read -r line; do handle "$line"; done
|
||||
'';
|
||||
in
|
||||
{
|
||||
# UWSM starts a SH to read env variables
|
||||
# this ensures all home.sessionVars are exported
|
||||
programs.bash.enable = true;
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
settings = mkMerge [
|
||||
{
|
||||
input = {
|
||||
kb_layout = "de";
|
||||
kb_variant = "nodeadkeys";
|
||||
follow_mouse = 2;
|
||||
numlock_by_default = true;
|
||||
repeat_rate = 60;
|
||||
repeat_delay = 235;
|
||||
# Only change focus on mouse click
|
||||
float_switch_override_focus = 0;
|
||||
accel_profile = "flat";
|
||||
|
||||
touchpad = {
|
||||
natural_scroll = true;
|
||||
disable_while_typing = true;
|
||||
scroll_factor = 0.7;
|
||||
};
|
||||
};
|
||||
device = {
|
||||
name = "xp-pen-g430s-pen";
|
||||
active_area_size = "48 27";
|
||||
};
|
||||
gestures = {
|
||||
workspace_swipe = true;
|
||||
};
|
||||
|
||||
general = {
|
||||
gaps_in = 0;
|
||||
gaps_out = 0;
|
||||
allow_tearing = true;
|
||||
};
|
||||
#render = {
|
||||
# explicit_sync = 0;
|
||||
# direct_scanout = false;
|
||||
#};
|
||||
binds = {
|
||||
focus_preferred_method = 1;
|
||||
workspace_center_on = 1;
|
||||
};
|
||||
bind =
|
||||
let
|
||||
monitor_binds = {
|
||||
"1" = "j";
|
||||
"2" = "d";
|
||||
"3" = "u";
|
||||
"4" = "a";
|
||||
"5" = "x";
|
||||
"6" = "F1";
|
||||
"7" = "F2";
|
||||
"8" = "F3";
|
||||
"9" = "F4";
|
||||
};
|
||||
in
|
||||
[
|
||||
"SUPER,q,killactive,"
|
||||
"SUPER,return,fullscreen,"
|
||||
"SUPER + SHIFT,return,fullscreenstate,2,0,"
|
||||
"SUPER,f,togglefloating"
|
||||
"SUPER,g,togglegroup"
|
||||
"SUPER,tab,cyclenext,"
|
||||
"ALT,tab,cyclenext,"
|
||||
"SUPER+CTRL,r,submap,resize"
|
||||
|
||||
"SUPER,left,movefocus,l"
|
||||
"SUPER,right,movefocus,r"
|
||||
"SUPER,up,movefocus,u"
|
||||
"SUPER,down,movefocus,d"
|
||||
|
||||
"SUPER,n,movefocus,l"
|
||||
"SUPER,s,movefocus,r"
|
||||
"SUPER,l,movefocus,u"
|
||||
"SUPER,r,movefocus,d"
|
||||
|
||||
"SUPER,h,changegroupactive,b"
|
||||
"SUPER,m,changegroupactive,f"
|
||||
|
||||
"SUPER + SHIFT,left,movewindoworgroup,l"
|
||||
"SUPER + SHIFT,right,movewindoworgroup,r"
|
||||
"SUPER + SHIFT,up,movewindoworgroup,u"
|
||||
"SUPER + SHIFT,down,movewindoworgroup,d"
|
||||
|
||||
"SUPER + SHIFT,n,movewindoworgroup,l"
|
||||
"SUPER + SHIFT,s,movewindoworgroup,r"
|
||||
"SUPER + SHIFT,l,movewindoworgroup,u"
|
||||
"SUPER + SHIFT,r,movewindoworgroup,d"
|
||||
|
||||
"SUPER,comma,workspace,-1"
|
||||
"SUPER,period,workspace,+1"
|
||||
"SUPER + SHIFT,comma,movetoworkspace,-1"
|
||||
"SUPER + SHIFT,period,movetoworkspace,+1"
|
||||
|
||||
"SUPER,b,exec,uwsm app -- firefox"
|
||||
"SUPER,t,exec,uwsm app -- kitty"
|
||||
",Menu,exec,fuzzel"
|
||||
"SUPER,c,exec,${lib.getExe pkgs.scripts.clone-term}"
|
||||
|
||||
"CTRL,F7,pass,class:^(discord)$"
|
||||
"CTRL,F8,pass,class:^(discord)$"
|
||||
"CTRL,F7,pass,class:^(TeamSpeak 3)$"
|
||||
"CTRL,F8,pass,class:^(TeamSpeak 3)$"
|
||||
"CTRL,F9,exec,systemctl --user start swww-update-wallpaper"
|
||||
|
||||
"SUPER + SHIFT,q,exec,uwsm stop"
|
||||
]
|
||||
++ flip concatMap (map toString (lib.lists.range 1 9)) (x: [
|
||||
"SUPER,${monitor_binds."${x}"},workspace,${x}"
|
||||
"SUPER + SHIFT,${monitor_binds."${x}"},movetoworkspacesilent,${x}"
|
||||
]);
|
||||
|
||||
cursor.no_warps = true;
|
||||
debug.disable_logs = false;
|
||||
env =
|
||||
[
|
||||
"NIXOS_OZONE_WL,1"
|
||||
"MOZ_ENABLE_WAYLAND,1"
|
||||
"_JAVA_AWT_WM_NONREPARENTING,1"
|
||||
"QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
|
||||
"QT_QPA_PLATFORM,wayland;xcb"
|
||||
"GDK_BACKEND,wayland"
|
||||
"WLR_DRM_NO_ATOMIC,1" # retest on newest nvidia driver
|
||||
"XDG_SESSION_TYPE,wayland"
|
||||
"TERMINAL,uwsm app -- kitty"
|
||||
]
|
||||
++ optionals (elem "nvidia" nixosConfig.services.xserver.videoDrivers) [
|
||||
# See https://wiki.hyprland.org/Nvidia/
|
||||
"LIBVA_DRIVER_NAME,nvidia"
|
||||
"GBM_BACKEND,nvidia-drm"
|
||||
];
|
||||
bindm = [
|
||||
# mouse movements
|
||||
"SUPER, mouse:272, movewindow"
|
||||
"SUPER, mouse:273, resizewindow"
|
||||
"SUPER ALT, mouse:272, resizewindow"
|
||||
];
|
||||
animations = {
|
||||
enabled = true;
|
||||
animation = [
|
||||
"windows, 1, 4, default, slide"
|
||||
"windowsOut, 1, 4, default, slide"
|
||||
"windowsMove, 1, 4, default"
|
||||
"border, 1, 2, default"
|
||||
"fade, 1, 4, default"
|
||||
"fadeDim, 1, 4, default"
|
||||
"workspaces, 1, 4, default"
|
||||
];
|
||||
};
|
||||
decoration.rounding = 4;
|
||||
exec-once = [
|
||||
"${pkgs.swaynotificationcenter}/bin/swaync"
|
||||
];
|
||||
misc = {
|
||||
vrr = 1;
|
||||
disable_hyprland_logo = true;
|
||||
mouse_move_focuses_monitor = false;
|
||||
};
|
||||
xwayland.force_zero_scaling = true;
|
||||
windowrulev2 = [
|
||||
# fix these once nvidia gets their shit together
|
||||
#"immediate, class:^(cs2)$"
|
||||
# apex legends
|
||||
"immediate, class:^(steam_app_1172470)$"
|
||||
#???
|
||||
"immediate, class:^(steam_app_238960)$"
|
||||
#baldur
|
||||
#"immediate, class:^(steam_app_1086940)$"
|
||||
"float, class:^(steam)$, title:^(Friends List)"
|
||||
"float, class:^(steam)$, title:(Chat)"
|
||||
|
||||
"float, class:^(streamlink-twitch-gui)$"
|
||||
|
||||
"workspace 2,class:^(firefox)$"
|
||||
"workspace 3,class:^(thunderbird)$"
|
||||
"workspace 4,class:^(bottles)$"
|
||||
"workspace 4,class:^(steam)$, title:^(Steam)"
|
||||
"workspace 4,class:^(prismlauncher)$"
|
||||
"workspace 6,class:^(discord)$"
|
||||
"workspace 6,class:^(WebCord)$"
|
||||
"workspace 6,class:^(TeamSpeak 3)$"
|
||||
"workspace 7,class:^(signal)$"
|
||||
"workspace 7,class:^(TelegramDesktop)$"
|
||||
];
|
||||
}
|
||||
(mkIf (nixosConfig.node.name == "desktopnix") {
|
||||
input.tablet = {
|
||||
output = "DP-3";
|
||||
};
|
||||
monitor = [
|
||||
"DVI-D-1,preferred,0x0,1"
|
||||
"HDMI-A-1,preferred,0x1080,1"
|
||||
"DP-3,2560x1440@144.00Hz,1920x540,1"
|
||||
# Thank you NVIDIA for this generous, free-of-charge, extra monitor that
|
||||
# doesn't exist and crashes yoru session sometimes when moving a window to it.
|
||||
"Unknown-1, disable"
|
||||
];
|
||||
workspace = [
|
||||
"1, monitor:DP-3, default:true"
|
||||
"2, monitor:DP-3"
|
||||
"3, monitor:DP-3"
|
||||
"4, monitor:DP-3"
|
||||
"5, monitor:DP-3"
|
||||
"6, monitor:DVI-D-1, default:true"
|
||||
"7, monitor:DVI-D-1"
|
||||
"8, monitor:HDMI-A-1, default: true"
|
||||
"9, monitor:HDMI-A-1"
|
||||
];
|
||||
env = [ "HYPRLAND_FLOAT_LOCATION,3800 680" ];
|
||||
})
|
||||
(mkIf (nixosConfig.node.name == "patricknix") {
|
||||
monitor = [
|
||||
"eDP-1,preferred,0x0,2"
|
||||
# Thank you NVIDIA for this generous, free-of-charge, extra monitor that
|
||||
# doesn't exist and crashes yoru session sometimes when moving a window to it.
|
||||
"Unknown-1, disable"
|
||||
];
|
||||
workspace = [
|
||||
"1, monitor:eDP-1, default:true"
|
||||
"2, monitor:eDP-1"
|
||||
"3, monitor:eDP-1"
|
||||
"4, monitor:eDP-1"
|
||||
"5, monitor:eDP-1"
|
||||
"6, monitor:eDP-1"
|
||||
"7, monitor:eDP-1"
|
||||
"8, monitor:eDP-1"
|
||||
"9, monitor:eDP-1"
|
||||
];
|
||||
env = [ "HYPRLAND_FLOAT_LOCATION,1400 200" ];
|
||||
})
|
||||
];
|
||||
extraConfig = ''
|
||||
submap=resize
|
||||
binde=,right,resizeactive,80 0
|
||||
binde=,left,resizeactive,-80 0
|
||||
binde=,up,resizeactive,0 -80
|
||||
binde=,down,resizeactive,0 80
|
||||
binde=SHIFT,right,resizeactive,10 0
|
||||
binde=SHIFT,left,resizeactive,-10 0
|
||||
binde=SHIFT,up,resizeactive,0 -10
|
||||
binde=SHIFT,down,resizeactive,0 10
|
||||
bind=,return,submap,reset
|
||||
bind=,escape,submap,reset
|
||||
submap=reset
|
||||
|
||||
exec-once = ${pkgs.xorg.xprop}/bin/xprop -root -f _XWAYLAND_GLOBAL_OUTPUT_SCALE 32c -set _XWAYLAND_GLOBAL_OUTPUT_SCALE 2
|
||||
exec-once = ${float_script}
|
||||
env = XCURSOR_SIZE,48
|
||||
exec-once = uwsm finalize
|
||||
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -1,101 +0,0 @@
|
|||
{ config, nixosConfig, ... }:
|
||||
{
|
||||
# import shared i3 config
|
||||
imports = [ ../sway3.nix ];
|
||||
stylix.targets.sway.enable = true;
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
config =
|
||||
{
|
||||
menu = "fuzzel";
|
||||
startup = [
|
||||
# for games to work input 1 has to be qwerts
|
||||
# but i would like to have bone as my layout
|
||||
{
|
||||
command = "swaymsg input \"*\" xkb_switch_layout 1";
|
||||
always = true;
|
||||
}
|
||||
{ command = "uwsm finalize"; }
|
||||
];
|
||||
input = {
|
||||
"*" = {
|
||||
xkb_layout = "de,de,de";
|
||||
# games are stupid so the main ui has to be de() without bone
|
||||
xkb_variant = ",bone,neo";
|
||||
xkb_options = "grp:win_space_toggle";
|
||||
repeat_delay = "235";
|
||||
repeat_rate = "60";
|
||||
accel_profile = "flat";
|
||||
pointer_accel = "0.3";
|
||||
tap = "enabled";
|
||||
};
|
||||
"type:touchpad" = {
|
||||
pointer_accel = "0.5";
|
||||
natural_scroll = "enabled";
|
||||
};
|
||||
"type:touch" = {
|
||||
map_to_output = "eDP-1";
|
||||
};
|
||||
"type:tablet_tool" = {
|
||||
map_to_output = "eDP-1";
|
||||
};
|
||||
};
|
||||
keybindings =
|
||||
let
|
||||
cfg = config.wayland.windowManager.sway.config;
|
||||
in
|
||||
{
|
||||
"Menu" = "exec ${cfg.menu}";
|
||||
};
|
||||
}
|
||||
// {
|
||||
desktopnix = {
|
||||
output = {
|
||||
DVI-D-1 = {
|
||||
mode = "1920x1080@60Hz";
|
||||
pos = "0,0";
|
||||
};
|
||||
HDMI-A-1 = {
|
||||
mode = "1920x1080@60Hz";
|
||||
pos = "0,1080";
|
||||
};
|
||||
DP-3 = {
|
||||
mode = "2560x1440@143.998Hz";
|
||||
pos = "1920,720";
|
||||
adaptive_sync = "on";
|
||||
};
|
||||
};
|
||||
};
|
||||
patricknix = {
|
||||
output = {
|
||||
"Acer Technologies XB271HU #ASP7ytE/6A7d" = {
|
||||
mode = "2560x1440@59.951Hz";
|
||||
pos = "0,0";
|
||||
};
|
||||
"AU Optronics 0x30EB Unknown" = {
|
||||
mode = "3840x2160@60.002Hz";
|
||||
pos = "2560,0";
|
||||
scale = "2";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
.${nixosConfig.node.name} or { };
|
||||
extraConfig =
|
||||
let
|
||||
cfg = config.wayland.windowManager.sway.config;
|
||||
in
|
||||
''
|
||||
bindgesture swipe:3:left workpace next
|
||||
bindgesture swipe:3:right workpace prev
|
||||
bindgesture pinch:4:outward exec ${cfg.menu}
|
||||
'';
|
||||
};
|
||||
# Cursor invisible
|
||||
home.sessionVariables = {
|
||||
WLR_NO_HARDWARE_CURSORS = 1;
|
||||
NIXOS_OZONE_WL = 1;
|
||||
# opengl backend flickers, also vulkan is love.
|
||||
#WLR_RENDERER = "vulkan";
|
||||
};
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
nixosConfig,
|
||||
...
|
||||
}:
|
||||
{
|
||||
home.persistence."/state" = {
|
||||
files =
|
||||
with lib.lists;
|
||||
[
|
||||
".ssh/known_hosts"
|
||||
".cache/fuzzel"
|
||||
]
|
||||
++ optionals config.programs.rofi.enable [ ".cache/rofi3.druncache" ];
|
||||
directories =
|
||||
with lib.lists;
|
||||
[ ".config/dconf" ]
|
||||
++ optionals config.programs.direnv.enable [ ".local/share/direnv" ]
|
||||
++ optionals config.programs.nushell.enable [ ".config/nushell" ]
|
||||
++ optionals nixosConfig.services.pipewire.enable [
|
||||
# persist sound config
|
||||
".local/state/wireplumber"
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
hm.home.packages = with pkgs; [
|
||||
bottles
|
||||
winetricks
|
||||
wineWowPackages.fonts
|
||||
|
@ -8,4 +8,9 @@
|
|||
];
|
||||
# To enable dark mode use the command:
|
||||
# dconf write /com/usebottles/bottles/dark-theme true
|
||||
hm.home.persistence."/state".directories = [
|
||||
# bottles state games
|
||||
".local/share/bottles"
|
||||
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
{
|
||||
programs.direnv = {
|
||||
hm.programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
hm.home.persistence."/state".directories = [
|
||||
".local/share/direnv"
|
||||
];
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ let
|
|||
envStr = concatStringsSep " " (mapAttrsToList (n: v: "${n}=${escapeShellArg v}") env);
|
||||
in
|
||||
{
|
||||
programs.firefox = {
|
||||
hm.programs.firefox = {
|
||||
enable = true;
|
||||
package = pkgs.firefox.overrideAttrs (old: {
|
||||
buildCommand =
|
||||
|
@ -26,12 +26,12 @@ in
|
|||
'';
|
||||
});
|
||||
};
|
||||
home.persistence."/state".directories = [
|
||||
hm.home.persistence."/state".directories = [
|
||||
".cache/mozilla"
|
||||
".mozilla"
|
||||
];
|
||||
xdg.mimeApps.enable = true;
|
||||
xdg.mimeApps.defaultApplications = {
|
||||
hm.xdg.mimeApps.enable = true;
|
||||
hm.xdg.mimeApps.defaultApplications = {
|
||||
"text/html" = [ "firefox.desktop" ];
|
||||
"text/xml" = [ "firefox.desktop" ];
|
||||
"x-scheme-handler/http" = [ "firefox.desktop" ];
|
||||
|
|
|
@ -13,21 +13,23 @@ let
|
|||
);
|
||||
in
|
||||
{
|
||||
home.packages = [ pwndbgWithDebuginfod ];
|
||||
home.enableDebugInfo = true;
|
||||
xdg.configFile.gdbinit = {
|
||||
target = "gdb/gdbinit";
|
||||
text = ''
|
||||
set debuginfod enabled on
|
||||
set auto-load safe-path /
|
||||
hm = {
|
||||
home.packages = [ pwndbgWithDebuginfod ];
|
||||
home.enableDebugInfo = true;
|
||||
xdg.configFile.gdbinit = {
|
||||
target = "gdb/gdbinit";
|
||||
text = ''
|
||||
set debuginfod enabled on
|
||||
set auto-load safe-path /
|
||||
|
||||
set history save on
|
||||
set history filename ~/.local/share/gdb/history
|
||||
set history save on
|
||||
set history filename ~/.local/share/gdb/history
|
||||
|
||||
set disassembly-flavor intel
|
||||
set print pretty on
|
||||
'';
|
||||
set disassembly-flavor intel
|
||||
set print pretty on
|
||||
'';
|
||||
};
|
||||
|
||||
home.persistence."/state".directories = [ ".local/share/gdb" ];
|
||||
};
|
||||
|
||||
home.persistence."/state".directories = [ ".local/share/gdb" ];
|
||||
}
|
||||
|
|
|
@ -26,42 +26,44 @@ let
|
|||
);
|
||||
in
|
||||
{
|
||||
programs.gitui.enable = true;
|
||||
programs.git = {
|
||||
enable = true;
|
||||
difftastic.enable = true;
|
||||
lfs.enable = true;
|
||||
aliases = {
|
||||
cs = "commit -v -S";
|
||||
s = "status";
|
||||
a = "add";
|
||||
p = "push";
|
||||
rebase = "rebase --gpg-sign";
|
||||
fixup = ''!f() { TARGET=$(git rev-parse "$1"); git commit --fixup=$TARGET ''${@:2} && EDITOR=true git rebase -i --gpg-sign --autostash --autosquash $TARGET^; }; f'';
|
||||
f = "!${gf}";
|
||||
crm = ''!git commit -v -S --edit --file "$(git rev-parse --git-dir)"/COMMIT_EDITMSG'';
|
||||
};
|
||||
extraConfig = {
|
||||
core.pager = "${pkgs.delta}/bin/delta";
|
||||
delta = {
|
||||
hyperlinks = true;
|
||||
keep-plus-minus-markers = true;
|
||||
line-numbers = true;
|
||||
navigate = true;
|
||||
side-by-side = true;
|
||||
syntax-theme = "TwoDark";
|
||||
tabs = 4;
|
||||
hm = {
|
||||
programs.gitui.enable = true;
|
||||
programs.git = {
|
||||
enable = true;
|
||||
difftastic.enable = true;
|
||||
lfs.enable = true;
|
||||
aliases = {
|
||||
cs = "commit -v -S";
|
||||
s = "status";
|
||||
a = "add";
|
||||
p = "push";
|
||||
rebase = "rebase --gpg-sign";
|
||||
fixup = ''!f() { TARGET=$(git rev-parse "$1"); git commit --fixup=$TARGET ''${@:2} && EDITOR=true git rebase -i --gpg-sign --autostash --autosquash $TARGET^; }; f'';
|
||||
f = "!${gf}";
|
||||
crm = ''!git commit -v -S --edit --file "$(git rev-parse --git-dir)"/COMMIT_EDITMSG'';
|
||||
};
|
||||
extraConfig = {
|
||||
core.pager = "${pkgs.delta}/bin/delta";
|
||||
delta = {
|
||||
hyperlinks = true;
|
||||
keep-plus-minus-markers = true;
|
||||
line-numbers = true;
|
||||
navigate = true;
|
||||
side-by-side = true;
|
||||
syntax-theme = "TwoDark";
|
||||
tabs = 4;
|
||||
};
|
||||
mergetool.prompt = true;
|
||||
merge.conflictstyle = "diff3";
|
||||
init.defaultBranch = "main";
|
||||
pull.ff = "only";
|
||||
pull.rebase = true;
|
||||
push.autoSetupRemote = true;
|
||||
};
|
||||
signing = {
|
||||
key = null;
|
||||
signByDefault = true;
|
||||
};
|
||||
mergetool.prompt = true;
|
||||
merge.conflictstyle = "diff3";
|
||||
init.defaultBranch = "main";
|
||||
pull.ff = "only";
|
||||
pull.rebase = true;
|
||||
push.autoSetupRemote = true;
|
||||
};
|
||||
signing = {
|
||||
key = null;
|
||||
signByDefault = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
services.gpg-agent = {
|
||||
hm.services.gpg-agent = {
|
||||
enable = true;
|
||||
enableSshSupport = true;
|
||||
pinentryPackage = pkgs.pinentry-gnome3;
|
||||
};
|
||||
|
||||
programs.gpg = {
|
||||
hm.programs.gpg = {
|
||||
enable = true;
|
||||
scdaemonSettings.disable-ccid = true;
|
||||
settings = {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
nixosConfig,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
|
@ -88,11 +88,12 @@ let
|
|||
};
|
||||
in
|
||||
{
|
||||
lib.gpu-screen-recorder = {
|
||||
programs.gpu-screen-recorder.enable = true;
|
||||
hm.lib.gpu-screen-recorder = {
|
||||
inherit save-replay;
|
||||
};
|
||||
|
||||
systemd.user.services.gpu-screen-recorder = {
|
||||
hm.systemd.user.services.gpu-screen-recorder = {
|
||||
#Install.WantedBy = ["graphical-session.target"];
|
||||
Unit = {
|
||||
Description = "GPU Screen Recorder Service";
|
||||
|
@ -113,8 +114,8 @@ in
|
|||
"GSR_COLOR_RANGE=full"
|
||||
"GSR_FPSPPS=no"
|
||||
]
|
||||
++ lib.optionals (nixosConfig.node.name == "kroma") [
|
||||
"GSR_WINDOW=DP-2" # Primary monitor
|
||||
++ lib.optionals (config.node.name == "desktopnix") [
|
||||
"GSR_WINDOW=DP-3" # Primary monitor
|
||||
];
|
||||
|
||||
ExecStart = lib.getExe start-service;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
programs.htop = {
|
||||
hm-all.programs.htop = {
|
||||
enable = true;
|
||||
settings =
|
||||
{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{ pkgs, lib, ... }:
|
||||
{
|
||||
stylix.targets.kitty.enable = true;
|
||||
programs.kitty = {
|
||||
hm.stylix.targets.kitty.enable = true;
|
||||
hm.programs.kitty = {
|
||||
enable = true;
|
||||
package = pkgs.kitty.overrideAttrs (_finalAttrs: _prevAttrs: { doCheck = false; });
|
||||
settings = {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.persistence."/persist".directories = [ ".local/share/PrismLauncher" ];
|
||||
home.packages = [ pkgs.prismlauncher ];
|
||||
hm.home.persistence."/persist".directories = [ ".local/share/PrismLauncher" ];
|
||||
hm.home.packages = [ pkgs.prismlauncher ];
|
||||
}
|
||||
|
|
|
@ -8,4 +8,7 @@
|
|||
configFile.source = ./config.nu;
|
||||
envFile.source = ./env.nu;
|
||||
};
|
||||
home.persistence."/state" = {
|
||||
directories = [ ".config/nushell" ];
|
||||
};
|
||||
}
|
|
@ -1,58 +1,60 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./nixvim/keybinds.nix
|
||||
./nixvim/options.nix
|
||||
./nixvim/plugins.nix
|
||||
./keybinds.nix
|
||||
./options.nix
|
||||
./plugins.nix
|
||||
];
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
luaLoader.enable = true;
|
||||
files."ftplugin/nix.lua".extraConfigLua = ''
|
||||
vim.opt_local.expandtab = true
|
||||
vim.opt_local.tabstop = 2
|
||||
vim.opt_local.shiftwidth = 2
|
||||
vim.opt_local.softtabstop = 2
|
||||
'';
|
||||
globals.mapleader = " ";
|
||||
extraPlugins = with pkgs.vimPlugins; [
|
||||
vim-better-whitespace
|
||||
dressing-nvim
|
||||
nvim-window-picker
|
||||
nabla-nvim
|
||||
vim-gnupg
|
||||
onedark-nvim
|
||||
];
|
||||
extraConfigLuaPre = ''
|
||||
require("onedark").load()
|
||||
'';
|
||||
extraConfigLuaPost =
|
||||
# lua
|
||||
''
|
||||
vim.notify = require("notify")
|
||||
require("window-picker").setup {
|
||||
hint = "floating-big-letter",
|
||||
filter_rules = {
|
||||
bo = {
|
||||
filetype = { "neo-tree", "neo-tree-popup", "notify", "quickfix" },
|
||||
buftype = { "terminal", "quickfix", "prompt" },
|
||||
},
|
||||
},
|
||||
floating_big_letter = {
|
||||
font = "ansi-shadow",
|
||||
},
|
||||
selection_chars = "EITCAUDJÄÜVF",
|
||||
show_prompt = false,
|
||||
}
|
||||
hm = {
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
luaLoader.enable = true;
|
||||
files."ftplugin/nix.lua".extraConfigLua = ''
|
||||
vim.opt_local.expandtab = true
|
||||
vim.opt_local.tabstop = 2
|
||||
vim.opt_local.shiftwidth = 2
|
||||
vim.opt_local.softtabstop = 2
|
||||
'';
|
||||
globals.mapleader = " ";
|
||||
extraPlugins = with pkgs.vimPlugins; [
|
||||
vim-better-whitespace
|
||||
dressing-nvim
|
||||
nvim-window-picker
|
||||
nabla-nvim
|
||||
vim-gnupg
|
||||
onedark-nvim
|
||||
];
|
||||
extraConfigLuaPre = ''
|
||||
require("onedark").load()
|
||||
'';
|
||||
extraConfigLuaPost =
|
||||
# lua
|
||||
''
|
||||
vim.notify = require("notify")
|
||||
require("window-picker").setup {
|
||||
hint = "floating-big-letter",
|
||||
filter_rules = {
|
||||
bo = {
|
||||
filetype = { "neo-tree", "neo-tree-popup", "notify", "quickfix" },
|
||||
buftype = { "terminal", "quickfix", "prompt" },
|
||||
},
|
||||
},
|
||||
floating_big_letter = {
|
||||
font = "ansi-shadow",
|
||||
},
|
||||
selection_chars = "EITCAUDJÄÜVF",
|
||||
show_prompt = false,
|
||||
}
|
||||
'';
|
||||
};
|
||||
home.sessionVariables.EDITOR = "nvim";
|
||||
home.shellAliases.vim = "nvim";
|
||||
home.shellAliases.vi = "nvim";
|
||||
home.shellAliases.vimdiff = "nvim -d";
|
||||
home.persistence."/state".directories = [
|
||||
".local/share/nvim"
|
||||
".local/state/nvim"
|
||||
".cache/nvim"
|
||||
];
|
||||
};
|
||||
home.sessionVariables.EDITOR = "nvim";
|
||||
home.shellAliases.vim = "nvim";
|
||||
home.shellAliases.vi = "nvim";
|
||||
home.shellAliases.vimdiff = "nvim -d";
|
||||
home.persistence."/state".directories = [
|
||||
".local/share/nvim"
|
||||
".local/state/nvim"
|
||||
".cache/nvim"
|
||||
];
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ let
|
|||
};
|
||||
in
|
||||
{
|
||||
programs.nixvim.keymaps = [
|
||||
hm.programs.nixvim.keymaps = [
|
||||
{
|
||||
key = "<M-down>";
|
||||
action = "<C-w><down>";
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
programs.nixvim.opts = {
|
||||
hm.programs.nixvim.opts = {
|
||||
# Set maximum undo levels
|
||||
undolevels = 1000000;
|
||||
# Persistent Undo
|
|
@ -5,7 +5,7 @@
|
|||
./plugins/alpha.nix
|
||||
./plugins/neo-tree.nix
|
||||
];
|
||||
programs.nixvim.plugins = {
|
||||
hm.programs.nixvim.plugins = {
|
||||
web-devicons.enable = true;
|
||||
which-key.enable = true;
|
||||
lualine = {
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
programs.nixvim.plugins.alpha = {
|
||||
hm.programs.nixvim.plugins.alpha = {
|
||||
enable = true;
|
||||
layout =
|
||||
let
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
programs.nixvim.plugins = {
|
||||
hm.programs.nixvim.plugins = {
|
||||
luasnip = {
|
||||
enable = true;
|
||||
settings = {
|
|
@ -1,6 +1,6 @@
|
|||
{ lib, pkgs, ... }:
|
||||
{
|
||||
programs.nixvim.plugins = {
|
||||
hm.programs.nixvim.plugins = {
|
||||
none-ls = {
|
||||
enable = true;
|
||||
sources = {
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
programs.nixvim.plugins.neo-tree = {
|
||||
hm.programs.nixvim.plugins.neo-tree = {
|
||||
enable = true;
|
||||
sortCaseInsensitive = true;
|
||||
usePopupsForInput = false;
|
|
@ -1,6 +1,6 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
programs.obs-studio = {
|
||||
hm.programs.obs-studio = {
|
||||
enable = true;
|
||||
plugins = with pkgs.obs-studio-plugins; [
|
||||
#obs-backgroundremoval
|
||||
|
@ -9,4 +9,7 @@
|
|||
obs-nvfbc
|
||||
];
|
||||
};
|
||||
hm.home.persistence."/state".directories = [
|
||||
".config/obs-studio"
|
||||
];
|
||||
}
|
||||
|
|
|
@ -66,5 +66,5 @@ let
|
|||
);
|
||||
in
|
||||
{
|
||||
home.sessionVariables.MANPAGER = "${exe} '+Man!'";
|
||||
hm.home.sessionVariables.MANPAGER = "${exe} '+Man!'";
|
||||
}
|
|
@ -1,10 +1,10 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.persistence."/state".directories = [ ".config/awakened-poe-trade" ];
|
||||
hm.home.persistence."/state".directories = [ ".config/awakened-poe-trade" ];
|
||||
|
||||
home.persistence."/persist".directories = [ ".local/share/pobfrontend" ];
|
||||
hm.home.persistence."/persist".directories = [ ".local/share/pobfrontend" ];
|
||||
|
||||
home.packages = [
|
||||
hm.home.packages = [
|
||||
#pkgs.awakened-poe-trade
|
||||
pkgs.path-of-building
|
||||
];
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
{ spicePkgs, ... }:
|
||||
{ inputs, pkgs, ... }:
|
||||
let
|
||||
spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system};
|
||||
in
|
||||
{
|
||||
programs.spicetify = {
|
||||
hm.programs.spicetify = {
|
||||
enable = true;
|
||||
theme = spicePkgs.themes.retroBlur;
|
||||
colorScheme = "Purple";
|
||||
|
|
35
users/common/programs/steam.nix
Normal file
35
users/common/programs/steam.nix
Normal file
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
package = pkgs.steam.override {
|
||||
extraPkgs =
|
||||
pkgs: with pkgs; [
|
||||
# vampir überlebende braucht diese pkgs
|
||||
libgdiplus
|
||||
cups
|
||||
];
|
||||
};
|
||||
};
|
||||
hm.home.persistence = {
|
||||
"/state".directories = [
|
||||
# Folders for steam
|
||||
".local/share/Steam"
|
||||
".steam"
|
||||
# Ken follets pillars of earth
|
||||
".local/share//Daedalic Entertainment GmbH/"
|
||||
# Nvidia shader cache
|
||||
".cache/nvidia"
|
||||
# Vulkan shader cache
|
||||
".local/share/vulkan"
|
||||
];
|
||||
"/panzer/state".directories = lib.lists.optionals (config.disko.devices.zpool ? "panzer") [
|
||||
".local/share/SteamPanzer"
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,81 +1,83 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
accounts.email.accounts = lib.flip lib.mapAttrs' config.userSecrets.accounts.email (
|
||||
_: v:
|
||||
lib.nameValuePair v.address (
|
||||
lib.recursiveUpdate v {
|
||||
thunderbird.enable = true;
|
||||
thunderbird.profiles = [ "personal" ];
|
||||
}
|
||||
)
|
||||
);
|
||||
programs.thunderbird = {
|
||||
enable = true;
|
||||
hm = {
|
||||
accounts.email.accounts = lib.flip lib.mapAttrs' config.secrets.secrets.global.user.accounts.email (
|
||||
_: v:
|
||||
lib.nameValuePair v.address (
|
||||
lib.recursiveUpdate v {
|
||||
thunderbird.enable = true;
|
||||
thunderbird.profiles = [ "personal" ];
|
||||
}
|
||||
)
|
||||
);
|
||||
programs.thunderbird = {
|
||||
enable = true;
|
||||
|
||||
profiles.personal = {
|
||||
isDefault = true;
|
||||
withExternalGnupg = true;
|
||||
profiles.personal = {
|
||||
isDefault = true;
|
||||
withExternalGnupg = true;
|
||||
|
||||
settings = {
|
||||
"mail.identity.default.archive_enabled" = true;
|
||||
"mail.identity.default.archive_keep_folder_structure" = true;
|
||||
"mail.identity.default.compose_html" = false;
|
||||
"mail.identity.default.protectSubject" = true;
|
||||
"mail.identity.default.reply_on_top" = 1;
|
||||
"mail.identity.default.sig_on_reply" = false;
|
||||
|
||||
"gfx.webrender.all" = true;
|
||||
"gfx.webrender.enabled" = true;
|
||||
|
||||
"browser.display.use_system_colors" = true;
|
||||
"browser.theme.dark-toolbar-theme" = true;
|
||||
};
|
||||
};
|
||||
|
||||
settings = {
|
||||
"mail.identity.default.archive_enabled" = true;
|
||||
"mail.identity.default.archive_keep_folder_structure" = true;
|
||||
"mail.identity.default.compose_html" = false;
|
||||
"mail.identity.default.protectSubject" = true;
|
||||
"mail.identity.default.reply_on_top" = 1;
|
||||
"mail.identity.default.sig_on_reply" = false;
|
||||
# Some general settings.
|
||||
"mail.server.default.allow_utf8_accept" = true;
|
||||
"mail.server.default.max_articles" = 1000;
|
||||
"mail.server.default.check_all_folders_for_new" = true;
|
||||
"mail.show_headers" = 1;
|
||||
|
||||
"gfx.webrender.all" = true;
|
||||
"gfx.webrender.enabled" = true;
|
||||
# Show some metadata.
|
||||
"mailnews.headers.showMessageId" = true;
|
||||
"mailnews.headers.showOrganization" = true;
|
||||
"mailnews.headers.showReferences" = true;
|
||||
"mailnews.headers.showUserAgent" = true;
|
||||
|
||||
"browser.display.use_system_colors" = true;
|
||||
"browser.theme.dark-toolbar-theme" = true;
|
||||
# Sort mails and news in descending order.
|
||||
"mailnews.default_sort_order" = 2;
|
||||
"mailnews.default_news_sort_order" = 2;
|
||||
# Sort mails and news by date.
|
||||
"mailnews.default_sort_type" = 18;
|
||||
"mailnews.default_news_sort_type" = 18;
|
||||
|
||||
# Sort them by the newest reply in thread.
|
||||
"mailnews.sort_threads_by_root" = true;
|
||||
# Show time.
|
||||
"mail.ui.display.dateformat.default" = 1;
|
||||
# Sanitize it to UTC to prevent leaking local time.
|
||||
"mail.sanitize_date_header" = true;
|
||||
|
||||
# Email composing QoL.
|
||||
"mail.identity.default.auto_quote" = true;
|
||||
"mail.identity.default.attachPgpKey" = true;
|
||||
|
||||
"app.update.auto" = false;
|
||||
"privacy.donottrackheader.enabled" = true;
|
||||
};
|
||||
};
|
||||
|
||||
settings = {
|
||||
# Some general settings.
|
||||
"mail.server.default.allow_utf8_accept" = true;
|
||||
"mail.server.default.max_articles" = 1000;
|
||||
"mail.server.default.check_all_folders_for_new" = true;
|
||||
"mail.show_headers" = 1;
|
||||
|
||||
# Show some metadata.
|
||||
"mailnews.headers.showMessageId" = true;
|
||||
"mailnews.headers.showOrganization" = true;
|
||||
"mailnews.headers.showReferences" = true;
|
||||
"mailnews.headers.showUserAgent" = true;
|
||||
|
||||
# Sort mails and news in descending order.
|
||||
"mailnews.default_sort_order" = 2;
|
||||
"mailnews.default_news_sort_order" = 2;
|
||||
# Sort mails and news by date.
|
||||
"mailnews.default_sort_type" = 18;
|
||||
"mailnews.default_news_sort_type" = 18;
|
||||
|
||||
# Sort them by the newest reply in thread.
|
||||
"mailnews.sort_threads_by_root" = true;
|
||||
# Show time.
|
||||
"mail.ui.display.dateformat.default" = 1;
|
||||
# Sanitize it to UTC to prevent leaking local time.
|
||||
"mail.sanitize_date_header" = true;
|
||||
|
||||
# Email composing QoL.
|
||||
"mail.identity.default.auto_quote" = true;
|
||||
"mail.identity.default.attachPgpKey" = true;
|
||||
|
||||
"app.update.auto" = false;
|
||||
"privacy.donottrackheader.enabled" = true;
|
||||
home.persistence."/state".directories = [
|
||||
".cache/thunderbird"
|
||||
".thunderbird"
|
||||
];
|
||||
xdg.mimeApps.enable = true;
|
||||
xdg.mimeApps.defaultApplications = {
|
||||
"x-scheme-handler/mailto" = [ "thunderbird.desktop" ];
|
||||
"x-scheme-handler/mid" = [ "thunderbird.desktop" ];
|
||||
"message/rfc822" = [ "thunderbird.desktop" ];
|
||||
};
|
||||
};
|
||||
|
||||
home.persistence."/state".directories = [
|
||||
".cache/thunderbird"
|
||||
".thunderbird"
|
||||
];
|
||||
xdg.mimeApps.enable = true;
|
||||
xdg.mimeApps.defaultApplications = {
|
||||
"x-scheme-handler/mailto" = [ "thunderbird.desktop" ];
|
||||
"x-scheme-handler/mid" = [ "thunderbird.desktop" ];
|
||||
"message/rfc822" = [ "thunderbird.desktop" ];
|
||||
};
|
||||
}
|
||||
|
|
68
users/common/programs/zsh/default.nix
Normal file
68
users/common/programs/zsh/default.nix
Normal file
|
@ -0,0 +1,68 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [ ./starfish.nix ];
|
||||
# save history in xdg data home
|
||||
hm-all =
|
||||
{ config, ... }:
|
||||
{
|
||||
home.sessionVariables.HISTDB_FILE = "${config.xdg.dataHome}/zsh/history.db";
|
||||
|
||||
# has to be enabled to support zsh reverse search
|
||||
programs.fzf.enable = true;
|
||||
|
||||
programs.carapace = {
|
||||
enable = false;
|
||||
# this would source all completers sadly some are worse than the builtin completers
|
||||
enableZshIntegration = false;
|
||||
};
|
||||
|
||||
programs.zoxide.enable = true;
|
||||
|
||||
programs.nix-index.enable = true;
|
||||
programs.nix-index.enableZshIntegration = false;
|
||||
programs.nix-index-database.comma.enable = true;
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
dotDir = ".config/zsh";
|
||||
history = {
|
||||
extended = true;
|
||||
path = "${config.xdg.dataHome}/zsh/zsh_history";
|
||||
save = 1000000;
|
||||
share = false;
|
||||
};
|
||||
initExtra = builtins.readFile ./zshrc;
|
||||
# This needs to be loaded befor zsh-fast-syntax-highlighting
|
||||
# is sourced as that overwrites all widgets to redraw with highlighting
|
||||
initExtraFirst = ''
|
||||
if autoload history-search-end; then
|
||||
zle -N history-beginning-search-backward-end history-search-end
|
||||
zle -N history-beginning-search-forward-end history-search-end
|
||||
fi
|
||||
|
||||
'';
|
||||
plugins = [
|
||||
{
|
||||
name = "fzf-tab";
|
||||
src = "${pkgs.zsh-fzf-tab}/share/fzf-tab";
|
||||
}
|
||||
{
|
||||
name = "fast-syntax-highlighting";
|
||||
src = "${pkgs.zsh-fast-syntax-highlighting}/share/zsh/site-functions";
|
||||
}
|
||||
{
|
||||
name = "zsh-histdb";
|
||||
src = pkgs.zsh-histdb;
|
||||
}
|
||||
{
|
||||
name = "zsh-histdb-skim";
|
||||
src = pkgs.zsh-histdb-skim;
|
||||
}
|
||||
];
|
||||
};
|
||||
home.persistence."/state".directories = [
|
||||
".local/share/zsh"
|
||||
".local/share/zoxide"
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
programs.starship = {
|
||||
hm-all.programs.starship = {
|
||||
enable = true;
|
||||
settings = {
|
||||
add_newline = false;
|
|
@ -1,65 +0,0 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
imports = [ ../starfish.nix ];
|
||||
|
||||
# save history in xdg data home
|
||||
home.sessionVariables.HISTDB_FILE = "${config.xdg.dataHome}/zsh/history.db";
|
||||
|
||||
# has to be enabled to support zsh reverse search
|
||||
programs.fzf.enable = true;
|
||||
|
||||
programs.carapace = {
|
||||
enable = false;
|
||||
# this would source all completers sadly some are worse than the builtin completers
|
||||
enableZshIntegration = false;
|
||||
};
|
||||
|
||||
programs.zoxide.enable = true;
|
||||
|
||||
programs.nix-index.enable = true;
|
||||
programs.nix-index.enableZshIntegration = false;
|
||||
programs.nix-index-database.comma.enable = true;
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
dotDir = ".config/zsh";
|
||||
history = {
|
||||
extended = true;
|
||||
path = "${config.xdg.dataHome}/zsh/zsh_history";
|
||||
save = 1000000;
|
||||
share = false;
|
||||
};
|
||||
initExtra = builtins.readFile ./zshrc;
|
||||
# This needs to be loaded befor zsh-fast-syntax-highlighting
|
||||
# is sourced as that overwrites all widgets to redraw with highlighting
|
||||
initExtraFirst = ''
|
||||
if autoload history-search-end; then
|
||||
zle -N history-beginning-search-backward-end history-search-end
|
||||
zle -N history-beginning-search-forward-end history-search-end
|
||||
fi
|
||||
|
||||
'';
|
||||
plugins = [
|
||||
{
|
||||
name = "fzf-tab";
|
||||
src = "${pkgs.zsh-fzf-tab}/share/fzf-tab";
|
||||
}
|
||||
{
|
||||
name = "fast-syntax-highlighting";
|
||||
src = "${pkgs.zsh-fast-syntax-highlighting}/share/zsh/site-functions";
|
||||
}
|
||||
{
|
||||
name = "zsh-histdb";
|
||||
src = pkgs.zsh-histdb;
|
||||
}
|
||||
{
|
||||
name = "zsh-histdb-skim";
|
||||
src = pkgs.zsh-histdb-skim;
|
||||
}
|
||||
];
|
||||
};
|
||||
home.persistence."/state".directories = [
|
||||
".local/share/zsh"
|
||||
".local/share/zoxide"
|
||||
];
|
||||
}
|
|
@ -1,19 +1,13 @@
|
|||
{
|
||||
lib,
|
||||
minimal,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
lib.optionalAttrs (!minimal) {
|
||||
{
|
||||
services.dbus = {
|
||||
enable = true;
|
||||
implementation = "broker";
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
wdisplays
|
||||
wl-clipboard
|
||||
wev
|
||||
];
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
xdgOpenUsePortal = true;
|
||||
|
@ -42,4 +36,23 @@ lib.optionalAttrs (!minimal) {
|
|||
};
|
||||
};
|
||||
};
|
||||
imports = [
|
||||
./fuzzel.nix
|
||||
./sway.nix
|
||||
./hyprland.nix
|
||||
./waybar
|
||||
./swaync
|
||||
./swww.nix
|
||||
];
|
||||
hm.home.packages = with pkgs; [
|
||||
wdisplays
|
||||
wl-clipboard
|
||||
wev
|
||||
];
|
||||
# Autostart hyprland if on tty1 (once, don't restart after logout)
|
||||
hm.programs.zsh.initExtra = lib.mkOrder 9999 ''
|
||||
if uwsm check may-start ; then
|
||||
exec systemd-cat -t uwsm_start uwsm start -S -F Hyprland
|
||||
fi
|
||||
'';
|
||||
}
|
14
users/common/wayland/fuzzel.nix
Normal file
14
users/common/wayland/fuzzel.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
hm.stylix.targets.fuzzel.enable = true;
|
||||
hm.programs.fuzzel = {
|
||||
enable = true;
|
||||
settings = {
|
||||
main = {
|
||||
launch-prefix = "uwsm app --";
|
||||
};
|
||||
};
|
||||
};
|
||||
hm.home.persistence."/state".files = [
|
||||
".cache/fuzzel"
|
||||
];
|
||||
}
|
308
users/common/wayland/hyprland.nix
Normal file
308
users/common/wayland/hyprland.nix
Normal file
|
@ -0,0 +1,308 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib)
|
||||
mkMerge
|
||||
optionals
|
||||
elem
|
||||
mkIf
|
||||
flip
|
||||
concatMap
|
||||
;
|
||||
#from https://github.com/hyprwm/Hyprland/issues/3835
|
||||
float_script = pkgs.writeShellScript "hyprland-bitwarden-float" ''
|
||||
handle() {
|
||||
case $1 in
|
||||
windowtitle*)
|
||||
# Extract the window ID from the line
|
||||
window_id=''${1#*>>}
|
||||
|
||||
# Fetch the list of windows and parse it using jq to find the window by its decimal ID
|
||||
window_info=$(hyprctl clients -j | ${pkgs.jq}/bin/jq --arg id "0x$window_id" '.[] | select(.address == ($id))')
|
||||
|
||||
# Extract the title from the window info
|
||||
window_title=$(echo "$window_info" | ${pkgs.jq}/bin/jq '.title')
|
||||
|
||||
# Check if the title matches the characteristics of the Bitwarden popup window
|
||||
if [[ "$window_title" == '"Extension: (Bitwarden Password Manager) - Bitwarden — Mozilla Firefox"' ]]; then
|
||||
|
||||
# echo $window_id, $window_title
|
||||
# hyprctl dispatch togglefloating address:0x$window_id
|
||||
# hyprctl dispatch resizewindowpixel exact 20% 40%,address:0x$window_id
|
||||
# hyprctl dispatch movewindowpixel exact 40% 30%,address:0x$window_id
|
||||
|
||||
hyprctl dispatch togglefloating address:0x$window_id
|
||||
hyprctl dispatch resizewindowpixel exact "512 768",address:0x$window_id
|
||||
hyprctl dispatch movewindowpixel exact "$HYPRLAND_FLOAT_LOCATION",address:0x$window_id
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Listen to the Hyprland socket for events and process each line with the handle function
|
||||
${pkgs.socat}/bin/socat -U - UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock | while read -r line; do handle "$line"; done
|
||||
'';
|
||||
in
|
||||
{
|
||||
hm = {
|
||||
# UWSM starts a SH to read env variables
|
||||
# this ensures all home.sessionVars are exported
|
||||
programs.bash.enable = true;
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
settings = mkMerge [
|
||||
{
|
||||
input = {
|
||||
kb_layout = "de";
|
||||
kb_variant = "nodeadkeys";
|
||||
follow_mouse = 2;
|
||||
numlock_by_default = true;
|
||||
repeat_rate = 60;
|
||||
repeat_delay = 235;
|
||||
# Only change focus on mouse click
|
||||
float_switch_override_focus = 0;
|
||||
accel_profile = "flat";
|
||||
|
||||
touchpad = {
|
||||
natural_scroll = true;
|
||||
disable_while_typing = true;
|
||||
scroll_factor = 0.7;
|
||||
};
|
||||
};
|
||||
device = {
|
||||
name = "xp-pen-g430s-pen";
|
||||
active_area_size = "48 27";
|
||||
};
|
||||
gestures = {
|
||||
workspace_swipe = true;
|
||||
};
|
||||
|
||||
general = {
|
||||
gaps_in = 0;
|
||||
gaps_out = 0;
|
||||
allow_tearing = true;
|
||||
};
|
||||
#render = {
|
||||
# explicit_sync = 0;
|
||||
# direct_scanout = false;
|
||||
#};
|
||||
binds = {
|
||||
focus_preferred_method = 1;
|
||||
workspace_center_on = 1;
|
||||
};
|
||||
bind =
|
||||
let
|
||||
monitor_binds = {
|
||||
"1" = "j";
|
||||
"2" = "d";
|
||||
"3" = "u";
|
||||
"4" = "a";
|
||||
"5" = "x";
|
||||
"6" = "F1";
|
||||
"7" = "F2";
|
||||
"8" = "F3";
|
||||
"9" = "F4";
|
||||
};
|
||||
in
|
||||
[
|
||||
"SUPER,q,killactive,"
|
||||
"SUPER,return,fullscreen,"
|
||||
"SUPER + SHIFT,return,fullscreenstate,2,0,"
|
||||
"SUPER,f,togglefloating"
|
||||
"SUPER,g,togglegroup"
|
||||
"SUPER,tab,cyclenext,"
|
||||
"ALT,tab,cyclenext,"
|
||||
"SUPER+CTRL,r,submap,resize"
|
||||
|
||||
"SUPER,left,movefocus,l"
|
||||
"SUPER,right,movefocus,r"
|
||||
"SUPER,up,movefocus,u"
|
||||
"SUPER,down,movefocus,d"
|
||||
|
||||
"SUPER,n,movefocus,l"
|
||||
"SUPER,s,movefocus,r"
|
||||
"SUPER,l,movefocus,u"
|
||||
"SUPER,r,movefocus,d"
|
||||
|
||||
"SUPER,h,changegroupactive,b"
|
||||
"SUPER,m,changegroupactive,f"
|
||||
|
||||
"SUPER + SHIFT,left,movewindoworgroup,l"
|
||||
"SUPER + SHIFT,right,movewindoworgroup,r"
|
||||
"SUPER + SHIFT,up,movewindoworgroup,u"
|
||||
"SUPER + SHIFT,down,movewindoworgroup,d"
|
||||
|
||||
"SUPER + SHIFT,n,movewindoworgroup,l"
|
||||
"SUPER + SHIFT,s,movewindoworgroup,r"
|
||||
"SUPER + SHIFT,l,movewindoworgroup,u"
|
||||
"SUPER + SHIFT,r,movewindoworgroup,d"
|
||||
|
||||
"SUPER,comma,workspace,-1"
|
||||
"SUPER,period,workspace,+1"
|
||||
"SUPER + SHIFT,comma,movetoworkspace,-1"
|
||||
"SUPER + SHIFT,period,movetoworkspace,+1"
|
||||
|
||||
"SUPER,b,exec,uwsm app -- firefox"
|
||||
"SUPER,t,exec,uwsm app -- kitty"
|
||||
",Menu,exec,fuzzel"
|
||||
"SUPER,c,exec,${lib.getExe pkgs.scripts.clone-term}"
|
||||
|
||||
"CTRL,F7,pass,class:^(discord)$"
|
||||
"CTRL,F8,pass,class:^(discord)$"
|
||||
"CTRL,F7,pass,class:^(TeamSpeak 3)$"
|
||||
"CTRL,F8,pass,class:^(TeamSpeak 3)$"
|
||||
"CTRL,F9,exec,systemctl --user start swww-update-wallpaper"
|
||||
|
||||
"SUPER + SHIFT,q,exec,uwsm stop"
|
||||
]
|
||||
++ flip concatMap (map toString (lib.lists.range 1 9)) (x: [
|
||||
"SUPER,${monitor_binds."${x}"},workspace,${x}"
|
||||
"SUPER + SHIFT,${monitor_binds."${x}"},movetoworkspacesilent,${x}"
|
||||
]);
|
||||
|
||||
cursor.no_warps = true;
|
||||
debug.disable_logs = false;
|
||||
env =
|
||||
[
|
||||
"NIXOS_OZONE_WL,1"
|
||||
"MOZ_ENABLE_WAYLAND,1"
|
||||
"_JAVA_AWT_WM_NONREPARENTING,1"
|
||||
"QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
|
||||
"QT_QPA_PLATFORM,wayland;xcb"
|
||||
"GDK_BACKEND,wayland"
|
||||
"WLR_DRM_NO_ATOMIC,1" # retest on newest nvidia driver
|
||||
"XDG_SESSION_TYPE,wayland"
|
||||
"TERMINAL,uwsm app -- kitty"
|
||||
]
|
||||
++ optionals (elem "nvidia" config.services.xserver.videoDrivers) [
|
||||
# See https://wiki.hyprland.org/Nvidia/
|
||||
"LIBVA_DRIVER_NAME,nvidia"
|
||||
"GBM_BACKEND,nvidia-drm"
|
||||
];
|
||||
bindm = [
|
||||
# mouse movements
|
||||
"SUPER, mouse:272, movewindow"
|
||||
"SUPER, mouse:273, resizewindow"
|
||||
"SUPER ALT, mouse:272, resizewindow"
|
||||
];
|
||||
animations = {
|
||||
enabled = true;
|
||||
animation = [
|
||||
"windows, 1, 4, default, slide"
|
||||
"windowsOut, 1, 4, default, slide"
|
||||
"windowsMove, 1, 4, default"
|
||||
"border, 1, 2, default"
|
||||
"fade, 1, 4, default"
|
||||
"fadeDim, 1, 4, default"
|
||||
"workspaces, 1, 4, default"
|
||||
];
|
||||
};
|
||||
decoration.rounding = 4;
|
||||
exec-once = [
|
||||
"${pkgs.swaynotificationcenter}/bin/swaync"
|
||||
];
|
||||
misc = {
|
||||
vrr = 1;
|
||||
disable_hyprland_logo = true;
|
||||
mouse_move_focuses_monitor = false;
|
||||
};
|
||||
xwayland.force_zero_scaling = true;
|
||||
windowrulev2 = [
|
||||
# fix these once nvidia gets their shit together
|
||||
#"immediate, class:^(cs2)$"
|
||||
# apex legends
|
||||
"immediate, class:^(steam_app_1172470)$"
|
||||
#???
|
||||
"immediate, class:^(steam_app_238960)$"
|
||||
#baldur
|
||||
#"immediate, class:^(steam_app_1086940)$"
|
||||
"float, class:^(steam)$, title:^(Friends List)"
|
||||
"float, class:^(steam)$, title:(Chat)"
|
||||
|
||||
"float, class:^(streamlink-twitch-gui)$"
|
||||
|
||||
"workspace 2,class:^(firefox)$"
|
||||
"workspace 3,class:^(thunderbird)$"
|
||||
"workspace 4,class:^(bottles)$"
|
||||
"workspace 4,class:^(steam)$, title:^(Steam)"
|
||||
"workspace 4,class:^(prismlauncher)$"
|
||||
"workspace 6,class:^(discord)$"
|
||||
"workspace 6,class:^(WebCord)$"
|
||||
"workspace 6,class:^(TeamSpeak 3)$"
|
||||
"workspace 7,class:^(signal)$"
|
||||
"workspace 7,class:^(TelegramDesktop)$"
|
||||
];
|
||||
}
|
||||
(mkIf (config.node.name == "desktopnix") {
|
||||
input.tablet = {
|
||||
output = "DP-3";
|
||||
};
|
||||
monitor = [
|
||||
"DVI-D-1,preferred,0x0,1"
|
||||
"HDMI-A-1,preferred,0x1080,1"
|
||||
"DP-3,2560x1440@144.00Hz,1920x540,1"
|
||||
# Thank you NVIDIA for this generous, free-of-charge, extra monitor that
|
||||
# doesn't exist and crashes yoru session sometimes when moving a window to it.
|
||||
"Unknown-1, disable"
|
||||
];
|
||||
workspace = [
|
||||
"1, monitor:DP-3, default:true"
|
||||
"2, monitor:DP-3"
|
||||
"3, monitor:DP-3"
|
||||
"4, monitor:DP-3"
|
||||
"5, monitor:DP-3"
|
||||
"6, monitor:DVI-D-1, default:true"
|
||||
"7, monitor:DVI-D-1"
|
||||
"8, monitor:HDMI-A-1, default: true"
|
||||
"9, monitor:HDMI-A-1"
|
||||
];
|
||||
env = [ "HYPRLAND_FLOAT_LOCATION,3800 680" ];
|
||||
})
|
||||
(mkIf (config.node.name == "patricknix") {
|
||||
monitor = [
|
||||
"eDP-1,preferred,0x0,2"
|
||||
# Thank you NVIDIA for this generous, free-of-charge, extra monitor that
|
||||
# doesn't exist and crashes yoru session sometimes when moving a window to it.
|
||||
"Unknown-1, disable"
|
||||
];
|
||||
workspace = [
|
||||
"1, monitor:eDP-1, default:true"
|
||||
"2, monitor:eDP-1"
|
||||
"3, monitor:eDP-1"
|
||||
"4, monitor:eDP-1"
|
||||
"5, monitor:eDP-1"
|
||||
"6, monitor:eDP-1"
|
||||
"7, monitor:eDP-1"
|
||||
"8, monitor:eDP-1"
|
||||
"9, monitor:eDP-1"
|
||||
];
|
||||
env = [ "HYPRLAND_FLOAT_LOCATION,1400 200" ];
|
||||
})
|
||||
];
|
||||
extraConfig = ''
|
||||
submap=resize
|
||||
binde=,right,resizeactive,80 0
|
||||
binde=,left,resizeactive,-80 0
|
||||
binde=,up,resizeactive,0 -80
|
||||
binde=,down,resizeactive,0 80
|
||||
binde=SHIFT,right,resizeactive,10 0
|
||||
binde=SHIFT,left,resizeactive,-10 0
|
||||
binde=SHIFT,up,resizeactive,0 -10
|
||||
binde=SHIFT,down,resizeactive,0 10
|
||||
bind=,return,submap,reset
|
||||
bind=,escape,submap,reset
|
||||
submap=reset
|
||||
|
||||
exec-once = ${pkgs.xorg.xprop}/bin/xprop -root -f _XWAYLAND_GLOBAL_OUTPUT_SCALE 32c -set _XWAYLAND_GLOBAL_OUTPUT_SCALE 2
|
||||
exec-once = ${float_script}
|
||||
env = XCURSOR_SIZE,48
|
||||
exec-once = uwsm finalize
|
||||
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
108
users/common/wayland/sway.nix
Normal file
108
users/common/wayland/sway.nix
Normal file
|
@ -0,0 +1,108 @@
|
|||
{ config, ... }:
|
||||
let
|
||||
nixConfig = config;
|
||||
in
|
||||
{
|
||||
# import shared i3 config
|
||||
imports = [ ../Xorg/sway3.nix ];
|
||||
hm =
|
||||
{ config, ... }:
|
||||
{
|
||||
stylix.targets.sway.enable = true;
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
config =
|
||||
{
|
||||
menu = "fuzzel";
|
||||
startup = [
|
||||
# for games to work input 1 has to be qwerts
|
||||
# but i would like to have bone as my layout
|
||||
{
|
||||
command = "swaymsg input \"*\" xkb_switch_layout 1";
|
||||
always = true;
|
||||
}
|
||||
{ command = "uwsm finalize"; }
|
||||
];
|
||||
input = {
|
||||
"*" = {
|
||||
xkb_layout = "de,de,de";
|
||||
# games are stupid so the main ui has to be de() without bone
|
||||
xkb_variant = ",bone,neo";
|
||||
xkb_options = "grp:win_space_toggle";
|
||||
repeat_delay = "235";
|
||||
repeat_rate = "60";
|
||||
accel_profile = "flat";
|
||||
pointer_accel = "0.3";
|
||||
tap = "enabled";
|
||||
};
|
||||
"type:touchpad" = {
|
||||
pointer_accel = "0.5";
|
||||
natural_scroll = "enabled";
|
||||
};
|
||||
"type:touch" = {
|
||||
map_to_output = "eDP-1";
|
||||
};
|
||||
"type:tablet_tool" = {
|
||||
map_to_output = "eDP-1";
|
||||
};
|
||||
};
|
||||
keybindings =
|
||||
let
|
||||
cfg = config.wayland.windowManager.sway.config;
|
||||
in
|
||||
{
|
||||
"Menu" = "exec ${cfg.menu}";
|
||||
};
|
||||
}
|
||||
// {
|
||||
desktopnix = {
|
||||
output = {
|
||||
DVI-D-1 = {
|
||||
mode = "1920x1080@60Hz";
|
||||
pos = "0,0";
|
||||
};
|
||||
HDMI-A-1 = {
|
||||
mode = "1920x1080@60Hz";
|
||||
pos = "0,1080";
|
||||
};
|
||||
DP-3 = {
|
||||
mode = "2560x1440@143.998Hz";
|
||||
pos = "1920,720";
|
||||
adaptive_sync = "on";
|
||||
};
|
||||
};
|
||||
};
|
||||
patricknix = {
|
||||
output = {
|
||||
"Acer Technologies XB271HU #ASP7ytE/6A7d" = {
|
||||
mode = "2560x1440@59.951Hz";
|
||||
pos = "0,0";
|
||||
};
|
||||
"AU Optronics 0x30EB Unknown" = {
|
||||
mode = "3840x2160@60.002Hz";
|
||||
pos = "2560,0";
|
||||
scale = "2";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
.${nixConfig.node.name} or { };
|
||||
extraConfig =
|
||||
let
|
||||
cfg = config.wayland.windowManager.sway.config;
|
||||
in
|
||||
''
|
||||
bindgesture swipe:3:left workpace next
|
||||
bindgesture swipe:3:right workpace prev
|
||||
bindgesture pinch:4:outward exec ${cfg.menu}
|
||||
'';
|
||||
};
|
||||
# Cursor invisible
|
||||
home.sessionVariables = {
|
||||
WLR_NO_HARDWARE_CURSORS = 1;
|
||||
NIXOS_OZONE_WL = 1;
|
||||
# opengl backend flickers, also vulkan is love.
|
||||
#WLR_RENDERER = "vulkan";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
services.swaync = {
|
||||
hm.services.swaync = {
|
||||
enable = true;
|
||||
settings = {
|
||||
positionX = "right";
|
||||
|
@ -83,7 +83,4 @@
|
|||
)
|
||||
+ (builtins.readFile ./swaync.css);
|
||||
};
|
||||
|
||||
# Started via hyprland to ensure it restarts properly with hyprland
|
||||
systemd.user.services.swaync.Install.WantedBy = lib.mkForce [ ];
|
||||
}
|
|
@ -17,7 +17,7 @@ let
|
|||
};
|
||||
in
|
||||
{
|
||||
systemd.user = {
|
||||
hm.systemd.user = {
|
||||
services = {
|
||||
swww = {
|
||||
Install.WantedBy = [ "graphical-session.target" ];
|
|
@ -1,15 +1,15 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
nixosConfig,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
systemd.user.services."waybar" = {
|
||||
hm.systemd.user.services."waybar" = {
|
||||
Unit.After = [ "graphical-session.target" ];
|
||||
Service.Slice = [ "app-graphical.slice" ];
|
||||
};
|
||||
programs.waybar = {
|
||||
hm.programs.waybar = {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
style =
|
||||
|
@ -32,7 +32,7 @@
|
|||
}
|
||||
'';
|
||||
}
|
||||
.${nixosConfig.node.name} or ""
|
||||
.${config.node.name} or ""
|
||||
)
|
||||
+ builtins.readFile ./waybar.css;
|
||||
settings.main = {
|
||||
|
@ -68,7 +68,7 @@
|
|||
"tray"
|
||||
];
|
||||
}
|
||||
.${nixosConfig.node.name} or [ ];
|
||||
.${config.node.name} or [ ];
|
||||
|
||||
battery = {
|
||||
interval = 1;
|
|
@ -6,6 +6,7 @@
|
|||
...
|
||||
}:
|
||||
lib.optionalAttrs (!minimal) {
|
||||
primaryUser = "patrick";
|
||||
users.users.patrick = {
|
||||
shell = pkgs.zsh;
|
||||
isNormalUser = true;
|
||||
|
@ -40,12 +41,6 @@ lib.optionalAttrs (!minimal) {
|
|||
# xournalpp needs this or else it will crash
|
||||
adwaita-icon-theme
|
||||
];
|
||||
age.secrets = {
|
||||
smb-creds = {
|
||||
owner = "patrick";
|
||||
rekeyFile = ../../secrets/smb.cred.age;
|
||||
};
|
||||
};
|
||||
|
||||
programs.dconf.enable = true;
|
||||
age.secrets."my-gpg-yubikey-keygrip.tar" = {
|
||||
|
@ -54,43 +49,38 @@ lib.optionalAttrs (!minimal) {
|
|||
mode = "640";
|
||||
};
|
||||
|
||||
home-manager.users.patrick = {
|
||||
imports =
|
||||
[
|
||||
./patrick.nix
|
||||
./ssh.nix
|
||||
./firefox.nix
|
||||
./gpg
|
||||
./impermanence.nix
|
||||
./minion.nix
|
||||
./vr.nix
|
||||
imports = [
|
||||
|
||||
../common
|
||||
../common/impermanence.nix
|
||||
./firefox.nix
|
||||
./gpg
|
||||
./impermanence.nix
|
||||
./minion.nix
|
||||
./patrick.nix
|
||||
./smb.nix
|
||||
./ssh.nix
|
||||
./theme.nix
|
||||
|
||||
../common/programs/bottles.nix
|
||||
../common/programs/direnv.nix
|
||||
../common/programs/firefox.nix
|
||||
../common/programs/gdb.nix
|
||||
../common/programs/git.nix
|
||||
../common/programs/kitty.nix
|
||||
../common/programs/minecraft.nix
|
||||
../common/programs/nvim
|
||||
../common/programs/poe.nix
|
||||
../common/programs/spicetify.nix
|
||||
../common/programs/thunderbird.nix
|
||||
../common/programs/gpu-screen-recorder.nix
|
||||
../common/shells/pager.nix
|
||||
]
|
||||
++ {
|
||||
"desktopnix" = [
|
||||
../common/graphical/Xorg
|
||||
../common/programs/obs.nix
|
||||
../common/graphical/wayland
|
||||
./smb.nix
|
||||
];
|
||||
"patricknix" = [ ../common/graphical/wayland ];
|
||||
}
|
||||
.${config.node.name} or [ ];
|
||||
};
|
||||
../common/alias.nix
|
||||
../common/dev.nix
|
||||
../common/wayland
|
||||
|
||||
../common/programs/bottles.nix
|
||||
../common/programs/direnv.nix
|
||||
../common/programs/firefox.nix
|
||||
../common/programs/gdb.nix
|
||||
../common/programs/git.nix
|
||||
../common/programs/gpg.nix
|
||||
../common/programs/gpu-screen-recorder.nix
|
||||
../common/programs/kitty.nix
|
||||
../common/programs/minecraft.nix
|
||||
../common/programs/nvim
|
||||
../common/programs/obs.nix
|
||||
../common/programs/pager.nix
|
||||
../common/programs/poe.nix
|
||||
../common/programs/spicetify.nix
|
||||
../common/programs/steam.nix
|
||||
../common/programs/thunderbird.nix
|
||||
../common/programs/zsh
|
||||
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
programs.firefox =
|
||||
hm.programs.firefox =
|
||||
let
|
||||
betterfox = pkgs.fetchFromGitHub {
|
||||
owner = "yokoffing";
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
{
|
||||
programs.gpg.publicKeys = [
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
hm.programs.gpg.publicKeys = [
|
||||
{
|
||||
source = ./pubkey.gpg;
|
||||
trust = 5;
|
||||
|
@ -9,4 +15,14 @@
|
|||
trust = 5;
|
||||
}
|
||||
];
|
||||
# Make sure the keygrips exist, otherwise we'd need to run `gpg --card-status`
|
||||
# before being able to use the yubikey.
|
||||
hm.home.activation.installKeygrips =
|
||||
config.home-manager.users.root.lib.dag.entryAfter [ "writeBoundary" ]
|
||||
''
|
||||
run mkdir -p "$HOME/.gnupg/private-keys-v1.d"
|
||||
run ${lib.getExe pkgs.gnutar} xvf ${
|
||||
lib.escapeShellArg config.age.secrets."my-gpg-yubikey-keygrip.tar".path
|
||||
} -C "$HOME/.gnupg/private-keys-v1.d/"
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
{ nixosConfig, lib, ... }:
|
||||
{ config, lib, ... }:
|
||||
{
|
||||
home.persistence = {
|
||||
hm.home.persistence = {
|
||||
"/state" = {
|
||||
files = [
|
||||
".ssh/known_hosts"
|
||||
];
|
||||
directories = [
|
||||
"repos"
|
||||
"Downloads"
|
||||
|
||||
"Zotero"
|
||||
|
||||
".config/ts3client"
|
||||
|
@ -13,6 +15,8 @@
|
|||
".config/xournalpp"
|
||||
".cache/xournalpp"
|
||||
|
||||
".local/state/wireplumber"
|
||||
|
||||
".config/OrcaSlicer"
|
||||
|
||||
".config/streamcontroller"
|
||||
|
@ -28,13 +32,12 @@
|
|||
|
||||
".local/share/osu"
|
||||
|
||||
".config/obs-studio"
|
||||
|
||||
".local/share/monado"
|
||||
|
||||
# For nextcloud client install
|
||||
"Nextcloud"
|
||||
".config/Nextcloud"
|
||||
".config/dconf"
|
||||
|
||||
# for electron signal app state
|
||||
".config/Signal"
|
||||
|
@ -45,27 +48,13 @@
|
|||
|
||||
".cache/mpv"
|
||||
|
||||
# Folders for steam
|
||||
".local/share/Steam"
|
||||
".steam"
|
||||
# Ken follets pillars of earth
|
||||
".local/share//Daedalic Entertainment GmbH/"
|
||||
# Nvidia shader cache
|
||||
".cache/nvidia"
|
||||
# Vulkan shader cache
|
||||
".local/share/vulkan"
|
||||
|
||||
# bottles state games
|
||||
".local/share/bottles"
|
||||
|
||||
".config/spotify"
|
||||
".cache/spotify"
|
||||
".local/share/cargo"
|
||||
".local/share/wallpapers"
|
||||
];
|
||||
};
|
||||
"/panzer/state".directories = lib.lists.optionals (nixosConfig.disko.devices.zpool ? "panzer") [
|
||||
".local/share/SteamPanzer"
|
||||
"/panzer/state".directories = lib.lists.optionals (config.disko.devices.zpool ? "panzer") [
|
||||
"videos"
|
||||
];
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ lib, pkgs, ... }:
|
||||
{ config, pkgs, ... }:
|
||||
let
|
||||
# addon-path is base64 encode path
|
||||
cfgFile = pkgs.writeText "mimion.xml" ''
|
||||
|
@ -26,12 +26,14 @@ let
|
|||
'';
|
||||
in
|
||||
{
|
||||
home.packages = [ pkgs.minion ];
|
||||
hm.home.packages = [ pkgs.minion ];
|
||||
# yet another program that uses the config file as a live state file
|
||||
# Why?
|
||||
home.activation.installMinionConfig = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||
run mkdir -p .minion
|
||||
run cp -f ${cfgFile} .minion/minion.xml
|
||||
run chmod 640 .minion/minion.xml
|
||||
'';
|
||||
hm.home.activation.installMinionConfig =
|
||||
config.home-manager.users.root.lib.dag.entryAfter [ "writeBoundary" ]
|
||||
''
|
||||
run mkdir -p .minion
|
||||
run cp -f ${cfgFile} .minion/minion.xml
|
||||
run chmod 640 .minion/minion.xml
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -1,70 +1,57 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
nixosConfig,
|
||||
...
|
||||
}:
|
||||
{
|
||||
home = {
|
||||
hm.home = {
|
||||
packages = with pkgs; [
|
||||
nextcloud-client
|
||||
discord
|
||||
webcord
|
||||
netflix
|
||||
xournalpp
|
||||
galaxy-buds-client
|
||||
thunderbird
|
||||
signal-desktop
|
||||
telegram-desktop
|
||||
chatterino2
|
||||
chromium
|
||||
osu-lazer-bin
|
||||
teamspeak_client
|
||||
zotero
|
||||
timer
|
||||
orca-slicer
|
||||
hexyl
|
||||
cmatrix
|
||||
cowsay
|
||||
discord
|
||||
feh
|
||||
figlet
|
||||
galaxy-buds-client
|
||||
gh
|
||||
hexyl
|
||||
hyperfine
|
||||
mpv
|
||||
netflix
|
||||
nextcloud-client
|
||||
nixpkgs-review
|
||||
|
||||
via
|
||||
|
||||
orca-slicer
|
||||
osu-lazer-bin
|
||||
pinentry-gnome3 # for yubikey pinentry
|
||||
signal-desktop
|
||||
streamlink
|
||||
streamlink-twitch-gui-bin
|
||||
chatterino2
|
||||
|
||||
teamspeak_client
|
||||
telegram-desktop
|
||||
timer
|
||||
via
|
||||
webcord
|
||||
xournalpp
|
||||
yt-dlp
|
||||
|
||||
hyperfine
|
||||
|
||||
figlet
|
||||
cowsay
|
||||
cmatrix
|
||||
zathura
|
||||
zotero
|
||||
];
|
||||
};
|
||||
xdg.configFile."streamlink/config".text = ''
|
||||
player=mpv
|
||||
'';
|
||||
xdg.configFile."mpv/mpv.conf".text = ''
|
||||
vo=gpu-next
|
||||
hwdec=auto-safe
|
||||
volume=50
|
||||
'';
|
||||
xdg.configFile."mpv/input.conf".text = ''
|
||||
UP add volume 2
|
||||
DOWN add volume -2
|
||||
'';
|
||||
# Make sure the keygrips exist, otherwise we'd need to run `gpg --card-status`
|
||||
# before being able to use the yubikey.
|
||||
home.activation.installKeygrips = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||
run mkdir -p "$HOME/.gnupg/private-keys-v1.d"
|
||||
run ${lib.getExe pkgs.gnutar} xvf ${
|
||||
lib.escapeShellArg nixosConfig.age.secrets."my-gpg-yubikey-keygrip.tar".path
|
||||
} -C "$HOME/.gnupg/private-keys-v1.d/"
|
||||
'';
|
||||
# Autostart hyprland if on tty1 (once, don't restart after logout)
|
||||
programs.zsh.initExtra = lib.mkOrder 9999 ''
|
||||
if uwsm check may-start ; then
|
||||
exec systemd-cat -t uwsm_start uwsm start -S -F Hyprland
|
||||
fi
|
||||
'';
|
||||
hm.programs.bat.enable = true;
|
||||
# needed for gnome pinentry
|
||||
services.dbus.packages = [ pkgs.gcr ];
|
||||
hm = {
|
||||
xdg.configFile."streamlink/config".text = ''
|
||||
player=mpv
|
||||
'';
|
||||
xdg.configFile."mpv/mpv.conf".text = ''
|
||||
vo=gpu-next
|
||||
hwdec=auto-safe
|
||||
volume=50
|
||||
'';
|
||||
xdg.configFile."mpv/input.conf".text = ''
|
||||
UP add volume 2
|
||||
DOWN add volume -2
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
Binary file not shown.
|
@ -1,9 +1,9 @@
|
|||
{ nixosConfig, nodes, ... }:
|
||||
{ config, nodes, ... }:
|
||||
{
|
||||
home.smb =
|
||||
hm.home.smb =
|
||||
let
|
||||
address = nodes.elisabeth-samba.config.wireguard.samba-patrick.ipv4;
|
||||
credentials = nixosConfig.age.secrets.smb-creds.path;
|
||||
credentials = config.age.secrets.smb-creds.path;
|
||||
in
|
||||
[
|
||||
{
|
||||
|
@ -37,4 +37,10 @@
|
|||
automatic = true;
|
||||
}
|
||||
];
|
||||
age.secrets = {
|
||||
smb-creds = {
|
||||
owner = "patrick";
|
||||
rekeyFile = ../../secrets/smb.cred.age;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
# yubikey public key parts
|
||||
home.file.".ssh/1.pub".text = ''
|
||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDZixkix0KfKuq7Q19whS5FQQg51/AJGB5BiNF/7h/LM cardno:15 489 049
|
||||
'';
|
||||
home.file.".ssh/2.pub".text = ''
|
||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHxD4GOrwrBTG4/qQhm5hoSB2CP7W9g1LPWP11oLGOjQ cardno:23 010 997
|
||||
'';
|
||||
programs.ssh = {
|
||||
hm.home.file = {
|
||||
".ssh/1.pub".text = ''
|
||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDZixkix0KfKuq7Q19whS5FQQg51/AJGB5BiNF/7h/LM cardno:15 489 049
|
||||
'';
|
||||
".ssh/2.pub".text = ''
|
||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHxD4GOrwrBTG4/qQhm5hoSB2CP7W9g1LPWP11oLGOjQ cardno:23 010 997
|
||||
'';
|
||||
};
|
||||
hm.programs.ssh = {
|
||||
enable = true;
|
||||
controlMaster = "auto";
|
||||
controlPersist = "5s";
|
||||
|
@ -35,7 +37,7 @@
|
|||
};
|
||||
|
||||
"maddy" = {
|
||||
hostname = config.userSecrets.hetzner_ip;
|
||||
hostname = config.secrets.secrets.global.user.hetzner_ip;
|
||||
user = "root";
|
||||
};
|
||||
|
||||
|
|
199
users/patrick/theme.nix
Normal file
199
users/patrick/theme.nix
Normal file
|
@ -0,0 +1,199 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
||||
environment.systemPackages = with pkgs; [ xdg-utils ];
|
||||
xdg.portal = {
|
||||
xdgOpenUsePortal = true;
|
||||
enable = true;
|
||||
extraPortals = with pkgs; [
|
||||
xdg-desktop-portal-wlr
|
||||
xdg-desktop-portal-gtk
|
||||
];
|
||||
config = {
|
||||
common.default = [
|
||||
"gtk"
|
||||
"hyprland"
|
||||
];
|
||||
sway.default = [ "wlr" ];
|
||||
};
|
||||
};
|
||||
fonts = {
|
||||
enableGhostscriptFonts = false;
|
||||
fontDir.enable = false;
|
||||
fontconfig = {
|
||||
localConf = ''
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
<fontconfig>
|
||||
<alias binding="weak">
|
||||
<family>monospace</family>
|
||||
<prefer>
|
||||
<family>emoji</family>
|
||||
</prefer>
|
||||
</alias>
|
||||
<alias binding="weak">
|
||||
<family>sans-serif</family>
|
||||
<prefer>
|
||||
<family>emoji</family>
|
||||
</prefer>
|
||||
</alias>
|
||||
<alias binding="weak">
|
||||
<family>serif</family>
|
||||
<prefer>
|
||||
<family>emoji</family>
|
||||
</prefer>
|
||||
</alias>
|
||||
</fontconfig>
|
||||
'';
|
||||
};
|
||||
packages = with pkgs; [
|
||||
(nerdfonts.override { fonts = [ "NerdFontsSymbolsOnly" ]; })
|
||||
ibm-plex
|
||||
dejavu_fonts
|
||||
unifont
|
||||
freefont_ttf
|
||||
gyre-fonts # TrueType substitutes for standard PostScript fonts
|
||||
liberation_ttf
|
||||
noto-fonts
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-cjk-serif
|
||||
noto-fonts-emoji
|
||||
noto-fonts-extra
|
||||
];
|
||||
};
|
||||
stylix.fonts = {
|
||||
serif = {
|
||||
package = pkgs.dejavu_fonts;
|
||||
name = "IBM Plex Serif";
|
||||
};
|
||||
|
||||
sansSerif = {
|
||||
package = pkgs.dejavu_fonts;
|
||||
name = "IBM Plex Sans";
|
||||
};
|
||||
|
||||
monospace = {
|
||||
# No need for patched nerd fonts, kitty can pick up on them automatically,
|
||||
# and ideally every program should do that: https://sw.kovidgoyal.net/kitty/faq/#kitty-is-not-able-to-use-my-favorite-font
|
||||
package = pkgs.jetbrains-mono;
|
||||
name = "JetBrains Mono";
|
||||
};
|
||||
|
||||
emoji = {
|
||||
package = pkgs.noto-fonts-emoji;
|
||||
name = "Noto Color Emoji";
|
||||
};
|
||||
};
|
||||
stylix = {
|
||||
enable = true;
|
||||
autoEnable = false;
|
||||
polarity = "dark";
|
||||
image = config.lib.stylix.pixel "base00";
|
||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/vice.yaml";
|
||||
# Has to be green
|
||||
override.base0B = "#00CC99";
|
||||
#base16Scheme = {
|
||||
# base00 = "#101419";
|
||||
# base01 = "#171B20";
|
||||
# base02 = "#21262e";
|
||||
# base03 = "#242931";
|
||||
# base04 = "#485263";
|
||||
# base05 = "#b6beca";
|
||||
# base06 = "#dee1e6";
|
||||
# base07 = "#e3e6eb";
|
||||
# base08 = "#e05f65";
|
||||
# base09 = "#f9a872";
|
||||
# base0A = "#f1cf8a";
|
||||
# base0B = "#78dba9";
|
||||
# base0C = "#74bee9";
|
||||
# base0D = "#70a5eb";
|
||||
# base0E = "#c68aee";
|
||||
# base0F = "#9378de";
|
||||
#};
|
||||
## based on decaycs-dark, bright variant
|
||||
#base16Scheme = {
|
||||
# base00 = "#101419";
|
||||
# base01 = "#171B20";
|
||||
# base02 = "#21262e";
|
||||
# base03 = "#242931";
|
||||
# base04 = "#485263";
|
||||
# base05 = "#b6beca";
|
||||
# base06 = "#dee1e6";
|
||||
# base07 = "#e3e6eb";
|
||||
# base08 = "#e5646a";
|
||||
# base09 = "#f7b77c";
|
||||
# base0A = "#f6d48f";
|
||||
# base0B = "#94F7C5";
|
||||
# base0C = "#79c3ee";
|
||||
# base0D = "#75aaf0";
|
||||
# base0E = "#cb8ff3";
|
||||
# base0F = "#9d85e1";
|
||||
#};
|
||||
};
|
||||
|
||||
hm =
|
||||
{ config, ... }:
|
||||
{
|
||||
stylix = {
|
||||
cursor = {
|
||||
package = pkgs.openzone-cursors;
|
||||
name = "OpenZone_White_Slim";
|
||||
size = 18;
|
||||
};
|
||||
inherit (config.stylix) polarity;
|
||||
targets = {
|
||||
gtk.enable = true;
|
||||
bat.enable = true;
|
||||
dunst.enable = true;
|
||||
zathura.enable = true;
|
||||
xresources.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
xresources.properties = {
|
||||
"Xft.hinting" = true;
|
||||
"Xft.antialias" = true;
|
||||
"Xft.autohint" = false;
|
||||
"Xft.lcdfilter" = "lcddefault";
|
||||
"Xft.hintstyle" = "hintfull";
|
||||
"Xft.rgba" = "rgb";
|
||||
};
|
||||
|
||||
gtk =
|
||||
let
|
||||
gtk34extraConfig = {
|
||||
gtk-application-prefer-dark-theme = 1;
|
||||
gtk-cursor-theme-size = 18;
|
||||
gtk-enable-animations = true;
|
||||
gtk-xft-antialias = 1;
|
||||
gtk-xft-dpi = 96; # XXX: delete for wayland?
|
||||
gtk-xft-hinting = 1;
|
||||
gtk-xft-hintstyle = "hintfull";
|
||||
gtk-xft-rgba = "rgb";
|
||||
};
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
iconTheme = {
|
||||
name = "Vimix-Doder";
|
||||
package = pkgs.vimix-icon-theme;
|
||||
};
|
||||
|
||||
gtk2.extraConfig = "gtk-application-prefer-dark-theme = true";
|
||||
gtk3.extraConfig = gtk34extraConfig;
|
||||
gtk4.extraConfig = gtk34extraConfig;
|
||||
};
|
||||
|
||||
home.sessionVariables.GTK_THEME = config.gtk.theme.name;
|
||||
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme.name = "adwaita";
|
||||
style.name = "Adwaita-Dark";
|
||||
};
|
||||
};
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue