flake: add nix-index-database
This commit is contained in:
parent
7510f37117
commit
fc1c829d3a
21
flake.lock
21
flake.lock
|
@ -253,6 +253,26 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nix-index-database": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1700967448,
|
||||||
|
"narHash": "sha256-sWVi7Nm/fuTgwN8R7Tt3GM3vBP3r6M1/lhX0+LK3p7E=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nix-index-database",
|
||||||
|
"rev": "d189d05f9de237d3b554c91029f9cb78efec8ace",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nix-index-database",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixos-hardware": {
|
"nixos-hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1700559156,
|
"lastModified": 1700559156,
|
||||||
|
@ -414,6 +434,7 @@
|
||||||
"maubot": "maubot",
|
"maubot": "maubot",
|
||||||
"mobile-nixos": "mobile-nixos",
|
"mobile-nixos": "mobile-nixos",
|
||||||
"nix-gaming": "nix-gaming",
|
"nix-gaming": "nix-gaming",
|
||||||
|
"nix-index-database": "nix-index-database",
|
||||||
"nixos-hardware": "nixos-hardware",
|
"nixos-hardware": "nixos-hardware",
|
||||||
"nixos-mailserver": "nixos-mailserver",
|
"nixos-mailserver": "nixos-mailserver",
|
||||||
"nixos-router": "nixos-router",
|
"nixos-router": "nixos-router",
|
||||||
|
|
|
@ -6,6 +6,10 @@
|
||||||
# nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
# nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
nixpkgs.url = "github:chayleaf/nixpkgs";
|
nixpkgs.url = "github:chayleaf/nixpkgs";
|
||||||
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
||||||
|
nix-index-database = {
|
||||||
|
url = "github:nix-community/nix-index-database";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
mobile-nixos = {
|
mobile-nixos = {
|
||||||
# url = "github:NixOS/mobile-nixos";
|
# url = "github:NixOS/mobile-nixos";
|
||||||
url = "github:chayleaf/mobile-nixos/fix-op6-modem";
|
url = "github:chayleaf/mobile-nixos/fix-op6-modem";
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ config
|
||||||
|
, pkgs
|
||||||
|
, lib
|
||||||
|
, inputs
|
||||||
|
, ...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./options.nix
|
./options.nix
|
||||||
|
@ -183,27 +189,7 @@
|
||||||
text/html; ${pkgs.w3m}/bin/w3m -dump -o document_charset=%{charset} -o display_link_number=1 '%s'; nametemplate=%s.html; copiousoutput
|
text/html; ${pkgs.w3m}/bin/w3m -dump -o document_charset=%{charset} -o display_link_number=1 '%s'; nametemplate=%s.html; copiousoutput
|
||||||
'';
|
'';
|
||||||
|
|
||||||
systemd.user.timers.nix-index = {
|
home.file.".cache/nix-index/files".source = assert config.xdg.cacheHome == "${config.home.homeDirectory}/.cache"; inputs.nix-index-database.legacyPackages.${pkgs.system}.database;
|
||||||
Install.WantedBy = [ "timers.target" ];
|
|
||||||
Unit = {
|
|
||||||
Description = "Update nix-index";
|
|
||||||
PartOf = [ "nix-index.service" ];
|
|
||||||
};
|
|
||||||
Timer = {
|
|
||||||
OnCalendar = "Mon *-*-* 00:00:00";
|
|
||||||
RandomizedDelaySec = 600;
|
|
||||||
Persistent = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
systemd.user.services.nix-index = {
|
|
||||||
Unit.Description = "Update nix-index";
|
|
||||||
Service = {
|
|
||||||
Type = "oneshot";
|
|
||||||
ExecStart = "${config.programs.nix-index.package}/bin/nix-index";
|
|
||||||
Environment = [ "PATH=/home/${config.home.username}/.nix-profile/bin:/etc/profiles/per-user/${config.home.username}/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin" ];
|
|
||||||
TimeoutStartSec = 1800;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.user.tmpfiles.rules = builtins.map (file: "r! \"/home/${config.home.username}/${file}\"") [
|
systemd.user.tmpfiles.rules = builtins.map (file: "r! \"/home/${config.home.username}/${file}\"") [
|
||||||
".local/share/clipman.json"
|
".local/share/clipman.json"
|
||||||
|
|
|
@ -355,7 +355,6 @@ in
|
||||||
"--locked --inhibited --release XF86PowerOff" = lib.mkIf config.phone.enable "exec ${pkgs.writeShellScript "power-key" ''
|
"--locked --inhibited --release XF86PowerOff" = lib.mkIf config.phone.enable "exec ${pkgs.writeShellScript "power-key" ''
|
||||||
if ${config.wayland.windowManager.sway.package}/bin/swaymsg -rt get_outputs | ${pkgs.jq}/bin/jq ".[].power" | ${pkgs.gnugrep}/bin/grep true; then
|
if ${config.wayland.windowManager.sway.package}/bin/swaymsg -rt get_outputs | ${pkgs.jq}/bin/jq ".[].power" | ${pkgs.gnugrep}/bin/grep true; then
|
||||||
${dpms-off}
|
${dpms-off}
|
||||||
${lock-script}
|
|
||||||
else
|
else
|
||||||
${dpms-on}
|
${dpms-on}
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue