formatted the code with alejandra

This commit is contained in:
2024-03-03 02:11:14 +05:30
parent 0528e06873
commit ef89207879
34 changed files with 1035 additions and 976 deletions

View File

@ -16,15 +16,18 @@
nur.url = "github:nix-community/nur"; nur.url = "github:nix-community/nur";
}; };
outputs = { self, nixpkgs, home-manager, ... } @ inputs: outputs = {
let self,
nixpkgs,
home-manager,
...
} @ inputs: let
inherit (self) outputs; inherit (self) outputs;
forAllSystems = nixpkgs.lib.genAttrs [ forAllSystems = nixpkgs.lib.genAttrs [
"x86_64-linux" "x86_64-linux"
]; ];
username = "tux"; username = "tux";
in in {
{
packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system}); packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra); formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);

View File

@ -1,4 +1,12 @@
{ inputs, outputs, lib, config, pkgs, username, ... }: { {
inputs,
outputs,
lib,
config,
pkgs,
username,
...
}: {
imports = [ imports = [
inputs.nixos-hardware.nixosModules.asus-zephyrus-ga503 inputs.nixos-hardware.nixosModules.asus-zephyrus-ga503
./hardware-configuration.nix ./hardware-configuration.nix
@ -46,12 +54,18 @@
networkmanager.enable = true; networkmanager.enable = true;
firewall = { firewall = {
enable = true; enable = true;
allowedTCPPorts = [ 80 443 3000 6666 ]; allowedTCPPorts = [80 443 3000 6666 8081];
allowedTCPPortRanges = [ allowedTCPPortRanges = [
{ from = 1714; to = 1764; } {
from = 1714;
to = 1764;
}
]; ];
allowedUDPPortRanges = [ allowedUDPPortRanges = [
{ from = 1714; to = 1764; } {
from = 1714;
to = 1764;
}
]; ];
}; };
}; };

View File

@ -1,7 +1,13 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }: { {
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [ imports = [
(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
]; ];

View File

@ -1,6 +1,12 @@
{ config, outputs, lib, pkgs, inputs, username, ... }:
{ {
config,
outputs,
lib,
pkgs,
inputs,
username,
...
}: {
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
]; ];

View File

@ -1,11 +1,14 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{ {
imports = config,
[ lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/profiles/qemu-guest.nix") (modulesPath + "/profiles/qemu-guest.nix")
]; ];
@ -14,14 +17,12 @@
boot.kernelModules = []; boot.kernelModules = [];
boot.extraModulePackages = []; boot.extraModulePackages = [];
fileSystems."/" = fileSystems."/" = {
{
device = "/dev/disk/by-uuid/b5a9a9f6-be72-4520-b2ac-439d0479a34b"; device = "/dev/disk/by-uuid/b5a9a9f6-be72-4520-b2ac-439d0479a34b";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/efi" = fileSystems."/efi" = {
{
device = "systemd-1"; device = "systemd-1";
fsType = "autofs"; fsType = "autofs";
}; };

View File

@ -1,6 +1,11 @@
{ config, lib, pkgs, inputs, username, ... }:
{ {
config,
lib,
pkgs,
inputs,
username,
...
}: {
imports = [ imports = [
inputs.nixos-wsl.nixosModules.wsl inputs.nixos-wsl.nixosModules.wsl
]; ];

View File

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

View File

@ -1,4 +1,12 @@
{ inputs, outputs, lib, config, pkgs, username, ... }: { {
inputs,
outputs,
lib,
config,
pkgs,
username,
...
}: {
imports = [ imports = [
./picom ./picom
./shell ./shell

View File

@ -1,4 +1,9 @@
{ pkgs, inputs, username, ... }: { {
pkgs,
inputs,
username,
...
}: {
programs.firefox = { programs.firefox = {
enable = true; enable = true;

View File

@ -1,5 +1,8 @@
{ lib, pkgs, ... }: { {
lib,
pkgs,
...
}: {
programs = { programs = {
waybar = { waybar = {
enable = true; enable = true;
@ -9,8 +12,7 @@
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
enable = true; enable = true;
xwayland.enable = true; xwayland.enable = true;
settings = settings = let
let
# Notify # Notify
notifycmd = "notify-send -h string:x-canonical-private-synchronous:hypr-cfg -u low"; notifycmd = "notify-send -h string:x-canonical-private-synchronous:hypr-cfg -u low";
@ -33,8 +35,7 @@
group_border_locked_active_col = "rgba(90ceaaff) rgba(ecd3a0ff) 45deg"; group_border_locked_active_col = "rgba(90ceaaff) rgba(ecd3a0ff) 45deg";
group_border_locked_inactive_col = "rgba(86aaeccc) rgba(93cee9cc) 45deg"; group_border_locked_inactive_col = "rgba(86aaeccc) rgba(93cee9cc) 45deg";
groupbar_text_color = "0xFFf1fcf9"; groupbar_text_color = "0xFFf1fcf9";
in in {
{
#-- General #-- General
general = { general = {
border_size = hypr_border_size; border_size = hypr_border_size;
@ -165,15 +166,12 @@
windowrule = []; windowrule = [];
#-- Keybindings #-- Keybindings
bind = bind = let
let
terminal = "alacritty"; terminal = "alacritty";
browser = "firefox"; browser = "firefox";
filemanager = "thunar"; filemanager = "thunar";
editor = "geany"; editor = "geany";
in in [
[
# groups # groups
"SUPER, G, togglegroup" "SUPER, G, togglegroup"
"SUPER, G, exec, ${notifycmd} 'Toggled Group Mode'" "SUPER, G, exec, ${notifycmd} 'Toggled Group Mode'"

View File

@ -1,5 +1,8 @@
{ inputs, pkgs, ... }: { {
inputs,
pkgs,
...
}: {
# fix nvchad # fix nvchad
# xdg.configFile."nvim" = { # xdg.configFile."nvim" = {
# source = "${pkgs.nvchad}"; # source = "${pkgs.nvchad}";

View File

@ -1,4 +1,8 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
services.picom = { services.picom = {
enable = true; enable = true;
package = pkgs.picom-next; package = pkgs.picom-next;

View File

@ -1,9 +1,7 @@
{config, ...}: { {config, ...}: {
programs.rofi = programs.rofi = {
{
enable = true; enable = true;
extraConfig = extraConfig = {
{
terminal = "alacritty"; terminal = "alacritty";
modes = "combi,keys"; modes = "combi,keys";
@ -40,11 +38,9 @@
cycle = false; cycle = false;
fixed-num-lines = false; fixed-num-lines = false;
}; };
theme = theme = let
let
inherit (config.lib.formats.rasi) mkLiteral; inherit (config.lib.formats.rasi) mkLiteral;
in in {
{
"*" = { "*" = {
font = "JetBrains Mono 11"; font = "JetBrains Mono 11";

View File

@ -1,5 +1,4 @@
{pkgs, ...}: { {pkgs, ...}: {
programs.tmux = { programs.tmux = {
enable = true; enable = true;
plugins = with pkgs; [ plugins = with pkgs; [
@ -42,5 +41,4 @@
"; ";
}; };
} }

View File

@ -1,5 +1,4 @@
{pkgs, ...}: { {pkgs, ...}: {
programs.vscode = { programs.vscode = {
enable = true; enable = true;
package = pkgs.vscodium; package = pkgs.vscodium;

View File

@ -1,5 +1,4 @@
{pkgs, ...}: { {pkgs, ...}: {
programs = { programs = {
waybar = { waybar = {
enable = true; enable = true;
@ -156,11 +155,9 @@
"interval" = "once"; "interval" = "once";
"tooltip" = false; "tooltip" = false;
}; };
}; };
}; };
style = style = let
let
bar_bg = "rgba(23, 28, 34, 0.95)"; bar_bg = "rgba(23, 28, 34, 0.95)";
main_bg = "#101419"; main_bg = "#101419";
main_fg = "#93cee9"; main_fg = "#93cee9";
@ -170,8 +167,7 @@
wb_hvr_bg = "#90ceaa"; wb_hvr_bg = "#90ceaa";
wb_hvr_fg = "#1f2328"; wb_hvr_fg = "#1f2328";
in in ''
''
* { * {
border: none; border: none;
border-radius: 0px; border-radius: 0px;
@ -339,5 +335,4 @@
''; '';
}; };
}; };
} }

View File

@ -1,4 +1,11 @@
{ inputs, outputs, lib, pkgs, username, ... }: { {
inputs,
outputs,
lib,
pkgs,
username,
...
}: {
services = { services = {
xserver = { xserver = {
enable = true; enable = true;

View File

@ -1,5 +1,9 @@
{ config, lib, pkgs, ... }: { {
config,
lib,
pkgs,
...
}: {
security = { security = {
acme = { acme = {
defaults.email = "0xtux@pm.me"; defaults.email = "0xtux@pm.me";

View File

@ -1,4 +1,8 @@
{ pkgs, username, ... }: { {
pkgs,
username,
...
}: {
virtualisation = { virtualisation = {
libvirtd.enable = true; libvirtd.enable = true;
}; };

View File

@ -1,6 +1,8 @@
{ lib, stdenv, pkgs }: {
lib,
let stdenv,
pkgs,
}: let
user = ./user; user = ./user;
in in
stdenv.mkDerivation { stdenv.mkDerivation {

View File

@ -1,6 +1,8 @@
{ stdenv, lib, fetchFromGitHub }: {
stdenv,
let lib,
fetchFromGitHub,
}: let
custom = ./custom; custom = ./custom;
in in
stdenv.mkDerivation { stdenv.mkDerivation {