mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 09:07:21 +01:00
chore: code cleanup (nixpkgs-fmt style)
This commit is contained in:
parent
2a08576697
commit
dc66bb27dd
44 changed files with 1152 additions and 1138 deletions
|
|
@ -1,20 +1,19 @@
|
|||
# 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,
|
||||
...
|
||||
{ config
|
||||
, lib
|
||||
, modulesPath
|
||||
, ...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-amd"];
|
||||
boot.extraModulePackages = [];
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/55eee3d2-4125-4aba-a326-10cde2abdf26";
|
||||
|
|
@ -27,7 +26,7 @@
|
|||
};
|
||||
|
||||
swapDevices = [
|
||||
{device = "/dev/disk/by-uuid/0a74b04a-99e0-48cd-afcf-6ca849f6f85a";}
|
||||
{ device = "/dev/disk/by-uuid/0a74b04a-99e0-48cd-afcf-6ca849f6f85a"; }
|
||||
];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
|
||||
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
enableSshSupport = true;
|
||||
|
|
@ -24,7 +24,7 @@
|
|||
packages = with pkgs; [
|
||||
];
|
||||
};
|
||||
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 = {
|
||||
|
|
@ -34,6 +34,7 @@
|
|||
temperature.input-filename = "temp1_input";
|
||||
};
|
||||
|
||||
|
||||
programs.waybar.settings.mainBar.modules-right = [
|
||||
"custom/outer-left-arrow-dark"
|
||||
"mpris"
|
||||
|
|
@ -52,6 +53,7 @@
|
|||
"clock#1"
|
||||
];
|
||||
|
||||
|
||||
wayland.windowManager.sway = {
|
||||
config = rec {
|
||||
# update for actual inputs here,
|
||||
|
|
@ -72,6 +74,7 @@
|
|||
natural_scroll = "enabled";
|
||||
middle_emulation = "enabled";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
output = {
|
||||
|
|
@ -90,41 +93,40 @@
|
|||
};
|
||||
|
||||
workspaceOutputAssign = [
|
||||
{
|
||||
output = "eDP-1";
|
||||
workspace = "1:一";
|
||||
}
|
||||
{
|
||||
output = "DP-4";
|
||||
workspace = "2:二";
|
||||
}
|
||||
{ output = "eDP-1"; workspace = "1:一"; }
|
||||
{ output = "DP-4"; workspace = "2:二"; }
|
||||
];
|
||||
|
||||
keybindings = let
|
||||
inherit (config.wayland.windowManager.sway.config) modifier;
|
||||
in {
|
||||
"${modifier}+w" = "exec \"bash ~/.dotfiles/scripts/checkelement.sh\"";
|
||||
"XF86MonBrightnessUp" = "exec brightnessctl set +5%";
|
||||
"XF86MonBrightnessDown" = "exec brightnessctl set 5%-";
|
||||
"XF86Display" = "exec wl-mirror eDP-1";
|
||||
# these are left open to use
|
||||
# "XF86WLAN" = "exec wl-mirror eDP-1";
|
||||
# "XF86Messenger" = "exec wl-mirror eDP-1";
|
||||
# "XF86Go" = "exec wl-mirror eDP-1";
|
||||
# "XF86Favorites" = "exec wl-mirror eDP-1";
|
||||
# "XF86HomePage" = "exec wtype -P Escape -p Escape";
|
||||
# "XF86AudioLowerVolume" = "pactl set-sink-volume alsa_output.pci-0000_08_00.6.HiFi__hw_Generic_1__sink -5%";
|
||||
# "XF86AudioRaiseVolume" = "pactl set-sink-volume alsa_output.pci-0000_08_00.6.HiFi__hw_Generic_1__sink +5% ";
|
||||
"XF86AudioMute" = "pactl set-sink-mute alsa_output.pci-0000_08_00.6.HiFi__hw_Generic_1__sink toggle";
|
||||
};
|
||||
|
||||
keybindings =
|
||||
let
|
||||
inherit (config.wayland.windowManager.sway.config) modifier;
|
||||
in
|
||||
{
|
||||
"${modifier}+w" = "exec \"bash ~/.dotfiles/scripts/checkelement.sh\"";
|
||||
"XF86MonBrightnessUp" = "exec brightnessctl set +5%";
|
||||
"XF86MonBrightnessDown" = "exec brightnessctl set 5%-";
|
||||
"XF86Display" = "exec wl-mirror eDP-1";
|
||||
# these are left open to use
|
||||
# "XF86WLAN" = "exec wl-mirror eDP-1";
|
||||
# "XF86Messenger" = "exec wl-mirror eDP-1";
|
||||
# "XF86Go" = "exec wl-mirror eDP-1";
|
||||
# "XF86Favorites" = "exec wl-mirror eDP-1";
|
||||
# "XF86HomePage" = "exec wtype -P Escape -p Escape";
|
||||
# "XF86AudioLowerVolume" = "pactl set-sink-volume alsa_output.pci-0000_08_00.6.HiFi__hw_Generic_1__sink -5%";
|
||||
# "XF86AudioRaiseVolume" = "pactl set-sink-volume alsa_output.pci-0000_08_00.6.HiFi__hw_Generic_1__sink +5% ";
|
||||
"XF86AudioMute" = "pactl set-sink-mute alsa_output.pci-0000_08_00.6.HiFi__hw_Generic_1__sink toggle";
|
||||
};
|
||||
|
||||
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"; }
|
||||
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,17 +1,17 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
#
|
||||
|
||||
#
|
||||
# imports =
|
||||
# [
|
||||
# ./hardware-configuration.nix
|
||||
# ];
|
||||
#
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
#
|
||||
imports =
|
||||
[
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
services = {
|
||||
getty.autologinUser = "swarsel";
|
||||
|
|
@ -24,7 +24,7 @@
|
|||
# kernelPackages = pkgs.linuxPackages_latest;
|
||||
};
|
||||
|
||||
sops.age.sshKeyPaths = ["${config.users.users.swarsel.home}/.ssh/sops"];
|
||||
sops.age.sshKeyPaths = [ "${config.users.users.swarsel.home}/.ssh/sops" ];
|
||||
|
||||
networking = {
|
||||
hostName = "fourside"; # Define your hostname.
|
||||
|
|
@ -33,27 +33,15 @@
|
|||
firewall.checkReversePath = false;
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowedUDPPorts = [4380 27036 14242 34197 51820]; # 34197: factorio; 4380 27036 14242: barotrauma; 51820: wireguard
|
||||
allowedTCPPorts = []; # 34197: factorio; 4380 27036 14242: barotrauma; 51820: wireguard
|
||||
allowedUDPPorts = [ 4380 27036 14242 34197 51820 ]; # 34197: factorio; 4380 27036 14242: barotrauma; 51820: wireguard
|
||||
allowedTCPPorts = [ ]; # 34197: factorio; 4380 27036 14242: barotrauma; 51820: wireguard
|
||||
allowedTCPPortRanges = [
|
||||
{
|
||||
from = 27015;
|
||||
to = 27030;
|
||||
} # barotrauma
|
||||
{
|
||||
from = 27036;
|
||||
to = 27037;
|
||||
} # barotrauma
|
||||
{ from = 27015; to = 27030; } # barotrauma
|
||||
{ from = 27036; to = 27037; } # barotrauma
|
||||
];
|
||||
allowedUDPPortRanges = [
|
||||
{
|
||||
from = 27000;
|
||||
to = 27031;
|
||||
} # barotrauma
|
||||
{
|
||||
from = 58962;
|
||||
to = 58964;
|
||||
} # barotrauma
|
||||
{ from = 27000; to = 27031; } # barotrauma
|
||||
{ from = 58962; to = 58964; } # barotrauma
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
@ -106,7 +94,7 @@
|
|||
};
|
||||
|
||||
monospace = {
|
||||
package = pkgs.nerdfonts.override {fonts = ["FiraCode"];};
|
||||
package = pkgs.nerdfonts.override { fonts = [ "FiraCode" ]; };
|
||||
name = "FiraCode Nerd Font Mono";
|
||||
};
|
||||
|
||||
|
|
@ -117,6 +105,7 @@
|
|||
};
|
||||
};
|
||||
|
||||
|
||||
hardware = {
|
||||
graphics = {
|
||||
enable = true;
|
||||
|
|
@ -162,8 +151,8 @@
|
|||
isNormalUser = true;
|
||||
description = "Leon S";
|
||||
hashedPasswordFile = config.sops.secrets.swarseluser.path;
|
||||
extraGroups = ["networkmanager" "wheel" "lp" "audio" "video" "vboxusers" "scanner"];
|
||||
packages = with pkgs; [];
|
||||
extraGroups = [ "networkmanager" "wheel" "lp" "audio" "video" "vboxusers" "scanner" ];
|
||||
packages = with pkgs; [ ];
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
|
|
@ -177,4 +166,6 @@
|
|||
];
|
||||
|
||||
system.stateVersion = "23.05";
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue