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"

223
flake.nix
View file

@ -24,129 +24,106 @@
}; };
}; };
outputs = outputs = {
{ self,
self, nixpkgs,
nixpkgs, nixpkgs-stable,
nixpkgs-stable, nixpkgs-unstable-small,
nixpkgs-unstable-small, lix-module,
lix-module, typst-within,
typst-within, home-manager,
home-manager, nixos-hardware,
nixos-hardware, niri,
niri, stylix,
stylix, fenix,
fenix, crane,
crane, ...
... } @ inputs: let
}@inputs: system = "x86_64-linux";
let pkgs = nixpkgs.legacyPackages.${system};
system = "x86_64-linux"; pkgs-stable = nixpkgs-stable.legacyPackages.${system};
pkgs = nixpkgs.legacyPackages.${system}; pkgs-unstable-small = nixpkgs-unstable-small.legacyPackages.${system};
pkgs-stable = nixpkgs-stable.legacyPackages.${system}; rs-toolchain = with fenix.packages.${system};
pkgs-unstable-small = nixpkgs-unstable-small.legacyPackages.${system}; combine [
rs-toolchain = complete.toolchain
with fenix.packages.${system}; ];
combine [ crane-lib = (crane.mkLib nixpkgs.legacyPackages.${system}).overrideToolchain rs-toolchain;
complete.toolchain rs-programs = final: prev: {
]; s10e-jrnl = crane-lib.buildPackage {
crane-lib = (crane.mkLib nixpkgs.legacyPackages.${system}).overrideToolchain rs-toolchain; pname = "s10e-bs";
rs-programs = final: prev: { version = "0.0.1";
s10e-jrnl = crane-lib.buildPackage { src = crane-lib.cleanCargoSource (crane-lib.path ./.);
pname = "s10e-bs";
version = "0.0.1";
src = crane-lib.cleanCargoSource (crane-lib.path ./.);
};
};
in
{
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt-rfc-style;
devShells."x86_64-linux".default = pkgs.mkShell {
buildInputs = [
rs-toolchain
pkgs.pkg-config
pkgs.openssl
];
};
nixosConfigurations = {
monosodium-glutamate-g = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit
inputs
pkgs-unstable-small
pkgs-stable
rs-programs
lix-module
niri
;
};
system = "x86_64-linux";
modules = [
inputs.niri.nixosModules.niri
stylix.nixosModules.stylix
./hosts/monosodium-glutamate-g/configuration.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = {
inherit pkgs-unstable-small pkgs-stable typst-within;
};
home-manager.sharedModules = [
inputs.nixcord.homeManagerModules.nixcord
];
home-manager.users.jade =
{
nixosConfig,
pkgs,
...
}:
{
home.sessionVariables.TZ = nixosConfig.time.timeZone;
home.stateVersion = "${nixosConfig.system.stateVersion}";
};
}
];
};
denkbrett = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit
inputs
pkgs-unstable-small
pkgs-stable
rs-programs
lix-module
niri
;
};
system = "x86_64-linux";
modules = [
inputs.niri.nixosModules.niri
stylix.nixosModules.stylix
./hosts/denkbrett/configuration.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = {
inherit pkgs-unstable-small pkgs-stable typst-within;
};
home-manager.sharedModules = [
inputs.nixcord.homeManagerModules.nixcord
];
home-manager.users.jade =
{
nixosConfig,
pkgs,
...
}:
{
home.sessionVariables.TZ = nixosConfig.time.timeZone;
home.stateVersion = "22.11";
};
}
];
};
}; };
}; };
in {
devShells."x86_64-linux".default = pkgs.mkShell {
buildInputs = [
rs-toolchain
pkgs.pkg-config
pkgs.openssl
];
};
nixosConfigurations = {
monosodium-glutamate-g = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs pkgs-unstable-small pkgs-stable rs-programs lix-module niri;
};
system = "x86_64-linux";
modules = [
inputs.niri.nixosModules.niri
stylix.nixosModules.stylix
./hosts/monosodium-glutamate-g/configuration.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = {
inherit pkgs-unstable-small pkgs-stable typst-within;
};
home-manager.sharedModules = [
inputs.nixcord.homeManagerModules.nixcord
];
home-manager.users.jade = {
nixosConfig,
pkgs,
...
}: {
home.sessionVariables.TZ = nixosConfig.time.timeZone;
home.stateVersion = "${nixosConfig.system.stateVersion}";
};
}
];
};
denkbrett = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs pkgs-unstable-small pkgs-stable rs-programs lix-module niri;
};
system = "x86_64-linux";
modules = [
inputs.niri.nixosModules.niri
stylix.nixosModules.stylix
./hosts/denkbrett/configuration.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = {
inherit pkgs-unstable-small pkgs-stable typst-within;
};
home-manager.sharedModules = [
inputs.nixcord.homeManagerModules.nixcord
];
home-manager.users.jade = {
nixosConfig,
pkgs,
...
}: {
home.sessionVariables.TZ = nixosConfig.time.timeZone;
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"
@ -28,19 +27,19 @@
}; };
}; };
security.pam.services.swaylock = { }; security.pam.services.swaylock = {};
hardware.usb-modeswitch.enable = true; hardware.usb-modeswitch.enable = true;
systemd.services."ModemManager".enable = true; systemd.services."ModemManager".enable = true;
systemd.services."ModemManager".wants = [ "NetworkManager.service" ]; systemd.services."ModemManager".wants = ["NetworkManager.service"];
systemd.services."ModemManager".wantedBy = [ "multi-user.target" ]; systemd.services."ModemManager".wantedBy = ["multi-user.target"];
programs.wireshark.enable = true; programs.wireshark.enable = true;
boot.resumeDevice = "/dev/disk/by-uuid/4f9e8afa-f8d7-40bf-b3ea-17e8e8fbb694"; boot.resumeDevice = "/dev/disk/by-uuid/4f9e8afa-f8d7-40bf-b3ea-17e8e8fbb694";
boot.kernelParams = [ "resume_offset=7380652" ]; boot.kernelParams = ["resume_offset=7380652"];
boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; boot.binfmt.emulatedSystems = ["aarch64-linux"];
services.blueman.enable = true; services.blueman.enable = true;

View file

