feat: make the first kind of working quickshell flake
This commit is contained in:
@@ -111,7 +111,18 @@
|
|||||||
inherit src buildInputs nativeBuildInputs cargoArtifacts;
|
inherit src buildInputs nativeBuildInputs cargoArtifacts;
|
||||||
};
|
};
|
||||||
|
|
||||||
default = lib;
|
qmlModule = pkgs.runCommand "rshell-qml-dir" {} ''
|
||||||
|
mkdir -p $out
|
||||||
|
|
||||||
|
cat << EOF > $out/qmldir
|
||||||
|
${''
|
||||||
|
module one.krantz.rshell
|
||||||
|
plugin rshell ${lib}/lib
|
||||||
|
''}
|
||||||
|
EOF
|
||||||
|
'';
|
||||||
|
|
||||||
|
default = qmlModule;
|
||||||
};
|
};
|
||||||
|
|
||||||
checks = {
|
checks = {
|
||||||
@@ -145,18 +156,18 @@
|
|||||||
# Copy your main files
|
# Copy your main files
|
||||||
cp -r ${lib.sources.sourceFilesBySuffices ./qml [".qml"]}/* $out/
|
cp -r ${lib.sources.sourceFilesBySuffices ./qml [".qml"]}/* $out/
|
||||||
|
|
||||||
|
# Copy the rust plugin
|
||||||
|
cp -Lr ${self.packages.${pkgs.stdenv.hostPlatform.system}.qmlModule} $out/one.krantz.rshell
|
||||||
|
|
||||||
# Copy the nix generate qml files
|
# Copy the nix generate qml files
|
||||||
cp -Lr ${nixQmlDir} $out/nix
|
cp -Lr ${nixQmlDir} $out/nix
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nixQmlDir = let
|
nixQmlDir = pkgs.runCommand "nix-qml-dir" {} ''
|
||||||
cpText = drv: "ln -s ${drv} $out/${drv.name}";
|
mkdir -p $out/
|
||||||
in
|
|
||||||
pkgs.runCommand "nix-qml-dir" {} ''
|
|
||||||
mkdir -p $out
|
|
||||||
|
|
||||||
${cpText (
|
cat << EOF > $out/CodeDirStat.qml
|
||||||
pkgs.writeText "CodeDirStat.qml"
|
${
|
||||||
/*
|
/*
|
||||||
qml
|
qml
|
||||||
*/
|
*/
|
||||||
@@ -213,10 +224,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
''
|
''
|
||||||
)}
|
}
|
||||||
|
EOF
|
||||||
|
|
||||||
${cpText (
|
cat << EOF > $out/Theme.qml
|
||||||
pkgs.writeText "Theme.qml"
|
${
|
||||||
/*
|
/*
|
||||||
qml
|
qml
|
||||||
*/
|
*/
|
||||||
@@ -235,7 +247,8 @@
|
|||||||
)}
|
)}
|
||||||
}
|
}
|
||||||
''
|
''
|
||||||
)}
|
}
|
||||||
|
EOF
|
||||||
'';
|
'';
|
||||||
in {
|
in {
|
||||||
options.krantz.rshell = {
|
options.krantz.rshell = {
|
||||||
@@ -266,8 +279,9 @@
|
|||||||
systemd.enable = true;
|
systemd.enable = true;
|
||||||
|
|
||||||
configs = {
|
configs = {
|
||||||
"shell.qml" = "${qmlDir}/Bar.qml";
|
"shell.qml" = "${qmlDir}/shell.qml";
|
||||||
"nix" = nixQmlDir;
|
"nix" = nixQmlDir;
|
||||||
|
"one.krantz.rshell" = self.packages.${pkgs.stdenv.hostPlatform.system}.qmlModule;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import "nix"
|
import "nix"
|
||||||
|
|
||||||
import "one.krantz.rshell"
|
import "one.krantz.rshell"
|
||||||
|
|
||||||
import Quickshell
|
import Quickshell
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
import Quickshell
|
||||||
|
|
||||||
|
ShellRoot {
|
||||||
|
settings.watchFiles: true
|
||||||
|
|
||||||
|
Bar {}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user