diff --git a/.github/workflows/nix-lint.yaml b/.github/workflows/nix-lint.yaml new file mode 100644 index 0000000..c7338f7 --- /dev/null +++ b/.github/workflows/nix-lint.yaml @@ -0,0 +1,38 @@ +name: Nix Flake Check + +on: [pull_request] + +jobs: + check: + runs-on: ubuntu-latest + + permissions: + contents: write + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Install Nix + uses: cachix/install-nix-action@v23 + with: + nix_path: nixpkgs=channel:nixos-unstable + + - name: Install Nix Linting and Formatting Tools + run: nix-env -i statix nixpkgs-fmt -f '' + + - name: Run Statix Lint + run: statix fix + + - name: Run Nix Format + run: nix fmt + + - name: Nix Flake Checker + # You may pin to the exact commit or the version. + # uses: DeterminateSystems/flake-checker-action@4b90f9fc724969ff153fe1803460917c84fe00a3 + uses: DeterminateSystems/flake-checker-action@v5 + + - name: Commit + uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: Auto lint/format \ No newline at end of file diff --git a/nixos/hosts/citadel/default.nix b/nixos/hosts/citadel/default.nix index 3838124..ec7df51 100644 --- a/nixos/hosts/citadel/default.nix +++ b/nixos/hosts/citadel/default.nix @@ -29,7 +29,7 @@ networking.hostName = "citadel"; # Define your hostname. - # Enable OpenGL + # Enable OpenGL hardware.opengl = { enable = true; driSupport = true; @@ -37,7 +37,7 @@ }; # Load nvidia driver for Xorg and Wayland - services.xserver.videoDrivers = ["nvidia"]; # or "nvidiaLegacy470 etc. + services.xserver.videoDrivers = [ "nvidia" ]; # or "nvidiaLegacy470 etc. hardware.nvidia = { diff --git a/nixos/hosts/citadel/hardware-configuration.nix b/nixos/hosts/citadel/hardware-configuration.nix index 09462b7..5a06546 100644 --- a/nixos/hosts/citadel/hardware-configuration.nix +++ b/nixos/hosts/citadel/hardware-configuration.nix @@ -5,7 +5,8 @@ { imports = - [ (modulesPath + "/installer/scan/not-detected.nix") + [ + (modulesPath + "/installer/scan/not-detected.nix") ]; boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; @@ -14,12 +15,14 @@ boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/701fc943-ede7-41ed-8a53-3cc38fc68fe5"; + { + device = "/dev/disk/by-uuid/701fc943-ede7-41ed-8a53-3cc38fc68fe5"; fsType = "ext4"; }; fileSystems."/boot" = - { device = "/dev/disk/by-uuid/C634-F571"; + { + device = "/dev/disk/by-uuid/C634-F571"; fsType = "vfat"; }; diff --git a/nixos/hosts/common/nixos/openssh.nix b/nixos/hosts/common/nixos/openssh.nix index b852733..8d3c10e 100644 --- a/nixos/hosts/common/nixos/openssh.nix +++ b/nixos/hosts/common/nixos/openssh.nix @@ -1,5 +1,4 @@ -{... -}: +_: { diff --git a/nixos/hosts/common/optional/editors/vscode/extensions.nix b/nixos/hosts/common/optional/editors/vscode/extensions.nix index 9b24a06..a84a0cd 100644 --- a/nixos/hosts/common/optional/editors/vscode/extensions.nix +++ b/nixos/hosts/common/optional/editors/vscode/extensions.nix @@ -1,7 +1,7 @@ # Warning, this file is autogenerated by nix4vscode. Don't modify this manually. { pkgs }: let - vscode-utils = pkgs.vscode-utils; + inherit (pkgs) vscode-utils; in { "ms-python"."python" = vscode-utils.extensionFromVscodeMarketplace { diff --git a/nixos/hosts/dns01/hardware-configuration.nix b/nixos/hosts/dns01/hardware-configuration.nix index e2b253d..cb81550 100644 --- a/nixos/hosts/dns01/hardware-configuration.nix +++ b/nixos/hosts/dns01/hardware-configuration.nix @@ -5,7 +5,8 @@ { imports = - [ (modulesPath + "/installer/scan/not-detected.nix") + [ + (modulesPath + "/installer/scan/not-detected.nix") ]; boot.initrd.availableKernelModules = [ "xhci_pci" "usb_storage" ]; @@ -14,7 +15,8 @@ boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888"; + { + device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888"; fsType = "ext4"; }; diff --git a/nixos/hosts/rickenbacker/hardware-configuration.nix b/nixos/hosts/rickenbacker/hardware-configuration.nix index 3e84390..0e3b9a1 100644 --- a/nixos/hosts/rickenbacker/hardware-configuration.nix +++ b/nixos/hosts/rickenbacker/hardware-configuration.nix @@ -5,7 +5,8 @@ { imports = - [ (modulesPath + "/installer/scan/not-detected.nix") + [ + (modulesPath + "/installer/scan/not-detected.nix") ]; boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usbhid" "usb_storage" "sd_mod" ]; @@ -14,12 +15,14 @@ boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/fe728106-aaf8-46e6-ab46-1610f1f4398a"; + { + device = "/dev/disk/by-uuid/fe728106-aaf8-46e6-ab46-1610f1f4398a"; fsType = "ext4"; }; fileSystems."/boot" = - { device = "/dev/disk/by-uuid/44D0-91EC"; + { + device = "/dev/disk/by-uuid/44D0-91EC"; fsType = "vfat"; };