repo: format with alejandra

This commit is contained in:
Anthony Rodriguez 2024-09-24 23:47:52 +02:00
parent 9078b65d49
commit 8473772fe5
Signed by: nezia
GPG key ID: EE3BE97C040A86CE
32 changed files with 79 additions and 135 deletions

View file

@ -1,5 +1,3 @@
{ ... }: {...}: {
{
services.udiskie.enable = true; services.udiskie.enable = true;
} }

View file

@ -1,6 +1,4 @@
{ inputs, ... }: {inputs, ...}: {
{
home.username = "nezia"; home.username = "nezia";
home.homeDirectory = "/home/nezia"; home.homeDirectory = "/home/nezia";
programs.home-manager.enable = true; programs.home-manager.enable = true;

View file

@ -1,16 +1,15 @@
{ ... }: {...}: {
{
xdg.mimeApps = { xdg.mimeApps = {
enable = true; enable = true;
defaultApplications = { defaultApplications = {
"default-web-browser" = [ "firefox.desktop" ]; "default-web-browser" = ["firefox.desktop"];
"text/html" = [ "firefox.desktop" ]; "text/html" = ["firefox.desktop"];
"x-scheme-handler/http" = [ "firefox.desktop" ]; "x-scheme-handler/http" = ["firefox.desktop"];
"x-scheme-handler/https" = [ "firefox.desktop" ]; "x-scheme-handler/https" = ["firefox.desktop"];
"x-scheme-handler/about" = [ "firefox.desktop" ]; "x-scheme-handler/about" = ["firefox.desktop"];
"x-scheme-handler/unknown" = [ "firefox.desktop" ]; "x-scheme-handler/unknown" = ["firefox.desktop"];
"application/pdf" = [ "org.gnome.Evince.desktop" ]; "application/pdf" = ["org.gnome.Evince.desktop"];
"audio/wav" = [ "rhythmbox" ]; "audio/wav" = ["rhythmbox"];
}; };
}; };
} }

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
programs.git = { programs.git = {
enable = true; enable = true;
userName = "Anthony Rodriguez"; userName = "Anthony Rodriguez";

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
programs.gpg = { programs.gpg = {
enable = true; enable = true;
publicKeys = [ publicKeys = [

View file

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
programs.fzf.enable = true; programs.fzf.enable = true;
programs.fastfetch.enable = true; programs.fastfetch.enable = true;
home.packages = with pkgs; [ home.packages = with pkgs; [

View file

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
programs.tmux = { programs.tmux = {
enable = true; enable = true;
prefix = "C-space"; prefix = "C-space";

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
programs = { programs = {
direnv = { direnv = {
enable = true; enable = true;

View file

@ -1,14 +1,11 @@
{ pkgs, ... }: {pkgs, ...}: let
let
catppuccin-fish = pkgs.fetchFromGitHub { catppuccin-fish = pkgs.fetchFromGitHub {
owner = "catppuccin"; owner = "catppuccin";
repo = "fish"; repo = "fish";
rev = "a3b9eb5eaf2171ba1359fe98f20d226c016568cf"; rev = "a3b9eb5eaf2171ba1359fe98f20d226c016568cf";
hash = "sha256-shQxlyoauXJACoZWtRUbRMxmm10R8vOigXwjxBhG8ng="; hash = "sha256-shQxlyoauXJACoZWtRUbRMxmm10R8vOigXwjxBhG8ng=";
}; };
in in {
{
programs.fish = { programs.fish = {
enable = true; enable = true;
interactiveShellInit = '' interactiveShellInit = ''

View file

@ -1,5 +1,4 @@
{ ... }: {...}: {
{
programs.starship = { programs.starship = {
enable = true; enable = true;
enableTransience = true; enableTransience = true;

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
programs.zellij = { programs.zellij = {
enable = true; enable = true;
settings = { settings = {

View file

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

View file

@ -1,7 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
home.packages = with pkgs; [ home.packages = with pkgs; [
protonup-qt protonup-qt
bottles bottles

View file

@ -1,10 +1,12 @@
{ hostname, username, ... }:
{ {
hostname,
username,
...
}: {
sops.defaultSopsFile = ../../secrets/secrets.yaml; sops.defaultSopsFile = ../../secrets/secrets.yaml;
sops.defaultSopsFormat = "yaml"; sops.defaultSopsFormat = "yaml";
sops.age.keyFile = "/home/${username}/.config/sops/age/keys.txt"; sops.age.keyFile = "/home/${username}/.config/sops/age/keys.txt";
sops.secrets."syncthing/${hostname}/key" = { }; sops.secrets."syncthing/${hostname}/key" = {};
sops.secrets."syncthing/${hostname}/cert" = { }; sops.secrets."syncthing/${hostname}/cert" = {};
} }

View file

@ -3,14 +3,11 @@
username, username,
hostname, hostname,
... ...
}: }: let
let
homeDir = "/home/${username}"; homeDir = "/home/${username}";
devices = import ./devices.nix; devices = import ./devices.nix;
otherDevices = builtins.removeAttrs devices [ hostname ]; otherDevices = builtins.removeAttrs devices [hostname];
in in {
{
services = { services = {
syncthing = { syncthing = {
enable = true; enable = true;

View file

@ -1,4 +1,4 @@
# TODO: add to sops directly instead of relying on another nix file # TODO: add to sops directly instead of relying on another nix file
{ {
"vamos" = { "vamos" = {
id = "UO6JWVU-MTLZGVQ-Z3QAFYH-6PW2QR6-SBOVM6P-S6JXR2S-A7VYAU2-RLRXEQY"; id = "UO6JWVU-MTLZGVQ-Z3QAFYH-6PW2QR6-SBOVM6P-S6JXR2S-A7VYAU2-RLRXEQY";

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
boot = { boot = {
loader = { loader = {
timeout = 0; timeout = 0;

View file

@ -1,6 +1,4 @@
{ hostname, ... }: {hostname, ...}: {
{
networking.hostName = hostname; networking.hostName = hostname;
networking.networkmanager.enable = true; networking.networkmanager.enable = true;

View file

@ -1,5 +1,4 @@
_: { _: {
imports = [ imports = [
./core.nix ./core.nix
./boot.nix ./boot.nix

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
# Set your time zone. # Set your time zone.
time.timeZone = "Europe/Paris"; time.timeZone = "Europe/Paris";
@ -18,5 +16,4 @@
LC_TELEPHONE = "fr_CH.UTF-8"; LC_TELEPHONE = "fr_CH.UTF-8";
LC_TIME = "fr_CH.UTF-8"; LC_TIME = "fr_CH.UTF-8";
}; };
} }

View file

@ -1,8 +1,6 @@
{ ... }: {...}: {
{
# fix direnv integration with fish # fix direnv integration with fish
environment.pathsToLink = [ "/share/fish" ]; environment.pathsToLink = ["/share/fish"];
programs.gnupg.agent = { programs.gnupg.agent = {
enable = true; enable = true;

View file

@ -1,6 +1,4 @@
{ username, ... }: {username, ...}: {
{
programs.nh = { programs.nh = {
enable = true; enable = true;
clean.enable = true; clean.enable = true;
@ -10,5 +8,4 @@
environment.sessionVariables = { environment.sessionVariables = {
FLAKE = "/home/${username}/.dotfiles"; FLAKE = "/home/${username}/.dotfiles";
}; };
} }

View file

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

View file

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
# setup printing service # setup printing service
services.printing.enable = true; services.printing.enable = true;

View file

@ -7,9 +7,7 @@
pkgs, pkgs,
modulesPath, modulesPath,
... ...
}: }: {
{
imports = [ imports = [
(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
]; ];
@ -22,9 +20,9 @@
"usbhid" "usbhid"
"sd_mod" "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-label/NIXROOT"; device = "/dev/disk/by-label/NIXROOT";
@ -40,7 +38,7 @@
]; ];
}; };
swapDevices = [ ]; swapDevices = [];
# 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

@ -7,9 +7,7 @@
pkgs, pkgs,
modulesPath, modulesPath,
... ...
}: }: {
{
imports = [ imports = [
(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
]; ];
@ -30,7 +28,7 @@
"cryptd" "cryptd"
]; ];
boot.initrd.luks.devices."crypt".device = "/dev/disk/by-uuid/39d0e0c6-ea32-4ee4-ac76-b28fbff687f8"; boot.initrd.luks.devices."crypt".device = "/dev/disk/by-uuid/39d0e0c6-ea32-4ee4-ac76-b28fbff687f8";
boot.extraModulePackages = [ ]; boot.extraModulePackages = [];
fileSystems."/" = { fileSystems."/" = {
device = "/dev/disk/by-uuid/4ef04567-9633-45b9-addc-55c3020f45b7"; device = "/dev/disk/by-uuid/4ef04567-9633-45b9-addc-55c3020f45b7";
@ -46,7 +44,7 @@
]; ];
}; };
swapDevices = [ ]; swapDevices = [];
# 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

@ -3,11 +3,9 @@
lib, lib,
username, username,
... ...
}: }: let
let
cfg = config.modules.docker; cfg = config.modules.docker;
in in {
{
options.modules.docker.enable = lib.mkEnableOption "docker module"; options.modules.docker.enable = lib.mkEnableOption "docker module";
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
virtualisation.docker = { virtualisation.docker = {
@ -17,6 +15,6 @@ in
setSocketVariable = true; setSocketVariable = true;
}; };
}; };
users.users.${username}.extraGroups = [ "docker" ]; users.users.${username}.extraGroups = ["docker"];
}; };
} }

View file

@ -4,12 +4,10 @@
pkgs, pkgs,
username, username,
... ...
}: }: let
let
cfg = config.modules.gnome; cfg = config.modules.gnome;
stylixEnabled = config.modules.stylix.enable or false; stylixEnabled = config.modules.stylix.enable or false;
in in {
{
options = { options = {
modules.gnome = { modules.gnome = {
enable = lib.mkEnableOption "Enable Gnome"; enable = lib.mkEnableOption "Enable Gnome";
@ -21,7 +19,7 @@ in
displayManager.gdm.enable = true; displayManager.gdm.enable = true;
desktopManager.gnome = { desktopManager.gnome = {
enable = true; enable = true;
extraGSettingsOverridePackages = [ pkgs.mutter ]; extraGSettingsOverridePackages = [pkgs.mutter];
extraGSettingsOverrides = '' extraGSettingsOverrides = ''
[org.gnome.mutter] [org.gnome.mutter]
experimental-features=['scale-monitor-framebuffer'] experimental-features=['scale-monitor-framebuffer']
@ -30,8 +28,7 @@ in
}; };
environment.gnome.excludePackages = ( environment.gnome.excludePackages = (
with pkgs; with pkgs; [
[
gnome-console gnome-console
gnome-photos gnome-photos
gnome-tour gnome-tour
@ -86,7 +83,7 @@ in
]; ];
}; };
"org/gnome/desktop/input-sources" = { "org/gnome/desktop/input-sources" = {
xkb-options = [ "compose:ralt" ]; xkb-options = ["compose:ralt"];
}; };
"org/gnome/desktop/interface" = { "org/gnome/desktop/interface" = {
enable-hot-corners = false; enable-hot-corners = false;
@ -119,7 +116,6 @@ in
]; ];
}; };
}; };
}; };
home.packages = with pkgs.gnomeExtensions; [ home.packages = with pkgs.gnomeExtensions; [
appindicator appindicator

View file

@ -1,23 +1,24 @@
{ config, lib, ... }:
let
cfg = config.modules.nvidia;
in
{ {
config,
lib,
...
}: let
cfg = config.modules.nvidia;
in {
options = { options = {
modules.nvidia = { modules.nvidia = {
enable = lib.mkEnableOption "Enable the Nvidia module"; enable = lib.mkEnableOption "Enable the Nvidia module";
}; };
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
services.xserver.videoDrivers = [ "nvidia" ]; services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia = { hardware.nvidia = {
# Modesetting is required. # Modesetting is required.
modesetting.enable = true; modesetting.enable = true;
# Nvidia power management. Experimental, and can cause sleep/suspend to fail. # Nvidia power management. Experimental, and can cause sleep/suspend to fail.
# Enable this if you have graphical corruption issues or application crashes after waking # Enable this if you have graphical corruption issues or application crashes after waking
# up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead # up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
# of just the bare essentials. # of just the bare essentials.
powerManagement.enable = false; powerManagement.enable = false;
@ -27,9 +28,9 @@ in
# Use the NVidia open source kernel module (not to be confused with the # Use the NVidia open source kernel module (not to be confused with the
# independent third-party "nouveau" open source driver). # independent third-party "nouveau" open source driver).
# Support is limited to the Turing and later architectures. Full list of # Support is limited to the Turing and later architectures. Full list of
# supported GPUs is at: # supported GPUs is at:
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus # https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
# Only available from driver 515.43.04+ # Only available from driver 515.43.04+
# Currently alpha-quality/buggy, so false is currently the recommended setting. # Currently alpha-quality/buggy, so false is currently the recommended setting.
open = false; open = false;

View file

@ -1,9 +1,10 @@
{ config, lib, ... }:
let
cfg = config.modules.pipewire;
in
{ {
config,
lib,
...
}: let
cfg = config.modules.pipewire;
in {
options.modules.pipewire.enable = lib.mkEnableOption "pipewire module"; options.modules.pipewire.enable = lib.mkEnableOption "pipewire module";
options.modules.pipewire.latencyFix.enable = lib.mkEnableOption "enable latency fixes"; options.modules.pipewire.latencyFix.enable = lib.mkEnableOption "enable latency fixes";
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
@ -22,10 +23,9 @@ in
services.pipewire.extraConfig.pipewire."92-low-latency" = lib.mkIf cfg.latencyFix.enable { services.pipewire.extraConfig.pipewire."92-low-latency" = lib.mkIf cfg.latencyFix.enable {
"context.properties" = { "context.properties" = {
"default.clock.rate" = 48000; "default.clock.rate" = 48000;
"default.clock.allowed-rates" = [ 48000 ]; "default.clock.allowed-rates" = [48000];
"default.clock.quantum" = 2048; "default.clock.quantum" = 2048;
"default.clock.min-quantum" = 1024; "default.clock.min-quantum" = 1024;
}; };
}; };
}; };

View file

@ -3,11 +3,9 @@
lib, lib,
pkgs, pkgs,
... ...
}: }: let
let
cfg = config.modules.stylix; cfg = config.modules.stylix;
in in {
{
options = { options = {
modules.stylix = { modules.stylix = {
enable = lib.mkEnableOption "Enable the stylix module"; enable = lib.mkEnableOption "Enable the stylix module";
@ -33,7 +31,7 @@ in
name = "Noto Sans"; name = "Noto Sans";
}; };
monospace = lib.mkDefault { monospace = lib.mkDefault {
package = pkgs.nerdfonts.override { fonts = [ "IntelOneMono" ]; }; package = pkgs.nerdfonts.override {fonts = ["IntelOneMono"];};
name = "IntoneMono Nerd Font"; name = "IntoneMono Nerd Font";
}; };
emoji = { emoji = {

View file

@ -4,11 +4,9 @@
inputs, inputs,
username, username,
... ...
}: }: let
let
cfg = config.modules.wezterm; cfg = config.modules.wezterm;
in in {
{
options = { options = {
modules.wezterm = { modules.wezterm = {
enable = lib.mkEnableOption "enable wezterm"; enable = lib.mkEnableOption "enable wezterm";