chore(CI): Run lint and format on PR #19

Merged
DashieTM merged 1 commit from ci into main 2025-09-07 14:51:52 +02:00
4 changed files with 47 additions and 24 deletions

View file

@ -1,13 +1,11 @@
# inspired by https://github.com/danth/stylix/blob/master/.github/workflows/docs.yml # inspired by https://github.com/danth/stylix/blob/master/.github/workflows/docs.yml
name: Rust-build name: PR check
on: on:
push:
branches: ["main"]
pull_request: pull_request:
branches: ["main"] branches: ["main"]
jobs: jobs:
build: build:
name: Build name: check
permissions: permissions:
contents: read contents: read
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -17,7 +15,7 @@ jobs:
with: with:
github-token: ${{ secrets.GITHUB_TOKEN }} github-token: ${{ secrets.GITHUB_TOKEN }}
extra-conf: | extra-conf: |
extra-experimental-features = nix-command flakes extra-experimental-features = nix-command flakes pipe-operators
- name: Set up cache - name: Set up cache
uses: DeterminateSystems/magic-nix-cache-action@main uses: DeterminateSystems/magic-nix-cache-action@main
- name: action - name: action
@ -30,4 +28,8 @@ jobs:
name: dashnix name: dashnix
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Linter check - name: Linter check
run: nix -L build github:${{ github.repository }}/${{ github.sha }} --no-write-lock-file run: nix run --no-write-lock-file github:${{ github.repository }}/${{ github.sha }}#lint -- check
- name: Format check
run: nix run --no-write-lock-file github:${{ github.repository }}/${{ github.sha }}#format -- --check .
- name: Build docs
run: nix -L build github:${{ github.repository }}/${{ github.sha }}#docs --no-write-lock-file

View file

@ -42,7 +42,7 @@
oxipaste.url = "github:Xetibo/OxiPaste"; oxipaste.url = "github:Xetibo/OxiPaste";
oxirun.url = "github:Xetibo/OxiRun"; oxirun.url = "github:Xetibo/OxiRun";
dashvim.url = "github:Xetibo/DashVim"; dashvim.url = "github:Xetibo/DashVim";
# For now until merged into Xetibo
hyprdock.url = "github:Xetibo/hyprdock"; hyprdock.url = "github:Xetibo/hyprdock";
reset.url = "github:Xetibo/ReSet"; reset.url = "github:Xetibo/ReSet";
reset-plugins.url = "github:Xetibo/ReSet-Plugins"; reset-plugins.url = "github:Xetibo/ReSet-Plugins";
@ -106,7 +106,7 @@
inherit (inputs.unstable) lib; inherit (inputs.unstable) lib;
inherit (dashNixLib) buildSystems; inherit (dashNixLib) buildSystems;
}; };
lint = unstable.statix; lint = inputs.statix.packages.${currentSystem}.default;
format = unstable.alejandra; format = unstable.alejandra;
dashNixInputs = inputs; dashNixInputs = inputs;
stablePkgs = stable; stablePkgs = stable;

View file

@ -1,58 +1,77 @@
{ {
pkgs, pkgs,
lib,
modulesPath, modulesPath,
lib,
self, self,
inputs, inputs,
... ...
}: let }: let
system = "x86_64-linux"; system = "x86_64-linux";
in { in {
imports = ["${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix"]; imports = ["${modulesPath}/installer/cd-dvd/iso-image.nix"];
nixpkgs.hostPlatform = { nixpkgs.hostPlatform = {
inherit system; inherit system;
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
neovim inputs.dashvim.packages.${system}.minimal
disko disko
git git
vesktop
vscodium
firefox firefox
kitty kitty
gnome-disk-utility gnome-disk-utility
inputs.disko.packages.${system}.disko-install inputs.disko.packages.${system}.disko-install
]; ];
networking = { networking = {
wireless.enable = false; wireless.enable = false;
networkmanager.enable = true; networkmanager.enable = true;
}; };
nix.settings.experimental-features = [ nix.settings.experimental-features = [
"nix-command" "nix-command"
"flakes" "flakes"
"pipe-operators" "pipe-operators"
]; ];
# gnome is a good default that works with every gpu and doesn't require knowledge about custom keybinds. users.users.nixos = {
services = { isNormalUser = true;
xserver = { password = "nixos";
extraGroups = ["wheel"];
};
image.baseName = lib.mkForce "Dashnix";
programs = {
hyprland = {
enable = true; enable = true;
displayManager = { withUWSM = true;
gdm.enable = true; xwayland.enable = false;
};
desktopManager = {
gnome.enable = true;
}; };
uwsm.enable = true;
}; };
fonts.packages = [pkgs.adwaita-fonts];
i18n.defaultLocale = "en_US.UTF-8";
services = {
displayManager.autoLogin = { displayManager.autoLogin = {
enable = true; enable = true;
user = "nixos"; user = "nixos";
}; };
greetd = {
enable = true;
settings = {
terminal.vt = 1;
default_session = {
command = "${lib.getExe pkgs.hyprland}";
user = "nixos";
};
};
};
}; };
isoImage = { isoImage = {
isoName = lib.mkForce "DashNix.iso";
makeEfiBootable = true; makeEfiBootable = true;
makeUsbBootable = true; makeUsbBootable = true;
contents = [ contents = [
@ -62,4 +81,6 @@ in {
} }
]; ];
}; };
system.stateVersion = "25.11";
} }

View file

@ -60,7 +60,7 @@
# no idea if these are written correctly # no idea if these are written correctly
example = [ example = [
pkgs.niri pkgs.niri
pkgs.river pkgs.river-classic
pkgs.swayfx pkgs.swayfx
]; ];
type = with lib.types; listOf package; type = with lib.types; listOf package;