formatting, big time

This commit is contained in:
Schrottkatze 2025-04-11 09:20:46 +02:00
parent 38d96c9f52
commit 509320c115
Signed by: schrottkatze
SSH key fingerprint: SHA256:FPOYVeBy3QP20FEM42uWF1Wa/Qhlk+L3S2+Wuau/Auo
64 changed files with 1293 additions and 990 deletions

View file

@ -10,11 +10,13 @@
...
}:
with lib;
with builtins; {
with builtins;
{
imports = [ lix-module.nixosModules.default ];
environment = {
systemPackages = with pkgs; [
nixfmt-rfc-style
overskride
transmission_4-gtk
@ -105,7 +107,16 @@ with builtins; {
users.users.jade = {
isNormalUser = true;
extraGroups = ["wheel" "input" "uinput" "libvirtd" "adbusers" "dialout" "plugdev" "wireshark"];
extraGroups = [
"wheel"
"input"
"uinput"
"libvirtd"
"adbusers"
"dialout"
"plugdev"
"wireshark"
];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOaE8TFsIazpn4OnHvHcRpOFr9FfvMaWOiEjmHsmnAoE cardno:000F_70CD7D05"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILg7hhAKxIAbokHHcIj9HBgbkgoKGCG2R+gx7HZKL+iz cardno:000F_93C6A612"

View file

@ -24,7 +24,8 @@
};
};
outputs = {
outputs =
{
self,
nixpkgs,
nixpkgs-stable,
@ -38,12 +39,14 @@
fenix,
crane,
...
} @ inputs: let
}@inputs:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
pkgs-stable = nixpkgs-stable.legacyPackages.${system};
pkgs-unstable-small = nixpkgs-unstable-small.legacyPackages.${system};
rs-toolchain = with fenix.packages.${system};
rs-toolchain =
with fenix.packages.${system};
combine [
complete.toolchain
];
@ -55,7 +58,8 @@
src = crane-lib.cleanCargoSource (crane-lib.path ./.);
};
};
in {
in
{
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt-rfc-style;
devShells."x86_64-linux".default = pkgs.mkShell {
buildInputs = [
@ -67,7 +71,14 @@
nixosConfigurations = {
monosodium-glutamate-g = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs pkgs-unstable-small pkgs-stable rs-programs lix-module niri;
inherit
inputs
pkgs-unstable-small
pkgs-stable
rs-programs
lix-module
niri
;
};
system = "x86_64-linux";
modules = [
@ -84,11 +95,13 @@
home-manager.sharedModules = [
inputs.nixcord.homeManagerModules.nixcord
];
home-manager.users.jade = {
home-manager.users.jade =
{
nixosConfig,
pkgs,
...
}: {
}:
{
home.sessionVariables.TZ = nixosConfig.time.timeZone;
home.stateVersion = "${nixosConfig.system.stateVersion}";
};
@ -97,7 +110,14 @@
};
denkbrett = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs pkgs-unstable-small pkgs-stable rs-programs lix-module niri;
inherit
inputs
pkgs-unstable-small
pkgs-stable
rs-programs
lix-module
niri
;
};
system = "x86_64-linux";
modules = [
@ -114,11 +134,13 @@
home-manager.sharedModules = [
inputs.nixcord.homeManagerModules.nixcord
];
home-manager.users.jade = {
home-manager.users.jade =
{
nixosConfig,
pkgs,
...
}: {
}:
{
home.sessionVariables.TZ = nixosConfig.time.timeZone;
home.stateVersion = "22.11";
};

View file

@ -1,7 +1,8 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{pkgs, ...}: {
{ pkgs, ... }:
{
nixpkgs.config.permittedInsecurePackages = [
"electron-25.9.0"
"electron-27.3.11"

View file

@ -7,12 +7,19 @@
pkgs,
modulesPath,
...
}: {
}:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"];
boot.initrd.availableKernelModules = [
"xhci_pci"
"nvme"
"usb_storage"
"sd_mod"
"rtsx_pci_sdmmc"
];
boot.initrd.kernelModules = [ "i915" ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
@ -20,22 +27,33 @@
fileSystems."/" = {
device = "/dev/disk/by-uuid/4f9e8afa-f8d7-40bf-b3ea-17e8e8fbb694";
fsType = "btrfs";
options = ["subvol=@" "compress=zstd:3" "noatime"];
options = [
"subvol=@"
"compress=zstd:3"
"noatime"
];
};
fileSystems."/home" = {
device = "/dev/disk/by-uuid/4f9e8afa-f8d7-40bf-b3ea-17e8e8fbb694";
fsType = "btrfs";
options = ["subvol=@home" "compress=zstd:3"];
options = [
"subvol=@home"
"compress=zstd:3"
];
};
fileSystems."/swap" = {
device = "/dev/disk/by-uuid/4f9e8afa-f8d7-40bf-b3ea-17e8e8fbb694";
fsType = "btrfs";
options = ["subvol=@/@swap" "noatime"];
options = [
"subvol=@/@swap"
"noatime"
];
};
boot.initrd.luks.devices."luks-9cd75cce-6829-4db8-8c5c-a9fb9ec3e122".device = "/dev/disk/by-uuid/9cd75cce-6829-4db8-8c5c-a9fb9ec3e122";
boot.initrd.luks.devices."luks-9cd75cce-6829-4db8-8c5c-a9fb9ec3e122".device =
"/dev/disk/by-uuid/9cd75cce-6829-4db8-8c5c-a9fb9ec3e122";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/C6CA-5DE8";

View file

@ -1,4 +1,5 @@
{...}: {
{ ... }:
{
imports = [
./input.nix
./graphics.nix

View file

@ -3,7 +3,8 @@
lib,
config,
...
}: {
}:
{
environment.variables = {
VDPAU_DRIVER = lib.mkIf config.hardware.graphics.enable (lib.mkDefault "va_gl");
};

View file

@ -1,10 +1,18 @@
{...}: {
{ ... }:
{
# key remapping
jade.input.remapping = let
jade.input.remapping =
let
default = {
swapKeys = [
["KEY_Y" "KEY_Z"]
["KEY_LEFTALT" "KEY_LEFTMETA"]
[
"KEY_Y"
"KEY_Z"
]
[
"KEY_LEFTALT"
"KEY_LEFTMETA"
]
];
dual_role = [
{
@ -14,7 +22,8 @@
}
];
};
in {
in
{
enable = true;
devices."AT Translated Set 2 keyboard" = default;
devices."Razer Razer Huntsman" = default;

View file

@ -5,7 +5,8 @@
pkgs,
pkgs-stable,
...
}: {
}:
{
imports = [
./hardware-configuration.nix
../../common.nix

View file

@ -7,12 +7,20 @@
pkgs,
modulesPath,
...
}: {
}:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "uas" "usbhid" "sd_mod"];
boot.initrd.availableKernelModules = [
"nvme"
"xhci_pci"
"ahci"
"uas"
"usbhid"
"sd_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
@ -23,12 +31,16 @@
options = [ "subvol=@" ];
};
boot.initrd.luks.devices."luks-919f9b8b-2804-447a-97e0-f7f515d0be56".device = "/dev/disk/by-uuid/919f9b8b-2804-447a-97e0-f7f515d0be56";
boot.initrd.luks.devices."luks-919f9b8b-2804-447a-97e0-f7f515d0be56".device =
"/dev/disk/by-uuid/919f9b8b-2804-447a-97e0-f7f515d0be56";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/3FAD-A6B4";
fsType = "vfat";
options = ["fmask=0077" "dmask=0077"];
options = [
"fmask=0077"
"dmask=0077"
];
};
fileSystems."/swap" = {

View file

@ -1,4 +1,5 @@
{...}: {
{ ... }:
{
imports = [
./graphics.nix
];

View file

@ -1,4 +1,5 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
environment.systemPackages = [
pkgs.nvtopPackages.amd
pkgs.radeontop

View file

@ -1,4 +1,5 @@
{...}: {
{ ... }:
{
imports = [
./shell
./desktop

View file

@ -4,7 +4,8 @@
pkgs,
...
}:
with lib; {
with lib;
{
imports = [
./gaming.nix
./syncthing.nix
@ -28,7 +29,9 @@ with lib; {
notifications.test = true;
};
home-manager.users.jade = {pkgs, ...}: {
home-manager.users.jade =
{ pkgs, ... }:
{
programs.ssh = {
controlMaster = "yes";
};

View file

@ -2,16 +2,20 @@
config,
lib,
...
}: let
}:
let
cfg = config.jade.desktop.gaming;
in
with lib; {
with lib;
{
options.jade.desktop.gaming = {
enable = mkEnableOption "Enable gaming stuff";
};
config = mkIf cfg.enable {
programs.steam.enable = true;
home-manager.users.jade = {pkgs, ...}: {
home-manager.users.jade =
{ pkgs, ... }:
{
home.packages = with pkgs; [
lutris
prismlauncher

View file

@ -3,16 +3,20 @@
lib,
pkgs,
...
}: let
}:
let
cfg = config.jade.desktop.kdeconnect;
in
with lib; {
with lib;
{
options.jade.desktop.kdeconnect = {
enable = mkEnableOption "Enable KDE connect";
};
config = mkIf cfg.enable {
programs.kdeconnect.enable = true;
home-manager.users.jade = {pkgs, ...}: {
home-manager.users.jade =
{ pkgs, ... }:
{
services.kdeconnect = {
enable = true;
indicator = true;

View file

@ -3,19 +3,23 @@
lib,
pkgs,
...
}: let
}:
let
cfg = config.jade.desktop.social;
in
with lib; {
with lib;
{
options.jade.desktop.social = {
enable = mkEnableOption "Enable social apps";
};
config = mkIf cfg.enable {
home-manager.users.jade = {
home-manager.users.jade =
{
pkgs,
pkgs-stable,
...
}: {
}:
{
programs.nixcord = {
enable = true;
vesktop = {

View file

@ -3,10 +3,12 @@
lib,
pkgs,
...
}: let
}:
let
cfg = config.jade.desktop.syncthing;
in
with lib; {
with lib;
{
options.jade.desktop.syncthing = {
enable = mkEnableOption "Enable syncing via syncthing";
};

View file

@ -1,4 +1,5 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
programs = {
noisetorch.enable = true;
};

View file

@ -1,4 +1,5 @@
{...}: {
{ ... }:
{
imports = [
./audio.nix
./home

View file

@ -3,10 +3,12 @@
config,
lib,
...
}: let
}:
let
cfg = config.jade.desktop.dm;
in
with lib; {
with lib;
{
options.jade.desktop.dm.autoLogin = {
enable = mkEnableOption "Enable Autologin";
delay = mkOption {

View file

@ -1,4 +1,5 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
home.file = {
".tridactylrc" = {
text = ''
@ -16,7 +17,9 @@
};
policies = {
DefaultDownloadDirectory = "\${home}/Downloads";
Extensions.Install = builtins.map (name: "https://addons.mozilla.org/firefox/downloads/latest/${name}") [
Extensions.Install =
builtins.map (name: "https://addons.mozilla.org/firefox/downloads/latest/${name}")
[
"ublock-origin"
"tridactyl-vim"
"privacy-badger17"
@ -164,7 +167,10 @@
template = "https://docs.rs/{searchTerms}";
}
];
definedAliases = ["doc" "docd"];
definedAliases = [
"doc"
"docd"
];
};
"rust std docs" = {
urls = [

View file

@ -1,6 +1,9 @@
{...}: {
{ ... }:
{
programs.niri.enable = true;
home-manager.users.jade = {pkgs, ...}: {
home-manager.users.jade =
{ pkgs, ... }:
{
imports = [
./notifications.nix
./terminal.nix

View file

@ -1,4 +1,5 @@
{ ... }: {
{ ... }:
{
programs.eww = {
enable = true;
configDir = ./configDir;

View file

@ -2,7 +2,8 @@
pkgs,
lib,
...
}: let
}:
let
# stolen: https://github.com/MultisampledNight/core/blob/678f176cb24f5dc4b5dc629cfd3e643487be01bb/system/packages/layaway/default.nix#L7-L25
layaway = pkgs.rustPlatform.buildRustPackage rec {
pname = "layaway";
@ -24,6 +25,7 @@
maintainers = [ maintainers.multisn8 ];
};
};
in {
in
{
home.packages = [ layaway ];
}

View file

@ -1,11 +1,52 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
programs.niri.settings.binds = {
# spawn terminal
"Mod+Return".action.spawn = "kitty";
"Mod+Return".repeat = false;
"Mod+D".action.spawn = ["wofi" "-S" "drun" "--allow-images"];
"Mod+D".action.spawn = [
"wofi"
"-S"
"drun"
"--allow-images"
];
"Mod+D".repeat = false;
"Mod+I".action.spawn = ["${pkgs.rofimoji}/bin/rofimoji" "--selector" "wofi" "-f" "alchemical_symbols" "anatolian_hieroglyphs" "emojis" "braille_patterns" "box_drawing" "chess_symbols" "emoticons" "geometric_shapes" "gothic" "greek_extended" "math" "mathematical_alphanumeric_symbols" "mathematical_operators" "miscellaneous_symbols" "miscellaneous_mathematical_symbols-a" "miscellaneous_mathematical_symbols-b" "miscellaneous_symbols_and_arrows" "miscellaneous_symbols_and_pictographs" "miscellaneous_technical" "modi" "modifier_tone_letters" "musical_symbols" "nerd_font" "number_forms" "shorthand_format_controls" "specials" "variation_selectors" "vertical_forms" "-a" "copy"];
"Mod+I".action.spawn = [
"${pkgs.rofimoji}/bin/rofimoji"
"--selector"
"wofi"
"-f"
"alchemical_symbols"
"anatolian_hieroglyphs"
"emojis"
"braille_patterns"
"box_drawing"
"chess_symbols"
"emoticons"
"geometric_shapes"
"gothic"
"greek_extended"
"math"
"mathematical_alphanumeric_symbols"
"mathematical_operators"
"miscellaneous_symbols"
"miscellaneous_mathematical_symbols-a"
"miscellaneous_mathematical_symbols-b"
"miscellaneous_symbols_and_arrows"
"miscellaneous_symbols_and_pictographs"
"miscellaneous_technical"
"modi"
"modifier_tone_letters"
"musical_symbols"
"nerd_font"
"number_forms"
"shorthand_format_controls"
"specials"
"variation_selectors"
"vertical_forms"
"-a"
"copy"
];
"Mod+Shift+E".action.quit = [ ];
"Mod+Shift+Q".action.close-window = [ ];
@ -78,10 +119,30 @@
"Mod+W".action.toggle-column-tabbed-display = [ ];
# media keys
"XF86AudioRaiseVolume".action.spawn = ["wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1+"];
"XF86AudioLowerVolume".action.spawn = ["wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1-"];
"XF86AudioMute".action.spawn = ["wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"];
"XF86AudioMicMute" .action.spawn = ["wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"];
"XF86AudioRaiseVolume".action.spawn = [
"wpctl"
"set-volume"
"@DEFAULT_AUDIO_SINK@"
"0.1+"
];
"XF86AudioLowerVolume".action.spawn = [
"wpctl"
"set-volume"
"@DEFAULT_AUDIO_SINK@"
"0.1-"
];
"XF86AudioMute".action.spawn = [
"wpctl"
"set-mute"
"@DEFAULT_AUDIO_SINK@"
"toggle"
];
"XF86AudioMicMute".action.spawn = [
"wpctl"
"set-mute"
"@DEFAULT_AUDIO_SOURCE@"
"toggle"
];
"XF86AudioRaiseVolume".allow-when-locked = true;
"XF86AudioLowerVolume".allow-when-locked = true;
"XF86AudioMute".allow-when-locked = true;

View file

@ -1,4 +1,5 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
imports = [
./xwayland-sat.nix
./screenshot.nix
@ -14,7 +15,14 @@
};
spawn-at-startup = [
{command = ["eww" "open-many" "topBar" "bottomBar"];}
{
command = [
"eww"
"open-many"
"topBar"
"bottomBar"
];
}
{
command = [
"${pkgs.swaybg}/bin/swaybg"

View file

@ -1,4 +1,5 @@
{...}: {
{ ... }:
{
programs.niri.settings.input = {
keyboard = {
xkb = {

View file

@ -1,4 +1,5 @@
{...}: {
{ ... }:
{
programs.niri.settings = {
layer-rules = [
{
@ -15,7 +16,9 @@
{ title = "^.*(Discord|Beispiel Screenshare block Bug|Bitwarden|Träwelling).*$"; }
];
excludes = [
{title = "^.*((Schrottkatze|Statistics|Leaderboard) - Träwelling|chaos.social|Nekoverse|catgirl.cloud).*$";}
{
title = "^.*((Schrottkatze|Statistics|Leaderboard) - Träwelling|chaos.social|Nekoverse|catgirl.cloud).*$";
}
{ is-floating = true; }
];
block-out-from = "screen-capture";

View file

@ -1,4 +1,5 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
home.packages = [ pkgs.gamescope ];
programs.niri.settings = {
window-rules = [
@ -48,7 +49,11 @@
is-floating = true;
}
];
geometry-corner-radius = let val = 5.; in {
geometry-corner-radius =
let
val = 5.;
in
{
bottom-left = val;
bottom-right = val;
top-left = val;

View file

@ -1,4 +1,5 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
programs.niri.settings = {
screenshot-path = "~/Pictures/screenshots/%Y-%m-%dT%H:%M:%S.png";
binds = {

View file

@ -1,4 +1,5 @@
{...}: {
{ ... }:
{
programs.niri.settings = {
prefer-no-csd = true;
@ -46,9 +47,11 @@
window-rules = [
{
matches = [{
matches = [
{
is-floating = true;
}];
}
];
baba-is-float = true;
shadow = {
offset.y = 0;
@ -60,13 +63,18 @@
};
}
{
geometry-corner-radius = let val = 1.; in {
geometry-corner-radius =
let
val = 1.;
in
{
bottom-left = val;
bottom-right = val;
top-left = val;
top-right = val;
};
clip-to-geometry = true;
}];
}
];
};
}

View file

@ -1,4 +1,5 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
programs.niri.settings = {
spawn-at-startup = [
{ command = [ "${pkgs.xwayland-satellite}/bin/xwayland-satellite" ]; }

View file

@ -1,4 +1,5 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
home.packages = [
pkgs.libnotify
];

View file

@ -1,4 +1,5 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
# unsure whether i still need swayidle, will keep it in and might remove after further testing
services.swayidle = {

View file

@ -1,4 +1,5 @@
{...}: {
{ ... }:
{
programs.kitty = {
enable = true;
font.size = 12;

View file

@ -1,4 +1,5 @@
{...}: {
{ ... }:
{
time.timeZone = "Europe/Berlin";
i18n.extraLocaleSettings = {
LC_ADDRESS = "de_DE.UTF-8";

View file

@ -1,4 +1,5 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
services.printing = {
enable = true;
drivers = with pkgs; [

View file

@ -1,4 +1,5 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
stylix = {
enable = true;
polarity = "dark";
@ -25,7 +26,9 @@
};
};
};
home-manager.users.jade = {pkgs, ...}: {
home-manager.users.jade =
{ pkgs, ... }:
{
stylix.targets = {
firefox = {
profileNames = [ "jade" ];

View file

@ -1,4 +1,5 @@
{...}: {
{ ... }:
{
services.tlp = {
enable = true;
settings = {

View file

@ -3,7 +3,8 @@
lib,
pkgs,
...
}: {
}:
{
imports = [
./spacenav.nix
./wacom.nix

View file

@ -3,10 +3,12 @@
config,
lib,
...
}: let
}:
let
cfg = config.jade.hwKey;
in
with lib; {
with lib;
{
options.jade.hwKey = {
pamAuth.enable = mkEnableOption "Enable PAM authentication with hardware keys";
};

View file

@ -1,4 +1,5 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
spacenavd
libspnav

View file

@ -1,6 +1,9 @@
{...}: {
{ ... }:
{
services.xserver.wacom.enable = true;
home-manager.users.jade = {pkgs, ...}: {
home-manager.users.jade =
{ pkgs, ... }:
{
home.packages = [
# TODO: figure out if the previous enabled option depends on these anyway
pkgs.libwacom

View file

@ -1,4 +1,5 @@
{...}: {
{ ... }:
{
imports = [
./evremap.nix
];

View file

@ -3,7 +3,8 @@
config,
lib,
...
}: let
}:
let
cfg = config.jade.input.remapping;
evremap = pkgs.rustPlatform.buildRustPackage {
pname = "evremap";
@ -21,11 +22,15 @@
};
toml = pkgs.formats.toml { };
in
with lib; {
with lib;
{
options.jade.input.remapping = {
enable = mkEnableOption "Enable evremap";
devices = mkOption {
type = types.attrsOf (types.submodule ({name, ...}: {
type = types.attrsOf (
types.submodule (
{ name, ... }:
{
options = {
device_name = mkOption {
type = types.str;
@ -33,10 +38,15 @@ in
default = name;
};
remap = mkOption {
type = types.listOf (types.submodule ({...}: {
type = types.listOf (
types.submodule (
{ ... }:
{
options.input = mkOption { type = types.listOf types.str; };
options.output = mkOption { type = types.listOf types.str; };
}));
}
)
);
default = [ ];
};
swapKeys = mkOption {
@ -48,31 +58,42 @@ in
default = [ ];
};
dual_role = mkOption {
type = types.listOf (types.submodule ({...}: {
type = types.listOf (
types.submodule (
{ ... }:
{
options.input = mkOption { type = types.str; };
options.hold = mkOption { type = types.listOf types.str; };
options.tap = mkOption { type = types.listOf types.str; };
}));
}
)
);
default = [ ];
};
};
}));
}
)
);
};
};
config = mkIf cfg.enable (
with builtins; let
devs = map ({
with builtins;
let
devs = map (
{
device_name,
remap,
swapKeys,
dual_role,
}: {
}:
{
inherit device_name dual_role;
# expand swapKeys to normal remaps
remap = concatLists [
remap
(lib.lists.flatten (map (keys: [
(lib.lists.flatten (
map (keys: [
{
input = [ (head keys) ];
output = [ (lib.lists.last keys) ];
@ -81,25 +102,31 @@ in
input = [ (lib.lists.last keys) ];
output = [ (head keys) ];
}
])
swapKeys))
]) swapKeys
))
];
}) (attrValues cfg.devices);
in {
}
) (attrValues cfg.devices);
in
{
# generate numbered systemd services for each device to be remapped
# https://github.com/wez/evremap/issues/17
systemd.services = listToAttrs (genList (i: {
systemd.services = listToAttrs (
genList (i: {
name = "evremap${toString i}";
value = let
value =
let
cfgFile = toml.generate "remaps-${toString i}.toml" (elemAt devs i);
in {
in
{
wantedBy = [ "multi-user.target" ];
serviceConfig.ExecStart = "-${evremap}/bin/evremap remap ${cfgFile}";
unitConfig = {
Restart = "on-failure";
};
};
}) (length devs));
}) (length devs)
);
environment.systemPackages = [ evremap ];
}
);

View file

@ -4,17 +4,21 @@
config,
lib,
...
}: let
}:
let
cfg = config.jade.desktop.media;
in
with lib; {
with lib;
{
imports = [
./obs.nix
./fonts.nix
];
options.jade.desktop.media.videoEditing = mkEnableOption "Enable Video editing software";
config = {
home-manager.users.jade = {pkgs, ...}: {
home-manager.users.jade =
{ pkgs, ... }:
{
imports = [ ./typst.nix ];
home.packages = with pkgs; [
# creative software basics

View file

@ -1,4 +1,5 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
nixpkgs.config.packageOverrides = pkgs: {
google-fonts = pkgs.google-fonts.overrideAttrs (oldAttrs: {
src = pkgs.fetchFromGitHub {
@ -34,7 +35,9 @@
fontDir.enable = true;
};
home-manager.users.jade = {...}: {
home-manager.users.jade =
{ ... }:
{
fonts.fontconfig = {
enable = true;
defaultFonts = {

View file

@ -3,10 +3,12 @@
lib,
pkgs,
...
}: let
}:
let
cfg = config.jade.desktop.media.obs;
in
with lib; {
with lib;
{
options.jade.desktop.media.obs = mkEnableOption "Enable OBS";
config = mkIf cfg {

View file

@ -2,7 +2,8 @@
pkgs,
typst-within,
...
}: let
}:
let
packages = {
typst-configs = pkgs.fetchFromGitea {
domain = "forge.katzen.cafe";
@ -19,7 +20,8 @@
};
};
mkTypstPath = name: ".local/share/typst/packages/local/${name}/0.1.0";
in {
in
{
home.file = {
typst-configs = {
target = mkTypstPath "typst-configs";

View file

@ -1,4 +1,5 @@
{...}: {
{ ... }:
{
imports = [
./firewall.nix
./hosts.nix
@ -10,7 +11,9 @@
systemd.services."NetworkManager-wait-online".enable = false;
services.mullvad-vpn.enable = true;
home-manager.users.jade = {pkgs, ...}: {
home-manager.users.jade =
{ pkgs, ... }:
{
home.packages = with pkgs; [
networkmanagerapplet
mullvad-vpn

View file

@ -1,10 +1,13 @@
{pkgs, ...}: let
addNuShebang = path:
{ pkgs, ... }:
let
addNuShebang =
path:
builtins.concatStringsSep "\n\n" [
"#!${pkgs.nushell}/bin/nu"
(builtins.readFile path)
];
in {
in
{
networking.networkmanager.dispatcherScripts = [
{
type = "basic";
@ -12,16 +15,15 @@ in {
}
];
environment.etc = with builtins; (
listToAttrs (
environment.etc =
with builtins;
(listToAttrs (
map (v: {
name = "networkhooks/${v}";
value = {
text = addNuShebang ./hooks/${v};
mode = "0755";
};
})
(attrNames (readDir ./hooks))
)
);
}) (attrNames (readDir ./hooks))
));
}

View file

@ -1,13 +1,19 @@
# Thanks @ kloenk (@kloenk@catcatnya.com) for making this for me at MRMCD 2024 :33
{pkgs-stable, ...}: let
{ pkgs-stable, ... }:
let
caDir = "/var/lib/easyroam";
uuid = "821ad781-76a3-447f-a2e8-c7f18a1df3bc";
in {
in
{
systemd.services.easyroam = {
requires = [ "NetworkManager.service" ];
after = [ "NetworkManager.service" ];
requiredBy = [ "network-online.target" ];
path = with pkgs-stable; [networkmanager openssl gnused];
path = with pkgs-stable; [
networkmanager
openssl
gnused
];
script = ''
set -x
openssl pkcs12 -password pass: -in ${caDir}/my_easyroam_cert.p12 -legacy -nokeys | openssl x509 > ${caDir}/easyroam_client_cert.pem

View file

@ -3,7 +3,8 @@
lib,
pkgs,
...
}: {
}:
{
config = {
networking = {
firewall = {

View file

@ -1,4 +1,5 @@
{...}: {
{ ... }:
{
networking.hosts = {
"127.0.0.1" = [
"www.tiktok.com"

View file

@ -2,7 +2,8 @@
rs-programs,
niri,
...
}: {
}:
{
nix = {
extraOptions = ''
experimental-features = nix-command flakes
@ -24,6 +25,9 @@
"nodejs-16.20.0"
];
};
overlays = [rs-programs niri.overlays.niri];
overlays = [
rs-programs
niri.overlays.niri
];
};
}

View file

@ -1,5 +1,8 @@
{...}: {
home-manager.users.jade = {pkgs, ...}: {
{ ... }:
{
home-manager.users.jade =
{ pkgs, ... }:
{
programs.btop = {
enable = true;
settings = {

View file

@ -1,4 +1,5 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
imports = [
./helix.nix
./nu.nix
@ -11,7 +12,9 @@
];
programs.mosh.enable = true;
programs.bat.enable = true;
home-manager.users.jade = {...}: {
home-manager.users.jade =
{ ... }:
{
programs.carapace.enable = true;
programs.direnv.enable = true;
};

View file

@ -3,12 +3,15 @@
lib,
pkgs,
...
}: {
home-manager.users.jade = {
}:
{
home-manager.users.jade =
{
pkgs,
config,
...
}: {
}:
{
programs.git = {
enable = true;
userName = "Schrottkatze";

View file

@ -1,9 +1,12 @@
{config, ...}: {
home-manager.users.jade = {
{ config, ... }:
{
home-manager.users.jade =
{
pkgs,
pkgs-stable,
...
}: {
}:
{
home = {
sessionVariables.EDITOR = "hx";
packages = [
@ -44,7 +47,10 @@
display-inlay-hints = true;
};
popup-border = "popup";
shell = ["nu" "-c"];
shell = [
"nu"
"-c"
];
statusline.left = [
"mode"
"spinner"
@ -136,7 +142,10 @@
check.command = "check";
completion.snippets.custom = {
"pub fn" = {
prefix = ["pfn" "pubfn"];
prefix = [
"pfn"
"pubfn"
];
postfix = [ "pfn" ];
body = [
"pub fn $\{receiver\}() {"
@ -195,7 +204,7 @@
{
name = "nix";
formatter = {
command = "${pkgs.alejandra}/bin/alejandra";
command = "${pkgs.nixfmt-rfc-style}/bin/nixfmt";
args = [ "--quiet" ];
};
auto-format = true;
@ -203,7 +212,10 @@
{
name = "html";
roots = [ ".git" ];
language-servers = ["vscode-html-language-server" "emmet-language-server"];
language-servers = [
"vscode-html-language-server"
"emmet-language-server"
];
auto-format = false;
}
];

View file

@ -1,9 +1,12 @@
{...}: {
home-manager.users.jade = {
{ ... }:
{
home-manager.users.jade =
{
pkgs,
lib,
...
}: {
}:
{
home = {
packages = [ pkgs.mprocs ];
};
@ -11,12 +14,16 @@
text = builtins.toJSON {
proc_list_width = 15;
keymap_procs = {
"<l>" = {c = "toggle-focus";};
"<l>" = {
c = "toggle-focus";
};
};
keymap_term = {
"<C-a>" = null;
# Ctrl-m so it doesnt overlap with zellij or helix
"<C-M>" = {c = "toggle-focus";};
"<C-M>" = {
c = "toggle-focus";
};
};
};
};

View file

@ -1,5 +1,8 @@
{config, ...}: {
home-manager.users.jade = {pkgs, ...}: {
{ config, ... }:
{
home-manager.users.jade =
{ pkgs, ... }:
{
# Needed for nu_scripts background_task
services.pueue = {
enable = true;
@ -34,8 +37,7 @@
source ${./nu/aliases.nu};
nu ${./nu/shell-startup.nu};
'';
extraEnv = ''
'';
extraEnv = '''';
};
# programs.starship.enableNushellIntegration = true;
programs.carapace.enableNushellIntegration = true;

View file

@ -1,5 +1,8 @@
{...}: {
home-manager.users.jade = {pkgs, ...}: {
{ ... }:
{
home-manager.users.jade =
{ pkgs, ... }:
{
programs.starship = {
enable = true;
enableNushellIntegration = false;

View file

@ -1,4 +1,5 @@
{...}: {
{ ... }:
{
nixpkgs.config.packageOverrides = pkgs: {
sudo = pkgs.sudo.override { withInsults = true; };
};

View file

@ -1,13 +1,10 @@
{config, ...}: let
generateOptions = with builtins; (
opts:
toString (
attrValues (
mapAttrs (name: value: "--${name} ${toString value}") opts
)
)
);
in {
{ config, ... }:
let
generateOptions =
with builtins;
(opts: toString (attrValues (mapAttrs (name: value: "--${name} ${toString value}") opts)));
in
{
# TODO: global colorscheme vars for everything
console.colors = [
"282828"