@ -7,53 +7,35 @@
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" boot.initrd.kernelModules = ["i915"];
"nvme" boot.kernelModules = ["kvm-intel"];
"usb_storage" boot.extraModulePackages = [];
"sd_mod"
"rtsx_pci_sdmmc"
];
boot.initrd.kernelModules = [ "i915" ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
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,34 +1,25 @@
{ ... }: {...}: {
{
# key remapping # key remapping
jade.input.remapping = jade.input.remapping = let
let default = {
default = { swapKeys = [
swapKeys = [ ["KEY_Y" "KEY_Z"]
[ ["KEY_LEFTALT" "KEY_LEFTMETA"]
"KEY_Y" ];
"KEY_Z" dual_role = [
] {
[ input = "KEY_CAPSLOCK";
"KEY_LEFTALT" hold = ["KEY_LEFTCTRL"];
"KEY_LEFTMETA" tap = ["KEY_ESC"];
] }
]; ];
dual_role = [
{
input = "KEY_CAPSLOCK";
hold = [ "KEY_LEFTCTRL" ];
tap = [ "KEY_ESC" ];
}
];
};
in
{
enable = true;
devices."AT Translated Set 2 keyboard" = default;
devices."Razer Razer Huntsman" = default;
devices."Razer Razer DeathAdder V2" = default;
}; };
in {
enable = true;
devices."AT Translated Set 2 keyboard" = default;
devices."Razer Razer Huntsman" = default;
devices."Razer Razer DeathAdder V2" = default;
};
hardware.trackpoint = { hardware.trackpoint = {
enable = true; enable = true;

View file

@ -5,8 +5,7 @@
pkgs, pkgs,
pkgs-stable, pkgs-stable,
... ...
}: }: {
{
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
../../common.nix ../../common.nix
@ -36,7 +35,7 @@
kernelPackages = pkgs.linuxPackages_zen; kernelPackages = pkgs.linuxPackages_zen;
binfmt.emulatedSystems = [ "aarch64-linux" ]; binfmt.emulatedSystems = ["aarch64-linux"];
}; };
networking.hostName = "monosodium-glutamate-g"; networking.hostName = "monosodium-glutamate-g";
@ -80,7 +79,7 @@
# networking.firewall.allowedTCPPorts = [ 4713 ]; # networking.firewall.allowedTCPPorts = [ 4713 ];
systemd.services."NetworkManager-wait-online".enable = false; systemd.services."NetworkManager-wait-online".enable = false;
swapDevices = [ { device = "/swap/swapfile"; } ]; swapDevices = [{device = "/swap/swapfile";}];
system.stateVersion = "24.05"; # Did you read the comment? system.stateVersion = "24.05"; # Did you read the comment?
} }

View file

@ -7,49 +7,37 @@
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" boot.initrd.kernelModules = [];
"xhci_pci" boot.kernelModules = ["kvm-amd"];
"ahci" boot.extraModulePackages = [];
"uas"
"usbhid"
"sd_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" = { fileSystems."/" = {
device = "/dev/disk/by-uuid/efb8f256-5b14-4b52-a2d9-ae4b91ecb711"; device = "/dev/disk/by-uuid/efb8f256-5b14-4b52-a2d9-ae4b91ecb711";
fsType = "btrfs"; fsType = "btrfs";
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" = {
device = "/dev/disk/by-uuid/efb8f256-5b14-4b52-a2d9-ae4b91ecb711"; device = "/dev/disk/by-uuid/efb8f256-5b14-4b52-a2d9-ae4b91ecb711";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=swap" ]; options = ["subvol=swap"];
}; };
swapDevices = [ ]; swapDevices = [];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's # (the default) this is the recommended approach. When using systemd-networkd it's

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,27 +28,25 @@ with lib;
notifications.test = true; notifications.test = true;
}; };
home-manager.users.jade = home-manager.users.jade = {pkgs, ...}: {
{ pkgs, ... }: programs.ssh = {
{ controlMaster = "yes";
programs.ssh = {
controlMaster = "yes";
};
home.packages = with pkgs; [
just
bacon
magic-wormhole-rs
# filemanager
xfce.thunar
xfce.tumbler
xfce.thunar-archive-plugin
file-roller
# from environment.systemPackages cleanup
virt-manager
ddccontrol-db
];
}; };
home.packages = with pkgs; [
just
bacon
magic-wormhole-rs
# filemanager
xfce.thunar
xfce.tumbler
xfce.thunar-archive-plugin
file-roller
# from environment.systemPackages cleanup
virt-manager
ddccontrol-db
];
};
} }

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 = {pkgs, ...}: {
home-manager.users.jade =
{ pkgs, ... }:
{
home.packages = with pkgs; [ home.packages = with pkgs; [
lutris lutris
prismlauncher prismlauncher
@ -24,5 +20,5 @@ with lib;
vkd3d-proton vkd3d-proton
]; ];
}; };
}; };
} }

View file

@ -3,24 +3,20 @@
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 = {pkgs, ...}: {
home-manager.users.jade =
{ 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 = {
@ -39,11 +35,11 @@ with lib;
iamb iamb
]; ];
}; };
programs.evolution = { programs.evolution = {
enable = true; enable = true;
plugins = [ pkgs.evolution-ews ]; plugins = [pkgs.evolution-ews];
};
services.gnome.evolution-data-server.enable = true;
services.gnome.evolution-data-server.plugins = [];
}; };
services.gnome.evolution-data-server.enable = true; }
services.gnome.evolution-data-server.plugins = [ ];
};
}

View file

@ -3,21 +3,19 @@
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";
};
config = mkIf cfg.enable {
services.syncthing = rec {
enable = true;
user = "jade";
dataDir = "/home/${user}/Documents";
configDir = "/home/${user}/Documents/.config/syncthing";
}; };
}; config = mkIf cfg.enable {
} services.syncthing = rec {
enable = true;
user = "jade";
dataDir = "/home/${user}/Documents";
configDir = "/home/${user}/Documents/.config/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,33 +3,31 @@
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 { type = types.int;
type = types.int; default = 0;
default = 0;
};
};
config.services = {
displayManager = {
autoLogin = {
enable = cfg.autoLogin.enable;
user = "jade";
};
defaultSession = "niri";
};
xserver.displayManager.gdm = {
enable = true;
banner = "Meow :3";
autoLogin = {
delay = cfg.autoLogin.delay;
}; };
}; };
}; config.services = {
} displayManager = {
autoLogin = {
enable = cfg.autoLogin.enable;
user = "jade";
};
defaultSession = "niri";
};
xserver.displayManager.gdm = {
enable = true;
banner = "Meow :3";
autoLogin = {
delay = cfg.autoLogin.delay;
};
};
};
}

View file

