style: use alejandra formatter on all nix files

This commit is contained in:
Yorick Barbanneau 2025-09-25 23:33:01 +02:00
parent d563805909
commit 0d8a394dcf
Signed by: ephase
GPG key ID: 246042E52B41FFCF
76 changed files with 1287 additions and 935 deletions

View file

@ -19,8 +19,15 @@
url = "git+ssh://git@git.epha.se:24422/ephase/nix-private.git?shallow=1&ref=main"; url = "git+ssh://git@git.epha.se:24422/ephase/nix-private.git?shallow=1&ref=main";
}; };
}; };
outputs = { self, nixpkgs, home-manager, nur, nixgl, sops-nix, ... }@inputs: outputs = {
let self,
nixpkgs,
home-manager,
nur,
nixgl,
sops-nix,
...
} @ inputs: let
stateVersion = "23.11"; stateVersion = "23.11";
allSystems = [ allSystems = [
@ -30,9 +37,14 @@
forAllSystems = fn: forAllSystems = fn:
nixpkgs.lib.genAttrs allSystems nixpkgs.lib.genAttrs allSystems
(system: fn { pkgs = import nixpkgs { inherit system; }; }); (system: fn {pkgs = import nixpkgs {inherit system;};});
createNixosSystem = { system, hostname, username ? "ephase" }: nixpkgs.lib.nixosSystem { createNixosSystem = {
system,
hostname,
username ? "ephase",
}:
nixpkgs.lib.nixosSystem {
system = system; system = system;
specialArgs = { specialArgs = {
inherit stateVersion inputs; inherit stateVersion inputs;
@ -44,11 +56,15 @@
]; ];
}; };
createHomeConfiguration = { system ? "x86_64-linux", hostname, username ? "ephase" }: createHomeConfiguration = {
system ? "x86_64-linux",
hostname,
username ? "ephase",
}:
home-manager.lib.homeManagerConfiguration { home-manager.lib.homeManagerConfiguration {
pkgs = import nixpkgs { pkgs = import nixpkgs {
system = system; system = system;
overlays = [ nixgl.overlay ]; overlays = [nixgl.overlay];
}; };
extraSpecialArgs = { extraSpecialArgs = {
inherit stateVersion inputs nixgl; inherit stateVersion inputs nixgl;
@ -56,12 +72,12 @@
username = username; username = username;
}; };
modules = [ modules = [
{ nixpkgs.overlays = [ nixgl.overlay ];} {nixpkgs.overlays = [nixgl.overlay];}
./home-manager/default.nix ./home-manager/default.nix
]; ];
}; };
in { in {
devShells = forAllSystems ({ pkgs }: { devShells = forAllSystems ({pkgs}: {
default = pkgs.mkShell { default = pkgs.mkShell {
name = "nixfiles"; name = "nixfiles";
buildInputs = [ buildInputs = [
@ -78,15 +94,36 @@
}; };
}); });
nixosConfigurations = { nixosConfigurations = {
morty = createNixosSystem { system = "x86_64-linux"; hostname = "morty"; }; morty = createNixosSystem {
mrmeeseeks = createNixosSystem { system = "x86_64-linux"; hostname = "mrmeeseeks";}; system = "x86_64-linux";
luci = createNixosSystem { system = "x86_64-linux"; hostname = "luci"; }; hostname = "morty";
};
mrmeeseeks = createNixosSystem {
system = "x86_64-linux";
hostname = "mrmeeseeks";
};
luci = createNixosSystem {
system = "x86_64-linux";
hostname = "luci";
};
}; };
homeConfigurations = { homeConfigurations = {
"rick" = createHomeConfiguration { system = "aarch64-linux"; hostname = "rick";}; "rick" = createHomeConfiguration {
"luci" = createHomeConfiguration { system = "x86_64-linux"; hostname = "luci";}; system = "aarch64-linux";
"morty" = createHomeConfiguration { system = "x86_64-linux"; hostname = "morty";}; hostname = "rick";
"mrmeeseeks" = createHomeConfiguration { system = "x86_64-linux"; hostname = "mrmeeseeks";}; };
"luci" = createHomeConfiguration {
system = "x86_64-linux";
hostname = "luci";
};
"morty" = createHomeConfiguration {
system = "x86_64-linux";
hostname = "morty";
};
"mrmeeseeks" = createHomeConfiguration {
system = "x86_64-linux";
hostname = "mrmeeseeks";
};
"work" = createHomeConfiguration { "work" = createHomeConfiguration {
system = "x86_64-linux"; system = "x86_64-linux";
hostname = "work"; hostname = "work";

View file

@ -1,13 +1,23 @@
{ inputs, lib, stateVersion, username, hostname, nixgl, ... }:
{ {
imports = [ inputs,
lib,
stateVersion,
username,
hostname,
nixgl,
...
}: {
imports =
[
inputs.sops-nix.homeManagerModules.sops inputs.sops-nix.homeManagerModules.sops
../hosts/${hostname}/home-config.nix ../hosts/${hostname}/home-config.nix
../nixos/includes/system/overlay.nix ../nixos/includes/system/overlay.nix
../modules/home-manager/default.nix ../modules/home-manager/default.nix
] ++ lib.optional ( ]
++ lib.optional (
builtins.pathExists ../hosts/${hostname}/includes/home-manager.nix builtins.pathExists ../hosts/${hostname}/includes/home-manager.nix
) ../hosts/${hostname}/includes/home-manager.nix; )
../hosts/${hostname}/includes/home-manager.nix;
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
programs.home-manager.enable = true; programs.home-manager.enable = true;

View file

@ -1,45 +1,49 @@
# 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, ... }:
{ {
imports = config,
[ (modulesPath + "/installer/scan/not-detected.nix") lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" "i915" ]; boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" "i915"];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [];
boot.kernelParams = [ "intel_pstate=disable" ]; boot.kernelParams = ["intel_pstate=disable"];
boot.kernelModules = [ "kvm-intel" "i915" ]; boot.kernelModules = ["kvm-intel" "i915"];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [];
boot.initrd.luks.devices."nixos".device = "/dev/disk/by-uuid/ee06e049-e738-4f1f-84ab-e8066e0f1640"; boot.initrd.luks.devices."nixos".device = "/dev/disk/by-uuid/ee06e049-e738-4f1f-84ab-e8066e0f1640";
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/97c3403a-fdad-4dc8-a103-a666d5fd8d6c"; device = "/dev/disk/by-uuid/97c3403a-fdad-4dc8-a103-a666d5fd8d6c";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=root" "compress=zstd" ]; options = ["subvol=root" "compress=zstd"];
}; };
fileSystems."/home" = fileSystems."/home" = {
{ device = "/dev/disk/by-uuid/97c3403a-fdad-4dc8-a103-a666d5fd8d6c"; device = "/dev/disk/by-uuid/97c3403a-fdad-4dc8-a103-a666d5fd8d6c";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=home" "compress=zstd"]; options = ["subvol=home" "compress=zstd"];
}; };
fileSystems."/nix" = fileSystems."/nix" = {
{ device = "/dev/disk/by-uuid/97c3403a-fdad-4dc8-a103-a666d5fd8d6c"; device = "/dev/disk/by-uuid/97c3403a-fdad-4dc8-a103-a666d5fd8d6c";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=nix" "compress=zstd"]; options = ["subvol=nix" "compress=zstd"];
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/B77A-53B1"; device = "/dev/disk/by-uuid/B77A-53B1";
fsType = "vfat"; fsType = "vfat";
}; };
swapDevices = [ ]; swapDevices = [];
# 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
@ -60,5 +64,5 @@
]; ];
}; };
virtualisation.docker.enable = true; virtualisation.docker.enable = true;
users.extraGroups.docker.members = [ "ephase" ]; users.extraGroups.docker.members = ["ephase"];
} }

View file

@ -1,4 +1,4 @@
{ ... }: { {...}: {
config.modules = { config.modules = {
application = { application = {
gnupg.enable = true; gnupg.enable = true;

View file

@ -1,5 +1,4 @@
{ ... }: {...}: {
{
## Specific host home manager configuration ## Specific host home manager configuration
wayland.windowManager.sway.config = { wayland.windowManager.sway.config = {
input = { input = {

View file

@ -1,4 +1,4 @@
{ ... }: { {...}: {
config.modules.desktop.sway.enable = true; config.modules.desktop.sway.enable = true;
config.modules.gaming.steam.enable = false; config.modules.gaming.steam.enable = false;
config.modules.hardware.laptop.enable = true; config.modules.hardware.laptop.enable = true;

View file

@ -1,45 +1,49 @@
# 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, ... }:
{ {
imports = config,
[ (modulesPath + "/installer/scan/not-detected.nix") lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" "i915" ]; boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" "i915"];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [];
boot.kernelModules = [ "kvm-intel" "i915" ]; boot.kernelModules = ["kvm-intel" "i915"];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [];
boot.kernelParams = ["fbcon=rotate:1" "video=eDP-1:panel_orientation=right_side_up" "intel_pstate=disable" ]; boot.kernelParams = ["fbcon=rotate:1" "video=eDP-1:panel_orientation=right_side_up" "intel_pstate=disable"];
boot.loader.systemd-boot.consoleMode = "max"; boot.loader.systemd-boot.consoleMode = "max";
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/d28d59b0-a44d-4b17-9338-2ca69a1efca7"; device = "/dev/disk/by-uuid/d28d59b0-a44d-4b17-9338-2ca69a1efca7";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=root" "compress=zstd"]; options = ["subvol=root" "compress=zstd"];
}; };
boot.initrd.luks.devices."nixos".device = "/dev/disk/by-uuid/ad4fa799-214c-4e5e-996a-8776e010fb2f"; boot.initrd.luks.devices."nixos".device = "/dev/disk/by-uuid/ad4fa799-214c-4e5e-996a-8776e010fb2f";
fileSystems."/nix" = fileSystems."/nix" = {
{ device = "/dev/disk/by-uuid/d28d59b0-a44d-4b17-9338-2ca69a1efca7"; device = "/dev/disk/by-uuid/d28d59b0-a44d-4b17-9338-2ca69a1efca7";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=nix" "compress=zstd" ]; options = ["subvol=nix" "compress=zstd"];
}; };
fileSystems."/home" = fileSystems."/home" = {
{ device = "/dev/disk/by-uuid/d28d59b0-a44d-4b17-9338-2ca69a1efca7"; device = "/dev/disk/by-uuid/d28d59b0-a44d-4b17-9338-2ca69a1efca7";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=home" "compress=zstd" ]; options = ["subvol=home" "compress=zstd"];
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/E83D-CDFE"; device = "/dev/disk/by-uuid/E83D-CDFE";
fsType = "vfat"; fsType = "vfat";
}; };
swapDevices = [ ]; swapDevices = [];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;

View file

@ -1,4 +1,4 @@
{ inputs, ... }: { {inputs, ...}: {
config.modules = { config.modules = {
email = { email = {
enable = true; enable = true;

View file

@ -1,7 +1,5 @@
{ ... }: {...}: {
{ home.file.".config/xkb/symbols/gpdwinmax".text = ''
home.file.".config/xkb/symbols/gpdwinmax".text =
''
default partial alphanumeric_keys default partial alphanumeric_keys
xkb_symbols "us-intl-winmax" { xkb_symbols "us-intl-winmax" {
name[group1] = "GPD Win Max us-inlt"; name[group1] = "GPD Win Max us-inlt";

View file

@ -1,4 +1,4 @@
{ ... }: { {...}: {
config.modules.desktop.sway.enable = true; config.modules.desktop.sway.enable = true;
config.modules.gaming.steam.enable = true; config.modules.gaming.steam.enable = true;
config.modules.hardware.laptop = { config.modules.hardware.laptop = {

View file

@ -1,11 +1,15 @@
# 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, ... }:
{ {
imports = config,
[ (modulesPath + "/installer/scan/not-detected.nix") lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = [ boot.initrd.availableKernelModules = [
@ -29,33 +33,33 @@
"amdgpu.ppfeaturemask=0xffffffff" "amdgpu.ppfeaturemask=0xffffffff"
]; ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [];
boot.initrd.luks.devices."nixos".device = "/dev/disk/by-uuid/ea7fa60d-35e5-48b8-95d7-142f37b262cd"; boot.initrd.luks.devices."nixos".device = "/dev/disk/by-uuid/ea7fa60d-35e5-48b8-95d7-142f37b262cd";
boot.initrd.luks.devices."nixos".preLVM = true; boot.initrd.luks.devices."nixos".preLVM = true;
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/9d1e5022-0265-4ce7-824e-282ee550d52d"; device = "/dev/disk/by-uuid/9d1e5022-0265-4ce7-824e-282ee550d52d";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=@root" "compress=zstd"]; options = ["subvol=@root" "compress=zstd"];
}; };
fileSystems."/home" = fileSystems."/home" = {
{ device = "/dev/disk/by-uuid/9d1e5022-0265-4ce7-824e-282ee550d52d"; device = "/dev/disk/by-uuid/9d1e5022-0265-4ce7-824e-282ee550d52d";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=@home" "compress=zstd"]; options = ["subvol=@home" "compress=zstd"];
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/F027-F53F"; device = "/dev/disk/by-uuid/F027-F53F";
fsType = "vfat"; fsType = "vfat";
}; };
fileSystems."/mnt/gamelib" = fileSystems."/mnt/gamelib" = {
{ device = "/dev/mapper/tank-gamelib"; device = "/dev/mapper/tank-gamelib";
fsType = "ext4"; fsType = "ext4";
}; };
swapDevices = [ ]; swapDevices = [];
# 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

View file

@ -1,4 +1,4 @@
{ inputs, ... }: { {inputs, ...}: {
config.modules = { config.modules = {
application = { application = {
gnupg = { gnupg = {

View file

@ -1,4 +1,4 @@
{ ... }: { {...}: {
config.modules.desktop.sway.enable = true; config.modules.desktop.sway.enable = true;
config.modules.gaming.steam = { config.modules.gaming.steam = {
enable = true; enable = true;

View file

@ -1,4 +1,8 @@
{ pkgs, inputs, ... }: { {
pkgs,
inputs,
...
}: {
config.modules = { config.modules = {
application = { application = {
gnupg.enable = true; gnupg.enable = true;

View file

@ -1,5 +1,4 @@
_: _: {
{
wayland.windowManager.sway.config.output = { wayland.windowManager.sway.config.output = {
"eDP-1" = { "eDP-1" = {
scale = "1.4"; scale = "1.4";
@ -15,7 +14,7 @@ _:
}; };
}; };
programs.zsh.loginExtra = '' programs.zsh.loginExtra = ''
#notmutch # notmuch
export NOTMUCH_CONFIG="$HOME/.config/notmuch/config" export NOTMUCH_CONFIG="$HOME/.config/notmuch/config"
# export PATH=~/.local/bin:$PATH # export PATH=~/.local/bin:$PATH
# export XDG_DATA_HOME=$HOME/.local/share # export XDG_DATA_HOME=$HOME/.local/share

View file

@ -1,4 +1,8 @@
{ pkgs, inputs, ... }: { {
pkgs,
inputs,
...
}: {
config.modules = { config.modules = {
application = { application = {
zathura.enable = true; zathura.enable = true;

View file

@ -1,5 +1,8 @@
{ pkgs, config, ... }:
{ {
pkgs,
config,
...
}: {
home.packages = with pkgs; [ home.packages = with pkgs; [
dejavu_fonts dejavu_fonts
font-awesome font-awesome

View file

@ -1,19 +1,22 @@
{ lib, config, inputs, pkgs, ... }: {
with lib; lib,
let config,
inputs,
pkgs,
...
}:
with lib; let
cfg = config.modules.dav; cfg = config.modules.dav;
secretsDirectory = "${(builtins.toString inputs.nix-private)}/secrets"; secretsDirectory = "${(builtins.toString inputs.nix-private)}/secrets";
vdirsyncerConf = { vdirsyncerConf = {
enable = true; enable = true;
auth = "basic"; auth = "basic";
}; };
in in {
{
options.modules.dav = { options.modules.dav = {
enable = mkEnableOption "enable personal Caldav / CardDav"; enable = mkEnableOption "enable personal Caldav / CardDav";
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
sops = { sops = {
secrets = { secrets = {
"${inputs.nix-private.dav.personal.secret.key}" = { "${inputs.nix-private.dav.personal.secret.key}" = {
@ -34,7 +37,9 @@ in
"${config.sops.secrets."${inputs.nix-private.dav.personal.secret.key}".path}" "${config.sops.secrets."${inputs.nix-private.dav.personal.secret.key}".path}"
]; ];
}; };
vdirsyncer = vdirsyncerConf // { vdirsyncer =
vdirsyncerConf
// {
metadata = [ metadata = [
"color" "color"
"displayname" "displayname"
@ -70,7 +75,9 @@ in
type = "filesystem"; type = "filesystem";
fileExt = ".vcf"; fileExt = ".vcf";
}; };
vdirsyncer = vdirsyncerConf // { vdirsyncer =
vdirsyncerConf
// {
metadata = [ metadata = [
"displayname" "displayname"
]; ];
@ -113,7 +120,7 @@ in
general = { general = {
default_action = "list"; default_action = "list";
editor = ["nvim" "-i" "NONE"]; editor = ["nvim" "-i" "NONE"];
merge_editor = [ "nvim" "-d" ]; merge_editor = ["nvim" "-d"];
}; };
}; };
}; };

View file

@ -1,10 +1,14 @@
{ lib, config, pkgs, inputs, ... }: {
with lib; lib,
let config,
pkgs,
inputs,
...
}:
with lib; let
cfg = config.modules.email; cfg = config.modules.email;
secretsDirectory = "${(builtins.toString inputs.nix-private)}/secrets"; secretsDirectory = "${(builtins.toString inputs.nix-private)}/secrets";
in in {
{
options.modules.email = { options.modules.email = {
enable = mkEnableOption "Enable email accounts configuration"; enable = mkEnableOption "Enable email accounts configuration";
@ -23,11 +27,14 @@ in
config = mkIf cfg.enable { config = mkIf cfg.enable {
sops = let sops = let
secretList = lib.mapAttrs' ( name: value: secretList =
nameValuePair ( value.secret.key ) ({ lib.mapAttrs' (
name: value:
nameValuePair (value.secret.key) {
sopsFile = "${secretsDirectory}/${value.secret.file}"; sopsFile = "${secretsDirectory}/${value.secret.file}";
}) }
) cfg.accountConfigs; )
cfg.accountConfigs;
in { in {
secrets = secretList; secrets = secretList;
}; };
@ -55,27 +62,31 @@ in
showDefaultMailbox = false; showDefaultMailbox = false;
}; };
}; };
accountsList = lib.mapAttrs ( name: value: lib.recursiveUpdate defaultSetting value.config ) cfg.accountConfigs; accountsList = lib.mapAttrs (name: value: lib.recursiveUpdate defaultSetting value.config) cfg.accountConfigs;
in { in {
maildirBasePath = "mail"; maildirBasePath = "mail";
accounts = lib.recursiveUpdate accountsList { "${cfg.primary}".primary = true; }; accounts = lib.recursiveUpdate accountsList {"${cfg.primary}".primary = true;};
}; };
programs.afew = let programs.afew = let
mailMoverRules = lib.mergeAttrsList ( mailMoverRules = lib.mergeAttrsList (
lib.attrsets.mapAttrsToList ( lib.attrsets.mapAttrsToList (
n: v: n: v:
if lib.hasAttrByPath ["afew" "mailMover"] v then if lib.hasAttrByPath ["afew" "mailMover"] v
v.afew.mailMover then v.afew.mailMover
else {} else {}
) cfg.accountConfigs); )
cfg.accountConfigs
);
mailFilterRules = lib.flatten ( mailFilterRules = lib.flatten (
lib.attrsets.mapAttrsToList ( lib.attrsets.mapAttrsToList (
n: v: n: v:
if lib.hasAttrByPath ["afew" "filters"] v then if lib.hasAttrByPath ["afew" "filters"] v
v.afew.filters then v.afew.filters
else [] else []
) cfg.accountConfigs); )
cfg.accountConfigs
);
in { in {
enable = true; enable = true;
extraConfig = '' extraConfig = ''
@ -96,16 +107,20 @@ in
''; '';
}; };
programs.neomutt = let programs.neomutt = let
accountMacros = lib.imap1 ( accountMacros =
i: lib.imap1 (
elem: elem // { i: elem:
elem
// {
map = ["index" "pager"]; map = ["index" "pager"];
key = "<F${(toString (i + 1))}>"; key = "<F${(toString (i + 1))}>";
}) ( }
) (
lib.attrsets.mapAttrsToList ( lib.attrsets.mapAttrsToList (
n: c: n: c: {"action" = "<sync-mailbox><refresh><enter-command>source ~/.config/neomutt/${n}<enter><change-vfolder>Unread:${c.config.address}<enter>";}
{ "action" = "<sync-mailbox><refresh><enter-command>source ~/.config/neomutt/${n}<enter><change-vfolder>Unread:${c.config.address}<enter>";} )
) cfg.accountConfigs); cfg.accountConfigs
);
in { in {
enable = true; enable = true;
unmailboxes = true; unmailboxes = true;
@ -142,7 +157,7 @@ in
virtual_spoolfile = "yes"; virtual_spoolfile = "yes";
mail_check_stats = "yes"; mail_check_stats = "yes";
mh_purge = "yes"; mh_purge = "yes";
mailcap_path= "${config.xdg.configHome}/neomutt/mailcap"; mailcap_path = "${config.xdg.configHome}/neomutt/mailcap";
}; };
extraConfig = '' extraConfig = ''
${(builtins.readFile ./files/theme.muttrc)} ${(builtins.readFile ./files/theme.muttrc)}
@ -167,63 +182,193 @@ in
"unread" "GU" \ "unread" "GU" \
"replied" "GR" "replied" "GR"
${lib.concatStrings (lib.attrsets.mapAttrsToList ( _: v: if lib.hasAttrByPath [ "neomuttHooks" ] v then v.neomuttHooks else "" ) cfg.accountConfigs)} ${lib.concatStrings (lib.attrsets.mapAttrsToList (_: v:
if lib.hasAttrByPath ["neomuttHooks"] v
then v.neomuttHooks
else "")
cfg.accountConfigs)}
# manually source first account instead of use home-manager parameter because # manually source first account instead of use home-manager parameter because
# of $my_pager expansion does not work as this variable is not already set # of $my_pager expansion does not work as this variable is not already set
source ${config.xdg.configHome}/neomutt/${cfg.primary} source ${config.xdg.configHome}/neomutt/${cfg.primary}
''; '';
binds = [ binds = [
{ map = [ "attach" "browser" "index" "pager" ]; key = "g"; action = "noop"; } {
{ map = [ "attach" "browser" "index" "pager" ]; key = "G"; action = "noop"; } map = ["attach" "browser" "index" "pager"];
{ map = [ "index" ]; key = "q"; action = "noop";} key = "g";
{ map = [ "pager" ]; key = "Q"; action = "noop";} action = "noop";
{ map = [ "attach" "browser" "index" ]; key = "gg"; action = "first-entry";} }
{ map = [ "attach" "browser" "index" ]; key = "G"; action = "last-entry";} {
{ map = [ "pager" ]; key = "gg"; action = "top"; } map = ["attach" "browser" "index" "pager"];
{ map = [ "pager" ]; key = "G"; action = "bottom"; } key = "G";
{ map = [ "pager" ]; key = "k"; action = "previous-line"; } action = "noop";
{ map = [ "pager" ]; key = "j"; action = "next-line"; } }
{
map = ["index"];
key = "q";
action = "noop";
}
{
map = ["pager"];
key = "Q";
action = "noop";
}
{
map = ["attach" "browser" "index"];
key = "gg";
action = "first-entry";
}
{
map = ["attach" "browser" "index"];
key = "G";
action = "last-entry";
}
{
map = ["pager"];
key = "gg";
action = "top";
}
{
map = ["pager"];
key = "G";
action = "bottom";
}
{
map = ["pager"];
key = "k";
action = "previous-line";
}
{
map = ["pager"];
key = "j";
action = "next-line";
}
# Scrolling # Scrolling
{ map = [ "attach" "browser" "pager" "index" ]; key = "\\CF"; action = "next-page";} {
{ map = [ "attach" "browser" "pager" "index" ]; key = "\\CB"; action = "previous-page";} map = ["attach" "browser" "pager" "index"];
{ map = [ "attach" "browser" "pager" "index" ]; key = "\\Cu"; action = "half-up";} key = "\\CF";
{ map = [ "attach" "browser" "pager" "index" ]; key = "\\Cd"; action = "half-down";} action = "next-page";
{ map = [ "browser" "pager" ]; key = "\\Ce"; action = "next-line";} }
{ map = [ "browser" "pager" ]; key = "\\Cy"; action = "previous-line";} {
{ map = [ "index" ]; key = "\\Ce"; action = "next-line";} map = ["attach" "browser" "pager" "index"];
{ map = [ "index" ]; key = "\\Cy"; action = "previous-line";} key = "\\CB";
action = "previous-page";
}
{
map = ["attach" "browser" "pager" "index"];
key = "\\Cu";
action = "half-up";
}
{
map = ["attach" "browser" "pager" "index"];
key = "\\Cd";
action = "half-down";
}
{
map = ["browser" "pager"];
key = "\\Ce";
action = "next-line";
}
{
map = ["browser" "pager"];
key = "\\Cy";
action = "previous-line";
}
{
map = ["index"];
key = "\\Ce";
action = "next-line";
}
{
map = ["index"];
key = "\\Cy";
action = "previous-line";
}
# Reply # Reply
{ map =[ "pager" "index" ]; key = "R"; action = "group-reply";} {
map = ["pager" "index"];
key = "R";
action = "group-reply";
}
# sidebar # sidebar
{ map = [ "index" "pager" ]; key = "<f12>"; action = "sidebar-toggle-visible";} {
{ map = [ "index" "pager" ]; key = "{"; action = "sidebar-prev";} map = ["index" "pager"];
{ map = [ "index" "pager" ]; key = "}"; action = "sidebar-next";} key = "<f12>";
{ map = [ "index" "pager" ]; key = "|"; action = "sidebar-open";} action = "sidebar-toggle-visible";
}
{
map = ["index" "pager"];
key = "{";
action = "sidebar-prev";
}
{
map = ["index" "pager"];
key = "}";
action = "sidebar-next";
}
{
map = ["index" "pager"];
key = "|";
action = "sidebar-open";
}
# open virtual folder # open virtual folder
{ map = [ "index" "pager" ]; key = "X"; action = "noop";} {
{ map = [ "index" "pager" ]; key = "X"; action = "change-vfolder";} map = ["index" "pager"];
key = "X";
action = "noop";
}
{
map = ["index" "pager"];
key = "X";
action = "change-vfolder";
}
# read entire thread of the current message # read entire thread of the current message
{ map = [ "index" "pager" ]; key = "+"; action = "entire-thread";} {
map = ["index" "pager"];
key = "+";
action = "entire-thread";
}
# generate virtual folder from query # generate virtual folder from query
{ map = [ "index" "pager" ]; key = "\\eX"; action = "vfolder-from-query";} {
map = ["index" "pager"];
key = "\\eX";
action = "vfolder-from-query";
}
# generate virtual folder from query with time window # generate virtual folder from query with time window
{ map = [ "index" "pager" ]; key = "\\CD"; action = "modify-tags";} {
map = ["index" "pager"];
key = "\\CD";
action = "modify-tags";
}
# Editor # Editor
{ map = [ "editor" ]; key = "<Tab>"; action = "complete-query";} {
{ map = [ "editor" ]; key = "^T"; action = "complete";} map = ["editor"];
key = "<Tab>";
action = "complete-query";
}
{
map = ["editor"];
key = "^T";
action = "complete";
}
]; ];
macros = [ macros =
{ map = [ "pager" ]; key = "\\CB"; action = "<pipe-message>${pkgs.urlscan}/bin/urlscan -d -c --color true<Enter>"; } [
] ++ accountMacros; {
map = ["pager"];
key = "\\CB";
action = "<pipe-message>${pkgs.urlscan}/bin/urlscan -d -c --color true<Enter>";
}
]
++ accountMacros;
}; };
programs.mbsync = { programs.mbsync = {
enable = true; enable = true;
@ -234,7 +379,7 @@ in
}; };
programs.notmuch = { programs.notmuch = {
enable = true; enable = true;
new.tags = [ "new" ]; new.tags = ["new"];
hooks.postNew = '' hooks.postNew = ''
${pkgs.afew}/bin/afew --tag --new ${pkgs.afew}/bin/afew --tag --new
${pkgs.afew}/bin/afew --move --all ${pkgs.afew}/bin/afew --move --all

View file

@ -1,9 +1,11 @@
{ lib, config, ... }:
with lib;
let
cfg = config.modules.application.foot;
in
{ {
lib,
config,
...
}:
with lib; let
cfg = config.modules.application.foot;
in {
options.modules.application.foot = { options.modules.application.foot = {
enable = mkEnableOption "enable Foot terminal emulator"; enable = mkEnableOption "enable Foot terminal emulator";
@ -65,7 +67,7 @@ in
selection-foreground = "181818"; selection-foreground = "181818";
urls = "b8b8b8"; urls = "b8b8b8";
jump-labels = "181818 f7ca88"; jump-labels = "181818 f7ca88";
scrollback-indicator= "181818 b8b8b8"; scrollback-indicator = "181818 b8b8b8";
}; };
scrollback = { scrollback = {
lines = cfg.scrollback-lines; lines = cfg.scrollback-lines;

View file

@ -1,9 +1,12 @@
{ lib, config, pkgs, ... }:
with lib;
let
cfg = config.modules.application.gnupg;
in
{ {
lib,
config,
pkgs,
...
}:
with lib; let
cfg = config.modules.application.gnupg;
in {
options.modules.application.gnupg = { options.modules.application.gnupg = {
enable = mkEnableOption "enable GnuPG and related utils"; enable = mkEnableOption "enable GnuPG and related utils";
@ -20,7 +23,6 @@ in
}; };
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
home.packages = with pkgs; [ home.packages = with pkgs; [
# pinentry-gnome # pinentry-gnome
gcr gcr
@ -46,7 +48,10 @@ in
noAllowExternalCache = true; noAllowExternalCache = true;
}; };
services.ssh-agent.enable = if cfg.enableSshSupport then false else true; services.ssh-agent.enable =
if cfg.enableSshSupport
then false
else true;
programs.password-store = { programs.password-store = {
enable = cfg.pass; enable = cfg.pass;
}; };

View file

@ -1,9 +1,12 @@
{ lib, config, pkgs, ... }:
with lib;
let
cfg = config.modules.application.imv;
in
{ {
lib,
config,
pkgs,
...
}:
with lib; let
cfg = config.modules.application.imv;
in {
options.modules.application.imv = { options.modules.application.imv = {
enable = mkEnableOption "enable IMV image viewer"; enable = mkEnableOption "enable IMV image viewer";
@ -12,7 +15,6 @@ in
default = true; default = true;
description = "install Package, if false relies on distribution packages"; description = "install Package, if false relies on distribution packages";
}; };
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
programs.imv = { programs.imv = {

View file

@ -1,9 +1,11 @@
{ lib, config, ... }:
with lib;
let
cfg = config.modules.application.zathura;
in
{ {
lib,
config,
...
}:
with lib; let
cfg = config.modules.application.zathura;
in {
options.modules.application.zathura = { options.modules.application.zathura = {
enable = mkEnableOption "enable Zathura PDF viewer"; enable = mkEnableOption "enable Zathura PDF viewer";
}; };

View file

@ -1,10 +1,13 @@
{ lib, config, pkgs, ... }:
with lib;
let
cfg = config.modules.audio.cmus;
in
{ {
options.modules.audio.cmus= { lib,
config,
pkgs,
...
}:
with lib; let
cfg = config.modules.audio.cmus;
in {
options.modules.audio.cmus = {
enable = mkEnableOption "enable cmus audio player"; enable = mkEnableOption "enable cmus audio player";
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {

View file

@ -1,9 +1,11 @@
{ lib, config, ... }:
with lib;
let
cfg = config.modules.cli.direnv;
in
{ {
lib,
config,
...
}:
with lib; let
cfg = config.modules.cli.direnv;
in {
options.modules.cli.direnv = { options.modules.cli.direnv = {
enable = mkEnableOption "enable direnv"; enable = mkEnableOption "enable direnv";
}; };

View file

@ -1,9 +1,12 @@
{ lib, config, pkgs, ... }:
with lib;
let
cfg = config.modules.cli.ghq;
in
{ {
lib,
config,
pkgs,
...
}:
with lib; let
cfg = config.modules.cli.ghq;
in {
options.modules.cli.ghq = { options.modules.cli.ghq = {
enable = mkEnableOption "enable ghq"; enable = mkEnableOption "enable ghq";
}; };

View file

@ -1,9 +1,13 @@
{ lib, config, pkgs, inputs, ... }:
with lib;
let
cfg = config.modules.cli.git;
in
{ {
lib,
config,
pkgs,
inputs,
...
}:
with lib; let
cfg = config.modules.cli.git;
in {
options.modules.cli.git = { options.modules.cli.git = {
enable = mkEnableOption "enable git"; enable = mkEnableOption "enable git";
@ -40,7 +44,6 @@ in
dark = true; dark = true;
line-numbers = true; line-numbers = true;
syntax-theme = "base16-256"; syntax-theme = "base16-256";
}; };
}; };
package = pkgs.gitFull; package = pkgs.gitFull;

View file

@ -1,9 +1,12 @@
{ lib, config, pkgs, ... }:
with lib;
let
cfg = config.modules.cli.k8s;
in
{ {
lib,
config,
pkgs,
...
}:
with lib; let
cfg = config.modules.cli.k8s;
in {
options.modules.cli.k8s = { options.modules.cli.k8s = {
enable = mkEnableOption "Install k8s utils"; enable = mkEnableOption "Install k8s utils";
@ -15,10 +18,12 @@ in
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
home.packages = with pkgs; [ home.packages = with pkgs;
[
kubectl kubectl
kubecm kubecm
] ++ cfg.kubectlPlugins; ]
++ cfg.kubectlPlugins;
programs.k9s = { programs.k9s = {
enable = true; enable = true;
}; };

View file

@ -1,6 +1,10 @@
{ lib, pkgs, config, ... }: {
with lib; lib,
let pkgs,
config,
...
}:
with lib; let
cfg = config.modules.cli.neovim; cfg = config.modules.cli.neovim;
nvim-spell-fr-utf8-dictionary = builtins.fetchurl { nvim-spell-fr-utf8-dictionary = builtins.fetchurl {
url = "https://ftp.nluug.nl/vim/runtime/spell/fr.utf-8.spl"; url = "https://ftp.nluug.nl/vim/runtime/spell/fr.utf-8.spl";
@ -14,15 +18,15 @@ let
## Dynamically create LSP servers configurations list regarding ## Dynamically create LSP servers configurations list regarding
## files in `./files/lsp` ## files in `./files/lsp`
lspConfigFiles = lib.mapAttrs' ( lspConfigFiles = lib.mapAttrs' (
k: _: lib.nameValuePair k: _:
("${config.xdg.configHome}/nvim/lsp/${k}") lib.nameValuePair
({ source = ./files/lsp/${k};}) "${config.xdg.configHome}/nvim/lsp/${k}"
{source = ./files/lsp/${k};}
) (builtins.readDir ./files/lsp); ) (builtins.readDir ./files/lsp);
## This variable contains neovim LSP activations ## This variable contains neovim LSP activations
lspLuaConfig = lib.attrsets.mapAttrsToList ( lspLuaConfig = lib.attrsets.mapAttrsToList (
k: v: k: v: "vim.lsp.enable('${lib.removeSuffix ".lua" k}')"
"vim.lsp.enable('${lib.removeSuffix ".lua" k}')"
) (builtins.readDir ./files/lsp); ) (builtins.readDir ./files/lsp);
## Tony plugins to have a proper helm linting. ## Tony plugins to have a proper helm linting.
@ -35,13 +39,14 @@ let
ref = "main"; ref = "main";
}; };
}; };
in in {
{
options.modules.cli.neovim = { options.modules.cli.neovim = {
enable = mkEnableOption "enable Neovim text editor"; enable = mkEnableOption "enable Neovim text editor";
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
home.file = lspConfigFiles // { home.file =
lspConfigFiles
// {
"${config.xdg.configHome}/nvim/spell/fr.utf-8.spl".source = nvim-spell-fr-utf8-dictionary; "${config.xdg.configHome}/nvim/spell/fr.utf-8.spl".source = nvim-spell-fr-utf8-dictionary;
"${config.xdg.configHome}/nvim/spell/fr.utf-8.sug".source = nvim-spell-fr-utf8-suggestions; "${config.xdg.configHome}/nvim/spell/fr.utf-8.sug".source = nvim-spell-fr-utf8-suggestions;
}; };
@ -79,9 +84,8 @@ in
(builtins.readFile ./files/options.lua) (builtins.readFile ./files/options.lua)
+ (builtins.readFile ./files/keybindings.lua) + (builtins.readFile ./files/keybindings.lua)
+ '' + ''
${ lib.concatStringsSep "\n" lspLuaConfig} ${lib.concatStringsSep "\n" lspLuaConfig}
'' '';
;
plugins = with pkgs.vimPlugins; [ plugins = with pkgs.vimPlugins; [
{ {
plugin = nvim-autopairs; plugin = nvim-autopairs;
@ -93,39 +97,39 @@ in
{ {
plugin = catppuccin-nvim; plugin = catppuccin-nvim;
type = "lua"; type = "lua";
config = (builtins.readFile ./files/plugins/theme.lua); config = builtins.readFile ./files/plugins/theme.lua;
} }
{ {
plugin = blink-cmp; plugin = blink-cmp;
type = "lua"; type = "lua";
config = (builtins.readFile ./files/plugins/blink-cmp.lua); config = builtins.readFile ./files/plugins/blink-cmp.lua;
} }
blink-emoji-nvim blink-emoji-nvim
blink-cmp-dictionary blink-cmp-dictionary
{ {
plugin = conform-nvim; plugin = conform-nvim;
type = "lua"; type = "lua";
config = (builtins.readFile ./files/plugins/conform.lua); config = builtins.readFile ./files/plugins/conform.lua;
} }
{ {
plugin = dropbar-nvim; plugin = dropbar-nvim;
type = "lua"; type = "lua";
config = (builtins.readFile ./files/plugins/dropbar.lua); config = builtins.readFile ./files/plugins/dropbar.lua;
} }
{ {
plugin = fzf-lua; plugin = fzf-lua;
type = "lua"; type = "lua";
config = (builtins.readFile ./files/plugins/fzf-lua.lua); config = builtins.readFile ./files/plugins/fzf-lua.lua;
} }
{ {
plugin = gitsigns-nvim; plugin = gitsigns-nvim;
type = "lua"; type = "lua";
config = (builtins.readFile ./files/plugins/gitsign.lua); config = builtins.readFile ./files/plugins/gitsign.lua;
} }
{ {
plugin = indent-blankline-nvim; plugin = indent-blankline-nvim;
type = "lua"; type = "lua";
config ='' config = ''
require("ibl").setup{ require("ibl").setup{
indent = { char = ""}, indent = { char = ""},
} }
@ -134,34 +138,35 @@ in
{ {
plugin = lualine-nvim; plugin = lualine-nvim;
type = "lua"; type = "lua";
config = (builtins.readFile ./files/plugins/lualine.lua); config = builtins.readFile ./files/plugins/lualine.lua;
} }
{ {
plugin = neo-tree-nvim; plugin = neo-tree-nvim;
type = "lua"; type = "lua";
config = (builtins.readFile ./files/plugins/neotree.lua); config = builtins.readFile ./files/plugins/neotree.lua;
} }
nui-nvim nui-nvim
{ {
plugin = nvim-web-devicons; plugin = nvim-web-devicons;
type = "lua"; type = "lua";
config='' config = ''
require('nvim-web-devicons').setup {} require('nvim-web-devicons').setup {}
''; '';
} }
{ {
plugin = nvim-lint; plugin = nvim-lint;
type = "lua"; type = "lua";
config = ( builtins.readFile ./files/plugins/nvim-lint.lua); config = (builtins.readFile ./files/plugins/nvim-lint.lua);
} }
{ {
plugin = nvim-sops; plugin = nvim-sops;
type = "lua"; type = "lua";
config = (builtins.readFile ./files/plugins/nvim-sops.lua); config = builtins.readFile ./files/plugins/nvim-sops.lua;
} }
plenary-nvim plenary-nvim
{ {
plugin = (nvim-treesitter.withPlugins (p: [ plugin = (
nvim-treesitter.withPlugins (p: [
p.bash p.bash
p.c p.c
p.cpp p.cpp
@ -187,23 +192,22 @@ in
]) ])
); );
type = "lua"; type = "lua";
config = ( builtins.readFile ./files/plugins/treesitter.lua); config = (builtins.readFile ./files/plugins/treesitter.lua);
} }
{ {
plugin = nvim-treesitter-context; plugin = nvim-treesitter-context;
type = "lua"; type = "lua";
config = ( builtins.readFile ./files/plugins/treesitter_context.lua); config = (builtins.readFile ./files/plugins/treesitter_context.lua);
} }
{ {
plugin = which-key-nvim; plugin = which-key-nvim;
type = "lua"; type = "lua";
config = ( builtins.readFile ./files/plugins/whichkey.lua ); config = (builtins.readFile ./files/plugins/whichkey.lua);
} }
{ {
plugin = nvim-k8s-lsp ; plugin = nvim-k8s-lsp;
type = "lua"; type = "lua";
config = ( builtins.readFile ./files/plugins/nvim-k8s-lsp.lua ); config = (builtins.readFile ./files/plugins/nvim-k8s-lsp.lua);
} }
{ {
plugin = helm-ls-nvim; plugin = helm-ls-nvim;

View file

@ -1,9 +1,11 @@
{ lib, config, ... }:
with lib;
let
cfg = config.modules.cli.starship;
in
{ {
lib,
config,
...
}:
with lib; let
cfg = config.modules.cli.starship;
in {
options.modules.cli.starship = { options.modules.cli.starship = {
enable = mkEnableOption "enable starship prompt"; enable = mkEnableOption "enable starship prompt";
}; };

View file

@ -1,10 +1,13 @@
{ lib, config, pkgs, inputs, ... }:
with lib;
let
cfg = config.modules.cli.tmux;
in
{ {
lib,
config,
pkgs,
inputs,
...
}:
with lib; let
cfg = config.modules.cli.tmux;
in {
options.modules.cli.tmux = { options.modules.cli.tmux = {
enable = mkEnableOption "enable Tmux"; enable = mkEnableOption "enable Tmux";
extraConfig = mkOption { extraConfig = mkOption {
@ -29,7 +32,8 @@ in
mouse = true; mouse = true;
prefix = "C-a"; prefix = "C-a";
terminal = "tmux-256color"; terminal = "tmux-256color";
extraConfig = '' extraConfig =
''
set -g detach-on-destroy off set -g detach-on-destroy off
set -g display-time 1500 set -g display-time 1500

View file

@ -1,14 +1,16 @@
{ lib, config, pkgs, ... }:
with lib;
let
cfg = config.modules.cli.utils;
in
{ {
lib,
config,
pkgs,
...
}:
with lib; let
cfg = config.modules.cli.utils;
in {
options.modules.cli.utils = { options.modules.cli.utils = {
enable = mkEnableOption "Install cli utils"; enable = mkEnableOption "Install cli utils";
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
programs.bat = { programs.bat = {
enable = true; enable = true;
config = { config = {
@ -21,7 +23,6 @@ in
}; };
programs.fd = { programs.fd = {
enable = true; enable = true;
}; };
programs.fzf = { programs.fzf = {
enable = true; enable = true;

View file

@ -1,9 +1,12 @@
{ lib, config, pkgs, ... }:
with lib;
let
cfg = config.modules.cli.vifm;
in
{ {
lib,
config,
pkgs,
...
}:
with lib; let
cfg = config.modules.cli.vifm;
in {
options.modules.cli.vifm = { options.modules.cli.vifm = {
enable = mkEnableOption "enable Vifm file browser"; enable = mkEnableOption "enable Vifm file browser";
}; };

View file

@ -1,9 +1,11 @@
{ lib, config, ... }:
with lib;
let
cfg = config.modules.cli.zellij;
in
{ {
lib,
config,
...
}:
with lib; let
cfg = config.modules.cli.zellij;
in {
options.modules.cli.zellij = { options.modules.cli.zellij = {
enable = mkEnableOption "enable Zellij"; enable = mkEnableOption "enable Zellij";
}; };

View file

@ -1,9 +1,12 @@
{ lib, config, pkgs, ... }:
with lib;
let
cfg = config.modules.cli.zsh;
in
{ {
lib,
config,
pkgs,
...
}:
with lib; let
cfg = config.modules.cli.zsh;
in {
options.modules.cli.zsh = { options.modules.cli.zsh = {
enable = mkEnableOption "enable Zsh configuration"; enable = mkEnableOption "enable Zsh configuration";
}; };
@ -17,7 +20,7 @@ in
ignoreAllDups = true; ignoreAllDups = true;
save = 10000; save = 10000;
share = true; share = true;
path = "${config.xdg.dataHome }/zsh/history"; path = "${config.xdg.dataHome}/zsh/history";
}; };
historySubstringSearch = { historySubstringSearch = {
enable = true; enable = true;
@ -26,7 +29,7 @@ in
}; };
syntaxHighlighting = { syntaxHighlighting = {
enable = true; enable = true;
highlighters = [ "brackets" "main" "pattern" ]; highlighters = ["brackets" "main" "pattern"];
styles = { styles = {
arithmetic-expansion = "fg=#ba8baf"; arithmetic-expansion = "fg=#ba8baf";
assign = "fg=#7cafc2"; assign = "fg=#7cafc2";
@ -106,7 +109,8 @@ in
rev = "588691ba71b47e75793ed9edfcfaa058326a6f41"; rev = "588691ba71b47e75793ed9edfcfaa058326a6f41";
hash = "sha256-X89FsG9QICDw3jZvOCB/KsPBVOLUeE7xN3VCtf0DD3E="; hash = "sha256-X89FsG9QICDw3jZvOCB/KsPBVOLUeE7xN3VCtf0DD3E=";
}; };
}]; }
];
localVariables = { localVariables = {
BASE16_THEME = "${config.xdg.configHome}/zsh/plugins/base16"; BASE16_THEME = "${config.xdg.configHome}/zsh/plugins/base16";
# Make ESC key more reactive to go to normal mode # Make ESC key more reactive to go to normal mode

View file

@ -1,5 +1,4 @@
{ ... }: {...}: {
{
imports = [ imports = [
./application/foot ./application/foot
./application/gnupg ./application/gnupg

View file

@ -1,9 +1,12 @@
{ lib, config, pkgs, ... }:
with lib;
let
cfg = config.modules.desktop.sway;
in
{ {
lib,
config,
pkgs,
...
}:
with lib; let
cfg = config.modules.desktop.sway;
in {
options.modules.desktop.sway = { options.modules.desktop.sway = {
enable = mkEnableOption "enable Sway Windows Manager"; enable = mkEnableOption "enable Sway Windows Manager";
@ -72,7 +75,6 @@ in
}; };
cpuThermal = { cpuThermal = {
thermalZone = mkOption { thermalZone = mkOption {
type = types.nullOr types.int; type = types.nullOr types.int;
default = null; default = null;
@ -117,7 +119,6 @@ in
./includes/waybar.nix ./includes/waybar.nix
]; ];
config = mkIf cfg.enable { config = mkIf cfg.enable {
programs.fuzzel.enable = true; programs.fuzzel.enable = true;
home.packages = with pkgs; [ home.packages = with pkgs; [

View file

@ -1,6 +1,9 @@
{ config, lib, ... }:
with lib;
{ {
config,
lib,
...
}:
with lib; {
config = mkIf config.modules.desktop.sway.enable { config = mkIf config.modules.desktop.sway.enable {
programs.fuzzel = { programs.fuzzel = {
settings = { settings = {

View file

@ -1,12 +1,14 @@
{ config, lib, ... }:
with lib;
{ {
config,
lib,
...
}:
with lib; {
config = mkIf config.modules.desktop.sway.enable { config = mkIf config.modules.desktop.sway.enable {
services.kanshi = { services.kanshi = {
enable = config.modules.desktop.sway.kanshi ; enable = config.modules.desktop.sway.kanshi;
settings = [ settings = [
{ {
profile.name = "standalone"; profile.name = "standalone";
profile.outputs = [ profile.outputs = [
{ {

View file

@ -1,17 +1,20 @@
{ config, pkgs, lib, ... }:
with lib;
let
cfg = config.modules.desktop.sway;
in
{ {
config,
pkgs,
lib,
...
}:
with lib; let
cfg = config.modules.desktop.sway;
in {
config = mkIf config.modules.desktop.sway.enable { config = mkIf config.modules.desktop.sway.enable {
systemd.user.services.mako = { systemd.user.services.mako = {
Service = { Service = {
ExecStart = "${pkgs.mako}/bin/mako"; ExecStart = "${pkgs.mako}/bin/mako";
}; };
Install = { Install = {
After = [ "sway-session.target" ]; After = ["sway-session.target"];
WantedBy = [ "sway-session.target" ]; WantedBy = ["sway-session.target"];
}; };
}; };
services.mako = { services.mako = {
@ -39,7 +42,7 @@ in
border-size = 1; border-size = 1;
default-timeout = 7000; default-timeout = 7000;
group-by = "app-name"; group-by = "app-name";
format= "%b"; format = "%b";
}; };
"app-name=cmus grouped" = { "app-name=cmus grouped" = {
format = "%b"; format = "%b";

View file

@ -1,9 +1,12 @@
{ config, pkgs, lib, ... }:
with lib;
let
cfg = config.modules.desktop.sway;
in
{ {
config,
pkgs,
lib,
...
}:
with lib; let
cfg = config.modules.desktop.sway;
in {
config = mkIf config.modules.desktop.sway.enable { config = mkIf config.modules.desktop.sway.enable {
wayland.windowManager.sway = { wayland.windowManager.sway = {
package = config.lib.nixGL.wrap pkgs.sway; package = config.lib.nixGL.wrap pkgs.sway;
@ -17,7 +20,7 @@ in
down = "j"; down = "j";
up = "k"; up = "k";
right = "l"; right = "l";
bars= []; bars = [];
input = { input = {
"4617:27904:MNT_Research_MNT_Reform_Keyboard_2.0_US/ST" = { "4617:27904:MNT_Research_MNT_Reform_Keyboard_2.0_US/ST" = {
xkb_layout = "us"; xkb_layout = "us";
@ -34,10 +37,15 @@ in
}; };
keybindings = let keybindings = let
mod = config.wayland.windowManager.sway.config.modifier; mod = config.wayland.windowManager.sway.config.modifier;
inherit (config.wayland.windowManager.sway.config) inherit
left down up right terminal; (config.wayland.windowManager.sway.config)
in left
{ down
up
right
terminal
;
in {
# navigate only with direction or workspace # navigate only with direction or workspace
"${mod}+${left}" = "focus left"; "${mod}+${left}" = "focus left";
"${mod}+${down}" = "focus down"; "${mod}+${down}" = "focus down";
@ -76,7 +84,10 @@ in
"${mod}+Alt+k" = "kill"; "${mod}+Alt+k" = "kill";
"${mod}+Alt+c" = "reload"; "${mod}+Alt+c" = "reload";
"${mod}+Alt+Backspace" = "exec swaynag -t warning -m 'Exit sway?' -B 'Yes' 'swaymsg exit'"; "${mod}+Alt+Backspace" = "exec swaynag -t warning -m 'Exit sway?' -B 'Yes' 'swaymsg exit'";
"${mod}+Alt+l" = if cfg.swaylock.useNullPackage then "exec swaylock" else "exec ${pkgs.swaylock}/bin/swaylock"; "${mod}+Alt+l" =
if cfg.swaylock.useNullPackage
then "exec swaylock"
else "exec ${pkgs.swaylock}/bin/swaylock";
# Manage windows placement # Manage windows placement
"${mod}+b" = "splith"; "${mod}+b" = "splith";
"${mod}+v" = "splitv"; "${mod}+v" = "splitv";
@ -105,10 +116,14 @@ in
"${mod}+shift+n" = "exec makoctl dismiss -a"; "${mod}+shift+n" = "exec makoctl dismiss -a";
"${mod}+alt+n" = "mode notification"; "${mod}+alt+n" = "mode notification";
}; };
modes = modes = let
let inherit
inherit (config.wayland.windowManager.sway.config) (config.wayland.windowManager.sway.config)
left down up right; left
down
up
right
;
in { in {
"resize" = { "resize" = {
"${left}" = "resize shrink width 10 px or 10 ppt"; "${left}" = "resize shrink width 10 px or 10 ppt";
@ -142,7 +157,6 @@ in
"Return" = "mode default"; "Return" = "mode default";
"Escape" = "mode default"; "Escape" = "mode default";
}; };
}; };
colors = { colors = {
focused = { focused = {
@ -171,7 +185,7 @@ in
background = "#900000"; background = "#900000";
text = "#cccccc"; text = "#cccccc";
indicator = "#900000"; indicator = "#900000";
childBorder = "#900000" ; childBorder = "#900000";
}; };
#focused_tab_title = { #focused_tab_title = {
# boder = "#2f343a"; # boder = "#2f343a";
@ -200,7 +214,8 @@ in
criteria = { criteria = {
title = "^Open .*$"; title = "^Open .*$";
}; };
}]; }
];
}; };
floating = { floating = {
border = 2; border = 2;

View file

@ -1,31 +1,43 @@
{ config, lib, pkgs, ... }: {
with lib; config,
let lib,
pkgs,
...
}:
with lib; let
cfg = config.modules.desktop.sway; cfg = config.modules.desktop.sway;
in in {
{
config = mkIf config.modules.desktop.sway.enable { config = mkIf config.modules.desktop.sway.enable {
services.swayidle = { services.swayidle = {
enable = true; enable = true;
timeouts = [ timeouts = [
{ {
timeout = 300; timeout = 300;
command = if cfg.swaylock.useNullPackage then ''/usr/bin/swaylock -f'' else ''${pkgs.swaylock}/bin/swaylock -f''; command =
if cfg.swaylock.useNullPackage
then ''/usr/bin/swaylock -f''
else ''${pkgs.swaylock}/bin/swaylock -f'';
} }
{ {
timeout = 600; timeout = 600;
command = ''${pkgs.sway}/bin/swaymsg "output * power off"''; command = ''${pkgs.sway}/bin/swaymsg "output * power off"'';
resumeCommand =''${pkgs.sway}/bin/swaymsg "output * power on"''; resumeCommand = ''${pkgs.sway}/bin/swaymsg "output * power on"'';
} }
]; ];
events = [ events = [
{ {
event = "before-sleep"; event = "before-sleep";
command = if cfg.swaylock.useNullPackage then ''/usr/bin/swaylock -f'' else ''${pkgs.swaylock}/bin/swaylock -f''; command =
if cfg.swaylock.useNullPackage
then ''/usr/bin/swaylock -f''
else ''${pkgs.swaylock}/bin/swaylock -f'';
} }
{ {
event = "lock"; event = "lock";
command = if cfg.swaylock.useNullPackage then ''usr/bin/swaylock -f'' else ''${pkgs.swaylock}/bin/swaylock -f''; command =
if cfg.swaylock.useNullPackage
then ''usr/bin/swaylock -f''
else ''${pkgs.swaylock}/bin/swaylock -f'';
} }
]; ];
}; };

View file

@ -1,15 +1,24 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.modules.desktop.sway;
in
{ {
config,
lib,
pkgs,
...
}:
with lib; let
cfg = config.modules.desktop.sway;
in {
config = mkIf config.modules.desktop.sway.enable { config = mkIf config.modules.desktop.sway.enable {
programs.swaylock = { programs.swaylock = {
package = if cfg.swaylock.useNullPackage then null else pkgs.swaylock; package =
if cfg.swaylock.useNullPackage
then null
else pkgs.swaylock;
enable = true; enable = true;
settings = { settings = {
image = if cfg.wallpapers.lockscreen != "" then "${cfg.wallpapers.lockscreen}" else false; image =
if cfg.wallpapers.lockscreen != ""
then "${cfg.wallpapers.lockscreen}"
else false;
scaling = "center"; scaling = "center";
color = "000000"; color = "000000";
indicator-radius = 70; indicator-radius = 70;

View file

@ -1,9 +1,12 @@
{lib, config, pkgs, ...}:
with lib;
let
cfg = config.modules.desktop.sway;
in
{ {
lib,
config,
pkgs,
...
}:
with lib; let
cfg = config.modules.desktop.sway;
in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
programs.waybar = { programs.waybar = {
enable = true; enable = true;
@ -23,33 +26,37 @@ in
"sway/workspaces" "sway/workspaces"
"sway/mode" "sway/mode"
]; ];
modules-right = [ modules-right =
[
"network" "network"
"custom/sep" "custom/sep"
] ++ ( ]
if cfg.waybar.laptop then [ ++ (
if cfg.waybar.laptop
then [
"backlight" "backlight"
"battery" "battery"
"custom/sep" "custom/sep"
] ]
else [ else [
] ]
) ++ )
[ ++ [
"memory" "memory"
"cpu" "cpu"
"temperature" "temperature"
"custom/sep" "custom/sep"
] ++ ( ]
if cfg.waybar.gpuThermal.enable then [ ++ (
if cfg.waybar.gpuThermal.enable
then [
"temperature#gpu" "temperature#gpu"
"custom/sep" "custom/sep"
] ]
else [ else [
] ]
) ++ )
[ ++ [
"pulseaudio#input" "pulseaudio#input"
"pulseaudio#output" "pulseaudio#output"
"custom/sep" "custom/sep"
@ -65,7 +72,7 @@ in
}; };
"cpu" = { "cpu" = {
"format" = "{usage}% {icon}"; "format" = "{usage}% {icon}";
"format-icons" = [ "" ]; "format-icons" = [""];
"states" = { "states" = {
"critical" = 90; "critical" = 90;
"warning" = 70; "warning" = 70;
@ -107,11 +114,11 @@ in
"format-wifi" = "{signalStrength}% "; "format-wifi" = "{signalStrength}% ";
"tooltip" = false; "tooltip" = false;
}; };
"privacy"= { "privacy" = {
"icon-spacing" = 6; "icon-spacing" = 6;
"icon-size" = 11; "icon-size" = 11;
"transition-duration" = 250; "transition-duration" = 250;
"modules"= [ "modules" = [
{ {
"type" = "screenshare"; "type" = "screenshare";
"tooltip" = false; "tooltip" = false;
@ -157,11 +164,14 @@ in
"temperature" = { "temperature" = {
"critical-threshold" = 80; "critical-threshold" = 80;
"format" = " {temperatureC}°C "; "format" = " {temperatureC}°C ";
"thermal-zone" = mkIf ( cfg.waybar.cpuThermal.thermalZone != null ) "thermal-zone" =
mkIf (cfg.waybar.cpuThermal.thermalZone != null)
cfg.waybar.cpuThermal.thermalZone; cfg.waybar.cpuThermal.thermalZone;
"hwmon-path-abs" = mkIf ( cfg.waybar.cpuThermal.hwmonPathAbs != "" ) "hwmon-path-abs" =
mkIf (cfg.waybar.cpuThermal.hwmonPathAbs != "")
"${cfg.waybar.cpuThermal.hwmonPathAbs}"; "${cfg.waybar.cpuThermal.hwmonPathAbs}";
"input-filename" = mkIf ( cfg.waybar.cpuThermal.inputFilename != "" ) "input-filename" =
mkIf (cfg.waybar.cpuThermal.inputFilename != "")
"${cfg.waybar.cpuThermal.inputFilename}"; "${cfg.waybar.cpuThermal.inputFilename}";
}; };
"temperature#gpu" = { "temperature#gpu" = {

View file

@ -1,15 +1,18 @@
{ lib, config, pkgs, ... }:
with lib;
let
cfg = config.modules.gaming.lutris;
in
{ {
lib,
config,
pkgs,
...
}:
with lib; let
cfg = config.modules.gaming.lutris;
in {
options.modules.gaming.lutris = { options.modules.gaming.lutris = {
enable = mkEnableOption "enable Lutris Gaming preservation platform"; enable = mkEnableOption "enable Lutris Gaming preservation platform";
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
home.packages = with pkgs; [ home.packages = with pkgs; [
( lutris.override { (lutris.override {
extraLibraries = pkgs: [ extraLibraries = pkgs: [
wine wine
xorg.libXcursor xorg.libXcursor

View file

@ -1,9 +1,12 @@
{ pkgs, lib, config, ... }:
with lib;
let
cfg = config.modules.video.kdenlive;
in
{ {
pkgs,
lib,
config,
...
}:
with lib; let
cfg = config.modules.video.kdenlive;
in {
options.modules.video.kdenlive = { options.modules.video.kdenlive = {
enable = mkEnableOption "enable Kdenlive video editor"; enable = mkEnableOption "enable Kdenlive video editor";
}; };

View file

@ -1,9 +1,11 @@
{ lib, config, ... }:
with lib;
let
cfg = config.modules.video.mpv;
in
{ {
lib,
config,
...
}:
with lib; let
cfg = config.modules.video.mpv;
in {
options.modules.video.mpv = { options.modules.video.mpv = {
enable = mkEnableOption "enable MPV video player"; enable = mkEnableOption "enable MPV video player";
}; };

View file

@ -1,7 +1,7 @@
{ {
# DNS over HTTP (DoH), aka. Trusted Recursive Resolver (TRR) # DNS over HTTP (DoH), aka. Trusted Recursive Resolver (TRR)
# (https://wiki.mozilla.org/Trusted_Recursive_Resolver), uses a server run by # (https://wiki.mozilla.org/Trusted_Recursive_Resolver), uses a server run by
# Cloudflare to resolve hostnames, even when the system uses another (normal) DNS # Cloudflare to resolve hostnames, even when the system uses another (normal) DNS
# server. This setting disables it and sets the mode to explicit opt-out (5). # server. This setting disables it and sets the mode to explicit opt-out (5).
"network.trr.mode" = 5; "network.trr.mode" = 5;
} }

View file

@ -1,12 +1,12 @@
{ {
# Disables playback of DRM-controlled HTML5 content # Disables playback of DRM-controlled HTML5 content
# if enabled, automatically downloads the Widevine Content Decryption Module # if enabled, automatically downloads the Widevine Content Decryption Module
# provided by Google Inc. Details # provided by Google Inc. Details
# (https://support.mozilla.org/en-US/kb/enable-drm#w_opt-out-of-cdm-playback-uninstall-cdms-and-stop-all-cdm-downloads) # (https://support.mozilla.org/en-US/kb/enable-drm#w_opt-out-of-cdm-playback-uninstall-cdms-and-stop-all-cdm-downloads)
"media.eme.enabled" = false; "media.eme.enabled" = false;
# Disables the Widevine Content Decryption Module provided by Google Inc. # Disables the Widevine Content Decryption Module provided by Google Inc.
# Used for the playback of DRM-controlled HTML5 content Details # Used for the playback of DRM-controlled HTML5 content Details
# (https://support.mozilla.org/en-US/kb/enable-drm#w_disable-the-google-widevine-cdm-without-uninstalling) # (https://support.mozilla.org/en-US/kb/enable-drm#w_disable-the-google-widevine-cdm-without-uninstalling)
"media.gmp-widevinecdm.enabled" = false; "media.gmp-widevinecdm.enabled" = false;
} }

View file

@ -1,18 +1,17 @@
{ {
# Disable shield studies
# Disable shield studies # Mozilla shield studies (https://wiki.mozilla.org/Firefox/Shield) is a feature
# Mozilla shield studies (https://wiki.mozilla.org/Firefox/Shield) is a feature # which allows mozilla to remotely install experimental addons.
# which allows mozilla to remotely install experimental addons.
"app.normandy.enabled" = false; "app.normandy.enabled" = false;
"app.normandy.api_url" = ""; "app.normandy.api_url" = "";
"app.shield.optoutstudies.enabled" = false; "app.shield.optoutstudies.enabled" = false;
"extensions.shield-recipe-client.enabled" = false; "extensions.shield-recipe-client.enabled" = false;
"extensions.shield-recipe-client.api_url" = ""; "extensions.shield-recipe-client.api_url" = "";
# Disable experiments # Disable experiments
# Telemetry Experiments (https://wiki.mozilla.org/Telemetry/Experiments) is a # Telemetry Experiments (https://wiki.mozilla.org/Telemetry/Experiments) is a
# feature that allows Firefox to automatically download and run specially-designed # feature that allows Firefox to automatically download and run specially-designed
# restartless addons based on certain conditions. # restartless addons based on certain conditions.
"experiments.enabled" = false; "experiments.enabled" = false;
"experiments.manifest.uri" = ""; "experiments.manifest.uri" = "";
"experiments.supported" = false; "experiments.supported" = false;

View file

@ -1,24 +1,24 @@
{ {
# Firefox sends data about installed addons as metadata updates # Firefox sends data about installed addons as metadata updates
# (https://blog.mozilla.org/addons/how-to-opt-out-of-add-on-metadata-updates/), so # (https://blog.mozilla.org/addons/how-to-opt-out-of-add-on-metadata-updates/), so
# Mozilla is able to recommend you other addons. # Mozilla is able to recommend you other addons.
"extensions.getAddons.cache.enabled" = false; "extensions.getAddons.cache.enabled" = false;
# Disable about:addons' Get Add-ons panel # Disable about:addons' Get Add-ons panel
# The start page with recommended addons uses google analytics. # The start page with recommended addons uses google analytics.
"extensions.getAddons.showPane" = false; "extensions.getAddons.showPane" = false;
"extensions.webservice.discoverURL" = ""; "extensions.webservice.discoverURL" = "";
# disable pocket extension # disable pocket extension
"extensions.pocket.enabled" = false; "extensions.pocket.enabled" = false;
# disable extensions recommendations # disable extensions recommendations
"extensions.htmlaboutaddons.recommendations.enabled" = false; "extensions.htmlaboutaddons.recommendations.enabled" = false;
# Automatically activate extensions # Automatically activate extensions
"extensions.autoDisableScopes" = 0; "extensions.autoDisableScopes" = 0;
# Deacticate extensions auto-update # Deacticate extensions auto-update
"extensions.update.enabled" = false; "extensions.update.enabled" = false;
"extensions.update.autoUpdateDefault" = false; "extensions.update.autoUpdateDefault" = false;
} }

View file

@ -1,53 +1,50 @@
{ {
"browser.sessionstore.enabled" = true; "browser.sessionstore.enabled" = true;
"browser.sessionstore.restore_hidden_tabs" = true; "browser.sessionstore.restore_hidden_tabs" = true;
"browser.sessionstore.restore_pinned_tabs_on_demand" = true; "browser.sessionstore.restore_pinned_tabs_on_demand" = true;
"browser.sessionstore.resume_after_os_start" = true; "browser.sessionstore.resume_after_os_start" = true;
# use blank page for new tabs # use blank page for new tabs
"browser.newtabpage.enabled" = false; "browser.newtabpage.enabled" = false;
# Disable preloading of the new tab page. # Disable preloading of the new tab page.
# By default Firefox preloads the new tab page (with website thumbnails) in the # By default Firefox preloads the new tab page (with website thumbnails) in the
# background before it is even opened. # background before it is even opened.
"browser.newtab.preload" = false; "browser.newtab.preload" = false;
# Disable check for captive portal.
# Disable check for captive portal. # By default, Firefox checks for the presence of a captive portal on every
# By default, Firefox checks for the presence of a captive portal on every # startup. This involves traffic to Akamai
# startup. This involves traffic to Akamai # (https://support.mozilla.org/questions/1169302).
# (https://support.mozilla.org/questions/1169302).
"network.captive-portal-service.enabled" = false; "network.captive-portal-service.enabled" = false;
# Disable Javascript in PDF viewer
# Disable Javascript in PDF viewer # Disables executing of JavaScript in the PDF form viewer. It is possible that
# Disables executing of JavaScript in the PDF form viewer. It is possible that # some PDFs are not rendered correctly due to missing functions.
# some PDFs are not rendered correctly due to missing functions.
"pdfjs.enableScripting" = true; "pdfjs.enableScripting" = true;
# Allow fullscreen in Firefox windows # Allow fullscreen in Firefox windows
"full-screen-api.ignore-widgets" = true; "full-screen-api.ignore-widgets" = true;
# About:config show warning # About:config show warning
"browser.aboutConfig.showWarning" = false; "browser.aboutConfig.showWarning" = false;
# avoid some useless recommendations # avoid some useless recommendations
"extensions.htmlaboutaddons.recommendations.enabled" = false; "extensions.htmlaboutaddons.recommendations.enabled" = false;
"extensions.recommendations.themeRecommendationUrl" = ""; "extensions.recommendations.themeRecommendationUrl" = "";
# Do not send FF build ID for site in startup page # Do not send FF build ID for site in startup page
"browser.startup.homepage_override.mstone" = "ignore"; "browser.startup.homepage_override.mstone" = "ignore";
"browser.aboutHomeSnippets.updateUrl" = ""; "browser.aboutHomeSnippets.updateUrl" = "";
# Restore session when restart # Restore session when restart
"browser.sessionstore.resume_session_once" = true; "browser.sessionstore.resume_session_once" = true;
# Disable translation # Disable translation
"browser.translations.enabled" = false; "browser.translations.enabled" = false;
# disable AI shit # disable AI shit
"browser.ml.chat.enabled" = false; "browser.ml.chat.enabled" = false;
"browser.ml.chat.shortcuts" = false; "browser.ml.chat.shortcuts" = false;
"browser.ml.chat.sidebar" = false; "browser.ml.chat.sidebar" = false;

View file

@ -1,108 +1,107 @@
{ {
# Disable access to device sensor data # Disable access to device sensor data
# Disallow websites to access sensor data (ambient light, motion, device # Disallow websites to access sensor data (ambient light, motion, device
# orientation and proximity data). # orientation and proximity data).
"device.sensors.ambientLight.enabled" = false; "device.sensors.ambientLight.enabled" = false;
"device.sensors.enabled" = false; "device.sensors.enabled" = false;
"device.sensors.motion.enabled" = false; "device.sensors.motion.enabled" = false;
"device.sensors.orientation.enabled" = false; "device.sensors.orientation.enabled" = false;
"device.sensors.proximity.enabled" = false; "device.sensors.proximity.enabled" = false;
# Using a popular useragent string # Using a popular useragent string
# (https://techblog.willshouse.com/2012/01/03/most-common-user-agents/) avoids # (https://techblog.willshouse.com/2012/01/03/most-common-user-agents/) avoids
# attracting attention i.e. with an Iceweasel UA. (keep blank to use the default) # attracting attention i.e. with an Iceweasel UA. (keep blank to use the default)
# Block Cookies # Block Cookies
# Block 3rd-Party cookies or even all cookies. # Block 3rd-Party cookies or even all cookies.
"network.cookie.cookieBehavior" = 5; "network.cookie.cookieBehavior" = 5;
# Block Referer # Block Referer
# Firefox tells a website, from which site you're coming (the so called RefControl # Firefox tells a website, from which site you're coming (the so called RefControl
# (http://kb.mozillazine.org/Network.http.sendRefererHeader">referer</a>). You can # (http://kb.mozillazine.org/Network.http.sendRefererHeader">referer</a>). You can
# find more detailed settings in this <a # find more detailed settings in this <a
# href="http://www.ghacks.net/2015/01/22/improve-online-privacy-by-controlling-referrer-information/">ghacks # href="http://www.ghacks.net/2015/01/22/improve-online-privacy-by-controlling-referrer-information/">ghacks
# article</a> or install the <a # article</a> or install the <a
# href="https://addons.mozilla.org/firefox/addon/refcontrol/) extension for per # href="https://addons.mozilla.org/firefox/addon/refcontrol/) extension for per
# domain settings. # domain settings.
"network.http.referer.spoofSource" = true; "network.http.referer.spoofSource" = true;
# Disable DOM storage # Disable DOM storage
# Disables DOM storage, which enables so called "supercookies". Some modern sites # Disables DOM storage, which enables so called "supercookies". Some modern sites
# will not work (i.e. missing "save" functions). # will not work (i.e. missing "save" functions).
"dom.storage.enabled" = true; "dom.storage.enabled" = true;
# Disable IndexedDB (breaks things) # Disable IndexedDB (breaks things)
# abused for tracking (http://www.w3.org/TR/IndexedDB/">IndexedDB</a> is a way, # abused for tracking (http://www.w3.org/TR/IndexedDB/">IndexedDB</a> is a way,
# websites can store structured data. This can be <a # websites can store structured data. This can be <a
# href="http://arstechnica.com/apple/2010/09/rldguid-tracking-cookies-in-safari-database-form/), # href="http://arstechnica.com/apple/2010/09/rldguid-tracking-cookies-in-safari-database-form/),
# too. Disabling causes problems when sites depend on it like Tweetdeck or Reddit # too. Disabling causes problems when sites depend on it like Tweetdeck or Reddit
# and extensions that use it to store their data. Some users reported crashing # and extensions that use it to store their data. Some users reported crashing
# tabs when IndexedDB is disabled. Only disable it, when you know what you're # tabs when IndexedDB is disabled. Only disable it, when you know what you're
# doing. # doing.
"dom.indexedDB.enabled" = true; "dom.indexedDB.enabled" = true;
# Disable the Offline Cache. # Disable the Offline Cache.
# Websites can store up to 500 MB of data in an offline cache # Websites can store up to 500 MB of data in an offline cache
# (http://kb.mozillazine.org/Browser.cache.offline.enable), to be able to run even # (http://kb.mozillazine.org/Browser.cache.offline.enable), to be able to run even
# when there is no working internet connection. This could possibly be used to # when there is no working internet connection. This could possibly be used to
# store an user id. # store an user id.
"browser.cache.offline.enable" = false; "browser.cache.offline.enable" = false;
# Sessionstore Privacy # Sessionstore Privacy
# This preference controls when to store extra information about a session: # This preference controls when to store extra information about a session:
# contents of forms, scrollbar positions, cookies, and POST data. # contents of forms, scrollbar positions, cookies, and POST data.
"browser.sessionstore.privacy_level" = 2; "browser.sessionstore.privacy_level" = 2;
# Disable Link Prefetching # Disable Link Prefetching
# Firefox prefetches the next site on some links, so the site is loaded even when # Firefox prefetches the next site on some links, so the site is loaded even when
# you never click. # you never click.
"network.prefetch-next" = false; "network.prefetch-next" = false;
"network.dns.disablePrefetch" = true; "network.dns.disablePrefetch" = true;
"network.dns.disablePrefetchFromHTTPS" = true; "network.dns.disablePrefetchFromHTTPS" = true;
"network.predictor.enabled" = false; "network.predictor.enabled" = false;
"network.predictor.enable-prefetch" = false; "network.predictor.enable-prefetch" = false;
# Disable speculative website loading. # Disable speculative website loading.
# In some situations Firefox already starts loading web pages when the mouse # In some situations Firefox already starts loading web pages when the mouse
# pointer is over a link, i. e. before you actually click. This is to speed up the # pointer is over a link, i. e. before you actually click. This is to speed up the
# loading of web pages by a few milliseconds. # loading of web pages by a few milliseconds.
"network.http.speculative-parallel-limit" = 0; "network.http.speculative-parallel-limit" = 0;
"browser.urlbar.speculativeConnect.enabled" = false; "browser.urlbar.speculativeConnect.enabled" = false;
# Use a private container for new tab page thumbnails # Use a private container for new tab page thumbnails
# Load the pages displayed on the new tab page in a private container when # Load the pages displayed on the new tab page in a private container when
# creating thumbnails. # creating thumbnails.
"privacy.usercontext.about_newtab_segregation.enabled" = true; "privacy.usercontext.about_newtab_segregation.enabled" = true;
# Disable WebGL # Disable WebGL
# Disables the WebGL function, to prevent (ab)use the full power of the graphics # Disables the WebGL function, to prevent (ab)use the full power of the graphics
# card (http://www.uniquemachine.org/">fingerprinting with WebGL</a>. Another # card (http://www.uniquemachine.org/">fingerprinting with WebGL</a>. Another
# issue is, that websites can <a # issue is, that websites can <a
# href="https://isc.sans.edu/forums/diary/Time+to+disable+WebGL/10867). WebGL is # href="https://isc.sans.edu/forums/diary/Time+to+disable+WebGL/10867). WebGL is
# part of some fingerprinting scripts used in the wild. Some interactive websites # part of some fingerprinting scripts used in the wild. Some interactive websites
# will not work, which are mostly games. # will not work, which are mostly games.
"webgl.disabled" = false; "webgl.disabled" = false;
# Override graphics card vendor and model strings in the WebGL API # Override graphics card vendor and model strings in the WebGL API
# Websites can read the graphics card vendor and model using a WebGL API. This # Websites can read the graphics card vendor and model using a WebGL API. This
# setting overrides both with " " without disabling WebGL. # setting overrides both with " " without disabling WebGL.
"webgl.renderer-string-override" = " "; "webgl.renderer-string-override" = " ";
"webgl.vendor-string-override" = " "; "webgl.vendor-string-override" = " ";
# Disable WebRTC # Disable WebRTC
# Disables the WebRTC function, which gives away your local ips. Some addons like # Disables the WebRTC function, which gives away your local ips. Some addons like
# uBlock origin provide settings to prevent WebRTC from exposing local ips without # uBlock origin provide settings to prevent WebRTC from exposing local ips without
# disabling WebRTC. # disabling WebRTC.
"media.peerconnection.enabled" = true; "media.peerconnection.enabled" = true;
# Disable the clipboardevents. # Disable the clipboardevents.
# Disable that websites can get notifications if you copy, paste, or cut something # Disable that websites can get notifications if you copy, paste, or cut something
# from a web page, and it lets them know which part of the page had been selected. # from a web page, and it lets them know which part of the page had been selected.
"dom.event.clipboardevents.enabled" = false; "dom.event.clipboardevents.enabled" = false;
# Disable Fixup URLs # Disable Fixup URLs
# When you type "something" in the urlbar and press enter, Firefox tries # When you type "something" in the urlbar and press enter, Firefox tries
# "something.com", if Fixup URLs is enabled. # "something.com", if Fixup URLs is enabled.
"browser.fixup.alternate.enabled" = false; "browser.fixup.alternate.enabled" = false;
} }

View file

@ -1,8 +1,8 @@
{ {
# Disable google safebrowsing # Disable google safebrowsing
# Google safebrowsing can detect phishing and malware but it also sends # Google safebrowsing can detect phishing and malware but it also sends
# informations to google together with an unique id called wrkey # information to google together with an unique id called wrkey
# (http://electroholiker.de/?p=1594). # (http://electroholiker.de/?p=1594).
"browser.safebrowsing.enabled" = false; "browser.safebrowsing.enabled" = false;
"browser.safebrowsing.downloads.remote.url" = ""; "browser.safebrowsing.downloads.remote.url" = "";
"browser.safebrowsing.phishing.enabled" = false; "browser.safebrowsing.phishing.enabled" = false;

View file

@ -1,11 +1,10 @@
{ {
# Disable Firefox Suggest
# Disable Firefox Suggest # The Firefox Suggest
# The Firefox Suggest # (https://support.mozilla.org/en-US/kb/navigate-web-faster-firefox-suggest)
# (https://support.mozilla.org/en-US/kb/navigate-web-faster-firefox-suggest) # feature allows Mozilla to provide search suggestions in the US, which uses your
# feature allows Mozilla to provide search suggestions in the US, which uses your # city location and search keywords to send suggestions. This is also used to
# city location and search keywords to send suggestions. This is also used to # serve advertisements.
# serve advertisements.
"browser.urlbar.groupLabels.enabled" = false; "browser.urlbar.groupLabels.enabled" = false;
"browser.urlbar.quicksuggest.enabled" = false; "browser.urlbar.quicksuggest.enabled" = false;
"browser.urlbar.suggest.addons" = false; "browser.urlbar.suggest.addons" = false;
@ -17,9 +16,9 @@
"browser.urlbar.suggest.searches" = false; "browser.urlbar.suggest.searches" = false;
"browser.urlbar.suggest.topsites" = false; "browser.urlbar.suggest.topsites" = false;
# Enable Search Keyword # Enable Search Keyword
# When you mistype some url, Firefox starts a search even from urlbar. This # When you mistype some url, Firefox starts a search even from urlbar. This
# feature is useful for quick searching, but may harm your privacy, when it's # feature is useful for quick searching, but may harm your privacy, when it's
# unintended. # unintended.
"keyword.enabled" = true; "keyword.enabled" = true;
} }

View file

@ -1,9 +1,8 @@
{ {
# Disable Telemetry
# Disable Telemetry # The telemetry feature
# The telemetry feature # (https://support.mozilla.org/kb/share-telemetry-data-mozilla-help-improve-firefox)
# (https://support.mozilla.org/kb/share-telemetry-data-mozilla-help-improve-firefox) # sends data about the performance and responsiveness of Firefox to Mozilla.
# sends data about the performance and responsiveness of Firefox to Mozilla.
"toolkit.telemetry.enabled" = false; "toolkit.telemetry.enabled" = false;
"toolkit.telemetry.archive.enabled" = false; "toolkit.telemetry.archive.enabled" = false;
"toolkit.telemetry.rejected" = true; "toolkit.telemetry.rejected" = true;
@ -20,20 +19,19 @@
"toolkit.telemetry.hybridContent.enabled" = false; "toolkit.telemetry.hybridContent.enabled" = false;
"toolkit.telemetry.reportingpolicy.firstRun" = false; "toolkit.telemetry.reportingpolicy.firstRun" = false;
# Disable health report # Disable health report
# Disable sending Firefox health reports # Disable sending Firefox health reports
# (https://www.mozilla.org/privacy/firefox/#health-report) to Mozilla # (https://www.mozilla.org/privacy/firefox/#health-report) to Mozilla
"datareporting.healthreport.uploadEnabled" = false; "datareporting.healthreport.uploadEnabled" = false;
"datareporting.policy.dataSubmissionEnabled" = false; "datareporting.policy.dataSubmissionEnabled" = false;
"datareporting.healthreport.service.enabled" = false; "datareporting.healthreport.service.enabled" = false;
# Disable Crash Reports # Disable Crash Reports
# The crash report (https://www.mozilla.org/privacy/firefox/#crash-reporter) may # The crash report (https://www.mozilla.org/privacy/firefox/#crash-reporter) may
# contain data that identifies you or is otherwise sensitive to you. # contain data that identifies you or is otherwise sensitive to you.
"breakpad.reportURL" = ""; "breakpad.reportURL" = "";
"browser.tabs.crashReporting.sendReport" = false; "browser.tabs.crashReporting.sendReport" = false;
"browser.crashReports.unsubmittedCheck.enabled" = false; "browser.crashReports.unsubmittedCheck.enabled" = false;
"browser.crashReports.unsubmittedCheck.autoSubmit" = false; "browser.crashReports.unsubmittedCheck.autoSubmit" = false;
"browser.crashReports.unsubmittedCheck.autoSubmit2" = false; "browser.crashReports.unsubmittedCheck.autoSubmit2" = false;
} }

View file

@ -2,7 +2,7 @@
"extensions.activeThemeID" = "firefox-compact-dark@mozilla.org"; "extensions.activeThemeID" = "firefox-compact-dark@mozilla.org";
"browser.uidensity" = 1; "browser.uidensity" = 1;
# New tab behaviour # New tab behaviour
"browser.newtabpage.activity-stream.showSearch" = false; "browser.newtabpage.activity-stream.showSearch" = false;
"browser.newtabpage.activity-stream.feeds.topsites" = false; "browser.newtabpage.activity-stream.feeds.topsites" = false;
"browser.newtabpage.activity-stream.feeds.section.highlights" = false; "browser.newtabpage.activity-stream.feeds.section.highlights" = false;
@ -11,30 +11,30 @@
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false; "browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
"browser.newtabpage.activity-stream.showSponsored" = false; "browser.newtabpage.activity-stream.showSponsored" = false;
# Mozilla messages and recommendations # Mozilla messages and recommendations
"browser.messaging-system.whatsNewPanel.enabled" = false; "browser.messaging-system.whatsNewPanel.enabled" = false;
"browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons" = false; "browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons" = false;
"browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features" = false; "browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features" = false;
"browser.aboutwelcome.enabled" = false; "browser.aboutwelcome.enabled" = false;
"browser.preferences.moreFromMozilla" = false; "browser.preferences.moreFromMozilla" = false;
# Do not save my logins # Do not save my logins
"signon.rememberSignons" = false; "signon.rememberSignons" = false;
# do not override status page # do not override status page
"startup.homepage_override_url" = ""; "startup.homepage_override_url" = "";
"startup.homepage_welcome_url" = ""; "startup.homepage_welcome_url" = "";
# do not show bookmark page # do not show bookmark page
"browser.toolbars.bookmarks.visibility" = "never"; "browser.toolbars.bookmarks.visibility" = "never";
# disable fucking included malwares # disable fucking included malwares
"browser.newtabpage.activity-stream.improvesearch.topSiteSearchShortcuts.havePinned" = ""; "browser.newtabpage.activity-stream.improvesearch.topSiteSearchShortcuts.havePinned" = "";
"browser.newtabpage.activity-stream.improvesearch.topSiteSearchShortcuts.searchEngines" = ""; "browser.newtabpage.activity-stream.improvesearch.topSiteSearchShortcuts.searchEngines" = "";
"browser.newtabpage.activity-stream.improvesearch.topSiteSearchShortcuts" = false; "browser.newtabpage.activity-stream.improvesearch.topSiteSearchShortcuts" = false;
"browser.newtabpage.pinned" = ""; "browser.newtabpage.pinned" = "";
# Theme customization # Theme customization
"browser.uiCustomization.state" = builtins.toJSON { "browser.uiCustomization.state" = builtins.toJSON {
currentVersion = 20; currentVersion = 20;
newElementCount = 4; newElementCount = 4;

View file

@ -1,6 +1,5 @@
{ {
# Enable Do-not-Track
# Enable Do-not-Track
# With the do not track feature, you tell websites, that you do not want to be # With the do not track feature, you tell websites, that you do not want to be
# tracked. Most websites ignore this, so you need other privacy options as well. # tracked. Most websites ignore this, so you need other privacy options as well.
"privacy.donottrackheader.enabled" = true; "privacy.donottrackheader.enabled" = true;

View file

@ -1,10 +1,13 @@
{ lib, config, pkgs, ... }:
with lib;
let
merge = foldr (a: b: a // b) { };
cfg = config.modules.web.firefox;
in
{ {
lib,
config,
pkgs,
...
}:
with lib; let
merge = foldr (a: b: a // b) {};
cfg = config.modules.web.firefox;
in {
options.modules.web.firefox = { options.modules.web.firefox = {
enable = mkEnableOption "enable Firefox web browser"; enable = mkEnableOption "enable Firefox web browser";
@ -28,7 +31,6 @@ in
default = []; default = [];
description = "Optional Firefox Plugins to install"; description = "Optional Firefox Plugins to install";
}; };
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
programs.browserpass = { programs.browserpass = {
@ -70,7 +72,7 @@ in
allExtensions = cfg.baseExtensions ++ cfg.optionalExtensions; allExtensions = cfg.baseExtensions ++ cfg.optionalExtensions;
in { in {
enable = true; enable = true;
package = config.lib.nixGL.wrap ( pkgs.wrapFirefox pkgs.firefox-unwrapped { package = config.lib.nixGL.wrap (pkgs.wrapFirefox pkgs.firefox-unwrapped {
nativeMessagingHosts = [ nativeMessagingHosts = [
# Tridactyl native connector # Tridactyl native connector
pkgs.tridactyl-native pkgs.tridactyl-native
@ -87,22 +89,30 @@ in
default = "ddg"; default = "ddg";
engines = { engines = {
"Nix Packages" = { "Nix Packages" = {
urls = [{ urls = [
{
template = "https://search.nixos.org/packages"; template = "https://search.nixos.org/packages";
params = [ params = [
{ name = "type"; value = "packages"; } {
{ name = "query"; value = "{searchTerms}"; } name = "type";
value = "packages";
}
{
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 = [{ template = "https://nixos.wiki/index.php?search={searchTerms}"; }]; urls = [{template = "https://nixos.wiki/index.php?search={searchTerms}";}];
icon = "https://nixos.wiki/favicon.png"; icon = "https://nixos.wiki/favicon.png";
updateInterval = 24 * 60 * 60 * 1000; # every day updateInterval = 24 * 60 * 60 * 1000; # every day
definedAliases = [ "@nw" ]; definedAliases = ["@nw"];
}; };
"bing".metaData.hidden = true; "bing".metaData.hidden = true;

View file

@ -1,9 +1,12 @@
{ lib, config, pkgs, ... }:
with lib;
let
cfg = config.modules.web.qutebrowser;
in
{ {
lib,
config,
pkgs,
...
}:
with lib; let
cfg = config.modules.web.qutebrowser;
in {
options.modules.web.qutebrowser = { options.modules.web.qutebrowser = {
enable = mkEnableOption "enable Qutebrowser web browser"; enable = mkEnableOption "enable Qutebrowser web browser";
}; };
@ -53,7 +56,7 @@ in
"history" "history"
]; ];
}; };
extraConfig = ( builtins.readFile ./files/theme.py); extraConfig = (builtins.readFile ./files/theme.py);
keyBindings = { keyBindings = {
normal = { normal = {
",M" = "hint links spawn mpv {hint-url}"; ",M" = "hint links spawn mpv {hint-url}";

View file

@ -1,9 +1,12 @@
{ lib, config, pkgs, ... }:
with lib;
let
cfg = config.modules.web.webcord;
in
{ {
lib,
config,
pkgs,
...
}:
with lib; let
cfg = config.modules.web.webcord;
in {
options.modules.web.webcord = { options.modules.web.webcord = {
enable = mkEnableOption "enable Lutris Gaming preservation platform"; enable = mkEnableOption "enable Lutris Gaming preservation platform";
}; };
@ -19,7 +22,7 @@ in
exec = "webcord --ozone-platform=wayland"; exec = "webcord --ozone-platform=wayland";
icon = "webcord"; icon = "webcord";
terminal = false; terminal = false;
categories = [ "Application" "Network" "WebBrowser" ]; categories = ["Application" "Network" "WebBrowser"];
}; };
}; };
}; };

View file

@ -1,5 +1,4 @@
_: _: {
{
imports = [ imports = [
./desktop/sway ./desktop/sway
./gaming/steam ./gaming/steam

View file

@ -1,9 +1,12 @@
{ pkgs, lib, config, ... }:
with lib;
let
cfg = config.modules.desktop.sway;
in
{ {
pkgs,
lib,
config,
...
}:
with lib; let
cfg = config.modules.desktop.sway;
in {
options.modules.desktop.sway = { options.modules.desktop.sway = {
enable = mkEnableOption "Enable Steam Platform"; enable = mkEnableOption "Enable Steam Platform";
}; };

View file

@ -1,9 +1,11 @@
{ lib, config, ... }:
with lib;
let
cfg = config.modules.gaming.steam;
in
{ {
lib,
config,
...
}:
with lib; let
cfg = config.modules.gaming.steam;
in {
options.modules.gaming.steam = { options.modules.gaming.steam = {
enable = mkEnableOption "Enable Steam Platform"; enable = mkEnableOption "Enable Steam Platform";

View file

@ -1,15 +1,16 @@
{ lib, config, pkgs, ... }:
with lib;
let
cfg = config.modules.hardware.lact;
in
{ {
lib,
config,
pkgs,
...
}:
with lib; let
cfg = config.modules.hardware.lact;
in {
options.modules.hardware.lact = { options.modules.hardware.lact = {
enable = mkEnableOption "Install LACT daemon"; enable = mkEnableOption "Install LACT daemon";
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
# Enable Lact (testing purpose for now) # Enable Lact (testing purpose for now)
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
lact lact

View file

@ -1,9 +1,11 @@
{ lib, config, ... }:
with lib;
let
cfg = config.modules.hardware.laptop;
in
{ {
lib,
config,
...
}:
with lib; let
cfg = config.modules.hardware.laptop;
in {
options.modules.hardware.laptop = { options.modules.hardware.laptop = {
enable = mkEnableOption "Install Laptop utils"; enable = mkEnableOption "Install Laptop utils";
@ -25,7 +27,6 @@ in
}; };
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
# Wifi is installed on laptops # Wifi is installed on laptops
networking.wireless.iwd.enable = true; networking.wireless.iwd.enable = true;

View file

@ -1,6 +1,11 @@
{ pkgs, stateVersion, hostname, ... }:
{ {
imports = [ # Include the results of the hardware scan. pkgs,
stateVersion,
hostname,
...
}: {
imports = [
# Include the results of the hardware scan.
../hosts/${hostname}/hardware-configuration.nix ../hosts/${hostname}/hardware-configuration.nix
../hosts/${hostname}/nixos-config.nix ../hosts/${hostname}/nixos-config.nix
../modules/nixos ../modules/nixos
@ -17,7 +22,7 @@
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
boot.kernelPackages = pkgs.linuxPackages_latest; boot.kernelPackages = pkgs.linuxPackages_latest;
networking.hostName = hostname; networking.hostName = hostname;
console = { console = {

View file

@ -1,5 +1,4 @@
{ config, ...}: {config, ...}: {
{
security.doas.enable = true; security.doas.enable = true;
security.sudo.enable = false; security.sudo.enable = false;
} }

View file

@ -1,5 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
nix = { nix = {
package = pkgs.nixVersions.latest; package = pkgs.nixVersions.latest;
extraOptions = '' extraOptions = ''
@ -7,4 +6,3 @@
''; '';
}; };
} }

View file

@ -1,5 +1,4 @@
{ config, ... }: {config, ...}: {
{
time.timeZone = "Europe/Paris"; time.timeZone = "Europe/Paris";
# English locale with YYY/MM/DD date format # English locale with YYY/MM/DD date format
i18n = { i18n = {

View file

@ -1,5 +1,4 @@
{ pkgs, ... }: { {pkgs, ...}: {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
lvm2_dmeventd lvm2_dmeventd
]; ];

View file

@ -1,5 +1,8 @@
{ config, pkgs, ...}:
{ {
config,
pkgs,
...
}: {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
neovim neovim
]; ];

View file

@ -1,9 +1,15 @@
{ inputs, pkgs, ...}:
{ {
inputs,
pkgs,
...
}: {
nixpkgs.overlays = [ nixpkgs.overlays = [
(final: prev: { (final: prev: {
qutebrowser = prev.qutebrowser.override { qutebrowser = prev.qutebrowser.override {
enableWideVine = if pkgs.system == "x86_64-linux" then true else false; enableWideVine =
if pkgs.system == "x86_64-linux"
then true
else false;
}; };
}) })
inputs.nur.overlays.default inputs.nur.overlays.default

View file

@ -1,5 +1,8 @@
{ pkgs, username, ... }:
{ {
pkgs,
username,
...
}: {
# Services # Services
services.pcscd.enable = true; services.pcscd.enable = true;
@ -15,7 +18,7 @@
users.users.${username} = { users.users.${username} = {
shell = pkgs.zsh; shell = pkgs.zsh;
isNormalUser = true; isNormalUser = true;
extraGroups = [ "video" "wheel" ]; extraGroups = ["video" "wheel"];
home = "/home/${username}"; home = "/home/${username}";
}; };
} }