Skip to content

Commit 0329f25

Browse files
committed
chore: clean
chore: format chore: format chore: format
1 parent 22e77d9 commit 0329f25

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+688
-861
lines changed

.envrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
# shellcheck shell=bash
12
use flake

.github/workflows/check.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
name: Check
2-
32
on: [push, pull_request, workflow_dispatch]
4-
53
jobs:
64
checks:
75
name: Check expressions
86
runs-on: ubuntu-latest
9-
107
steps:
118
- uses: actions/checkout@v4
129
- uses: cachix/install-nix-action@v26

.pre-commit-config.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ repos:
2121
- id: forbid-submodules
2222
- id: mixed-line-ending
2323
- id: trailing-whitespace
24-
# disabled because it keeps causing barfing on my zsh module
25-
# for no good reason that I can tell
26-
# - repo: https://github.com/nix-community/nixpkgs-fmt
27-
# rev: f3fac47d6509e6b23c6103bb833353db348c634f
28-
# hooks:
29-
# - id: nixpkgs-fmt
24+
# disabled because it keeps causing barfing on my zsh module
25+
# for no good reason that I can tell
26+
# - repo: https://github.com/nix-community/nixpkgs-fmt
27+
# rev: f3fac47d6509e6b23c6103bb833353db348c634f
28+
# hooks:
29+
# - id: nixpkgs-fmt
3030
- repo: https://github.com/scop/pre-commit-shfmt
3131
rev: v3.7.0-1
3232
hooks:

