Initial commit
This commit is contained in:
commit
1518f7007b
39 changed files with 1779 additions and 0 deletions
68
m/sys.nix
Normal file
68
m/sys.nix
Normal file
|
@ -0,0 +1,68 @@
|
|||
{ pkgs, lib, config, inputs, ... }:
|
||||
let
|
||||
types = lib.types;
|
||||
sys = config.maid.sys;
|
||||
in
|
||||
{
|
||||
options.maid.sys = {
|
||||
enable = lib.mkEnableOption "whole maid system";
|
||||
tz = lib.mkOption {
|
||||
type = types.str;
|
||||
default = "Europe/Moscow";
|
||||
};
|
||||
hostname = lib.mkOption {
|
||||
type = types.str;
|
||||
};
|
||||
|
||||
bluetooth = {
|
||||
enable = lib.mkEnableOption "bluetooth";
|
||||
powerOnBoot = lib.mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "whether to power on bluetooth on system startup";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf sys.enable {
|
||||
time.timeZone = sys.tz;
|
||||
networking.hostName = sys.hostname;
|
||||
|
||||
nix.settings = {
|
||||
substituters = [
|
||||
"https://hyprland.cachix.org"
|
||||
"https://wezterm.cachix.org"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||
"wezterm.cachix.org-1:kAbhjYUC9qvblTE+s7S+kl5XM1zVa4skO+E/1IDWdH0="
|
||||
];
|
||||
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
jujutsu
|
||||
ifuse
|
||||
libimobiledevice
|
||||
];
|
||||
services.usbmuxd.enable = true;
|
||||
|
||||
hardware.bluetooth = lib.mkIf sys.bluetooth.enable {
|
||||
enable = true;
|
||||
powerOnBoot = sys.bluetooth.powerOnBoot;
|
||||
};
|
||||
# nixpkgs.overlays = [
|
||||
# (final: prev:
|
||||
# let
|
||||
# der = pkgs.callPackage ./ivpn {
|
||||
# buildGoModule = pkgs.buildGo122Module;
|
||||
# };
|
||||
# in
|
||||
# { ivpn = der.ivpn;
|
||||
# ivpn-service = der.ivpn-service;
|
||||
# }
|
||||
# )
|
||||
# ];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue