From 0fa45657f0562d0592cbbd65ab58e82f43c8b060 Mon Sep 17 00:00:00 2001 From: Dashie Date: Sun, 7 Sep 2025 14:51:52 +0200 Subject: [PATCH] chore(CI): Run lint and format on PR (#19) --- .github/workflows/pr.yaml | 14 +++++----- flake.nix | 4 +-- iso/configuration.nix | 51 ++++++++++++++++++++++++++----------- modules/programs/greetd.nix | 2 +- 4 files changed, 47 insertions(+), 24 deletions(-) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 7037e7f..e92ddfd 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -1,13 +1,11 @@ # inspired by https://github.com/danth/stylix/blob/master/.github/workflows/docs.yml -name: Rust-build +name: PR check on: - push: - branches: ["main"] pull_request: branches: ["main"] jobs: build: - name: Build + name: check permissions: contents: read runs-on: ubuntu-latest @@ -17,7 +15,7 @@ jobs: with: github-token: ${{ secrets.GITHUB_TOKEN }} extra-conf: | - extra-experimental-features = nix-command flakes + extra-experimental-features = nix-command flakes pipe-operators - name: Set up cache uses: DeterminateSystems/magic-nix-cache-action@main - name: action @@ -30,4 +28,8 @@ jobs: name: dashnix authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' - 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 diff --git a/flake.nix b/flake.nix index 8536734..523c82b 100644 --- a/flake.nix +++ b/flake.nix @@ -42,7 +42,7 @@ oxipaste.url = "github:Xetibo/OxiPaste"; oxirun.url = "github:Xetibo/OxiRun"; dashvim.url = "github:Xetibo/DashVim"; - # For now until merged into Xetibo + hyprdock.url = "github:Xetibo/hyprdock"; reset.url = "github:Xetibo/ReSet"; reset-plugins.url = "github:Xetibo/ReSet-Plugins"; @@ -106,7 +106,7 @@ inherit (inputs.unstable) lib; inherit (dashNixLib) buildSystems; }; - lint = unstable.statix; + lint = inputs.statix.packages.${currentSystem}.default; format = unstable.alejandra; dashNixInputs = inputs; stablePkgs = stable; diff --git a/iso/configuration.nix b/iso/configuration.nix index 8bfcc1e..703e6d3 100644 --- a/iso/configuration.nix +++ b/iso/configuration.nix @@ -1,58 +1,77 @@ { pkgs, - lib, modulesPath, + lib, self, inputs, ... }: let system = "x86_64-linux"; in { - imports = ["${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix"]; + imports = ["${modulesPath}/installer/cd-dvd/iso-image.nix"]; nixpkgs.hostPlatform = { inherit system; }; environment.systemPackages = with pkgs; [ - neovim + inputs.dashvim.packages.${system}.minimal disko git - vesktop - vscodium firefox kitty gnome-disk-utility inputs.disko.packages.${system}.disko-install ]; + networking = { wireless.enable = false; networkmanager.enable = true; }; + nix.settings.experimental-features = [ "nix-command" "flakes" "pipe-operators" ]; - # gnome is a good default that works with every gpu and doesn't require knowledge about custom keybinds. - services = { - xserver = { + users.users.nixos = { + isNormalUser = true; + password = "nixos"; + extraGroups = ["wheel"]; + }; + + image.baseName = lib.mkForce "Dashnix"; + + programs = { + hyprland = { enable = true; - displayManager = { - gdm.enable = true; - }; - desktopManager = { - gnome.enable = true; - }; + withUWSM = true; + xwayland.enable = false; }; + uwsm.enable = true; + }; + + fonts.packages = [pkgs.adwaita-fonts]; + i18n.defaultLocale = "en_US.UTF-8"; + + services = { displayManager.autoLogin = { enable = true; user = "nixos"; }; + greetd = { + enable = true; + settings = { + terminal.vt = 1; + default_session = { + command = "${lib.getExe pkgs.hyprland}"; + user = "nixos"; + }; + }; + }; }; isoImage = { - isoName = lib.mkForce "DashNix.iso"; makeEfiBootable = true; makeUsbBootable = true; contents = [ @@ -62,4 +81,6 @@ in { } ]; }; + + system.stateVersion = "25.11"; } diff --git a/modules/programs/greetd.nix b/modules/programs/greetd.nix index d632b6f..22954a1 100644 --- a/modules/programs/greetd.nix +++ b/modules/programs/greetd.nix @@ -60,7 +60,7 @@ # no idea if these are written correctly example = [ pkgs.niri - pkgs.river + pkgs.river-classic pkgs.swayfx ]; type = with lib.types; listOf package;