run nixfmt on repo

This commit is contained in:
Salar Rahmanian 2024-05-18 11:31:35 -07:00
parent 29c4ce7acd
commit 276ceac3d5
6 changed files with 93 additions and 85 deletions

View file

@ -1,4 +1 @@
{
allowUnfree = true;
}
{ allowUnfree = true; }

View file

@ -7,63 +7,75 @@
url = "github:LnL7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs";
};
nur.url = github:nix-community/nur;
nur.url = "github:nix-community/nur";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nix-darwin, home-manager, nur, nixpkgs, ... }:
outputs =
{
self,
nix-darwin,
home-manager,
nur,
nixpkgs,
...
}:
let
homeManagerConfFor = config: { ... }: {
nixpkgs.overlays = [ nur.overlay ];
imports = [ config ];
};
m3maxConfiguration = { pkgs, ... }: {
environment.systemPackages = with pkgs;
[
home-manager
];
fonts = {
fontDir.enable = true;
fonts = with pkgs; [
fira-code
];
homeManagerConfFor =
config:
{ ... }:
{
nixpkgs.overlays = [ nur.overlay ];
imports = [ config ];
};
services.nix-daemon.enable = true;
m3maxConfiguration =
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [ home-manager ];
nix = {
nixPath = nixpkgs.lib.mkForce [
"nixpkgs=${nixpkgs}"
];
package = pkgs.nixFlakes;
settings = {
experimental-features = "nix-command flakes";
extra-platforms = [ "x86_64-darwin" "aarch64-darwin" ];
trusted-users = [ "root" "salar" ];
fonts = {
fontDir.enable = true;
fonts = with pkgs; [ fira-code ];
};
distributedBuilds = false;
};
programs.fish.enable = true;
services.nix-daemon.enable = true;
system.configurationRevision = self.rev or self.dirtyRev or null;
nix = {
nixPath = nixpkgs.lib.mkForce [ "nixpkgs=${nixpkgs}" ];
system.stateVersion = 4;
package = pkgs.nixFlakes;
settings = {
experimental-features = "nix-command flakes";
extra-platforms = [
"x86_64-darwin"
"aarch64-darwin"
];
trusted-users = [
"root"
"salar"
];
};
distributedBuilds = false;
};
nixpkgs.hostPlatform = "aarch64-darwin";
programs.fish.enable = true;
users = {
users.salar = {
home = /Users/salar;
system.configurationRevision = self.rev or self.dirtyRev or null;
system.stateVersion = 4;
nixpkgs.hostPlatform = "aarch64-darwin";
users = {
users.salar = {
home = /Users/salar;
};
};
};
};
in
{
darwinConfigurations.salarm3max = nix-darwin.lib.darwinSystem {
@ -76,7 +88,9 @@
home-manager.users.salar = homeManagerConfFor ./home.nix;
}
];
specialArgs = { inherit nixpkgs; };
specialArgs = {
inherit nixpkgs;
};
};
darwinPackages = self.darwinConfigurations.salarm3max.pkgs;

View file

@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
{
# Let Home Manager install and manage itself.
@ -6,13 +11,15 @@
imports = (import ./programs);
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"discord"
"slack"
"vscode"
"vscode-extension-MS-python-vscode-pylance"
"zoom"
];
nixpkgs.config.allowUnfreePredicate =
pkg:
builtins.elem (lib.getName pkg) [
"discord"
"slack"
"vscode"
"vscode-extension-MS-python-vscode-pylance"
"zoom"
];
home = {
stateVersion = "23.11";
@ -54,7 +61,7 @@
neovim
niv
nix-index
nixfmt
nixfmt-rfc-style
nix-prefetch-git
nodejs
nodePackages.pyright
@ -110,9 +117,7 @@
programs.darcs = {
enable = true;
author = [
"Salar Rahmanian <code@softinio.com>"
];
author = [ "Salar Rahmanian <code@softinio.com>" ];
boring = [
"^.idea$"
"^.direnv$"
@ -353,4 +358,3 @@
rev = "12c5e919e829c067ba795fe7f1e02037cbc0b4e9";
};
}

View file

@ -4,7 +4,7 @@ let
gitConfig = {
core = {
editor = "nvim";
pager = "diff-so-fancy | less --tabs=4 -RFX";
pager = "diff-so-fancy | less --tabs=4 -RFX";
};
init.defaultBranch = "main";
merge.conflictstyle = "diff3";
@ -36,22 +36,22 @@ let
master = "checkout master";
};
myIgnores = [
"*~"
".DS_Store"
"*.bloop"
".direnv/"
".idea/"
".mypy_cache"
"*.metals"
"*.metals.sbt"
"*metals.sbt"
"*.envrc" # there is lorri, nix-direnv & simple direnv; let people decide
"*hie.yaml" # ghcide files
"*.mill-version" # used by metals
"*.vscode"
"*.python-version"
"result"
];
"*~"
".DS_Store"
"*.bloop"
".direnv/"
".idea/"
".mypy_cache"
"*.metals"
"*.metals.sbt"
"*metals.sbt"
"*.envrc" # there is lorri, nix-direnv & simple direnv; let people decide
"*hie.yaml" # ghcide files
"*.mill-version" # used by metals
"*.vscode"
"*.python-version"
"result"
];
in
{
programs.git = {

View file

@ -22,16 +22,9 @@ in
plugin = tmuxPlugins.continuum;
extraConfig = "set -g @continuum-restore 'on'";
}
{
plugin = tmuxPlugins.sensible;
}
{
plugin = tmuxPlugins.vim-tmux-navigator;
}
{
plugin = tmuxPlugins.onedark-theme;
}
{ plugin = tmuxPlugins.sensible; }
{ plugin = tmuxPlugins.vim-tmux-navigator; }
{ plugin = tmuxPlugins.onedark-theme; }
];
};
}

View file

@ -6,6 +6,6 @@ in
{
programs.wezterm = {
enable = true;
extraConfig = weztermConfig;
extraConfig = weztermConfig;
};
}