Skip to content

Commit 7130567

Browse files
committed
update & cleanup flake
1 parent 4798687 commit 7130567

File tree

3 files changed

+88
-40
lines changed

3 files changed

+88
-40
lines changed

flake.lock

Lines changed: 60 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@
22
description = "Dank Material Shell";
33

44
inputs = {
5-
nixpkgs.url = "github:nixos/nixpkgs?ref=nixpkgs-unstable";
6-
quickshell = {
7-
url = "git+https://git.outfoxxed.me/quickshell/quickshell";
8-
inputs.nixpkgs.follows = "nixpkgs";
9-
};
5+
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
106
dgop = {
117
url = "github:AvengeMedia/dgop";
128
inputs.nixpkgs.follows = "nixpkgs";
@@ -20,7 +16,6 @@
2016
outputs = {
2117
self,
2218
nixpkgs,
23-
quickshell,
2419
dgop,
2520
dms-cli,
2621
...
@@ -38,18 +33,37 @@
3833
formatter = forEachSystem (_: pkgs: pkgs.alejandra);
3934

4035
packages = forEachSystem (system: pkgs: {
41-
dankMaterialShell = pkgs.stdenvNoCC.mkDerivation {
36+
dankMaterialShell = let
37+
mkDate = longDate: pkgs.lib.concatStringsSep "-" [
38+
(builtins.substring 0 4 longDate)
39+
(builtins.substring 4 2 longDate)
40+
(builtins.substring 6 2 longDate)
41+
];
42+
in pkgs.stdenvNoCC.mkDerivation {
4243
name = "dankMaterialShell";
43-
src = ./.;
44+
version = pkgs.lib.removePrefix "v" (pkgs.lib.trim (builtins.readFile ./VERSION))
45+
+ "+date=" + mkDate (self.lastModifiedDate or "19700101")
46+
+ "_" + (self.shortRev or "dirty");
47+
src = pkgs.lib.cleanSourceWith {
48+
src = ./.;
49+
filter = path: type:
50+
!(builtins.any (prefix: pkgs.lib.path.hasPrefix (./. + prefix) (/. + path)) [
51+
/.github
52+
/.gitignore
53+
/dms.spec
54+
/dms-greeter.spec
55+
/nix
56+
/flake.nix
57+
/flake.lock
58+
/alejandra.toml
59+
]);
60+
};
4461
installPhase = ''
45-
mkdir -p $out/etc/xdg/quickshell/DankMaterialShell
46-
cp -r . $out/etc/xdg/quickshell/DankMaterialShell
47-
ln -s $out/etc/xdg/quickshell/DankMaterialShell $out/etc/xdg/quickshell/dms
62+
mkdir -p $out/etc/xdg/quickshell/dms
63+
cp -r . $out/etc/xdg/quickshell/dms
4864
'';
4965
};
5066

51-
quickshell = quickshell.packages.${system}.default;
52-
5367
default = self.packages.${system}.dankMaterialShell;
5468
});
5569

nix/default.nix

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,7 @@ in {
9999
enable = true;
100100
package = cfg.quickshell.package;
101101

102-
configs.dms = "${
103-
dmsPkgs.dankMaterialShell
104-
}/etc/xdg/quickshell/DankMaterialShell";
102+
configs.dms = "${dmsPkgs.dankMaterialShell}/etc/xdg/quickshell/dms";
105103
};
106104

107105
systemd.user.services.dms = lib.mkIf cfg.enableSystemd {

0 commit comments

Comments
 (0)