mirror of
https://github.com/Theaninova/TheaninovOS.git
synced 2026-02-14 12:32:42 +00:00
refactor: rfc formatting
This commit is contained in:
48
flake.nix
48
flake.nix
@@ -19,11 +19,21 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
{ nixpkgs, nur, home-manager, ags, nixvim, anyrun, hyprland, ... }@inputs:
|
{
|
||||||
|
nixpkgs,
|
||||||
|
nur,
|
||||||
|
home-manager,
|
||||||
|
ags,
|
||||||
|
nixvim,
|
||||||
|
anyrun,
|
||||||
|
hyprland,
|
||||||
|
...
|
||||||
|
}@inputs:
|
||||||
let
|
let
|
||||||
inherit (nixpkgs.lib) genAttrs listToAttrs;
|
inherit (nixpkgs.lib) genAttrs listToAttrs;
|
||||||
eachSystem = genAttrs [ "x86_64-linux" ];
|
eachSystem = genAttrs [ "x86_64-linux" ];
|
||||||
legacyPackages = eachSystem (system:
|
legacyPackages = eachSystem (
|
||||||
|
system:
|
||||||
import nixpkgs {
|
import nixpkgs {
|
||||||
inherit system;
|
inherit system;
|
||||||
config = {
|
config = {
|
||||||
@@ -31,17 +41,14 @@
|
|||||||
allowUnsupportedSystem = true;
|
allowUnsupportedSystem = true;
|
||||||
experimental-features = "nix-command flakes";
|
experimental-features = "nix-command flakes";
|
||||||
substituters = [ "https://hyprland.cachix.org" ];
|
substituters = [ "https://hyprland.cachix.org" ];
|
||||||
trusted-public-keys = [
|
trusted-public-keys = [ "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" ];
|
||||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
overlays = [
|
overlays = [
|
||||||
nur.overlay
|
nur.overlay
|
||||||
(final: prev: {
|
(final: prev: {
|
||||||
anyrunPlugins = anyrun.packages.${prev.system};
|
anyrunPlugins = anyrun.packages.${prev.system};
|
||||||
hyprland = hyprland.packages.${prev.system}.hyprland;
|
hyprland = hyprland.packages.${prev.system}.hyprland;
|
||||||
xdg-desktop-portal-hyprland =
|
xdg-desktop-portal-hyprland = hyprland.packages.${prev.system}.xdg-desktop-portal-hyprland;
|
||||||
hyprland.packages.${prev.system}.xdg-desktop-portal-hyprland;
|
|
||||||
ags = ags.packages.${prev.system}.default;
|
ags = ags.packages.${prev.system}.default;
|
||||||
gbmonctl = prev.callPackage ./overlays/gbmonctl { };
|
gbmonctl = prev.callPackage ./overlays/gbmonctl { };
|
||||||
lpc21isp = prev.callPackage ./overlays/lpc21isp { };
|
lpc21isp = prev.callPackage ./overlays/lpc21isp { };
|
||||||
@@ -49,9 +56,15 @@
|
|||||||
cura = prev.callPackage ./overlays/cura { };
|
cura = prev.callPackage ./overlays/cura { };
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
});
|
}
|
||||||
|
);
|
||||||
|
|
||||||
mkHost = { hostname, username, system }:
|
mkHost =
|
||||||
|
{
|
||||||
|
hostname,
|
||||||
|
username,
|
||||||
|
system,
|
||||||
|
}:
|
||||||
nixpkgs.lib.nixosSystem {
|
nixpkgs.lib.nixosSystem {
|
||||||
pkgs = legacyPackages.${system};
|
pkgs = legacyPackages.${system};
|
||||||
modules = [
|
modules = [
|
||||||
@@ -59,22 +72,29 @@
|
|||||||
./hosts/${hostname}
|
./hosts/${hostname}
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
_module.args = { inherit username; };
|
_module.args = {
|
||||||
|
inherit username;
|
||||||
|
};
|
||||||
networking.hostName = hostname;
|
networking.hostName = hostname;
|
||||||
home-manager = {
|
home-manager = {
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
useUserPackages = true;
|
useUserPackages = true;
|
||||||
extraSpecialArgs = { inherit username inputs; };
|
extraSpecialArgs = {
|
||||||
|
inherit username inputs;
|
||||||
|
};
|
||||||
users.${username} = {
|
users.${username} = {
|
||||||
imports =
|
imports = [
|
||||||
[ ./modules/home-manager ./hosts/${hostname}/home.nix ];
|
./modules/home-manager
|
||||||
|
./hosts/${hostname}/home.nix
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
specialArgs = inputs;
|
specialArgs = inputs;
|
||||||
};
|
};
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
nixosConfigurations.MONSTER = mkHost {
|
nixosConfigurations.MONSTER = mkHost {
|
||||||
hostname = "MONSTER";
|
hostname = "MONSTER";
|
||||||
username = "theaninova";
|
username = "theaninova";
|
||||||
|
|||||||
@@ -1,8 +1,17 @@
|
|||||||
{ config, pkgs, username, ... }: {
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
username,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
imports = [ ./hardware-configuration.nix ];
|
imports = [ ./hardware-configuration.nix ];
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
settings.experimental-features = [ "nix-command" "flakes" ];
|
settings.experimental-features = [
|
||||||
|
"nix-command"
|
||||||
|
"flakes"
|
||||||
|
];
|
||||||
gc = {
|
gc = {
|
||||||
automatic = true;
|
automatic = true;
|
||||||
randomizedDelaySec = "14m";
|
randomizedDelaySec = "14m";
|
||||||
@@ -54,7 +63,10 @@
|
|||||||
|
|
||||||
services.airprint.enable = true;
|
services.airprint.enable = true;
|
||||||
|
|
||||||
services.udev.packages = with pkgs; [ oversteer android-udev-rules ];
|
services.udev.packages = with pkgs; [
|
||||||
|
oversteer
|
||||||
|
android-udev-rules
|
||||||
|
];
|
||||||
|
|
||||||
virtualisation.docker.rootless = {
|
virtualisation.docker.rootless = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -111,7 +123,11 @@
|
|||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
firewall = {
|
firewall = {
|
||||||
allowedTCPPorts = [ 8100 5037 5173 ];
|
allowedTCPPorts = [
|
||||||
|
8100
|
||||||
|
5037
|
||||||
|
5173
|
||||||
|
];
|
||||||
allowedUDPPorts = [ 50765 ];
|
allowedUDPPorts = [ 50765 ];
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -129,7 +145,10 @@
|
|||||||
fileSystems."/mnt/media" = {
|
fileSystems."/mnt/media" = {
|
||||||
device = "kookaborrow:/media";
|
device = "kookaborrow:/media";
|
||||||
fsType = "nfs";
|
fsType = "nfs";
|
||||||
options = [ "x-systemd-automount" "noauto" ];
|
options = [
|
||||||
|
"x-systemd-automount"
|
||||||
|
"noauto"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/run/media/theaninova/heart-drive" = {
|
fileSystems."/run/media/theaninova/heart-drive" = {
|
||||||
|
|||||||
@@ -1,13 +1,26 @@
|
|||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules =
|
boot.initrd.availableKernelModules = [
|
||||||
[ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sr_mod" ];
|
"nvme"
|
||||||
|
"xhci_pci"
|
||||||
|
"ahci"
|
||||||
|
"usbhid"
|
||||||
|
"usb_storage"
|
||||||
|
"sd_mod"
|
||||||
|
"sr_mod"
|
||||||
|
];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ "kvm-amd" ];
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
@@ -22,8 +35,7 @@
|
|||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices =
|
swapDevices = [ { device = "/dev/disk/by-uuid/b09fbba2-c97a-41bc-a3cd-8204e30204f8"; } ];
|
||||||
[{ device = "/dev/disk/by-uuid/b09fbba2-c97a-41bc-a3cd-8204e30204f8"; }];
|
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
@@ -33,6 +45,5 @@
|
|||||||
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
|
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
hardware.cpu.amd.updateMicrocode =
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{ config, ... }: {
|
{ config, ... }:
|
||||||
|
{
|
||||||
xdg.enable = true;
|
xdg.enable = true;
|
||||||
xdg.userDirs.enable = true;
|
xdg.userDirs.enable = true;
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
@@ -7,8 +8,7 @@
|
|||||||
NPM_CONFIG_CACHE = "${config.xdg.cacheHome}/npm";
|
NPM_CONFIG_CACHE = "${config.xdg.cacheHome}/npm";
|
||||||
NPM_CONFIG_TMP = "${config.xdg.stateHome}/npm";
|
NPM_CONFIG_TMP = "${config.xdg.stateHome}/npm";
|
||||||
WINEPREFIX = "${config.xdg.configHome}/wineprefixes/default";
|
WINEPREFIX = "${config.xdg.configHome}/wineprefixes/default";
|
||||||
_JAVA_OPTGRADLE_USER_HOMEIONS =
|
_JAVA_OPTGRADLE_USER_HOMEIONS = ''-Djava.util.prefs.userRoot="${config.xdg.configHome}"/java'';
|
||||||
''-Djava.util.prefs.userRoot="${config.xdg.configHome}"/java'';
|
|
||||||
GRADLE_USER_HOME = "${config.xdg.configHome}/gradle";
|
GRADLE_USER_HOME = "${config.xdg.configHome}/gradle";
|
||||||
DVDCSS_CACHE = "${config.xdg.cacheHome}/dvdcss";
|
DVDCSS_CACHE = "${config.xdg.cacheHome}/dvdcss";
|
||||||
DOCKER_CONFIG = "${config.xdg.configHome}/docker";
|
DOCKER_CONFIG = "${config.xdg.configHome}/docker";
|
||||||
|
|||||||
@@ -1,4 +1,12 @@
|
|||||||
{ username, desktop, stateVersion, osConfig, inputs, ... }: {
|
{
|
||||||
|
username,
|
||||||
|
desktop,
|
||||||
|
stateVersion,
|
||||||
|
osConfig,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
home = {
|
home = {
|
||||||
stateVersion = osConfig.system.stateVersion;
|
stateVersion = osConfig.system.stateVersion;
|
||||||
inherit username;
|
inherit username;
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{ pkgs, ... }: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
xdg.configFile."ranger/rc.conf".source = ./ranger.conf;
|
xdg.configFile."ranger/rc.conf".source = ./ranger.conf;
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
# nix
|
# nix
|
||||||
@@ -15,7 +16,7 @@
|
|||||||
# media
|
# media
|
||||||
jellyfin-media-player
|
jellyfin-media-player
|
||||||
youtube-dl
|
youtube-dl
|
||||||
tartube
|
# tartube
|
||||||
yt-dlp
|
yt-dlp
|
||||||
f3d
|
f3d
|
||||||
mpv
|
mpv
|
||||||
@@ -41,7 +42,6 @@
|
|||||||
audacity
|
audacity
|
||||||
pinta
|
pinta
|
||||||
kdePackages.kdenlive
|
kdePackages.kdenlive
|
||||||
# friture TODO: broken
|
|
||||||
blender-hip
|
blender-hip
|
||||||
openscad-unstable
|
openscad-unstable
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
{ lib, stdenv, fetchFromGitHub, pkgs, }:
|
{
|
||||||
|
lib,
|
||||||
|
stdenv,
|
||||||
|
fetchFromGitHub,
|
||||||
|
pkgs,
|
||||||
|
}:
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "hid-fanatecff-tools";
|
pname = "hid-fanatecff-tools";
|
||||||
version = "0.1.0";
|
version = "0.1.0";
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
{ pkgs }:
|
{ pkgs }:
|
||||||
pkgs.threema-desktop.overrideAttrs (prev: {
|
pkgs.threema-desktop.overrideAttrs (prev: {
|
||||||
postFixup = prev.postFixup + ''
|
postFixup =
|
||||||
echo "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform=wayland --enable-features=WaylandWindowDecorations}}" >> $out/bin/threema
|
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 = {
|
programs = {
|
||||||
home-manager.enable = true;
|
home-manager.enable = true;
|
||||||
rbw = {
|
rbw = {
|
||||||
@@ -16,7 +17,9 @@
|
|||||||
gpg.enable = true;
|
gpg.enable = true;
|
||||||
btop = {
|
btop = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = { vim_keys = true; };
|
settings = {
|
||||||
|
vim_keys = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
zsh = {
|
zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{ pkgs }: {
|
{ pkgs }:
|
||||||
|
{
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.wrapFirefox pkgs.firefox-unwrapped {
|
package = pkgs.wrapFirefox pkgs.firefox-unwrapped {
|
||||||
extraPolicies = {
|
extraPolicies = {
|
||||||
@@ -43,27 +44,26 @@
|
|||||||
default = "Google";
|
default = "Google";
|
||||||
engines = {
|
engines = {
|
||||||
"Nix Packages" = {
|
"Nix Packages" = {
|
||||||
urls = [{
|
urls = [
|
||||||
template = "https://search.nixos.org/packages";
|
{
|
||||||
params = [
|
template = "https://search.nixos.org/packages";
|
||||||
{
|
params = [
|
||||||
name = "type";
|
{
|
||||||
value = "packages";
|
name = "type";
|
||||||
}
|
value = "packages";
|
||||||
{
|
}
|
||||||
name = "query";
|
{
|
||||||
value = "{searchTerms}";
|
name = "query";
|
||||||
}
|
value = "{searchTerms}";
|
||||||
];
|
}
|
||||||
}];
|
];
|
||||||
icon =
|
}
|
||||||
"${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
];
|
||||||
|
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||||
definedAliases = [ "@np" ];
|
definedAliases = [ "@np" ];
|
||||||
};
|
};
|
||||||
"NixOS Wiki" = {
|
"NixOS Wiki" = {
|
||||||
urls = [{
|
urls = [ { template = "https://nixos.wiki/index.php?search={searchTerms}"; } ];
|
||||||
template = "https://nixos.wiki/index.php?search={searchTerms}";
|
|
||||||
}];
|
|
||||||
iconUpdateURL = "https://nixos.wiki/favicon.png";
|
iconUpdateURL = "https://nixos.wiki/favicon.png";
|
||||||
updateInterval = 24 * 60 * 60 * 1000;
|
updateInterval = 24 * 60 * 60 * 1000;
|
||||||
definedAliases = [ "@nw" ];
|
definedAliases = [ "@nw" ];
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{ pkgs, ... }: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
home.packages = [ pkgs.neovide ];
|
home.packages = [ pkgs.neovide ];
|
||||||
xdg.configFile."neovide/config.toml".source = ./neovide.toml;
|
xdg.configFile."neovide/config.toml".source = ./neovide.toml;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,8 @@ let
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
enable = true;
|
enable = true;
|
||||||
defaultEditor = true;
|
defaultEditor = true;
|
||||||
vimAlias = true;
|
vimAlias = true;
|
||||||
@@ -33,7 +34,9 @@ in {
|
|||||||
smartindent = true;
|
smartindent = true;
|
||||||
signcolumn = "yes";
|
signcolumn = "yes";
|
||||||
|
|
||||||
undodir = { __raw = "os.getenv('HOME') .. '/.config/nvim/undodir'"; };
|
undodir = {
|
||||||
|
__raw = "os.getenv('HOME') .. '/.config/nvim/undodir'";
|
||||||
|
};
|
||||||
undofile = true;
|
undofile = true;
|
||||||
|
|
||||||
scrolloff = 12;
|
scrolloff = 12;
|
||||||
@@ -116,30 +119,37 @@ in {
|
|||||||
right = "┊";
|
right = "┊";
|
||||||
};
|
};
|
||||||
sections = {
|
sections = {
|
||||||
lualine_a = [{
|
lualine_a = [
|
||||||
name = "mode";
|
{
|
||||||
separator = {
|
name = "mode";
|
||||||
right = "";
|
separator = {
|
||||||
left = "";
|
right = "";
|
||||||
};
|
left = "";
|
||||||
icon = "";
|
};
|
||||||
}];
|
icon = "";
|
||||||
|
}
|
||||||
|
];
|
||||||
lualine_x = [
|
lualine_x = [
|
||||||
"(vim.g.disable_autoformat or vim.b.disable_autoformat) and '' or nil"
|
"(vim.g.disable_autoformat or vim.b.disable_autoformat) and '' or nil"
|
||||||
{ name = "filetype"; }
|
{ name = "filetype"; }
|
||||||
];
|
];
|
||||||
lualine_z = [{
|
lualine_z = [
|
||||||
name = "location";
|
{
|
||||||
separator = {
|
name = "location";
|
||||||
right = "";
|
separator = {
|
||||||
left = "";
|
right = "";
|
||||||
};
|
left = "";
|
||||||
}];
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
auto-save = {
|
auto-save = {
|
||||||
enable = true;
|
enable = true;
|
||||||
triggerEvents = [ "FocusLost" "BufLeave" ];
|
triggerEvents = [
|
||||||
|
"FocusLost"
|
||||||
|
"BufLeave"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
indent-blankline = {
|
indent-blankline = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -259,51 +269,55 @@ in {
|
|||||||
|
|
||||||
lsp = {
|
lsp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
keymaps = { diagnostic = { }; };
|
keymaps = {
|
||||||
enabledServers = [{
|
diagnostic = { };
|
||||||
name = "angularls";
|
};
|
||||||
extraOptions = {
|
enabledServers = [
|
||||||
cmd = [
|
{
|
||||||
"ngserver"
|
name = "angularls";
|
||||||
"--stdio"
|
extraOptions = {
|
||||||
"--tsProbeLocations"
|
cmd = [
|
||||||
""
|
"ngserver"
|
||||||
"--ngProbeLocations"
|
"--stdio"
|
||||||
""
|
"--tsProbeLocations"
|
||||||
];
|
""
|
||||||
on_new_config = {
|
"--ngProbeLocations"
|
||||||
__raw = ''
|
""
|
||||||
function(new_config, new_root_dir)
|
];
|
||||||
new_config.cmd = {
|
on_new_config = {
|
||||||
new_root_dir .. "/node_modules/@angular/language-server/bin/ngserver",
|
__raw = ''
|
||||||
"--stdio",
|
function(new_config, new_root_dir)
|
||||||
"--tsProbeLocations",
|
new_config.cmd = {
|
||||||
new_root_dir .. "/node_modules",
|
new_root_dir .. "/node_modules/@angular/language-server/bin/ngserver",
|
||||||
"--ngProbeLocations",
|
"--stdio",
|
||||||
new_root_dir .. "/node_modules",
|
"--tsProbeLocations",
|
||||||
}
|
new_root_dir .. "/node_modules",
|
||||||
end
|
"--ngProbeLocations",
|
||||||
'';
|
new_root_dir .. "/node_modules",
|
||||||
};
|
}
|
||||||
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
|
||||||
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 = {
|
servers = {
|
||||||
html.enable = true;
|
html.enable = true;
|
||||||
cssls.enable = true;
|
cssls.enable = true;
|
||||||
@@ -323,7 +337,10 @@ in {
|
|||||||
|
|
||||||
clangd = {
|
clangd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
cmd = [ "clangd" "--offset-encoding=utf-16" ];
|
cmd = [
|
||||||
|
"clangd"
|
||||||
|
"--offset-encoding=utf-16"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
nixd.enable = true;
|
nixd.enable = true;
|
||||||
@@ -347,16 +364,16 @@ in {
|
|||||||
end
|
end
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
symbolMap = { Copilot = ""; };
|
symbolMap = {
|
||||||
|
Copilot = "";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
cmp = {
|
cmp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
mapping = {
|
mapping = {
|
||||||
"<C-n>" =
|
"<C-n>" = "cmp.mapping.select_next_item({behavior = cmp.SelectBehavior.Select})";
|
||||||
"cmp.mapping.select_next_item({behavior = cmp.SelectBehavior.Select})";
|
"<C-p>" = "cmp.mapping.select_prev_item({behavior = cmp.SelectBehavior.Select})";
|
||||||
"<C-p>" =
|
|
||||||
"cmp.mapping.select_prev_item({behavior = cmp.SelectBehavior.Select})";
|
|
||||||
"<C-Space>" = "cmp.mapping.confirm({select = true})";
|
"<C-Space>" = "cmp.mapping.confirm({select = true})";
|
||||||
"<C-Enter>" = "cmp.mapping.complete()";
|
"<C-Enter>" = "cmp.mapping.complete()";
|
||||||
};
|
};
|
||||||
@@ -372,9 +389,11 @@ in {
|
|||||||
{ name = "nvim_lsp_signature_help"; }
|
{ name = "nvim_lsp_signature_help"; }
|
||||||
{ name = "nvim_lsp_document_symbol"; }
|
{ name = "nvim_lsp_document_symbol"; }
|
||||||
];
|
];
|
||||||
formatting.fields = [ "abbr" "kind" ];
|
formatting.fields = [
|
||||||
snippet.expand =
|
"abbr"
|
||||||
"function(args) require('luasnip').lsp_expand(args.body) end";
|
"kind"
|
||||||
|
];
|
||||||
|
snippet.expand = "function(args) require('luasnip').lsp_expand(args.body) end";
|
||||||
window = {
|
window = {
|
||||||
completion.border = "rounded";
|
completion.border = "rounded";
|
||||||
documentation.border = "rounded";
|
documentation.border = "rounded";
|
||||||
|
|||||||
@@ -82,8 +82,7 @@
|
|||||||
key = "<leader>xw";
|
key = "<leader>xw";
|
||||||
mode = "n";
|
mode = "n";
|
||||||
lua = true;
|
lua = true;
|
||||||
action =
|
action = "function() require('trouble').toggle('workspace_diagnostics') end";
|
||||||
"function() require('trouble').toggle('workspace_diagnostics') end";
|
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
key = "<leader>xd";
|
key = "<leader>xd";
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{ pkgs, homeDirectory, ... }: {
|
{ pkgs, homeDirectory, ... }:
|
||||||
|
{
|
||||||
services = {
|
services = {
|
||||||
gpg-agent = {
|
gpg-agent = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -2,10 +2,13 @@
|
|||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let cfg = config.boot.quiet;
|
let
|
||||||
|
cfg = config.boot.quiet;
|
||||||
in {
|
in
|
||||||
options.boot.quiet = { enable = mkEnableOption (mdDoc "Clean, quiet boot"); };
|
{
|
||||||
|
options.boot.quiet = {
|
||||||
|
enable = mkEnableOption (mdDoc "Clean, quiet boot");
|
||||||
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
boot = {
|
boot = {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{ ... }: {
|
{ ... }:
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./boot/quiet.nix
|
./boot/quiet.nix
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,17 @@
|
|||||||
{ config, lib, pkgs, username, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
username,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let cfg = config.desktops.hyprland;
|
let
|
||||||
|
cfg = config.desktops.hyprland;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.desktops.hyprland = {
|
options.desktops.hyprland = {
|
||||||
enable = mkEnableOption (mdDoc "Enable a DE based on Hyprland");
|
enable = mkEnableOption (mdDoc "Enable a DE based on Hyprland");
|
||||||
};
|
};
|
||||||
@@ -12,8 +19,10 @@ in {
|
|||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
xdg.portal = {
|
xdg.portal = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraPortals =
|
extraPortals = [
|
||||||
[ pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-kde ];
|
pkgs.xdg-desktop-portal-gtk
|
||||||
|
pkgs.xdg-desktop-portal-kde
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
|
|||||||
@@ -1,17 +1,31 @@
|
|||||||
{ pkgs, lib, config, ... }:
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let cfg = config.fonts.fira-code;
|
let
|
||||||
|
cfg = config.fonts.fira-code;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.fonts.fira-code = {
|
options.fonts.fira-code = {
|
||||||
enable = mkEnableOption "Enable the preset for Fira Code";
|
enable = mkEnableOption "Enable the preset for Fira Code";
|
||||||
stylisticSets = mkOption {
|
stylisticSets = mkOption {
|
||||||
type = types.listOf types.str;
|
type = types.listOf types.str;
|
||||||
description = mdDoc
|
description = mdDoc "[Stylistic sets](https://github.com/tonsky/FiraCode/wiki/How-to-enable-stylistic-sets) for Fira Code";
|
||||||
"[Stylistic sets](https://github.com/tonsky/FiraCode/wiki/How-to-enable-stylistic-sets) for Fira Code";
|
default = [
|
||||||
default =
|
"zero"
|
||||||
[ "zero" "onum" "ss04" "cv19" "cv23" "ss09" "ss06" "ss07" "ss10" ];
|
"onum"
|
||||||
|
"ss04"
|
||||||
|
"cv19"
|
||||||
|
"cv23"
|
||||||
|
"ss09"
|
||||||
|
"ss06"
|
||||||
|
"ss07"
|
||||||
|
"ss10"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
default = mkOption {
|
default = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
@@ -26,10 +40,7 @@ in {
|
|||||||
nerdfonts.additionalFonts = [ "FiraCode" ];
|
nerdfonts.additionalFonts = [ "FiraCode" ];
|
||||||
fontconfig = {
|
fontconfig = {
|
||||||
defaultFonts.monospace = mkIf cfg.default [
|
defaultFonts.monospace = mkIf cfg.default [
|
||||||
(if (config.fonts.nerdfonts.enable) then
|
(if (config.fonts.nerdfonts.enable) then "Fira Code Nerd Font" else "FiraCode")
|
||||||
"Fira Code Nerd Font"
|
|
||||||
else
|
|
||||||
"FiraCode")
|
|
||||||
];
|
];
|
||||||
localConf = ''
|
localConf = ''
|
||||||
<match target="font">
|
<match target="font">
|
||||||
@@ -37,10 +48,7 @@ in {
|
|||||||
<string>Fira</string>
|
<string>Fira</string>
|
||||||
</test>
|
</test>
|
||||||
<edit name="fontfeatures" mode="append">
|
<edit name="fontfeatures" mode="append">
|
||||||
${
|
${lib.concatStringsSep " " (map (set: "<string>${set}</string>") cfg.stylisticSets)}
|
||||||
lib.concatStringsSep " "
|
|
||||||
(map (set: "<string>${set}</string>") cfg.stylisticSets)
|
|
||||||
}
|
|
||||||
</edit>
|
</edit>
|
||||||
</match>
|
</match>
|
||||||
'';
|
'';
|
||||||
|
|||||||
@@ -1,9 +1,15 @@
|
|||||||
{ pkgs, lib, config, ... }:
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let cfg = config.fonts.nerdfonts;
|
let
|
||||||
|
cfg = config.fonts.nerdfonts;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.fonts.nerdfonts = {
|
options.fonts.nerdfonts = {
|
||||||
enable = mkEnableOption "Enable nerdfonts";
|
enable = mkEnableOption "Enable nerdfonts";
|
||||||
additionalFonts = mkOption {
|
additionalFonts = mkOption {
|
||||||
@@ -15,12 +21,9 @@ in {
|
|||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
fonts = {
|
fonts = {
|
||||||
packages = with pkgs;
|
packages = with pkgs; [
|
||||||
[
|
(nerdfonts.override { fonts = [ "NerdFontsSymbolsOnly" ] ++ cfg.additionalFonts; })
|
||||||
(nerdfonts.override {
|
];
|
||||||
fonts = [ "NerdFontsSymbolsOnly" ] ++ cfg.additionalFonts;
|
|
||||||
})
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,15 @@
|
|||||||
{ pkgs, lib, config, ... }:
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let cfg = config.fonts.noto-sans;
|
let
|
||||||
|
cfg = config.fonts.noto-sans;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.fonts.noto-sans = {
|
options.fonts.noto-sans = {
|
||||||
enable = mkEnableOption "Enable the Noto Sans font";
|
enable = mkEnableOption "Enable the Noto Sans font";
|
||||||
default = mkOption {
|
default = mkOption {
|
||||||
@@ -15,14 +21,15 @@ in {
|
|||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
fonts = {
|
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" ];
|
nerdfonts.additionalFonts = [ "Noto" ];
|
||||||
fontconfig = {
|
fontconfig = {
|
||||||
defaultFonts.sansSerif = mkIf cfg.default [
|
defaultFonts.sansSerif = mkIf cfg.default [
|
||||||
(if (config.fonts.nerdfonts.enable) then
|
(if (config.fonts.nerdfonts.enable) then "Noto Sans Nerd Font" else "Noto Sans")
|
||||||
"Noto Sans Nerd Font"
|
|
||||||
else
|
|
||||||
"Noto Sans")
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,12 +1,17 @@
|
|||||||
{ pkgs, lib, config, ... }:
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let cfg = config.hardware.amdgpu.preset.default;
|
let
|
||||||
|
cfg = config.hardware.amdgpu.preset.default;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.hardware.amdgpu.preset.default = {
|
options.hardware.amdgpu.preset.default = {
|
||||||
enable =
|
enable = mkEnableOption "Enable ADM GPU driver support with some sane defaults";
|
||||||
mkEnableOption "Enable ADM GPU driver support with some sane defaults";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
@@ -19,7 +24,10 @@ in {
|
|||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
# https://docs.kernel.org/gpu/amdgpu/module-parameters.html
|
# 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" ];
|
initrd.kernelModules = [ "amdgpu" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,15 @@
|
|||||||
{ pkgs, lib, config, ... }:
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let cfg = config.hardware.audio.preset.pipewire;
|
let
|
||||||
|
cfg = config.hardware.audio.preset.pipewire;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.hardware.audio.preset.pipewire = {
|
options.hardware.audio.preset.pipewire = {
|
||||||
enable = mkEnableOption "Enable pipewire with sane defaults";
|
enable = mkEnableOption "Enable pipewire with sane defaults";
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,9 +1,16 @@
|
|||||||
{ pkgs, lib, config, username, ... }:
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
username,
|
||||||
|
...
|
||||||
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let cfg = config.hardware.cc1;
|
let
|
||||||
|
cfg = config.hardware.cc1;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.hardware.cc1 = {
|
options.hardware.cc1 = {
|
||||||
enable = mkEnableOption "Enable CC1 optimizations";
|
enable = mkEnableOption "Enable CC1 optimizations";
|
||||||
layout = mkOption {
|
layout = mkOption {
|
||||||
@@ -19,7 +26,10 @@ in {
|
|||||||
layout = cfg.layout;
|
layout = cfg.layout;
|
||||||
extraLayouts.cc1-thea = {
|
extraLayouts.cc1-thea = {
|
||||||
description = "A CC1 optimized layout";
|
description = "A CC1 optimized layout";
|
||||||
languages = [ "eng" "ger" ];
|
languages = [
|
||||||
|
"eng"
|
||||||
|
"ger"
|
||||||
|
];
|
||||||
symbolsFile = ./${cfg.layout};
|
symbolsFile = ./${cfg.layout};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,12 +1,18 @@
|
|||||||
{ pkgs, lib, config, username, ... }:
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
username,
|
||||||
|
...
|
||||||
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let cfg = config.hardware.fv43u;
|
let
|
||||||
|
cfg = config.hardware.fv43u;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.hardware.fv43u = {
|
options.hardware.fv43u = {
|
||||||
enable =
|
enable = mkEnableOption "Enable optimisations for the Gigabyte FV43U monitor";
|
||||||
mkEnableOption "Enable optimisations for the Gigabyte FV43U monitor";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|||||||
@@ -1,9 +1,15 @@
|
|||||||
{ pkgs, lib, config, ... }:
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let cfg = config.hardware.gbmonctl;
|
let
|
||||||
|
cfg = config.hardware.gbmonctl;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.hardware.gbmonctl = {
|
options.hardware.gbmonctl = {
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
|
|||||||
@@ -1,12 +1,17 @@
|
|||||||
{ pkgs, lib, config, ... }:
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let cfg = config.hardware.nvidia.preset.nouveau;
|
let
|
||||||
|
cfg = config.hardware.nvidia.preset.nouveau;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.hardware.nvidia.preset.nouveau = {
|
options.hardware.nvidia.preset.nouveau = {
|
||||||
enable = mkEnableOption
|
enable = mkEnableOption "Enable the free Nouveau NVIDIA driver with some sane defaults";
|
||||||
"Enable the free Nouveau NVIDIA driver with some sane defaults";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|||||||
@@ -1,12 +1,17 @@
|
|||||||
{ pkgs, lib, config, ... }:
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let cfg = config.hardware.nvidia.preset.proprietary;
|
let
|
||||||
|
cfg = config.hardware.nvidia.preset.proprietary;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.hardware.nvidia.preset.proprietary = {
|
options.hardware.nvidia.preset.proprietary = {
|
||||||
enable = mkEnableOption
|
enable = mkEnableOption "Enable proprietary NVIDIA driver support with some sane defaults";
|
||||||
"Enable proprietary NVIDIA driver support with some sane defaults";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
@@ -14,16 +19,30 @@ in {
|
|||||||
enable = true;
|
enable = true;
|
||||||
driSupport = true;
|
driSupport = true;
|
||||||
driSupport32Bit = 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" ];
|
services.xserver.videoDrivers = [ "nvidia" ];
|
||||||
|
|
||||||
boot.kernelParams = [ "fbdev=1" "nvidia_drm.fbdev=1" ];
|
boot.kernelParams = [
|
||||||
boot.kernelModules =
|
"fbdev=1"
|
||||||
[ "nvidia" "nvidia_modeset" "nvidia_uvm" "nvidia_drm" ];
|
"nvidia_drm.fbdev=1"
|
||||||
boot.initrd.kernelModules =
|
];
|
||||||
[ "nvidia" "nvidia_modeset" "nvidia_uvm" "nvidia_drm" ];
|
boot.kernelModules = [
|
||||||
|
"nvidia"
|
||||||
|
"nvidia_modeset"
|
||||||
|
"nvidia_uvm"
|
||||||
|
"nvidia_drm"
|
||||||
|
];
|
||||||
|
boot.initrd.kernelModules = [
|
||||||
|
"nvidia"
|
||||||
|
"nvidia_modeset"
|
||||||
|
"nvidia_uvm"
|
||||||
|
"nvidia_drm"
|
||||||
|
];
|
||||||
|
|
||||||
hardware.nvidia = {
|
hardware.nvidia = {
|
||||||
modesetting.enable = true;
|
modesetting.enable = true;
|
||||||
|
|||||||
@@ -1,9 +1,15 @@
|
|||||||
{ pkgs, lib, config, ... }:
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let cfg = config.hardware.virtual-camera;
|
let
|
||||||
|
cfg = config.hardware.virtual-camera;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.hardware.virtual-camera = {
|
options.hardware.virtual-camera = {
|
||||||
enable = mkEnableOption "Enable the virtual camera";
|
enable = mkEnableOption "Enable the virtual camera";
|
||||||
};
|
};
|
||||||
@@ -11,9 +17,12 @@ in {
|
|||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
boot = {
|
boot = {
|
||||||
# Virtual Camera/Mic
|
# Virtual Camera/Mic
|
||||||
kernelModules = [ "v4l2loopback" "snd-aloop" "sg" ];
|
kernelModules = [
|
||||||
extraModulePackages = with config.boot.kernelPackages;
|
"v4l2loopback"
|
||||||
[ v4l2loopback.out ];
|
"snd-aloop"
|
||||||
|
"sg"
|
||||||
|
];
|
||||||
|
extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback.out ];
|
||||||
extraModprobeConfig = ''
|
extraModprobeConfig = ''
|
||||||
options v4l2loopback exclusive_caps=1 card_label="Virtual Camera"
|
options v4l2loopback exclusive_caps=1 card_label="Virtual Camera"
|
||||||
'';
|
'';
|
||||||
|
|||||||
@@ -1,9 +1,15 @@
|
|||||||
{ pkgs, lib, config, ... }:
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let cfg = config.locale.preset.theaninova;
|
let
|
||||||
|
cfg = config.locale.preset.theaninova;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.locale.preset.theaninova = {
|
options.locale.preset.theaninova = {
|
||||||
enable = mkEnableOption "Enable the locale preset for Theaninova";
|
enable = mkEnableOption "Enable the locale preset for Theaninova";
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,9 +1,16 @@
|
|||||||
{ pkgs, lib, config, username, ... }:
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
username,
|
||||||
|
...
|
||||||
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let cfg = config.services.airprint;
|
let
|
||||||
|
cfg = config.services.airprint;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.services.airprint = {
|
options.services.airprint = {
|
||||||
enable = mkEnableOption "Enable printing over the air using sane and avahi";
|
enable = mkEnableOption "Enable printing over the air using sane and avahi";
|
||||||
};
|
};
|
||||||
@@ -19,6 +26,9 @@ in {
|
|||||||
nssmdns4 = true;
|
nssmdns4 = true;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
};
|
};
|
||||||
users.users.${username}.extraGroups = [ "lp" "scanner" ];
|
users.users.${username}.extraGroups = [
|
||||||
|
"lp"
|
||||||
|
"scanner"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,13 @@
|
|||||||
{ lib, appimageTools, fetchurl }:
|
{
|
||||||
|
lib,
|
||||||
|
appimageTools,
|
||||||
|
fetchurl,
|
||||||
|
}:
|
||||||
appimageTools.wrapType2 rec {
|
appimageTools.wrapType2 rec {
|
||||||
name = "cura";
|
name = "cura";
|
||||||
version = "5.6.0";
|
version = "5.6.0";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url =
|
url = "https://github.com/Ultimaker/Cura/releases/download/${version}/UltiMaker-Cura-${version}-linux-X64.AppImage";
|
||||||
"https://github.com/Ultimaker/Cura/releases/download/${version}/UltiMaker-Cura-${version}-linux-X64.AppImage";
|
|
||||||
hash = "sha256-EHiWoNpLKHPzv6rZrtNgEr7y//iVcRYeV/TaCn8QpEA=";
|
hash = "sha256-EHiWoNpLKHPzv6rZrtNgEr7y//iVcRYeV/TaCn8QpEA=";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,11 @@
|
|||||||
{ lib, scdoc, buildGoModule, fetchFromGitLab, hidapi, udev, }:
|
{
|
||||||
|
lib,
|
||||||
|
scdoc,
|
||||||
|
buildGoModule,
|
||||||
|
fetchFromGitLab,
|
||||||
|
hidapi,
|
||||||
|
udev,
|
||||||
|
}:
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
pname = "darkman";
|
pname = "darkman";
|
||||||
version = "1.5.4";
|
version = "1.5.4";
|
||||||
@@ -36,8 +43,7 @@ buildGoModule rec {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description =
|
description = "Framework for dark-mode and light-mode transitions on Linux desktop";
|
||||||
"Framework for dark-mode and light-mode transitions on Linux desktop";
|
|
||||||
homepage = "https://gitlab.com/WhyNotHugo/darkman";
|
homepage = "https://gitlab.com/WhyNotHugo/darkman";
|
||||||
license = licenses.isc;
|
license = licenses.isc;
|
||||||
maintainers = [ maintainers.ajgrf ];
|
maintainers = [ maintainers.ajgrf ];
|
||||||
|
|||||||
@@ -1,4 +1,11 @@
|
|||||||
{ lib, pkgs, buildGoModule, fetchFromGitHub, hidapi, udev, }:
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
buildGoModule,
|
||||||
|
fetchFromGitHub,
|
||||||
|
hidapi,
|
||||||
|
udev,
|
||||||
|
}:
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
pname = "gbmonctl";
|
pname = "gbmonctl";
|
||||||
version = "1d01a090";
|
version = "1d01a090";
|
||||||
@@ -9,15 +16,17 @@ buildGoModule rec {
|
|||||||
hash = "sha256-KeBdGtQWz9TBmk1HdXlkIs2r2aZ+EO8WhNaGbsFBBR8=";
|
hash = "sha256-KeBdGtQWz9TBmk1HdXlkIs2r2aZ+EO8WhNaGbsFBBR8=";
|
||||||
};
|
};
|
||||||
vendorHash = "sha256-cEqpEaX4eJ/6um9qbw/kzg9/vesOWmdiHzZ7IodVV9c=";
|
vendorHash = "sha256-cEqpEaX4eJ/6um9qbw/kzg9/vesOWmdiHzZ7IodVV9c=";
|
||||||
buildInputs = [ hidapi udev ];
|
buildInputs = [
|
||||||
|
hidapi
|
||||||
|
udev
|
||||||
|
];
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
mkdir -p $out/bin $out/lib/udev/rules.d
|
mkdir -p $out/bin $out/lib/udev/rules.d
|
||||||
echo 'KERNEL=="hidraw*", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="1100", MODE="0666", TAG+="uaccess"' \
|
echo 'KERNEL=="hidraw*", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="1100", MODE="0666", TAG+="uaccess"' \
|
||||||
> $out/lib/udev/rules.d/99-gigabyte-monitor.rules
|
> $out/lib/udev/rules.d/99-gigabyte-monitor.rules
|
||||||
'';
|
'';
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description =
|
description = "A CLI tool to change monitor settings over USB to the Gigabyte M32U";
|
||||||
"A CLI tool to change monitor settings over USB to the Gigabyte M32U";
|
|
||||||
homepage = "https://github.com/kelvie/gbmonctl";
|
homepage = "https://github.com/kelvie/gbmonctl";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
{ stdenv, fetchFromGitHub, glibc, lib, }:
|
{
|
||||||
|
stdenv,
|
||||||
|
fetchFromGitHub,
|
||||||
|
glibc,
|
||||||
|
lib,
|
||||||
|
}:
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "lpc21isp";
|
name = "lpc21isp";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
@@ -13,8 +18,7 @@ stdenv.mkDerivation {
|
|||||||
cp lpc21isp $out/bin
|
cp lpc21isp $out/bin
|
||||||
'';
|
'';
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description =
|
description = "Portable command line ISP for NXP LPC family and Analog Devices ADUC70xx";
|
||||||
"Portable command line ISP for NXP LPC family and Analog Devices ADUC70xx";
|
|
||||||
homepage = "https://github.com/capiman/lpc21isp";
|
homepage = "https://github.com/capiman/lpc21isp";
|
||||||
license = licenses.lgpl3Plus;
|
license = licenses.lgpl3Plus;
|
||||||
maintainers = [ maintainers.theaninova ];
|
maintainers = [ maintainers.theaninova ];
|
||||||
|
|||||||
Reference in New Issue
Block a user