flake.lock

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 23 additions & 122 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
{
66
self,
77
nixpkgs,
8+
treefmt-nix,
89
# nixpkgs-stable,
910
# disko,
10-
home-manager,
1111
# systems,
1212
# kmonad,
1313
# lanzaboote,
@@ -28,34 +28,20 @@
2828
# ========== Extend lib with lib.custom ==========
2929
# NOTE: This approach allows lib.custom to propagate into hm
3030
# see: https://github.com/nix-community/home-manager/pull/3454
31-
lib = nixpkgs.lib.extend (self: super: { custom = import ./lib { inherit (nixpkgs) lib; }; });
31+
lib = nixpkgs.lib.extend (_self: _super: { custom = import ./lib { inherit (nixpkgs) lib; }; });
32+
forEachSystem = f: forAllSystems (system: f nixpkgs.legacyPackages.${system});
3233

33-
# lib = nixpkgs.lib // home-manager.lib;
34-
# forEachSystem = f: lib.genAttrs (import systems) (system: f pkgsFor.${system});
34+
treefmtEval = forEachSystem (pkgs: treefmt-nix.lib.evalModule pkgs ./treefmt.nix);
3535
# pkgsFor = lib.genAttrs (import systems) (
3636
# system:
3737
# import nixpkgs {
3838
# inherit system;
3939
# config.allowUnfree = true;
4040
# }
4141
# );
42-
# configVars = import ./vars { inherit inputs lib; };
43-
# configLib = import ./lib { inherit lib; };
4442

45-
# TODO: make it so that ags will be in pkgs
46-
# ags = pkgsFor.x86_64-linux.callPackage ./home/denrei/common/optional/ags { inherit inputs; };
47-
# specialArgs = {
48-
# inherit
49-
# # ags
50-
# inputs
51-
# outputs
52-
# configVars
53-
# configLib
54-
# ;
55-
# };
5643
in
5744
{
58-
# inherit (nixpkgs) lib;
5945

6046
# ========= Overlays =========
6147
#
@@ -110,14 +96,21 @@
11096
# ========= Formatting =========
11197
#
11298
# Nix formatter available through 'nix fmt' https://github.com/NixOS/nixfmt
113-
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.nixfmt-rfc-style);
114-
checks = forAllSystems (
115-
system:
116-
let
117-
pkgs = nixpkgs.legacyPackages.${system};
118-
in
119-
import ./checks.nix { inherit inputs system pkgs; }
120-
);
99+
# formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.nixfmt-rfc-style);
100+
formatter = forEachSystem (pkgs: treefmtEval.${pkgs.system}.config.build.wrapper);
101+
checks = forEachSystem (pkgs: {
102+
formatting = treefmtEval.${pkgs.system}.config.build.check self;
103+
});
104+
# checks = forAllSystems (
105+
# system:
106+
# let
107+
# pkgs = nixpkgs.legacyPackages.${system};
108+
# in
109+
# # import ./checks.nix { inherit inputs system pkgs; }
110+
# {
111+
# formatting = treefmtEval.${pkgs.system}.config.build.check self;
112+
# }
113+
# );
121114

122115
devShells = forAllSystems (
123116
system:
@@ -126,102 +119,6 @@
126119
checks = self.checks.${system};
127120
}
128121
);
129-
130-
# Custom modules to enable special functionality for nixos or home-manager oriented configs.
131-
# nixosModules = import ./modules/nixos;
132-
# homeManagerModules = import ./modules/home-manager;
133-
134-
# overlays = import ./overlays { inherit inputs outputs; };
135-
# Custom modifications/overrides to upstream packages.
136-
# packages = forEachSystem (pkgs: import ./pkgs { inherit pkgs; });
137-
# devShells = forEachSystem (pkgs: import ./shell.nix { inherit pkgs; });
138-
# formatter = forEachSystem (pkgs: pkgs.alejandra);
139-
140-
#################### NixOS Configurations ####################
141-
#
142-
# Building configurations available through `just rebuild` or `nixos-rebuild --flake .#hostname`
143-
144-
# nixosConfigurations = {
145-
# # Desktop PC
146-
# altair = lib.nixosSystem {
147-
# specialArgs = specialArgs;
148-
# modules = [
149-
# # nixos-cosmic.nixosModules.default
150-
# lanzaboote.nixosModules.lanzaboote
151-
# home-manager.nixosModules.home-manager
152-
# { home-manager.extraSpecialArgs = specialArgs; }
153-
# # { nixpkgs.overlays = [ inputs.hyprpanel.overlay ]; }
154-
# ./hosts/altair
155-
# ];
156-
# };
157-
# # HP Laptop
158-
# canopus = lib.nixosSystem {
159-
# specialArgs = specialArgs;
160-
# modules = [
161-
# kmonad.nixosModules.default
162-
# home-manager.nixosModules.home-manager
163-
# # {
164-
# # environment.systemPackages = [
165-
# # ghostty.packages.x86_64-linux.default
166-
# # ];
167-
# # }
168-
# { home-manager.extraSpecialArgs = specialArgs; }
169-
# ./hosts/canopus
170-
# ];
171-
# };
172-
# # QEMU VM
173-
# polaris = lib.nixosSystem {
174-
# specialArgs = specialArgs;
175-
# modules = [
176-
# inputs.disko.nixosModules.disko
177-
# home-manager.nixosModules.home-manager
178-
# { home-manager.extraSpecialArgs = specialArgs; }
179-
# ./hosts/polaris
180-
# ];
181-
# };
182-
# };
183-
#################### Home Manager Configurations ####################
184-
# homeConfigurations = {
185-
# # Desktop home
186-
# "denrei@altair" = lib.homeManagerConfiguration {
187-
# pkgs = import nixpkgs {
188-
# system = "x86_64-linux";
189-
# overlays = [
190-
# inputs.hyprpanel.overlay
191-
# ];
192-
# config.allowUnfree = true;
193-
# };
194-
# extraSpecialArgs = specialArgs;
195-
# modules = [
196-
# ./home/denrei/altair.nix
197-
# ./home/denrei/nixpkgs.nix
198-
# ];
199-
# };
200-
# # HP Laptop home
201-
# "denrei@canopus" = lib.homeManagerConfiguration {
202-
# pkgs = import nixpkgs {
203-
# system = "x86_64-linux";
204-
# overlays = [
205-
# inputs.hyprpanel.overlay
206-
# ];
207-
# config.allowUnfree = true;
208-
# };
209-
# extraSpecialArgs = specialArgs;
210-
# modules = [
211-
# ./home/denrei/canopus.nix
212-
# ./home/denrei/nixpkgs.nix
213-
# ];
214-
# };
215-
# # QEMU VM Home
216-
# "denrei@polaris" = lib.homeManagerConfiguration {
217-
# pkgs = pkgsFor.x86_64-linux;
218-
# extraSpecialArgs = specialArgs;
219-
# modules = [
220-
# ./home/denrei/polaris.nix
221-
# ./home/denrei/nixpkgs.nix
222-
# ];
223-
# };
224-
# };
225122
};
226123

