installed and ran alejandra as formatter

This commit is contained in:
Schrottkatze 2023-11-26 21:26:49 +01:00
parent 49452e89db
commit 8a1314b58f
47 changed files with 1362 additions and 1113 deletions

View file

@ -1,12 +1,14 @@
# 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).
{ config, pkgs, lib, ... }:
with lib;
with builtins;
{ {
config,
pkgs,
lib,
...
}:
with lib;
with builtins; {
nix = { nix = {
package = pkgs.nixVersions.stable; package = pkgs.nixVersions.stable;
extraOptions = '' extraOptions = ''
@ -29,11 +31,45 @@ with builtins;
systemPackages = with pkgs; [ systemPackages = with pkgs; [
htmlq htmlq
wget git neofetch pciutils zip unzip gnutar iw btop nodejs jdk8 jdk11 wget
jdk libsecret gh nix-prefetch-scripts fzf glab ripgrep git
sl lolcat appimage-run git-crypt file whois p7zip file nmap cmatrix tree neofetch
socat smartmontools mprocs pciutils
dig aria2 usbutils numbat zip
unzip
gnutar
iw
btop
nodejs
jdk8
jdk11
jdk
libsecret
gh
nix-prefetch-scripts
fzf
glab
ripgrep
sl
lolcat
appimage-run
git-crypt
file
whois
p7zip
file
nmap
cmatrix
tree
socat
smartmontools
mprocs
dig
aria2
usbutils
numbat
alejandra
]; ];
}; };
@ -82,12 +118,16 @@ with builtins;
time.timeZone = "Europe/Berlin"; time.timeZone = "Europe/Berlin";
home-manager.users.jade = { nixosConfig, pkgs, ... }: { home-manager.users.jade = {
nixosConfig,
pkgs,
...
}: {
home.sessionVariables.TZ = nixosConfig.time.timeZone; home.sessionVariables.TZ = nixosConfig.time.timeZone;
}; };
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";
@ -104,7 +144,7 @@ with builtins;
users.users.jade = { users.users.jade = {
isNormalUser = true; isNormalUser = true;
extraGroups = [ "wheel" "input" "uinput" "libvirtd" "adbusers" "dialout" "plugdev" "wireshark" ]; extraGroups = ["wheel" "input" "uinput" "libvirtd" "adbusers" "dialout" "plugdev" "wireshark"];
packages = [ packages = [
pkgs.marksman pkgs.marksman
]; ];
@ -117,4 +157,3 @@ with builtins;
users.defaultUserShell = pkgs.nushellFull; users.defaultUserShell = pkgs.nushellFull;
} }

View file

@ -24,7 +24,15 @@
gumseite.url = "git+https://gitlab.com/schrottkatze/gum-schulsachen.git"; gumseite.url = "git+https://gitlab.com/schrottkatze/gum-schulsachen.git";
}; };
outputs = { self, nixpkgs, nixpkgs-stable, home-manager, nixos-hardware, mac-brcm-fw, ... }@inputs: { outputs = {
self,
nixpkgs,
nixpkgs-stable,
home-manager,
nixos-hardware,
mac-brcm-fw,
...
} @ inputs: {
nixosConfigurations = { nixosConfigurations = {
monosodium-glutamate-g = nixpkgs.lib.nixosSystem { monosodium-glutamate-g = nixpkgs.lib.nixosSystem {
specialArgs = { specialArgs = {
@ -33,10 +41,15 @@
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [
./hosts/monosodium-glutamate-g/configuration.nix ./hosts/monosodium-glutamate-g/configuration.nix
home-manager.nixosModules.home-manager { home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.users.jade = { nixosConfig, pkgs, ... }: { home-manager.users.jade = {
nixosConfig,
pkgs,
...
}: {
home.sessionVariables.TZ = nixosConfig.time.timeZone; home.sessionVariables.TZ = nixosConfig.time.timeZone;
home.stateVersion = "${nixosConfig.system.stateVersion}"; home.stateVersion = "${nixosConfig.system.stateVersion}";
}; };
@ -50,10 +63,15 @@
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [
./hosts/catbook-j/configuration.nix ./hosts/catbook-j/configuration.nix
home-manager.nixosModules.home-manager { home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.users.jade = { nixosConfig, pkgs, ... }: { home-manager.users.jade = {
nixosConfig,
pkgs,
...
}: {
home.sessionVariables.TZ = nixosConfig.time.timeZone; home.sessionVariables.TZ = nixosConfig.time.timeZone;
home.stateVersion = "22.11"; home.stateVersion = "22.11";
}; };
@ -68,10 +86,15 @@
modules = [ modules = [
"${mac-brcm-fw}" "${mac-brcm-fw}"
./hosts/potatobook-g/configuration.nix ./hosts/potatobook-g/configuration.nix
home-manager.nixosModules.home-manager { home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.users.jade = { nixosConfig, pkgs, ... }: { home-manager.users.jade = {
nixosConfig,
pkgs,
...
}: {
home.sessionVariables.TZ = nixosConfig.time.timeZone; home.sessionVariables.TZ = nixosConfig.time.timeZone;
home.stateVersion = "${nixosConfig.system.stateVersion}"; home.stateVersion = "${nixosConfig.system.stateVersion}";
}; };

View file

@ -1,10 +1,14 @@
# 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).
{
{ config, pkgs, lib, ... }: { config,
imports = pkgs,
[ # Include the results of the hardware scan. lib,
...
}: {
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
../../common.nix ../../common.nix
../../modules ../../modules
@ -33,22 +37,22 @@
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"];
hardware.bluetooth.enable = true; hardware.bluetooth.enable = true;
services.blueman.enable = true; services.blueman.enable = true;
services.xserver.libinput.touchpad.tapping = false; services.xserver.libinput.touchpad.tapping = false;
environment.systemPackages = [ pkgs.vivaldi pkgs.vivaldi-ffmpeg-codecs pkgs.plantuml pkgs.mqttui pkgs.mobile-broadband-provider-info pkgs.modem-manager-gui pkgs.wireshark]; environment.systemPackages = [pkgs.vivaldi pkgs.vivaldi-ffmpeg-codecs pkgs.plantuml pkgs.mqttui pkgs.mobile-broadband-provider-info pkgs.modem-manager-gui pkgs.wireshark];
# Bootloader. # Bootloader.
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
@ -119,5 +123,4 @@
# Before changing this value read the documentation for this option # Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.05"; # Did you read the comment? system.stateVersion = "23.05"; # Did you read the comment?
} }

View file

@ -1,47 +1,53 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{ {
imports = config,
[ (modulesPath + "/installer/scan/not-detected.nix") lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = [ ]; 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 = [ "subvol=@" "compress=zstd:3" "noatime" ]; options = ["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 = [ "subvol=@home" "compress=zstd:3" ]; options = ["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 = [ "subvol=@/@swap" "noatime" ]; options = ["subvol=@/@swap" "noatime"];
}; };
boot.initrd.luks.devices."luks-9cd75cce-6829-4db8-8c5c-a9fb9ec3e122".device = "/dev/disk/by-uuid/9cd75cce-6829-4db8-8c5c-a9fb9ec3e122"; boot.initrd.luks.devices."luks-9cd75cce-6829-4db8-8c5c-a9fb9ec3e122".device = "/dev/disk/by-uuid/9cd75cce-6829-4db8-8c5c-a9fb9ec3e122";
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/C6CA-5DE8"; device = "/dev/disk/by-uuid/C6CA-5DE8";
fsType = "vfat"; fsType = "vfat";
}; };
swapDevices = [{ swapDevices = [
{
device = "/swap/swapfile"; device = "/swap/swapfile";
size = (1024 * 24); size = 1024 * 24;
}]; }
];
# 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,9 +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, ... }:
{
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
../../common.nix ../../common.nix
@ -44,7 +42,6 @@
}; };
boot = { boot = {
loader = { loader = {
# Use the systemd-boot EFI boot loader. # Use the systemd-boot EFI boot loader.
systemd-boot.enable = true; systemd-boot.enable = true;
efi.canTouchEfiVariables = true; efi.canTouchEfiVariables = true;
@ -60,16 +57,14 @@
# } # }
# ]; # ];
binfmt.emulatedSystems = [ "aarch64-linux" ]; binfmt.emulatedSystems = ["aarch64-linux"];
}; };
networking.hostName = "monosodium-glutamate-g"; networking.hostName = "monosodium-glutamate-g";
services = { services = {
# monitor control # monitor control
ddccontrol.enable = true; ddccontrol.enable = true;
xserver = { xserver = {
layout = "us"; layout = "us";
xkbVariant = "altgr-intl"; xkbVariant = "altgr-intl";
enable = true; enable = true;
@ -82,7 +77,6 @@
gnome.gnome-keyring.enable = true; gnome.gnome-keyring.enable = true;
}; };
hardware = { hardware = {
bluetooth.enable = true; bluetooth.enable = true;
keyboard.uhk.enable = true; keyboard.uhk.enable = true;
enableRedistributableFirmware = true; enableRedistributableFirmware = true;
@ -96,7 +90,8 @@
wireshark wireshark
awesomebump awesomebump
zenstates zenmonitor zenstates
zenmonitor
nvtop-amd nvtop-amd
radeontop radeontop
rgp rgp
@ -125,7 +120,7 @@
systemd.services = { systemd.services = {
create-swapfile = { create-swapfile = {
serviceConfig.Type = "oneshot"; serviceConfig.Type = "oneshot";
wantedBy = [ "swap-swapfile.swap" ]; wantedBy = ["swap-swapfile.swap"];
script = '' script = ''
swapfile="/swap/swapfile" swapfile="/swap/swapfile"
if [[ -f "$swapfile" ]]; then if [[ -f "$swapfile" ]]; then
@ -142,6 +137,3 @@
# release channel # release channel
system.stateVersion = "22.05"; # Did you read the comment? system.stateVersion = "22.05"; # Did you read the comment?
} }

View file

@ -1,39 +1,45 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{ {
imports = config,
[ (modulesPath + "/installer/scan/not-detected.nix") lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod"];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [];
boot.kernelModules = [ "kvm-amd" ]; boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/72ffbc9d-a319-42d7-8d26-13c921a679db"; device = "/dev/disk/by-uuid/72ffbc9d-a319-42d7-8d26-13c921a679db";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=@root" "compress=zstd:3" ]; options = ["subvol=@root" "compress=zstd:3"];
}; };
fileSystems."/home" = fileSystems."/home" = {
{ device = "/dev/disk/by-uuid/72ffbc9d-a319-42d7-8d26-13c921a679db"; device = "/dev/disk/by-uuid/72ffbc9d-a319-42d7-8d26-13c921a679db";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=@home" "compress=zstd:3"]; options = ["subvol=@home" "compress=zstd:3"];
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/D63E-18C9"; device = "/dev/disk/by-uuid/D63E-18C9";
fsType = "vfat"; fsType = "vfat";
}; };
swapDevices = [{ swapDevices = [
{
device = "/swap/swapfile"; device = "/swap/swapfile";
size = (1024 * 64) + (1024 * 8); # 72G size = (1024 * 64) + (1024 * 8); # 72G
} ]; }
];
# 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,4 +1,4 @@
{ pkgs, ... }: { {pkgs, ...}: {
nix.settings = { nix.settings = {
trusted-substituters = [ trusted-substituters = [
"https://t2linux.cachix.org" "https://t2linux.cachix.org"
@ -38,7 +38,7 @@
#} #}
#]; #];
boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; boot.binfmt.emulatedSystems = ["aarch64-linux"];
jade = { jade = {
flatpak.enable = true; flatpak.enable = true;
@ -57,9 +57,9 @@
}; };
fileSystems = { fileSystems = {
"/".options = [ "compress=zstd:3" ]; "/".options = ["compress=zstd:3"];
"/home".options = [ "compress=zstd:3" ]; "/home".options = ["compress=zstd:3"];
"/nix".options = [ "compress=zstd:3" "noatime" ]; "/nix".options = ["compress=zstd:3" "noatime"];
#"/swap".options = [ "noatime" ]; #"/swap".options = [ "noatime" ];
}; };
@ -70,9 +70,13 @@
networking.hostName = "potatobook-g"; networking.hostName = "potatobook-g";
services.xserver = { services.xserver = {
resolutions = [ { x = 1920; y = 1200; } ]; resolutions = [
{
x = 1920;
y = 1200;
}
];
# dpi = 180; # dpi = 180;
layout = "us"; layout = "us";
xkbVariant = "altgr-intl"; xkbVariant = "altgr-intl";
@ -95,9 +99,9 @@
hardware.keyboard.uhk.enable = true; hardware.keyboard.uhk.enable = true;
hardware.enableRedistributableFirmware = true; hardware.enableRedistributableFirmware = true;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
android-tools evremap android-tools
evremap
]; ];
environment.pathsToLink = [ environment.pathsToLink = [
@ -154,7 +158,7 @@
systemd.services = { systemd.services = {
create-swapfile = { create-swapfile = {
serviceConfig.Type = "oneshot"; serviceConfig.Type = "oneshot";
wantedBy = [ "swap-swapfile.swap" ]; wantedBy = ["swap-swapfile.swap"];
script = '' script = ''
swapfile="/swap/swapfile" swapfile="/swap/swapfile"
if [[ -f "$swapfile" ]]; then if [[ -f "$swapfile" ]]; then
@ -175,5 +179,3 @@
# i rly should put that important big comment back here # i rly should put that important big comment back here
system.stateVersion = "22.11"; # Did you read the comment? system.stateVersion = "22.11"; # Did you read the comment?
} }

View file

@ -1,45 +1,51 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{ {
imports = config,
[ (modulesPath + "/installer/scan/not-detected.nix") lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usbhid" "uas" "sd_mod" ]; boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usbhid" "uas" "sd_mod"];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/f6d243ec-6be9-4551-8cbb-aefb7b691a62"; device = "/dev/disk/by-uuid/f6d243ec-6be9-4551-8cbb-aefb7b691a62";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=root" ]; options = ["subvol=root"];
}; };
fileSystems."/home" = fileSystems."/home" = {
{ device = "/dev/disk/by-uuid/f6d243ec-6be9-4551-8cbb-aefb7b691a62"; device = "/dev/disk/by-uuid/f6d243ec-6be9-4551-8cbb-aefb7b691a62";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=home" ]; options = ["subvol=home"];
}; };
fileSystems."/nix" = fileSystems."/nix" = {
{ device = "/dev/disk/by-uuid/f6d243ec-6be9-4551-8cbb-aefb7b691a62"; device = "/dev/disk/by-uuid/f6d243ec-6be9-4551-8cbb-aefb7b691a62";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=nix" ]; options = ["subvol=nix"];
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/5F66-17ED"; device = "/dev/disk/by-uuid/5F66-17ED";
fsType = "vfat"; fsType = "vfat";
}; };
swapDevices = [{ swapDevices = [
{
device = "/swap/swapfile"; device = "/swap/swapfile";
size = (1024 * 12); # 12GB size = 1024 * 12; # 12GB
}]; }
];
# 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,9 +1,11 @@
{config, pkgs, ...}:
{ {
config,
pkgs,
...
}: {
imports = [ imports = [
<nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix> <nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix>
<nixpkgs/nixos/modules/installer/cd-dvd/channel.nix> <nixpkgs/nixos/modules/installer/cd-dvd/channel.nix>
./configuration.nix ./configuration.nix
]; ];
} }

View file

@ -1,3 +1,3 @@
{ ... }: {} {...}: {}
# dummy # dummy

View file

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

View file

@ -1,6 +1,9 @@
{ config, lib, pkgs, ... }:
{ {
config,
lib,
pkgs,
...
}: {
config = { config = {
programs = { programs = {
noisetorch.enable = true; noisetorch.enable = true;
@ -15,7 +18,7 @@
}; };
hardware.pulseaudio.enable = pkgs.lib.mkForce false; hardware.pulseaudio.enable = pkgs.lib.mkForce false;
sound.mediaKeys.enable = true; sound.mediaKeys.enable = true;
home-manager.users.jade = { pkgs, ... }: { home-manager.users.jade = {pkgs, ...}: {
home.packages = with pkgs; [ home.packages = with pkgs; [
pavucontrol pavucontrol
pulseaudioFull pulseaudioFull

View file

@ -1,12 +1,17 @@
{ config, lib, pkgs, ... }: {
config,
let cfg = config.jade.desktop.cloud; lib,
in with lib; { pkgs,
...
}: let
cfg = config.jade.desktop.cloud;
in
with lib; {
options.jade.desktop.cloud = { options.jade.desktop.cloud = {
enable = mkEnableOption "Enable cloud things"; enable = mkEnableOption "Enable cloud things";
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
home-manager.users.jade = { pkgs, ... }: { home-manager.users.jade = {pkgs, ...}: {
home.packages = with pkgs; [ home.packages = with pkgs; [
fluent-reader fluent-reader
bitwarden bitwarden
@ -14,4 +19,4 @@ in with lib; {
]; ];
}; };
}; };
} }

View file

@ -1,8 +1,12 @@
{ config, lib, pkgs, ... }: {
config,
let lib,
pkgs,
...
}: let
cfg = config.jade.desktop.compositing; cfg = config.jade.desktop.compositing;
in with lib; { in
with lib; {
options.jade.desktop.compositing = { options.jade.desktop.compositing = {
enable = mkEnableOption "Enable compositing with picom"; enable = mkEnableOption "Enable compositing with picom";
}; };
@ -12,7 +16,7 @@ in with lib; {
backend = "glx"; backend = "glx";
shadow = true; shadow = true;
shadowOffsets = [ (-40) (-30) ]; shadowOffsets = [(-40) (-30)];
shadowOpacity = 0.2; shadowOpacity = 0.2;
shadowExclude = [ shadowExclude = [
"class_g ?= 'Notify-osd'" "class_g ?= 'Notify-osd'"
@ -28,11 +32,11 @@ in with lib; {
"fade-in-step" = 0.25; "fade-in-step" = 0.25;
"fade-out-step" = 0.2; "fade-out-step" = 0.2;
"fade-delta" = 20; "fade-delta" = 20;
"fade-exclude" = [ "class_g != 'Rofi'" ]; "fade-exclude" = ["class_g != 'Rofi'"];
# use damage information # use damage information
"use-damage" = true; "use-damage" = true;
}; };
}; };
# }}} # }}}
}; };
} }

View file

@ -1,6 +1,6 @@
{ pkgs, ... }: { {pkgs, ...}: {
fonts.packages = with pkgs; [ fonts.packages = with pkgs; [
(nerdfonts.override { fonts = [ "FiraCode" ]; }) (nerdfonts.override {fonts = ["FiraCode"];})
montserrat montserrat
noto-fonts noto-fonts
atkinson-hyperlegible atkinson-hyperlegible
@ -12,7 +12,7 @@
ocr-a ocr-a
]; ];
fonts.fontDir.enable = true; fonts.fontDir.enable = true;
home-manager.users.jade = { pkgs, ... }: { home-manager.users.jade = {pkgs, ...}: {
home.packages = with pkgs; [ home.packages = with pkgs; [
audacity audacity
krita krita

View file

@ -1,15 +1,19 @@
{ config, lib, pkgs, ... }: {
config,
let lib,
pkgs,
...
}: let
# window-screenshot = pkgs.writeTextFile "window-screenshot.nu" (builtins.readFile ../../other/scripts/desktop/window-screenshot.nu); # window-screenshot = pkgs.writeTextFile "window-screenshot.nu" (builtins.readFile ../../other/scripts/desktop/window-screenshot.nu);
window-screenshot = pkgs.writeShellScriptBin "window-screenshot.sh" (builtins.readFile ../../other/scripts/desktop/window-screenshot.sh); window-screenshot = pkgs.writeShellScriptBin "window-screenshot.sh" (builtins.readFile ../../other/scripts/desktop/window-screenshot.sh);
# desktop-ctl = pkgs.writeShellScriptBin "desktop-ctl.sh" (builtins.readFile ../scripts/desktop/desktop-ctl.sh); # desktop-ctl = pkgs.writeShellScriptBin "desktop-ctl.sh" (builtins.readFile ../scripts/desktop/desktop-ctl.sh);
desktop-ctl = import ../../other/scripts/desktop/desktopctl.nix { inherit pkgs; }; desktop-ctl = import ../../other/scripts/desktop/desktopctl.nix {inherit pkgs;};
# TODO: fix ocr screenshot script # TODO: fix ocr screenshot script
ocr-screenshot = pkgs.writeShellScriptBin "ocr-screenshot.sh" (builtins.readFile ../../other/scripts/desktop/ocr-screenshot.sh); ocr-screenshot = pkgs.writeShellScriptBin "ocr-screenshot.sh" (builtins.readFile ../../other/scripts/desktop/ocr-screenshot.sh);
# rofi calculator copied from https://github.com/barbuk/menu-qalc # rofi calculator copied from https://github.com/barbuk/menu-qalc
menu-qalc = pkgs.writeShellScriptBin "menu-qalc" (builtins.readFile ../../other/scripts/desktop/menu-qalc.sh); menu-qalc = pkgs.writeShellScriptBin "menu-qalc" (builtins.readFile ../../other/scripts/desktop/menu-qalc.sh);
in with lib; { in
with lib; {
imports = [ imports = [
./audio.nix ./audio.nix
./gaming.nix ./gaming.nix
@ -71,8 +75,6 @@ in with lib; {
enable = true; enable = true;
}; };
}; };
}; };
programs.xss-lock = { programs.xss-lock = {
@ -89,7 +91,7 @@ in with lib; {
notifications.test = true; notifications.test = true;
}; };
home-manager.users.jade = { pkgs, ... }: { home-manager.users.jade = {pkgs, ...}: {
programs.bat = { programs.bat = {
# TODO: more config # TODO: more config
enable = true; enable = true;
@ -99,35 +101,79 @@ in with lib; {
theme = ../../other/rofi-themes/applauncher.rasi; theme = ../../other/rofi-themes/applauncher.rasi;
}; };
home.packages = with pkgs; [ home.packages = with pkgs; [
just bacon just
bacon
magic-wormhole-rs magic-wormhole-rs
yt-dlp yt-dlp
i3lock rofimoji feh xorg.xinput arandr flameshot i3lock
tesseract5 imagemagick xclip xmacro xorg.xev rofimoji
feh
xorg.xinput
arandr
flameshot
tesseract5
imagemagick
xclip
xmacro
xorg.xev
syncplay syncplay
# filemanager # filemanager
xfce.thunar xfce.tumbler xfce.thunar-archive-plugin gnome.file-roller xfce.thunar
xfce.tumbler
xfce.thunar-archive-plugin
gnome.file-roller
# media/file viewers # media/file viewers
vlc mpv evince nomacs vlc
mpv
evince
nomacs
# from environment.systemPackages cleanup # from environment.systemPackages cleanup
font-manager xdotool xorg.xwininfo gparted uhk-agent font-manager
cool-retro-term xdg-desktop-portal-gtk obsidian zettlr virt-manager xdotool
ddccontrol-db firebird-emu gitg gpick qdirstat ffmpeg_5 xorg.xwininfo
gparted
uhk-agent
cool-retro-term
xdg-desktop-portal-gtk
obsidian
zettlr
virt-manager
ddccontrol-db
firebird-emu
gitg
gpick
qdirstat
ffmpeg_5
# external # external
libnotify i3lock rofi rofimoji feh xorg.xinput arandr libnotify
flameshot tesseract5 imagemagick xclip kitty xmacro i3lock
brightnessctl drawing libqalculate rofi
rofimoji
feh
xorg.xinput
arandr
flameshot
tesseract5
imagemagick
xclip
kitty
xmacro
brightnessctl
drawing
libqalculate
# custom scripts # custom scripts
window-screenshot desktop-ctl window-screenshot
ocr-screenshot menu-qalc desktop-ctl
ocr-screenshot
menu-qalc
# meow # meow
oneko oneko
@ -136,4 +182,4 @@ in with lib; {
enable = true; enable = true;
}; };
}; };
} }

View file

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

View file

@ -1,5 +1,9 @@
{ pkgs, config, lib, ... }: {
let pkgs,
config,
lib,
...
}: let
cfg = config.jade.desktop.evremap; cfg = config.jade.desktop.evremap;
evremap = pkgs.rustPlatform.buildRustPackage { evremap = pkgs.rustPlatform.buildRustPackage {
pname = "evremap"; pname = "evremap";
@ -15,20 +19,21 @@ let
postPatch = '' postPatch = ''
cp ${../../other/evremap.Cargo.lock} Cargo.lock cp ${../../other/evremap.Cargo.lock} Cargo.lock
''; '';
nativeBuildInputs = [ pkgs.pkg-config ]; nativeBuildInputs = [pkgs.pkg-config];
buildInputs = [ pkgs.libevdev ]; buildInputs = [pkgs.libevdev];
}; };
in with lib; { in
with lib; {
options.jade.desktop.evremap = { options.jade.desktop.evremap = {
enable = mkEnableOption "Enable evremap"; enable = mkEnableOption "Enable evremap";
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
systemd.services.evremap = { systemd.services.evremap = {
script = "${evremap}/bin/evremap remap ${../../other/remaps-${config.networking.hostName}.toml}"; script = "${evremap}/bin/evremap remap ${../../other/remaps-${config.networking.hostName}.toml}";
wantedBy = [ "multi-user.target" ]; wantedBy = ["multi-user.target"];
unitConfig = { unitConfig = {
Restart = "on-failure"; Restart = "on-failure";
}; };
}; };
}; };
} }

View file

@ -1,5 +1,5 @@
{ ... }: { {...}: {
home-manager.users.jade = { pkgs, ... }: { home-manager.users.jade = {pkgs, ...}: {
home.file = { home.file = {
".tridactylrc" = { ".tridactylrc" = {
text = '' text = ''
@ -46,49 +46,49 @@
bookmarks = [ bookmarks = [
{ {
name = "Katzencafé"; name = "Katzencafé";
tags = [ "fedi" "social" ]; tags = ["fedi" "social"];
keyword = "ck"; keyword = "ck";
url = "https://ck.katzen.cafe"; url = "https://ck.katzen.cafe";
} }
{ {
name = "Mastodon.de"; name = "Mastodon.de";
tags = [ "fedi" "social" ]; tags = ["fedi" "social"];
keyword = "mde"; keyword = "mde";
url = "https://mastodon.de"; url = "https://mastodon.de";
} }
{ {
name = "Nekoverse"; name = "Nekoverse";
tags = [ "fedi" "social" ]; tags = ["fedi" "social"];
keyword = "neko"; keyword = "neko";
url = "https://social.nekover.se"; url = "https://social.nekover.se";
} }
{ {
name = "Katzenschmiede"; name = "Katzenschmiede";
tags = [ "fedi" "git" ]; tags = ["fedi" "git"];
keyword = "forge"; keyword = "forge";
url = "https://forge.katzen.cafe"; url = "https://forge.katzen.cafe";
} }
{ {
name = "Katzenwolke"; name = "Katzenwolke";
tags = [ "cloud" ]; tags = ["cloud"];
keyword = "wolke"; keyword = "wolke";
url = "https://wolke.katzen.cafe"; url = "https://wolke.katzen.cafe";
} }
{ {
name = "Penpot"; name = "Penpot";
tags = [ "design" ]; tags = ["design"];
keyword = "pp"; keyword = "pp";
url = "https://design.katzen.cafe"; url = "https://design.katzen.cafe";
} }
{ {
name = "Pad"; name = "Pad";
tags = [ "pad" ]; tags = ["pad"];
keyword = "pad"; keyword = "pad";
url = "https://pad.katzen.cafe"; url = "https://pad.katzen.cafe";
} }
{ {
name = "Auth"; name = "Auth";
tags = [ "keycloak" ]; tags = ["keycloak"];
keyword = "auth"; keyword = "auth";
url = "https://auth.katzen.cafe/realms/katzen.cafe/account"; url = "https://auth.katzen.cafe/realms/katzen.cafe/account";
} }
@ -133,71 +133,103 @@
default = "DuckDuckGo"; default = "DuckDuckGo";
engines = { engines = {
"Nix Packages" = { "Nix Packages" = {
urls = [{ urls = [
{
template = "https://search.nixos.org/packages"; template = "https://search.nixos.org/packages";
params = [ params = [
{ name = "query"; value = "{searchTerms}"; } {
name = "query";
value = "{searchTerms}";
}
];
}
]; ];
}];
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 = [
{
template = "https://search.nixos.org/options"; template = "https://search.nixos.org/options";
params = [ params = [
{ name = "query"; value = "{searchTerms}"; } {
name = "query";
value = "{searchTerms}";
}
];
}
]; ];
}];
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 = [
{
template = "https://mipmip.github.io/home-manager-option-search/"; template = "https://mipmip.github.io/home-manager-option-search/";
params = [ params = [
{ name = "query"; value = "{searchTerms}"; } {
name = "query";
value = "{searchTerms}";
}
];
}
]; ];
}];
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 = [
{
template = "https://nixos.wiki/index.php?title=Special:Search&amp;search={searchTerms}&amp;namespace=0"; template = "https://nixos.wiki/index.php?title=Special:Search&amp;search={searchTerms}&amp;namespace=0";
}]; }
];
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"];
}; };
"lib.rs" = { "lib.rs" = {
urls = [{ urls = [
{
template = "https://lib.rs/search"; template = "https://lib.rs/search";
params = [ params = [
{ name = "q"; value = "{searchTerms}"; } {
name = "q";
value = "{searchTerms}";
}
];
}
]; ];
}];
icon = "https://lib.rs/favicon.png"; icon = "https://lib.rs/favicon.png";
definedAliases = [ "libs" ]; definedAliases = ["libs"];
}; };
"rust docs" = { "rust docs" = {
urls = [{ urls = [
{
template = "https://docs.rs/releases/search"; template = "https://docs.rs/releases/search";
params = [ params = [
{ name = "query"; value = "{searchTerms}"; } {
name = "query";
value = "{searchTerms}";
}
];
}
]; ];
}];
icon = "https://docs.rs/-/static/favicon.ico"; icon = "https://docs.rs/-/static/favicon.ico";
definedAliases = [ "docs" ]; definedAliases = ["docs"];
}; };
"rust std docs" = { "rust std docs" = {
urls = [{ urls = [
{
template = "https://docs.rust-lang.org/std/index.html"; template = "https://docs.rust-lang.org/std/index.html";
params = [ params = [
{ name = "search"; value = "{searchTerms}"; } {
name = "search";
value = "{searchTerms}";
}
];
}
]; ];
}];
icon = "https://doc.rust-lang.org/favicon.ico"; icon = "https://doc.rust-lang.org/favicon.ico";
definedAliases = [ "std" ]; definedAliases = ["std"];
}; };
"Bing".metaData.hidden = true; "Bing".metaData.hidden = true;
"Google".metaData.hidden = true; "Google".metaData.hidden = true;

View file

@ -1,18 +1,22 @@
{ config, lib, pkgs, ... }: {
config,
let lib,
pkgs,
...
}: let
cfg = config.jade.desktop.gaming; cfg = config.jade.desktop.gaming;
in with lib; { in
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
]; ];
}; };
}; };
} }

View file

@ -1,7 +1,12 @@
{ config, lib, pkgs, ... }: {
config,
let cfg = config.jade.desktop.ios-compat; lib,
in with lib; { pkgs,
...
}: let
cfg = config.jade.desktop.ios-compat;
in
with lib; {
options.jade.desktop.ios-compat = { options.jade.desktop.ios-compat = {
enable = mkEnableOption "Enable the ios compatability programs"; enable = mkEnableOption "Enable the ios compatability programs";
}; };
@ -10,7 +15,7 @@ in with lib; {
usbmuxd.enable = true; usbmuxd.enable = true;
gvfs.enable = true; gvfs.enable = true;
}; };
home-manager.users.jade = { pkgs, ... }: { home-manager.users.jade = {pkgs, ...}: {
home.packages = with pkgs; [ home.packages = with pkgs; [
libimobiledevice libimobiledevice
libimobiledevice-glue libimobiledevice-glue
@ -21,4 +26,4 @@ in with lib; {
]; ];
}; };
}; };
} }

View file

@ -1,17 +1,22 @@
{ config, lib, pkgs, ... }: {
config,
let cfg = config.jade.desktop.kdeconnect; lib,
in with lib; { pkgs,
...
}: let
cfg = config.jade.desktop.kdeconnect;
in
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

@ -1,6 +1,9 @@
{ config, lib, pkgs, ... }: {
config,
let lib,
pkgs,
...
}: let
cfg = config.jade.desktop.mail; cfg = config.jade.desktop.mail;
imap = { imap = {
host = "imap.migadu.com"; host = "imap.migadu.com";
@ -11,12 +14,13 @@ let
port = 465; port = 465;
tls.enable = true; tls.enable = true;
}; };
in with lib; { in
with lib; {
options.jade.desktop.mail = { options.jade.desktop.mail = {
enable = mkEnableOption "Enable thunderbird mail stuff"; enable = mkEnableOption "Enable thunderbird mail stuff";
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
home-manager.users.jade = { pkgs, ... }: { home-manager.users.jade = {pkgs, ...}: {
accounts.email.accounts = { accounts.email.accounts = {
"Jade" = rec { "Jade" = rec {
inherit imap smtp; inherit imap smtp;
@ -70,4 +74,4 @@ in with lib; {
}; };
}; };
}; };
} }

View file

@ -1,7 +1,11 @@
{ config, lib, pkgs, ... }: {
config,
let lib,
addNuShebang = path: builtins.concatStringsSep "\n\n" [ pkgs,
...
}: let
addNuShebang = path:
builtins.concatStringsSep "\n\n" [
"#!${pkgs.nushellFull}/bin/nu" "#!${pkgs.nushellFull}/bin/nu"
(builtins.readFile path) (builtins.readFile path)
]; ];
@ -40,7 +44,7 @@ in {
]; ];
}; };
}; };
environment.etc = (with builtins; ( environment.etc = with builtins; (
listToAttrs ( listToAttrs (
map (v: { map (v: {
name = "networkhooks/${v}"; name = "networkhooks/${v}";
@ -51,10 +55,10 @@ in {
}) })
(attrNames (readDir ../../other/scripts/networkhooks)) (attrNames (readDir ../../other/scripts/networkhooks))
) )
)); );
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 = { pkgs, ... }: { home-manager.users.jade = {pkgs, ...}: {
home.packages = with pkgs; [ home.packages = with pkgs; [
networkmanagerapplet networkmanagerapplet
mullvad-vpn mullvad-vpn

View file

@ -1,8 +1,11 @@
{ config, lib, pkgs, ... }:
{ {
config,
lib,
pkgs,
...
}: {
config = { config = {
home-manager.users.jade = { pkgs, ... }: { home-manager.users.jade = {pkgs, ...}: {
#xsession.windowManager.i3.config.startup = [ #xsession.windowManager.i3.config.startup = [
#{ #{
#command = "pkill polybar; polybar"; #command = "pkill polybar; polybar";

View file

@ -1,12 +1,17 @@
{ config, lib, pkgs, ... }: {
config,
let cfg = config.jade.desktop.social; lib,
in with lib; { pkgs,
...
}: let
cfg = config.jade.desktop.social;
in
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 = { pkgs, ... }: { home-manager.users.jade = {pkgs, ...}: {
home.packages = with pkgs; [ home.packages = with pkgs; [
evolutionWithPlugins evolutionWithPlugins
schildichat-desktop schildichat-desktop
@ -14,4 +19,4 @@ in with lib; {
]; ];
}; };
}; };
} }

View file

@ -1,5 +1,9 @@
{ config, lib, pkgs, ... }:
{ {
config,
lib,
pkgs,
...
}: {
imports = [ imports = [
./spacenav.nix ./spacenav.nix
./wacom.nix ./wacom.nix

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,6 +1,6 @@
{ ... }: { {...}: {
services.xserver.wacom.enable = true; services.xserver.wacom.enable = true;
home-manager.users.jade = { pkgs, ... }: { home-manager.users.jade = {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,7 +1,12 @@
{ config, lib, pkgs, ... }: {
config,
let cfg = config.jade.desktop.syncthing; lib,
in with lib; { pkgs,
...
}: let
cfg = config.jade.desktop.syncthing;
in
with lib; {
options.jade.desktop.syncthing = { options.jade.desktop.syncthing = {
enable = mkEnableOption "Enable syncing via syncthing"; enable = mkEnableOption "Enable syncing via syncthing";
}; };
@ -13,4 +18,4 @@ in with lib; {
configDir = "/home/${user}/Documents/.config/syncthing"; configDir = "/home/${user}/Documents/.config/syncthing";
}; };
}; };
} }

View file

@ -1,11 +1,14 @@
{ config, lib, pkgs, ... }:
{ {
config,
lib,
pkgs,
...
}: {
config = { config = {
fonts.packages = with pkgs; [ fonts.packages = with pkgs; [
atkinson-hyperlegible atkinson-hyperlegible
]; ];
home-manager.users.jade = { pkgs, ... }: { home-manager.users.jade = {pkgs, ...}: {
home.packages = with pkgs; [ home.packages = with pkgs; [
gtk-engine-murrine gtk-engine-murrine
gruvbox-dark-gtk gruvbox-dark-gtk

View file

@ -1,6 +1,11 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
with lib; { with lib; {
home-manager.users.jade = { pkgs, ... }: { home-manager.users.jade = {pkgs, ...}: {
xsession.windowManager.xmonad = { xsession.windowManager.xmonad = {
enable = true; enable = true;
enableContribAndExtras = true; enableContribAndExtras = true;

View file

@ -1,5 +1,9 @@
{ config, lib, pkgs, ... }:
{ {
config,
lib,
pkgs,
...
}: {
config = { config = {
networking = { networking = {
firewall = { firewall = {
@ -9,7 +13,8 @@
22 22
# http, https # http, https
80 443 80
443
# syncthing web ui # syncthing web ui
8384 8384

View file

@ -1,7 +1,12 @@
{ config, lib, pkgs, ... }: {
config,
let cfg = config.jade.flatpak; lib,
in with lib; { pkgs,
...
}: let
cfg = config.jade.flatpak;
in
with lib; {
options.jade.flatpak = { options.jade.flatpak = {
enable = mkEnableOption "Enable flatpak"; enable = mkEnableOption "Enable flatpak";
}; };
@ -14,4 +19,4 @@ in with lib; {
]; ];
}; };
}; };
} }

View file

@ -1,5 +1,5 @@
{ ... }: { {...}: {
home-manager.users.jade = { pkgs, ... }: { home-manager.users.jade = {pkgs, ...}: {
programs.git = { programs.git = {
enable = true; enable = true;
userName = "Schrottkatze"; userName = "Schrottkatze";

View file

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

View file

@ -1,4 +1,4 @@
{ ... }: { {...}: {
imports = [ imports = [
./helix.nix ./helix.nix
./nu.nix ./nu.nix

View file

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

View file

@ -1,6 +1,5 @@
{ config, ... }: {config, ...}: {
{ home-manager.users.jade = {pkgs, ...}: {
home-manager.users.jade = { pkgs, ... }: {
home = { home = {
sessionVariables.EDITOR = "hx"; sessionVariables.EDITOR = "hx";
packages = [ packages = [
@ -43,7 +42,7 @@
languages = { languages = {
language-server."nu-builtin-lsp" = { language-server."nu-builtin-lsp" = {
command = "${config.users.defaultUserShell}/bin/nu"; command = "${config.users.defaultUserShell}/bin/nu";
args = [ "--lsp" ]; args = ["--lsp"];
}; };
language-server."rust-analyzer" = { language-server."rust-analyzer" = {
config = { config = {
@ -61,7 +60,7 @@
language = [ language = [
{ {
name = "nu"; name = "nu";
language-servers = [ "nu-builtin-lsp" ]; language-servers = ["nu-builtin-lsp"];
} }
]; ];
}; };

View file

@ -1,5 +1,5 @@
{ config, ... }: { {config, ...}: {
home-manager.users.jade = { pkgs, ... }: { home-manager.users.jade = {pkgs, ...}: {
programs.nushell = { programs.nushell = {
enable = true; enable = true;
package = config.users.defaultUserShell; package = config.users.defaultUserShell;

View file

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

View file

@ -1,6 +1,9 @@
{ config, lib, ... }:
{ {
home-manager.users.jade = { pkgs, ... }: { config,
lib,
...
}: {
home-manager.users.jade = {pkgs, ...}: {
home.file = { home.file = {
zellij-forgot = { zellij-forgot = {
target = ".config/zellij/plugins/zellij-forgot.wasm"; target = ".config/zellij/plugins/zellij-forgot.wasm";

View file

@ -1,10 +1,16 @@
{ config, lib, pkgs, ... }: {
config,
let cfg = config.jade.NAME; lib,
in with lib; { pkgs,
...
}: let
cfg = config.jade.NAME;
in
with lib; {
options.jade.NAME = { options.jade.NAME = {
enable = mkEnableOption "Enable the module"; enable = mkEnableOption "Enable the module";
}; };
config = mkIf cfg.enable { config =
mkIf cfg.enable {
}; };
} }

View file

@ -1,7 +1,12 @@
{ config, lib, pkgs, ... }: {
config,
let cfg = config.jade.terminal; lib,
in with lib; { pkgs,
...
}: let
cfg = config.jade.terminal;
in
with lib; {
options.jade.terminal = { options.jade.terminal = {
enable = mkEnableOption "Enable Kitty"; enable = mkEnableOption "Enable Kitty";
}; };
@ -9,7 +14,7 @@ in with lib; {
environment.sessionVariables = rec { environment.sessionVariables = rec {
TERMINAL = "kitty"; TERMINAL = "kitty";
}; };
home-manager.users.jade = { pkgs,... } : { home-manager.users.jade = {pkgs, ...}: {
programs.kitty = { programs.kitty = {
enable = true; enable = true;
font = { font = {
@ -41,4 +46,4 @@ in with lib; {
}; };
}; };
}; };
} }

View file

@ -1,11 +1,14 @@
{ pkgs, lib }: rec { {
pkgs,
lib,
}: rec {
# taken from https://github.com/NixOS/nixpkgs/blob/3650808d85dccbfa3be3d785dfd3ce33a757bd2c/pkgs/build-support/trivial-builders/default.nix#L335 # taken from https://github.com/NixOS/nixpkgs/blob/3650808d85dccbfa3be3d785dfd3ce33a757bd2c/pkgs/build-support/trivial-builders/default.nix#L335
writeNuShellApplication = writeNuShellApplication = {
{ name name,
, text text,
, runtimeInputs ? [ ] runtimeInputs ? [],
, meta ? { } meta ? {},
, checkPhase ? null checkPhase ? null,
}: }:
writeTextFile { writeTextFile {
inherit name meta; inherit name meta;
@ -13,12 +16,15 @@
destination = "/bin/${name}"; destination = "/bin/${name}";
allowSubstitutes = true; allowSubstitutes = true;
preferLocalBuild = false; preferLocalBuild = false;
text = '' text =
''
#!${pkgs.nushell} #!${pkgs.nushell}
'' + lib.optionalString (runtimeInputs != [ ]) '' ''
+ lib.optionalString (runtimeInputs != []) ''
$env.PATH = ($env.PATH | split row (char esep) | prepend '${lib.makeBinPath runtimeInputs}'); $env.PATH = ($env.PATH | split row (char esep) | prepend '${lib.makeBinPath runtimeInputs}');
'' + '' ''
+ ''
${text} ${text}
''; '';
@ -26,7 +32,8 @@
checkPhase = checkPhase =
# GHC (=> shellcheck) isn't supported on some platforms (such as risc-v) # GHC (=> shellcheck) isn't supported on some platforms (such as risc-v)
# but we still want to use writeShellApplication on those platforms # but we still want to use writeShellApplication on those platforms
if checkPhase == null then '' if checkPhase == null
then ''
runHook preCheck runHook preCheck
nu -c "nu-check -d $target" nu -c "nu-check -d $target"
@ -35,12 +42,12 @@
'' ''
else checkPhase; else checkPhase;
}; };
packageNushellApplication = packageNushellApplication = {
{ name name,
, path path,
, runtimeInputs ? [ ] runtimeInputs ? [],
, meta ? { } meta ? {},
, checkPhase ? null checkPhase ? null,
}: }:
writeNuShellApplication { writeNuShellApplication {
inherit name runtimeInputs meta checkPhase; inherit name runtimeInputs meta checkPhase;

View file

@ -1,6 +1,6 @@
{ pkgs, ... }: {pkgs, ...}:
pkgs.writeShellScriptBin "desktopctl" '' pkgs.writeShellScriptBin "desktopctl" ''
case $@ in case $@ in
"Lock Screen") "Lock Screen")
loginctl lock-session loginctl lock-session
exit 0 exit 0
@ -17,19 +17,19 @@ case $@ in
systemctl reboot systemctl reboot
exit 0 exit 0
;; ;;
esac esac
# resizes grid # resizes grid
echo -en "\0theme\x1flistview,inputbar,message{columns:4;lines:1;}\n" echo -en "\0theme\x1flistview,inputbar,message{columns:4;lines:1;}\n"
# resizes window, moves it to top of screen, adjusts rounded corners # resizes window, moves it to top of screen, adjusts rounded corners
echo -en "\0theme\x1fwindow{width:800px;location:north;y-offset:24px;border-radius:0 0 12px 12px;}\n" echo -en "\0theme\x1fwindow{width:800px;location:north;y-offset:24px;border-radius:0 0 12px 12px;}\n"
# swaps grid and input bar # swaps grid and input bar
echo -en "\0theme\x1fmainbox{children:[listview,inputbar];}\n" echo -en "\0theme\x1fmainbox{children:[listview,inputbar];}\n"
# fixes brown line below input bar # fixes brown line below input bar
echo -en "\0theme\x1finputbar{margin:0;}\n" echo -en "\0theme\x1finputbar{margin:0;}\n"
echo -en "Lock Screen\0icon\x1f${../../../other/assets/desktopctl/lock-screen.svg}\n" echo -en "Lock Screen\0icon\x1f${../../../other/assets/desktopctl/lock-screen.svg}\n"
echo -en "Log Out\0icon\x1f${../../../other/assets/desktopctl/logout.svg}\n" echo -en "Log Out\0icon\x1f${../../../other/assets/desktopctl/logout.svg}\n"
echo -en "Shut Down\0icon\x1f${../../../other/assets/desktopctl/shutdown.svg}\n" echo -en "Shut Down\0icon\x1f${../../../other/assets/desktopctl/shutdown.svg}\n"
echo -en "Reboot\0icon\x1f${../../../other/assets/desktopctl/reboot.svg}\n" echo -en "Reboot\0icon\x1f${../../../other/assets/desktopctl/reboot.svg}\n"
'' ''