style: add alejandra and format
This commit is contained in:
parent
754404ace1
commit
59624111cf
5
Makefile
Normal file
5
Makefile
Normal file
@ -0,0 +1,5 @@
|
||||
check:
|
||||
alejandra --check ./**/*.nix
|
||||
|
||||
format:
|
||||
alejandra ./**/*.nix
|
52
flake.nix
52
flake.nix
@ -34,16 +34,28 @@
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, unstable, nur, utils, rust-overlay, nix-vscode-extensions, nixos-wsl, vscode-server, darwin, home-manager, ... }@inputs: {
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
unstable,
|
||||
nur,
|
||||
utils,
|
||||
rust-overlay,
|
||||
nix-vscode-extensions,
|
||||
nixos-wsl,
|
||||
vscode-server,
|
||||
darwin,
|
||||
home-manager,
|
||||
...
|
||||
} @ inputs: {
|
||||
# This repo's overlay plus any other overlays you use
|
||||
# If you want to use packages from flakes that are not nixpkgs (such as NUR), add their overlays here.\
|
||||
overlays = {
|
||||
default = import ./overlays inputs;
|
||||
pkg-sets = (
|
||||
final: prev: {
|
||||
unstable = import inputs.unstable { system = final.system; };
|
||||
trunk = import inputs.trunk { system = final.system; };
|
||||
unstable = import inputs.unstable {system = final.system;};
|
||||
trunk = import inputs.trunk {system = final.system;};
|
||||
}
|
||||
);
|
||||
rust-overlay = rust-overlay.overlays.default;
|
||||
@ -55,7 +67,6 @@
|
||||
};
|
||||
|
||||
nixosConfigurations = {
|
||||
|
||||
loft = nixpkgs.lib.nixosSystem {
|
||||
system = utils.lib.system.x86_64-linux;
|
||||
modules = [
|
||||
@ -66,7 +77,7 @@
|
||||
|
||||
./machines/loft/configuration.nix
|
||||
];
|
||||
specialArgs = { inherit inputs; };
|
||||
specialArgs = {inherit inputs;};
|
||||
};
|
||||
|
||||
kitchen = nixpkgs.lib.nixosSystem {
|
||||
@ -79,7 +90,7 @@
|
||||
|
||||
./machines/kitchen/configuration.nix
|
||||
];
|
||||
specialArgs = { inherit inputs; };
|
||||
specialArgs = {inherit inputs;};
|
||||
};
|
||||
|
||||
# WSL environment
|
||||
@ -94,15 +105,14 @@
|
||||
|
||||
./machines/work/configuration.nix
|
||||
];
|
||||
specialArgs = { inherit inputs; };
|
||||
specialArgs = {inherit inputs;};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
darwinConfigurations = {
|
||||
mac = darwin.lib.darwinSystem {
|
||||
system = "aarch64-darwin";
|
||||
specialArgs = { inherit inputs; };
|
||||
specialArgs = {inherit inputs;};
|
||||
modules = [
|
||||
self.overlaysModule
|
||||
home-manager.darwinModules.home-manager
|
||||
@ -123,8 +133,11 @@
|
||||
homeDirectory = "/home/michael";
|
||||
username = "michael";
|
||||
stateVersion = "21.05";
|
||||
configuration = { config, pkgs, ... }:
|
||||
{
|
||||
configuration = {
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
imports = [
|
||||
@ -138,8 +151,11 @@
|
||||
homeDirectory = "/home/michael";
|
||||
username = "michael";
|
||||
stateVersion = "21.05";
|
||||
configuration = { config, pkgs, ... }:
|
||||
{
|
||||
configuration = {
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
imports = [
|
||||
@ -153,8 +169,11 @@
|
||||
homeDirectory = "/Users/michael";
|
||||
username = "michael";
|
||||
stateVersion = "22.05";
|
||||
configuration = { config, pkgs, ... }:
|
||||
{
|
||||
configuration = {
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
imports = [
|
||||
@ -163,7 +182,6 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
# // utils.lib.eachSystem [ "aarch64-linux" "x86_64-darwin" "x86_64-linux" ] (system: {
|
||||
# nixpkgs = import nixpkgs {
|
||||
|
@ -1,12 +1,13 @@
|
||||
# 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’).
|
||||
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
@ -61,7 +62,7 @@
|
||||
users.users.michael = {
|
||||
isNormalUser = true;
|
||||
description = "Michael Thomas";
|
||||
extraGroups = [ "wheel" "docker" "podman" "adbusers" "dialout" ];
|
||||
extraGroups = ["wheel" "docker" "podman" "adbusers" "dialout"];
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
|
||||
@ -72,5 +73,4 @@
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "22.05"; # Did you read the comment?
|
||||
|
||||
}
|
@ -1,17 +1,21 @@
|
||||
# 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")];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-amd"];
|
||||
boot.extraModulePackages = [];
|
||||
boot.resumeDevice = "/dev/disk/by-uuid/9d98ce9b-236f-4a03-910a-84c5d5f12f03";
|
||||
boot.supportedFilesystems = [ "ntfs" ];
|
||||
boot.supportedFilesystems = ["ntfs"];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/9d98ce9b-236f-4a03-910a-84c5d5f12f03";
|
||||
|
@ -1,12 +1,13 @@
|
||||
# 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’).
|
||||
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
@ -61,14 +62,15 @@
|
||||
users.users.michael = {
|
||||
isNormalUser = true;
|
||||
description = "Michael Thomas";
|
||||
extraGroups = [ "wheel" "docker" "networkmanager" "adbusers" ]; # Enable ‘sudo’ for the user.
|
||||
extraGroups = ["wheel" "docker" "networkmanager" "adbusers"]; # Enable ‘sudo’ for the user.
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
wget micro
|
||||
wget
|
||||
micro
|
||||
google-chrome
|
||||
gnome3.gnome-tweaks
|
||||
gnomeExtensions.gsconnect
|
||||
@ -100,5 +102,4 @@
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "20.09"; # Did you read the comment?
|
||||
|
||||
}
|
||||
|
@ -1,17 +1,21 @@
|
||||
# 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")];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.blacklistedKernelModules = [ "radeon" "amdgpu" ];
|
||||
boot.initrd.availableKernelModules = ["xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-intel"];
|
||||
boot.blacklistedKernelModules = ["radeon" "amdgpu"];
|
||||
# boot.kernelParams = [ "radeon.si_support=0" "radeon.cik_support=0" "amdgpu.si_support=1" "amdgpu.cik_support=1" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/76737cbf-9b6b-4236-ac9d-7d0daa9c1bf2";
|
||||
|
@ -1,6 +1,8 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
users.users.michael = {
|
||||
home = "/Users/michael";
|
||||
shell = pkgs.zsh;
|
||||
@ -12,7 +14,7 @@
|
||||
};
|
||||
|
||||
environment = {
|
||||
shells = with pkgs; [ zsh ];
|
||||
shells = with pkgs; [zsh];
|
||||
variables = {
|
||||
EDITOR = "nvim";
|
||||
VISUAL = "nvim";
|
||||
|
@ -1,10 +1,13 @@
|
||||
{ lib, pkgs, modulesPath, inputs, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
defaultUser = "michael";
|
||||
in
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
defaultUser = "michael";
|
||||
in {
|
||||
imports = [
|
||||
"${modulesPath}/profiles/minimal.nix"
|
||||
|
||||
@ -46,7 +49,7 @@ in
|
||||
|
||||
users.users.${defaultUser} = {
|
||||
uid = pkgs.lib.mkForce 1001;
|
||||
extraGroups = [ "wheel" "docker" "podman" ];
|
||||
extraGroups = ["wheel" "docker" "podman"];
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
# Enable Podman w/ docker compose compatibility
|
||||
virtualisation.podman = {
|
||||
enable = true;
|
||||
|
@ -1,8 +1,7 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
# Enable CUPS to print documents.
|
||||
services.printing = {
|
||||
enable = true;
|
||||
drivers = [ pkgs.epson-escpr2 ];
|
||||
drivers = [pkgs.epson-escpr2];
|
||||
};
|
||||
}
|
@ -1,5 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
# Font Settings
|
||||
fonts = {
|
||||
fonts = with pkgs; [
|
||||
|
@ -1,5 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
nix = {
|
||||
extraOptions = ''
|
||||
experimental-features = flakes nix-command
|
||||
|
@ -1,10 +1,13 @@
|
||||
{ nixpkgs, unstable, ... }:
|
||||
|
||||
let
|
||||
{
|
||||
nixpkgs,
|
||||
unstable,
|
||||
...
|
||||
}: let
|
||||
inherit (nixpkgs.lib) composeManyExtensions;
|
||||
inherit (builtins) attrNames readDir;
|
||||
localOverlays = map
|
||||
localOverlays =
|
||||
map
|
||||
(f: import (./default + "/${f}"))
|
||||
(attrNames (readDir ./default));
|
||||
in
|
||||
composeManyExtensions (localOverlays)
|
||||
composeManyExtensions localOverlays
|
||||
|
@ -1,5 +1,7 @@
|
||||
self: super: {
|
||||
gnomeExtensions = super.gnomeExtensions // {
|
||||
gnomeExtensions =
|
||||
super.gnomeExtensions
|
||||
// {
|
||||
paperwm = super.gnomeExtensions.paperwm.overrideDerivation (old: {
|
||||
version = "43.0";
|
||||
src = super.fetchFromGitHub {
|
||||
|
@ -1,5 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
imports = [
|
||||
../../modules/zsh.nix
|
||||
../../modules/dev.nix
|
||||
|
@ -1,5 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
imports = [
|
||||
../../modules/dev.nix
|
||||
../../modules/git.nix
|
||||
|
@ -1,5 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
# devbox
|
||||
unstable.devbox
|
||||
@ -18,10 +17,10 @@
|
||||
kubernetes-helm
|
||||
# Nix
|
||||
nil
|
||||
nixpkgs-fmt
|
||||
alejandra
|
||||
# Rust
|
||||
(rust-bin.stable.latest.default.override {
|
||||
extensions = [ "rust-src" ];
|
||||
extensions = ["rust-src"];
|
||||
})
|
||||
];
|
||||
home.file.npmrc = {
|
||||
|
@ -1,5 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
# Add Firefox GNOME theme directory
|
||||
home.file."firefox-gnome-theme" = {
|
||||
target = ".mozilla/firefox/default/chrome/firefox-gnome-theme";
|
||||
|
@ -1,7 +1,6 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
(nerdfonts.override { fonts = [ "FiraCode" ]; })
|
||||
(nerdfonts.override {fonts = ["FiraCode"];})
|
||||
google-fonts
|
||||
inter
|
||||
cascadia-code
|
||||
|
@ -1,5 +1,8 @@
|
||||
{ pkgs, lib, ... }:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs; [
|
||||
git-lfs
|
||||
];
|
||||
|
@ -1,5 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
# Use pkgs.gitAndTools.gitFull in order to get libsecret support
|
||||
programs.git = {
|
||||
package = pkgs.gitAndTools.gitFull;
|
||||
|
@ -1,5 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
gnomeExtensions.caffeine
|
||||
unstable.gnomeExtensions.paperwm
|
||||
|
@ -1,5 +1,8 @@
|
||||
{ pkgs, config, ... }:
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
};
|
||||
@ -9,7 +12,8 @@
|
||||
};
|
||||
|
||||
# Copy Neovim config
|
||||
xdg.configFile.nvim.source = config.lib.file.mkOutOfStoreSymlink
|
||||
xdg.configFile.nvim.source =
|
||||
config.lib.file.mkOutOfStoreSymlink
|
||||
"${config.home.homeDirectory}/Projects/nix-dots/user/modules/nvim";
|
||||
|
||||
home.packages = with pkgs; [
|
||||
|
@ -42,4 +42,14 @@ return {
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
---@class ConformOpts
|
||||
opts = {
|
||||
---@type table<string, conform.FormatterUnit[]>
|
||||
formatters_by_ft = {
|
||||
nix = { "alejandra" },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -1,20 +1,24 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
package = pkgs.vscodium;
|
||||
|
||||
vscodePname = package.pname;
|
||||
|
||||
configDir = {
|
||||
configDir =
|
||||
{
|
||||
"vscode" = "Code";
|
||||
"vscode-insiders" = "Code - Insiders";
|
||||
"vscodium" = "VSCodium";
|
||||
}.${vscodePname};
|
||||
}
|
||||
.${vscodePname};
|
||||
|
||||
userDir = if pkgs.stdenv.hostPlatform.isDarwin then
|
||||
"Library/Application Support/${configDir}/User"
|
||||
else
|
||||
"${config.xdg.configHome}/${configDir}/User";
|
||||
userDir =
|
||||
if pkgs.stdenv.hostPlatform.isDarwin
|
||||
then "Library/Application Support/${configDir}/User"
|
||||
else "${config.xdg.configHome}/${configDir}/User";
|
||||
|
||||
configFilePath = "${userDir}/settings.json";
|
||||
keybindingsFilePath = "${userDir}/keybindings.json";
|
||||
@ -39,6 +43,7 @@ in {
|
||||
mhutchie.git-graph
|
||||
waderyan.gitblame
|
||||
|
||||
|
||||
# Web Development
|
||||
astro-build.astro-vscode
|
||||
redwan-hossain.auto-rename-tag-clone
|
||||
@ -49,6 +54,7 @@ in {
|
||||
esbenp.prettier-vscode
|
||||
antfu.iconify
|
||||
csstools.postcss
|
||||
ms-playwright.playwright
|
||||
|
||||
# Dart / Flutter
|
||||
dart-code.dart-code
|
||||
@ -62,6 +68,7 @@ in {
|
||||
|
||||
# Nix
|
||||
jnoortheen.nix-ide
|
||||
kamadorueda.alejandra
|
||||
];
|
||||
};
|
||||
};
|
||||
|
@ -1,5 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
plugins = [
|
||||
|
Loading…
x
Reference in New Issue
Block a user