Began aggresively formatting project

This commit is contained in:
2023-12-19 17:16:03 -04:00
parent 38b461ae65
commit 22dc9f16fb
31 changed files with 177 additions and 242 deletions

View File

@@ -1,6 +1,7 @@
{pkgs, ...}: { {pkgs, ...}: {
pre-commit.hooks = { pre-commit.hooks = {
alejandra.enable = true; alejandra.enable = true;
deadnix.enable = true;
}; };
packages = with pkgs; [nixpkgs-fmt nixfmt]; packages = with pkgs; [nixpkgs-fmt nixfmt];

View File

@@ -1,6 +1,6 @@
{ {
description = "NixOS configuration of Thomas Syms"; description = "NixOS configuration of Thomas Syms";
nixConfig = { experimental-features = [ "nix-command" "flakes" ]; }; nixConfig = {experimental-features = ["nix-command" "flakes"];};
inputs = { inputs = {
# System # System
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
@@ -18,16 +18,22 @@
# Theming # Theming
stylix.url = "github:danth/stylix"; stylix.url = "github:danth/stylix";
}; };
outputs = inputs@{ self, nixpkgs, stylix, home-manager, ... }: outputs = inputs @ {
let nixpkgs,
stylix,
home-manager,
...
}: let
system = "x86_64-linux"; system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
in in {
{
nixosConfigurations = { nixosConfigurations = {
Equinox = nixpkgs.lib.nixosSystem { Equinox = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = { inherit inputs; inherit system; }; specialArgs = {
inherit inputs;
inherit system;
};
modules = [ modules = [
# Theme # Theme
stylix.nixosModules.stylix stylix.nixosModules.stylix
@@ -39,14 +45,13 @@
{ {
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = home-manager.extraSpecialArgs = {
{
inherit inputs; inherit inputs;
inherit system; inherit system;
}; };
home-manager.users.panotaka = { home-manager.users.panotaka = {
imports = [ ./home ./home/shell ./home/desktop ]; imports = [./home ./home/shell ./home/desktop];
}; };
} }
]; ];
@@ -54,21 +59,23 @@
Blackbird = nixpkgs.lib.nixosSystem { Blackbird = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = { inherit inputs; inherit system; }; specialArgs = {
inherit inputs;
inherit system;
};
modules = [ modules = [
./hosts/Blackbird ./hosts/Blackbird
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
{ {
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = home-manager.extraSpecialArgs = {
{
inherit inputs; inherit inputs;
inherit system; inherit system;
}; };
home-manager.users.panotaka = { home-manager.users.panotaka = {
imports = [ ./home ./home/shell ./home/desktop ]; imports = [./home ./home/shell ./home/desktop];
}; };
} }
stylix.nixosModules.stylix stylix.nixosModules.stylix

View File

@@ -1,6 +1,4 @@
{ config, pkgs, ... }: {...}: {
{
# Home Manager needs a bit of information about you and the # Home Manager needs a bit of information about you and the
# paths it should manage. # paths it should manage.
home = { home = {

View File

@@ -1,17 +1,14 @@
{ pkgs {pkgs, ...}: {
, config
, ...
}: {
programs = { programs = {
chromium = { chromium = {
enable = true; enable = true;
package = pkgs.ungoogled-chromium; package = pkgs.ungoogled-chromium;
commandLineArgs = [ "--enable-features=TouchpadOverscrollHistoryNavigation" ]; commandLineArgs = ["--enable-features=TouchpadOverscrollHistoryNavigation"];
}; };
firefox = { firefox = {
enable = true; enable = true;
profiles.panotaka = { }; profiles.panotaka = {};
}; };
}; };
} }

View File

@@ -1,4 +1,4 @@
{ pkgs, ... }: { {pkgs, ...}: {
home.packages = with pkgs; [ home.packages = with pkgs; [
# Work-specific programs # Work-specific programs
teams-for-linux teams-for-linux

View File

@@ -1,9 +1,4 @@
{ inputs {...}: {
, system
, config
, pkgs
, ...
}: {
imports = [ imports = [
./common.nix ./common.nix
./browsers.nix ./browsers.nix

View File

@@ -1,4 +1,4 @@
{ pkgs, ... }: { {pkgs, ...}: {
home.packages = with pkgs; [ home.packages = with pkgs; [
# KDE specific packages # KDE specific packages
filelight filelight

View File

@@ -1,22 +1,17 @@
{ inputs
, system
, config
, pkgs
, home-manager
, ...
}:
{ {
inputs,
system,
pkgs,
...
}: {
imports = [ imports = [
./nix.nix ./nix.nix
]; ];
programs.vscode = { programs.vscode = {
enable = true; enable = true;
package = pkgs.vscodium; package = pkgs.vscodium;
extensions = with inputs.nix-vscode-extensions.extensions.${system}; extensions = with inputs.nix-vscode-extensions.extensions.${system}; [
[
# General extensions # General extensions
## Code Completion ## Code Completion
@@ -40,7 +35,6 @@
vscode-marketplace.mrmlnc.vscode-duplicate vscode-marketplace.mrmlnc.vscode-duplicate
vscode-marketplace.qcz.text-power-tools vscode-marketplace.qcz.text-power-tools
# Language extensions # Language extensions
## CSV ## CSV

View File

@@ -1,9 +1,7 @@
{ {
inputs, inputs,
system, system,
config,
pkgs, pkgs,
home-manager,
... ...
}: { }: {
home.packages = with pkgs; [ home.packages = with pkgs; [

View File

@@ -1,6 +1,6 @@
{ {
programs.atuin = { programs.atuin = {
enable = true; enable = true;
flags = [ "--disable-up-arrow" ]; flags = ["--disable-up-arrow"];
}; };
} }

View File

@@ -1,7 +1,4 @@
{ config {...}: {
, ...
}:
{
programs.btop = { programs.btop = {
enable = true; enable = true;
}; };

View File

@@ -1,7 +1,4 @@
{ pkgs {pkgs, ...}: {
, ...
}:
{
home.shellAliases = { home.shellAliases = {
sudo = "sudo --preserve-env=PATH"; sudo = "sudo --preserve-env=PATH";
}; };

View File

@@ -1,5 +1,4 @@
{ config, ... }: {...}: {
{
imports = [ imports = [
./atuin.nix ./atuin.nix
./autojump.nix ./autojump.nix
@@ -18,5 +17,4 @@
./zoxide.nix ./zoxide.nix
./zsh ./zsh
]; ];
} }

View File

@@ -1,7 +1,4 @@
{ config {...}: {
, ...
}:
{
programs.eza = { programs.eza = {
enable = true; enable = true;
enableAliases = true; enableAliases = true;

View File

@@ -1,13 +1,8 @@
{ config {pkgs, ...}: {
, pkgs
, ...
}:
{
home.packages = with pkgs; [ home.packages = with pkgs; [
grc grc
]; ];
programs.fish = { programs.fish = {
enable = true; enable = true;
@@ -19,5 +14,4 @@
} }
]; ];
}; };
} }

View File

@@ -1,7 +1,5 @@
{ pkgs {pkgs, ...}: {
, ... home.packages = [pkgs.gh];
}: {
home.packages = [ pkgs.gh ];
programs.git = { programs.git = {
enable = true; enable = true;

View File

@@ -1,7 +1,4 @@
{ config {...}: {
, ...
}:
{
programs.htop = { programs.htop = {
enable = true; enable = true;
}; };

View File

@@ -1,8 +1,4 @@
{ config {pkgs, ...}: {
, pkgs
, ...
}:
{
home.packages = with pkgs; [ home.packages = with pkgs; [
rmtrash rmtrash
]; ];

View File

@@ -1,5 +1,4 @@
{ config, lib, ... }: { {...}: {
programs.starship = { programs.starship = {
enable = true; enable = true;
settings = { settings = {
@@ -277,7 +276,6 @@
zig = { zig = {
symbol = "zig "; symbol = "zig ";
}; };
}; };
}; };
} }

View File

@@ -1,7 +1,4 @@
{ config {...}: {
, ...
}:
{
programs.zoxide = { programs.zoxide = {
enable = true; enable = true;
}; };

View File

@@ -1,28 +1,22 @@
{ config {lib, ...}: {
, lib
, ...
}:
{
programs.zsh = lib.mkForce { programs.zsh = lib.mkForce {
enable = true; enable = true;
oh-my-zsh = { oh-my-zsh = {
enable = true; enable = true;
plugins = [ "grc" "git" ]; plugins = ["grc" "git"];
}; };
zplug = { zplug = {
enable = true; enable = true;
plugins = [ plugins = [
{ name = "zsh-users/zsh-autosuggestions"; } {name = "zsh-users/zsh-autosuggestions";}
{ {
name = "zsh-users/zsh-syntax-highlighting"; name = "zsh-users/zsh-syntax-highlighting";
} }
#{ name = "marlonrichert/zsh-autocomplete"; } #{ name = "marlonrichert/zsh-autocomplete"; }
{ name = "hlissner/zsh-autopair"; } {name = "hlissner/zsh-autopair";}
]; ];
}; };
}; };
} }

View File

@@ -1,43 +1,38 @@
{ config, pkgs, inputs, lib, ... }:
let
hostname = "Blackbird";
in
{ {
inputs,
lib,
...
}: let
hostname = "Blackbird";
in {
# System version # System version
system.stateVersion = "23.11"; system.stateVersion = "23.11";
imports = [ imports = [
# Import hardware configuration # Import hardware configuration
inputs.nixos-hardware.nixosModules.gpd-pocket-3 inputs.nixos-hardware.nixosModules.gpd-pocket-3
inputs.disko.nixosModules.disko inputs.disko.nixosModules.disko
./disko.nix ./disko.nix
# Import system configuration # Import system configuration
../../modules/system.nix ../../modules/system.nix
../../modules/harden.nix ../../modules/harden.nix
../../modules/kde.nix ../../modules/kde.nix
]; ];
# Set networking # Set networking
hardware.enableRedistributableFirmware = true; hardware.enableRedistributableFirmware = true;
networking.hostName = hostname; networking.hostName = hostname;
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
networking.useDHCP = lib.mkDefault true; networking.useDHCP = lib.mkDefault true;
# Bootloader configuration # Bootloader configuration
boot = { boot = {
kernelModules = [ "kvm-intel" ]; kernelModules = ["kvm-intel"];
extraModulePackages = [ ]; extraModulePackages = [];
initrd = { initrd = {
kernelModules = [ ]; kernelModules = [];
availableKernelModules = [ availableKernelModules = [
"xhci_pci" "xhci_pci"
"thunderbolt" "thunderbolt"
@@ -57,7 +52,6 @@ in
}; };
}; };
# Setup Audio # Setup Audio
sound.enable = true; sound.enable = true;
hardware.pulseaudio.enable = false; hardware.pulseaudio.enable = false;
@@ -69,8 +63,6 @@ in
pulse.enable = true; pulse.enable = true;
}; };
# Setup bluetooth # Setup bluetooth
hardware.bluetooth.enable = true; hardware.bluetooth.enable = true;
} }

View File

@@ -29,19 +29,19 @@
}; };
content = { content = {
type = "btrfs"; type = "btrfs";
extraArgs = [ "-f" ]; extraArgs = ["-f"];
subvolumes = { subvolumes = {
"/root" = { "/root" = {
mountpoint = "/"; mountpoint = "/";
mountOptions = [ "compress=zstd" "noatime" ]; mountOptions = ["compress=zstd" "noatime"];
}; };
"/home" = { "/home" = {
mountpoint = "/home"; mountpoint = "/home";
mountOptions = [ "compress=zstd" "noatime" ]; mountOptions = ["compress=zstd" "noatime"];
}; };
"/nix" = { "/nix" = {
mountpoint = "/nix"; mountpoint = "/nix";
mountOptions = [ "compress=zstd" "noatime" ]; mountOptions = ["compress=zstd" "noatime"];
}; };
"/swap" = { "/swap" = {
mountpoint = "/.swapvol"; mountpoint = "/.swapvol";

View File

@@ -1,15 +1,13 @@
{ config, pkgs, inputs, lib, ... }:
let
hostname = "Equinox";
in
{ {
inputs,
lib,
...
}: let
hostname = "Equinox";
in {
# System version # System version
system.stateVersion = "23.11"; system.stateVersion = "23.11";
imports = [ imports = [
# Import hardware configuration # Import hardware configuration
inputs.nixos-hardware.nixosModules.dell-xps-15-9510 inputs.nixos-hardware.nixosModules.dell-xps-15-9510
@@ -17,28 +15,25 @@ in
inputs.disko.nixosModules.disko inputs.disko.nixosModules.disko
./disko.nix ./disko.nix
# Import system configuration # Import system configuration
../../modules/system.nix ../../modules/system.nix
../../modules/harden.nix ../../modules/harden.nix
../../modules/kde.nix ../../modules/kde.nix
]; ];
# Set networking # Set networking
hardware.enableRedistributableFirmware = true; hardware.enableRedistributableFirmware = true;
networking.hostName = hostname; networking.hostName = hostname;
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
networking.useDHCP = lib.mkDefault true; networking.useDHCP = lib.mkDefault true;
# Bootloader configuration # Bootloader configuration
boot = { boot = {
kernelModules = [ "kvm-intel" ]; kernelModules = ["kvm-intel"];
extraModulePackages = [ ]; extraModulePackages = [];
initrd = { initrd = {
kernelModules = [ ]; kernelModules = [];
availableKernelModules = [ availableKernelModules = [
"xhci_pci" "xhci_pci"
"thunderbolt" "thunderbolt"
@@ -58,7 +53,6 @@ in
}; };
}; };
# Setup Audio # Setup Audio
sound.enable = true; sound.enable = true;
hardware.pulseaudio.enable = false; hardware.pulseaudio.enable = false;
@@ -70,8 +64,6 @@ in
pulse.enable = true; pulse.enable = true;
}; };
# Setup bluetooth # Setup bluetooth
hardware.bluetooth.enable = true; hardware.bluetooth.enable = true;
} }

View File

@@ -29,19 +29,19 @@
}; };
content = { content = {
type = "btrfs"; type = "btrfs";
extraArgs = [ "-f" ]; extraArgs = ["-f"];
subvolumes = { subvolumes = {
"/root" = { "/root" = {
mountpoint = "/"; mountpoint = "/";
mountOptions = [ "compress=zstd" "noatime" ]; mountOptions = ["compress=zstd" "noatime"];
}; };
"/home" = { "/home" = {
mountpoint = "/home"; mountpoint = "/home";
mountOptions = [ "compress=zstd" "noatime" ]; mountOptions = ["compress=zstd" "noatime"];
}; };
"/nix" = { "/nix" = {
mountpoint = "/nix"; mountpoint = "/nix";
mountOptions = [ "compress=zstd" "noatime" ]; mountOptions = ["compress=zstd" "noatime"];
}; };
"/swap" = { "/swap" = {
mountpoint = "/.swapvol"; mountpoint = "/.swapvol";

View File

@@ -19,5 +19,5 @@
enable = true; enable = true;
}; };
}; };
nix.settings.allowed-users = [ "root" "@users" ]; nix.settings.allowed-users = ["root" "@users"];
} }

View File

@@ -1,10 +1,6 @@
{ pkgs, ... }: {pkgs, ...}: {
{
# i3 related options # i3 related options
environment.pathsToLink = [ "/libexec" ]; # links /libexec from derivations to /run/current-system/sw environment.pathsToLink = ["/libexec"]; # links /libexec from derivations to /run/current-system/sw
services.xserver = { services.xserver = {
enable = true; enable = true;

View File

@@ -1,5 +1,4 @@
{ pkgs, ... }: {...}: {
{
services.xserver.enable = true; services.xserver.enable = true;
services.xserver.displayManager.sddm.enable = true; services.xserver.displayManager.sddm.enable = true;
services.xserver.displayManager.defaultSession = "plasmawayland"; services.xserver.displayManager.defaultSession = "plasmawayland";

View File

@@ -1,7 +1,9 @@
{ config, pkgs, ... }:
{ {
nix.settings.experimental-features = [ "nix-command" "flakes" ]; config,
pkgs,
...
}: {
nix.settings.experimental-features = ["nix-command" "flakes"];
# Enable CUPS to print documents. # Enable CUPS to print documents.
services.printing.enable = true; services.printing.enable = true;
@@ -31,7 +33,7 @@
users.users.panotaka = { users.users.panotaka = {
isNormalUser = true; isNormalUser = true;
description = "panotaka"; description = "panotaka";
extraGroups = [ "networkmanager" "wheel" ]; extraGroups = ["networkmanager" "wheel"];
shell = pkgs.fish; shell = pkgs.fish;
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [
]; ];

View File

@@ -1,6 +1,9 @@
{ system, inputs, config, pkgs, ... }:
{ {
system,
inputs,
pkgs,
...
}: {
stylix.image = ./wallpaper.jpg; stylix.image = ./wallpaper.jpg;
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/everforest.yaml"; stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/everforest.yaml";
@@ -32,7 +35,7 @@
}; };
monospace = { monospace = {
package = pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" ]; }; package = pkgs.nerdfonts.override {fonts = ["JetBrainsMono"];};
name = "JetBrainsMono Nerd Font"; name = "JetBrainsMono Nerd Font";
}; };

View File

@@ -1,6 +1,4 @@
{ config, pkgs, ... }: {pkgs, ...}: {
{
stylix.image = ./DotGrid.svg; stylix.image = ./DotGrid.svg;
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/spaceduck.yaml"; stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/spaceduck.yaml";
@@ -17,7 +15,7 @@
}; };
monospace = { monospace = {
package = pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" ]; }; package = pkgs.nerdfonts.override {fonts = ["JetBrainsMono"];};
name = "JetBrainsMono Nerd Font"; name = "JetBrainsMono Nerd Font";
}; };