Compare commits
8 Commits
457f310aa2
..
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
4b3685018d
|
|||
|
2f3caf8562
|
|||
|
3652da8f93
|
|||
|
bb5e2a0d72
|
|||
|
97505c9ad4
|
|||
|
add6e0ad0d
|
|||
|
de69d6fad8
|
|||
|
7dc8c4c29b
|
@@ -0,0 +1,33 @@
|
|||||||
|
name: "Flake.lock: update Nix dependencies for development environment only"
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch: # allows manual triggering
|
||||||
|
schedule:
|
||||||
|
- cron: '00 00 02 1/2 *' # runs the first of day the month every 2 months at 7:00pm local time (midnight UTC)
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
nix-flake-update:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: "install nix"
|
||||||
|
uses: cachix/install-nix-action@v31
|
||||||
|
|
||||||
|
- uses: photostructure/git-ssh-signing-action@v1
|
||||||
|
with:
|
||||||
|
ssh-signing-key: ${{ secrets.SSH_SIGNING_KEY }}
|
||||||
|
git-user-name: ${{ vars.GIT_USER_NAME }}
|
||||||
|
git-user-email: ${{ vars.GIT_USER_EMAIL }}
|
||||||
|
|
||||||
|
- name: "update flake.lock"
|
||||||
|
run: |
|
||||||
|
nix flake update --commit-lock-file
|
||||||
|
|
||||||
|
- name: "check flake for errors"
|
||||||
|
run: |
|
||||||
|
nix flake check
|
||||||
|
|
||||||
|
- name: "push update"
|
||||||
|
run: |
|
||||||
|
git push
|
||||||
Generated
+30
-5
@@ -2,11 +2,11 @@
|
|||||||
"nodes": {
|
"nodes": {
|
||||||
"crane": {
|
"crane": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1775839657,
|
"lastModified": 1777149905,
|
||||||
"narHash": "sha256-SPm9ck7jh3Un9nwPuMGbRU04UroFmOHjLP56T10MOeM=",
|
"narHash": "sha256-WMC5ktOHtCyJL/jtlf46P+I4Vhw938+oLlSpM8gwQwU=",
|
||||||
"owner": "ipetkov",
|
"owner": "ipetkov",
|
||||||
"repo": "crane",
|
"repo": "crane",
|
||||||
"rev": "7cf72d978629469c4bd4206b95c402514c1f6000",
|
"rev": "60c829383710f7e26454e6677c4d3adbc56dd3b8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -64,17 +64,42 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": {
|
"project-templates": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"crane": "crane",
|
"crane": "crane",
|
||||||
|
"flake-parts": [
|
||||||
|
"flake-parts"
|
||||||
|
],
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"treefmt-nix": "treefmt-nix"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1777183464,
|
||||||
|
"narHash": "sha256-aKh428176wYLo4KBAcadw5sqseSPAQ64pN0Qi8f2tXs=",
|
||||||
|
"ref": "refs/heads/master",
|
||||||
|
"rev": "b1a2a8d97b6beae0cbea89908306a496425c610c",
|
||||||
|
"revCount": 14,
|
||||||
|
"type": "git",
|
||||||
|
"url": "ssh://gitea@git.krantz.one/reed/project-templates"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "ssh://gitea@git.krantz.one/reed/project-templates"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
"flake-parts": "flake-parts",
|
"flake-parts": "flake-parts",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"treefmt-nix": "treefmt-nix"
|
"project-templates": "project-templates"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"treefmt-nix": {
|
"treefmt-nix": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
"project-templates",
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -6,35 +6,46 @@
|
|||||||
|
|
||||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||||
|
|
||||||
treefmt-nix = {
|
project-templates = {
|
||||||
url = "github:numtide/treefmt-nix";
|
url = "git+https://git.krantz.one/reed/project-templates";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
inputs.flake-parts.follows = "flake-parts";
|
||||||
};
|
};
|
||||||
|
|
||||||
crane.url = "github:ipetkov/crane";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {
|
outputs = {
|
||||||
self,
|
self,
|
||||||
flake-parts,
|
flake-parts,
|
||||||
treefmt-nix,
|
project-templates,
|
||||||
crane,
|
|
||||||
...
|
...
|
||||||
} @ inputs:
|
} @ inputs:
|
||||||
flake-parts.lib.mkFlake {inherit inputs;} {
|
flake-parts.lib.mkFlake {inherit inputs;} {
|
||||||
imports = [
|
imports = [
|
||||||
treefmt-nix.flakeModule
|
project-templates.flakeModules.rust
|
||||||
];
|
];
|
||||||
|
|
||||||
systems = ["aarch64-linux" "x86_64-linux" "aarch64-darwin" "x86_64-darwin"];
|
systems = ["aarch64-linux" "x86_64-linux" "aarch64-darwin"];
|
||||||
|
|
||||||
perSystem = {
|
perSystem = {
|
||||||
pkgs,
|
|
||||||
lib,
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
self',
|
||||||
...
|
...
|
||||||
}: let
|
}: {
|
||||||
craneLib = crane.mkLib pkgs;
|
krantz.rust = let
|
||||||
src = let
|
craneLib = config.krantz.rust.craneLib;
|
||||||
|
|
||||||
|
# pkgs.qt6.env already includes pkgs.qt6.qtbase
|
||||||
|
# And using `with` to prevent a lot of typing.
|
||||||
|
qtEnv = with pkgs.qt6;
|
||||||
|
env "qt-rshell-${qtbase.version}" [
|
||||||
|
qtdeclarative
|
||||||
|
qttools
|
||||||
|
];
|
||||||
|
in {
|
||||||
|
enable = true;
|
||||||
|
srcFiltered = let
|
||||||
unfilteredRoot = ./.;
|
unfilteredRoot = ./.;
|
||||||
in
|
in
|
||||||
lib.fileset.toSource {
|
lib.fileset.toSource {
|
||||||
@@ -45,45 +56,16 @@
|
|||||||
(lib.fileset.maybeMissing ./qt-plugin.version)
|
(lib.fileset.maybeMissing ./qt-plugin.version)
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
manifest = (lib.importTOML "${src}/Cargo.toml").package;
|
|
||||||
|
|
||||||
# pkgs.qt6.env already includes pkgs.qt6.qtbase
|
runtimeDeps = [
|
||||||
# And using `with` to prevent a lot of typing.
|
|
||||||
qtEnv = with pkgs.qt6;
|
|
||||||
env "qt-rshell-${qtbase.version}" [
|
|
||||||
qtdeclarative
|
|
||||||
qttools
|
|
||||||
];
|
|
||||||
|
|
||||||
# runtime dependencies
|
|
||||||
buildInputs = with pkgs; [
|
|
||||||
qtEnv
|
qtEnv
|
||||||
];
|
];
|
||||||
|
devDeps = with pkgs; [
|
||||||
# build dependencies
|
|
||||||
nativeBuildInputs = with pkgs; [
|
|
||||||
# pkg-config
|
|
||||||
# rustPlatform.bindgenHook
|
|
||||||
];
|
|
||||||
|
|
||||||
# Build *just* the cargo dependencies, so we can reuse
|
|
||||||
# all of that work (e.g. via cachix) when running in CI
|
|
||||||
cargoArtifacts = craneLib.buildDepsOnly {
|
|
||||||
inherit src buildInputs nativeBuildInputs;
|
|
||||||
};
|
|
||||||
in rec {
|
|
||||||
# Dev Shell that lets you enter an environment with all the necessary utilites
|
|
||||||
# Available through 'nix develop'
|
|
||||||
# Also can be activated automatically if direnv is installed on the system with 'direnv allow'
|
|
||||||
devShells.default = craneLib.devShell {
|
|
||||||
inherit checks;
|
|
||||||
|
|
||||||
# extra tooling dependencies
|
|
||||||
packages = with pkgs; [
|
|
||||||
rust-analyzer
|
rust-analyzer
|
||||||
quickshell
|
quickshell
|
||||||
];
|
];
|
||||||
|
|
||||||
|
devShell.extraAttrs = {
|
||||||
shellHook =
|
shellHook =
|
||||||
/*
|
/*
|
||||||
bash
|
bash
|
||||||
@@ -91,50 +73,31 @@
|
|||||||
''
|
''
|
||||||
export QML2_IMPORT_PATH=$(git rev-parse --show-toplevel)/result/:$QML2_IMPORT_PATH
|
export QML2_IMPORT_PATH=$(git rev-parse --show-toplevel)/result/:$QML2_IMPORT_PATH
|
||||||
'';
|
'';
|
||||||
|
|
||||||
inputsFrom = [packages.default];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Formatter for nix files, available through 'nix fmt'
|
package.name = "lib";
|
||||||
treefmt = {
|
|
||||||
programs.alejandra.enable = true;
|
|
||||||
programs.rustfmt = {
|
|
||||||
enable = true;
|
|
||||||
edition = manifest.edition;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Your custom packages
|
# Your custom packages
|
||||||
# Accessible through 'nix build', 'nix shell', 'nix run', etc
|
# Accessible through 'nix build', 'nix shell', 'nix run', etc
|
||||||
packages = rec {
|
packages = {
|
||||||
lib = craneLib.buildPackage {
|
|
||||||
inherit src buildInputs nativeBuildInputs cargoArtifacts;
|
|
||||||
};
|
|
||||||
|
|
||||||
qmlModule = pkgs.runCommand "rshell-qml-dir" {} ''
|
qmlModule = pkgs.runCommand "rshell-qml-dir" {} ''
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
|
|
||||||
cat << EOF > $out/qmldir
|
cat << EOF > $out/qmldir
|
||||||
${''
|
${''
|
||||||
module one.krantz.rshell
|
module one.krantz.rshell
|
||||||
plugin rshell ${lib}/lib
|
plugin rshell ${self'.packages.lib}/lib
|
||||||
''}
|
''}
|
||||||
EOF
|
EOF
|
||||||
'';
|
'';
|
||||||
|
|
||||||
default = qmlModule;
|
default = self'.packages.qmlModule;
|
||||||
};
|
|
||||||
|
|
||||||
checks = {
|
|
||||||
clippy = craneLib.cargoClippy {
|
|
||||||
inherit src buildInputs nativeBuildInputs cargoArtifacts;
|
|
||||||
cargoClippyExtraArgs = "-- --deny warnings";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
flake = {
|
flake = {
|
||||||
homeManagerModules.default = {
|
homeModules.default = {
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import "nix"
|
import "nix"
|
||||||
|
|
||||||
import Quickshell
|
import Quickshell
|
||||||
|
import Quickshell.Io
|
||||||
import Quickshell.Wayland
|
import Quickshell.Wayland
|
||||||
|
|
||||||
import QtQuick
|
import QtQuick
|
||||||
@@ -14,6 +15,8 @@ import QtQuick.Layouts
|
|||||||
PanelWindow {
|
PanelWindow {
|
||||||
id: win
|
id: win
|
||||||
|
|
||||||
|
visible: false
|
||||||
|
|
||||||
anchors {
|
anchors {
|
||||||
top: true
|
top: true
|
||||||
bottom: true
|
bottom: true
|
||||||
@@ -231,4 +234,12 @@ PanelWindow {
|
|||||||
appList.clear();
|
appList.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IpcHandler {
|
||||||
|
target: "launcher"
|
||||||
|
|
||||||
|
function search(): void {
|
||||||
|
win.visible = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -4,4 +4,5 @@ ShellRoot {
|
|||||||
settings.watchFiles: true
|
settings.watchFiles: true
|
||||||
|
|
||||||
Bar {}
|
Bar {}
|
||||||
|
Launcher {}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user