mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
Moving to modules. Structural changes.
This commit is contained in:
parent
3903bc1766
commit
060d4c6d1e
258 changed files with 621 additions and 407 deletions
6
config/profiles/gui/adb.nix
Normal file
6
config/profiles/gui/adb.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
programs.adb.enable = true;
|
||||
users.users.kat.extraGroups = [ "adbusers" ];
|
||||
}
|
||||
23
config/profiles/gui/default.nix
Normal file
23
config/profiles/gui/default.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./adb.nix
|
||||
./fonts.nix
|
||||
./gpg.nix
|
||||
./firefox.nix
|
||||
./dns.nix
|
||||
./nfs.nix
|
||||
./nix-doc.nix
|
||||
./mpd.nix
|
||||
./nixpkgs.nix
|
||||
./mingetty.nix
|
||||
./sound.nix
|
||||
];
|
||||
|
||||
hardware.opengl.extraPackages = with pkgs; [ libvdpau-va-gl ];
|
||||
services.tumbler.enable = true;
|
||||
environment.systemPackages = with pkgs; [ ntfs3g exfat-utils ];
|
||||
|
||||
deploy.profile.gui = true;
|
||||
}
|
||||
37
config/profiles/gui/dns.nix
Normal file
37
config/profiles/gui/dns.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{ config, lib, pkgs, ... }: {
|
||||
networking = {
|
||||
# networkmanager.enable = true;
|
||||
resolvconf.useLocalResolver = true;
|
||||
networkmanager.dns = "none";
|
||||
};
|
||||
|
||||
services.dnscrypt-proxy2 = {
|
||||
enable = true;
|
||||
settings = {
|
||||
ipv6_servers = true;
|
||||
require_dnssec = true;
|
||||
|
||||
sources.public-resolvers = {
|
||||
urls = [
|
||||
"https://raw.githubusercontent.com/DNSCrypt/dnscrypt-resolvers/master/v3/public-resolvers.md"
|
||||
"https://download.dnscrypt.info/resolvers-list/v3/public-resolvers.md"
|
||||
];
|
||||
cache_file = "/var/lib/dnscrypt-proxy2/public-resolvers.md";
|
||||
minisign_key =
|
||||
"RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3";
|
||||
};
|
||||
|
||||
# You can choose a specific set of servers from https://github.com/DNSCrypt/dnscrypt-resolvers/blob/master/v2/public-resolvers.md
|
||||
server_names = [
|
||||
"acsacsar-ams-ipv4"
|
||||
"acsacsar-ams-ipv6"
|
||||
"dnscrypt.eu-dk"
|
||||
"dnscrypt.eu-dk-ipv6"
|
||||
"dnscrypt.eu-nl"
|
||||
"dnscrypt.eu-nl-ipv6"
|
||||
"meganerd"
|
||||
"meganerd-ipv6"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
16
config/profiles/gui/firefox.nix
Normal file
16
config/profiles/gui/firefox.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.variables = { BROWSER = "firefox"; };
|
||||
|
||||
xdg = {
|
||||
portal = {
|
||||
enable = true;
|
||||
extraPortals = with pkgs; [
|
||||
xdg-desktop-portal-wlr
|
||||
xdg-desktop-portal-gtk
|
||||
];
|
||||
gtkUsePortal = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
18
config/profiles/gui/fonts.nix
Normal file
18
config/profiles/gui/fonts.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
fonts.fontconfig = {
|
||||
enable = true;
|
||||
defaultFonts = {
|
||||
emoji = [
|
||||
"Twitter Color Emoji"
|
||||
];
|
||||
};
|
||||
};
|
||||
fonts.fonts = with pkgs; [
|
||||
font-awesome
|
||||
nerdfonts
|
||||
emacs-all-the-icons-fonts
|
||||
twitter-color-emoji
|
||||
];
|
||||
}
|
||||
12
config/profiles/gui/gpg.nix
Normal file
12
config/profiles/gui/gpg.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
services.pcscd.enable = true;
|
||||
services.udev.packages = [ pkgs.yubikey-personalization ];
|
||||
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
pinentryFlavor = "gtk2";
|
||||
};
|
||||
}
|
||||
46
config/profiles/gui/mingetty.nix
Normal file
46
config/profiles/gui/mingetty.nix
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
c1 = "\\e[22;34m";
|
||||
c2 = "\\e[1;35m";
|
||||
nixos = [
|
||||
" ${c1} ::::. ${c2}'::::: ::::' "
|
||||
" ${c1} '::::: ${c2}':::::. ::::' "
|
||||
" ${c1} ::::: ${c2}'::::.::::: "
|
||||
" ${c1} .......:::::..... ${c2}:::::::: "
|
||||
" ${c1} ::::::::::::::::::. ${c2}:::::: ${c1}::::. "
|
||||
" ${c1} ::::::::::::::::::::: ${c2}:::::. ${c1}.::::' "
|
||||
" ${c2} ..... ::::' ${c1}:::::' "
|
||||
" ${c2} ::::: '::' ${c1}:::::' "
|
||||
" ${c2} ........::::: ' ${c1}:::::::::::. "
|
||||
" ${c2}::::::::::::: ${c1}::::::::::::: "
|
||||
" ${c2} ::::::::::: ${c1}.. ${c1}::::: "
|
||||
" ${c2} .::::: ${c1}.::: ${c1}::::: "
|
||||
" ${c2} .::::: ${c1}::::: ${c1}''''' ${c2}..... "
|
||||
" ${c2} ::::: ${c1}':::::. ${c2}......:::::::::::::' "
|
||||
" ${c2} ::: ${c1}::::::. ${c2}':::::::::::::::::' "
|
||||
" ${c1} .:::::::: ${c2}':::::::::: "
|
||||
" ${c1} .::::''::::. ${c2}'::::. "
|
||||
" ${c1} .::::' ::::. ${c2}'::::. "
|
||||
" ${c1} .:::: :::: ${c2}'::::. "
|
||||
];
|
||||
in
|
||||
{
|
||||
console = {
|
||||
font = "Tamzen7x14";
|
||||
earlySetup = true;
|
||||
getty = {
|
||||
greetingPrefix =
|
||||
''\e[H\e[2J'' + # topleft
|
||||
''\e[9;10]''; # setterm blank/powersave = 10 minutes
|
||||
greeting =
|
||||
"\n" +
|
||||
lib.concatStringsSep "\n" nixos +
|
||||
"\n\n" +
|
||||
''\e[1;32m>>> NixOS ${config.system.nixos.label} (Linux \r) - \l\e[0m'';
|
||||
};
|
||||
};
|
||||
services.getty = {
|
||||
helpLine = lib.mkForce "";
|
||||
};
|
||||
}
|
||||
8
config/profiles/gui/mpd.nix
Normal file
8
config/profiles/gui/mpd.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
kw.fw.private.tcp.ports = [ 6600 32101 ];
|
||||
kw.fw.public.tcp.ports = [ 6600 32101 ];
|
||||
}
|
||||
23
config/profiles/gui/nfs.nix
Normal file
23
config/profiles/gui/nfs.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
boot.supportedFilesystems = [ "nfs" ];
|
||||
|
||||
fileSystems."/mnt/kat-nas" = {
|
||||
device = "samhain.net.kittywit.ch:/mnt/zraw/media";
|
||||
fsType = "nfs";
|
||||
options = [ "x-systemd.automount" "noauto" ];
|
||||
};
|
||||
|
||||
fileSystems."/mnt/hex-corn" = {
|
||||
device = "storah.net.lilwit.ch:/data/cornbox";
|
||||
fsType = "nfs";
|
||||
options = [ "x-systemd.automount" "noauto" ];
|
||||
};
|
||||
|
||||
fileSystems."/mnt/hex-tor" = {
|
||||
device = "storah.net.lilwit.ch:/data/torrents";
|
||||
fsType = "nfs";
|
||||
options = [ "x-systemd.automount" "noauto" ];
|
||||
};
|
||||
}
|
||||
11
config/profiles/gui/nix-doc.nix
Normal file
11
config/profiles/gui/nix-doc.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
nix.extraOptions = ''
|
||||
plugin-files = ${pkgs.nix-doc}/lib/libnix_doc_plugin.so
|
||||
'';
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
nix-doc
|
||||
];
|
||||
}
|
||||
8
config/profiles/gui/nixpkgs.nix
Normal file
8
config/profiles/gui/nixpkgs.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{ pkgs, config, lib, ... }:
|
||||
|
||||
{
|
||||
nixpkgs.config = {
|
||||
allowUnfree = true;
|
||||
pulseaudio = true;
|
||||
};
|
||||
}
|
||||
43
config/profiles/gui/sound.nix
Normal file
43
config/profiles/gui/sound.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
sound = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
defaults.pcm.rate_converter "speexrate_best"
|
||||
'';
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [ pavucontrol ];
|
||||
|
||||
security.rtkit.enable = true;
|
||||
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
config = {
|
||||
pipewire = {
|
||||
"context.properties" = {
|
||||
"log.level" = 2;
|
||||
"default.clock.min-quantum" =
|
||||
32; # default; going lower may cause crackles and distorted audio
|
||||
};
|
||||
pipewire-pulse = {
|
||||
"context.modules" = [{
|
||||
name = "libpipewire-module-protocol-pulse";
|
||||
args = {
|
||||
"pulse.min.quantum" = 32; # controls minimum playback quant
|
||||
"pulse.min.req" = 32; # controls minimum recording quant
|
||||
"pulse.min.frag" = 32; # controls minimum fragment size
|
||||
"server.address" =
|
||||
[ "unix:native" ]; # the default address of the server
|
||||
};
|
||||
}];
|
||||
};
|
||||
};
|
||||
};
|
||||
pulse.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
jack.enable = true;
|
||||
alsa.enable = true;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue