1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-05 21:15:38 -05:00

update & cleanup flake (#526)

This commit is contained in:
bokicoder
2025-10-22 22:59:23 +08:00
committed by GitHub
parent 378def1fa3
commit e55a517dae
3 changed files with 94 additions and 46 deletions

94
flake.lock generated
View File

@@ -22,16 +22,17 @@
},
"dms-cli": {
"inputs": {
"gomod2nix": "gomod2nix",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1760241259,
"narHash": "sha256-DlLGn+4M6tIafoDsHr2WhHG2hrHrC24S2IL3+KAvjEU=",
"lastModified": 1761135910,
"narHash": "sha256-51m0k2BN6EjUKZI/tRs563HqGPhsM639kwuXcqxuniM=",
"owner": "AvengeMedia",
"repo": "danklinux",
"rev": "dae4c3ff4ce0feb930361c399747edb29d081775",
"rev": "d42b58f35c129e893819742746f11ef7e82be56f",
"type": "github"
},
"original": {
@@ -40,48 +41,83 @@
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"gomod2nix": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"dms-cli",
"nixpkgs"
]
},
"locked": {
"lastModified": 1756047880,
"narHash": "sha256-JeuGh9kA1SPL70fnvpLxkIkCWpTjtoPaus3jzvdna0k=",
"owner": "nix-community",
"repo": "gomod2nix",
"rev": "47d628dc3b506bd28632e47280c6b89d3496909d",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "v1.7.0",
"repo": "gomod2nix",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1760164275,
"narHash": "sha256-gKl2Gtro/LNf8P+4L3S2RsZ0G390ccd5MyXYrTdMCFE=",
"lastModified": 1760878510,
"narHash": "sha256-K5Osef2qexezUfs0alLvZ7nQFTGS9DL2oTVsIXsqLgs=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "362791944032cb532aabbeed7887a441496d5e6e",
"rev": "5e2a59a5b1a82f89f2c7e598302a9cacebb72a67",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"quickshell": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1760228179,
"narHash": "sha256-4Z6k7lv3Zcgk3K+4h60LpqB9wCkR+utkYERU735U068=",
"ref": "refs/heads/master",
"rev": "c9d3ffb6043c5bf3f3009202bad7e0e5132c4a25",
"revCount": 693,
"type": "git",
"url": "https://git.outfoxxed.me/quickshell/quickshell"
},
"original": {
"type": "git",
"url": "https://git.outfoxxed.me/quickshell/quickshell"
}
},
"root": {
"inputs": {
"dgop": "dgop",
"dms-cli": "dms-cli",
"nixpkgs": "nixpkgs",
"quickshell": "quickshell"
"nixpkgs": "nixpkgs"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},

View File

@@ -2,11 +2,7 @@
description = "Dank Material Shell";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixpkgs-unstable";
quickshell = {
url = "git+https://git.outfoxxed.me/quickshell/quickshell";
inputs.nixpkgs.follows = "nixpkgs";
};
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
dgop = {
url = "github:AvengeMedia/dgop";
inputs.nixpkgs.follows = "nixpkgs";
@@ -20,7 +16,6 @@
outputs = {
self,
nixpkgs,
quickshell,
dgop,
dms-cli,
...
@@ -38,18 +33,37 @@
formatter = forEachSystem (_: pkgs: pkgs.alejandra);
packages = forEachSystem (system: pkgs: {
dankMaterialShell = pkgs.stdenvNoCC.mkDerivation {
name = "dankMaterialShell";
dankMaterialShell = let
mkDate = longDate: pkgs.lib.concatStringsSep "-" [
(builtins.substring 0 4 longDate)
(builtins.substring 4 2 longDate)
(builtins.substring 6 2 longDate)
];
in pkgs.stdenvNoCC.mkDerivation {
pname = "dankMaterialShell";
version = pkgs.lib.removePrefix "v" (pkgs.lib.trim (builtins.readFile ./VERSION))
+ "+date=" + mkDate (self.lastModifiedDate or "19700101")
+ "_" + (self.shortRev or "dirty");
src = pkgs.lib.cleanSourceWith {
src = ./.;
filter = path: type:
!(builtins.any (prefix: pkgs.lib.path.hasPrefix (./. + prefix) (/. + path)) [
/.github
/.gitignore
/dms.spec
/dms-greeter.spec
/nix
/flake.nix
/flake.lock
/alejandra.toml
]);
};
installPhase = ''
mkdir -p $out/etc/xdg/quickshell/DankMaterialShell
cp -r . $out/etc/xdg/quickshell/DankMaterialShell
ln -s $out/etc/xdg/quickshell/DankMaterialShell $out/etc/xdg/quickshell/dms
mkdir -p $out/etc/xdg/quickshell/dms
cp -r . $out/etc/xdg/quickshell/dms
'';
};
quickshell = quickshell.packages.${system}.default;
default = self.packages.${system}.dankMaterialShell;
});

View File

@@ -99,9 +99,7 @@ in {
enable = true;
package = cfg.quickshell.package;
configs.dms = "${
dmsPkgs.dankMaterialShell
}/etc/xdg/quickshell/DankMaterialShell";
configs.dms = "${dmsPkgs.dankMaterialShell}/etc/xdg/quickshell/dms";
};
systemd.user.services.dms = lib.mkIf cfg.enableSystemd {