Compare commits

..

No commits in common. "509320c115216663aa06e88d5f740a5faf919a07" and "5750480f034ea31517868470ad0c23745cd7d1f3" have entirely different histories.

64 changed files with 996 additions and 1301 deletions

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,52 +1,11 @@
{ pkgs, ... }: {pkgs, ...}: {
{
programs.niri.settings.binds = { programs.niri.settings.binds = {
# spawn terminal # spawn terminal
"Mod+Return".action.spawn = "kitty"; "Mod+Return".action.spawn = "kitty";
"Mod+Return".repeat = false; "Mod+Return".repeat = false;
"Mod+D".action.spawn = [ "Mod+D".action.spawn = ["wofi" "-S" "drun" "--allow-images"];
"wofi"
"-S"
"drun"
"--allow-images"
];
"Mod+D".repeat = false; "Mod+D".repeat = false;
"Mod+I".action.spawn = [ "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"];
"${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+E".action.quit = [];
"Mod+Shift+Q".action.close-window = []; "Mod+Shift+Q".action.close-window = [];
@ -119,30 +78,10 @@
"Mod+W".action.toggle-column-tabbed-display = []; "Mod+W".action.toggle-column-tabbed-display = [];
# media keys # media keys
"XF86AudioRaiseVolume".action.spawn = [ "XF86AudioRaiseVolume".action.spawn = ["wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1+"];
"wpctl" "XF86AudioLowerVolume".action.spawn = ["wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1-"];
"set-volume" "XF86AudioMute".action.spawn = ["wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"];
"@DEFAULT_AUDIO_SINK@" "XF86AudioMicMute" .action.spawn = ["wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"];
"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; "XF86AudioRaiseVolume".allow-when-locked = true;
"XF86AudioLowerVolume".allow-when-locked = true; "XF86AudioLowerVolume".allow-when-locked = true;
"XF86AudioMute".allow-when-locked = true; "XF86AudioMute".allow-when-locked = true;

View file

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

View file

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

View file

@ -1,5 +1,4 @@
{ ... }: {...}: {
{
programs.niri.settings = { programs.niri.settings = {
layer-rules = [ layer-rules = [
{ {
@ -16,9 +15,7 @@
{title = "^.*(Discord|Beispiel Screenshare block Bug|Bitwarden|Träwelling).*$";} {title = "^.*(Discord|Beispiel Screenshare block Bug|Bitwarden|Träwelling).*$";}
]; ];
excludes = [ 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;} {is-floating = true;}
]; ];
block-out-from = "screen-capture"; block-out-from = "screen-capture";

View file

@ -1,5 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
home.packages = [pkgs.gamescope]; home.packages = [pkgs.gamescope];
programs.niri.settings = { programs.niri.settings = {
window-rules = [ window-rules = [
@ -29,7 +28,6 @@
shadow.enable = false; shadow.enable = false;
border.enable = false; border.enable = false;
baba-is-float = false; baba-is-float = false;
open-focused = false;
} }
{ {
matches = [ matches = [
@ -49,11 +47,7 @@
is-floating = true; is-floating = true;
} }
]; ];
geometry-corner-radius = geometry-corner-radius = let val = 5.; in {
let
val = 5.;
in
{
bottom-left = val; bottom-left = val;
bottom-right = val; bottom-right = val;
top-left = val; top-left = val;

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -4,21 +4,17 @@
config, config,
lib, lib,
... ...
}: }: let
let
cfg = config.jade.desktop.media; cfg = config.jade.desktop.media;
in in
with lib; with lib; {
{
imports = [ imports = [
./obs.nix ./obs.nix
./fonts.nix ./fonts.nix
]; ];
options.jade.desktop.media.videoEditing = mkEnableOption "Enable Video editing software"; options.jade.desktop.media.videoEditing = mkEnableOption "Enable Video editing software";
config = { config = {
home-manager.users.jade = home-manager.users.jade = {pkgs, ...}: {
{ pkgs, ... }:
{
imports = [./typst.nix]; imports = [./typst.nix];
home.packages = with pkgs; [ home.packages = with pkgs; [
# creative software basics # creative software basics
@ -38,7 +34,7 @@ with lib;
imagemagick imagemagick
ffmpeg_7-full ffmpeg_7-full
libreoffice onlyoffice-bin_latest
# viewers # viewers
pkgs-stable.font-manager pkgs-stable.font-manager

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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