Add USB auto-mounting and git-plan

This commit is contained in:
Konstantin Nazarov 2023-08-14 22:50:06 +01:00
parent ffa0476f2d
commit f76900ff9d
Signed by: knazarov
GPG key ID: 4CFE0A42FA409C22
3 changed files with 62 additions and 38 deletions

View file

@ -147,6 +147,7 @@ in
nheko nheko
mullvad-vpn mullvad-vpn
mullvad mullvad
usbutils
(clang-tools.override { llvmPackages = llvmPackages_16; }) # mainly for clang-format (clang-tools.override { llvmPackages = llvmPackages_16; }) # mainly for clang-format
(emacsWithPackagesFromUsePackage { (emacsWithPackagesFromUsePackage {
config = ./emacs.el; config = ./emacs.el;
@ -161,6 +162,8 @@ in
]; ];
}) })
# wget # wget
(python3.withPackages (ps: with ps; [
git_plan]))
]; ];
services.mullvad-vpn = { services.mullvad-vpn = {
@ -580,4 +583,8 @@ in
services.udev.packages = [ services.udev.packages = [
pkgs.android-udev-rules pkgs.android-udev-rules
]; ];
#udevadm info --query=all --name=/dev/sda1 | grep ID_SERIAL
services.udev.extraRules = ''
ACTION=="add", SUBSYSTEMS=="usb", SUBSYSTEM=="block", ENV{ID_FS_USAGE}=="filesystem", ENV{ID_SERIAL_SHORT}=="Hidizs_AP80PRO", RUN{program}+="${pkgs.systemd}/bin/systemd-mount --owner knazarov --no-block --automount=yes --collect $devnode /media"
'';
} }

View file

@ -6,14 +6,16 @@
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
"nixpkgs-stable": "nixpkgs-stable" "nixpkgs-stable": [
"nixpkgs-stable"
]
}, },
"locked": { "locked": {
"lastModified": 1691144360, "lastModified": 1691865829,
"narHash": "sha256-DPaalQfXWXbyiuSqbk0dWKusniMWQSzAu0e36xU6rbA=", "narHash": "sha256-5ceau8KBj7WpvfN/QHA0q+lZC3HjNK4CJ7O8c9m8THU=",
"owner": "nix-community", "owner": "nix-community",
"repo": "emacs-overlay", "repo": "emacs-overlay",
"rev": "4ba15d6f4310459e6da08dcd4d3df7f4d102bdf0", "rev": "e46cf9e07a3a6c4f065ace50976bf0f915c02d97",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -40,6 +42,26 @@
"type": "github" "type": "github"
} }
}, },
"git-plan": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1692049717,
"narHash": "sha256-Htsfis2u/WdjqW5l8n5cx9Ai+GdOd+GRqQAssBfLQp4=",
"owner": "~knazarov",
"repo": "git-plan",
"rev": "569d267cd4f15b55618c965b868a7361b5901c86",
"type": "sourcehut"
},
"original": {
"owner": "~knazarov",
"repo": "git-plan",
"type": "sourcehut"
}
},
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -47,11 +69,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1691143977, "lastModified": 1691856649,
"narHash": "sha256-zXHmmghQdDLecVxFedRxSny4FtVH9lig1/BKObsHwfg=", "narHash": "sha256-1/KYCwNyOPpUoyno9Yj3zMHITQaW+wPzVlJFPOPPCo4=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "15043a65915bcc16ad207d65b202659e4988066b", "rev": "406d34d919e9e8b831b531782cf5ef6995188566",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -67,11 +89,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1691271263, "lastModified": 1691958887,
"narHash": "sha256-ug+HYWVjjRoSLauLHwCJfqwbW52wfTt3aRi32vZGO2I=", "narHash": "sha256-6/0Wt+svfioYXPSmEznVk91yDQCMi4SKyfV2B3CiNjU=",
"owner": "~knazarov", "owner": "~knazarov",
"repo": "knazarov.com", "repo": "knazarov.com",
"rev": "ae2f5203317748f5d3c33fff9c069c479aeca819", "rev": "84eb860d09c485d8c24ec24bb02049596f497d02",
"type": "sourcehut" "type": "sourcehut"
}, },
"original": { "original": {
@ -82,11 +104,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1691167809, "lastModified": 1691877121,
"narHash": "sha256-f4JQE3ULUPsDxsoGMbtQlXDP9hLlDhoE8imqNLgPW2o=", "narHash": "sha256-JlW0e93cEFnJJaZrcV+Ffc+jx2IaZ26OZSOGIoHieRA=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "ed02e79bbe031a7ce9cf863660f10d3ef70b8636", "rev": "dc21f1731d007d3a6b8d33af47467f584691f31e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -97,11 +119,11 @@
}, },
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1690927903, "lastModified": 1691693223,
"narHash": "sha256-D5gCaCROnjEKDOel//8TO/pOP87pAEtT0uT8X+0Bj/U=", "narHash": "sha256-9t8ZY1XNAsWqxAJmXgg+GXqF5chORMVnBT6PSHaRV3I=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "bd836ac5e5a7358dea73cb74a013ca32864ccb86", "rev": "18784aac1013da9b442adf29b6c7c228518b5d3f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -111,22 +133,6 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-stable_2": {
"locked": {
"lastModified": 1690066826,
"narHash": "sha256-6L2qb+Zc0BFkh72OS9uuX637gniOjzU6qCDBpjB2LGY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ce45b591975d070044ca24e3003c830d26fea1c8",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "release-23.05",
"repo": "nixpkgs",
"type": "github"
}
},
"q-sh": { "q-sh": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -150,9 +156,11 @@
"root": { "root": {
"inputs": { "inputs": {
"emacs-overlay": "emacs-overlay", "emacs-overlay": "emacs-overlay",
"git-plan": "git-plan",
"home-manager": "home-manager", "home-manager": "home-manager",
"knazarovcom": "knazarovcom", "knazarovcom": "knazarovcom",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"nixpkgs-stable": "nixpkgs-stable",
"q-sh": "q-sh", "q-sh": "q-sh",
"sops-nix": "sops-nix", "sops-nix": "sops-nix",
"vmatveevacom": "vmatveevacom" "vmatveevacom": "vmatveevacom"
@ -163,14 +171,16 @@
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
"nixpkgs-stable": "nixpkgs-stable_2" "nixpkgs-stable": [
"nixpkgs-stable"
]
}, },
"locked": { "locked": {
"lastModified": 1690199016, "lastModified": 1691830846,
"narHash": "sha256-yTLL72q6aqGmzHq+C3rDp3rIjno7EJZkFLof6Ika7cE=", "narHash": "sha256-ffR5maL8R4gsoF43YZRSBVzB7qYxzG+Ssjjktg80Wy4=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "c36df4fe4bf4bb87759b1891cab21e7a05219500", "rev": "5f5d9a3c8bc247eb574823b9f16a79e054dafe73",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -4,21 +4,26 @@
{ {
inputs = { inputs = {
nixpkgs.url = github:NixOS/nixpkgs; nixpkgs.url = github:NixOS/nixpkgs;
nixpkgs-stable.url = github:NixOS/nixpkgs/nixos-23.05;
home-manager.url = github:nix-community/home-manager; home-manager.url = github:nix-community/home-manager;
home-manager.inputs.nixpkgs.follows = "nixpkgs"; home-manager.inputs.nixpkgs.follows = "nixpkgs";
emacs-overlay.url = github:nix-community/emacs-overlay; emacs-overlay.url = github:nix-community/emacs-overlay;
emacs-overlay.inputs.nixpkgs.follows = "nixpkgs"; emacs-overlay.inputs.nixpkgs.follows = "nixpkgs";
emacs-overlay.inputs.nixpkgs-stable.follows = "nixpkgs-stable";
sops-nix.url = github:Mic92/sops-nix; sops-nix.url = github:Mic92/sops-nix;
sops-nix.inputs.nixpkgs.follows = "nixpkgs"; sops-nix.inputs.nixpkgs.follows = "nixpkgs";
sops-nix.inputs.nixpkgs-stable.follows = "nixpkgs-stable";
q-sh.url = sourcehut:~knazarov/q.sh; q-sh.url = sourcehut:~knazarov/q.sh;
q-sh.inputs.nixpkgs.follows = "nixpkgs"; q-sh.inputs.nixpkgs.follows = "nixpkgs";
knazarovcom.url = sourcehut:~knazarov/knazarov.com; knazarovcom.url = sourcehut:~knazarov/knazarov.com;
knazarovcom.inputs.nixpkgs.follows = "nixpkgs"; knazarovcom.inputs.nixpkgs.follows = "nixpkgs";
vmatveevacom.url = github:valeriya-matveeva/vmatveeva.com; vmatveevacom.url = github:valeriya-matveeva/vmatveeva.com;
vmatveevacom.inputs.nixpkgs.follows = "nixpkgs"; vmatveevacom.inputs.nixpkgs.follows = "nixpkgs";
git-plan.url = sourcehut:~knazarov/git-plan;
git-plan.inputs.nixpkgs.follows = "nixpkgs";
}; };
outputs = { self, nixpkgs, home-manager, emacs-overlay, sops-nix, q-sh, knazarovcom, vmatveevacom, ... }@attrs: outputs = { self, nixpkgs, home-manager, emacs-overlay, sops-nix, q-sh, knazarovcom, vmatveevacom, git-plan, ... }@attrs:
let let
system = "x86_64-linux"; system = "x86_64-linux";
@ -34,7 +39,9 @@
}; };
node = dir: with hostAttrs dir; buildSystem [ node = dir: with hostAttrs dir; buildSystem [
({ config, pkgs, ... }: { nixpkgs.overlays = [ emacs-overlay.overlay q-sh.overlays.default]; }) ({ config, pkgs, ... }: { nixpkgs.overlays = [ emacs-overlay.overlay q-sh.overlays.default
git-plan.overlays.default
]; })
sops-nix.nixosModules.sops sops-nix.nixosModules.sops
home-manager.nixosModule home-manager.nixosModule
config config