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, ...}: {
pre-commit.hooks = {
alejandra.enable = true;
deadnix.enable = true;
};
packages = with pkgs; [nixpkgs-fmt nixfmt];

129
flake.nix
View File

@@ -1,6 +1,6 @@
{
description = "NixOS configuration of Thomas Syms";
nixConfig = { experimental-features = [ "nix-command" "flakes" ]; };
nixConfig = {experimental-features = ["nix-command" "flakes"];};
inputs = {
# System
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
@@ -18,73 +18,80 @@
# Theming
stylix.url = "github:danth/stylix";
};
outputs = inputs@{ self, nixpkgs, stylix, home-manager, ... }:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in
{
nixosConfigurations = {
Equinox = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; inherit system; };
modules = [
# Theme
stylix.nixosModules.stylix
./themes/targets/all.nix
./themes/sandstone-forest
./hosts/Equinox
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs =
{
inherit inputs;
inherit system;
};
home-manager.users.panotaka = {
imports = [ ./home ./home/shell ./home/desktop ];
};
}
];
outputs = inputs @ {
nixpkgs,
stylix,
home-manager,
...
}: let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in {
nixosConfigurations = {
Equinox = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
inherit inputs;
inherit system;
};
modules = [
# Theme
stylix.nixosModules.stylix
./themes/targets/all.nix
./themes/sandstone-forest
Blackbird = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; inherit system; };
modules = [
./hosts/Blackbird
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs =
{
inherit inputs;
inherit system;
};
./hosts/Equinox
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = {
inherit inputs;
inherit system;
};
home-manager.users.panotaka = {
imports = [ ./home ./home/shell ./home/desktop ];
};
}
stylix.nixosModules.stylix
./themes/targets/all.nix
./themes/spaceduck
];
};
home-manager.users.panotaka = {
imports = [./home ./home/shell ./home/desktop];
};
}
];
};
homeConfigurations.panotaka = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
Blackbird = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
inherit inputs;
inherit system;
};
modules = [
./home
./home/shell
./hosts/Blackbird
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = {
inherit inputs;
inherit system;
};
home-manager.users.panotaka = {
imports = [./home ./home/shell ./home/desktop];
};
}
stylix.nixosModules.stylix
./themes/targets/all.nix
./themes/spaceduck
];
};
};
homeConfigurations.panotaka = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
./home
./home/shell
];
};
};
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,68 +1,62 @@
{ inputs
, system
, config
, pkgs
, home-manager
, ...
}:
{
inputs,
system,
pkgs,
...
}: {
imports = [
./nix.nix
];
programs.vscode = {
enable = true;
package = pkgs.vscodium;
extensions = with inputs.nix-vscode-extensions.extensions.${system};
[
# General extensions
extensions = with inputs.nix-vscode-extensions.extensions.${system}; [
# General extensions
## Code Completion
vscode-marketplace.github.copilot
vscode-marketplace.github.copilot-chat
## Code Completion
vscode-marketplace.github.copilot
vscode-marketplace.github.copilot-chat
## Error Checking
vscode-marketplace.usernamehw.errorlens
## Error Checking
vscode-marketplace.usernamehw.errorlens
## Export and Visualisation
vscode-marketplace.ibm.output-colorizer
vscode-marketplace.nobuhito.printcode
vscode-marketplace.pnp.polacode
## Export and Visualisation
vscode-marketplace.ibm.output-colorizer
vscode-marketplace.nobuhito.printcode
vscode-marketplace.pnp.polacode
## Git
vscode-marketplace.lamartire.git-indicators
vscode-marketplace.mhutchie.git-graph
## Git
vscode-marketplace.lamartire.git-indicators
vscode-marketplace.mhutchie.git-graph
## Miscelaneous
vscode-marketplace.britesnow.vscode-toggle-quotes
vscode-marketplace.mrmlnc.vscode-duplicate
vscode-marketplace.qcz.text-power-tools
## Miscelaneous
vscode-marketplace.britesnow.vscode-toggle-quotes
vscode-marketplace.mrmlnc.vscode-duplicate
vscode-marketplace.qcz.text-power-tools
# Language extensions
# Language extensions
## CSV
vscode-marketplace.mechatroner.rainbow-csv
## CSV
vscode-marketplace.mechatroner.rainbow-csv
## JavaScript/TypeScript language extensions
vscode-marketplace.christian-kohler.npm-intellisense
vscode-marketplace.esbenp.prettier-vscode
vscode-marketplace.johnpapa.vscode-peacock
vscode-marketplace.liamhammett.inline-parameters
vscode-marketplace.mgmcdermott.vscode-language-babel
vscode-marketplace.yatki.vscode-surround
## JavaScript/TypeScript language extensions
vscode-marketplace.christian-kohler.npm-intellisense
vscode-marketplace.esbenp.prettier-vscode
vscode-marketplace.johnpapa.vscode-peacock
vscode-marketplace.liamhammett.inline-parameters
vscode-marketplace.mgmcdermott.vscode-language-babel
vscode-marketplace.yatki.vscode-surround
## Rust language extensions
vscode-marketplace.rust-lang.rust-analyzer
vscode-marketplace.serayuzgur.crates
vscode-marketplace.tamasfe.even-better-toml
vscode-marketplace.vadimcn.vscode-lldb
## Rust language extensions
vscode-marketplace.rust-lang.rust-analyzer
vscode-marketplace.serayuzgur.crates
vscode-marketplace.tamasfe.even-better-toml
vscode-marketplace.vadimcn.vscode-lldb
## SVG
vscode-marketplace.dheovani.svg-viewer
];
## SVG
vscode-marketplace.dheovani.svg-viewer
];
userSettings = {
"editor.linkedEditing" = true;
"window.menuBarVisibility" = "toggle";

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,28 +1,22 @@
{ config
, lib
, ...
}:
{
{lib, ...}: {
programs.zsh = lib.mkForce {
enable = true;
oh-my-zsh = {
enable = true;
plugins = [ "grc" "git" ];
plugins = ["grc" "git"];
};
zplug = {
enable = true;
plugins = [
{ name = "zsh-users/zsh-autosuggestions"; }
{name = "zsh-users/zsh-autosuggestions";}
{
name = "zsh-users/zsh-syntax-highlighting";
}
#{ 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.stateVersion = "23.11";
imports = [
# Import hardware configuration
inputs.nixos-hardware.nixosModules.gpd-pocket-3
inputs.disko.nixosModules.disko
./disko.nix
# Import system configuration
../../modules/system.nix
../../modules/harden.nix
../../modules/kde.nix
];
# Set networking
hardware.enableRedistributableFirmware = true;
networking.hostName = hostname;
networking.networkmanager.enable = true;
networking.useDHCP = lib.mkDefault true;
# Bootloader configuration
boot = {
kernelModules = [ "kvm-intel" ];
extraModulePackages = [ ];
kernelModules = ["kvm-intel"];
extraModulePackages = [];
initrd = {
kernelModules = [ ];
kernelModules = [];
availableKernelModules = [
"xhci_pci"
"thunderbolt"
@@ -57,7 +52,6 @@ in
};
};
# Setup Audio
sound.enable = true;
hardware.pulseaudio.enable = false;
@@ -69,8 +63,6 @@ in
pulse.enable = true;
};
# Setup bluetooth
hardware.bluetooth.enable = true;
}

View File

@@ -29,19 +29,19 @@
};
content = {
type = "btrfs";
extraArgs = [ "-f" ];
extraArgs = ["-f"];
subvolumes = {
"/root" = {
mountpoint = "/";
mountOptions = [ "compress=zstd" "noatime" ];
mountOptions = ["compress=zstd" "noatime"];
};
"/home" = {
mountpoint = "/home";
mountOptions = [ "compress=zstd" "noatime" ];
mountOptions = ["compress=zstd" "noatime"];
};
"/nix" = {
mountpoint = "/nix";
mountOptions = [ "compress=zstd" "noatime" ];
mountOptions = ["compress=zstd" "noatime"];
};
"/swap" = {
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.stateVersion = "23.11";
imports = [
# Import hardware configuration
inputs.nixos-hardware.nixosModules.dell-xps-15-9510
@@ -17,28 +15,25 @@ in
inputs.disko.nixosModules.disko
./disko.nix
# Import system configuration
../../modules/system.nix
../../modules/harden.nix
../../modules/kde.nix
];
# Set networking
hardware.enableRedistributableFirmware = true;
networking.hostName = hostname;
networking.networkmanager.enable = true;
networking.useDHCP = lib.mkDefault true;
# Bootloader configuration
boot = {
kernelModules = [ "kvm-intel" ];
extraModulePackages = [ ];
kernelModules = ["kvm-intel"];
extraModulePackages = [];
initrd = {
kernelModules = [ ];
kernelModules = [];
availableKernelModules = [
"xhci_pci"
"thunderbolt"
@@ -58,7 +53,6 @@ in
};
};
# Setup Audio
sound.enable = true;
hardware.pulseaudio.enable = false;
@@ -70,8 +64,6 @@ in
pulse.enable = true;
};
# Setup bluetooth
hardware.bluetooth.enable = true;
}

View File

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

View File

@@ -19,5 +19,5 @@
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
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 = {
enable = true;

View File

@@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{...}: {
services.xserver.enable = true;
services.xserver.displayManager.sddm.enable = true;
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.
services.printing.enable = true;
@@ -31,7 +33,7 @@
users.users.panotaka = {
isNormalUser = true;
description = "panotaka";
extraGroups = [ "networkmanager" "wheel" ];
extraGroups = ["networkmanager" "wheel"];
shell = pkgs.fish;
openssh.authorizedKeys.keys = [
];

View File

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

View File

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