[feat] Alejandra formatting

This commit is contained in:
uttarayan21
2024-03-21 21:35:51 +05:30
parent e8434fadf5
commit d5dc5a79d3
33 changed files with 699 additions and 589 deletions

View File

@@ -1,7 +1,11 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ pkgs, device, ... }: {
{
pkgs,
device,
...
}: {
imports = [
# Include the results of the hardware scan.
./ryu.nix
@@ -28,24 +32,20 @@
};
boot.plymouth.enable = true;
boot.plymouth.theme = "catppuccin-mocha";
boot.plymouth.themePackages = with pkgs;
[ (catppuccin-plymouth.override { variant = "mocha"; }) ];
boot.plymouth.themePackages = with pkgs; [(catppuccin-plymouth.override {variant = "mocha";})];
services.greetd =
let
tuigreet = "${pkgs.greetd.tuigreet}/bin/tuigreet";
hyprland-session = "${pkgs.hyprland}/share/wayland-sessions";
in
{
enable = true;
settings = {
default_session = {
command =
"${tuigreet} --time --remember --remember-session --sessions ${hyprland-session}";
user = "greeter";
};
services.greetd = let
tuigreet = "${pkgs.greetd.tuigreet}/bin/tuigreet";
hyprland-session = "${pkgs.hyprland}/share/wayland-sessions";
in {
enable = true;
settings = {
default_session = {
command = "${tuigreet} --time --remember --remember-session --sessions ${hyprland-session}";
user = "greeter";
};
};
};
systemd.services.greetd.serviceConfig = {
Type = "idle";
@@ -87,11 +87,10 @@
boot.bootspec.enable = true;
networking.hostName = "ryu"; # Define your hostname.
networking.nameservers = [ "1.1.1.1" "8.8.8.8" ];
networking.nameservers = ["1.1.1.1" "8.8.8.8"];
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
services.udev.packages =
[ pkgs.yubikey-personalization pkgs.yubikey-personalization-gui ];
services.udev.packages = [pkgs.yubikey-personalization pkgs.yubikey-personalization-gui];
services.yubikey-agent.enable = true;
# Configure network proxy if necessary
@@ -104,7 +103,7 @@
# Set your time zone.
time.timeZone = "Asia/Kolkata";
i18n.supportedLocales = [ "en_US.UTF-8/UTF-8" ];
i18n.supportedLocales = ["en_US.UTF-8/UTF-8"];
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
@@ -131,7 +130,7 @@
users.users.servius = {
isNormalUser = true;
description = "Uttarayan";
extraGroups = [ "networkmanager" "wheel" ];
extraGroups = ["networkmanager" "wheel"];
};
# Allow unfree packages
@@ -152,11 +151,11 @@
fish
nushellFull
(pkgs.wrapFirefox
(pkgs.firefox-unwrapped.override { pipewireSupport = true; })
{ })
(pkgs.firefox-unwrapped.override {pipewireSupport = true;})
{})
gnumake
python3
(nerdfonts.override { fonts = [ "FiraCode" "Hasklig" ]; })
(nerdfonts.override {fonts = ["FiraCode" "Hasklig"];})
];
environment.sessionVariables = {
WLR_NO_HARDWARE_CURSORS = "1";
@@ -204,14 +203,19 @@
networking.firewall = {
enable = true;
allowedTCPPortRanges = [
{ from = 1714; to = 1764; } # KDE Connect
{
from = 1714;
to = 1764;
} # KDE Connect
];
allowedUDPPortRanges = [
{ from = 1714; to = 1764; } # KDE Connect
{
from = 1714;
to = 1764;
} # KDE Connect
];
};
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
@@ -220,5 +224,5 @@
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.11"; # Did you read the comment?
nix.settings.extra-experimental-features = "nix-command flakes";
nix.settings.trusted-users = [ "root" "servius" ];
nix.settings.trusted-users = ["root" "servius"];
}

View File

@@ -1,30 +1,39 @@
{ nixpkgs, devices, inputs, overlays, home-manager, nur, ... }:
{
nixpkgs,
devices,
inputs,
overlays,
home-manager,
nur,
...
}:
builtins.listToAttrs (builtins.map (device: {
name = device.name;
value = nixpkgs.lib.nixosSystem {
system = device.system;
specialArgs = {
inherit device;
lanzaboote = inputs.lanzaboote;
};
modules = [
nur.nixosModules.nur
{ nixpkgs.overlays = overlays; }
./configuration.nix
home-manager.nixosModules.home-manager
inputs.lanzaboote.nixosModules.lanzaboote
{
nixpkgs.config.allowUnfree = true;
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = {
inherit inputs;
inherit device;
name = device.name;
value = nixpkgs.lib.nixosSystem {
system = device.system;
specialArgs = {
inherit device;
lanzaboote = inputs.lanzaboote;
};
modules = [
nur.nixosModules.nur
{nixpkgs.overlays = overlays;}
./configuration.nix
home-manager.nixosModules.home-manager
inputs.lanzaboote.nixosModules.lanzaboote
{
nixpkgs.config.allowUnfree = true;
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = {
inherit inputs;
inherit device;
};
users.${device.user}.imports = [../common/home.nix];
};
users.${device.user}.imports = [ ../common/home.nix ];
};
}
];
};
}) devices)
}
];
};
})
devices)

View File

@@ -1,10 +1,14 @@
# 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, ... }:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
hardware.opengl = {
enable = true;
@@ -12,15 +16,14 @@
driSupport32Bit = true;
};
services.xserver.videoDrivers = [ "nvidia" ]; # or "nvidiaLegacy470 etc.
services.xserver.videoDrivers = ["nvidia"]; # or "nvidiaLegacy470 etc.
hardware.nvidia = {
# Modesetting is required.
modesetting.enable = true;
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
# 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.
powerManagement.enable = false;
@@ -30,9 +33,9 @@
# Use the NVidia open source kernel module (not to be confused with the
# independent third-party "nouveau" open source driver).
# Support is limited to the Turing and later architectures. Full list of
# supported GPUs is at:
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
# Support is limited to the Turing and later architectures. Full list of
# supported GPUs is at:
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
# Only available from driver 515.43.04+
# Currently alpha-quality/buggy, so false is currently the recommended setting.
open = true;
@@ -45,15 +48,12 @@
package = config.boot.kernelPackages.nvidiaPackages.beta;
};
# hardware.bluetooth.settings = {
boot.initrd.availableKernelModules =
[ "vmd" "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
boot.initrd.availableKernelModules = ["vmd" "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = [];
fileSystems."/" = {
device = "/dev/disk/by-uuid/11d8beef-2a63-4231-af35-b9b8d3a17e9b";
@@ -70,7 +70,7 @@
fsType = "ext4";
};
swapDevices = [ ];
swapDevices = [];
# 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