Format nix files

This commit is contained in:
Zeph Levy 2026-01-23 12:04:59 +01:00
parent 45b85d0452
commit f2fd2be328
30 changed files with 329 additions and 231 deletions

View file

@ -14,21 +14,27 @@
};
outputs =
{ nixpkgs, nixpkgs-stable, home-manager, nixos-hardware, ... }:
{
nixpkgs,
nixpkgs-stable,
home-manager,
nixos-hardware,
...
}:
let
system = "x86_64-linux";
in
{
nixosConfigurations = {
TARS = nixpkgs.lib.nixosSystem {
inherit system;
modules = [
./nixos/configuration.nix
nixos-hardware.nixosModules.framework-amd-ai-300-series
];
specialArgs = {
pkgs-stable = nixpkgs-stable.legacyPackages.${system};
};
inherit system;
modules = [
./nixos/configuration.nix
nixos-hardware.nixosModules.framework-amd-ai-300-series
];
specialArgs = {
pkgs-stable = nixpkgs-stable.legacyPackages.${system};
};
};
};

View file

@ -1,4 +1,10 @@
{ config, pkgs, lib, ... }: {
{
config,
pkgs,
lib,
...
}:
{
imports = [
./modules/bundle.nix
];

View file

@ -1,14 +1,15 @@
{ config, pkgs, ...}: {
{ config, pkgs, ... }:
{
# This is to launch fish interactively, to avoid problems
# with fish's non-POSIX compliance
programs.bash = {
enable = true;
initExtra = ''
if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]]
then
shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=""
exec ${pkgs.fish}/bin/fish $LOGIN_OPTION
fi
'';
};
enable = true;
initExtra = ''
if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]]
then
shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=""
exec ${pkgs.fish}/bin/fish $LOGIN_OPTION
fi
'';
};
}

View file

@ -1,4 +1,5 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
# This file contains all the desktop entries that I don't want in my app finder,
# either because I open them with shortcuts or because I never use them (but they come with an app)
xdg.desktopEntries = {
@ -38,7 +39,6 @@
terminal = false;
};
# Fixes missing icons
# TODO: Doesn't work
# "protonvpn-app" = {
@ -49,5 +49,5 @@
# name = "Sioyek";
# icon = "${pkgs.sioyek}/share/pixmaps/sioyek-linux-logo.png";
# };
};
};
}

View file

@ -1,18 +1,23 @@
{ config, pkgs, ... }: {
{ config, pkgs, ... }:
{
programs.fish = {
enable = true;
interactiveShellInit = ''
set fish_greeting
starship init fish | source
'';
shellAliases = let flakeDir = "~/nix"; in {
rb = "sudo nixos-rebuild switch --flake ${flakeDir}";
upg = "sudo nix flake update --flake ${flakeDir} && sudo nixos-rebuild switch --flake ${flakeDir}";
hms = "home-manager switch --flake ${flakeDir}";
ed = "hx ${flakeDir}";
ff = "fastfetch -c neofetch";
ls = "lsd";
};
shellAliases =
let
flakeDir = "~/nix";
in
{
rb = "sudo nixos-rebuild switch --flake ${flakeDir}";
upg = "sudo nix flake update --flake ${flakeDir} && sudo nixos-rebuild switch --flake ${flakeDir}";
hms = "home-manager switch --flake ${flakeDir}";
ed = "hx ${flakeDir}";
ff = "fastfetch -c neofetch";
ls = "lsd";
};
shellAbbrs = {
dcu = "podman-compose up";
dcub = "podman-compose up --build";

View file

@ -1,4 +1,5 @@
{ config, pkgs, ... }: {
{ config, pkgs, ... }:
{
programs.foot.enable = true;
programs.foot.settings = {
main = {
@ -10,24 +11,24 @@
alpha = 0.85;
# Gruvbox; copied from https://codeberg.org/dnkl/foot/src/branch/master/themes/gruvbox-dark
background="282828";
foreground="ebdbb2";
regular0="282828";
regular1="cc241d";
regular2="98971a";
regular3="d79921";
regular4="458588";
regular5="b16286";
regular6="689d6a";
regular7="a89984";
bright0="928374";
bright1="fb4934";
bright2="b8bb26";
bright3="fabd2f";
bright4="83a598";
bright5="d3869b";
bright6="8ec07c";
bright7="ebdbb2";
background = "282828";
foreground = "ebdbb2";
regular0 = "282828";
regular1 = "cc241d";
regular2 = "98971a";
regular3 = "d79921";
regular4 = "458588";
regular5 = "b16286";
regular6 = "689d6a";
regular7 = "a89984";
bright0 = "928374";
bright1 = "fb4934";
bright2 = "b8bb26";
bright3 = "fabd2f";
bright4 = "83a598";
bright5 = "d3869b";
bright6 = "8ec07c";
bright7 = "ebdbb2";
};
};
}

View file

@ -1,4 +1,5 @@
{ config, pkgs, ... }: {
{ config, pkgs, ... }:
{
programs.fuzzel.enable = true;
programs.fuzzel.settings = {
main = {

View file

@ -1,4 +1,5 @@
{ config, pkgs, ... }: {
{ config, pkgs, ... }:
{
programs.git = {
enable = true;
settings = {

View file

@ -1,4 +1,5 @@
{ config, pkgs, ...}: {
{ config, pkgs, ... }:
{
programs.helix.enable = true;
programs.helix.settings = {
# theme = "everforest_dark";
@ -40,8 +41,17 @@
};
statusline = {
left = [ "mode" "spinner" "diagnostics" ];
center = [ "file-name" "separator" "version-control" "separator"];
left = [
"mode"
"spinner"
"diagnostics"
];
center = [
"file-name"
"separator"
"version-control"
"separator"
];
separator = "";
mode.normal = "NORMAL";
mode.insert = "INSERT";
@ -62,7 +72,10 @@
keys = {
normal = {
l = "insert_mode";
esc = ["collapse_selection" "keep_primary_selection"];
esc = [
"collapse_selection"
"keep_primary_selection"
];
n = "move_char_left";
o = "move_char_right";
e = "move_line_down";

View file

@ -1,3 +1,5 @@
{ config, pkgs, ... }: {
home.file.".icons/default".source = "${pkgs.capitaine-cursors}/share/icons/\"Capitaine Cursors (Gruvbox)\"";
{ config, pkgs, ... }:
{
home.file.".icons/default".source =
"${pkgs.capitaine-cursors}/share/icons/\"Capitaine Cursors (Gruvbox)\"";
}

View file

@ -1,13 +1,15 @@
{ config, pkgs, ... }: {
{ config, pkgs, ... }:
{
wayland.windowManager.hyprland.enable = true;
wayland.windowManager.hyprland.settings = {
exec-once = [
"hyprpaper" "systemctl --user start hyprpolkitagent"
"hyprctl setcursor \"Capitaine Cursors (Gruvbox)\" 24"
"swayosd-server"
"hyprsunset"
];
exec-once = [
"hyprpaper"
"systemctl --user start hyprpolkitagent"
"hyprctl setcursor \"Capitaine Cursors (Gruvbox)\" 24"
"swayosd-server"
"hyprsunset"
];
monitor = [
"eDP-1,2880x1920@120,auto,auto"
@ -87,7 +89,6 @@
preserve_split = true;
};
misc = {
force_default_wallpaper = 0;
disable_hyprland_logo = false;
@ -139,7 +140,6 @@
"$mainMod SHIFT, M, layoutmsg, swapnext"
"$mainMod SHIFT, K, layoutmsg, swapprev"
"$mainMod, 1, workspace, 1"
"$mainMod, 2, workspace, 2"
"$mainMod, 3, workspace, 3"
@ -158,7 +158,6 @@
"$mainMod SHIFT, 3, movetoworkspace, 3"
"$mainMod SHIFT, 4, movetoworkspace, 4"
];
bindel = [
@ -177,7 +176,6 @@
", XF86AudioPrev, exec, playerctl previous"
];
# windowrule = [
# "suppressevent maximize, class:.*"
# "nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0"

View file

@ -1,4 +1,5 @@
{ config, pkgs, ... }: {
{ config, pkgs, ... }:
{
services.hyprpaper.enable = true;
services.hyprpaper.settings = {
wallpaper = [

View file

@ -5,16 +5,16 @@
enable = true;
theme = {
package = pkgs.gruvbox-gtk-theme;
name = "Gruvbox-Dark";
name = "Gruvbox-Dark";
};
iconTheme = {
package = pkgs.adwaita-icon-theme;
name = "Adwaita";
name = "Adwaita";
};
cursorTheme = {
package = pkgs.capitaine-cursors;
name = "Capitaine Cursors (Gruvbox)";
size = 24;
name = "Capitaine Cursors (Gruvbox)";
size = 24;
};
};
@ -25,17 +25,17 @@
dconf.settings = {
"org/gnome/desktop/interface" = {
gtk-theme = "Gruvbox-Dark";
icon-theme = "Adwaita";
gtk-theme = "Gruvbox-Dark";
icon-theme = "Adwaita";
cursor-theme = "Capitaine Cursors (Gruvbox)";
cursor-size = 24;
cursor-size = 24;
color-scheme = "prefer-dark";
};
};
home.sessionVariables = {
XCURSOR_THEME = "Capitaine Cursors (Gruvbox)";
XCURSOR_SIZE = "24";
XCURSOR_SIZE = "24";
HYPRCURSOR_SIZE = "24";
GTK_THEME = "Gruvbox-Dark";

View file

@ -1,4 +1,5 @@
{ config, pkgs, ... }: {
{ config, pkgs, ... }:
{
programs.waybar = {
enable = true;
settings = {
@ -9,7 +10,12 @@
modules-left = [ "hyprland/workspaces" ];
modules-center = [ "clock" ];
modules-right = [ "cpu" "memory" "temperature" "battery" ];
modules-right = [
"cpu"
"memory"
"temperature"
"battery"
];
"hyprland/workspaces" = {
disable-scroll = true;
@ -32,13 +38,30 @@
interval = 1;
};
"cpu" = { format = " {usage: >3}%"; };
"memory" = { format = " {used:0.1f}G"; tooltip = false; };
"temperature" = { format = " {temperatureC}°C"; tooltip = false; };
"cpu" = {
format = " {usage: >3}%";
};
"memory" = {
format = " {used:0.1f}G";
tooltip = false;
};
"temperature" = {
format = " {temperatureC}°C";
tooltip = false;
};
"battery" = {
states = { warning = 30; critical = 15; };
states = {
warning = 30;
critical = 15;
};
format = "{icon} {capacity}%";
format-icons = [ "" "" "" "" "" ];
format-icons = [
""
""
""
""
""
];
};
};
};
@ -112,4 +135,3 @@
'';
};
}

View file

@ -40,4 +40,3 @@
'';
};
}

View file

@ -1,4 +1,10 @@
{ config, pkgs, lib, ... }: {
{
config,
pkgs,
lib,
...
}:
{
programs.starship = {
enable = true;
@ -109,7 +115,9 @@
format = "[[ $time ](fg:color_fg0 bg:color_bg1)]($style)";
};
line_break = { disabled = false; };
line_break = {
disabled = false;
};
character = {
disabled = false;
@ -123,5 +131,4 @@
};
};
}

View file

@ -2,16 +2,21 @@
# 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, ... }:
{
config,
lib,
pkgs,
...
}:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
./pkgs.nix
./fonts.nix
./modules/bundle.nix
];
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
./pkgs.nix
./fonts.nix
./modules/bundle.nix
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
@ -26,14 +31,12 @@
time.timeZone = "Europe/Paris";
i18n.defaultLocale = "en_US.UTF-8";
console = {
font = "Lat2-Terminus16";
keyMap = "mod-dh-iso-us";
};
# I need to figure out how this works
# services.printing.enable = true;
@ -57,8 +60,10 @@
programs.nix-ld.enable = true;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
system.stateVersion = "25.05";
}

View file

@ -1,4 +1,5 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
fonts.packages = with pkgs; [
nerd-fonts.iosevka-term
nerd-fonts.jetbrains-mono

View file

@ -1,30 +1,48 @@
# 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, ... }:
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ "dm-snapshot" "cryptd" ];
boot.initrd.availableKernelModules = [
"nvme"
"xhci_pci"
"thunderbolt"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [
"dm-snapshot"
"cryptd"
];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-label/NixOS-Root";
fsType = "ext4";
};
fileSystems."/" = {
device = "/dev/disk/by-label/NixOS-Root";
fsType = "ext4";
};
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-label/NixOS-Encrypted";
fileSystems."/boot" =
{ device = "/dev/disk/by-label/NixOS-Boot";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
fileSystems."/boot" = {
device = "/dev/disk/by-label/NixOS-Boot";
fsType = "vfat";
options = [
"fmask=0022"
"dmask=0022"
];
};
swapDevices = [
{

View file

@ -1,5 +1,5 @@
{
services.udev.extraRules = ''
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="amdgpu_bl1", GROUP="video", MODE="0660"
'';
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="amdgpu_bl1", GROUP="video", MODE="0660"
'';
}

View file

@ -13,4 +13,3 @@
./lidswitch.nix
];
}

View file

@ -1,4 +1,5 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
programs.foot = {
enable = true;
enableBashIntegration = true;

View file

@ -1,4 +1,5 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
# For libsecret
services.gnome.gnome-keyring.enable = true;
security.pam.services.login.enableGnomeKeyring = true;

View file

@ -1,5 +1,5 @@
{ pkgs, ...}: {
{ pkgs, ... }:
{
programs.hyprland.enable = true;
environment.sessionVariables.NIXOS_OZONE_WL = "1";
}

View file

@ -1,4 +1,5 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
services.keyd.enable = true;
services.keyd.keyboards = {

View file

@ -1,3 +1,4 @@
{ lib, pkgs, ... }: {
{ lib, pkgs, ... }:
{
programs.steam.enable = true;
}

View file

@ -1,4 +1,5 @@
{ pkgs, ...} : {
{ pkgs, ... }:
{
programs.fish.enable = true;
documentation.man.generateCaches = false;
@ -9,7 +10,9 @@
enable = true;
dockerCompat = true;
defaultNetwork.settings = { dns_enabled = true; };
defaultNetwork.settings = {
dns_enabled = true;
};
};
};
services.flatpak.enable = true;
@ -21,7 +24,6 @@
'';
};
users = {
defaultUserShell = pkgs.bash;
users.zeph = {
@ -33,7 +35,7 @@
"kvm"
"docker"
];
packages = with pkgs; [];
packages = with pkgs; [ ];
};
};
services.fwupd.enable = true;

View file

@ -1,4 +1,5 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
services.xserver = {
enable = true;
desktopManager.xfce.enable = true;

View file

@ -1,94 +1,99 @@
{ pkgs, pkgs-stable, lib, config, ... }: {
environment.systemPackages = (with pkgs; [
# Editors
helix
vim
sioyek
{
pkgs,
pkgs-stable,
lib,
config,
...
}:
{
environment.systemPackages =
(with pkgs; [
# Editors
helix
vim
sioyek
# Dev stuff
podman-compose
gitFull
go-swag
gcc
go
gopls
bun
svelte-language-server
typescript-language-server
nixd
# texlive.combined.scheme-medium
(pkgs.texlive.combine { inherit (pkgs.texlive) scheme-medium csvsimple; })
texlab
typst
tinymist
ffmpeg
localsend
flutter
jdk17
android-studio
# Dev stuff
podman-compose
gitFull
go-swag
gcc
go
gopls
bun
svelte-language-server
typescript-language-server
nixd
# texlive.combined.scheme-medium
(pkgs.texlive.combine { inherit (pkgs.texlive) scheme-medium csvsimple; })
texlab
typst
tinymist
ffmpeg
localsend
flutter
jdk17
android-studio
# Rust toolchain
cargo
cargo-cache
rust-analyzer
rustc
rustfmt
clippy
# Rust toolchain
cargo
cargo-cache
rust-analyzer
rustc
rustfmt
clippy
# System stuff
thunar
fprintd
rclone
unzip
brightnessctl
wl-clipboard
fastfetch
starship
home-manager
capitaine-cursors-themed
libsecret
lsd
htop
# System stuff
thunar
fprintd
rclone
unzip
brightnessctl
wl-clipboard
fastfetch
starship
home-manager
capitaine-cursors-themed
libsecret
lsd
htop
# Internet
bitwarden-desktop
protonvpn-gui
# ente-auth
signal-desktop
strawberry
# Internet
bitwarden-desktop
protonvpn-gui
# ente-auth
signal-desktop
strawberry
# Office (and fun)
godot
libreoffice
mpv
surge-XT
ardour
qpwgraph
gimp
# Office (and fun)
godot
libreoffice
mpv
surge-XT
ardour
qpwgraph
gimp
# Important hypr* things
fuzzel
bemoji
wtype
hyprpaper
hyprpolkitagent
hyprsunset
hyprshot
mako
swayosd
])
++
# Misbehaving packages
(with pkgs-stable; [
librewolf
]);
# Important hypr* things
fuzzel
bemoji
wtype
hyprpaper
hyprpolkitagent
hyprsunset
hyprshot
mako
swayosd
])
++
# Misbehaving packages
(with pkgs-stable; [
librewolf
]);
# Unfree pkgs
nixpkgs.config = {
allowUnfree = true;
android_sdk.accept_license = true;
};
};
}