chore: format code with alejandra

This commit is contained in:
Khaïs COLIN 2024-09-18 12:03:23 +02:00
parent 5576fba883
commit 144c46a984
13 changed files with 164 additions and 131 deletions

View file

@ -1,5 +1,8 @@
{ pkgs, pkgs-unstable, ... }:
{
pkgs,
pkgs-unstable,
...
}: {
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
@ -8,8 +11,8 @@
networking.networkmanager.enable = true;
# setup magicdns for tailscale
networking.nameservers = [ "100.100.100.100" "1.1.1.1" "8.8.8.8" ];
networking.search = [ "hummingbird-stork.ts.net" ];
networking.nameservers = ["100.100.100.100" "1.1.1.1" "8.8.8.8"];
networking.search = ["hummingbird-stork.ts.net"];
# Set your time zone.
time.timeZone = "Europe/Paris";
@ -81,7 +84,7 @@
initialPassword = "asunarovow";
isNormalUser = true;
description = "Khaïs COLIN";
extraGroups = [ "networkmanager" "wheel" "podman" "libvirtd" "music" ];
extraGroups = ["networkmanager" "wheel" "podman" "libvirtd" "music"];
shell = pkgs.zsh;
};
# access to /pile/Music
@ -91,7 +94,7 @@
createHome = true;
isNormalUser = true;
description = "Guest Account";
extraGroups = [ "networkmanager" ];
extraGroups = ["networkmanager"];
shell = pkgs.zsh;
packages = with pkgs; [
mpv
@ -129,14 +132,18 @@
tailscale
wluma
# man pages
man-pages man-pages-posix
man-pages
man-pages-posix
# kde
kdePackages.kate kdePackages.plasma-workspace kdePackages.dolphin
kdePackages.kate
kdePackages.plasma-workspace
kdePackages.dolphin
# fix kde apps having no icons
kdePackages.qtsvg
thunderbird-128
# for screen sharing
xdg-desktop-portal xdg-desktop-portal-kde
xdg-desktop-portal
xdg-desktop-portal-kde
];
# set user environment variables
@ -169,9 +176,9 @@
];
fontconfig = {
defaultFonts = {
monospace = [ "VictorMono NF Medium" ];
sansSerif = [ "IBM Plex Sans" ];
serif = [ "CMU Serif" ];
monospace = ["VictorMono NF Medium"];
sansSerif = ["IBM Plex Sans"];
serif = ["CMU Serif"];
};
};
};
@ -179,20 +186,20 @@
services.tailscale = {
enable = true;
useRoutingFeatures = "both";
extraUpFlags = [ "--ssh" ];
extraUpFlags = ["--ssh"];
};
# enable wluma for automatic brightness adjustment
systemd.user.services.wluma = {
enable = true;
description = "Adjusting screen brightness based on screen contents and amount of ambient light";
after = [ "graphical-session.target" ];
partOf = [ "graphical-session.target" ];
after = ["graphical-session.target"];
partOf = ["graphical-session.target"];
serviceConfig = {
ExecStart = "${pkgs.wluma}/bin/wluma";
Restart = "always";
};
wantedBy = [ "graphical-session.target" ];
wantedBy = ["graphical-session.target"];
};
programs.gnupg.agent = {
@ -224,9 +231,10 @@
# enable VAAPI and intel QSV
# enable vaapi
nixpkgs.config.packageOverrides = pkgs: {
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
vaapiIntel = pkgs.vaapiIntel.override {enableHybridCodec = true;};
};
hardware.opengl = { # hardware.graphics in unstable
hardware.opengl = {
# hardware.graphics in unstable
enable = true;
extraPackages = with pkgs; [
intel-media-driver
@ -257,7 +265,7 @@
system.stateVersion = "24.05"; # Did you read the comment?
# flakes
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.settings.experimental-features = ["nix-command" "flakes"];
# automatically collect garbage
nix.gc = {

View file

@ -36,17 +36,14 @@
outputs = {
nixpkgs,
nixpkgs-unstable,
home-manager,
stylix,
nixvim,
river-shifttags,
breezex-cursor,
nixos-06cb-009a-fingerprint-sensor,
... }:
let
...
}: let
system = "x86_64-linux";
home-manager-args = {
nixvim = nixvim.packages.${system}.default;
@ -54,14 +51,14 @@
breezex-cursor = breezex-cursor.packages.${system}.default;
kitty-unstable = nixpkgs-unstable.legacyPackages.${system}.kitty;
};
in
{
in {
nixosConfigurations.void = nixpkgs.lib.nixosSystem {
inherit system;
modules = [
./void.nix
home-manager.nixosModules.home-manager {
home-manager.nixosModules.home-manager
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
@ -82,7 +79,8 @@
modules = [
./t470.nix
home-manager.nixosModules.home-manager {
home-manager.nixosModules.home-manager
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;

View file

@ -1,30 +1,33 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
config,
lib,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "usb_storage" "sd_mod"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = [];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/25f87dfd-b7bb-475a-ab05-732a5e2026d9";
fileSystems."/" = {
device = "/dev/disk/by-uuid/25f87dfd-b7bb-475a-ab05-732a5e2026d9";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/929D-FA32";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/929D-FA32";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
options = ["fmask=0022" "dmask=0022"];
};
swapDevices = [ ];
swapDevices = [];
# 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

View file

@ -1,35 +1,39 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" "sr_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" "sr_mod"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = [];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/29ecd09f-8852-4582-a78a-ec1aa1e7b2b9";
fileSystems."/" = {
device = "/dev/disk/by-uuid/29ecd09f-8852-4582-a78a-ec1aa1e7b2b9";
fsType = "ext4";
};
fileSystems."/pile" =
{ device = "/dev/disk/by-uuid/51ff5791-f197-4dfd-850a-00a8726ddb31";
fileSystems."/pile" = {
device = "/dev/disk/by-uuid/51ff5791-f197-4dfd-850a-00a8726ddb31";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/E135-9F42";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/E135-9F42";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
options = ["fmask=0022" "dmask=0022"];
};
swapDevices = [ ];
swapDevices = [];
# 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

View file

@ -1,4 +1,10 @@
{ pkgs, nixvim, river-shifttags, kitty-unstable, ... }: let
{
pkgs,
nixvim,
river-shifttags,
kitty-unstable,
...
}: let
username = "khais";
in {
imports = [
@ -9,7 +15,15 @@ in {
home = {
packages = with pkgs; [
# system tools & bragging
htop neofetch ripgrep usbutils wget curl ncdu trashy unzip
htop
neofetch
ripgrep
usbutils
wget
curl
ncdu
trashy
unzip
# remote working
remmina
# communication
@ -22,13 +36,18 @@ in {
# https://superuser.com/a/1803183
wl-clipboard
# wm river utils
playerctl brightnessctl river-shifttags wlr-randr
playerctl
brightnessctl
river-shifttags
wlr-randr
# dev tools
gitu lnav
gitu
lnav
# music
cmus
# music collection tools
picard kid3
picard
kid3
# audio
audacity
# video
@ -36,14 +55,16 @@ in {
# file sending
magic-wormhole
# drawing apps
krita inkscape
krita
inkscape
# office apps
libreoffice-fresh
hunspellDicts.fr-moderne
hunspellDicts.de-de
hunspellDicts.en-us
# nixos tools
nh nix-output-monitor
nh
nix-output-monitor
];
file = {
@ -87,8 +108,8 @@ in {
};
ui = {
editor = "nvim";
diff-editor = [ "nvim" "-c" "DiffEditor $left $right $output" ];
merge-editor = [ "nvim" "-c" "DiffEditor $left $right $output" ];
diff-editor = ["nvim" "-c" "DiffEditor $left $right $output"];
merge-editor = ["nvim" "-c" "DiffEditor $left $right $output"];
};
};
};
@ -163,7 +184,7 @@ in {
incremental = false;
write = true;
};
plugins = [ "lyrics" "web" "info" "edit" ];
plugins = ["lyrics" "web" "info" "edit"];
};
};

View file

@ -1,6 +1,5 @@
self: super:
{
self: super: {
cacert = super.cacert.override {
extraCertificateFiles = [ ../certs/myCA.pem ];
extraCertificateFiles = [../certs/myCA.pem];
};
}

View file

@ -1,8 +1,7 @@
let
snipeit-fqdn = "snipe-it.nixos.local";
in
{ pkgs, ... }:
{
{pkgs, ...}: {
services.snipe-it = {
enable = true;
appKeyFile = "/etc/nixos/secrets/snipe-it/appkey";
@ -29,6 +28,6 @@ in
};
}
];
ensureDatabases = [ "snipeit" ];
ensureDatabases = ["snipeit"];
};
}
}

View file

@ -1,8 +1,6 @@
{ pkgs, ... }:
let
{pkgs, ...}: let
sourcehut-fqdn = "sourcehut.nixos.local";
in
{
in {
systemd.services.gitsrht = {
environment = {
# make python's requests package use the global ca-certificates store, which will contain my own CA cert

View file

@ -1,5 +1,8 @@
{ breezex-cursor, pkgs, ... }:
{
breezex-cursor,
pkgs,
...
}: {
stylix = {
enable = true;
image = ./wallpapers/nixos_inspector_tan.png;

View file

@ -1,9 +1,11 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ pkgs, lib, ... }:
{
pkgs,
lib,
...
}: {
imports = [
./hardware-configuration-t470.nix
./common.nix
@ -19,7 +21,7 @@
options = let
# prevent hanging when network is not reachable
automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s";
in [ "${automount_opts},credentials=/etc/nixos/secrets/books.smb" ];
in ["${automount_opts},credentials=/etc/nixos/secrets/books.smb"];
};
# scanner drop point
@ -30,7 +32,7 @@
writeEnable = true;
chrootlocalUser = true;
userlistEnable = true;
userlist = [ "paperless-upload" ];
userlist = ["paperless-upload"];
userlistDeny = false;
extraConfig = ''
log_ftp_protocol=YES
@ -44,7 +46,7 @@
allow_writeable_chroot=YES
'';
};
networking.firewall.allowedTCPPorts = [ 21 ];
networking.firewall.allowedTCPPorts = [21];
networking.firewall.allowedTCPPortRanges = [
{
from = 51000;
@ -56,14 +58,14 @@
isNormalUser = true;
group = "paperless-upload";
};
system.activationScripts.makeFtpDirectory = lib.stringAfter [ "var" ] ''
system.activationScripts.makeFtpDirectory = lib.stringAfter ["var"] ''
mkdir -m 775 -p /var/lib/ftp
chown root:root /var/lib/ftp
mkdir -m 700 -p /var/lib/ftp/paperless-upload
chown paperless-upload:paperless-upload /var/lib/ftp/paperless-upload
'';
systemd.services.uploadPaperlessDocuments = {
path = [ pkgs.openssh pkgs.inotify-tools ];
path = [pkgs.openssh pkgs.inotify-tools];
serviceConfig = {
User = "paperless-upload";
StandardOutput = "journal+console";
@ -80,7 +82,7 @@
pathConfig = {
PathChanged = "/var/lib/ftp/paperless-upload/";
};
wantedBy = [ "multi-user.target" ];
wantedBy = ["multi-user.target"];
};
# fingerprint sensor setup

View file

@ -1,7 +1,6 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{
imports = [
./hardware-configuration-void.nix

View file

@ -1,7 +1,6 @@
let
lock-command = "swaylock";
in
{
in {
wayland.windowManager.river = {
enable = true;
extraConfig = ''

View file

@ -56,9 +56,9 @@
];
"river/tags" = {
num-tags = 10;
tag-labels = [ "1" "2" "3" "4" "5" "6" "7" "8" "9" "0" ];
set-tags = [ 1 2 4 8 16 32 64 128 256 512 ];
toogle-tags = [ 1 2 4 8 16 32 64 128 256 512 ];
tag-labels = ["1" "2" "3" "4" "5" "6" "7" "8" "9" "0"];
set-tags = [1 2 4 8 16 32 64 128 256 512];
toogle-tags = [1 2 4 8 16 32 64 128 256 512];
};
"mpris" = {
interval = 1;