WIP: update to 23.11

This commit is contained in:
Filippo Berto 2023-12-01 15:24:25 +01:00
parent ab9c5297fc
commit 330d7c2338
No known key found for this signature in database
GPG key ID: FE98AE5EC52B1056
22 changed files with 765 additions and 835 deletions

40
flake.lock generated
View file

@ -9,11 +9,11 @@
]
},
"locked": {
"lastModified": 1696775529,
"narHash": "sha256-TYlE4B0ktPtlJJF9IFxTWrEeq+XKG8Ny0gc2FGEAdj0=",
"lastModified": 1701216516,
"narHash": "sha256-jKSeJn+7hZ1dZdiH1L+NWUGT2i/BGomKAJ54B9kT06Q=",
"owner": "ryantm",
"repo": "agenix",
"rev": "daf42cb35b2dc614d1551e37f96406e4c4a2d3e4",
"rev": "13ac9ac6d68b9a0896e3d43a082947233189e247",
"type": "github"
},
"original": {
@ -237,16 +237,16 @@
]
},
"locked": {
"lastModified": 1699748081,
"narHash": "sha256-MOmMapBydd7MTjhX4eeQZzKlCABWw8W6iSHSG4OeFKE=",
"lastModified": 1700814205,
"narHash": "sha256-lWqDPKHRbQfi+zNIivf031BUeyciVOtwCwTjyrhDB5g=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "04bac349d585c9df38d78e0285b780a140dc74a4",
"rev": "aeb2232d7a32530d3448318790534d196bf9427a",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-23.05",
"ref": "release-23.11",
"repo": "home-manager",
"type": "github"
}
@ -327,11 +327,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1699701045,
"narHash": "sha256-mDzUXK7jNO/utInWpSWEX1NgEEunVIpJg+LyPsDTfy0=",
"lastModified": 1701250978,
"narHash": "sha256-ohu3cz4edjpGxs2qUTgbs0WrnewOX4crnUJNEB6Jox4=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "b689465d0c5d88e158e7d76094fca08cc0223aad",
"rev": "8772491ed75f150f02552c60694e1beff9f46013",
"type": "github"
},
"original": {
@ -405,11 +405,11 @@
},
"nixpkgs-u": {
"locked": {
"lastModified": 1699099776,
"narHash": "sha256-X09iKJ27mGsGambGfkKzqvw5esP1L/Rf8H3u3fCqIiU=",
"lastModified": 1701253981,
"narHash": "sha256-ztaDIyZ7HrTAfEEUt9AtTDNoCYxUdSd6NrRHaYOIxtk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "85f1ba3e51676fa8cc604a3d863d729026a6b8eb",
"rev": "e92039b55bcd58469325ded85d4f58dd5a4eaf58",
"type": "github"
},
"original": {
@ -421,16 +421,16 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1699785518,
"narHash": "sha256-QywAQ3A4dMHt1NTbHIFMXZ+bknza+JJpjxbDi5ud2+Y=",
"lastModified": 1701432826,
"narHash": "sha256-eTDjcynO+dWFBeUOk5qe/mUOp4ObJb7eqdjIGJIyeG0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "971ac8319468c5cfa05653f6b95d7174614720f9",
"rev": "9fa06ee411556cc555a8feca5c51666f0eb3a2e0",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "release-23.05",
"ref": "release-23.11",
"repo": "nixpkgs",
"type": "github"
}
@ -473,11 +473,11 @@
"nixpkgs-stable": "nixpkgs-stable_2"
},
"locked": {
"lastModified": 1699271226,
"narHash": "sha256-8Jt1KW3xTjolD6c6OjJm9USx/jmL+VVmbooADCkdDfU=",
"lastModified": 1700922917,
"narHash": "sha256-ej2fch/T584b5K9sk1UhmZF7W6wEfDHuoUYpFN8dtvM=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "ea758da1a6dcde6dc36db348ed690d09b9864128",
"rev": "e5ee5c5f3844550c01d2131096c7271cec5e9b78",
"type": "github"
},
"original": {

View file

@ -2,9 +2,9 @@
description = "Thor system configuration";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/release-23.05";
nixpkgs.url = "github:NixOS/nixpkgs/release-23.11";
nixpkgs-u.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager = { url = "github:nix-community/home-manager/release-23.05"; inputs.nixpkgs.follows = "nixpkgs"; };
home-manager = { url = "github:nix-community/home-manager/release-23.11"; inputs.nixpkgs.follows = "nixpkgs"; };
# home-manager-u = { url = "github:nix-community/home-manager"; inputs = { nixpkgs.follows = "nixpkgs-u"; }; };
agenix = { url = "github:ryantm/agenix"; inputs.nixpkgs.follows = "nixpkgs"; };
@ -106,11 +106,13 @@
# Agenix configuration
agenix.nixosModules.default
{
# age.secrets.oauth_proxy_client_credentials.file = ./secrets/oauth_proxy_client_credentials.age;
age.secrets.spotify_password = { file = ./secrets/spotify_password.age; owner = "bertof"; };
age.secrets.wg_psk = { file = ./secrets/wg_psk.age; };
age.secrets.baldur_wg_priv = { file = ./secrets/baldur_wg_priv.age; };
age.secrets.oppo_wg_priv = { file = ./secrets/oppo_wg_priv.age; };
age.secrets = {
# oauth_proxy_client_credentials.file = ./secrets/oauth_proxy_client_credentials.age;
spotify_password = { file = ./secrets/spotify_password.age; owner = "bertof"; };
wg_psk = { file = ./secrets/wg_psk.age; };
baldur_wg_priv = { file = ./secrets/baldur_wg_priv.age; };
oppo_wg_priv = { file = ./secrets/oppo_wg_priv.age; };
};
}
./modules/nixos/users/bertof.nix

View file

@ -3,10 +3,15 @@
{
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
boot = {
initrd = {
availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" ];
kernelModules = [ ];
};
kernelModules = [ "kvm-intel" ];
extraModulePackages = [ ];
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/47e1437c-ca95-45e2-a3e1-45ad10ae9474";
@ -14,5 +19,4 @@
};
swapDevices = [ ];
}

View file

@ -8,7 +8,10 @@
};
hardware = {
bluetooth = { enable = true; package = pkgs.bluezFull; };
bluetooth = {
enable = true;
# package = pkgs.bluezFull;
};
opengl = { enable = true; driSupport = true; };
raspberry-pi."4" = {
# audio.enable = true; # AUDIO

View file

@ -4,19 +4,25 @@
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "uas" "usb_storage" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888";
fsType = "ext4";
boot = {
extraModulePackages = [ ];
initrd = {
availableKernelModules = [ "xhci_pci" "uas" "usb_storage" ];
kernelModules = [ ];
};
kernelModules = [ ];
};
fileSystems."/mnt/raid" = {
device = "/dev/disk/by-uuid/d3d487e9-4ed8-4a1e-9abc-ebb0c1dc80d9";
fsType = "btrfs";
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888";
fsType = "ext4";
};
"/mnt/raid" = {
device = "/dev/disk/by-uuid/d3d487e9-4ed8-4a1e-9abc-ebb0c1dc80d9";
fsType = "btrfs";
};
};
swapDevices = [ ];

View file

@ -39,7 +39,10 @@ with lib; {
};
};
bluetooth = { enable = true; package = pkgs.bluezFull; };
bluetooth = {
enable = true;
# package = pkgs.bluezFull;
};
};
i18n.defaultLocale = "it_IT.UTF-8";

View file

@ -6,45 +6,45 @@
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "uas" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/44c53e75-a00d-47bc-a99b-2544fe513e51";
fsType = "btrfs";
options = [ "compress=lzo" ];
boot = {
initrd = {
availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "uas" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
kernelModules = [ ];
};
kernelModules = [ "kvm-intel" ];
extraModulePackages = [ ];
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/8A71-E5EB";
fsType = "vfat";
};
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/44c53e75-a00d-47bc-a99b-2544fe513e51";
fsType = "btrfs";
options = [ "compress=lzo" ];
};
fileSystems."/home/bertof" = {
device = "/dev/disk/by-uuid/2e897ea5-c8f9-4fa8-9cc6-3f5807ba8afc";
fsType = "btrfs";
options = [ "subvol=@bertof" "compress=lzo" ];
};
"/boot" = {
device = "/dev/disk/by-uuid/8A71-E5EB";
fsType = "vfat";
};
fileSystems."/home/tiziano" = {
device = "/dev/disk/by-uuid/2e897ea5-c8f9-4fa8-9cc6-3f5807ba8afc";
fsType = "btrfs";
options = [ "subvol=@tiziano" "compress=lzo" ];
};
"/home/bertof" = {
device = "/dev/disk/by-uuid/2e897ea5-c8f9-4fa8-9cc6-3f5807ba8afc";
fsType = "btrfs";
options = [ "subvol=@bertof" "compress=lzo" ];
};
fileSystems."/mnt/condiviso" = {
device = "/dev/disk/by-uuid/2e897ea5-c8f9-4fa8-9cc6-3f5807ba8afc";
fsType = "btrfs";
options = [ "subvol=@condiviso" "compress=lzo" ];
};
"/home/tiziano" = {
device = "/dev/disk/by-uuid/2e897ea5-c8f9-4fa8-9cc6-3f5807ba8afc";
fsType = "btrfs";
options = [ "subvol=@tiziano" "compress=lzo" ];
};
# fileSystems."/var/lib/minio/data" = {
# device = "/dev/disk/by-uuid/2e897ea5-c8f9-4fa8-9cc6-3f5807ba8afc";
# fsType = "btrfs";
# options = [ "subvol=@minio" "compress=lzo" ];
# };
"/mnt/condiviso" = {
device = "/dev/disk/by-uuid/2e897ea5-c8f9-4fa8-9cc6-3f5807ba8afc";
fsType = "btrfs";
options = [ "subvol=@condiviso" "compress=lzo" ];
};
};
swapDevices = [{
device = "/swapfile";

View file

@ -5,31 +5,40 @@ with lib; {
odin_wg_priv = { file = ../../secrets/odin_wg_priv.age; };
};
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.initrd.checkJournalingFS = true;
# boot.kernelPackages = pkgs.linuxPackages_latest;
# boot.kernelPackages = pkgs.linuxPackages_6_1;
boot.extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ];
boot = {
# kernelPackages = pkgs.linuxPackages_latest;
# kernelPackages = pkgs.linuxPackages_6_1;
kernelParams = [ "acpi_osi=Linux-Dell-Video" ];
initrd.checkJournalingFS = true; # Use same ACPI identifier as Dell Ubuntu
loader = { systemd-boot = { enable = true; editor = false; }; efi.canTouchEfiVariables = true; };
extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ];
# # Cross-build arm
boot.binfmt.emulatedSystems = [ "armv7l-linux" "aarch64-linux" ];
hardware.enableRedistributableFirmware = true;
# Enable opengl support
hardware.opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
extraPackages = builtins.attrValues {
inherit (pkgs) intel-media-driver vaapiIntel vaapiVdpau libvdpau-va-gl;
};
# Cross-build arm
binfmt.emulatedSystems = [ "armv7l-linux" "aarch64-linux" ];
};
hardware = {
enableRedistributableFirmware = true;
pulseaudio.enable = false;
# Enable opengl support
opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
extraPackages = builtins.attrValues {
inherit (pkgs) intel-media-driver vaapiIntel vaapiVdpau libvdpau-va-gl;
};
};
# Tablet
opentabletdriver = { enable = true; daemon.enable = true; };
};
# Use same ACPI identifier as Dell Ubuntu
boot.kernelParams = [ "acpi_osi=Linux-Dell-Video" ];
networking = {
hostName = "odin";
@ -46,46 +55,97 @@ with lib; {
# Or disable the firewall altogether.
# firewall.enable = false;
wg-quick.interfaces = {
wg0 = {
autostart = false;
address = [ "10.0.0.2/24" "fdc9:281f:04d7:9ee9::2/64" ];
dns = [ "10.0.0.1" "fdc9:281f:04d7:9ee9::1" ];
privateKeyFile = config.age.secrets.odin_wg_priv.path;
# wg-quick.interfaces = {
# wg0 = {
# autostart = false;
# address = [ "10.0.0.2/24" "fdc9:281f:04d7:9ee9::2/64" ];
# dns = [ "10.0.0.1" "fdc9:281f:04d7:9ee9::1" ];
# privateKeyFile = config.age.secrets.odin_wg_priv.path;
peers = [
{
# baldur
# allowedIPs = [ "10.0.0.3/32" "fdc9:281f:04d7:9ee9::3/128" ];
allowedIPs = [ "0.0.0.0/0" "::/0" ];
endpoint = "baldur.bertof.net:51820";
presharedKeyFile = config.age.secrets.wg_psk.path;
publicKey = "K57ikgFSR1O0CXWBxfQEu7uxSOsp3ePj/NMRets5pVc=";
}
{
# odin
publicKey = "LDBhvzeYmHJ0z5ch+N559GWjT3It1gZvGR/9WtCfURw=";
presharedKeyFile = config.age.secrets.wg_psk.path;
allowedIPs = [ "10.0.0.2/24" "fdc9:281f:04d7:9ee9::2/128" ];
}
{
# oppo
publicKey = "OBk6bHKuIYLwD7cwjmAuMn57jXqbDwCL52jhQxiHnnA=";
presharedKeyFile = config.age.secrets.wg_psk.path;
allowedIPs = [ "10.0.0.3/24" "fdc9:281f:04d7:9ee9::3/128" ];
}
{
# thor
publicKey = "rpwR6n4IE96VZAmQDBufsWE/a9G7d8fpkvY1OwsbOhk=";
presharedKeyFile = config.age.secrets.wg_psk.path;
allowedIPs = [ "10.0.0.4/24" "fdc9:281f:04d7:9ee9::4/128" ];
}
];
};
};
# peers = [
# {
# # baldur
# # allowedIPs = [ "10.0.0.3/32" "fdc9:281f:04d7:9ee9::3/128" ];
# allowedIPs = [ "0.0.0.0/0" "::/0" ];
# endpoint = "baldur.bertof.net:51820";
# presharedKeyFile = config.age.secrets.wg_psk.path;
# publicKey = "K57ikgFSR1O0CXWBxfQEu7uxSOsp3ePj/NMRets5pVc=";
# }
# {
# # odin
# publicKey = "LDBhvzeYmHJ0z5ch+N559GWjT3It1gZvGR/9WtCfURw=";
# presharedKeyFile = config.age.secrets.wg_psk.path;
# allowedIPs = [ "10.0.0.2/24" "fdc9:281f:04d7:9ee9::2/128" ];
# }
# {
# # oppo
# publicKey = "OBk6bHKuIYLwD7cwjmAuMn57jXqbDwCL52jhQxiHnnA=";
# presharedKeyFile = config.age.secrets.wg_psk.path;
# allowedIPs = [ "10.0.0.3/24" "fdc9:281f:04d7:9ee9::3/128" ];
# }
# {
# # thor
# publicKey = "rpwR6n4IE96VZAmQDBufsWE/a9G7d8fpkvY1OwsbOhk=";
# presharedKeyFile = config.age.secrets.wg_psk.path;
# allowedIPs = [ "10.0.0.4/24" "fdc9:281f:04d7:9ee9::4/128" ];
# }
# ];
# };
# };
};
services.hardware.bolt.enable = true;
services = {
# X11 windowing system.
xserver = {
enable = true;
# Enable the GNOME 3 Desktop Environment.
# desktopManager.gnome.enable = true;
# desktopManager.plasma5 = {
# enable = true;
# runUsingSystemd = true;
# };
windowManager.bspwm.enable = true;
# Configure keymap in X11
layout = "it,us";
xkbOptions = "eurosign:e,terminate:ctrl_alt_bksp,compose:rctrl,grp:menu_toggle";
libinput.enable = true;
displayManager.gdm.enable = true;
# displayManager.sddm = {
# enable = true;
# autoNumlock = true;
# theme =
# "${pkgs.sddm-theme-clairvoyance}/usr/share/sddm/themes/clairvoyance";
# };
};
keybase.enable = true;
pipewire = {
enable = true;
pulse.enable = true;
jack.enable = true;
alsa = { enable = true; support32Bit = true; };
# media-session.enable = true;
};
# Enable CUPS to print documents.
printing = {
enable = true;
drivers = [
pkgs.gutenprint
# pkgs.cups-kyocera
pkgs.cups-kyodialog
];
};
# Disable auto handling of power button
logind.extraConfig = ''
HandlePowerKey=ignore
'';
};
# Set your time zone.
time.timeZone = "Europe/Rome";
@ -97,118 +157,38 @@ with lib; {
keyMap = "it";
};
# X11 windowing system.
services.xserver = {
enable = true;
# Enable the GNOME 3 Desktop Environment.
# desktopManager.gnome.enable = true;
# desktopManager.plasma5 = {
# enable = true;
# runUsingSystemd = true;
# };
windowManager.bspwm.enable = true;
# Configure keymap in X11
layout = "it,us";
xkbOptions = "eurosign:e,terminate:ctrl_alt_bksp,compose:rctrl,grp:menu_toggle";
libinput.enable = true;
displayManager.gdm.enable = true;
# displayManager.sddm = {
# enable = true;
# autoNumlock = true;
# theme =
# "${pkgs.sddm-theme-clairvoyance}/usr/share/sddm/themes/clairvoyance";
# };
environment = {
pathsToLink = [ "/share/zsh" ];
sessionVariables.LD_LIBRARY_PATH = lib.mkForce
"${config.services.pipewire.package.jack}/lib"; # Temporary fix for WebKitGTK
systemPackages = builtins.attrValues { inherit (pkgs) tmux helix vim git ntfs3g; };
};
# Enable CUPS to print documents.
services.printing = {
enable = true;
drivers = [
pkgs.gutenprint
# pkgs.cups-kyocera
pkgs.cups-kyodialog
];
};
# Disable auto handling of power button
services.logind.extraConfig = ''
HandlePowerKey=ignore
'';
services.keybase.enable = true;
# Enable sound.
# PULSE
# sound.enable = true;
# hardware.pulseaudio.enable = true;
# PIPEWIRE
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
pulse.enable = true;
jack.enable = true;
alsa = {
enable = true;
support32Bit = true;
};
# media-session.enable = true;
};
environment.sessionVariables.LD_LIBRARY_PATH = lib.mkForce
"${config.services.pipewire.package.jack}/lib"; # Temporary fix for WebKitGTK
# Tablet
hardware.opentabletdriver = { enable = true; daemon.enable = true; };
# Define a user account. Don't forget to set a password with passwd.
users.users.bertof = {
isNormalUser = true;
extraGroups = [
"audio"
"input"
"docker"
"flashrom"
"libvirtd"
"network"
"networkmanager"
"usb"
"video"
"wheel"
];
extraGroups = [ "audio" "input" "docker" "flashrom" "libvirtd" "network" "networkmanager" "usb" "video" "wheel" ];
shell = pkgs.zsh;
};
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = builtins.attrValues { inherit (pkgs) tmux helix vim git ntfs3g; };
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
programs.flashrom.enable = true;
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
programs.steam = {
enable = true;
package = pkgs.steam.override {
extraPkgs = pkgs: with pkgs; [ icu ];
extraProfile = ''
export GSETTINGS_SCHEMA_DIR="${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}/glib-2.0/schemas/"
'';
programs = {
dconf.enable = true;
flashrom.enable = true;
gnupg.agent = { enable = true; enableSSHSupport = true; };
steam = {
enable = true;
package = pkgs.steam.override {
extraPkgs = pkgs: with pkgs; [ icu ];
extraProfile = ''
export GSETTINGS_SCHEMA_DIR="${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}/glib-2.0/schemas/"
'';
};
remotePlay.openFirewall = true;
};
remotePlay.openFirewall = true;
zsh.enable = true;
};
# services.joycond.enable = true;
programs.dconf.enable = true;
programs.zsh.enable = true;
services.onedrive = { enable = true; package = pkgs.unstable_pkgs.onedrive; };
@ -245,46 +225,61 @@ with lib; {
};
};
services.dbus = {
packages = [ pkgs.dconf ];
implementation = "broker";
};
services.gnome.gnome-keyring.enable = true;
hardware.steam-hardware.enable = true;
hardware.bluetooth = {
enable = true;
package = pkgs.bluezFull;
};
services.blueman.enable = true;
services.gvfs = {
enable = true;
# package = lib.mkForce pkgs.gnome3.gvfs;
};
services.tumbler.enable = true;
# services.tlp.enable = false;
services.avahi = {
enable = true;
openFirewall = true;
nssmdns = true;
publish = {
hardware = {
steam-hardware.enable = true;
bluetooth = {
enable = true;
addresses = true;
domain = true;
userServices = true;
workstation = true;
# package = pkgs.bluezFull;
};
extraServiceFiles = {
ssh = "${pkgs.avahi}/etc/avahi/services/ssh.service";
};
services = {
hardware = {
bolt.enable = true;
};
dbus = {
packages = [ pkgs.dconf ];
implementation = "broker";
};
gnome.gnome-keyring.enable = true;
blueman.enable = true;
gvfs = {
enable = true;
# package = lib.mkForce pkgs.gnome3.gvfs;
};
tumbler.enable = true;
# tlp.enable = false;
avahi = {
enable = true;
openFirewall = true;
nssmdns = true;
publish = {
enable = true;
addresses = true;
domain = true;
userServices = true;
workstation = true;
};
extraServiceFiles = {
ssh = "${pkgs.avahi}/etc/avahi/services/ssh.service";
};
};
# Power-profiles
power-profiles-daemon.enable = true;
fprintd = {
enable = true;
tod = { enable = true; driver = pkgs.libfprint-2-tod1-goodix; };
};
};
# FPRINTD
# services.fprintd = {
# enable = true;
# tod = { enable = true; driver = pkgs.libfprint-2-tod1-goodix; };
# };
security.pam.services.login.fprintAuth = true;
security.pam.services.xscreensaver.fprintAuth = true;
security = {
rtkit.enable = true;
pam.services = {
login.fprintAuth = true;
xscreensaver.fprintAuth = true;
};
};
# Clamav
# services.clamav = {
@ -292,8 +287,6 @@ with lib; {
# updater.enable = true;
# };
# Power-profiles
services.power-profiles-daemon.enable = true;
# services.teamviewer.enable = true;
@ -309,8 +302,6 @@ with lib; {
# virtualbox.host.enable = true;
};
# Allow completion for system packages
environment.pathsToLink = [ "/share/zsh" ];
security.sudo.extraConfig = ''
Defaults pwfeedback

View file

@ -6,88 +6,80 @@
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c";
fsType = "btrfs";
options = [ "space_cache=v2" "subvol=@root" "x-gvfs-hide" ];
boot = {
initrd = {
availableKernelModules = [ "xhci_pci" "ahci" "nvme" "sd_mod" ];
kernelModules = [ ];
};
kernelModules = [ "kvm-intel" ];
extraModulePackages = [ ];
};
fileSystems."/nix" = {
device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c";
fsType = "btrfs";
options = [ "space_cache=v2" "subvol=@nix" "x-gvfs-hide" ];
};
fileSystems."/home/bertof" = {
device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c";
fsType = "btrfs";
options = [ "space_cache=v2" "subvol=@bertof/@home" "x-gvfs-hide" ];
};
fileSystems."/home/bertof/Giochi/SSD" = {
device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c";
fsType = "btrfs";
options = [ "space_cache=v2" "subvol=@bertof/@games" "x-gvfs-hide" ];
};
fileSystems."/home/bertof/Video" = {
device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64";
fsType = "btrfs";
options = [ "space_cache=v2" "subvol=@bertof/@videos" "x-gvfs-hide" ];
};
fileSystems."/home/bertof/Giochi/SATA" = {
device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64";
fsType = "btrfs";
options = [ "space_cache=v2" "subvol=@bertof/@games" "x-gvfs-hide" ];
};
fileSystems."/home/bertof/Musica" = {
device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64";
fsType = "btrfs";
options = [ "space_cache=v2" "subvol=@bertof/@music" "x-gvfs-hide" ];
};
fileSystems."/home/bertof/Immagini" = {
device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64";
fsType = "btrfs";
options = [ "space_cache=v2" "subvol=@bertof/@images" "x-gvfs-hide" ];
};
fileSystems."/home/bertof/Scaricati" = {
device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64";
fsType = "btrfs";
options = [ "space_cache=v2" "subvol=@bertof/@downloads" "x-gvfs-hide" ];
};
fileSystems."/home/bertof/Documenti" = {
device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64";
fsType = "btrfs";
options = [ "space_cache=v2" "subvol=@bertof/@documents" "x-gvfs-hide" ];
};
fileSystems."/home/bertof/Documenti/Git" = {
device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c";
fsType = "btrfs";
options = [ "space_cache=v2" "subvol=@bertof/@git" "x-gvfs-hide" ];
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/82DB-3444";
fsType = "vfat";
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c";
fsType = "btrfs";
options = [ "space_cache=v2" "subvol=@root" "x-gvfs-hide" ];
};
"/nix" = {
device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c";
fsType = "btrfs";
options = [ "space_cache=v2" "subvol=@nix" "x-gvfs-hide" ];
};
"/home/bertof" = {
device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c";
fsType = "btrfs";
options = [ "space_cache=v2" "subvol=@bertof/@home" "x-gvfs-hide" ];
};
"/home/bertof/Giochi/SSD" = {
device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c";
fsType = "btrfs";
options = [ "space_cache=v2" "subvol=@bertof/@games" "x-gvfs-hide" ];
};
"/home/bertof/Video" = {
device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64";
fsType = "btrfs";
options = [ "space_cache=v2" "subvol=@bertof/@videos" "x-gvfs-hide" ];
};
"/home/bertof/Giochi/SATA" = {
device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64";
fsType = "btrfs";
options = [ "space_cache=v2" "subvol=@bertof/@games" "x-gvfs-hide" ];
};
"/home/bertof/Musica" = {
device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64";
fsType = "btrfs";
options = [ "space_cache=v2" "subvol=@bertof/@music" "x-gvfs-hide" ];
};
"/home/bertof/Immagini" = {
device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64";
fsType = "btrfs";
options = [ "space_cache=v2" "subvol=@bertof/@images" "x-gvfs-hide" ];
};
"/home/bertof/Scaricati" = {
device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64";
fsType = "btrfs";
options = [ "space_cache=v2" "subvol=@bertof/@downloads" "x-gvfs-hide" ];
};
"/home/bertof/Documenti" = {
device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64";
fsType = "btrfs";
options = [ "space_cache=v2" "subvol=@bertof/@documents" "x-gvfs-hide" ];
};
"/home/bertof/Documenti/Git" = {
device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c";
fsType = "btrfs";
options = [ "space_cache=v2" "subvol=@bertof/@git" "x-gvfs-hide" ];
};
"/boot" = {
device = "/dev/disk/by-uuid/82DB-3444";
fsType = "vfat";
};
};
swapDevices = [
{ device = "/dev/disk/by-uuid/5f3cf424-2bd8-4352-a778-1bb067cb5700"; }
{
device = "/swapfile";
size = 1024 * 32;
}
{ device = "/swapfile"; size = 1024 * 32; }
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking

View file

@ -48,7 +48,7 @@ with lib; {
opengl.enable = true;
bluetooth = {
enable = true;
package = pkgs.bluezFull;
# package = pkgs.bluezFull;
};
enableRedistributableFirmware = true;
pulseaudio.enable = false;

View file

@ -6,59 +6,39 @@
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules =
[ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/6c06428e-c296-4ef1-8429-62bafb860126";
fsType = "btrfs";
options = [
"subvol=@root"
"x-gvfs-hide"
"space_cache=v2"
"discard"
"compress-force=zstd:1"
];
boot = {
extraModulePackages = [ ];
initrd = {
availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
kernelModules = [ "dm-snapshot" ];
};
kernelModules = [ "kvm-amd" ];
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/B9D2-255C";
fsType = "vfat";
};
fileSystems."/home/bertof" = {
device = "/dev/disk/by-uuid/6c06428e-c296-4ef1-8429-62bafb860126";
fsType = "btrfs";
options = [
"subvol=@home_bertof"
"x-gvfs-hide"
"space_cache=v2"
"discard"
"compress-force=zstd:1"
];
};
fileSystems."/nix" = {
device = "/dev/disk/by-uuid/6c06428e-c296-4ef1-8429-62bafb860126";
fsType = "btrfs";
options = [
"subvol=@nix"
"x-gvfs-hide"
"space_cache=v2"
"discard"
"compress-force=zstd:1"
];
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/6c06428e-c296-4ef1-8429-62bafb860126";
fsType = "btrfs";
options = [ "subvol=@root" "x-gvfs-hide" "space_cache=v2" "discard" "compress-force=zstd:1" ];
};
"/boot" = {
device = "/dev/disk/by-uuid/B9D2-255C";
fsType = "vfat";
};
"/home/bertof" = {
device = "/dev/disk/by-uuid/6c06428e-c296-4ef1-8429-62bafb860126";
fsType = "btrfs";
options = [ "subvol=@home_bertof" "x-gvfs-hide" "space_cache=v2" "discard" "compress-force=zstd:1" ];
};
"/nix" = {
device = "/dev/disk/by-uuid/6c06428e-c296-4ef1-8429-62bafb860126";
fsType = "btrfs";
options = [ "subvol=@nix" "x-gvfs-hide" "space_cache=v2" "discard" "compress-force=zstd:1" ];
};
};
swapDevices = [
{ device = "/dev/disk/by-uuid/dee188e4-4ff8-417c-9419-b7f00ecb9989"; }
{
device = "/swapfile";
size = 1024 * 32;
}
{ device = "/swapfile"; size = 1024 * 32; }
];
}

View file

@ -1,7 +1,7 @@
{ pkgs, config, lib, ... }: {
home.packages = (builtins.attrValues {
inherit (pkgs) nixpkgs-fmt nixfmt nix-prefetch-scripts nix-review nix-tree;
}) ++ lib.optionals config.programs.helix.enable [ pkgs.nil ]
++ lib.optionals config.programs.kakoune.enable [ pkgs.rnix-lsp ];
home.packages =
(builtins.attrValues { inherit (pkgs) nixpkgs-fmt nixfmt nix-prefetch-scripts nixpkgs-review nix-tree; })
++ lib.optionals config.programs.helix.enable [ pkgs.nil ]
++ lib.optionals config.programs.kakoune.enable [ pkgs.rnix-lsp ];
programs.neovim.plugins = [ pkgs.vimPlugins.vim-nix ];
}

View file

@ -1,5 +1,5 @@
{
programs.exa = {
programs.eza = {
enable = true;
enableAliases = true;
};

View file

@ -90,39 +90,46 @@ let
};
in
{
programs.git = {
enable = true;
userName = "Filippo Berto";
userEmail = "berto.f@protonmail.com";
# signing = {
# key = "berto.f@protonmail.com";
# signByDefault = true;
# };
extraConfig = {
"add.interactive".useBuiltin = false;
commit.gpgSign = true;
core.editor = "hx";
# credential.helper = "git-credential-libsecret";
delta.side-by-side = true;
delta.line-numbers = true;
delta.navigate = true;
delta.wrap-max-lines = "unlimited";
diff.colorMoved = "default";
diff.guitool = "meld";
diff.tool = "meld";
# init.defaultBranch = "main";
merge.conflictstyle = "diff3";
merge.guitool = "meld";
merge.tool = "meld";
pull.rebase = true;
rebase.autoStash = true;
user.signingKey = "berto.f@protonmail.com";
programs = {
git = {
enable = true;
userName = "Filippo Berto";
userEmail = "berto.f@protonmail.com";
# signing = {
# key = "berto.f@protonmail.com";
# signByDefault = true;
# };
extraConfig = {
"add.interactive".useBuiltin = false;
commit.gpgSign = true;
core.editor = "hx";
# credential.helper = "git-credential-libsecret";
delta = {
line-numbers = true;
navigate = true;
side-by-side = true;
wrap-max-lines = "unlimited";
};
diff = {
colorMoved = "default";
guitool = "meld";
tool = "meld";
};
# init.defaultBranch = "main";
merge = {
conflictstyle = "diff3";
guitool = "meld";
tool = "meld";
};
pull.rebase = true;
rebase.autoStash = true;
user.signingKey = "berto.f@protonmail.com";
};
lfs.enable = true;
delta.enable = true;
};
lfs.enable = true;
delta.enable = true;
bash.shellAliases = shellAliases;
zsh.shellAliases = shellAliases;
};
programs.bash.shellAliases = shellAliases;
programs.zsh.shellAliases = shellAliases;
home.packages =
builtins.attrValues { inherit (pkgs) gh git-secret glab meld; };
home.packages = builtins.attrValues { inherit (pkgs) gh git-secret glab meld; };
}

View file

@ -1,145 +1,124 @@
{ pkgs, ... }: {
programs.bash.shellAliases = { x = "hx"; };
programs.zsh.shellAliases = { x = "hx"; };
home.sessionVariables = {
EDITOR = "hx";
VISUAL = "hx";
home = {
sessionVariables = { EDITOR = "hx"; VISUAL = "hx"; };
packages = builtins.attrValues {
inherit (pkgs) nil; # Nix language server
# inherit desktopItem;
};
};
home.packages = builtins.attrValues {
inherit (pkgs) nil; # Nix language server
# inherit desktopItem;
};
programs.helix = {
enable = true;
package = pkgs.unstable_pkgs.helix;
languages.language = [{
name = "nix";
auto-format = true;
}];
languages.language-server = {
nil.config.nil = {
formatting.command = [ "nixpkgs-fmt" ];
autoEvalInputs = true;
};
texlab.config.texlab = {
formatterLineLength = 0;
bibtexFormatter = "latexindent";
latexindent.modifyLineBreaks = false;
# chktex.onOpenAndSave = true;
chktex.onEdit = true;
};
yaml-language-server.config.yaml = {
keyOrdering = false;
schemas = {
kubernetes = "*.yaml";
"http://json.schemastore.org/github-workflow" = ".github/workflows/*";
"http://json.schemastore.org/github-action" = ".github/action.{yml,yaml}";
"http://json.schemastore.org/ansible-stable-2.9" = "roles/tasks/*.{yml,yaml}";
"http://json.schemastore.org/prettierrc" = ".prettierrc.{yml,yaml}";
"http://json.schemastore.org/kustomization" = "kustomization.{yml,yaml}";
"http://json.schemastore.org/ansible-playbook" = "*play*.{yml,yaml}";
"http://json.schemastore.org/chart" = "Chart.{yml,yaml}";
"https://json.schemastore.org/dependabot-v2" = ".github/dependabot.{yml,yaml}";
"https://gitlab.com/gitlab-org/gitlab/-/raw/master/app/assets/javascripts/editor/schema/ci.json" = "*gitlab-ci*.{yml,yaml}";
"https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/schemas/v3.1/schema.json" = "*api*.{yml,yaml}";
"https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json" = "*docker-compose*.{yml,yaml}";
"https://raw.githubusercontent.com/argoproj/argo-workflows/master/api/jsonschema/schema.json" = "*flow*.{yml,yaml}";
programs = {
bash.shellAliases = { x = "hx"; };
zsh.shellAliases = { x = "hx"; };
helix = {
enable = true;
package = pkgs.unstable_pkgs.helix;
languages.language = [{
name = "nix";
auto-format = true;
}];
languages.language-server = {
nil.config.nil = {
formatting.command = [ "nixpkgs-fmt" ];
autoEvalInputs = true;
};
texlab.config.texlab = {
formatterLineLength = 0;
bibtexFormatter = "latexindent";
latexindent.modifyLineBreaks = false;
# chktex.onOpenAndSave = true;
chktex.onEdit = true;
};
yaml-language-server.config.yaml = {
keyOrdering = false;
schemas = {
kubernetes = "*.yaml";
"http://json.schemastore.org/github-workflow" = ".github/workflows/*";
"http://json.schemastore.org/github-action" = ".github/action.{yml,yaml}";
"http://json.schemastore.org/ansible-stable-2.9" = "roles/tasks/*.{yml,yaml}";
"http://json.schemastore.org/prettierrc" = ".prettierrc.{yml,yaml}";
"http://json.schemastore.org/kustomization" = "kustomization.{yml,yaml}";
"http://json.schemastore.org/ansible-playbook" = "*play*.{yml,yaml}";
"http://json.schemastore.org/chart" = "Chart.{yml,yaml}";
"https://json.schemastore.org/dependabot-v2" = ".github/dependabot.{yml,yaml}";
"https://gitlab.com/gitlab-org/gitlab/-/raw/master/app/assets/javascripts/editor/schema/ci.json" = "*gitlab-ci*.{yml,yaml}";
"https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/schemas/v3.1/schema.json" = "*api*.{yml,yaml}";
"https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json" = "*docker-compose*.{yml,yaml}";
"https://raw.githubusercontent.com/argoproj/argo-workflows/master/api/jsonschema/schema.json" = "*flow*.{yml,yaml}";
};
};
};
};
settings = {
theme = "nightfox";
editor = {
lsp.display-messages = true;
lsp.display-inlay-hints = true;
scrolloff = 5;
soft-wrap.enable = true;
true-color = true;
};
keys.normal = {
"C-A-l" = ":format";
"A-r" = ":reload";
"C-A-r" = ":reload-all";
};
};
themes =
let
transparent = "none";
gray = "#665c54";
dark-gray = "#3c3836";
white = "#fbf1c7";
black = "#282828";
red = "#fb4934";
green = "#b8bb26";
yellow = "#fabd2f";
orange = "#fe8019";
blue = "#83a598";
magenta = "#d3869b";
cyan = "#8ec07c";
in
{
base16 = {
"ui.menu" = transparent;
"ui.menu.selected" = { modifiers = [ "reversed" ]; };
"ui.linenr" = {
fg = gray;
bg = dark-gray;
};
"ui.popup" = { modifiers = [ "reversed" ]; };
"ui.linenr.selected" = {
fg = white;
bg = black;
modifiers = [ "bold" ];
};
"ui.selection" = {
fg = black;
bg = blue;
};
"ui.selection.primary" = { modifiers = [ "reversed" ]; };
"comment" = { fg = gray; };
"ui.statusline" = {
fg = white;
bg = dark-gray;
};
"ui.statusline.inactive" = {
fg = dark-gray;
bg = white;
};
"ui.help" = {
fg = dark-gray;
bg = white;
};
"ui.cursor" = { modifiers = [ "reversed" ]; };
"variable" = red;
"variable.builtin" = orange;
"constant.numeric" = orange;
"constant" = orange;
"attributes" = yellow;
"type" = yellow;
"ui.cursor.match" = {
fg = yellow;
modifiers = [ "underlined" ];
};
"string" = green;
"variable.other.member" = red;
"constant.character.escape" = cyan;
"function" = blue;
"constructor" = blue;
"special" = blue;
"keyword" = magenta;
"label" = magenta;
"namespace" = blue;
"diff.plus" = green;
"diff.delta" = yellow;
"diff.minus" = red;
"diagnostic" = { modifiers = [ "underlined" ]; };
"ui.gutter" = { bg = black; };
"info" = blue;
"hint" = dark-gray;
"debug" = dark-gray;
"warning" = yellow;
"error" = red;
settings = {
theme = "nightfox";
editor = {
lsp.display-messages = true;
lsp.display-inlay-hints = true;
scrolloff = 5;
soft-wrap.enable = true;
true-color = true;
};
keys.normal = {
"C-A-l" = ":format";
"A-r" = ":reload";
"C-A-r" = ":reload-all";
};
};
themes =
let
transparent = "none";
gray = "#665c54";
dark-gray = "#3c3836";
white = "#fbf1c7";
black = "#282828";
red = "#fb4934";
green = "#b8bb26";
yellow = "#fabd2f";
orange = "#fe8019";
blue = "#83a598";
magenta = "#d3869b";
cyan = "#8ec07c";
in
{
base16 = {
"ui.menu" = transparent;
"ui.menu.selected" = { modifiers = [ "reversed" ]; };
"ui.linenr" = { fg = gray; bg = dark-gray; };
"ui.popup" = { modifiers = [ "reversed" ]; };
"ui.linenr.selected" = { fg = white; bg = black; modifiers = [ "bold" ]; };
"ui.selection" = { fg = black; bg = blue; };
"ui.selection.primary" = { modifiers = [ "reversed" ]; };
"comment" = { fg = gray; };
"ui.statusline" = { fg = white; bg = dark-gray; };
"ui.statusline.inactive" = { fg = dark-gray; bg = white; };
"ui.help" = { fg = dark-gray; bg = white; };
"ui.cursor" = { modifiers = [ "reversed" ]; };
"variable" = red;
"variable.builtin" = orange;
"constant.numeric" = orange;
"constant" = orange;
"attributes" = yellow;
"type" = yellow;
"ui.cursor.match" = { fg = yellow; modifiers = [ "underlined" ]; };
"string" = green;
"variable.other.member" = red;
"constant.character.escape" = cyan;
"function" = blue;
"constructor" = blue;
"special" = blue;
"keyword" = magenta;
"label" = magenta;
"namespace" = blue;
"diff.plus" = green;
"diff.delta" = yellow;
"diff.minus" = red;
"diagnostic" = { modifiers = [ "underlined" ]; };
"ui.gutter" = { bg = black; };
"info" = blue;
"hint" = dark-gray;
"debug" = dark-gray;
"warning" = yellow;
"error" = red;
};
};
};
};
}

View file

@ -63,207 +63,210 @@ let
in
{
programs.bash.shellAliases = { k = "kak"; };
programs.zsh.shellAliases = { k = "kak"; };
home.packages = packages;
programs.kakoune = {
enable = true;
config = {
colorScheme = "nord";
tabStop = 2;
indentWidth = 2;
alignWithTabs = true;
scrollOff = {
lines = 5;
columns = 3;
};
ui = {
setTitle = true;
changeColors = true;
enableMouse = true;
};
wrapLines = {
enable = true;
word = true;
};
numberLines = {
enable = true;
highlightCursor = true;
};
keyMappings = [
{
mode = "normal";
docstring = "Edit file";
key = "<c-e>";
effect = ":edit<space>";
}
{
mode = "user";
docstring = "Code actions";
key = "a";
effect = ":lsp-code-actions<ret>";
}
{
mode = "user";
docstring = "Comment block";
key = "b";
effect = ":comment-block<ret>";
}
{
mode = "user";
docstring = "Comment line";
key = "l";
effect = ":comment-line<ret>";
}
{
mode = "user";
docstring = "Copy to clipboard";
key = "y";
effect = "<a-|>${pkgs.xclip}/bin/xclip -i -selection clipboard<ret>";
}
{
mode = "user";
docstring = "Format code with formatter";
key = "f";
effect = ":format<ret>";
}
{
mode = "user";
docstring = "Format code with LSP";
key = "F";
effect = ":lsp-formatting-sync<ret>";
}
{
mode = "user";
docstring = "Jump to definition";
key = "d";
effect = ":lsp-definition<ret>";
}
{
mode = "user";
docstring = "Rename object";
key = "r";
effect = ":lsp-rename-prompt<ret>";
}
{
mode = "user";
docstring = "Jump to type definition";
key = "t";
effect = ":lsp-type-definition<ret>";
}
{
mode = "user";
docstring = "List project diagnostics";
key = "i";
effect = ":lsp-diagnostics<ret>";
}
{
mode = "user";
docstring = "Paste from clipboard (after)";
key = "P";
effect = "<a-!>${pkgs.xclip}/bin/xclip -selection clipboard -o<ret>";
}
{
mode = "user";
docstring = "Paste from clipboard (before)";
key = "p";
effect = "!${pkgs.xclip}/bin/xclip -selection clipboard -o<ret>";
}
{
mode = "user";
docstring = "Show hover info";
key = "q";
effect = ":lsp-hover<ret>";
}
{
mode = "user";
docstring = "Spellcheck English";
key = "S";
effect = ":spell en<ret>";
}
{
mode = "user";
docstring = "Spellcheck";
key = "s";
effect = ":spell ";
}
{
mode = "normal";
docstring = "Try next snippet placeholder";
key = "<c-n>";
effect = "<a-;>: insert-c-n<ret>";
}
# { mode = "normal"; docstring = "Search"; key = "/"; effect = "/(?i)"; }
# { mode = "normal"; docstring = "Reverse search"; key = "<a-/>"; effect = "<a-/>(?i)"; }
];
hooks = [
{
name = "BufCreate";
option = ".*";
commands = "editorconfig-load";
}
# { name = "ModuleLoaded"; option = "auto-pairs"; commands = "auto-pairs-enable"; }
{
name = "ModuleLoaded";
option = "powerline";
commands = "powerline-enable; powerline-start";
}
{
name = "BufSetOption";
option = "filetype=latex";
commands = "set-option buffer formatcmd latexindent";
}
{
name = "BufSetOption";
option = "filetype=python";
commands = "set-option buffer formatcmd 'black -'";
}
{
name = "BufSetOption";
option = "filetype=(markdown|html|json|yaml|css|scss|less)";
commands = "set-option buffer formatcmd prettier";
}
{
name = "BufSetOption";
option = "filetype=rust";
commands = "set-option buffer formatcmd 'rustfmt'";
}
{
name = "BufSetOption";
option = "filetype=sh";
commands = "set-option buffer formatcmd 'rustfmt'";
}
];
# TODO add more formatters from https://github.com/mawww/kakoune/wiki/Format
};
extraConfig = builtins.concatStringsSep "\n" [
"# Custom commands"
"add-highlighter global/ regex \\h+$ 0:Error # Highlight trailing spaces"
"eval %sh{kak-lsp --kakoune -s $kak_session}"
"lsp-enable"
''
def -hidden insert-c-n %{
try %{
lsp-snippets-select-next-placeholders
exec '<a-;>d'
} catch %{
exec -with-hooks '<c-n>'
programs = {
bash.shellAliases = { k = "kak"; };
zsh.shellAliases = { k = "kak"; };
kakoune = {
enable = true;
config = {
colorScheme = "nord";
tabStop = 2;
indentWidth = 2;
alignWithTabs = true;
scrollOff = {
lines = 5;
columns = 3;
};
ui = {
setTitle = true;
changeColors = true;
enableMouse = true;
};
wrapLines = {
enable = true;
word = true;
};
numberLines = {
enable = true;
highlightCursor = true;
};
keyMappings = [
{
mode = "normal";
docstring = "Edit file";
key = "<c-e>";
effect = ":edit<space>";
}
}
''
"require-module powerline"
"require-module connect-broot"
"require-module connect-lf"
"require-module connect-rofi"
];
plugins = with pkgs.kakounePlugins; [
prelude-kak
kak-lsp
auto-pairs-kak
powerline-kak
connect-kak
];
{
mode = "user";
docstring = "Code actions";
key = "a";
effect = ":lsp-code-actions<ret>";
}
{
mode = "user";
docstring = "Comment block";
key = "b";
effect = ":comment-block<ret>";
}
{
mode = "user";
docstring = "Comment line";
key = "l";
effect = ":comment-line<ret>";
}
{
mode = "user";
docstring = "Copy to clipboard";
key = "y";
effect = "<a-|>${pkgs.xclip}/bin/xclip -i -selection clipboard<ret>";
}
{
mode = "user";
docstring = "Format code with formatter";
key = "f";
effect = ":format<ret>";
}
{
mode = "user";
docstring = "Format code with LSP";
key = "F";
effect = ":lsp-formatting-sync<ret>";
}
{
mode = "user";
docstring = "Jump to definition";
key = "d";
effect = ":lsp-definition<ret>";
}
{
mode = "user";
docstring = "Rename object";
key = "r";
effect = ":lsp-rename-prompt<ret>";
}
{
mode = "user";
docstring = "Jump to type definition";
key = "t";
effect = ":lsp-type-definition<ret>";
}
{
mode = "user";
docstring = "List project diagnostics";
key = "i";
effect = ":lsp-diagnostics<ret>";
}
{
mode = "user";
docstring = "Paste from clipboard (after)";
key = "P";
effect = "<a-!>${pkgs.xclip}/bin/xclip -selection clipboard -o<ret>";
}
{
mode = "user";
docstring = "Paste from clipboard (before)";
key = "p";
effect = "!${pkgs.xclip}/bin/xclip -selection clipboard -o<ret>";
}
{
mode = "user";
docstring = "Show hover info";
key = "q";
effect = ":lsp-hover<ret>";
}
{
mode = "user";
docstring = "Spellcheck English";
key = "S";
effect = ":spell en<ret>";
}
{
mode = "user";
docstring = "Spellcheck";
key = "s";
effect = ":spell ";
}
{
mode = "normal";
docstring = "Try next snippet placeholder";
key = "<c-n>";
effect = "<a-;>: insert-c-n<ret>";
}
# { mode = "normal"; docstring = "Search"; key = "/"; effect = "/(?i)"; }
# { mode = "normal"; docstring = "Reverse search"; key = "<a-/>"; effect = "<a-/>(?i)"; }
];
hooks = [
{
name = "BufCreate";
option = ".*";
commands = "editorconfig-load";
}
# { name = "ModuleLoaded"; option = "auto-pairs"; commands = "auto-pairs-enable"; }
{
name = "ModuleLoaded";
option = "powerline";
commands = "powerline-enable; powerline-start";
}
{
name = "BufSetOption";
option = "filetype=latex";
commands = "set-option buffer formatcmd latexindent";
}
{
name = "BufSetOption";
option = "filetype=python";
commands = "set-option buffer formatcmd 'black -'";
}
{
name = "BufSetOption";
option = "filetype=(markdown|html|json|yaml|css|scss|less)";
commands = "set-option buffer formatcmd prettier";
}
{
name = "BufSetOption";
option = "filetype=rust";
commands = "set-option buffer formatcmd 'rustfmt'";
}
{
name = "BufSetOption";
option = "filetype=sh";
commands = "set-option buffer formatcmd 'rustfmt'";
}
];
# TODO add more formatters from https://github.com/mawww/kakoune/wiki/Format
};
extraConfig = builtins.concatStringsSep "\n" [
"# Custom commands"
"add-highlighter global/ regex \\h+$ 0:Error # Highlight trailing spaces"
"eval %sh{kak-lsp --kakoune -s $kak_session}"
"lsp-enable"
''
def -hidden insert-c-n %{
try %{
lsp-snippets-select-next-placeholders
exec '<a-;>d'
} catch %{
exec -with-hooks '<c-n>'
}
}
''
"require-module powerline"
"require-module connect-broot"
"require-module connect-lf"
"require-module connect-rofi"
];
plugins = with pkgs.kakounePlugins; [
prelude-kak
kak-lsp
auto-pairs-kak
powerline-kak
connect-kak
];
};
};
home.packages = packages;
# THEME FILE
xdg.configFile."kak/colors/nord.kak".text = themeBuilder

View file

@ -1 +1 @@
{ pkgs, ... }: { home.packages = [ pkgs.kicad-with-packages3d ]; }
{ pkgs, ... }: { home.packages = [ pkgs.kicad ]; }

View file

@ -17,7 +17,8 @@ in
{
home.packages = builtins.attrValues {
inherit (pkgs)
ardour breeze-icons carla mamba mixxx rnnoise
ardour breeze-icons carla mixxx rnnoise
#mamba
# zrythm
# Plugins

View file

@ -5,7 +5,7 @@
programs.zsh = {
enable = true;
autocd = true;
enableSyntaxHighlighting = true;
syntaxHighlighting.enable = true;
plugins = [ ];
initExtraBeforeCompInit = ''
zstyle ':completion:*' menu select

View file

@ -1,7 +1,7 @@
{ config, ... }: {
programs.hyprland = {
enable = true;
nvidiaPatches = builtins.elem "nvidia" config.services.xserver.videoDrivers;
enableNvidiaPatches = builtins.elem "nvidia" config.services.xserver.videoDrivers;
xwayland.enable = true;
};

View file

@ -17,21 +17,23 @@
hostName = "my-nextcloud.bertof.net";
maxUploadSize = "24G";
caching.apcu = true;
config.trustedProxies = [ "172.23.4.159" "fd80:56c2:e21c:f9c7:5399:93be:21a9:9fa0" "fe80::3079:d8ff:feb5:7d62" ];
config.extraTrustedDomains = [ config.services.nextcloud.hostName "freya.local" ];
config.adminpassFile = config.age.secrets.nextcloud_admin_secret.path;
config.overwriteProtocol = "https";
config.objectstore.s3 = {
enable = true;
bucket = "nextcloud-storage";
autocreate = false;
key = "GK622e38479552cbbbba48fd04";
secretFile = config.age.secrets.nextcloud_bucket_secret.path;
hostname = "localhost";
port = 3900;
useSsl = false;
region = "garage";
usePathStyle = true;
config = {
trustedProxies = [ "172.23.4.159" "fd80:56c2:e21c:f9c7:5399:93be:21a9:9fa0" "fe80::3079:d8ff:feb5:7d62" ];
extraTrustedDomains = [ config.services.nextcloud.hostName "freya.local" ];
adminpassFile = config.age.secrets.nextcloud_admin_secret.path;
overwriteProtocol = "https";
objectstore.s3 = {
enable = true;
bucket = "nextcloud-storage";
autocreate = false;
key = "GK622e38479552cbbbba48fd04";
secretFile = config.age.secrets.nextcloud_bucket_secret.path;
hostname = "localhost";
port = 3900;
useSsl = false;
region = "garage";
usePathStyle = true;
};
};
};

View file

@ -1,43 +0,0 @@
{ config, lib, ... }:
let
user_keys = user:
lib.optionals (builtins.hasAttr "bertof" config.users.users)
config.users.users.${user}.openssh.authorizedKeys.keys;
in
{
# nix.buildMachines
nix.distributedBuilds = true;
nix.sshServe = {
enable = true;
keys = user_keys "bertof";
write = true;
protocol = "ssh-ng";
};
services.nix-serve = {
enable = true;
openFirewall = true;
secretKeyFile = "/etc/nix/serve";
};
nix.settings = {
trusted-users = [ "root" "nix-ssh" "@wheel" ];
trusted-public-keys = [
"odin:ukZZy//P0nBAcy4ycX8eYCByRJFOfJRlfW4sYjP/rGE="
"loki:jVAH1bQugXdQ1w29lvVknyPqWwmAn7WhjKf7z4t+q7E="
];
substituters = [
# "https://192.168.0.10"
# "https://192.168.0.100"
# "ssh-ng://loki.local"
# "ssh-ng://odin.local"
# "ssh-ng://192.168.0.10"
# "ssh-ng://192.168.0.100"
];
# trusted-substituters = [
# ];
};
}