feat: Add automatic formatting for .nix files

This commit is contained in:
Swarsel 2024-07-19 00:45:48 +02:00
parent 9dc9a1fe1b
commit 72d321f478
Signed by: swarsel
GPG key ID: 26A54C31F2A4FD84
46 changed files with 3204 additions and 3164 deletions

View file

@ -1,8 +1,8 @@
{ config, pkgs, ... }:
{
config,
pkgs,
...
}: {
services.gpg-agent = {
enable = true;
enableSshSupport = true;
@ -11,11 +11,11 @@
defaultCacheTtl = 600;
maxCacheTtl = 7200;
extraConfig = ''
allow-loopback-pinentry
allow-emacs-pinentry
allow-loopback-pinentry
allow-emacs-pinentry
'';
};
};
home = {
username = "TEMPLATE";
homeDirectory = "/home/TEMPLATE";
@ -29,7 +29,7 @@
];
};
# update path if the sops private key is stored somewhere else
sops.age.sshKeyPaths = [ "${config.home.homeDirectory}/.ssh/sops" ];
sops.age.sshKeyPaths = ["${config.home.homeDirectory}/.ssh/sops"];
# waybar config - TEMPLATE - update for cores and temp
programs.waybar.settings.mainBar = {
@ -40,7 +40,7 @@
# -----------------------------------------------------------------
# is this machine always connected to power? If yes, use this block:
#
#
# programs.waybar.settings.mainBar."custom/pseudobat"= {
# format= "";
# on-click-right= "wlogout -p layer-shell";
@ -61,32 +61,33 @@
# "custom/left-arrow-dark"
# "clock#1"
# ];
#
#
# -----------------------------------------------------------------
# -----------------------------------------------------------------
# if not always connected to power (laptop), use this (default):
programs.waybar.settings.mainBar.modules-right = ["custom/outer-left-arrow-dark"
"mpris"
"custom/left-arrow-light"
"network"
"custom/left-arrow-dark"
"pulseaudio"
"custom/left-arrow-light"
"custom/pseudobat"
"battery"
"custom/left-arrow-dark"
"group/hardware"
"custom/left-arrow-light"
"clock#2"
"custom/left-arrow-dark"
"clock#1"
];
programs.waybar.settings.mainBar.modules-right = [
"custom/outer-left-arrow-dark"
"mpris"
"custom/left-arrow-light"
"network"
"custom/left-arrow-dark"
"pulseaudio"
"custom/left-arrow-light"
"custom/pseudobat"
"battery"
"custom/left-arrow-dark"
"group/hardware"
"custom/left-arrow-light"
"clock#2"
"custom/left-arrow-dark"
"clock#1"
];
# -----------------------------------------------------------------
wayland.windowManager.sway= {
wayland.windowManager.sway = {
config = rec {
# update for actual inputs here,
input = {
@ -94,7 +95,8 @@
xkb_layout = "us";
xkb_variant = "altgr-intl";
};
"1:1:AT_Translated_Set_2_keyboard" = { # TEMPLATE
"1:1:AT_Translated_Set_2_keyboard" = {
# TEMPLATE
xkb_layout = "us";
xkb_options = "grp:win_space_toggle";
# xkb_options = "ctrl:nocaps,grp:win_space_toggle";
@ -106,7 +108,6 @@
natural_scroll = "enabled";
middle_emulation = "enabled";
};
};
output = {
@ -126,14 +127,12 @@
};
startup = [
{ command = "nextcloud --background";}
{ command = "discord --start-minimized";}
{ command = "element-desktop --hidden -enable-features=UseOzonePlatform -ozone-platform=wayland --disable-gpu-driver-bug-workarounds";}
{ command = "ANKI_WAYLAND=1 anki";}
{ command = "OBSIDIAN_USE_WAYLAND=1 obsidian";}
{ command = "nm-applet";}
{command = "nextcloud --background";}
{command = "discord --start-minimized";}
{command = "element-desktop --hidden -enable-features=UseOzonePlatform -ozone-platform=wayland --disable-gpu-driver-bug-workarounds";}
{command = "ANKI_WAYLAND=1 anki";}
{command = "OBSIDIAN_USE_WAYLAND=1 obsidian";}
{command = "nm-applet";}
];
};
};

View file

@ -1,17 +1,11 @@
{ pkgs, ... }:
{
imports =
[
./hardware-configuration.nix
];
{pkgs, ...}: {
imports = [
./hardware-configuration.nix
];
services = {
getty.autologinUser = "TEMPLATE";
greetd.settings.initial_session.user="TEMPLATE";
greetd.settings.initial_session.user = "TEMPLATE";
};
# Bootloader
@ -37,7 +31,7 @@
networking.hostName = "TEMPLATE"; # Define your hostname.
stylix.image = ../../wallpaper/TEMPLATEwp.png;
stylix = {
enable = true;
base16Scheme = ../../wallpaper/swarsel.yaml;
@ -62,7 +56,7 @@
# name = "FiraCode Nerd Font Propo";
# name = "Montserrat";
};
sansSerif = {
# package = (pkgs.nerdfonts.override { fonts = [ "FiraMono" "FiraCode"]; });
package = pkgs.cantarell-fonts;
@ -71,21 +65,18 @@
# name = "FiraCode Nerd Font Propo";
# name = "Montserrat";
};
monospace = {
package = pkgs.nerdfonts.override { fonts = [ "FiraCode"]; };
package = pkgs.nerdfonts.override {fonts = ["FiraCode"];};
name = "FiraCode Nerd Font Mono";
};
emoji = {
package = pkgs.noto-fonts-emoji;
name = "Noto Color Emoji";
};
};
};
# Configure keymap in X11 (only used for login)
services.xserver = {
@ -96,7 +87,7 @@
users.users.TEMPLATE = {
isNormalUser = true;
description = "TEMPLATE";
extraGroups = [ "networkmanager" "wheel" "lp" "audio" "video" ];
extraGroups = ["networkmanager" "wheel" "lp" "audio" "video"];
packages = with pkgs; [];
};
@ -104,5 +95,4 @@
];
system.stateVersion = "23.05"; # TEMPLATE - but probably no need to change
}