format nix with alejandra

This commit is contained in:
js0ny 2025-10-24 22:41:27 +01:00
parent e1cc141ce7
commit 2b498c9fd3
37 changed files with 183 additions and 177 deletions

View file

@ -88,5 +88,17 @@
"telemetry": {
"diagnostics": false,
"metrics": false
},
"languages": {
"Nix": {
"formatter": {
"external": {
"command": "alejandra"
}
},
"completions": {
"lsp_insert_mode": "replace"
}
}
}
}

View file

@ -5,8 +5,7 @@
pkgs,
nix-flatpak,
...
}:
{
}: {
imports = [
# impure build
/etc/nixos/hardware-configuration.nix

View file

@ -1,6 +1,8 @@
{ config, pkgs, ...}:
{
config,
pkgs,
...
}: {
homebrew = {
enable = true;
brewPrefix = "/opt/homebrew/bin";
@ -65,5 +67,4 @@
"font-maple-mono-nf-cn"
];
};
}

View file

@ -1,5 +1,4 @@
{pkgs, ...}:
{
{pkgs, ...}: {
imports = [
./packages.nix
./brew.nix

View file

@ -1,6 +1,8 @@
{ config, pkgs, ... }:
{
config,
pkgs,
...
}: {
# Managed by Determinate
nix.enable = false;
system.stateVersion = 6;
@ -51,5 +53,4 @@
];
programs.zsh.enable = true;
}

View file

@ -1,6 +1,5 @@
# ~/.config/nixcfgs/hosts/zephyrus/default.nix
{ pkgs, ... }:
{
{pkgs, ...}: {
imports = [
# Host-specific configs
./asus.nix
@ -23,6 +22,7 @@
# desktop environment and display manager
../../modules/nixos/desktop/dm/gdm.nix
../../modules/nixos/desktop/de/gnome.nix
../../modules/nixos/desktop/de/niri.nix
# desktop programs
../../modules/nixos/programs/chromium.nix

View file

@ -1,11 +1,15 @@
# 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 = ["nvme" "xhci_pci" "thunderbolt" "usbhid" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"];
@ -13,37 +17,36 @@
boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/ed71c463-1cf6-449d-9aa8-ed715fe7ad74";
fileSystems."/" = {
device = "/dev/disk/by-uuid/ed71c463-1cf6-449d-9aa8-ed715fe7ad74";
fsType = "btrfs";
options = ["subvol=@"];
};
fileSystems."/home" =
{ device = "/dev/disk/by-uuid/ed71c463-1cf6-449d-9aa8-ed715fe7ad74";
fileSystems."/home" = {
device = "/dev/disk/by-uuid/ed71c463-1cf6-449d-9aa8-ed715fe7ad74";
fsType = "btrfs";
options = ["subvol=@home"];
};
fileSystems."/swap" =
{ device = "/dev/disk/by-uuid/ed71c463-1cf6-449d-9aa8-ed715fe7ad74";
fileSystems."/swap" = {
device = "/dev/disk/by-uuid/ed71c463-1cf6-449d-9aa8-ed715fe7ad74";
fsType = "btrfs";
options = ["subvol=@swap"];
};
fileSystems."/nix" =
{ device = "/dev/disk/by-uuid/ed71c463-1cf6-449d-9aa8-ed715fe7ad74";
fileSystems."/nix" = {
device = "/dev/disk/by-uuid/ed71c463-1cf6-449d-9aa8-ed715fe7ad74";
fsType = "btrfs";
options = ["subvol=@nix"];
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/0BDA-B0A4";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/0BDA-B0A4";
fsType = "vfat";
options = ["fmask=0022" "dmask=0022"];
};
swapDevices = [];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking

View file

@ -1,6 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
environment.systemPackages = with pkgs; [
keyd
];

View file

@ -1,12 +1,14 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
{ config, lib, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
config,
lib,
pkgs,
...
}: {
imports = [
# Include the results of the hardware scan.
../common/nixos.nix
../common/desktop-linux.nix
../common/packages-fonts.nix
@ -20,10 +22,8 @@
../common/docker.nix
];
networking.hostName = "zp"; # Define your hostname.
# This option defines the first version of NixOS you have installed on this particular machine,
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
#
@ -42,6 +42,4 @@
#
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
system.stateVersion = "25.05"; # Did you read the comment?
}

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
home.packages = with pkgs; [
luajit
lua-language-server

View file

@ -8,4 +8,3 @@
enableZshIntegration = true;
};
}

View file

@ -1,6 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
home.packages = with pkgs; [
freerdp
winboat

View file

@ -3,7 +3,6 @@
pkgs,
...
}: {
# Select internationalisation properties.
i18n = {
defaultLocale = "en_GB.UTF-8";

View file

@ -5,4 +5,5 @@
korganizer
kdepim-addons
];
services.xserver.desktopManager.cinnamon.enable = true;
}

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
programs.niri.enable = true;
environment.systemPackages = with pkgs; [
waybar

View file

@ -1,6 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
services.displayManager.gdm = {
enable = true;
wayland = true;

View file

@ -1,5 +1,4 @@
{pkgs, ...}:
# See https://www.reddit.com/r/NixOS/comments/1kcj34p/how_to_apply_this_sddm_theme_on_nixos/
let
custom-sddm-astronaut = pkgs.sddm-astronaut.override {
@ -9,7 +8,6 @@ let
# Font = "M+1 Nerd Font";
#};
};
in {
# Enable the KDE Plasma Desktop Environment.
services.displayManager.sddm = {
@ -30,5 +28,4 @@ in {
custom-sddm-astronaut
kdePackages.qtmultimedia
];
}

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;

View file

@ -1,6 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
boot.extraModprobeConfig = ''
blacklist nouveau
options nouveau modeset=0

View file

@ -8,4 +8,3 @@
enable32Bit = true;
};
}

View file

@ -1,5 +1,4 @@
{ ... }:
{
{...}: {
programs.chromium = {
enable = true;
homepageLocation = "https://duckduckgo.com";

View file

@ -1,5 +1,8 @@
{ pkgs, inputs, ... }:
{
pkgs,
inputs,
...
}: {
virtualisation.waydroid.enable = true;
nixpkgs.overlays = [
inputs.nur.overlays.default

View file

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

View file

@ -1,11 +1,12 @@
# ~/.config/nixcfgs/users/js0ny/default.nix
{ pkgs, ... }:
let
{pkgs, ...}: let
username = "js0ny";
in
{
in {
home.username = username;
home.homeDirectory = if pkgs.stdenv.isDarwin then "/Users/${username}" else "/home/${username}";
home.homeDirectory =
if pkgs.stdenv.isDarwin
then "/Users/${username}"
else "/home/${username}";
home.packages = with pkgs; [
home-manager

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
let
{pkgs, ...}: let
my-catppuccin-kde = pkgs.catppuccin-kde.override {
flavour = [
"mocha"
@ -12,9 +11,7 @@ let
accents = ["pink"];
variant = "mocha";
};
in
{
in {
home.packages = with pkgs; [
catppuccin
my-catppuccin-gtk

View file

@ -1,6 +1,5 @@
# ~/.config/nix-config/common/packages-headless.nix
{ pkgs, ... }:
{
{pkgs, ...}: {
home.packages = with pkgs; [
rclone
age

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
home.packages = with pkgs; [
# Terminal Emulator
ghostty # default

View file

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

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
home.sessionVariables = {
QT_STYLE_OVERRIDE = "adwaita";
};

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
home.packages = with pkgs.gnomeExtensions; [
paperwm
];
@ -50,8 +49,8 @@
center-vertically = [""];
drift-left = [""];
drift-right = [""];
move-up-workspace = [ "<Alt><Super>k" ];
move-down-workspace = [ "<Alt><Super>j" ];
move-up-workspace = ["<Control><Super>k"];
move-down-workspace = ["<Control><Super>j"];
};
};
}

View file

@ -106,6 +106,7 @@
"org.kde.plasma.pager"
"org.kde.plasma.windowlist"
"org.kde.plasma.marginsseparator"
"org.kde.plasma.systemmonitor.memory"
];
opacity = "translucent";
hiding = "none";

View file

@ -0,0 +1,19 @@
# TODO
{pkgs}: let
dictBz2 = [
{
url = "http://download.huzheng.org/zh_CN/stardict-langdao-ec-gb-2.4.2.tar.bz2";
sha256 = "68adfd6348418725b1810b5aeda2506ce44ddbc1ad99f2f68f6ba135cd3bf03c";
}
];
fetchedArchives = map (spec:
pkgs.fetchurl {
url = spec.url;
sha256 = spec.sha256;
})
dictBz2;
in {
home.packages = with pkgs; [
sdcv
];
}

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
programs.zed-editor = {
enable = true;
extensions = [

View file

@ -1,5 +1,4 @@
{...}:
{
{...}: {
imports = [
./default.nix
./programs/shell.nix
@ -14,5 +13,3 @@
home.stateVersion = "25.05";
}

View file

@ -1,6 +1,5 @@
# ~/.config/nixcfgs/users/js0ny/default.nix
{ ... }:
{
{...}: {
imports = [
# General config
./default.nix