Formatting
This commit is contained in:
parent
ae65065d5c
commit
3ca8c5e218
9 changed files with 156 additions and 108 deletions
|
@ -1,7 +1,14 @@
|
|||
{ lib, config, pkgs, ... }:
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let cfg = config.voidconf.fcitx5;
|
||||
in {
|
||||
let
|
||||
cfg = config.voidconf.fcitx5;
|
||||
in
|
||||
{
|
||||
options.voidconf.fcitx5 = {
|
||||
enable = mkEnableOption "Enables fcitx5 input method engine and mozc en anthy methods";
|
||||
};
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
{ lib, config, ... }:
|
||||
with lib;
|
||||
let cfg = config.voidconf.graphics;
|
||||
in {
|
||||
options.voidconf.graphics ={
|
||||
let
|
||||
cfg = config.voidconf.graphics;
|
||||
in
|
||||
{
|
||||
options.voidconf.graphics = {
|
||||
defaultSettings.enable = mkEnableOption "Enables some basic graphical settings";
|
||||
nvidia = {
|
||||
enable = mkEnableOption "Enables Nvidia settings";
|
||||
|
@ -25,6 +27,6 @@ in {
|
|||
nvidiaSettings = cfg.nvidia.proprietaryDrivers;
|
||||
};
|
||||
};
|
||||
services.xserver.videoDrivers = mkIf cfg.nvidia.proprietaryDrivers ["nvidia"];
|
||||
services.xserver.videoDrivers = mkIf cfg.nvidia.proprietaryDrivers [ "nvidia" ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
{ lib, config, ... }:
|
||||
with lib;
|
||||
let cfg = config.voidconf.kernelTweaks;
|
||||
in {
|
||||
let
|
||||
cfg = config.voidconf.kernelTweaks;
|
||||
in
|
||||
{
|
||||
options.voidconf.kernelTweaks = {
|
||||
enable = mkEnableOption "Enables kernel tweaks";
|
||||
};
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
{ lib, config, ... }:
|
||||
with lib;
|
||||
let cfg = config.voidconf.nixSettings;
|
||||
in {
|
||||
let
|
||||
cfg = config.voidconf.nixSettings;
|
||||
in
|
||||
{
|
||||
options.voidconf.nixSettings = {
|
||||
gc = {
|
||||
automatic = mkOption {
|
||||
|
@ -36,7 +38,10 @@ in {
|
|||
automatic = cfg.gc.automatic;
|
||||
dates = cfg.gc.dates;
|
||||
};
|
||||
settings.experimental-features = [ "flakes" "nix-command" ];
|
||||
settings.experimental-features = [
|
||||
"flakes"
|
||||
"nix-command"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
{ lib, config, ... }:
|
||||
with lib;
|
||||
let cfg = config.voidconf.prometheus;
|
||||
in {
|
||||
let
|
||||
cfg = config.voidconf.prometheus;
|
||||
in
|
||||
{
|
||||
options.voidconf.prometheus = {
|
||||
enable = mkEnableOption "Enable prometheus node";
|
||||
};
|
||||
|
@ -10,7 +12,10 @@ in {
|
|||
exporters = {
|
||||
node = {
|
||||
enable = true;
|
||||
enabledCollectors = [ "systemd" "cpu" ];
|
||||
enabledCollectors = [
|
||||
"systemd"
|
||||
"cpu"
|
||||
];
|
||||
port = 9002;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,7 +1,14 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let cfg = config.voidconf.services;
|
||||
in {
|
||||
let
|
||||
cfg = config.voidconf.services;
|
||||
in
|
||||
{
|
||||
options.voidconf.services = {
|
||||
|
||||
flatpak = {
|
||||
|
@ -26,7 +33,7 @@ in {
|
|||
};
|
||||
config = {
|
||||
|
||||
# flatpak
|
||||
# flatpak
|
||||
|
||||
xdg.portal = mkIf cfg.flatpak.enable {
|
||||
enable = true;
|
||||
|
@ -35,66 +42,69 @@ in {
|
|||
config.common.default = "*";
|
||||
};
|
||||
|
||||
# ssh
|
||||
# ssh agent
|
||||
|
||||
programs.ssh = mkIf cfg.ssh.enable {
|
||||
startAgent = true;
|
||||
};
|
||||
programs.ssh = mkIf cfg.ssh.enable {
|
||||
startAgent = true;
|
||||
};
|
||||
|
||||
services = {
|
||||
services = {
|
||||
|
||||
# flatpak
|
||||
# flatpak
|
||||
|
||||
flatpak.enable = cfg.flatpak.enable;
|
||||
flatpak.enable = cfg.flatpak.enable;
|
||||
|
||||
# yggdrasil
|
||||
# yggdrasil
|
||||
|
||||
yggdrasil = mkIf cfg.yggdrasil.enable {
|
||||
enable = true;
|
||||
persistentKeys = cfg.yggdrasil.persistentKeys;
|
||||
settings = {
|
||||
Peers = [
|
||||
"tls://109.107.173.235:9111"
|
||||
"tls://94.103.82.150:8080"
|
||||
"tcp://vpn.itrus.su:7991"
|
||||
"tls://45.147.198.155:6010"
|
||||
"tcp://ygg-nl.incognet.io:8883"
|
||||
"tls://ygg-nl.incognet.io:8884"
|
||||
"tls://23.137.249.65:443"
|
||||
"tls://aaoth.xyz:25565"
|
||||
"tcp://aaoth.xyz:7777"
|
||||
"tls://23.137.251.45:5222"
|
||||
"tls://x-ams-0.sergeysedoy97.ru:65535"
|
||||
"tls://s-ams-0.sergeysedoy97.ru:65535"
|
||||
"tls://89.22.237.91:65535"
|
||||
"tls://[2a0d:8480:1:f9::]:65535"
|
||||
"tls://x-ams-1.sergeysedoy97.ru:65535"
|
||||
"tls://s-ams-1.sergeysedoy97.ru:65535"
|
||||
"tls://79.137.194.94:65535"
|
||||
];
|
||||
};
|
||||
};
|
||||
openssh = mkIf cfg.ssh.enable {
|
||||
enable = true;
|
||||
settings = {
|
||||
PasswordAuthentication = cfg.ssh.passwordLogin;
|
||||
};
|
||||
yggdrasil = mkIf cfg.yggdrasil.enable {
|
||||
enable = true;
|
||||
persistentKeys = cfg.yggdrasil.persistentKeys;
|
||||
settings = {
|
||||
Peers = [
|
||||
"tls://109.107.173.235:9111"
|
||||
"tls://94.103.82.150:8080"
|
||||
"tcp://vpn.itrus.su:7991"
|
||||
"tls://45.147.198.155:6010"
|
||||
"tcp://ygg-nl.incognet.io:8883"
|
||||
"tls://ygg-nl.incognet.io:8884"
|
||||
"tls://23.137.249.65:443"
|
||||
"tls://aaoth.xyz:25565"
|
||||
"tcp://aaoth.xyz:7777"
|
||||
"tls://23.137.251.45:5222"
|
||||
"tls://x-ams-0.sergeysedoy97.ru:65535"
|
||||
"tls://s-ams-0.sergeysedoy97.ru:65535"
|
||||
"tls://89.22.237.91:65535"
|
||||
"tls://[2a0d:8480:1:f9::]:65535"
|
||||
"tls://x-ams-1.sergeysedoy97.ru:65535"
|
||||
"tls://s-ams-1.sergeysedoy97.ru:65535"
|
||||
"tls://79.137.194.94:65535"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# i2p container
|
||||
# ssh daemon
|
||||
|
||||
openssh = mkIf cfg.ssh.enable {
|
||||
enable = true;
|
||||
settings = {
|
||||
PasswordAuthentication = cfg.ssh.passwordLogin;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# i2p container
|
||||
|
||||
containers.i2pd-container = mkIf cfg.i2p.enable {
|
||||
autoStart = cfg.i2p.autoStart;
|
||||
config = {
|
||||
system.stateVersion = "23.11"; # Did you read the comment?
|
||||
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
7656
|
||||
7070
|
||||
4447
|
||||
4444
|
||||
];
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
7656
|
||||
7070
|
||||
4447
|
||||
4444
|
||||
];
|
||||
|
||||
services.i2pd = {
|
||||
enable = true;
|
||||
|
|
|
@ -1,7 +1,14 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let cfg = config.voidconf.vim;
|
||||
in {
|
||||
let
|
||||
cfg = config.voidconf.vim;
|
||||
in
|
||||
{
|
||||
options.voidconf.vim = {
|
||||
enable = mkEnableOption "Enables opinionated vim configuration";
|
||||
enableNvim = mkEnableOption "Enables neovim and alias";
|
||||
|
@ -9,7 +16,7 @@ in {
|
|||
type = types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
Set 'vim' as $EDITOR
|
||||
Set 'vim' as $EDITOR
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
@ -26,37 +33,37 @@ in {
|
|||
|
||||
(mkIf cfg.enableNvim (neovim.override { vimAlias = true; }))
|
||||
|
||||
((vim_configurable.override { }).customize {
|
||||
name = "vim";
|
||||
vimrcConfig = {
|
||||
packages.myplugs = with pkgs.vimPlugins; {
|
||||
start = [ vim-nix ];
|
||||
opt = [];
|
||||
};
|
||||
customRC = ''
|
||||
syntax on
|
||||
set nocompatible
|
||||
set ignorecase
|
||||
set hlsearch
|
||||
set incsearch
|
||||
set autoindent
|
||||
set smartindent
|
||||
set wildmenu
|
||||
set expandtab
|
||||
set shiftwidth=4
|
||||
set tabstop=4
|
||||
set number
|
||||
set relativenumber
|
||||
set mouse=
|
||||
set listchars=tab:│\ ,trail:·
|
||||
set list
|
||||
set scrolloff=3
|
||||
set notimeout
|
||||
set backspace=2
|
||||
au FileType nix setlocal shiftwidth=2 tabstop=2 expandtab
|
||||
au FileType haskell,tex setlocal shiftwidth=4 tabstop=4 expandtab
|
||||
'';
|
||||
};
|
||||
((vim_configurable.override { }).customize {
|
||||
name = "vim";
|
||||
vimrcConfig = {
|
||||
packages.myplugs = with pkgs.vimPlugins; {
|
||||
start = [ vim-nix ];
|
||||
opt = [ ];
|
||||
};
|
||||
customRC = ''
|
||||
syntax on
|
||||
set nocompatible
|
||||
set ignorecase
|
||||
set hlsearch
|
||||
set incsearch
|
||||
set autoindent
|
||||
set smartindent
|
||||
set wildmenu
|
||||
set expandtab
|
||||
set shiftwidth=4
|
||||
set tabstop=4
|
||||
set number
|
||||
set relativenumber
|
||||
set mouse=
|
||||
set listchars=tab:│\ ,trail:·
|
||||
set list
|
||||
set scrolloff=3
|
||||
set notimeout
|
||||
set backspace=2
|
||||
au FileType nix setlocal shiftwidth=2 tabstop=2 expandtab
|
||||
au FileType haskell,tex setlocal shiftwidth=4 tabstop=4 expandtab
|
||||
'';
|
||||
};
|
||||
})
|
||||
];
|
||||
};
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
{ config, lib, ... }:
|
||||
with lib;
|
||||
let cfg = config.voidconf.xconfig;
|
||||
in {
|
||||
let
|
||||
cfg = config.voidconf.xconfig;
|
||||
in
|
||||
{
|
||||
options.voidconf.xconfig = {
|
||||
|
||||
enable = mkEnableOption "Enables opinionated xorg config";
|
||||
|
@ -12,7 +14,10 @@ in {
|
|||
enableProperConfig = mkEnableOption "Enable the touchpad settings";
|
||||
|
||||
accelProfile = mkOption {
|
||||
type = types.enum [ "flat" "adaptive" ];
|
||||
type = types.enum [
|
||||
"flat"
|
||||
"adaptive"
|
||||
];
|
||||
default = "adaptive";
|
||||
example = "flat";
|
||||
description = ''
|
||||
|
@ -23,11 +28,14 @@ in {
|
|||
};
|
||||
|
||||
mouse.accelProfile = mkOption {
|
||||
type = types.enum [ "flat" "adaptive" ];
|
||||
type = types.enum [
|
||||
"flat"
|
||||
"adaptive"
|
||||
];
|
||||
default = "flat";
|
||||
example = "adaptive";
|
||||
description = ''
|
||||
Use addaptive on trackball and touchpad; and flat on any normal mouse.
|
||||
Use addaptive on trackball and touchpad; and flat on any normal mouse.
|
||||
'';
|
||||
};
|
||||
|
||||
|
@ -36,7 +44,7 @@ in {
|
|||
default = ./images/city.png;
|
||||
type = types.path;
|
||||
description = ''
|
||||
Display manager background.
|
||||
Display manager background.
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
{ config, lib, ... }:
|
||||
with lib;
|
||||
let cfg = config.voidconf.zsh;
|
||||
in {
|
||||
let
|
||||
cfg = config.voidconf.zsh;
|
||||
in
|
||||
{
|
||||
options.voidconf.zsh = {
|
||||
enable = mkEnableOption "Enables opinionated zsh configuration";
|
||||
skim.enable = mkEnableOption "Enables skim support for shell history";
|
||||
|
@ -10,7 +12,7 @@ in {
|
|||
default = "fg=magenta,bg=black,bold,underline";
|
||||
description = ''
|
||||
Colors for zsh autosuggestions. Check the documentation for more info.
|
||||
'';
|
||||
'';
|
||||
};
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
|
|
Loading…
Add table
Reference in a new issue