refactor(repo): reformat to nixfmt; relicense to 0BSD
This commit is contained in:
parent
035fb24038
commit
db2564d828
39 changed files with 451 additions and 318 deletions
|
@ -2,9 +2,11 @@
|
|||
inputs,
|
||||
self,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (self.lib) mkHosts;
|
||||
in {
|
||||
in
|
||||
{
|
||||
flake = {
|
||||
nixosConfigurations = mkHosts {
|
||||
solterra = {
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{...}: {
|
||||
{ ... }:
|
||||
{
|
||||
boot.kernel.sysctl = {
|
||||
"dev.tty.ldisc_autoload" = "0";
|
||||
"fs.protected_fifos" = "2";
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
{...}: {
|
||||
{ ... }:
|
||||
{
|
||||
boot.kernel.sysctl = {
|
||||
"vm.dirty_ratio" = 20;
|
||||
"vm.dirty_background_ratio" = 10;
|
||||
"vm.vfs_cache_pressure" = 25;
|
||||
"net.core.default_qdisc" = ''
|
||||
cake'';
|
||||
"net.ipv4.tcp_congestion_control" = ''
|
||||
bbr'';
|
||||
"net.core.default_qdisc" = ''cake'';
|
||||
"net.ipv4.tcp_congestion_control" = ''bbr'';
|
||||
"vm.page-cluster" = 1;
|
||||
"kernel.nmi_watchdog" = 0;
|
||||
"vm.swappiness" = 200;
|
||||
|
@ -22,10 +21,8 @@
|
|||
"net.core.wmem_default" = 1048576;
|
||||
"net.core.wmem_max" = 16777216;
|
||||
"net.core.optmem_max" = 65536;
|
||||
"net.ipv4.tcp_rmem" = ''
|
||||
4096 1048576 2097152'';
|
||||
"net.ipv4.tcp_wmem" = ''
|
||||
4096 65536 16777216'';
|
||||
"net.ipv4.tcp_rmem" = ''4096 1048576 2097152'';
|
||||
"net.ipv4.tcp_wmem" = ''4096 65536 16777216'';
|
||||
"net.ipv4.udp_rmem_min" = 16384;
|
||||
"net.ipv4.udp_wmem_min" = 16384;
|
||||
"net.ipv4.tcp_fastopen" = 3;
|
||||
|
@ -37,7 +34,6 @@
|
|||
"net.ipv4.tcp_keepalive_intvl" = 10;
|
||||
"net.ipv4.tcp_keepalive_probes" = 6;
|
||||
"net.ipv4.tcp_mtu_probing" = 1;
|
||||
"net.ipv4.ip_local_port_range" = ''
|
||||
30000 65535'';
|
||||
"net.ipv4.ip_local_port_range" = ''30000 65535'';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{...}: {
|
||||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./hardware.nix
|
||||
./system.nix
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{...}: {
|
||||
{ ... }:
|
||||
{
|
||||
services.tlp = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
|
|
@ -1,17 +1,35 @@
|
|||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
alqueva.system.fonts = {
|
||||
enable = true;
|
||||
names = {
|
||||
sansSerif = ["Liberation Sans"];
|
||||
monospace = ["JetBrainsMono Nerd Font"];
|
||||
serif = ["Liberation Serif"];
|
||||
emoji = ["OpenMoji Color"];
|
||||
sansSerif = [ "Liberation Sans" ];
|
||||
monospace = [ "JetBrainsMono Nerd Font" ];
|
||||
serif = [ "Liberation Serif" ];
|
||||
emoji = [ "OpenMoji Color" ];
|
||||
};
|
||||
packages = {
|
||||
sansSerif = [pkgs.liberation_ttf pkgs.noto-fonts pkgs.noto-fonts-cjk-sans pkgs.noto-fonts-cjk-serif];
|
||||
monospace = [pkgs.nerd-fonts.jetbrains-mono pkgs.noto-fonts];
|
||||
serif = [pkgs.liberation_ttf pkgs.noto-fonts pkgs.noto-fonts pkgs.noto-fonts-cjk-sans pkgs.noto-fonts-cjk-serif];
|
||||
emoji = [pkgs.openmoji-color pkgs.noto-fonts];
|
||||
sansSerif = [
|
||||
pkgs.liberation_ttf
|
||||
pkgs.noto-fonts
|
||||
pkgs.noto-fonts-cjk-sans
|
||||
pkgs.noto-fonts-cjk-serif
|
||||
];
|
||||
monospace = [
|
||||
pkgs.nerd-fonts.jetbrains-mono
|
||||
pkgs.noto-fonts
|
||||
];
|
||||
serif = [
|
||||
pkgs.liberation_ttf
|
||||
pkgs.noto-fonts
|
||||
pkgs.noto-fonts
|
||||
pkgs.noto-fonts-cjk-sans
|
||||
pkgs.noto-fonts-cjk-serif
|
||||
];
|
||||
emoji = [
|
||||
pkgs.openmoji-color
|
||||
pkgs.noto-fonts
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -6,32 +6,40 @@
|
|||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = ["nvme" "xhci_pci"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-amd"];
|
||||
boot.extraModulePackages = [];
|
||||
boot.initrd.availableKernelModules = [
|
||||
"nvme"
|
||||
"xhci_pci"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/41853b7d-f098-4ae6-ae9c-1b97b1074bde";
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=@"];
|
||||
options = [ "subvol=@" ];
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."luks-fc6b34e2-c93a-4d14-8194-1c30b63f8fb5".device = "/dev/disk/by-uuid/fc6b34e2-c93a-4d14-8194-1c30b63f8fb5";
|
||||
boot.initrd.luks.devices."luks-fc6b34e2-c93a-4d14-8194-1c30b63f8fb5".device =
|
||||
"/dev/disk/by-uuid/fc6b34e2-c93a-4d14-8194-1c30b63f8fb5";
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/47C4-D06C";
|
||||
fsType = "vfat";
|
||||
options = ["fmask=0077" "dmask=0077"];
|
||||
options = [
|
||||
"fmask=0077"
|
||||
"dmask=0077"
|
||||
];
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{device = "/dev/disk/by-uuid/5743e1ce-4f91-4ab9-9b5d-b46eeda3fb1e";}
|
||||
{ device = "/dev/disk/by-uuid/5743e1ce-4f91-4ab9-9b5d-b46eeda3fb1e"; }
|
||||
];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{...}: {
|
||||
{ ... }:
|
||||
{
|
||||
networking = {
|
||||
networkmanager = {
|
||||
enable = true;
|
||||
|
@ -29,7 +30,7 @@
|
|||
services.resolved = {
|
||||
enable = true;
|
||||
dnssec = "true";
|
||||
domains = ["~."];
|
||||
domains = [ "~." ];
|
||||
fallbackDns = [
|
||||
"1.1.1.1#cloudflare-dns.com"
|
||||
"1.0.0.1#cloudflare-dns.com"
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{...}: {
|
||||
{ ... }:
|
||||
{
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
wireplumber = {
|
||||
|
@ -26,12 +27,12 @@
|
|||
"support.*" = "support/libspa-support";
|
||||
};
|
||||
"modules" = [
|
||||
{"name" = "libpipewire-module-protocol-native";}
|
||||
{"name" = "libpipewire-module-client-node";}
|
||||
{"name" = "libpipewire-module-client-device";}
|
||||
{"name" = "libpipewire-module-adapter";}
|
||||
{"name" = "libpipewire-module-metadata";}
|
||||
{"name" = "libpipewire-module-session-manager";}
|
||||
{ "name" = "libpipewire-module-protocol-native"; }
|
||||
{ "name" = "libpipewire-module-client-node"; }
|
||||
{ "name" = "libpipewire-module-client-device"; }
|
||||
{ "name" = "libpipewire-module-adapter"; }
|
||||
{ "name" = "libpipewire-module-metadata"; }
|
||||
{ "name" = "libpipewire-module-session-manager"; }
|
||||
];
|
||||
};
|
||||
"filter" = {
|
||||
|
@ -67,14 +68,17 @@
|
|||
"rt.time.soft" = -1;
|
||||
"rt.time.hard" = -1;
|
||||
};
|
||||
"flags" = ["ifexists" "nofail"];
|
||||
"flags" = [
|
||||
"ifexists"
|
||||
"nofail"
|
||||
];
|
||||
}
|
||||
{"name" = "libpipewire-module-protocol-native";}
|
||||
{"name" = "libpipewire-module-client-node";}
|
||||
{"name" = "libpipewire-module-client-device";}
|
||||
{"name" = "libpipewire-module-adapter";}
|
||||
{"name" = "libpipewire-module-metadata";}
|
||||
{"name" = "libpipewire-module-session-manager";}
|
||||
{ "name" = "libpipewire-module-protocol-native"; }
|
||||
{ "name" = "libpipewire-module-client-node"; }
|
||||
{ "name" = "libpipewire-module-client-device"; }
|
||||
{ "name" = "libpipewire-module-adapter"; }
|
||||
{ "name" = "libpipewire-module-metadata"; }
|
||||
{ "name" = "libpipewire-module-session-manager"; }
|
||||
];
|
||||
};
|
||||
"filter" = {
|
||||
|
@ -147,7 +151,10 @@
|
|||
"uclamp.min" = 0;
|
||||
"uclamp.max" = 2048;
|
||||
};
|
||||
"flags" = ["ifexists" "nofail"];
|
||||
"flags" = [
|
||||
"ifexists"
|
||||
"nofail"
|
||||
];
|
||||
}
|
||||
{
|
||||
"name" = "libpipewire-module-protocol-native";
|
||||
|
@ -163,7 +170,7 @@
|
|||
}
|
||||
{
|
||||
"name" = "libpipewire-module-protocol-pulse";
|
||||
"args" = {};
|
||||
"args" = { };
|
||||
}
|
||||
];
|
||||
"exec" = [
|
||||
|
@ -177,22 +184,22 @@
|
|||
{
|
||||
"cmd" = "load-module";
|
||||
"args" = "module-always-sink";
|
||||
"flags" = [];
|
||||
"flags" = [ ];
|
||||
}
|
||||
{
|
||||
"cmd" = "load-module";
|
||||
"args" = "module-device-manager";
|
||||
"flags" = [];
|
||||
"flags" = [ ];
|
||||
}
|
||||
{
|
||||
"cmd" = "load-module";
|
||||
"args" = "module-device-restore";
|
||||
"flags" = [];
|
||||
"flags" = [ ];
|
||||
}
|
||||
{
|
||||
"cmd" = "load-module";
|
||||
"args" = "module-stream-restore";
|
||||
"flags" = [];
|
||||
"flags" = [ ];
|
||||
}
|
||||
{
|
||||
"cmd" = "load-module";
|
||||
|
@ -201,7 +208,7 @@
|
|||
{
|
||||
"cmd" = "load-module";
|
||||
"args" = "module-gsettings";
|
||||
"flags" = ["nofail"];
|
||||
"flags" = [ "nofail" ];
|
||||
}
|
||||
];
|
||||
"properties" = {
|
||||
|
@ -237,7 +244,10 @@
|
|||
"context.data-loops" = [
|
||||
{
|
||||
"loop.rt-prio" = -1;
|
||||
"loop.class" = ["data.rt" "audio.rt"];
|
||||
"loop.class" = [
|
||||
"data.rt"
|
||||
"audio.rt"
|
||||
];
|
||||
"library.name.system" = "support/libspa-support";
|
||||
"thread.name" = "data-loop.0";
|
||||
}
|
||||
|
@ -245,7 +255,7 @@
|
|||
"core.daemon" = true;
|
||||
"core.name" = "pipewire-0";
|
||||
"default.clock.rate" = 192000;
|
||||
"default.clock.allowed-rates" = [192000];
|
||||
"default.clock.allowed-rates" = [ 192000 ];
|
||||
"module.x11.bell" = true;
|
||||
"module.access" = true;
|
||||
"module.jackdbus-detect" = true;
|
||||
|
@ -287,7 +297,10 @@
|
|||
"uclamp.min" = 0;
|
||||
"uclamp.max" = 2048;
|
||||
};
|
||||
"flags" = ["ifexists" "nofail"];
|
||||
"flags" = [
|
||||
"ifexists"
|
||||
"nofail"
|
||||
];
|
||||
}
|
||||
{
|
||||
"name" = "libpipewire-module-protocol-native";
|
||||
|
@ -304,7 +317,10 @@
|
|||
}
|
||||
{
|
||||
"name" = "libpipewire-module-portal";
|
||||
"flags" = ["ifexists" "nofail"];
|
||||
"flags" = [
|
||||
"ifexists"
|
||||
"nofail"
|
||||
];
|
||||
}
|
||||
{
|
||||
"name" = "libpipewire-module-access";
|
||||
|
@ -328,7 +344,10 @@
|
|||
"x11.display" = null;
|
||||
"x11.xauthority" = null;
|
||||
};
|
||||
"flags" = ["ifexists" "nofail"];
|
||||
"flags" = [
|
||||
"ifexists"
|
||||
"nofail"
|
||||
];
|
||||
"condition" = [
|
||||
{
|
||||
"module.x11.bell" = true;
|
||||
|
@ -338,10 +357,13 @@
|
|||
{
|
||||
"name" = "libpipewire-module-jackdbus-detect";
|
||||
"args" = {
|
||||
"source.props" = {};
|
||||
"sink.props" = {};
|
||||
"source.props" = { };
|
||||
"sink.props" = { };
|
||||
};
|
||||
"flags" = ["ifexists" "nofail"];
|
||||
"flags" = [
|
||||
"ifexists"
|
||||
"nofail"
|
||||
];
|
||||
"condition" = [
|
||||
{
|
||||
"module.jackdbus-detect" = true;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{...}: {
|
||||
{ ... }:
|
||||
{
|
||||
programs.ssh = {
|
||||
startAgent = true;
|
||||
enableAskPassword = true;
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./config/sysctl.d/performance.nix
|
||||
./config/sysctl.d/hardening.nix
|
||||
|
@ -57,7 +58,7 @@
|
|||
enable = true;
|
||||
package = pkgs.scx_git.rustscheds;
|
||||
scheduler = "scx_lavd";
|
||||
extraArgs = ["--performance"];
|
||||
extraArgs = [ "--performance" ];
|
||||
};
|
||||
|
||||
boot.runSize = "100%";
|
||||
|
@ -69,11 +70,16 @@
|
|||
|
||||
fileSystems."/" = {
|
||||
fsType = "btrfs";
|
||||
options = ["compress=zstd:6" "discard" "flushoncommit" "subvol=@"];
|
||||
options = [
|
||||
"compress=zstd:6"
|
||||
"discard"
|
||||
"flushoncommit"
|
||||
"subvol=@"
|
||||
];
|
||||
};
|
||||
|
||||
services.btrfs.autoScrub = {
|
||||
fileSystems = ["/"]; # Assuming root is formatted with Btrfs.
|
||||
fileSystems = [ "/" ]; # Assuming root is formatted with Btrfs.
|
||||
interval = "daily";
|
||||
enable = true;
|
||||
};
|
||||
|
@ -101,7 +107,11 @@
|
|||
use-cgroups = true;
|
||||
};
|
||||
|
||||
boot.initrd.kernelModules = ["amdgpu" "sha256" "sha512"];
|
||||
boot.initrd.kernelModules = [
|
||||
"amdgpu"
|
||||
"sha256"
|
||||
"sha512"
|
||||
];
|
||||
|
||||
# Processor settings for AMD
|
||||
hardware.cpu.amd = {
|
||||
|
@ -115,8 +125,12 @@
|
|||
# Bootloader.
|
||||
boot.loader.systemd-boot = {
|
||||
enable = true;
|
||||
edk2-uefi-shell = {enable = true;};
|
||||
memtest86 = {enable = true;};
|
||||
edk2-uefi-shell = {
|
||||
enable = true;
|
||||
};
|
||||
memtest86 = {
|
||||
enable = true;
|
||||
};
|
||||
configurationLimit = 3;
|
||||
};
|
||||
|
||||
|
@ -139,7 +153,7 @@
|
|||
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver.enable = true;
|
||||
services.xserver.videoDrivers = ["amdgpu"];
|
||||
services.xserver.videoDrivers = [ "amdgpu" ];
|
||||
services.xserver.updateDbusEnvironment = true;
|
||||
services.xserver.enableTearFree = true;
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{...}: {
|
||||
{ ... }:
|
||||
{
|
||||
qt = {
|
||||
platformTheme = "qt5ct";
|
||||
style = "kvantum";
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
alqueva.users.unix = {
|
||||
shell = pkgs.zsh;
|
||||
packages = builtins.attrValues {
|
||||
inherit
|
||||
(pkgs)
|
||||
inherit (pkgs)
|
||||
wget2
|
||||
fastfetch
|
||||
btop-rocm
|
||||
|
@ -29,21 +29,18 @@
|
|||
man-pages-posix
|
||||
xwayland-satellite
|
||||
;
|
||||
inherit
|
||||
(pkgs.nodePackages_latest)
|
||||
inherit (pkgs.nodePackages_latest)
|
||||
nodejs
|
||||
pnpm
|
||||
;
|
||||
inherit
|
||||
(pkgs.llvmPackages_19)
|
||||
inherit (pkgs.llvmPackages_19)
|
||||
libcxxClang
|
||||
clangUseLLVM
|
||||
clang-tools
|
||||
clang-manpages
|
||||
openmp
|
||||
;
|
||||
inherit
|
||||
(pkgs.emacsPackages)
|
||||
inherit (pkgs.emacsPackages)
|
||||
tree-sitter
|
||||
tsc
|
||||
tree-sitter-langs
|
||||
|
@ -91,7 +88,7 @@
|
|||
enableCompletion = true;
|
||||
autosuggestions = {
|
||||
enable = true;
|
||||
strategy = ["completion"];
|
||||
strategy = [ "completion" ];
|
||||
};
|
||||
|
||||
zsh-autoenv = {
|
||||
|
@ -100,7 +97,15 @@
|
|||
|
||||
syntaxHighlighting = {
|
||||
enable = true;
|
||||
highlighters = ["main" "brackets" "pattern" "cursor" "regexp" "root" "line"];
|
||||
highlighters = [
|
||||
"main"
|
||||
"brackets"
|
||||
"pattern"
|
||||
"cursor"
|
||||
"regexp"
|
||||
"root"
|
||||
"line"
|
||||
];
|
||||
};
|
||||
|
||||
shellAliases = {
|
||||
|
@ -111,7 +116,12 @@
|
|||
|
||||
ohMyZsh = {
|
||||
enable = true;
|
||||
plugins = ["git" "direnv" "fzf" "ssh-agent"];
|
||||
plugins = [
|
||||
"git"
|
||||
"direnv"
|
||||
"fzf"
|
||||
"ssh-agent"
|
||||
];
|
||||
preLoaded = "zstyle :omz:plugins:ssh-agent agent-forwarding yes";
|
||||
theme = "half-life";
|
||||
};
|
||||
|
|
|
@ -3,19 +3,20 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.alqueva.programs.sleep-or-die;
|
||||
inherit (lib) mkOption mkEnableOption types mkIf;
|
||||
sleep-or-die = let
|
||||
image =
|
||||
if cfg.image == null
|
||||
then ""
|
||||
else "-i ${cfg.image}";
|
||||
sound =
|
||||
if cfg.sound == null
|
||||
then ""
|
||||
else "ffplay -nodisp -autoexit ${cfg.sound}";
|
||||
in
|
||||
inherit (lib)
|
||||
mkOption
|
||||
mkEnableOption
|
||||
types
|
||||
mkIf
|
||||
;
|
||||
sleep-or-die =
|
||||
let
|
||||
image = if cfg.image == null then "" else "-i ${cfg.image}";
|
||||
sound = if cfg.sound == null then "" else "ffplay -nodisp -autoexit ${cfg.sound}";
|
||||
in
|
||||
pkgs.writeShellApplication {
|
||||
name = "sod";
|
||||
runtimeInputs = [
|
||||
|
@ -28,7 +29,8 @@
|
|||
shutdown +60 "This was automatically invoked by 'sleep-or-die'"
|
||||
'';
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.alqueva.programs.sleep-or-die = {
|
||||
enable = mkEnableOption "sleep-or-die";
|
||||
|
||||
|
|
|
@ -3,12 +3,16 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
ezaOptions = "--colour=always --icons=never --group-directories-first --octal-permissions";
|
||||
cfg = config.alqueva.shells.aliases;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.alqueva.shells.aliases = {
|
||||
enable = (lib.mkEnableOption "default aliases") // {default = true;};
|
||||
enable = (lib.mkEnableOption "default aliases") // {
|
||||
default = true;
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment = {
|
||||
|
|
|
@ -2,20 +2,23 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.alqueva.system.dconf;
|
||||
inherit (lib) types;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.alqueva.system.dconf = {
|
||||
enable = lib.mkEnableOption "configuration with DConf";
|
||||
luminosity = lib.mkOption {
|
||||
type = types.enum ["dark" "light" "default"];
|
||||
type = types.enum [
|
||||
"dark"
|
||||
"light"
|
||||
"default"
|
||||
];
|
||||
default = "dark";
|
||||
description = "The luminosity you want to use for GTK.";
|
||||
apply = lum:
|
||||
if lum == "default"
|
||||
then lum
|
||||
else "prefer-${lum}";
|
||||
apply = lum: if lum == "default" then lum else "prefer-${lum}";
|
||||
};
|
||||
theme = lib.mkOption {
|
||||
type = types.str;
|
||||
|
@ -43,29 +46,27 @@ in {
|
|||
extraDconfPackages = lib.mkOption {
|
||||
type = types.listOf types.package;
|
||||
description = "Extra packages to install for DConf.";
|
||||
default = [];
|
||||
default = [ ];
|
||||
};
|
||||
extraDconfSettings = lib.mkOption {
|
||||
type = types.attrsOf types.anything;
|
||||
description = "Extra settings you want to apply to DConf.";
|
||||
default = {};
|
||||
default = { };
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.dconf = {
|
||||
profiles.user.databases = [
|
||||
{
|
||||
settings =
|
||||
{
|
||||
"org/gnome/desktop/interface" = {
|
||||
color-scheme = cfg.luminosity;
|
||||
cursor-size = cfg.cursor.size;
|
||||
cursor-theme = cfg.cursor.theme;
|
||||
icon-theme = cfg.icon.theme;
|
||||
gtk-theme = cfg.theme;
|
||||
};
|
||||
}
|
||||
// cfg.extraDconfSettings;
|
||||
settings = {
|
||||
"org/gnome/desktop/interface" = {
|
||||
color-scheme = cfg.luminosity;
|
||||
cursor-size = cfg.cursor.size;
|
||||
cursor-theme = cfg.cursor.theme;
|
||||
icon-theme = cfg.icon.theme;
|
||||
gtk-theme = cfg.theme;
|
||||
};
|
||||
} // cfg.extraDconfSettings;
|
||||
}
|
||||
];
|
||||
packages = cfg.extraDconfPackages;
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
{lib, ...}: {
|
||||
{ lib, ... }:
|
||||
{
|
||||
imports = lib.pipe (builtins.readDir ./.) [
|
||||
(lib.filterAttrs
|
||||
(n: _v: n != "default.nix" && lib.last (lib.stringToCharacters n) != "~"))
|
||||
(lib.mapAttrsToList
|
||||
(n: _v: ./${n}))
|
||||
(lib.filterAttrs (n: _v: n != "default.nix" && lib.last (lib.stringToCharacters n) != "~"))
|
||||
(lib.mapAttrsToList (n: _v: ./${n}))
|
||||
];
|
||||
}
|
||||
|
|
|
@ -2,9 +2,11 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.alqueva.programs.git;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.alqueva.programs.git = {
|
||||
enable = lib.mkEnableOption "git";
|
||||
};
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.alqueva.wms.niri;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.alqueva.wms.niri = {
|
||||
enable = lib.mkEnableOption "niri";
|
||||
package = lib.mkPackageOption pkgs "niri" {};
|
||||
package = lib.mkPackageOption pkgs "niri" { };
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
@ -28,7 +30,7 @@ in {
|
|||
];
|
||||
};
|
||||
};
|
||||
configPackages = [cfg.package];
|
||||
configPackages = [ cfg.package ];
|
||||
extraPortals = [
|
||||
pkgs.xdg-desktop-portal-gnome
|
||||
pkgs.xdg-desktop-portal-gtk
|
||||
|
@ -36,7 +38,7 @@ in {
|
|||
};
|
||||
|
||||
services = {
|
||||
displayManager.sessionPackages = [cfg.package];
|
||||
displayManager.sessionPackages = [ cfg.package ];
|
||||
gnome.gnome-keyring.enable = true;
|
||||
};
|
||||
|
||||
|
|
|
@ -3,17 +3,19 @@
|
|||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.alqueva.shells.nushell;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.alqueva.shells.nushell = {
|
||||
enable = lib.mkEnableOption "Nushell";
|
||||
package = lib.mkPackageOption pkgs "nushell" {};
|
||||
package = lib.mkPackageOption pkgs "nushell" { };
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment = {
|
||||
systemPackages = [cfg.package];
|
||||
systemPackages = [ cfg.package ];
|
||||
shells = [
|
||||
(lib.getExe' cfg.package "nu")
|
||||
"/run/current-system/sw/bin/nu"
|
||||
|
|
|
@ -3,9 +3,11 @@
|
|||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.alqueva.system.pipewire;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.alqueva.system.pipewire = {
|
||||
enable = lib.mkEnableOption "PipeWire";
|
||||
};
|
||||
|
|
|
@ -3,9 +3,11 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.alqueva.wms.river;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.alqueva.wms.river = {
|
||||
enable = lib.mkEnableOption "River";
|
||||
};
|
||||
|
@ -35,8 +37,7 @@ in {
|
|||
};
|
||||
|
||||
environment.systemPackages = builtins.attrValues {
|
||||
inherit
|
||||
(pkgs)
|
||||
inherit (pkgs)
|
||||
wf-recorder
|
||||
rofi-wayland
|
||||
kitty
|
||||
|
|
|
@ -2,9 +2,11 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.alqueva.programs.openssh;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.alqueva.programs.openssh = {
|
||||
enable = lib.mkEnableOption "OpenSSH";
|
||||
};
|
||||
|
|
|
@ -3,10 +3,12 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.alqueva.support;
|
||||
inherit (lib) mkEnableOption;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.alqueva.support = {
|
||||
wayland = mkEnableOption "wayland support";
|
||||
};
|
||||
|
|
|
@ -3,17 +3,23 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.alqueva.programs.swaybg;
|
||||
inherit (lib) types;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.alqueva.programs.swaybg = {
|
||||
enable = lib.mkEnableOption "swaybg";
|
||||
package = lib.mkPackageOption pkgs "swaybg" {};
|
||||
package = lib.mkPackageOption pkgs "swaybg" { };
|
||||
wallpaper = lib.mkOption {
|
||||
default = "";
|
||||
description = "The wallpaper you want to use with swaybg.";
|
||||
type = types.oneOf [types.str types.package types.path];
|
||||
type = types.oneOf [
|
||||
types.str
|
||||
types.package
|
||||
types.path
|
||||
];
|
||||
};
|
||||
mode = lib.mkOption {
|
||||
default = "fill";
|
||||
|
@ -21,7 +27,7 @@ in {
|
|||
type = types.str;
|
||||
};
|
||||
extraServiceConfig = {
|
||||
default = {};
|
||||
default = { };
|
||||
description = "Extra settings you want to apply to the systemd service.";
|
||||
type = types.attrsOf types.anything;
|
||||
};
|
||||
|
@ -31,9 +37,9 @@ in {
|
|||
systemd.user.services.swaybg = {
|
||||
inherit (cfg.package.meta) description;
|
||||
|
||||
wantedBy = ["graphical-session.target"];
|
||||
after = ["graphical-session-pre.target"];
|
||||
partOf = ["graphical-session.target"];
|
||||
wantedBy = [ "graphical-session.target" ];
|
||||
after = [ "graphical-session-pre.target" ];
|
||||
partOf = [ "graphical-session.target" ];
|
||||
|
||||
serviceConfig = {
|
||||
ExecStart = "${lib.getExe' cfg.package "swaybg"} -i ${cfg.wallpaper} -m ${cfg.mode}";
|
||||
|
|
|
@ -2,27 +2,35 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (lib.options) mkEnableOption mkOption;
|
||||
inherit (lib.types) attrsOf listOf submodule str package;
|
||||
inherit (lib.types)
|
||||
attrsOf
|
||||
listOf
|
||||
submodule
|
||||
str
|
||||
package
|
||||
;
|
||||
users = config.alqueva.users;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.alqueva.users = mkOption {
|
||||
type = attrsOf (submodule {
|
||||
options = {
|
||||
tmpfiles = mkOption {
|
||||
description = "tmpfiles";
|
||||
type = listOf str;
|
||||
default = [];
|
||||
default = [ ];
|
||||
};
|
||||
packages = mkOption {
|
||||
type = listOf package;
|
||||
default = [];
|
||||
default = [ ];
|
||||
description = "Packages installed to the the defined user.";
|
||||
};
|
||||
groups = mkOption {
|
||||
type = listOf str;
|
||||
default = [];
|
||||
default = [ ];
|
||||
description = "Groups to add the defined user to.";
|
||||
};
|
||||
shell = mkOption {
|
||||
|
@ -30,30 +38,30 @@ in {
|
|||
default = config.programs.bash.package;
|
||||
description = "Shell the user wants to use.";
|
||||
};
|
||||
enable = (mkEnableOption "this user.") // {default = true;};
|
||||
enable = (mkEnableOption "this user.") // {
|
||||
default = true;
|
||||
};
|
||||
};
|
||||
});
|
||||
description = "Users to have on the system.";
|
||||
default = {};
|
||||
default = { };
|
||||
};
|
||||
|
||||
config = let
|
||||
enabledUsers = lib.filterAttrs (_: user: user.enable == true) users;
|
||||
in {
|
||||
users.users =
|
||||
builtins.mapAttrs (un: uc: {
|
||||
config =
|
||||
let
|
||||
enabledUsers = lib.filterAttrs (_: user: user.enable == true) users;
|
||||
in
|
||||
{
|
||||
users.users = builtins.mapAttrs (un: uc: {
|
||||
description = un;
|
||||
isNormalUser = true;
|
||||
extraGroups = uc.groups;
|
||||
inherit (uc) packages shell;
|
||||
initialPassword = "password";
|
||||
})
|
||||
enabledUsers;
|
||||
}) enabledUsers;
|
||||
|
||||
systemd.user.tmpfiles.users =
|
||||
builtins.mapAttrs (_: uc: {
|
||||
systemd.user.tmpfiles.users = builtins.mapAttrs (_: uc: {
|
||||
rules = uc.tmpfiles;
|
||||
})
|
||||
enabledUsers;
|
||||
};
|
||||
}) enabledUsers;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -3,15 +3,16 @@
|
|||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.alqueva.shells.xonsh;
|
||||
aliasesToPyDict = aliases:
|
||||
lib.concatStringsSep "\n"
|
||||
(lib.mapAttrsToList (k: v: "aliases['${k}'] = '${v}'") aliases);
|
||||
in {
|
||||
aliasesToPyDict =
|
||||
aliases: lib.concatStringsSep "\n" (lib.mapAttrsToList (k: v: "aliases['${k}'] = '${v}'") aliases);
|
||||
in
|
||||
{
|
||||
options.alqueva.shells.xonsh = {
|
||||
enable = lib.mkEnableOption "xonsh";
|
||||
package = lib.mkPackageOption pkgs "xonsh" {};
|
||||
package = lib.mkPackageOption pkgs "xonsh" { };
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
environment = {
|
||||
systemPackages = builtins.attrValues {
|
||||
inherit
|
||||
(pkgs)
|
||||
inherit (pkgs)
|
||||
nil
|
||||
statix
|
||||
deadnix
|
||||
|
@ -66,7 +66,7 @@
|
|||
wrapProgram $out/bin/nh \
|
||||
--set FLAKE "/home/artur/.config/nixos"
|
||||
'';
|
||||
meta = {inherit (pkgs.nh.meta) mainProgram;};
|
||||
meta = { inherit (pkgs.nh.meta) mainProgram; };
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -99,9 +99,9 @@
|
|||
xdg.mime = {
|
||||
enable = true;
|
||||
defaultApplications = {
|
||||
"text/html" = ["org.qutebrowser.qutebrowser.desktop"];
|
||||
"x-scheme-handler/http" = ["org.qutebrowser.qutebrowser.desktop"];
|
||||
"x-scheme-handler/https" = ["org.qutebrowser.qutebrowser.desktop"];
|
||||
"text/html" = [ "org.qutebrowser.qutebrowser.desktop" ];
|
||||
"x-scheme-handler/http" = [ "org.qutebrowser.qutebrowser.desktop" ];
|
||||
"x-scheme-handler/https" = [ "org.qutebrowser.qutebrowser.desktop" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
./users/artur
|
||||
./hardware.nix
|
||||
|
@ -16,7 +17,7 @@
|
|||
|
||||
config = {
|
||||
boot = {
|
||||
initrd.systemd.additionalUpstreamUnits = ["systemd-boot.service"];
|
||||
initrd.systemd.additionalUpstreamUnits = [ "systemd-boot.service" ];
|
||||
loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = ["defaults"];
|
||||
mountOptions = [ "defaults" ];
|
||||
};
|
||||
};
|
||||
luks = {
|
||||
|
@ -28,7 +28,7 @@
|
|||
};
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = ["-f"];
|
||||
extraArgs = [ "-f" ];
|
||||
subvolumes = {
|
||||
"/@root" = {
|
||||
mountpoint = "/";
|
||||
|
|
|
@ -1,16 +1,17 @@
|
|||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
alqueva.system.fonts = {
|
||||
names = {
|
||||
sansSerif = ["Iosevka"];
|
||||
monospace = ["Iosevka"];
|
||||
serif = ["IBM Plex Serif"];
|
||||
emoji = ["Twitter Color Emoji"];
|
||||
sansSerif = [ "Iosevka" ];
|
||||
monospace = [ "Iosevka" ];
|
||||
serif = [ "IBM Plex Serif" ];
|
||||
emoji = [ "Twitter Color Emoji" ];
|
||||
};
|
||||
packages = {
|
||||
sansSerif = [pkgs.inter];
|
||||
monospace = [pkgs.iosevka];
|
||||
serif = [pkgs.ibm-plex];
|
||||
emoji = [pkgs.twemoji-color-font];
|
||||
sansSerif = [ pkgs.inter ];
|
||||
monospace = [ pkgs.iosevka ];
|
||||
serif = [ pkgs.ibm-plex ];
|
||||
emoji = [ pkgs.twemoji-color-font ];
|
||||
extra = [
|
||||
pkgs.noto-fonts
|
||||
pkgs.nerd-fonts.symbols-only
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
{config, ...}: let
|
||||
{ config, ... }:
|
||||
let
|
||||
cfg = config.services.forgejo;
|
||||
srv = cfg.settings.server;
|
||||
in {
|
||||
in
|
||||
{
|
||||
services.nginx = {
|
||||
virtualHosts.${cfg.settings.server.DOMAIN} = {
|
||||
forceSSL = true;
|
||||
|
|
|
@ -6,15 +6,22 @@
|
|||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "sd_mod"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-amd"];
|
||||
boot.extraModulePackages = [];
|
||||
boot.initrd.availableKernelModules = [
|
||||
"nvme"
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"usbhid"
|
||||
"sd_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
# 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
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
themes = {
|
||||
# gtk-theme = pkgs.everforest-gtk-theme;
|
||||
gtk-theme = pkgs.everforest-gtk-theme.overrideAttrs (finalAttrs: {
|
||||
|
@ -13,11 +14,9 @@
|
|||
rev = "43cbe4f1aeba8b46e41836de4c8ea7ac398db119";
|
||||
hash = "sha256-Z46i0Ihpzo4LhFvzKsvnzcHFzeYxJMvQmg2k6lmjGH0=";
|
||||
};
|
||||
nativeBuildInputs =
|
||||
(finalAttrs.nativeBuildInputs or [])
|
||||
++ [
|
||||
pkgs.sassc
|
||||
];
|
||||
nativeBuildInputs = (finalAttrs.nativeBuildInputs or [ ]) ++ [
|
||||
pkgs.sassc
|
||||
];
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p "$out"/share/{icons,themes}
|
||||
|
@ -31,7 +30,8 @@
|
|||
cursor-theme = pkgs.simp1e-cursors;
|
||||
};
|
||||
cfg = config.alqueva.system.dconf;
|
||||
in {
|
||||
in
|
||||
{
|
||||
alqueva.system.dconf = {
|
||||
enable = true;
|
||||
luminosity = "dark";
|
||||
|
|
|
@ -3,18 +3,22 @@
|
|||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
alqueva.users.artur = {
|
||||
shell = config.alqueva.shells.nushell.package;
|
||||
tmpfiles = [
|
||||
"L+ %h/.config/qutebrowser/config.py - - - - ${./configs/qutebrowser/config.py}"
|
||||
"L+ %h/.config/qutebrowser/theme - - - - ${./configs/qutebrowser/theme}"
|
||||
(let
|
||||
theme = pkgs.fetchurl {
|
||||
url = "https://raw.githubusercontent.com/deathbeam/base16-discord/refs/heads/main/themes/base16-nord.theme.css";
|
||||
hash = "sha256-LofqgsVl+XKisk/dmb/PpwuLEWdEgchIfIw4xZs6LQw=";
|
||||
};
|
||||
in "L+ %h/.config/vesktop/themes/theme.user.css - - - - ${theme}")
|
||||
(
|
||||
let
|
||||
theme = pkgs.fetchurl {
|
||||
url = "https://raw.githubusercontent.com/deathbeam/base16-discord/refs/heads/main/themes/base16-nord.theme.css";
|
||||
hash = "sha256-LofqgsVl+XKisk/dmb/PpwuLEWdEgchIfIw4xZs6LQw=";
|
||||
};
|
||||
in
|
||||
"L+ %h/.config/vesktop/themes/theme.user.css - - - - ${theme}"
|
||||
)
|
||||
"L+ %h/.config/vesktop/settings/quickCss.css - - - - ${./configs/vesktop/quickCss.css}"
|
||||
"L+ %h/.config/kanshi/ - - - - ${./configs/kanshi}"
|
||||
"L+ %h/.config/dunst/ - - - - ${./configs/dunst}"
|
||||
|
@ -25,8 +29,7 @@
|
|||
"L+ %h/.face.icon - - - - ${./.face.icon}"
|
||||
];
|
||||
packages = builtins.attrValues {
|
||||
inherit
|
||||
(pkgs)
|
||||
inherit (pkgs)
|
||||
eww
|
||||
wget
|
||||
vesktop-electron32
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue