Update formatter

This commit is contained in:
Victor Mignot 2024-04-11 20:15:47 +02:00
parent 72483ad795
commit 3a154a8225
Signed by: dala
GPG key ID: 5E7F2CE1BEAFED3D
29 changed files with 490 additions and 398 deletions

View file

@ -1,6 +1,18 @@
{ pkgs, config, lib, ... }:
{
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
pkgs,
config,
lib,
...
}:
{
boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"nvme"
"usbhid"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
@ -45,7 +57,7 @@
hwAccelerationGPU = "intel";
/* System secrets */
# System secrets
sops = {
gnupg.sshKeyPaths = [ ];
age = {

View file

@ -48,11 +48,11 @@
services.jackett = {
enable = true;
package = pkgs.jackett.overrideAttrs(_: _: { doCheck = false; });
package = pkgs.jackett.overrideAttrs (_: _: { doCheck = false; });
openFirewall = true;
};
systemd.services.delugedweb.requires = ["deluged-proxy.service"];
systemd.services.delugedweb.requires = [ "deluged-proxy.service" ];
systemd.services.deluged.bindsTo = [ "wireguard-wg1.service" ];
systemd.services.deluged.requires = [ "network-online.target" ];
systemd.services.deluged.serviceConfig.NetworkNamespacePath = "/var/run/netns/wg1ns";
@ -66,8 +66,14 @@
systemd.services.deluged-proxy = {
description = "Proxy for deluge-web to deluged in network namespace";
requires = [ "deluged.service" "deluged-proxy.socket" ];
after = [ "deluged.service" "deluged-proxy.socket" ];
requires = [
"deluged.service"
"deluged-proxy.socket"
];
after = [
"deluged.service"
"deluged-proxy.socket"
];
unitConfig.JoinsNamespaceOf = "deluged.service";
serviceConfig = {
User = "deluge";

View file

@ -1,33 +1,33 @@
{ config, extraInfo, ... }:
{ config, extraInfo, ... }:
{
services.nginx.virtualHosts.${extraInfo.nextcloudURI} = {
enableACME = true;
forceSSL = true;
};
services.nginx.virtualHosts.${extraInfo.nextcloudURI} = {
enableACME = true;
forceSSL = true;
};
services.nextcloud = {
enable = true;
datadir = "/srv/nextcloud";
https = true;
hostName = extraInfo.nextcloudURI;
services.nextcloud = {
enable = true;
datadir = "/srv/nextcloud";
https = true;
hostName = extraInfo.nextcloudURI;
extraAppsEnable = true;
extraApps = {};
extraAppsEnable = true;
extraApps = { };
database.createLocally = true;
configureRedis = true;
database.createLocally = true;
configureRedis = true;
config = {
dbtype = "pgsql";
config = {
dbtype = "pgsql";
adminuser = "dala";
adminpassFile = config.sops.secrets.nextcloud_admin_pw.path;
};
adminuser = "dala";
adminpassFile = config.sops.secrets.nextcloud_admin_pw.path;
};
caching = {
redis = true;
memcached = true;
apcu = true;
};
};
caching = {
redis = true;
memcached = true;
apcu = true;
};
};
}

View file

@ -1,10 +1,13 @@
{ config, pkgs, extraInfo, ... }:
{
networking.firewall.allowedUDPPorts = [
51821
];
config,
pkgs,
extraInfo,
...
}:
{
networking.firewall.allowedUDPPorts = [ 51821 ];
/* Wireguard */
# Wireguard
networking.wireguard.interfaces.wg0 = {
ips = [ "10.100.0.6/8" ];
@ -52,7 +55,6 @@
ip netns exec wg1ns ip link set lo up
'';
postShutdown = ''
ip netns del wg1ns
'';

View file

@ -1,16 +1,27 @@
{ pkgs, config, lib, extraInfo, ... }:
{
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" ];
pkgs,
config,
lib,
extraInfo,
...
}:
{
boot.initrd.availableKernelModules = [
"nvme"
"xhci_pci"
"ahci"
"usbhid"
];
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
/* Meta */
# Meta
isProfessional = false;
/* Volumes */
# Volumes
luksDevices = [
{
name = "crypted-nixos";
@ -47,25 +58,24 @@
swapDeviceUUID = "5fe5e76b-df3d-43ce-abf9-d2b63078df09";
/* Linux kernel */
# Linux kernel
useLatestKernel = true;
/* Custom udev rules for Nucleo's stlink interface */
# Custom udev rules for Nucleo's stlink interface
services.udev.extraRules = ''
ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374b",MODE="660",GROUP="dialout",TAG+="uaccess"
ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3748",MODE="660",GROUP="dialout",TAG+="uaccess"
'';
/* Nix */
# Nix
allowUnfreePackages = true;
/* Hardware acceleration */
# Hardware acceleration
hwAccelerationGPU = "amd";
keymap = "fr";
/* System secrets */
# System secrets
sops = {
gnupg.sshKeyPaths = [ ];
age = {
@ -76,7 +86,7 @@
secrets.wg0_private = { };
};
/* Wireguard */
# Wireguard
networking.wg-quick.interfaces.wg0 = {
address = [ "10.100.0.4/8" ];
dns = [ "10.100.0.1" ];
@ -103,11 +113,20 @@
];
};
/* User config */
# User config
machineUsers = {
dala = {
description = "Dala";
groups = [ "wheel" "video" "audio" "seat" "keys" "lp" "dialout" "network" ];
groups = [
"wheel"
"video"
"audio"
"seat"
"keys"
"lp"
"dialout"
"network"
];
uid = 1000;
shell = pkgs.fish;
enableHomeManagerProfile = true;

View file

@ -23,55 +23,59 @@
extra-config.url = "git+ssh://git@git.sr.ht/~dala/extra-config";
};
outputs = { self, nixpkgs-unstable, nixpkgs-stable, home-manager, sops-nix, flake-utils, extra-config }:
outputs =
{
self,
nixpkgs-unstable,
nixpkgs-stable,
home-manager,
sops-nix,
flake-utils,
extra-config,
}:
let
machines = import ./machines.nix;
in
{
nixosConfigurations = builtins.mapAttrs
(name: value:
let
nixpkgs =
if value.nixpkgsUnstable
then nixpkgs-unstable
else nixpkgs-stable;
in
nixpkgs.lib.nixosSystem {
system = value.system;
nixosConfigurations = builtins.mapAttrs (
name: value:
let
nixpkgs = if value.nixpkgsUnstable then nixpkgs-unstable else nixpkgs-stable;
in
nixpkgs.lib.nixosSystem {
system = value.system;
specialArgs = {
machineInfos = {
hostname = name;
} // value;
specialArgs = {
machineInfos = {
hostname = name;
} // value;
sopsHmModule = sops-nix.homeManagerModules.sops;
sopsHmModule = sops-nix.homeManagerModules.sops;
extraInfo = extra-config.extraSecrets;
};
extraInfo = extra-config.extraSecrets;
};
modules = [
./configurations/${name}
./modules/common
(if (value.machineType == "workstation")
then ./modules/workstation
else ./modules/server)
(if (value.machineType == "workstation" && value.enableHomeManager)
then home-manager.nixosModules.home-manager
else { })
sops-nix.nixosModules.sops
];
}
)
machines;
modules = [
./configurations/${name}
./modules/common
(if (value.machineType == "workstation") then ./modules/workstation else ./modules/server)
(
if (value.machineType == "workstation" && value.enableHomeManager) then
home-manager.nixosModules.home-manager
else
{ }
)
sops-nix.nixosModules.sops
];
}
) machines;
formatter = builtins.listToAttrs (map
(system:
{
name = system;
value = nixpkgs-unstable.legacyPackages.${system}.nixpkgs-fmt;
}
)
flake-utils.lib.defaultSystems);
formatter = builtins.listToAttrs (
map (system: {
name = system;
value = nixpkgs-unstable.legacyPackages.${system}.nixfmt-rfc-style;
}) flake-utils.lib.defaultSystems
);
hydraJobs = {
nixos = builtins.mapAttrs (_: cfg: cfg.config.system.build.toplevel) self.nixosConfigurations;

View file

@ -46,15 +46,15 @@ in
};
config = {
boot.initrd.luks.devices = builtins.listToAttrs (map
(fs: {
boot.initrd.luks.devices = builtins.listToAttrs (
map (fs: {
name = fs.name;
value = {
device = "/dev/disk/by-uuid/${fs.deviceUUID}";
preLVM = fs.isPreLVM;
};
})
config.luksDevices);
}) config.luksDevices
);
boot.loader.systemd-boot.enable = config.enableDefaultSystemdBoot;
boot.loader.efi.canTouchEfiVariables = true;

View file

@ -1,4 +1,11 @@
{ lib, config, pkgs, machineInfos, modulesPath, ... }:
{
lib,
config,
pkgs,
machineInfos,
modulesPath,
...
}:
with lib;
{
imports = [
@ -13,7 +20,10 @@ with lib;
];
options.machineType = mkOption {
type = types.enum [ "workstation" "server" ];
type = types.enum [
"workstation"
"server"
];
default = "workstation";
example = "server";
description = ''
@ -46,7 +56,9 @@ with lib;
virtualisation.docker.enable = config.enableDocker;
# Only enable fish shell if there is at least one user using it.
programs.fish.enable = builtins.any (user: user.shell == pkgs.fish) (builtins.attrValues config.machineUsers);
programs.fish.enable = builtins.any (user: user.shell == pkgs.fish) (
builtins.attrValues config.machineUsers
);
# We always want to disable the X server as only workstation use windows manager
# and they always use wayland.

View file

@ -24,7 +24,6 @@ let
The volume filesystem.
'';
};
};
};
in
@ -50,15 +49,15 @@ in
};
config = {
fileSystems = builtins.listToAttrs (map
(fs: {
fileSystems = builtins.listToAttrs (
map (fs: {
name = fs.mountpoint;
value = {
device = "/dev/disk/by-uuid/${fs.deviceUUID}";
fsType = fs.fsType;
};
})
config.filesystems);
}) config.filesystems
);
swapDevices = mkIf (config.swapDeviceUUID != null) [
{ device = "/dev/disk/by-uuid/${config.swapDeviceUUID}"; }

View file

@ -1,8 +1,19 @@
{ lib, config, pkgs, ... }:
{
lib,
config,
pkgs,
...
}:
with lib;
{
options.hwAccelerationGPU = mkOption {
type = types.nullOr (types.enum [ "nvidia" "intel" "amd" ]);
type = types.nullOr (
types.enum [
"nvidia"
"intel"
"amd"
]
);
default = null;
example = "nvidia";
description = ''
@ -11,9 +22,7 @@ with lib;
};
config = {
boot.kernelParams = mkIf (config.hwAccelerationGPU == "intel") [
"i915.enable_guc=2"
];
boot.kernelParams = mkIf (config.hwAccelerationGPU == "intel") [ "i915.enable_guc=2" ];
hardware.opengl = {
enable = config.hwAccelerationGPU != null;
@ -30,8 +39,6 @@ with lib;
];
};
services.xserver.videoDrivers = mkIf (config.hwAccelerationGPU == "nvidia") [
"nouveau"
];
services.xserver.videoDrivers = mkIf (config.hwAccelerationGPU == "nvidia") [ "nouveau" ];
};
}

View file

@ -1,4 +1,9 @@
{ lib, config, pkgs, ... }:
{
lib,
config,
pkgs,
...
}:
with lib;
{
options.useLatestKernel = mkOption {

View file

@ -1,4 +1,9 @@
{ pkgs, lib, config, ... }:
{
pkgs,
lib,
config,
...
}:
with lib;
{
options.allowUnfreePackages = mkOption {

View file

@ -3,48 +3,34 @@ with lib;
let
userModule = types.submodule {
options = {
description = mkOption {
type = types.str;
};
description = mkOption { type = types.str; };
groups = mkOption {
type = types.listOf types.str;
};
groups = mkOption { type = types.listOf types.str; };
uid = mkOption {
type = types.nullOr types.int;
};
uid = mkOption { type = types.nullOr types.int; };
shell = mkOption {
type = types.package;
};
shell = mkOption { type = types.package; };
enableHomeManagerProfile = mkOption {
type = types.bool;
default = false;
};
homeManagerConfig = mkOption {
default = { };
};
homeManagerConfig = mkOption { default = { }; };
};
};
in
{
options.machineUsers = mkOption {
type = types.attrsOf userModule;
};
options.machineUsers = mkOption { type = types.attrsOf userModule; };
config = {
users.users = builtins.mapAttrs
(name: value: {
isNormalUser = true;
home = "/home/${name}";
description = value.description;
extraGroups = value.groups;
shell = value.shell;
uid = mkIf (value.uid != null) value.uid;
})
config.machineUsers;
users.users = builtins.mapAttrs (name: value: {
isNormalUser = true;
home = "/home/${name}";
description = value.description;
extraGroups = value.groups;
shell = value.shell;
uid = mkIf (value.uid != null) value.uid;
}) config.machineUsers;
};
}

View file

@ -1,4 +1,11 @@
{ lib, config, pkgs, machineInfos, sopsHmModule, ... }:
{
lib,
config,
pkgs,
machineInfos,
sopsHmModule,
...
}:
with lib;
{
@ -30,18 +37,20 @@ with lib;
keymap = config.keymap;
nvidiaGPU = (config.hwAccelerationGPU == "nvidia");
};
home-manager.users = builtins.mapAttrs
(name: value:
mkIf value.enableHomeManagerProfile ({
home-manager.users = builtins.mapAttrs (
name: value:
mkIf value.enableHomeManagerProfile (
{
home.username = name;
home.homeDirectory = "/home/${name}";
home.stateVersion = machineInfos.stateVersion;
programs.home-manager.enable = true;
enableFishShell = value.shell == pkgs.fish;
isProfessional = config.isProfessional;
} // value.homeManagerConfig)
}
// value.homeManagerConfig
)
config.machineUsers;
) config.machineUsers;
programs.dconf.enable = true;
security.polkit.enable = true;

View file

@ -1,11 +1,14 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
with lib;
let
usersHasSway = builtins.any
(user:
config.home-manager.users.${user}.desktop.enableSwayStack
)
(builtins.attrNames config.machineUsers);
usersHasSway = builtins.any (user: config.home-manager.users.${user}.desktop.enableSwayStack) (
builtins.attrNames config.machineUsers
);
in
{
programs.sway = mkIf usersHasSway {

View file

@ -1,4 +1,9 @@
{ lib, pkgs, config, ... }:
{
lib,
pkgs,
config,
...
}:
with lib;
{
options = {
@ -28,9 +33,7 @@ with lib;
};
config.home.packages = with pkgs; [
(mkIf config.communication.discord.enable (discord.override {
nss = nss_latest;
}))
(mkIf config.communication.discord.enable (discord.override { nss = nss_latest; }))
(mkIf config.communication.slack.enable slack)
(mkIf config.communication.weechat.enable weechat)
(mkIf config.communication.matrix.enable element)

View file

@ -18,7 +18,6 @@ let
yubico-pam
yubikey-manager
];
in
{
imports = [
@ -33,29 +32,30 @@ in
./helix.nix
];
options.isProfessional = mkOption {
type = types.bool;
};
options.isProfessional = mkOption { type = types.bool; };
config = {
fonts.fontconfig.enable = true;
home.packages = with pkgs; [
htop
firefox
autojump
nextcloud-client
keepassxc
ranger
libreoffice
tldr
zathura
lazygit
easyeffects
] ++ multimediaPackages
++ soundPackages
++ yubikeyTools;
home.packages =
with pkgs;
[
htop
firefox
autojump
nextcloud-client
keepassxc
ranger
libreoffice
tldr
zathura
lazygit
easyeffects
]
++ multimediaPackages
++ soundPackages
++ yubikeyTools;
# XDG-Mime configuration
xdg.mime.enable = true;
@ -70,5 +70,4 @@ in
"text/html" = "firefox.desktop";
};
};
}

View file

@ -1,4 +1,9 @@
{ lib, config, pkgs, ... }:
{
lib,
config,
pkgs,
...
}:
with lib;
let
desktopPackages = with pkgs; [

View file

@ -1,4 +1,11 @@
{ config, pkgs, lib, keymap, nvidiaGPU, ... }:
{
config,
pkgs,
lib,
keymap,
nvidiaGPU,
...
}:
with lib;
let
isQwerty = keymap == "us";
@ -6,26 +13,16 @@ let
rendererLine = if nvidiaGPU then "export WLR_RENDERER=vulkan" else "";
monitorModule = types.submodule {
options = {
name = mkOption {
type = types.str;
};
resolution = mkOption {
type = types.str;
};
position = mkOption {
type = types.str;
};
defaultWorkspace = mkOption {
type = types.int;
};
name = mkOption { type = types.str; };
resolution = mkOption { type = types.str; };
position = mkOption { type = types.str; };
defaultWorkspace = mkOption { type = types.int; };
};
};
in
{
options = {
desktop.monitors = mkOption {
type = types.listOf monitorModule;
};
desktop.monitors = mkOption { type = types.listOf monitorModule; };
};
config.wayland.windowManager.sway = mkIf config.desktop.enableSwayStack {
@ -65,24 +62,23 @@ in
"xcursor_theme" = "Nordzy-cursors";
};
};
output = builtins.listToAttrs
(builtins.map
(monitor: {
output =
builtins.listToAttrs (
builtins.map (monitor: {
name = monitor.name;
value = {
resolution = monitor.resolution;
position = monitor.position;
};
})
config.desktop.monitors) // {
"*".bg = "/home/dala/Perso/wallpapers/tanuki.jpg fill";
};
workspaceOutputAssign = map
(monitor: {
output = monitor.name;
workspace = builtins.toString monitor.defaultWorkspace;
})
config.desktop.monitors;
}) config.desktop.monitors
)
// {
"*".bg = "/home/dala/Perso/wallpapers/tanuki.jpg fill";
};
workspaceOutputAssign = map (monitor: {
output = monitor.name;
workspace = builtins.toString monitor.defaultWorkspace;
}) config.desktop.monitors;
startup = [
{
command = ''
@ -134,9 +130,7 @@ in
modifier = "${modifier} normal";
};
bars = [{
command = "${pkgs.waybar}/bin/waybar";
}];
bars = [ { command = "${pkgs.waybar}/bin/waybar"; } ];
keybindings = {
"${modifier}+Return" = "exec ${terminal}";
@ -218,8 +212,8 @@ in
"${modifier}+r" = "mode resize";
"XF86AudioRaiseVolume" = "exec --no-startup-id pactl set-sink-volume 0 +5%"; #increase sound volume
"XF86AudioLowerVolume" = "exec --no-startup-id pactl set-sink-volume 0 -5%"; #decrease sound volume
"XF86AudioRaiseVolume" = "exec --no-startup-id pactl set-sink-volume 0 +5%"; # increase sound volume
"XF86AudioLowerVolume" = "exec --no-startup-id pactl set-sink-volume 0 -5%"; # decrease sound volume
"XF86AudioMute" = "exec --no-startup-id pactl set-sink-mute 0 toggle"; # mute sound
"XF86MonBrightnessUp" = "exec --no-startup-id light -A 10";

View file

@ -5,136 +5,136 @@ with lib;
enable = true;
#systemd.enable = false;
settings = [{
layer = "top";
position = "top";
height = 30;
settings = [
{
layer = "top";
position = "top";
height = 30;
modules-left = [
"sway/workspaces"
"sway/mode"
];
modules-left = [
"sway/workspaces"
"sway/mode"
];
modules-center = [
"sway/window"
];
modules-center = [ "sway/window" ];
modules-right = [
"memory"
"cpu"
"pulseaudio"
"network"
"battery"
"tray"
"sway/language"
"clock"
];
modules-right = [
"memory"
"cpu"
"pulseaudio"
"network"
"battery"
"tray"
"sway/language"
"clock"
];
"sway/workspaces" = {
"disable-scroll" = true;
"all-outputs" = false;
"format" = "{icon}";
"format-icons" = {
"1:term" = "";
"2:web" = "";
"3:email" = "";
"4:im" = "";
"5:dev" = "";
"6:music" = "";
"7:graph" = "";
"8:any" = "";
"9:any" = "";
"10:aux" = "";
};
};
"tray" = {
"icon-size" = 18;
"spacing" = 12;
};
"memory" = {
"format" = "{percentage:3}% <big>󰍛</big>";
"states" = {
"warning" = 70;
"critical" = 90;
};
};
"cpu" = {
"format" = "{usage:3}% <big></big>";
"states" = {
"warning" = 70;
"critical" = 90;
};
};
"pulseaudio" = {
"format" = "{volume:3}% <big>{icon}</big>";
"format-bluetooth" = "<big>{icon}</big>";
"format-muted" = "<big>󰝟<\big>";
"format-icons" = {
"headphone" = "";
"hands-free" = "";
"headset" = "";
"phone" = "";
"portable" = "";
"car" = "";
"default" = [ "" ];
"sway/workspaces" = {
"disable-scroll" = true;
"all-outputs" = false;
"format" = "{icon}";
"format-icons" = {
"1:term" = "";
"2:web" = "";
"3:email" = "";
"4:im" = "";
"5:dev" = "";
"6:music" = "";
"7:graph" = "";
"8:any" = "";
"9:any" = "";
"10:aux" = "";
};
};
"on-click" = "pavucontrol";
"on-scroll-up" = "pamixer -ui 2 && pamixer --get-volume > $SWAYSOCK.wob";
"on-scroll-down" = "pamixer -ud 2 && pamixer --get-volume > $SWAYSOCK.wob";
};
"network" = {
"format-wifi" = "{essid} <big></big>";
"format-ethernet" = "<big></big>";
"format-disconnected" = "<big>󰌙</big>";
"format-linked" = "<big></big>";
"format-alt" = "{ifname}: {ipaddr}/{cidr}";
"tooltip-format-ethernet" = "<big></big> {bandwidthDownBits} <big></big> {bandwidthUpBits}";
"tooltip-format-wifi" = "<big></big>{bandwidthDownBits} <big></big> {bandwidthUpBits}";
};
"battery" = {
"states" = {
"5pct" = 5;
"10pct" = 10;
"20pct" = 20;
"30pct" = 30;
"40pct" = 40;
"50pct" = 50;
"60pct" = 60;
"70pct" = 70;
"80pct" = 80;
"90pct" = 90;
"full" = 100;
"tray" = {
"icon-size" = 18;
"spacing" = 12;
};
"format" = "{capacity:3}% <big>{icon}</big>";
"format-icons" = {
"5pct" = "󰂃";
"10pct" = "󰁺";
"20pct" = "󰁻";
"30pct" = "󰁼";
"40pct" = "󰁽";
"50pct" = "󰁾";
"60pct" = "󰁿";
"70pct" = "󰂀";
"80pct" = "󰂁";
"90pct" = "󰂂";
"full" = "󰁹";
"memory" = {
"format" = "{percentage:3}% <big>󰍛</big>";
"states" = {
"warning" = 70;
"critical" = 90;
};
};
"on-click" = "notify-send -u low -t 3000 'Battery Status' \"$(acpi)\"";
};
"clock" = {
"format-alt" = "{:%A, %B %d}";
"tooltip-format" = "<big>{:%Y %B}</big>\n<tt>{calendar}</tt>";
};
}];
"cpu" = {
"format" = "{usage:3}% <big></big>";
"states" = {
"warning" = 70;
"critical" = 90;
};
};
"pulseaudio" = {
"format" = "{volume:3}% <big>{icon}</big>";
"format-bluetooth" = "<big>{icon}</big>";
"format-muted" = "<big>󰝟<\big>";
"format-icons" = {
"headphone" = "";
"hands-free" = "";
"headset" = "";
"phone" = "";
"portable" = "";
"car" = "";
"default" = [ "" ];
};
"on-click" = "pavucontrol";
"on-scroll-up" = "pamixer -ui 2 && pamixer --get-volume > $SWAYSOCK.wob";
"on-scroll-down" = "pamixer -ud 2 && pamixer --get-volume > $SWAYSOCK.wob";
};
"network" = {
"format-wifi" = "{essid} <big></big>";
"format-ethernet" = "<big></big>";
"format-disconnected" = "<big>󰌙</big>";
"format-linked" = "<big></big>";
"format-alt" = "{ifname}: {ipaddr}/{cidr}";
"tooltip-format-ethernet" = "<big></big> {bandwidthDownBits} <big></big> {bandwidthUpBits}";
"tooltip-format-wifi" = "<big></big>{bandwidthDownBits} <big></big> {bandwidthUpBits}";
};
"battery" = {
"states" = {
"5pct" = 5;
"10pct" = 10;
"20pct" = 20;
"30pct" = 30;
"40pct" = 40;
"50pct" = 50;
"60pct" = 60;
"70pct" = 70;
"80pct" = 80;
"90pct" = 90;
"full" = 100;
};
"format" = "{capacity:3}% <big>{icon}</big>";
"format-icons" = {
"5pct" = "󰂃";
"10pct" = "󰁺";
"20pct" = "󰁻";
"30pct" = "󰁼";
"40pct" = "󰁽";
"50pct" = "󰁾";
"60pct" = "󰁿";
"70pct" = "󰂀";
"80pct" = "󰂁";
"90pct" = "󰂂";
"full" = "󰁹";
};
"on-click" = "notify-send -u low -t 3000 'Battery Status' \"$(acpi)\"";
};
"clock" = {
"format-alt" = "{:%A, %B %d}";
"tooltip-format" = "<big>{:%Y %B}</big>\n<tt>{calendar}</tt>";
};
}
];
style = ''
@keyframes blink-warning {

View file

@ -1,4 +1,9 @@
{ pkgs, config, lib, ... }:
{
pkgs,
config,
lib,
...
}:
with lib;
{
programs.wofi = mkIf config.desktop.enableSwayStack {

View file

@ -1,9 +1,12 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
with lib;
{
imports = [
./embedded.nix
];
imports = [ ./embedded.nix ];
options.development.enableGit = mkOption {
type = types.bool;

View file

@ -1,4 +1,9 @@
{ lib, config, pkgs, ... }:
{
lib,
config,
pkgs,
...
}:
with lib;
{
options.development.embedded.enableTools = mkOption {

View file

@ -1,9 +1,12 @@
{ lib, pkgs, config, ... }:
{
lib,
pkgs,
config,
...
}:
with lib;
{
options.enableFishShell = mkOption {
type = types.bool;
};
options.enableFishShell = mkOption { type = types.bool; };
config.programs.fish = mkIf config.enableFishShell {
enable = true;

View file

@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
with lib;
{
options.enableGPGKeyring = mkOption {

View file

@ -1,7 +1,5 @@
{ lib, config, ... }:
with lib;
{
programs.helix.settings = mkIf config.programs.helix.enable {
theme = "nord";
};
programs.helix.settings = mkIf config.programs.helix.enable { theme = "nord"; };
}

View file

@ -1,4 +1,9 @@
{ lib, pkgs, config, ... }:
{
lib,
pkgs,
config,
...
}:
with lib;
let
mailAccountModule = types.submodule {
@ -7,21 +12,13 @@ let
default = false;
};
mailAddress = mkOption {
type = types.str;
};
mailAddress = mkOption { type = types.str; };
mailPasswdEval = mkOption {
type = types.str;
};
mailPasswdEval = mkOption { type = types.str; };
imapHost = mkOption {
type = types.str;
};
imapHost = mkOption { type = types.str; };
smtpHost = mkOption {
type = types.str;
};
smtpHost = mkOption { type = types.str; };
};
defaultExtraMailboxes = [
@ -50,39 +47,35 @@ in
config = mkIf (!hasNoAddress) {
accounts.email.accounts = builtins.mapAttrs
(name: value: {
primary = value.isPrimary;
address = value.mailAddress;
userName = value.mailAddress;
realName = "Victor Mignot";
imap.host = value.imapHost;
smtpHost = value.smtpHost;
passwordCommand = value.mailPasswdEval;
inherit signature;
accounts.email.accounts = builtins.mapAttrs (name: value: {
primary = value.isPrimary;
address = value.mailAddress;
userName = value.mailAddress;
realName = "Victor Mignot";
imap.host = value.imapHost;
smtpHost = value.smtpHost;
passwordCommand = value.mailPasswdEval;
inherit signature;
mbsync = {
enable = true;
create = "both";
expunge = "both";
patterns = [ "*" ];
subFolders = "Verbatim";
};
mbsync = {
enable = true;
create = "both";
expunge = "both";
patterns = [ "*" ];
subFolders = "Verbatim";
};
msmtp.enable = true;
msmtp.enable = true;
neomutt = {
enable = true;
mailboxName = "${name}/Inbox";
extraMailboxes = map
(mb: {
mailbox = mb;
name = "${name}/${mb}";
})
defaultExtraMailboxes;
};
})
config.communication.mailAccounts;
neomutt = {
enable = true;
mailboxName = "${name}/Inbox";
extraMailboxes = map (mb: {
mailbox = mb;
name = "${name}/${mb}";
}) defaultExtraMailboxes;
};
}) config.communication.mailAccounts;
services.mbsync.enable = true;
programs.mbsync.enable = true;

View file

@ -1,4 +1,9 @@
{ lib, config, pkgs, ... }:
{
lib,
config,
pkgs,
...
}:
with lib;
{
options.desktop.enableNeovim = mkOption {

View file

@ -1,4 +1,9 @@
{ lib, config, pkgs, ... }:
{
lib,
config,
pkgs,
...
}:
with lib;
let
tmuxExtraConfig = ''