mirror of
https://github.com/oqyude/nixos.git
synced 2026-06-11 04:30:41 +03:00
Init
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
{ inputs, ... }@flakeContext:
|
||||
let
|
||||
pkgs-stable = import inputs.nixpkgs-fingerprint { system = "x86_64-linux"; };
|
||||
in
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
security.pam.services.login.fprintAuth = false;
|
||||
services = {
|
||||
fprintd = {
|
||||
enable = true;
|
||||
package = pkgs-stable.fprintd.override {
|
||||
libfprint = pkgs-stable.libfprint.overrideAttrs (oldAttrs: {
|
||||
version = "git";
|
||||
src = pkgs-stable.fetchFromGitHub {
|
||||
owner = "ericlinagora";
|
||||
repo = "libfprint-CS9711";
|
||||
rev = "c242a40fcc51aec5b57d877bdf3edfe8cb4883fd";
|
||||
sha256 = "sha256-WFq8sNitwhOOS3eO8V35EMs+FA73pbILRP0JoW/UR80=";
|
||||
};
|
||||
nativeBuildInputs = oldAttrs.nativeBuildInputs ++ [
|
||||
pkgs-stable.opencv
|
||||
pkgs-stable.cmake
|
||||
pkgs-stable.doctest
|
||||
];
|
||||
});
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
{ inputs, ... }@flakeContext:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
systemd.services.zapret = {
|
||||
enable = true;
|
||||
description = "zapret complete";
|
||||
unitConfig = {
|
||||
After = [ "network-online.target" ];
|
||||
Wants = [ "network-online.target" ];
|
||||
};
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
path = [ "/run/current-system/sw" ];
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
Restart = "on-failure";
|
||||
User = "root";
|
||||
WorkingDirectory = "${inputs.zapret.script-dir}";
|
||||
ExecStart = "/run/current-system/sw/bin/bash ./main_script.sh -nointeractive";
|
||||
ExecStop = "/run/current-system/sw/bin/bash ./stop_and_clean_nft.sh";
|
||||
};
|
||||
};
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
nftables
|
||||
];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user