@ -1,5 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
home.file = { home.file = {
".tridactylrc" = { ".tridactylrc" = {
text = '' text = ''
@ -17,25 +16,23 @@
}; };
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"
[ "tridactyl-vim"
"ublock-origin" "privacy-badger17"
"tridactyl-vim" "gruvbox-dark-theme"
"privacy-badger17" "torproject-snowflake"
"gruvbox-dark-theme" "bitwarden-password-manager"
"torproject-snowflake" "terms-of-service-didnt-read"
"bitwarden-password-manager" "shinigami-eyes"
"terms-of-service-didnt-read" "darkreader"
"shinigami-eyes" "sponsorblock"
"darkreader" "youtube-mrbeastify"
"sponsorblock" "return-youtube-dislikes"
"youtube-mrbeastify" "multi-account-containers"
"return-youtube-dislikes" "tabby-cat-friend"
"multi-account-containers" "indie-wiki-buddy"
"tabby-cat-friend" ];
"indie-wiki-buddy"
];
Extensions.Uninstall = [ Extensions.Uninstall = [
"google@search.mozilla.org" "google@search.mozilla.org"
"bing@search.mozilla.org" "bing@search.mozilla.org"
@ -66,7 +63,7 @@
} }
]; ];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "pkgs" ]; definedAliases = ["pkgs"];
}; };
"Nix Options" = { "Nix Options" = {
urls = [ urls = [
@ -81,7 +78,7 @@
} }
]; ];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "opts" ]; definedAliases = ["opts"];
}; };
"Home manager Options" = { "Home manager Options" = {
urls = [ urls = [
@ -100,7 +97,7 @@
} }
]; ];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "hm" ]; definedAliases = ["hm"];
}; };
"NixOS Wiki" = { "NixOS Wiki" = {
urls = [ urls = [
@ -115,7 +112,7 @@
} }
]; ];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "nxwk" ]; definedAliases = ["nxwk"];
}; };
"Noogle" = { "Noogle" = {
urls = [ urls = [
@ -129,7 +126,7 @@
]; ];
} }
]; ];
definedAliases = [ "ngl" ]; definedAliases = ["ngl"];
}; };
"lib.rs" = { "lib.rs" = {
urls = [ urls = [
@ -144,7 +141,7 @@
} }
]; ];
icon = "https://lib.rs/favicon.png"; icon = "https://lib.rs/favicon.png";
definedAliases = [ "libs" ]; definedAliases = ["libs"];
}; };
"rust docs" = { "rust docs" = {
urls = [ urls = [
@ -159,7 +156,7 @@
} }
]; ];
icon = "https://docs.rs/-/static/favicon.ico"; icon = "https://docs.rs/-/static/favicon.ico";
definedAliases = [ "docs" ]; definedAliases = ["docs"];
}; };
"rust docs direct open" = { "rust docs direct open" = {
urls = [ urls = [
@ -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 = [
@ -185,7 +179,7 @@
} }
]; ];
icon = "https://doc.rust-lang.org/favicon.ico"; icon = "https://doc.rust-lang.org/favicon.ico";
definedAliases = [ "std" ]; definedAliases = ["std"];
}; };
"MDN" = { "MDN" = {
urls = [ urls = [

View file

@ -1,33 +1,30 @@
{ ... }: {...}: {
{
programs.niri.enable = true; programs.niri.enable = true;
home-manager.users.jade = home-manager.users.jade = {pkgs, ...}: {
{ pkgs, ... }: imports = [
{ ./notifications.nix
imports = [ ./terminal.nix
./notifications.nix ./layaway.nix
./terminal.nix ./swayidle.nix
./layaway.nix ./browser.nix
./swayidle.nix ./eww
./browser.nix ./niri
./eww ];
./niri
];
# temporary(tm) # temporary(tm)
programs.wofi.enable = true; programs.wofi.enable = true;
programs.swaylock.enable = true; programs.swaylock.enable = true;
services.network-manager-applet.enable = true; services.network-manager-applet.enable = true;
xsession.enable = true; xsession.enable = true;
home.packages = [ home.packages = [
pkgs.fluent-reader pkgs.fluent-reader
]; ];
services.gpg-agent = { services.gpg-agent = {
enable = true; enable = true;
enableNushellIntegration = true; enableNushellIntegration = true;
enableSshSupport = true; enableSshSupport = true;
};
}; };
};
} }

View file

@ -1,7 +1,6 @@
{ ... }: { ... }: {
{ 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";
@ -22,10 +21,9 @@ let
meta = with lib; { meta = with lib; {
description = "Layout creation for Sway via a relative and human-readable DSL."; description = "Layout creation for Sway via a relative and human-readable DSL.";
homepage = "https://github.com/MultisampledNight/layaway"; homepage = "https://github.com/MultisampledNight/layaway";
maintainers = [ maintainers.multisn8 ]; maintainers = [maintainers.multisn8];
}; };
}; };
in in {
{ home.packages = [layaway];
home.packages = [ layaway ];
} }

View file

@ -1,91 +1,50 @@
{ 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 = [];
"Mod+Shift+P".action.power-off-monitors = [ ]; "Mod+Shift+P".action.power-off-monitors = [];
"Mod+Shift+Ctrl+Slash".action.toggle-keyboard-shortcuts-inhibit = [ ]; "Mod+Shift+Ctrl+Slash".action.toggle-keyboard-shortcuts-inhibit = [];
"Mod+Shift+Ctrl+Slash".allow-inhibiting = false; "Mod+Shift+Ctrl+Slash".allow-inhibiting = false;
"Mod+Shift+Slash".action.show-hotkey-overlay = [ ]; "Mod+Shift+Slash".action.show-hotkey-overlay = [];
# window/columns controls # window/columns controls
"Mod+H".action.focus-column-left = [ ]; "Mod+H".action.focus-column-left = [];
"Mod+J".action.focus-window-down = [ ]; "Mod+J".action.focus-window-down = [];
"Mod+K".action.focus-window-up = [ ]; "Mod+K".action.focus-window-up = [];
"Mod+L".action.focus-column-right = [ ]; "Mod+L".action.focus-column-right = [];
"Mod+Ctrl+H".action.move-column-left = [ ]; "Mod+Ctrl+H".action.move-column-left = [];
"Mod+Ctrl+J".action.move-window-down = [ ]; "Mod+Ctrl+J".action.move-window-down = [];
"Mod+Ctrl+K".action.move-window-up = [ ]; "Mod+Ctrl+K".action.move-window-up = [];
"Mod+Ctrl+L".action.move-column-right = [ ]; "Mod+Ctrl+L".action.move-column-right = [];
"Mod+R".action.switch-preset-column-width = [ ]; "Mod+R".action.switch-preset-column-width = [];
"Mod+V".action.toggle-window-floating = [ ]; "Mod+V".action.toggle-window-floating = [];
"Mod+Shift+V".action.switch-focus-between-floating-and-tiling = [ ]; "Mod+Shift+V".action.switch-focus-between-floating-and-tiling = [];
# monitor controls # monitor controls
"Mod+Shift+H".action.focus-monitor-left = [ ]; "Mod+Shift+H".action.focus-monitor-left = [];
"Mod+Shift+J".action.focus-monitor-down = [ ]; "Mod+Shift+J".action.focus-monitor-down = [];
"Mod+Shift+K".action.focus-monitor-up = [ ]; "Mod+Shift+K".action.focus-monitor-up = [];
"Mod+Shift+L".action.focus-monitor-right = [ ]; "Mod+Shift+L".action.focus-monitor-right = [];
"Mod+Shift+Ctrl+H".action.move-column-to-monitor-left = [ ]; "Mod+Shift+Ctrl+H".action.move-column-to-monitor-left = [];
"Mod+Shift+Ctrl+J".action.move-column-to-monitor-down = [ ]; "Mod+Shift+Ctrl+J".action.move-column-to-monitor-down = [];
"Mod+Shift+Ctrl+K".action.move-column-to-monitor-up = [ ]; "Mod+Shift+Ctrl+K".action.move-column-to-monitor-up = [];
"Mod+Shift+Ctrl+L".action.move-column-to-monitor-right = [ ]; "Mod+Shift+Ctrl+L".action.move-column-to-monitor-right = [];
# workspace controls # workspace controls
"Mod+P".action.focus-workspace-up = [ ]; "Mod+P".action.focus-workspace-up = [];
"Mod+N".action.focus-workspace-down = [ ]; "Mod+N".action.focus-workspace-down = [];
"Mod+Ctrl+P".action.move-column-to-workspace-up = [ ]; "Mod+Ctrl+P".action.move-column-to-workspace-up = [];
"Mod+Ctrl+N".action.move-column-to-workspace-down = [ ]; "Mod+Ctrl+N".action.move-column-to-workspace-down = [];
"Mod+1".action.focus-workspace = 1; "Mod+1".action.focus-workspace = 1;
"Mod+2".action.focus-workspace = 2; "Mod+2".action.focus-workspace = 2;
"Mod+3".action.focus-workspace = 3; "Mod+3".action.focus-workspace = 3;
@ -106,46 +65,26 @@
"Mod+Ctrl+9".action.move-column-to-workspace = 9; "Mod+Ctrl+9".action.move-column-to-workspace = 9;
# column editing stuffs # column editing stuffs
"Mod+BracketLeft".action.consume-or-expel-window-left = [ ]; "Mod+BracketLeft".action.consume-or-expel-window-left = [];
"Mod+BracketRight".action.consume-or-expel-window-right = [ ]; "Mod+BracketRight".action.consume-or-expel-window-right = [];
"Mod+F".action.maximize-column = [ ]; "Mod+F".action.maximize-column = [];
"Mod+Shift+F".action.expand-column-to-available-width = [ ]; "Mod+Shift+F".action.expand-column-to-available-width = [];
"Mod+Ctrl+F".action.fullscreen-window = [ ]; "Mod+Ctrl+F".action.fullscreen-window = [];
"Mod+C".action.center-column = [ ]; "Mod+C".action.center-column = [];
"Mod+Minus".action.set-column-width = "-5%"; "Mod+Minus".action.set-column-width = "-5%";
"Mod+Equal".action.set-column-width = "+5%"; "Mod+Equal".action.set-column-width = "+5%";
"Mod+Shift+Minus".action.set-window-height = "-10%"; "Mod+Shift+Minus".action.set-window-height = "-10%";
"Mod+Shift+Equal".action.set-window-height = "+10%"; "Mod+Shift+Equal".action.set-window-height = "+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;
"XF86AudioMicMute".allow-when-locked = true; "XF86AudioMicMute" .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,10 +1,9 @@
{ ... }: {...}: {
{
programs.niri.settings = { programs.niri.settings = {
layer-rules = [ layer-rules = [
{ {
matches = [ matches = [
{ namespace = "notifications"; } {namespace = "notifications";}
]; ];
block-out-from = "screen-capture"; block-out-from = "screen-capture";
} }
@ -12,14 +11,12 @@
window-rules = [ window-rules = [
{ {
matches = [ matches = [
{ app-id = "^signal|Element|org\.gnome\.Evolution$"; } {app-id = "^signal|Element|org\.gnome\.Evolution$";}
{ 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,6 +1,5 @@
{ 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,16 +47,12 @@
is-floating = true; is-floating = true;
} }
]; ];
geometry-corner-radius = geometry-corner-radius = let val = 5.; in {
let bottom-left = val;
val = 5.; bottom-right = val;
in top-left = val;
{ top-right = val;
bottom-left = val; };
bottom-right = val;
top-left = val;
top-right = val;
};
} }
]; ];

View file

@ -1,14 +1,13 @@
{ 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 = {
"Print".action.screenshot = [ ]; "Print".action.screenshot = [];
"Ctrl+Print".action.screenshot-screen = [ ]; "Ctrl+Print".action.screenshot-screen = [];
"Shift+Print".action.screenshot-window = [ ]; "Shift+Print".action.screenshot-window = [];
"Mod+S".action.screenshot = [ ]; "Mod+S".action.screenshot = [];
"Mod+Ctrl+S".action.screenshot-screen = [ ]; "Mod+Ctrl+S".action.screenshot-screen = [];
"Mod+Shift+S".action.screenshot-window = [ ]; "Mod+Shift+S".action.screenshot-window = [];
}; };
}; };
} }

View file

@ -1,7 +1,6 @@
{ ... }: {...}: {
{
programs.niri.settings = { programs.niri.settings = {
prefer-no-csd = true; prefer-no-csd = true;
cursor = { cursor = {
theme = "phinger-cursors-dark"; theme = "phinger-cursors-dark";
@ -39,42 +38,35 @@
inactive.color = "#3c3836"; inactive.color = "#3c3836";
gap = 2; gap = 2;
width = 5; width = 5;
corner-radius = 3; corner-radius= 3;
position = "left"; position = "left";
gaps-between-tabs = 0; gaps-between-tabs = 0;
}; };
}; };
window-rules = [ window-rules = [
{ {
matches = [ matches = [{
{ is-floating = true;
is-floating = true; }];
} baba-is-float = true;
]; shadow = {
baba-is-float = true; offset.y = 0;
shadow = { offset.x = 0;
offset.y = 0; softness = 40;
offset.x = 0; color = "#bab9e5af";
softness = 40; inactive-color = "#fa9d99af";
color = "#bab9e5af"; enable = true;
inactive-color = "#fa9d99af"; };
enable = true; }
{
geometry-corner-radius = let val = 1.; in {
bottom-left = val;
bottom-right = val;
top-left = val;
top-right = val;
}; };
}
{
geometry-corner-radius =
let
val = 1.;
in
{
bottom-left = val;
bottom-right = val;
top-left = val;
top-right = val;
};
clip-to-geometry = true; clip-to-geometry = true;
} }];
];
}; };
} }

View file

@ -1,8 +1,7 @@
{ 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"];}
]; ];
environment.DISPLAY = ":0"; environment.DISPLAY = ":0";
}; };

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,32 +25,30 @@
}; };
}; };
}; };
home-manager.users.jade = home-manager.users.jade = {pkgs, ...}: {
{ pkgs, ... }: stylix.targets = {
{ firefox = {
stylix.targets = { profileNames = ["jade"];
firefox = {
profileNames = [ "jade" ];
};
helix.enable = false;
btop.enable = false;
nushell.enable = false;
starship.enable = false;
kitty.enable = false;
dunst.enable = false;
wofi.enable = false;
}; };
gtk = { helix.enable = false;
enable = true; btop.enable = false;
cursorTheme = { nushell.enable = false;
package = pkgs.phinger-cursors; starship.enable = false;
name = "phinger-cursors"; kitty.enable = false;
size = 30; dunst.enable = false;
}; wofi.enable = false;
iconTheme = { };
package = pkgs.gruvbox-dark-icons-gtk; gtk = {
name = "gruvbox-dark-icons"; enable = true;
}; cursorTheme = {
package = pkgs.phinger-cursors;
name = "phinger-cursors";
size = 30;
};
iconTheme = {
package = pkgs.gruvbox-dark-icons-gtk;
name = "gruvbox-dark-icons";
}; };
}; };
};
} }

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,35 +3,33 @@
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"; };
}; config = {
config = { # nitrokey
# nitrokey services.udev.packages = [pkgs.nitrokey-udev-rules];
services.udev.packages = [ pkgs.nitrokey-udev-rules ];
# smartcard daemon # smartcard daemon
services.pcscd.enable = true; services.pcscd.enable = true;
# authenticate using hw key # authenticate using hw key
security.pam = { security.pam = {
services.jade.u2fAuth = cfg.pamAuth.enable; services.jade.u2fAuth = cfg.pamAuth.enable;
u2f = { u2f = {
enable = true; enable = true;
control = "sufficient"; control = "sufficient";
settings = { settings = {
cue = true; cue = true;
authFile = "/home/jade/.ssh/u2f_keys"; authFile = "/home/jade/.ssh/u2f_keys";
};
}; };
}; };
};
programs.i3lock.u2fSupport = true; programs.i3lock.u2fSupport = true;
}; };
} }

View file

@ -1,11 +1,10 @@
{ pkgs, ... }: {pkgs, ...}: {
{
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
spacenavd spacenavd
libspnav libspnav
]; ];
systemd.services.spacenavd = { systemd.services.spacenavd = {
wantedBy = [ "graphical.target" ]; wantedBy = ["graphical.target"];
script = "${pkgs.spacenavd}/bin/spacenavd -d"; script = "${pkgs.spacenavd}/bin/spacenavd -d";
}; };
} }

View file

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

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";
@ -17,117 +16,91 @@ let
}; };
useFetchCargoVendor = true; useFetchCargoVendor = true;
cargoHash = "sha256-O1rJ48m8Q7kZABw/UNpmUT7FFBWQedo6CuV+NX9kDt8="; cargoHash = "sha256-O1rJ48m8Q7kZABw/UNpmUT7FFBWQedo6CuV+NX9kDt8=";
nativeBuildInputs = [ pkgs.pkg-config ]; nativeBuildInputs = [pkgs.pkg-config];
buildInputs = [ pkgs.libevdev ]; buildInputs = [pkgs.libevdev];
}; };
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 (types.submodule ({name, ...}: {
type = types.attrsOf ( options = {
types.submodule ( device_name = mkOption {
{ name, ... }: type = types.str;
{ description = "The device name";
options = { default = name;
device_name = mkOption {
type = types.str;
description = "The device name";
default = name;
};
remap = mkOption {
type = types.listOf (
types.submodule (
{ ... }:
{
options.input = mkOption { type = types.listOf types.str; };
options.output = mkOption { type = types.listOf types.str; };
}
)
);
default = [ ];
};
swapKeys = mkOption {
description = "Lists with two keys to be swapped on the keyboard layout.";
type = types.listOf (
# verify that each key swapping list contains two elements
types.addCheck (types.listOf types.str) (v: builtins.length v == 2)
);
default = [ ];
};
dual_role = mkOption {
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 = [ ];
};
}; };
} remap = mkOption {
) type = types.listOf (types.submodule ({...}: {
); options.input = mkOption {type = types.listOf types.str;};
options.output = mkOption {type = types.listOf types.str;};
}));
default = [];
};
swapKeys = mkOption {
description = "Lists with two keys to be swapped on the keyboard layout.";
type = types.listOf (
# verify that each key swapping list contains two elements
types.addCheck (types.listOf types.str) (v: builtins.length v == 2)
);
default = [];
};
dual_role = mkOption {
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 (
config = mkIf cfg.enable ( with builtins; let
with builtins; devs = map ({
let
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)];
} }
{ {
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
{ # https://github.com/wez/evremap/issues/17
# generate numbered systemd services for each device to be remapped systemd.services = listToAttrs (genList (i: {
# https://github.com/wez/evremap/issues/17
systemd.services = listToAttrs (
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"];
{ serviceConfig.ExecStart = "-${evremap}/bin/evremap remap ${cfgFile}";
wantedBy = [ "multi-user.target" ]; unitConfig = {
serviceConfig.ExecStart = "-${evremap}/bin/evremap remap ${cfgFile}"; Restart = "on-failure";
unitConfig = {
Restart = "on-failure";
};
}; };
}) (length devs) };
); }) (length devs));
environment.systemPackages = [ evremap ]; environment.systemPackages = [evremap];
} }
); );
} }

View file

@ -4,22 +4,18 @@
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 = {pkgs, ...}: {
home-manager.users.jade = imports = [./typst.nix];
{ pkgs, ... }:
{
imports = [ ./typst.nix ];
home.packages = with pkgs; [ home.packages = with pkgs; [
# creative software basics # creative software basics
pastel pastel
@ -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
@ -56,5 +52,5 @@ with lib;
(mkIf cfg.videoEditing glaxnimate) (mkIf cfg.videoEditing glaxnimate)
]; ];
}; };
}; };
} }

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,17 +34,15 @@
fontDir.enable = true; fontDir.enable = true;
}; };
home-manager.users.jade = home-manager.users.jade = {...}: {
{ ... }: fonts.fontconfig = {
{ enable = true;
fonts.fontconfig = { defaultFonts = {
enable = true; emoji = [];
defaultFonts = { monospace = [];
emoji = [ ]; sansSerif = ["Atkinson Hyperlegible"];
monospace = [ ]; serif = [];
sansSerif = [ "Atkinson Hyperlegible" ];
serif = [ ];
};
}; };
}; };
};
} }

View file

@ -3,36 +3,34 @@
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 {
programs.obs-studio.enableVirtualCamera = true; programs.obs-studio.enableVirtualCamera = true;
# OBS stuffs # OBS stuffs
environment.systemPackages = [ environment.systemPackages = [
(pkgs.wrapOBS { (pkgs.wrapOBS {
plugins = with pkgs.obs-studio-plugins; [ plugins = with pkgs.obs-studio-plugins; [
wlrobs wlrobs
obs-backgroundremoval obs-backgroundremoval
obs-pipewire-audio-capture obs-pipewire-audio-capture
waveform waveform
obs-3d-effect obs-3d-effect
]; ];
}) })
];
boot = {
extraModulePackages = with config.boot.kernelPackages; [
v4l2loopback
]; ];
extraModprobeConfig = ''
options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1 boot = {
''; extraModulePackages = with config.boot.kernelPackages; [
v4l2loopback
];
extraModprobeConfig = ''
options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1
'';
};
}; };
}; }
}

View file

@ -2,15 +2,14 @@
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";
owner = "schrottkatze"; owner = "schrottkatze";
repo = "typst-configs"; repo = "typst-configs";
rev = "9a5bd5256ace2a56de51b89793f191b4eecce1dc"; # :REV:- rev = "%REV%";-:# rev = "9a5bd5256ace2a56de51b89793f191b4eecce1dc"; #:REV:- rev = "%REV%";-:#
sha256 = "sha256-E+5fJULNxM0XcbimuENqIJC24ZwPRMSHnG97ncBtEGw="; # :SHA:- sha256 = "%SHA%";-:# sha256 = "sha256-E+5fJULNxM0XcbimuENqIJC24ZwPRMSHnG97ncBtEGw="; #:SHA:- sha256 = "%SHA%";-:#
}; };
flow = pkgs.fetchFromGitHub { flow = pkgs.fetchFromGitHub {
owner = "MultisampledNight"; owner = "MultisampledNight";
@ -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,13 +10,11 @@
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; [
{ networkmanagerapplet
home.packages = with pkgs; [ mullvad-vpn
networkmanagerapplet macchanger
mullvad-vpn ];
macchanger };
];
};
} }

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
@ -50,7 +44,7 @@ in
addr-gen-mode = "default"; addr-gen-mode = "default";
method = "auto"; method = "auto";
}; };
proxy = { }; proxy = {};
wifi = { wifi = {
mode = "infrastructure"; mode = "infrastructure";
ssid = "eduroam"; ssid = "eduroam";

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,14 +1,11 @@
{ ... }: {...}: {
{ home-manager.users.jade = {pkgs, ...}: {
home-manager.users.jade = programs.btop = {
{ pkgs, ... }: enable = true;
{ settings = {
programs.btop = { color_theme = "gruvbox_dark";
enable = true; vim_keys = true;
settings = {
color_theme = "gruvbox_dark";
vim_keys = true;
};
}; };
}; };
};
} }

View file

@ -1,5 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
imports = [ imports = [
./helix.nix ./helix.nix
./nu.nix ./nu.nix
@ -12,12 +11,10 @@
]; ];
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.direnv.enable = true;
programs.carapace.enable = true; };
programs.direnv.enable = true;
};
users.defaultUserShell = pkgs.nushell; users.defaultUserShell = pkgs.nushell;
} }

View file

@ -3,57 +3,54 @@
lib, lib,
pkgs, pkgs,
... ...
}: }: {
{ home-manager.users.jade = {
home-manager.users.jade = pkgs,
{ config,
pkgs, ...
config, }: {
... programs.git = {
}: enable = true;
{ userName = "Schrottkatze";
programs.git = { userEmail = "git@schrottkatze.de";
enable = true; aliases = {
userName = "Schrottkatze"; a = "add";
userEmail = "git@schrottkatze.de"; c = "commit";
aliases = { ca = "commit --all";
a = "add"; p = "push";
c = "commit"; pl = "pull";
ca = "commit --all"; s = "status";
p = "push";
pl = "pull";
s = "status";
};
signing = {
format = "ssh";
key = "${pkgs.writeText "blue_nk3.pub" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILg7hhAKxIAbokHHcIj9HBgbkgoKGCG2R+gx7HZKL+iz cardno:000F_93C6A612"}";
signByDefault = true;
};
}; };
programs.jujutsu = { signing = {
enable = true; format = "ssh";
settings = { key = "${pkgs.writeText "blue_nk3.pub" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILg7hhAKxIAbokHHcIj9HBgbkgoKGCG2R+gx7HZKL+iz cardno:000F_93C6A612"}";
user = { signByDefault = true;
name = config.programs.git.userName;
email = config.programs.git.userEmail;
};
};
};
programs.gitui = {
enable = true;
keyConfig = ''
(
move_left: Some(( code: Char('h'), modifiers: "")),
move_right: Some(( code: Char('l'), modifiers: "")),
move_up: Some(( code: Char('k'), modifiers: "")),
move_down: Some(( code: Char('j'), modifiers: "")),
stash_open: Some(( code: Char('l'), modifiers: "")),
open_help: Some(( code: F(1), modifiers: "")),
status_reset_item: Some(( code: Char('U'), modifiers: "SHIFT")),
)
'';
}; };
}; };
programs.jujutsu = {
enable = true;
settings = {
user = {
name = config.programs.git.userName;
email = config.programs.git.userEmail;
};
};
};
programs.gitui = {
enable = true;
keyConfig = ''
(
move_left: Some(( code: Char('h'), modifiers: "")),
move_right: Some(( code: Char('l'), modifiers: "")),
move_up: Some(( code: Char('k'), modifiers: "")),
move_down: Some(( code: Char('j'), modifiers: "")),
stash_open: Some(( code: Char('l'), modifiers: "")),
open_help: Some(( code: F(1), modifiers: "")),
status_reset_item: Some(( code: Char('U'), modifiers: "SHIFT")),
)
'';
};
};
} }

View file

@ -1,225 +1,213 @@
{ config, ... }: {config, ...}: {
{ home-manager.users.jade = {
home-manager.users.jade = pkgs,
{ pkgs-stable,
pkgs, ...
pkgs-stable, }: {
... home = {
}: sessionVariables.EDITOR = "hx";
{ packages = [
home = { pkgs.wl-clipboard-rs
sessionVariables.EDITOR = "hx"; pkgs.nil
packages = [ pkgs.vscode-langservers-extracted
pkgs.wl-clipboard-rs pkgs.nodePackages.typescript-language-server
pkgs.nil pkgs.emmet-language-server
pkgs.vscode-langservers-extracted pkgs.jdt-language-server
pkgs.nodePackages.typescript-language-server pkgs.tinymist
pkgs.emmet-language-server pkgs.typstyle
pkgs.jdt-language-server ];
pkgs.tinymist };
pkgs.typstyle programs.helix = {
]; enable = true;
defaultEditor = true;
settings = {
theme = "gruvbox_dark_hard";
editor = {
line-number = "relative";
bufferline = "multiple";
color-modes = true;
cursorline = true;
auto-save = {
after-delay.enable = true;
after-delay.timeout = 10000;
};
auto-format = true;
end-of-line-diagnostics = "hint";
# slightly optimized based on my layout
jump-label-alphabet = "jfkdhaslgwenuiopbcmyzqrtvx";
clipboard-provider = "wayland";
inline-diagnostics = {
cursor-line = "hint";
};
lsp = {
display-messages = true;
display-inlay-hints = true;
};
popup-border = "popup";
shell = ["nu" "-c"];
statusline.left = [
"mode"
"spinner"
"spacer"
"version-control"
"file-name"
"diagnostics"
"read-only-indicator"
"file-modification-indicator"
"spacer"
];
statusline.right = [
"workspace-diagnostics"
"register"
"position"
"selections"
"file-encoding"
"file-type"
];
idle-timeout = 50;
completion-timeout = 100;
indent-guides = {
render = true;
character = "";
skip-levels = 3;
};
soft-wrap = {
enable = true;
};
whitespace = {
render = {
space = "none";
tab = "all";
newline = "none";
};
characters = {
nbsp = "·";
tab = "";
};
};
};
keys = {
normal = {
space."=" = ":fmt";
space.space = "@[<space>]<space>";
# smart tab++
tab = "move_parent_node_end";
S-tab = "move_parent_node_start";
A-S = "@S[\\s]+<ret>";
"'" = {
D = "@<C-w>sgd";
F = "@<C-w>sgy";
d = "@<C-w>vgd";
f = "@<C-w>vgy";
h = ":toggle-option lsp.display-inlay-hints";
t = ":pipe flip-bool";
};
};
insert = {
up = "no_op";
down = "no_op";
left = "no_op";
right = "no_op";
pageup = "no_op";
pagedown = "no_op";
home = "no_op";
end = "no_op";
# smart tab ++
S-tab = "move_parent_node_start";
};
select = {
# smart tab++
tab = "extend_parent_node_end";
S-tab = "extend_parent_node_start";
};
};
}; };
programs.helix = { languages = {
enable = true; language-server = {
defaultEditor = true; "nu-builtin-lsp" = {
settings = { command = "${config.users.defaultUserShell}/bin/nu";
theme = "gruvbox_dark_hard"; args = ["--lsp"];
editor = { };
line-number = "relative"; "rust-analyzer" = {
bufferline = "multiple"; config = {
color-modes = true; check.command = "check";
cursorline = true; completion.snippets.custom = {
auto-save = { "pub fn" = {
after-delay.enable = true; prefix = ["pfn" "pubfn"];
after-delay.timeout = 10000; postfix = ["pfn"];
body = [
"pub fn $\{receiver\}() {"
"\\t$1"
"}"
];
scope = "type";
};
};
completion.termSearch.enable = true;
diagnostics.enable = true;
inlayHints = {
bindingModeHints.enable = true;
closureCaptureHints.enable = true;
closureReturnTypeHints.enable = true;
discriminantHints.enable = true;
expressionAdjustmentHints = {
hideOutsideUnsafe = true;
};
lifetimeElisionHints.enable = "skip_trivial";
};
interpret.tests = true;
lens = {
references = {
adt.enable = true;
trait.enable = true;
};
};
typing.autoClosingAngleBrackets.enable = true;
};
};
"emmet-language-server" = {
command = "emmet-language-server";
args = ["--stdio"];
};
"psalm" = {
command = "psalm";
args = ["--language-server"];
};
"tinymist" = {
config = {
exportPdf = "onType";
formatterMode = "typstyle";
};
};
};
language = [
{
name = "nu";
language-servers = ["nu-builtin-lsp"];
}
{
name = "php";
language-servers = ["psalm"];
}
{
name = "nix";
formatter = {
command = "${pkgs.alejandra}/bin/alejandra";
args = ["--quiet"];
}; };
auto-format = true; auto-format = true;
end-of-line-diagnostics = "hint"; }
# slightly optimized based on my layout {
jump-label-alphabet = "jfkdhaslgwenuiopbcmyzqrtvx"; name = "html";
clipboard-provider = "wayland"; roots = [".git"];
inline-diagnostics = { language-servers = ["vscode-html-language-server" "emmet-language-server"];
cursor-line = "hint"; auto-format = false;
}; }
lsp = { ];
display-messages = true;
display-inlay-hints = true;
};
popup-border = "popup";
shell = [
"nu"
"-c"
];
statusline.left = [
"mode"
"spinner"
"spacer"
"version-control"
"file-name"
"diagnostics"
"read-only-indicator"
"file-modification-indicator"
"spacer"
];
statusline.right = [
"workspace-diagnostics"
"register"
"position"
"selections"
"file-encoding"
"file-type"
];
idle-timeout = 50;
completion-timeout = 100;
indent-guides = {
render = true;
character = "";
skip-levels = 3;
};
soft-wrap = {
enable = true;
};
whitespace = {
render = {
space = "none";
tab = "all";
newline = "none";
};
characters = {
nbsp = "·";
tab = "";
};
};
};
keys = {
normal = {
space."=" = ":fmt";
space.space = "@[<space>]<space>";
# smart tab++
tab = "move_parent_node_end";
S-tab = "move_parent_node_start";
A-S = "@S[\\s]+<ret>";
"'" = {
D = "@<C-w>sgd";
F = "@<C-w>sgy";
d = "@<C-w>vgd";
f = "@<C-w>vgy";
h = ":toggle-option lsp.display-inlay-hints";
t = ":pipe flip-bool";
};
};
insert = {
up = "no_op";
down = "no_op";
left = "no_op";
right = "no_op";
pageup = "no_op";
pagedown = "no_op";
home = "no_op";
end = "no_op";
# smart tab ++
S-tab = "move_parent_node_start";
};
select = {
# smart tab++
tab = "extend_parent_node_end";
S-tab = "extend_parent_node_start";
};
};
};
languages = {
language-server = {
"nu-builtin-lsp" = {
command = "${config.users.defaultUserShell}/bin/nu";
args = [ "--lsp" ];
};
"rust-analyzer" = {
config = {
check.command = "check";
completion.snippets.custom = {
"pub fn" = {
prefix = [
"pfn"
"pubfn"
];
postfix = [ "pfn" ];
body = [
"pub fn $\{receiver\}() {"
"\\t$1"
"}"
];
scope = "type";
};
};
completion.termSearch.enable = true;
diagnostics.enable = true;
inlayHints = {
bindingModeHints.enable = true;
closureCaptureHints.enable = true;
closureReturnTypeHints.enable = true;
discriminantHints.enable = true;
expressionAdjustmentHints = {
hideOutsideUnsafe = true;
};
lifetimeElisionHints.enable = "skip_trivial";
};
interpret.tests = true;
lens = {
references = {
adt.enable = true;
trait.enable = true;
};
};
typing.autoClosingAngleBrackets.enable = true;
};
};
"emmet-language-server" = {
command = "emmet-language-server";
args = [ "--stdio" ];
};
"psalm" = {
command = "psalm";
args = [ "--language-server" ];
};
"tinymist" = {
config = {
exportPdf = "onType";
formatterMode = "typstyle";
};
};
};
language = [
{
name = "nu";
language-servers = [ "nu-builtin-lsp" ];
}
{
name = "php";
language-servers = [ "psalm" ];
}
{
name = "nix";
formatter = {
command = "${pkgs.nixfmt-rfc-style}/bin/nixfmt";
args = [ "--quiet" ];
};
auto-format = true;
}
{
name = "html";
roots = [ ".git" ];
language-servers = [
"vscode-html-language-server"
"emmet-language-server"
];
auto-format = false;
}
];
};
}; };
}; };
};
} }

View file

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

View file

@ -1,46 +1,44 @@
{ config, ... }: {config, ...}: {
{ home-manager.users.jade = {pkgs, ...}: {
home-manager.users.jade = # Needed for nu_scripts background_task
{ pkgs, ... }: services.pueue = {
{ enable = true;
# Needed for nu_scripts background_task settings = {
services.pueue = { shared = {
enable = true; use_unix_socket = true;
settings = {
shared = {
use_unix_socket = true;
};
}; };
}; };
home.packages = [
pkgs.pueue
];
home.file."shell-startup" = {
source = ./nu/shell-startup.nu;
target = ".config/nushell/shell-startup.nu";
};
programs.nushell = {
enable = true;
package = config.users.defaultUserShell;
configFile.source = ./nu/config.nu;
envFile.source = ./nu/env.nu;
extraConfig = ''
plugin add ${pkgs.nushellPlugins.query}/bin/nu_plugin_query;
plugin add ${pkgs.nushellPlugins.polars}/bin/nu_plugin_polars;
plugin add ${pkgs.nushellPlugins.formats}/bin/nu_plugin_formats;
plugin use query;
plugin use polars;
plugin use formats;
source ${./nu/custom_commands.nu};
source ${./nu/aliases.nu};
nu ${./nu/shell-startup.nu};
'';
extraEnv = '''';
};
# programs.starship.enableNushellIntegration = true;
programs.carapace.enableNushellIntegration = true;
programs.direnv.enableNushellIntegration = true;
}; };
home.packages = [
pkgs.pueue
];
home.file."shell-startup" = {
source = ./nu/shell-startup.nu;
target = ".config/nushell/shell-startup.nu";
};
programs.nushell = {
enable = true;
package = config.users.defaultUserShell;
configFile.source = ./nu/config.nu;
envFile.source = ./nu/env.nu;
extraConfig = ''
plugin add ${pkgs.nushellPlugins.query}/bin/nu_plugin_query;
plugin add ${pkgs.nushellPlugins.polars}/bin/nu_plugin_polars;
plugin add ${pkgs.nushellPlugins.formats}/bin/nu_plugin_formats;
plugin use query;
plugin use polars;
plugin use formats;
source ${./nu/custom_commands.nu};
source ${./nu/aliases.nu};
nu ${./nu/shell-startup.nu};
'';
extraEnv = ''
'';
};
# programs.starship.enableNushellIntegration = true;
programs.carapace.enableNushellIntegration = true;
programs.direnv.enableNushellIntegration = true;
};
} }

View file

@ -1,44 +1,41 @@
{ ... }: {...}: {
{ home-manager.users.jade = {pkgs, ...}: {
home-manager.users.jade = programs.starship = {
{ pkgs, ... }: enable = true;
{ enableNushellIntegration = false;
programs.starship = { settings = {
enable = true; format = "$all$directory$character";
enableNushellIntegration = false; character = {
settings = { success_symbol = "[\\$](green)";
format = "$all$directory$character"; error_symbol = "[X](red)";
character = { };
success_symbol = "[\\$](green)"; git_branch = {
error_symbol = "[X](red)"; format = "\\[[$symbol$branch]($style)\\]";
}; symbol = " ";
git_branch = { };
format = "\\[[$symbol$branch]($style)\\]"; git_status = {
symbol = " "; format = "([\\[$all_status$ahead_behind\\]]($style))";
}; };
git_status = { haskell = {
format = "([\\[$all_status$ahead_behind\\]]($style))"; format = "\\[[$symbol($version)]($style)\\]";
}; symbol = " ";
haskell = { };
format = "\\[[$symbol($version)]($style)\\]"; cmd_duration = {
symbol = " "; format = "\\[[ $duration]($style)\\]";
}; };
cmd_duration = { nix_shell = {
format = "\\[[ $duration]($style)\\]"; format = "\\[[$symbol$state( \\($name\\))]($style)\\]";
}; symbol = " ";
nix_shell = { };
format = "\\[[$symbol$state( \\($name\\))]($style)\\]"; rust = {
symbol = " "; format = "\\[[$symbol($version)]($style)\\]";
}; symbol = " ";
rust = { };
format = "\\[[$symbol($version)]($style)\\]"; package = {
symbol = " "; format = "\\[[$symbol$version]($style)\\]";
}; symbol = " ";
package = {
format = "\\[[$symbol$version]($style)\\]";
symbol = " ";
};
}; };
}; };
}; };
};
} }

View file

@ -1,7 +1,6 @@
{ ... }: {...}: {
{
nixpkgs.config.packageOverrides = pkgs: { nixpkgs.config.packageOverrides = pkgs: {
sudo = pkgs.sudo.override { withInsults = true; }; sudo = pkgs.sudo.override {withInsults = true;};
}; };
security.sudo.extraConfig = "Defaults insults"; security.sudo.extraConfig = "Defaults insults";
} }

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"