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
|
40
flake.nix
40
flake.nix
@ -34,8 +34,20 @@
|
||||
};
|
||||
};
|
||||
|
||||
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 = {
|
||||
@ -55,7 +67,6 @@
|
||||
};
|
||||
|
||||
nixosConfigurations = {
|
||||
|
||||
loft = nixpkgs.lib.nixosSystem {
|
||||
system = utils.lib.system.x86_64-linux;
|
||||
modules = [
|
||||
@ -96,7 +107,6 @@
|
||||
];
|
||||
specialArgs = {inherit inputs;};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
darwinConfigurations = {
|
||||
@ -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
|
||||
];
|
||||
|
||||
@ -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,9 +1,13 @@
|
||||
# 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, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
|
||||
|
||||
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod"];
|
||||
|
@ -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
|
||||
];
|
||||
|
||||
@ -68,7 +69,8 @@
|
||||
# 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,9 +1,13 @@
|
||||
# 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, ... }:
|
||||
|
||||
{
|
||||
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"];
|
||||
|
@ -1,6 +1,8 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
users.users.michael = {
|
||||
home = "/Users/michael";
|
||||
shell = pkgs.zsh;
|
||||
|
@ -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"
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
# Enable Podman w/ docker compose compatibility
|
||||
virtualisation.podman = {
|
||||
enable = true;
|
||||
|
@ -1,5 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
# Enable CUPS to print documents.
|
||||
services.printing = {
|
||||
enable = true;
|
||||
|
@ -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,7 +17,7 @@
|
||||
kubernetes-helm
|
||||
# Nix
|
||||
nil
|
||||
nixpkgs-fmt
|
||||
alejandra
|
||||
# Rust
|
||||
(rust-bin.stable.latest.default.override {
|
||||
extensions = ["rust-src"];
|
||||
|
@ -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,5 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
(nerdfonts.override {fonts = ["FiraCode"];})
|
||||
google-fonts
|
||||
|
@ -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