Merge pull request #7 from truxnell/ci

feat: add auto lint workflow
This commit is contained in:
Truxnell 2024-03-26 21:31:32 +11:00 committed by GitHub
commit 2cf734b123
7 changed files with 58 additions and 13 deletions

38
.github/workflows/nix-lint.yaml vendored Normal file
View file

@ -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 '<nixpkgs>'
- 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

View file

@ -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 = {

View file

@ -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";
};

View file

@ -1,5 +1,4 @@
{...
}:
_:
{

View file

@ -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 {

View file

@ -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";
};

View file

@ -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";
};