mirror of
https://github.com/Theaninova/TheaninovOS.git
synced 2026-01-27 12:02:38 +00:00
refactor: rfc formatting
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
{ config, ... }: {
|
||||
{ config, ... }:
|
||||
{
|
||||
xdg.enable = true;
|
||||
xdg.userDirs.enable = true;
|
||||
home.sessionVariables = {
|
||||
@@ -7,8 +8,7 @@
|
||||
NPM_CONFIG_CACHE = "${config.xdg.cacheHome}/npm";
|
||||
NPM_CONFIG_TMP = "${config.xdg.stateHome}/npm";
|
||||
WINEPREFIX = "${config.xdg.configHome}/wineprefixes/default";
|
||||
_JAVA_OPTGRADLE_USER_HOMEIONS =
|
||||
''-Djava.util.prefs.userRoot="${config.xdg.configHome}"/java'';
|
||||
_JAVA_OPTGRADLE_USER_HOMEIONS = ''-Djava.util.prefs.userRoot="${config.xdg.configHome}"/java'';
|
||||
GRADLE_USER_HOME = "${config.xdg.configHome}/gradle";
|
||||
DVDCSS_CACHE = "${config.xdg.cacheHome}/dvdcss";
|
||||
DOCKER_CONFIG = "${config.xdg.configHome}/docker";
|
||||
|
||||
@@ -1,4 +1,12 @@
|
||||
{ username, desktop, stateVersion, osConfig, inputs, ... }: {
|
||||
{
|
||||
username,
|
||||
desktop,
|
||||
stateVersion,
|
||||
osConfig,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
home = {
|
||||
stateVersion = osConfig.system.stateVersion;
|
||||
inherit username;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{ pkgs, ... }: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
xdg.configFile."ranger/rc.conf".source = ./ranger.conf;
|
||||
home.packages = with pkgs; [
|
||||
# nix
|
||||
@@ -15,7 +16,7 @@
|
||||
# media
|
||||
jellyfin-media-player
|
||||
youtube-dl
|
||||
tartube
|
||||
# tartube
|
||||
yt-dlp
|
||||
f3d
|
||||
mpv
|
||||
@@ -41,7 +42,6 @@
|
||||
audacity
|
||||
pinta
|
||||
kdePackages.kdenlive
|
||||
# friture TODO: broken
|
||||
blender-hip
|
||||
openscad-unstable
|
||||
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ lib, stdenv, fetchFromGitHub, pkgs, }:
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
pkgs,
|
||||
}:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "hid-fanatecff-tools";
|
||||
version = "0.1.0";
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
{ pkgs }:
|
||||
pkgs.threema-desktop.overrideAttrs (prev: {
|
||||
postFixup = prev.postFixup + ''
|
||||
echo "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform=wayland --enable-features=WaylandWindowDecorations}}" >> $out/bin/threema
|
||||
'';
|
||||
postFixup =
|
||||
prev.postFixup
|
||||
+ ''
|
||||
echo "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform=wayland --enable-features=WaylandWindowDecorations}}" >> $out/bin/threema
|
||||
'';
|
||||
})
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{ pkgs, config, ... }: {
|
||||
{ pkgs, config, ... }:
|
||||
{
|
||||
programs = {
|
||||
home-manager.enable = true;
|
||||
rbw = {
|
||||
@@ -16,7 +17,9 @@
|
||||
gpg.enable = true;
|
||||
btop = {
|
||||
enable = true;
|
||||
settings = { vim_keys = true; };
|
||||
settings = {
|
||||
vim_keys = true;
|
||||
};
|
||||
};
|
||||
zsh = {
|
||||
enable = true;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{ pkgs }: {
|
||||
{ pkgs }:
|
||||
{
|
||||
enable = true;
|
||||
package = pkgs.wrapFirefox pkgs.firefox-unwrapped {
|
||||
extraPolicies = {
|
||||
@@ -43,27 +44,26 @@
|
||||
default = "Google";
|
||||
engines = {
|
||||
"Nix Packages" = {
|
||||
urls = [{
|
||||
template = "https://search.nixos.org/packages";
|
||||
params = [
|
||||
{
|
||||
name = "type";
|
||||
value = "packages";
|
||||
}
|
||||
{
|
||||
name = "query";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}];
|
||||
icon =
|
||||
"${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||
urls = [
|
||||
{
|
||||
template = "https://search.nixos.org/packages";
|
||||
params = [
|
||||
{
|
||||
name = "type";
|
||||
value = "packages";
|
||||
}
|
||||
{
|
||||
name = "query";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||
definedAliases = [ "@np" ];
|
||||
};
|
||||
"NixOS Wiki" = {
|
||||
urls = [{
|
||||
template = "https://nixos.wiki/index.php?search={searchTerms}";
|
||||
}];
|
||||
urls = [ { template = "https://nixos.wiki/index.php?search={searchTerms}"; } ];
|
||||
iconUpdateURL = "https://nixos.wiki/favicon.png";
|
||||
updateInterval = 24 * 60 * 60 * 1000;
|
||||
definedAliases = [ "@nw" ];
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{ pkgs, ... }: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = [ pkgs.neovide ];
|
||||
xdg.configFile."neovide/config.toml".source = ./neovide.toml;
|
||||
}
|
||||
|
||||
@@ -17,7 +17,8 @@ let
|
||||
'';
|
||||
};
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
vimAlias = true;
|
||||
@@ -33,7 +34,9 @@ in {
|
||||
smartindent = true;
|
||||
signcolumn = "yes";
|
||||
|
||||
undodir = { __raw = "os.getenv('HOME') .. '/.config/nvim/undodir'"; };
|
||||
undodir = {
|
||||
__raw = "os.getenv('HOME') .. '/.config/nvim/undodir'";
|
||||
};
|
||||
undofile = true;
|
||||
|
||||
scrolloff = 12;
|
||||
@@ -116,30 +119,37 @@ in {
|
||||
right = "┊";
|
||||
};
|
||||
sections = {
|
||||
lualine_a = [{
|
||||
name = "mode";
|
||||
separator = {
|
||||
right = "";
|
||||
left = "";
|
||||
};
|
||||
icon = "";
|
||||
}];
|
||||
lualine_a = [
|
||||
{
|
||||
name = "mode";
|
||||
separator = {
|
||||
right = "";
|
||||
left = "";
|
||||
};
|
||||
icon = "";
|
||||
}
|
||||
];
|
||||
lualine_x = [
|
||||
"(vim.g.disable_autoformat or vim.b.disable_autoformat) and '' or nil"
|
||||
{ name = "filetype"; }
|
||||
];
|
||||
lualine_z = [{
|
||||
name = "location";
|
||||
separator = {
|
||||
right = "";
|
||||
left = "";
|
||||
};
|
||||
}];
|
||||
lualine_z = [
|
||||
{
|
||||
name = "location";
|
||||
separator = {
|
||||
right = "";
|
||||
left = "";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
auto-save = {
|
||||
enable = true;
|
||||
triggerEvents = [ "FocusLost" "BufLeave" ];
|
||||
triggerEvents = [
|
||||
"FocusLost"
|
||||
"BufLeave"
|
||||
];
|
||||
};
|
||||
indent-blankline = {
|
||||
enable = true;
|
||||
@@ -259,51 +269,55 @@ in {
|
||||
|
||||
lsp = {
|
||||
enable = true;
|
||||
keymaps = { diagnostic = { }; };
|
||||
enabledServers = [{
|
||||
name = "angularls";
|
||||
extraOptions = {
|
||||
cmd = [
|
||||
"ngserver"
|
||||
"--stdio"
|
||||
"--tsProbeLocations"
|
||||
""
|
||||
"--ngProbeLocations"
|
||||
""
|
||||
];
|
||||
on_new_config = {
|
||||
__raw = ''
|
||||
function(new_config, new_root_dir)
|
||||
new_config.cmd = {
|
||||
new_root_dir .. "/node_modules/@angular/language-server/bin/ngserver",
|
||||
"--stdio",
|
||||
"--tsProbeLocations",
|
||||
new_root_dir .. "/node_modules",
|
||||
"--ngProbeLocations",
|
||||
new_root_dir .. "/node_modules",
|
||||
}
|
||||
end
|
||||
'';
|
||||
};
|
||||
filetypes = [
|
||||
"typescript"
|
||||
"html"
|
||||
"typescriptreact"
|
||||
"typescript.tsx"
|
||||
"angular"
|
||||
"html.angular"
|
||||
];
|
||||
on_attach = {
|
||||
__raw = ''
|
||||
function(client, bufnr)
|
||||
if vim.bo[bufnr].filetype == "html" then
|
||||
vim.bo[bufnr].filetype = "angular"
|
||||
keymaps = {
|
||||
diagnostic = { };
|
||||
};
|
||||
enabledServers = [
|
||||
{
|
||||
name = "angularls";
|
||||
extraOptions = {
|
||||
cmd = [
|
||||
"ngserver"
|
||||
"--stdio"
|
||||
"--tsProbeLocations"
|
||||
""
|
||||
"--ngProbeLocations"
|
||||
""
|
||||
];
|
||||
on_new_config = {
|
||||
__raw = ''
|
||||
function(new_config, new_root_dir)
|
||||
new_config.cmd = {
|
||||
new_root_dir .. "/node_modules/@angular/language-server/bin/ngserver",
|
||||
"--stdio",
|
||||
"--tsProbeLocations",
|
||||
new_root_dir .. "/node_modules",
|
||||
"--ngProbeLocations",
|
||||
new_root_dir .. "/node_modules",
|
||||
}
|
||||
end
|
||||
end
|
||||
'';
|
||||
'';
|
||||
};
|
||||
filetypes = [
|
||||
"typescript"
|
||||
"html"
|
||||
"typescriptreact"
|
||||
"typescript.tsx"
|
||||
"angular"
|
||||
"html.angular"
|
||||
];
|
||||
on_attach = {
|
||||
__raw = ''
|
||||
function(client, bufnr)
|
||||
if vim.bo[bufnr].filetype == "html" then
|
||||
vim.bo[bufnr].filetype = "angular"
|
||||
end
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}];
|
||||
}
|
||||
];
|
||||
servers = {
|
||||
html.enable = true;
|
||||
cssls.enable = true;
|
||||
@@ -323,7 +337,10 @@ in {
|
||||
|
||||
clangd = {
|
||||
enable = true;
|
||||
cmd = [ "clangd" "--offset-encoding=utf-16" ];
|
||||
cmd = [
|
||||
"clangd"
|
||||
"--offset-encoding=utf-16"
|
||||
];
|
||||
};
|
||||
|
||||
nixd.enable = true;
|
||||
@@ -347,16 +364,16 @@ in {
|
||||
end
|
||||
'';
|
||||
};
|
||||
symbolMap = { Copilot = ""; };
|
||||
symbolMap = {
|
||||
Copilot = "";
|
||||
};
|
||||
};
|
||||
cmp = {
|
||||
enable = true;
|
||||
settings = {
|
||||
mapping = {
|
||||
"<C-n>" =
|
||||
"cmp.mapping.select_next_item({behavior = cmp.SelectBehavior.Select})";
|
||||
"<C-p>" =
|
||||
"cmp.mapping.select_prev_item({behavior = cmp.SelectBehavior.Select})";
|
||||
"<C-n>" = "cmp.mapping.select_next_item({behavior = cmp.SelectBehavior.Select})";
|
||||
"<C-p>" = "cmp.mapping.select_prev_item({behavior = cmp.SelectBehavior.Select})";
|
||||
"<C-Space>" = "cmp.mapping.confirm({select = true})";
|
||||
"<C-Enter>" = "cmp.mapping.complete()";
|
||||
};
|
||||
@@ -372,9 +389,11 @@ in {
|
||||
{ name = "nvim_lsp_signature_help"; }
|
||||
{ name = "nvim_lsp_document_symbol"; }
|
||||
];
|
||||
formatting.fields = [ "abbr" "kind" ];
|
||||
snippet.expand =
|
||||
"function(args) require('luasnip').lsp_expand(args.body) end";
|
||||
formatting.fields = [
|
||||
"abbr"
|
||||
"kind"
|
||||
];
|
||||
snippet.expand = "function(args) require('luasnip').lsp_expand(args.body) end";
|
||||
window = {
|
||||
completion.border = "rounded";
|
||||
documentation.border = "rounded";
|
||||
|
||||
@@ -82,8 +82,7 @@
|
||||
key = "<leader>xw";
|
||||
mode = "n";
|
||||
lua = true;
|
||||
action =
|
||||
"function() require('trouble').toggle('workspace_diagnostics') end";
|
||||
action = "function() require('trouble').toggle('workspace_diagnostics') end";
|
||||
}
|
||||
{
|
||||
key = "<leader>xd";
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{ pkgs, homeDirectory, ... }: {
|
||||
{ pkgs, homeDirectory, ... }:
|
||||
{
|
||||
services = {
|
||||
gpg-agent = {
|
||||
enable = true;
|
||||
|
||||
@@ -2,10 +2,13 @@
|
||||
|
||||
with lib;
|
||||
|
||||
let cfg = config.boot.quiet;
|
||||
|
||||
in {
|
||||
options.boot.quiet = { enable = mkEnableOption (mdDoc "Clean, quiet boot"); };
|
||||
let
|
||||
cfg = config.boot.quiet;
|
||||
in
|
||||
{
|
||||
options.boot.quiet = {
|
||||
enable = mkEnableOption (mdDoc "Clean, quiet boot");
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
boot = {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{ ... }: {
|
||||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./boot/quiet.nix
|
||||
|
||||
|
||||
@@ -1,10 +1,17 @@
|
||||
{ config, lib, pkgs, username, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
username,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let cfg = config.desktops.hyprland;
|
||||
|
||||
in {
|
||||
let
|
||||
cfg = config.desktops.hyprland;
|
||||
in
|
||||
{
|
||||
options.desktops.hyprland = {
|
||||
enable = mkEnableOption (mdDoc "Enable a DE based on Hyprland");
|
||||
};
|
||||
@@ -12,8 +19,10 @@ in {
|
||||
config = mkIf cfg.enable {
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
extraPortals =
|
||||
[ pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-kde ];
|
||||
extraPortals = [
|
||||
pkgs.xdg-desktop-portal-gtk
|
||||
pkgs.xdg-desktop-portal-kde
|
||||
];
|
||||
};
|
||||
|
||||
services = {
|
||||
|
||||
@@ -1,17 +1,31 @@
|
||||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
|
||||
let cfg = config.fonts.fira-code;
|
||||
|
||||
in {
|
||||
let
|
||||
cfg = config.fonts.fira-code;
|
||||
in
|
||||
{
|
||||
options.fonts.fira-code = {
|
||||
enable = mkEnableOption "Enable the preset for Fira Code";
|
||||
stylisticSets = mkOption {
|
||||
type = types.listOf types.str;
|
||||
description = mdDoc
|
||||
"[Stylistic sets](https://github.com/tonsky/FiraCode/wiki/How-to-enable-stylistic-sets) for Fira Code";
|
||||
default =
|
||||
[ "zero" "onum" "ss04" "cv19" "cv23" "ss09" "ss06" "ss07" "ss10" ];
|
||||
description = mdDoc "[Stylistic sets](https://github.com/tonsky/FiraCode/wiki/How-to-enable-stylistic-sets) for Fira Code";
|
||||
default = [
|
||||
"zero"
|
||||
"onum"
|
||||
"ss04"
|
||||
"cv19"
|
||||
"cv23"
|
||||
"ss09"
|
||||
"ss06"
|
||||
"ss07"
|
||||
"ss10"
|
||||
];
|
||||
};
|
||||
default = mkOption {
|
||||
type = types.bool;
|
||||
@@ -26,10 +40,7 @@ in {
|
||||
nerdfonts.additionalFonts = [ "FiraCode" ];
|
||||
fontconfig = {
|
||||
defaultFonts.monospace = mkIf cfg.default [
|
||||
(if (config.fonts.nerdfonts.enable) then
|
||||
"Fira Code Nerd Font"
|
||||
else
|
||||
"FiraCode")
|
||||
(if (config.fonts.nerdfonts.enable) then "Fira Code Nerd Font" else "FiraCode")
|
||||
];
|
||||
localConf = ''
|
||||
<match target="font">
|
||||
@@ -37,10 +48,7 @@ in {
|
||||
<string>Fira</string>
|
||||
</test>
|
||||
<edit name="fontfeatures" mode="append">
|
||||
${
|
||||
lib.concatStringsSep " "
|
||||
(map (set: "<string>${set}</string>") cfg.stylisticSets)
|
||||
}
|
||||
${lib.concatStringsSep " " (map (set: "<string>${set}</string>") cfg.stylisticSets)}
|
||||
</edit>
|
||||
</match>
|
||||
'';
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
|
||||
let cfg = config.fonts.nerdfonts;
|
||||
|
||||
in {
|
||||
let
|
||||
cfg = config.fonts.nerdfonts;
|
||||
in
|
||||
{
|
||||
options.fonts.nerdfonts = {
|
||||
enable = mkEnableOption "Enable nerdfonts";
|
||||
additionalFonts = mkOption {
|
||||
@@ -15,12 +21,9 @@ in {
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
fonts = {
|
||||
packages = with pkgs;
|
||||
[
|
||||
(nerdfonts.override {
|
||||
fonts = [ "NerdFontsSymbolsOnly" ] ++ cfg.additionalFonts;
|
||||
})
|
||||
];
|
||||
packages = with pkgs; [
|
||||
(nerdfonts.override { fonts = [ "NerdFontsSymbolsOnly" ] ++ cfg.additionalFonts; })
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
|
||||
let cfg = config.fonts.noto-sans;
|
||||
|
||||
in {
|
||||
let
|
||||
cfg = config.fonts.noto-sans;
|
||||
in
|
||||
{
|
||||
options.fonts.noto-sans = {
|
||||
enable = mkEnableOption "Enable the Noto Sans font";
|
||||
default = mkOption {
|
||||
@@ -15,14 +21,15 @@ in {
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
fonts = {
|
||||
packages = with pkgs; [ noto-fonts noto-fonts-cjk noto-fonts-emoji ];
|
||||
packages = with pkgs; [
|
||||
noto-fonts
|
||||
noto-fonts-cjk
|
||||
noto-fonts-emoji
|
||||
];
|
||||
nerdfonts.additionalFonts = [ "Noto" ];
|
||||
fontconfig = {
|
||||
defaultFonts.sansSerif = mkIf cfg.default [
|
||||
(if (config.fonts.nerdfonts.enable) then
|
||||
"Noto Sans Nerd Font"
|
||||
else
|
||||
"Noto Sans")
|
||||
(if (config.fonts.nerdfonts.enable) then "Noto Sans Nerd Font" else "Noto Sans")
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,12 +1,17 @@
|
||||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
|
||||
let cfg = config.hardware.amdgpu.preset.default;
|
||||
|
||||
in {
|
||||
let
|
||||
cfg = config.hardware.amdgpu.preset.default;
|
||||
in
|
||||
{
|
||||
options.hardware.amdgpu.preset.default = {
|
||||
enable =
|
||||
mkEnableOption "Enable ADM GPU driver support with some sane defaults";
|
||||
enable = mkEnableOption "Enable ADM GPU driver support with some sane defaults";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
@@ -19,7 +24,10 @@ in {
|
||||
|
||||
boot = {
|
||||
# https://docs.kernel.org/gpu/amdgpu/module-parameters.html
|
||||
kernelParams = [ "amdgpu.seamless=1" "amdgpu.freesync_video=1" ];
|
||||
kernelParams = [
|
||||
"amdgpu.seamless=1"
|
||||
"amdgpu.freesync_video=1"
|
||||
];
|
||||
initrd.kernelModules = [ "amdgpu" ];
|
||||
};
|
||||
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
|
||||
let cfg = config.hardware.audio.preset.pipewire;
|
||||
|
||||
in {
|
||||
let
|
||||
cfg = config.hardware.audio.preset.pipewire;
|
||||
in
|
||||
{
|
||||
options.hardware.audio.preset.pipewire = {
|
||||
enable = mkEnableOption "Enable pipewire with sane defaults";
|
||||
};
|
||||
|
||||
@@ -1,9 +1,16 @@
|
||||
{ pkgs, lib, config, username, ... }:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
username,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
|
||||
let cfg = config.hardware.cc1;
|
||||
|
||||
in {
|
||||
let
|
||||
cfg = config.hardware.cc1;
|
||||
in
|
||||
{
|
||||
options.hardware.cc1 = {
|
||||
enable = mkEnableOption "Enable CC1 optimizations";
|
||||
layout = mkOption {
|
||||
@@ -19,7 +26,10 @@ in {
|
||||
layout = cfg.layout;
|
||||
extraLayouts.cc1-thea = {
|
||||
description = "A CC1 optimized layout";
|
||||
languages = [ "eng" "ger" ];
|
||||
languages = [
|
||||
"eng"
|
||||
"ger"
|
||||
];
|
||||
symbolsFile = ./${cfg.layout};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,12 +1,18 @@
|
||||
{ pkgs, lib, config, username, ... }:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
username,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
|
||||
let cfg = config.hardware.fv43u;
|
||||
|
||||
in {
|
||||
let
|
||||
cfg = config.hardware.fv43u;
|
||||
in
|
||||
{
|
||||
options.hardware.fv43u = {
|
||||
enable =
|
||||
mkEnableOption "Enable optimisations for the Gigabyte FV43U monitor";
|
||||
enable = mkEnableOption "Enable optimisations for the Gigabyte FV43U monitor";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
|
||||
let cfg = config.hardware.gbmonctl;
|
||||
|
||||
in {
|
||||
let
|
||||
cfg = config.hardware.gbmonctl;
|
||||
in
|
||||
{
|
||||
options.hardware.gbmonctl = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
|
||||
@@ -1,12 +1,17 @@
|
||||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
|
||||
let cfg = config.hardware.nvidia.preset.nouveau;
|
||||
|
||||
in {
|
||||
let
|
||||
cfg = config.hardware.nvidia.preset.nouveau;
|
||||
in
|
||||
{
|
||||
options.hardware.nvidia.preset.nouveau = {
|
||||
enable = mkEnableOption
|
||||
"Enable the free Nouveau NVIDIA driver with some sane defaults";
|
||||
enable = mkEnableOption "Enable the free Nouveau NVIDIA driver with some sane defaults";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
@@ -1,12 +1,17 @@
|
||||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
|
||||
let cfg = config.hardware.nvidia.preset.proprietary;
|
||||
|
||||
in {
|
||||
let
|
||||
cfg = config.hardware.nvidia.preset.proprietary;
|
||||
in
|
||||
{
|
||||
options.hardware.nvidia.preset.proprietary = {
|
||||
enable = mkEnableOption
|
||||
"Enable proprietary NVIDIA driver support with some sane defaults";
|
||||
enable = mkEnableOption "Enable proprietary NVIDIA driver support with some sane defaults";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
@@ -14,16 +19,30 @@ in {
|
||||
enable = true;
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
extraPackages = with pkgs; [ libvdpau-va-gl nvidia-vaapi-driver ];
|
||||
extraPackages = with pkgs; [
|
||||
libvdpau-va-gl
|
||||
nvidia-vaapi-driver
|
||||
];
|
||||
};
|
||||
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
|
||||
boot.kernelParams = [ "fbdev=1" "nvidia_drm.fbdev=1" ];
|
||||
boot.kernelModules =
|
||||
[ "nvidia" "nvidia_modeset" "nvidia_uvm" "nvidia_drm" ];
|
||||
boot.initrd.kernelModules =
|
||||
[ "nvidia" "nvidia_modeset" "nvidia_uvm" "nvidia_drm" ];
|
||||
boot.kernelParams = [
|
||||
"fbdev=1"
|
||||
"nvidia_drm.fbdev=1"
|
||||
];
|
||||
boot.kernelModules = [
|
||||
"nvidia"
|
||||
"nvidia_modeset"
|
||||
"nvidia_uvm"
|
||||
"nvidia_drm"
|
||||
];
|
||||
boot.initrd.kernelModules = [
|
||||
"nvidia"
|
||||
"nvidia_modeset"
|
||||
"nvidia_uvm"
|
||||
"nvidia_drm"
|
||||
];
|
||||
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
|
||||
let cfg = config.hardware.virtual-camera;
|
||||
|
||||
in {
|
||||
let
|
||||
cfg = config.hardware.virtual-camera;
|
||||
in
|
||||
{
|
||||
options.hardware.virtual-camera = {
|
||||
enable = mkEnableOption "Enable the virtual camera";
|
||||
};
|
||||
@@ -11,9 +17,12 @@ in {
|
||||
config = mkIf cfg.enable {
|
||||
boot = {
|
||||
# Virtual Camera/Mic
|
||||
kernelModules = [ "v4l2loopback" "snd-aloop" "sg" ];
|
||||
extraModulePackages = with config.boot.kernelPackages;
|
||||
[ v4l2loopback.out ];
|
||||
kernelModules = [
|
||||
"v4l2loopback"
|
||||
"snd-aloop"
|
||||
"sg"
|
||||
];
|
||||
extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback.out ];
|
||||
extraModprobeConfig = ''
|
||||
options v4l2loopback exclusive_caps=1 card_label="Virtual Camera"
|
||||
'';
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
|
||||
let cfg = config.locale.preset.theaninova;
|
||||
|
||||
in {
|
||||
let
|
||||
cfg = config.locale.preset.theaninova;
|
||||
in
|
||||
{
|
||||
options.locale.preset.theaninova = {
|
||||
enable = mkEnableOption "Enable the locale preset for Theaninova";
|
||||
};
|
||||
|
||||
@@ -1,9 +1,16 @@
|
||||
{ pkgs, lib, config, username, ... }:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
username,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
|
||||
let cfg = config.services.airprint;
|
||||
|
||||
in {
|
||||
let
|
||||
cfg = config.services.airprint;
|
||||
in
|
||||
{
|
||||
options.services.airprint = {
|
||||
enable = mkEnableOption "Enable printing over the air using sane and avahi";
|
||||
};
|
||||
@@ -19,6 +26,9 @@ in {
|
||||
nssmdns4 = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
users.users.${username}.extraGroups = [ "lp" "scanner" ];
|
||||
users.users.${username}.extraGroups = [
|
||||
"lp"
|
||||
"scanner"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user