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
mullvad-vpn
mullvad
usbutils
(clang-tools.override { llvmPackages = llvmPackages_16; }) # mainly for clang-format
(emacsWithPackagesFromUsePackage {
config = ./emacs.el;
@ -161,6 +162,8 @@ in
];
})
# wget
(python3.withPackages (ps: with ps; [
git_plan]))
];
services.mullvad-vpn = {
@ -580,4 +583,8 @@ in
services.udev.packages = [
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-stable": "nixpkgs-stable"
"nixpkgs-stable": [
"nixpkgs-stable"
]
},
"locked": {
"lastModified": 1691144360,
"narHash": "sha256-DPaalQfXWXbyiuSqbk0dWKusniMWQSzAu0e36xU6rbA=",
"lastModified": 1691865829,
"narHash": "sha256-5ceau8KBj7WpvfN/QHA0q+lZC3HjNK4CJ7O8c9m8THU=",
"owner": "nix-community",
"repo": "emacs-overlay",
"rev": "4ba15d6f4310459e6da08dcd4d3df7f4d102bdf0",
"rev": "e46cf9e07a3a6c4f065ace50976bf0f915c02d97",
"type": "github"
},
"original": {
@ -40,6 +42,26 @@
"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": {
"inputs": {
"nixpkgs": [
@ -47,11 +69,11 @@
]
},
"locked": {
"lastModified": 1691143977,
"narHash": "sha256-zXHmmghQdDLecVxFedRxSny4FtVH9lig1/BKObsHwfg=",
"lastModified": 1691856649,
"narHash": "sha256-1/KYCwNyOPpUoyno9Yj3zMHITQaW+wPzVlJFPOPPCo4=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "15043a65915bcc16ad207d65b202659e4988066b",
"rev": "406d34d919e9e8b831b531782cf5ef6995188566",
"type": "github"
},
"original": {
@ -67,11 +89,11 @@
]
},
"locked": {
"lastModified": 1691271263,
"narHash": "sha256-ug+HYWVjjRoSLauLHwCJfqwbW52wfTt3aRi32vZGO2I=",
"lastModified": 1691958887,
"narHash": "sha256-6/0Wt+svfioYXPSmEznVk91yDQCMi4SKyfV2B3CiNjU=",
"owner": "~knazarov",
"repo": "knazarov.com",
"rev": "ae2f5203317748f5d3c33fff9c069c479aeca819",
"rev": "84eb860d09c485d8c24ec24bb02049596f497d02",
"type": "sourcehut"
},
"original": {
@ -82,11 +104,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1691167809,
"narHash": "sha256-f4JQE3ULUPsDxsoGMbtQlXDP9hLlDhoE8imqNLgPW2o=",
"lastModified": 1691877121,
"narHash": "sha256-JlW0e93cEFnJJaZrcV+Ffc+jx2IaZ26OZSOGIoHieRA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ed02e79bbe031a7ce9cf863660f10d3ef70b8636",
"rev": "dc21f1731d007d3a6b8d33af47467f584691f31e",
"type": "github"
},
"original": {
@ -97,11 +119,11 @@
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1690927903,
"narHash": "sha256-D5gCaCROnjEKDOel//8TO/pOP87pAEtT0uT8X+0Bj/U=",
"lastModified": 1691693223,
"narHash": "sha256-9t8ZY1XNAsWqxAJmXgg+GXqF5chORMVnBT6PSHaRV3I=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "bd836ac5e5a7358dea73cb74a013ca32864ccb86",
"rev": "18784aac1013da9b442adf29b6c7c228518b5d3f",
"type": "github"
},
"original": {
@ -111,22 +133,6 @@
"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": {
"inputs": {
"nixpkgs": [
@ -150,9 +156,11 @@
"root": {
"inputs": {
"emacs-overlay": "emacs-overlay",
"git-plan": "git-plan",
"home-manager": "home-manager",
"knazarovcom": "knazarovcom",
"nixpkgs": "nixpkgs",
"nixpkgs-stable": "nixpkgs-stable",
"q-sh": "q-sh",
"sops-nix": "sops-nix",
"vmatveevacom": "vmatveevacom"
@ -163,14 +171,16 @@
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable_2"
"nixpkgs-stable": [
"nixpkgs-stable"
]
},
"locked": {
"lastModified": 1690199016,
"narHash": "sha256-yTLL72q6aqGmzHq+C3rDp3rIjno7EJZkFLof6Ika7cE=",
"lastModified": 1691830846,
"narHash": "sha256-ffR5maL8R4gsoF43YZRSBVzB7qYxzG+Ssjjktg80Wy4=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "c36df4fe4bf4bb87759b1891cab21e7a05219500",
"rev": "5f5d9a3c8bc247eb574823b9f16a79e054dafe73",
"type": "github"
},
"original": {

View file

@ -4,21 +4,26 @@
{
inputs = {
nixpkgs.url = github:NixOS/nixpkgs;
nixpkgs-stable.url = github:NixOS/nixpkgs/nixos-23.05;
home-manager.url = github:nix-community/home-manager;
home-manager.inputs.nixpkgs.follows = "nixpkgs";
emacs-overlay.url = github:nix-community/emacs-overlay;
emacs-overlay.inputs.nixpkgs.follows = "nixpkgs";
emacs-overlay.inputs.nixpkgs-stable.follows = "nixpkgs-stable";
sops-nix.url = github:Mic92/sops-nix;
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
sops-nix.inputs.nixpkgs-stable.follows = "nixpkgs-stable";
q-sh.url = sourcehut:~knazarov/q.sh;
q-sh.inputs.nixpkgs.follows = "nixpkgs";
knazarovcom.url = sourcehut:~knazarov/knazarov.com;
knazarovcom.inputs.nixpkgs.follows = "nixpkgs";
vmatveevacom.url = github:valeriya-matveeva/vmatveeva.com;
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
system = "x86_64-linux";
@ -34,7 +39,9 @@
};
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
home-manager.nixosModule
config