227124
inputs = {
@@ -319,6 +216,10 @@
319216
# url = "github:lilyinstarlight/nixos-cosmic";
320217
# inputs.nixpkgs.follows = "nixpkgs";
321218
# };
219+
treefmt-nix = {
220+
url = "github:numtide/treefmt-nix";
221+
inputs.nixpkgs.follows = "nixpkgs";
222+
};
322223

323224
zen-browser.url = "github:0xc000022070/zen-browser-flake";
324225

home/denrei/common/core/cliphist.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
{pkgs, ...}: {
1+
{ ... }:
2+
{
23
services.cliphist = {
34
enable = true;
45
allowImages = true;

home/denrei/common/core/dconf.nix

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
pkgs,
32
lib,
43
...
54
}:
6-
with lib.hm.gvariant; {
5+
with lib.hm.gvariant;
6+
{
77
dconf.settings = {
88
"org/gnome/desktop/input-sources" = {
99
sources = [
@@ -12,7 +12,7 @@ with lib.hm.gvariant; {
1212
"en"
1313
])
1414
];
15-
xkb-options = ["terminate:ctrl_alt_bksp"];
15+
xkb-options = [ "terminate:ctrl_alt_bksp" ];
1616
};
1717

1818
"org/gnome/desktop/interface" = {
@@ -26,8 +26,8 @@ with lib.hm.gvariant; {
2626
};
2727

2828
"org/gnome/desktop/search-providers" = {
29-
disabled = ["org.gnome.Boxes.desktop"];
30-
enabled = ["org.gnome.Weather.desktop"];
29+
disabled = [ "org.gnome.Boxes.desktop" ];
30+
enabled = [ "org.gnome.Weather.desktop" ];
3131
sort-order = [
3232
"org.gnome.Contacts.desktop"
3333
"org.gnome.Documents.desktop"
@@ -49,26 +49,26 @@ with lib.hm.gvariant; {
4949
};
5050

5151
"org/gnome/desktop/wm/keybindings" = {
52-
close = ["<Alt>q"];
53-
move-to-workspace-1 = ["<Shift><Super>1"];
54-
move-to-workspace-2 = ["<Shift><Super>2"];
55-
move-to-workspace-3 = ["<Shift><Super>3"];
56-
move-to-workspace-4 = ["<Shift><Super>4"];
57-
move-to-workspace-5 = ["<Shift><Super>5"];
58-
switch-to-workspace-1 = ["<Super>1"];
59-
switch-to-workspace-2 = ["<Super>2"];
60-
switch-to-workspace-3 = ["<Super>3"];
61-
switch-to-workspace-4 = ["<Super>4"];
62-
switch-to-workspace-5 = ["<Super>5"];
63-
toggle-fullscreen = ["<Super>g"];
52+
close = [ "<Alt>q" ];
53+
move-to-workspace-1 = [ "<Shift><Super>1" ];
54+
move-to-workspace-2 = [ "<Shift><Super>2" ];
55+
move-to-workspace-3 = [ "<Shift><Super>3" ];
56+
move-to-workspace-4 = [ "<Shift><Super>4" ];
57+
move-to-workspace-5 = [ "<Shift><Super>5" ];
58+
switch-to-workspace-1 = [ "<Super>1" ];
59+
switch-to-workspace-2 = [ "<Super>2" ];
60+
switch-to-workspace-3 = [ "<Super>3" ];
61+
switch-to-workspace-4 = [ "<Super>4" ];
62+
switch-to-workspace-5 = [ "<Super>5" ];
63+
toggle-fullscreen = [ "<Super>g" ];
6464
};
6565

6666
"org/gnome/shell/keybindings" = {
67-
switch-to-application-1 = [];
68-
switch-to-application-2 = [];
69-
switch-to-application-3 = [];
70-
switch-to-application-4 = [];
71-
switch-to-application-5 = [];
67+
switch-to-application-1 = [ ];
68+
switch-to-application-2 = [ ];
69+
switch-to-application-3 = [ ];
70+
switch-to-application-4 = [ ];
71+
switch-to-application-5 = [ ];
7272
};
7373

7474
"org/gnome/desktop/wm/preferences" = {
@@ -89,16 +89,16 @@ with lib.hm.gvariant; {
8989
custom-keybindings = [
9090
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/"
9191
];
92-
mic-mute = ["AudioMicMute"];
93-
next = ["AudioNext"];
94-
play = ["AudioPlay"];
95-
previous = ["AudioPrev"];
96-
stop = ["AudioStop"];
97-
volume-down = ["AudioLowerVolume"];
98-
volume-up = ["AudioRaiseVolume"];
92+
mic-mute = [ "AudioMicMute" ];
93+
next = [ "AudioNext" ];
94+
play = [ "AudioPlay" ];
95+
previous = [ "AudioPrev" ];
96+
stop = [ "AudioStop" ];
97+
volume-down = [ "AudioLowerVolume" ];
98+
volume-up = [ "AudioRaiseVolume" ];
9999

100-
home = ["<Super>e"];
101-
www = ["<Super>w"];
100+
home = [ "<Super>e" ];
101+
www = [ "<Super>w" ];
102102
};
103103

104104
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = {
@@ -138,8 +138,8 @@ with lib.hm.gvariant; {
138138
};
139139

140140
"org/virt-manager/virt-manager/connections" = {
141-
autoconnect = ["qemu:///system"];
142-
uris = ["qemu:///system"];
141+
autoconnect = [ "qemu:///system" ];
142+
uris = [ "qemu:///system" ];
143143
};
144144

145145
"org/gnome/TextEditor" = {

home/denrei/common/core/gh.nix

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
{pkgs, ...}: {
1+
{ pkgs, ... }:
2+
{
23
programs.gh = {
34
enable = true;
4-
extensions = with pkgs; [gh-markdown-preview];
5+
extensions = with pkgs; [ gh-markdown-preview ];
56
settings = {
67
git_protocol = "http";
78
prompt = "enabled";

0 commit comments

Comments
 (0)