Format using nixfmt rfc style
This commit is contained in:
parent
d07a224bbc
commit
f6be5f8b80
37 changed files with 934 additions and 612 deletions
34
common.nix
34
common.nix
|
|
@ -1,9 +1,14 @@
|
||||||
{ inputs, config, lib, pkgs, ... }:
|
{
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
with lib;
|
{
|
||||||
with lib.my; {
|
imports = [
|
||||||
imports = [ inputs.home-manager.nixosModules.home-manager ]
|
inputs.home-manager.nixosModules.home-manager
|
||||||
++ (mapModulesRec' (toString ./modules) import);
|
] ++ (lib.my.mapModulesRec' (toString ./modules) import);
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
package = pkgs.nixFlakes;
|
package = pkgs.nixFlakes;
|
||||||
|
|
@ -23,22 +28,22 @@ with lib.my; {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
system.configurationRevision = with inputs; mkIf (self ? rev) self.rev;
|
system.configurationRevision = lib.mkIf (inputs.self ? rev) inputs.self.rev;
|
||||||
|
|
||||||
time.timeZone = mkDefault "Europe/Amsterdam";
|
time.timeZone = lib.mkDefault "Europe/Amsterdam";
|
||||||
|
|
||||||
i18n.defaultLocale = mkDefault "en_US.UTF-8";
|
i18n.defaultLocale = lib.mkDefault "en_US.UTF-8";
|
||||||
|
|
||||||
console = {
|
console = {
|
||||||
keyMap = lib.mkDefault "fr";
|
keyMap = lib.mkDefault "fr";
|
||||||
font = mkDefault "${pkgs.terminus_font}/share/consolefonts/ter-v32n.psf.gz";
|
font = lib.mkDefault "${pkgs.terminus_font}/share/consolefonts/ter-v32n.psf.gz";
|
||||||
earlySetup = true;
|
earlySetup = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
fonts.fontconfig.antialias = mkDefault true;
|
fonts.fontconfig.antialias = lib.mkDefault true;
|
||||||
fonts.fontconfig.subpixel = {
|
fonts.fontconfig.subpixel = {
|
||||||
rgba = mkDefault "none";
|
rgba = lib.mkDefault "none";
|
||||||
lcdfilter = mkDefault "none";
|
lcdfilter = lib.mkDefault "none";
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
|
@ -60,7 +65,10 @@ with lib.my; {
|
||||||
];
|
];
|
||||||
|
|
||||||
networking.hosts = {
|
networking.hosts = {
|
||||||
"127.0.0.1" = [ "localhost" "membres.yourcoop.local" ];
|
"127.0.0.1" = [
|
||||||
|
"localhost"
|
||||||
|
"membres.yourcoop.local"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
services.resolved.dnssec = "false";
|
services.resolved.dnssec = "false";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
36
flake.nix
36
flake.nix
|
|
@ -25,16 +25,24 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs@{ self, nixpkgs, nixpkgs-unstable, ... }:
|
outputs =
|
||||||
|
inputs@{
|
||||||
|
self,
|
||||||
|
nixpkgs,
|
||||||
|
nixpkgs-unstable,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
inherit (lib.my) mapHosts;
|
inherit (lib.my) mapHosts;
|
||||||
|
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
|
|
||||||
mkPkgs = pkgs: extraOverlays:
|
mkPkgs =
|
||||||
|
pkgs: extraOverlays:
|
||||||
import pkgs {
|
import pkgs {
|
||||||
inherit system;
|
inherit system;
|
||||||
config.allowUnfreePredicate = pkg:
|
config.allowUnfreePredicate =
|
||||||
|
pkg:
|
||||||
builtins.elem (pkgs.lib.getName pkg) [
|
builtins.elem (pkgs.lib.getName pkg) [
|
||||||
"corefonts"
|
"corefonts"
|
||||||
"steam"
|
"steam"
|
||||||
|
|
@ -46,24 +54,30 @@
|
||||||
pkgs = mkPkgs nixpkgs [ self.overlay ];
|
pkgs = mkPkgs nixpkgs [ self.overlay ];
|
||||||
pkgs-unstable = mkPkgs nixpkgs-unstable [ ];
|
pkgs-unstable = mkPkgs nixpkgs-unstable [ ];
|
||||||
|
|
||||||
lib = nixpkgs.lib.extend (self: super: {
|
lib = nixpkgs.lib.extend (
|
||||||
my = import ./lib {
|
self: super: {
|
||||||
inherit pkgs inputs;
|
my = import ./lib {
|
||||||
lib = self;
|
inherit pkgs inputs;
|
||||||
};
|
lib = self;
|
||||||
});
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
lib = lib.my;
|
lib = lib.my;
|
||||||
|
|
||||||
overlay = final: prev: { unstable = pkgs-unstable; };
|
overlay = final: prev: { unstable = pkgs-unstable; };
|
||||||
|
|
||||||
overlays = { my = (import ./overlay.nix); };
|
overlays = {
|
||||||
|
my = import ./overlay.nix;
|
||||||
|
};
|
||||||
|
|
||||||
nixosConfigurations = (mapHosts ./hosts { }) // {
|
nixosConfigurations = (mapHosts ./hosts { }) // {
|
||||||
rpi3 = nixpkgs.lib.nixosSystem {
|
rpi3 = nixpkgs.lib.nixosSystem {
|
||||||
system = "aarch64-linux";
|
system = "aarch64-linux";
|
||||||
specialArgs = { inherit inputs; };
|
specialArgs = {
|
||||||
|
inherit inputs;
|
||||||
|
};
|
||||||
modules = [ ./hosts/rpi3/default.nix ];
|
modules = [ ./hosts/rpi3/default.nix ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{ pkgs, config, lib, ... }: {
|
{ config, ... }:
|
||||||
|
{
|
||||||
imports = [ ./hardware-configuration.nix ];
|
imports = [ ./hardware-configuration.nix ];
|
||||||
|
|
||||||
modules = {
|
modules = {
|
||||||
|
|
@ -26,20 +27,27 @@
|
||||||
|
|
||||||
services.tlp.enable = true;
|
services.tlp.enable = true;
|
||||||
|
|
||||||
home-manager.users.${config.user.name} = { pkgs, config, ... }: {
|
home-manager.users.${config.user.name} =
|
||||||
services.network-manager-applet.enable = true;
|
{ _ }:
|
||||||
services.blueman-applet.enable = true;
|
{
|
||||||
wayland.windowManager.hyprland.settings = {
|
services.network-manager-applet.enable = true;
|
||||||
dwindle.no_gaps_when_only = 1;
|
services.blueman-applet.enable = true;
|
||||||
|
wayland.windowManager.hyprland.settings = {
|
||||||
|
dwindle.no_gaps_when_only = 1;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
services.pipewire.wireplumber.extraConfig = {
|
services.pipewire.wireplumber.extraConfig = {
|
||||||
"monitor.bluez.properties" = {
|
"monitor.bluez.properties" = {
|
||||||
"bluez5.enable-sbc-xq" = true;
|
"bluez5.enable-sbc-xq" = true;
|
||||||
"bluez5.enable-msbc" = true;
|
"bluez5.enable-msbc" = true;
|
||||||
"bluez5.enable-hw-volume" = true;
|
"bluez5.enable-hw-volume" = true;
|
||||||
"bluez5.roles" = [ "hsp_hs" "hsp_ag" "hfp_hf" "hfp_ag" ];
|
"bluez5.roles" = [
|
||||||
|
"hsp_hs"
|
||||||
|
"hsp_ag"
|
||||||
|
"hfp_hf"
|
||||||
|
"hfp_ag"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
system.stateVersion = "21.05";
|
system.stateVersion = "21.05";
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,28 @@
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
{ modulesPath, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
initrd.availableKernelModules = [ "nvme" "xhci_pci" "sdhci_pci" ];
|
initrd = {
|
||||||
initrd.kernelModules = [ "dm-snapshot" ];
|
availableKernelModules = [
|
||||||
|
"nvme"
|
||||||
|
"xhci_pci"
|
||||||
|
"sdhci_pci"
|
||||||
|
];
|
||||||
|
kernelModules = [ "dm-snapshot" ];
|
||||||
|
};
|
||||||
kernelModules = [ "kvm-amd" ];
|
kernelModules = [ "kvm-amd" ];
|
||||||
# Required, otherwise the kernel freezes on boot
|
# Required, otherwise the kernel freezes on boot
|
||||||
kernelParams = [ "amd_iommu=on" "iommu=pt" "pci=noats" ];
|
kernelParams = [
|
||||||
|
"amd_iommu=on"
|
||||||
|
"iommu=pt"
|
||||||
|
"pci=noats"
|
||||||
|
];
|
||||||
extraModulePackages = [ ];
|
extraModulePackages = [ ];
|
||||||
loader.systemd-boot.enable = true;
|
loader.systemd-boot.enable = true;
|
||||||
loader.efi.canTouchEfiVariables = true;
|
loader.efi.canTouchEfiVariables = true;
|
||||||
initrd.luks.devices."crypted".device =
|
initrd.luks.devices."crypted".device = "/dev/disk/by-uuid/1e900b2e-daea-4558-b18f-3d3a5843de61";
|
||||||
"/dev/disk/by-uuid/1e900b2e-daea-4558-b18f-3d3a5843de61";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
hardware.cpu.amd.updateMicrocode = true;
|
hardware.cpu.amd.updateMicrocode = true;
|
||||||
|
|
@ -28,8 +37,7 @@
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices =
|
swapDevices = [ { device = "/dev/disk/by-uuid/bb8fa9ef-9b8f-413d-913a-6c891649a954"; } ];
|
||||||
[{ device = "/dev/disk/by-uuid/bb8fa9ef-9b8f-413d-913a-6c891649a954"; }];
|
|
||||||
|
|
||||||
zramSwap.enable = true;
|
zramSwap.enable = true;
|
||||||
|
|
||||||
|
|
@ -37,7 +45,11 @@
|
||||||
bluetooth = {
|
bluetooth = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# Enable A2DP Sink
|
# Enable A2DP Sink
|
||||||
settings = { General = { Enable = "Source,Sink,Media,Socket"; }; };
|
settings = {
|
||||||
|
General = {
|
||||||
|
Enable = "Source,Sink,Media,Socket";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{ pkgs, config, lib, ... }: {
|
{ ... }:
|
||||||
|
{
|
||||||
imports = [ ./hardware-configuration.nix ];
|
imports = [ ./hardware-configuration.nix ];
|
||||||
|
|
||||||
modules = {
|
modules = {
|
||||||
|
|
|
||||||
|
|
@ -19,28 +19,29 @@
|
||||||
loader.efi.canTouchEfiVariables = true;
|
loader.efi.canTouchEfiVariables = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/" = {
|
fileSystems = {
|
||||||
device = "/dev/disk/by-uuid/f1e21558-88e6-413e-b56a-04e0b25e9ddd";
|
"/" = {
|
||||||
fsType = "ext4";
|
device = "/dev/disk/by-uuid/f1e21558-88e6-413e-b56a-04e0b25e9ddd";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
"/boot" = {
|
||||||
|
device = "/dev/disk/by-uuid/CCD1-0415";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
|
||||||
|
"/home/froidmpa/Nextcloud" = {
|
||||||
|
device = "/dev/disk/by-uuid/a4ba8b21-ea33-4487-b6f6-9bb7470a0acb";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
"/home/froidmpa/Backup" = {
|
||||||
|
device = "/dev/disk/by-uuid/7fdc4e44-ecb4-49c7-9fb0-cb1ef6235b05";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" = {
|
swapDevices = [ { device = "/dev/disk/by-uuid/f714775c-b5af-4c0c-8330-999b43db4794"; } ];
|
||||||
device = "/dev/disk/by-uuid/CCD1-0415";
|
|
||||||
fsType = "vfat";
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/home/froidmpa/Nextcloud" = {
|
|
||||||
device = "/dev/disk/by-uuid/a4ba8b21-ea33-4487-b6f6-9bb7470a0acb";
|
|
||||||
fsType = "ext4";
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/home/froidmpa/Backup" = {
|
|
||||||
device = "/dev/disk/by-uuid/7fdc4e44-ecb4-49c7-9fb0-cb1ef6235b05";
|
|
||||||
fsType = "ext4";
|
|
||||||
};
|
|
||||||
|
|
||||||
swapDevices =
|
|
||||||
[{ device = "/dev/disk/by-uuid/f714775c-b5af-4c0c-8330-999b43db4794"; }];
|
|
||||||
|
|
||||||
zramSwap.enable = true;
|
zramSwap.enable = true;
|
||||||
|
|
||||||
|
|
@ -54,11 +55,14 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
driSupport = true;
|
driSupport = true;
|
||||||
driSupport32Bit = true;
|
driSupport32Bit = true;
|
||||||
extraPackages = with pkgs; [ rocm-opencl-icd rocm-opencl-runtime amdvlk ];
|
extraPackages = with pkgs; [
|
||||||
|
rocm-opencl-icd
|
||||||
|
rocm-opencl-runtime
|
||||||
|
amdvlk
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
hardware.cpu.amd.updateMicrocode =
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
|
|
||||||
services.resolved.dnssec = "false";
|
services.resolved.dnssec = "false";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,28 @@
|
||||||
{ inputs, pkgs, ... }: {
|
{ inputs, pkgs, ... }:
|
||||||
|
{
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
registry.nixpkgs.flake = inputs.nixpkgs;
|
registry.nixpkgs.flake = inputs.nixpkgs;
|
||||||
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.loader.grub.enable = false;
|
boot = {
|
||||||
boot.loader.generic-extlinux-compatible.enable = true;
|
loader.grub.enable = false;
|
||||||
boot.kernelParams = [ "cma=256M" ];
|
loader.generic-extlinux-compatible.enable = true;
|
||||||
|
kernelParams = [ "cma=256M" ];
|
||||||
|
};
|
||||||
|
|
||||||
fileSystems."/" = {
|
fileSystems."/" = {
|
||||||
device = "/dev/disk/by-label/NIXOS_SD";
|
device = "/dev/disk/by-label/NIXOS_SD";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [{
|
swapDevices = [
|
||||||
device = "/swapfile";
|
{
|
||||||
size = 1024;
|
device = "/swapfile";
|
||||||
}];
|
size = 1024;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
services.openssh.enable = true;
|
services.openssh.enable = true;
|
||||||
users.users.root.openssh.authorizedKeys.keyFiles = [
|
users.users.root.openssh.authorizedKeys.keyFiles = [
|
||||||
|
|
@ -33,15 +38,20 @@
|
||||||
mutableSettings = false;
|
mutableSettings = false;
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
http = { address = "0.0.0.0:80"; };
|
http = {
|
||||||
|
address = "0.0.0.0:80";
|
||||||
|
};
|
||||||
auth_attempts = 5;
|
auth_attempts = 5;
|
||||||
block_auth_min = 15;
|
block_auth_min = 15;
|
||||||
dns = {
|
dns = {
|
||||||
bind_hosts = [ "0.0.0.0" ];
|
bind_hosts = [ "0.0.0.0" ];
|
||||||
port = 53;
|
port = 53;
|
||||||
statistics_interval = 90;
|
statistics_interval = 90;
|
||||||
upstream_dns =
|
upstream_dns = [
|
||||||
[ "tls://doh.mullvad.net" "[/lan/]192.168.1.1" "[//]192.168.1.1" ];
|
"tls://doh.mullvad.net"
|
||||||
|
"[/lan/]192.168.1.1"
|
||||||
|
"[//]192.168.1.1"
|
||||||
|
];
|
||||||
local_ptr_upstreams = [ "192.168.1.1" ];
|
local_ptr_upstreams = [ "192.168.1.1" ];
|
||||||
use_private_ptr_resolvers = true;
|
use_private_ptr_resolvers = true;
|
||||||
resolve_clients = true;
|
resolve_clients = true;
|
||||||
|
|
@ -64,11 +74,19 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.hostName = "rpi3";
|
networking = {
|
||||||
networking.firewall.allowedTCPPorts = [ 53 80 ];
|
hostName = "rpi3";
|
||||||
networking.firewall.allowedUDPPorts = [ 53 ];
|
firewall.allowedTCPPorts = [
|
||||||
|
53
|
||||||
|
80
|
||||||
|
];
|
||||||
|
firewall.allowedUDPPorts = [ 53 ];
|
||||||
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [ vim htop-vim ];
|
environment.systemPackages = with pkgs; [
|
||||||
|
vim
|
||||||
|
htop-vim
|
||||||
|
];
|
||||||
|
|
||||||
system.stateVersion = "22.05";
|
system.stateVersion = "22.05";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,26 +1,22 @@
|
||||||
{ lib, ... }:
|
{ lib, ... }:
|
||||||
|
|
||||||
with builtins;
|
|
||||||
with lib;
|
|
||||||
rec {
|
rec {
|
||||||
# attrsToList
|
# attrsToList
|
||||||
attrsToList = attrs:
|
attrsToList = attrs: lib.mapAttrsToList (name: value: { inherit name value; }) attrs;
|
||||||
mapAttrsToList (name: value: { inherit name value; }) attrs;
|
|
||||||
|
|
||||||
# mapFilterAttrs ::
|
# mapFilterAttrs ::
|
||||||
# (name -> value -> bool)
|
# (name -> value -> bool)
|
||||||
# (name -> value -> { name = any; value = any; })
|
# (name -> value -> { name = any; value = any; })
|
||||||
# attrs
|
# attrs
|
||||||
mapFilterAttrs = pred: f: attrs: filterAttrs pred (mapAttrs' f attrs);
|
mapFilterAttrs =
|
||||||
|
pred: f: attrs:
|
||||||
|
lib.filterAttrs pred (lib.mapAttrs' f attrs);
|
||||||
|
|
||||||
# Generate an attribute set by mapping a function over a list of values.
|
# Generate an attribute set by mapping a function over a list of values.
|
||||||
genAttrs' = values: f: listToAttrs (map f values);
|
genAttrs' = values: f: lib.listToAttrs (map f values);
|
||||||
|
|
||||||
# anyAttrs :: (name -> value -> bool) attrs
|
# anyAttrs :: (name -> value -> bool) attrs
|
||||||
anyAttrs = pred: attrs:
|
anyAttrs = pred: attrs: lib.any (attr: pred attr.name attr.value) (attrsToList attrs);
|
||||||
any (attr: pred attr.name attr.value) (attrsToList attrs);
|
|
||||||
|
|
||||||
# countAttrs :: (name -> value -> bool) attrs
|
# countAttrs :: (name -> value -> bool) attrs
|
||||||
countAttrs = pred: attrs:
|
countAttrs = pred: attrs: lib.count (attr: pred attr.name attr.value) (attrsToList attrs);
|
||||||
count (attr: pred attr.name attr.value) (attrsToList attrs);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,9 @@
|
||||||
{ inputs, lib, pkgs, ... }:
|
{
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) makeExtensible attrValues foldr;
|
inherit (lib) makeExtensible attrValues foldr;
|
||||||
|
|
@ -6,13 +11,25 @@ let
|
||||||
|
|
||||||
modules = import ./modules.nix {
|
modules = import ./modules.nix {
|
||||||
inherit lib;
|
inherit lib;
|
||||||
self.attrs = import ./attrs.nix { inherit lib; self = { }; };
|
self.attrs = import ./attrs.nix {
|
||||||
|
inherit lib;
|
||||||
|
self = { };
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
mylib = makeExtensible (self:
|
mylib = makeExtensible (
|
||||||
with self; mapModules ./.
|
self:
|
||||||
(file: import file { inherit self lib pkgs inputs; }));
|
mapModules ./. (
|
||||||
|
file:
|
||||||
|
import file {
|
||||||
|
inherit
|
||||||
|
self
|
||||||
|
lib
|
||||||
|
pkgs
|
||||||
|
inputs
|
||||||
|
;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
);
|
||||||
in
|
in
|
||||||
mylib.extend
|
mylib.extend (self: super: foldr (a: b: a // b) { } (attrValues super))
|
||||||
(self: super:
|
|
||||||
foldr (a: b: a // b) { } (attrValues super))
|
|
||||||
|
|
|
||||||
|
|
@ -1,52 +1,62 @@
|
||||||
{ self, lib, ... }:
|
{ self, lib, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (builtins) attrValues readDir pathExists concatLists;
|
inherit (builtins)
|
||||||
inherit (lib) id mapAttrsToList filterAttrs hasPrefix hasSuffix nameValuePair removeSuffix;
|
attrValues
|
||||||
|
readDir
|
||||||
|
pathExists
|
||||||
|
concatLists
|
||||||
|
;
|
||||||
|
inherit (lib)
|
||||||
|
id
|
||||||
|
mapAttrsToList
|
||||||
|
filterAttrs
|
||||||
|
hasPrefix
|
||||||
|
hasSuffix
|
||||||
|
nameValuePair
|
||||||
|
removeSuffix
|
||||||
|
;
|
||||||
inherit (self.attrs) mapFilterAttrs;
|
inherit (self.attrs) mapFilterAttrs;
|
||||||
in
|
in
|
||||||
rec {
|
rec {
|
||||||
mapModules = dir: fn:
|
mapModules =
|
||||||
mapFilterAttrs
|
dir: fn:
|
||||||
(n: v:
|
mapFilterAttrs (n: v: v != null && !(hasPrefix "_" n)) (
|
||||||
v != null &&
|
n: v:
|
||||||
!(hasPrefix "_" n))
|
let
|
||||||
(n: v:
|
path = "${toString dir}/${n}";
|
||||||
let path = "${toString dir}/${n}"; in
|
in
|
||||||
if v == "directory" && pathExists "${path}/default.nix"
|
if v == "directory" && pathExists "${path}/default.nix" then
|
||||||
then nameValuePair n (fn path)
|
nameValuePair n (fn path)
|
||||||
else if v == "regular" &&
|
else if v == "regular" && n != "default.nix" && hasSuffix ".nix" n then
|
||||||
n != "default.nix" &&
|
nameValuePair (removeSuffix ".nix" n) (fn path)
|
||||||
hasSuffix ".nix" n
|
else
|
||||||
then nameValuePair (removeSuffix ".nix" n) (fn path)
|
nameValuePair "" null
|
||||||
else nameValuePair "" null)
|
) (readDir dir);
|
||||||
(readDir dir);
|
|
||||||
|
|
||||||
mapModules' = dir: fn:
|
mapModules' = dir: fn: attrValues (mapModules dir fn);
|
||||||
attrValues (mapModules dir fn);
|
|
||||||
|
|
||||||
mapModulesRec = dir: fn:
|
mapModulesRec =
|
||||||
mapFilterAttrs
|
dir: fn:
|
||||||
(n: v:
|
mapFilterAttrs (n: v: v != null && !(hasPrefix "_" n)) (
|
||||||
v != null &&
|
n: v:
|
||||||
!(hasPrefix "_" n))
|
let
|
||||||
(n: v:
|
path = "${toString dir}/${n}";
|
||||||
let path = "${toString dir}/${n}"; in
|
in
|
||||||
if v == "directory"
|
if v == "directory" then
|
||||||
then nameValuePair n (mapModulesRec path fn)
|
nameValuePair n (mapModulesRec path fn)
|
||||||
else if v == "regular" && n != "default.nix" && hasSuffix ".nix" n
|
else if v == "regular" && n != "default.nix" && hasSuffix ".nix" n then
|
||||||
then nameValuePair (removeSuffix ".nix" n) (fn path)
|
nameValuePair (removeSuffix ".nix" n) (fn path)
|
||||||
else nameValuePair "" null)
|
else
|
||||||
(readDir dir);
|
nameValuePair "" null
|
||||||
|
) (readDir dir);
|
||||||
|
|
||||||
mapModulesRec' = dir: fn:
|
mapModulesRec' =
|
||||||
|
dir: fn:
|
||||||
let
|
let
|
||||||
dirs =
|
dirs = mapAttrsToList (k: _: "${dir}/${k}") (
|
||||||
mapAttrsToList
|
filterAttrs (n: v: v == "directory" && !(hasPrefix "_" n)) (readDir dir)
|
||||||
(k: _: "${dir}/${k}")
|
);
|
||||||
(filterAttrs
|
|
||||||
(n: v: v == "directory" && !(hasPrefix "_" n))
|
|
||||||
(readDir dir));
|
|
||||||
files = attrValues (mapModules dir id);
|
files = attrValues (mapModules dir id);
|
||||||
paths = files ++ concatLists (map (d: mapModulesRec' d id) dirs);
|
paths = files ++ concatLists (map (d: mapModulesRec' d id) dirs);
|
||||||
in
|
in
|
||||||
|
|
|
||||||
|
|
@ -1,26 +1,42 @@
|
||||||
{ inputs, lib, pkgs, ... }:
|
{
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
with lib;
|
let
|
||||||
with lib.my;
|
sys = "x86_64-linux";
|
||||||
let sys = "x86_64-linux";
|
in
|
||||||
in {
|
rec {
|
||||||
mkHost = path: attrs @ { system ? sys, ... }:
|
mkHost =
|
||||||
nixosSystem {
|
path:
|
||||||
|
attrs@{
|
||||||
|
system ? sys,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
lib.nixosSystem {
|
||||||
inherit system;
|
inherit system;
|
||||||
specialArgs = { inherit lib inputs system; };
|
specialArgs = {
|
||||||
|
inherit lib inputs system;
|
||||||
|
};
|
||||||
modules = [
|
modules = [
|
||||||
{
|
{
|
||||||
nixpkgs.pkgs = pkgs;
|
nixpkgs.pkgs = pkgs;
|
||||||
nix.registry.nixpkgs.flake = inputs.nixpkgs;
|
nix.registry.nixpkgs.flake = inputs.nixpkgs;
|
||||||
networking.hostName = mkDefault (removeSuffix ".nix" (baseNameOf path));
|
networking.hostName = lib.mkDefault (lib.removeSuffix ".nix" (baseNameOf path));
|
||||||
}
|
}
|
||||||
(filterAttrs (n: v: !elem n [ "system" ]) attrs)
|
(lib.filterAttrs (n: v: !lib.elem n [ "system" ]) attrs)
|
||||||
../common.nix
|
../common.nix
|
||||||
(import path)
|
(import path)
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
mapHosts = dir: attrs @ { system ? system, ... }:
|
mapHosts =
|
||||||
mapModules dir
|
dir:
|
||||||
(hostPath: mkHost hostPath attrs);
|
attrs@{
|
||||||
|
system ? system,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
lib.my.mapModules dir (hostPath: mkHost hostPath attrs);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,16 +3,18 @@
|
||||||
let
|
let
|
||||||
inherit (lib) mkOption types;
|
inherit (lib) mkOption types;
|
||||||
in
|
in
|
||||||
rec {
|
{
|
||||||
mkOpt = type: default:
|
mkOpt = type: default: mkOption { inherit type default; };
|
||||||
mkOption { inherit type default; };
|
|
||||||
|
|
||||||
mkOpt' = type: default: description:
|
mkOpt' =
|
||||||
|
type: default: description:
|
||||||
mkOption { inherit type default description; };
|
mkOption { inherit type default description; };
|
||||||
|
|
||||||
mkBoolOpt = default: mkOption {
|
mkBoolOpt =
|
||||||
inherit default;
|
default:
|
||||||
type = types.bool;
|
mkOption {
|
||||||
example = true;
|
inherit default;
|
||||||
};
|
type = types.bool;
|
||||||
|
example = true;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,19 @@
|
||||||
{ inputs, config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
with lib;
|
let
|
||||||
with lib.my;
|
cfg = config.modules.apps.rofi;
|
||||||
let cfg = config.modules.apps.rofi;
|
in
|
||||||
in {
|
{
|
||||||
options.modules.apps.rofi = { enable = mkBoolOpt false; };
|
options.modules.apps.rofi = {
|
||||||
|
enable = lib.my.mkBoolOpt false;
|
||||||
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
home-manager.users.${config.user.name} = {
|
home-manager.users.${config.user.name} = {
|
||||||
|
|
||||||
programs.rofi = {
|
programs.rofi = {
|
||||||
|
|
@ -31,7 +38,10 @@ in {
|
||||||
};
|
};
|
||||||
theme = ./theme.rasi;
|
theme = ./theme.rasi;
|
||||||
};
|
};
|
||||||
home.packages = with pkgs.unstable; [ paper-icon-theme rofi-power-menu ];
|
home.packages = with pkgs.unstable; [
|
||||||
|
paper-icon-theme
|
||||||
|
rofi-power-menu
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,13 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
wallpaper = pkgs.fetchurl {
|
wallpaper = pkgs.fetchurl {
|
||||||
url =
|
url = "https://raw.githubusercontent.com/AngelJumbo/gruvbox-wallpapers/main/wallpapers/irl/houseonthesideofalake.jpg";
|
||||||
"https://raw.githubusercontent.com/AngelJumbo/gruvbox-wallpapers/main/wallpapers/irl/houseonthesideofalake.jpg";
|
|
||||||
sha256 = "sha256-obKI4qZvucogqRCl51lwV9X8SRaMqcbBwWMfc9TupIo=";
|
sha256 = "sha256-obKI4qZvucogqRCl51lwV9X8SRaMqcbBwWMfc9TupIo=";
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
|
@ -23,9 +27,16 @@ in
|
||||||
corefonts # Microsoft free fonts
|
corefonts # Microsoft free fonts
|
||||||
noto-fonts-emoji
|
noto-fonts-emoji
|
||||||
meslo-lg
|
meslo-lg
|
||||||
(nerdfonts.override { fonts = [ "Meslo" "NerdFontsSymbolsOnly" ]; })
|
(nerdfonts.override {
|
||||||
|
fonts = [
|
||||||
|
"Meslo"
|
||||||
|
"NerdFontsSymbolsOnly"
|
||||||
|
];
|
||||||
|
})
|
||||||
];
|
];
|
||||||
fontconfig.defaultFonts = { monospace = [ "MesloLGS Nerd Font Mono" ]; };
|
fontconfig.defaultFonts = {
|
||||||
|
monospace = [ "MesloLGS Nerd Font Mono" ];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.adb.enable = true;
|
programs.adb.enable = true;
|
||||||
|
|
@ -57,7 +68,9 @@ in
|
||||||
key = lib.mkDefault "3AC6F170F01133CE393BCD94BE948AFD7E7873BE";
|
key = lib.mkDefault "3AC6F170F01133CE393BCD94BE948AFD7E7873BE";
|
||||||
signByDefault = true;
|
signByDefault = true;
|
||||||
};
|
};
|
||||||
extraConfig = { init.defaultBranch = "master"; };
|
extraConfig = {
|
||||||
|
init.defaultBranch = "master";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
ssh = {
|
ssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -121,10 +134,8 @@ in
|
||||||
"application/pdf" = "org.pwmt.zathura-pdf-mupdf.desktop";
|
"application/pdf" = "org.pwmt.zathura-pdf-mupdf.desktop";
|
||||||
|
|
||||||
"application/msword" = "onlyoffice-desktopeditors.desktop";
|
"application/msword" = "onlyoffice-desktopeditors.desktop";
|
||||||
"application/vnd.openxmlformats-officedocument.presentationml.presentation" =
|
"application/vnd.openxmlformats-officedocument.presentationml.presentation" = "onlyoffice-desktopeditors.desktop";
|
||||||
"onlyoffice-desktopeditors.desktop";
|
"application/vnd.openxmlformats-officedocument*" = "onlyoffice-desktopeditors.desktop";
|
||||||
"application/vnd.openxmlformats-officedocument*" =
|
|
||||||
"onlyoffice-desktopeditors.desktop";
|
|
||||||
|
|
||||||
"text/*" = "nvim.desktop";
|
"text/*" = "nvim.desktop";
|
||||||
};
|
};
|
||||||
|
|
@ -139,37 +150,37 @@ in
|
||||||
|
|
||||||
sessionVariables.EDITOR = "vim";
|
sessionVariables.EDITOR = "vim";
|
||||||
|
|
||||||
packages = (with pkgs.unstable; [
|
packages =
|
||||||
brave
|
(with pkgs.unstable; [
|
||||||
ungoogled-chromium
|
brave
|
||||||
mullvad-browser
|
ungoogled-chromium
|
||||||
keepassxc
|
mullvad-browser
|
||||||
krita
|
keepassxc
|
||||||
element-desktop
|
krita
|
||||||
swayimg
|
element-desktop
|
||||||
mpv
|
swayimg
|
||||||
mumble
|
mpv
|
||||||
libreoffice-fresh
|
mumble
|
||||||
onlyoffice-bin
|
libreoffice-fresh
|
||||||
thunderbird
|
onlyoffice-bin
|
||||||
portfolio
|
thunderbird
|
||||||
gnucash
|
portfolio
|
||||||
transmission-remote-gtk
|
gnucash
|
||||||
monero-gui
|
transmission-remote-gtk
|
||||||
|
monero-gui
|
||||||
|
|
||||||
scala-cli
|
scala-cli
|
||||||
jdk
|
jdk
|
||||||
jetbrains.idea-community
|
jetbrains.idea-community
|
||||||
httpie
|
httpie
|
||||||
|
|
||||||
zsh-syntax-highlighting
|
zsh-syntax-highlighting
|
||||||
R
|
R
|
||||||
tldr
|
tldr
|
||||||
ark
|
ark
|
||||||
linuxPackages.perf
|
linuxPackages.perf
|
||||||
]) ++ [
|
])
|
||||||
pkgs.jellyfin-mpv-shim
|
++ [ pkgs.jellyfin-mpv-shim ];
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,18 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
with lib;
|
let
|
||||||
with lib.my;
|
cfg = config.modules.desktop.dunst;
|
||||||
let cfg = config.modules.desktop.dunst;
|
in
|
||||||
in {
|
{
|
||||||
options.modules.desktop.dunst = { enable = mkBoolOpt false; };
|
options.modules.desktop.dunst = {
|
||||||
config = mkIf cfg.enable {
|
enable = lib.my.mkBoolOpt false;
|
||||||
|
};
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
home-manager.users.${config.user.name} = {
|
home-manager.users.${config.user.name} = {
|
||||||
services.dunst = {
|
services.dunst = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,18 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
with lib;
|
let
|
||||||
with lib.my;
|
cfg = config.modules.desktop.file-manager;
|
||||||
let cfg = config.modules.desktop.file-manager;
|
in
|
||||||
in {
|
{
|
||||||
options.modules.desktop.file-manager = { enable = mkBoolOpt false; };
|
options.modules.desktop.file-manager = {
|
||||||
config = mkIf cfg.enable {
|
enable = lib.my.mkBoolOpt false;
|
||||||
|
};
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
home-manager.users.${config.user.name} = {
|
home-manager.users.${config.user.name} = {
|
||||||
|
|
||||||
programs.yazi = {
|
programs.yazi = {
|
||||||
|
|
@ -39,11 +46,13 @@ in {
|
||||||
desc = "Copy files to clipboard";
|
desc = "Copy files to clipboard";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
input.prepend_keymap = [{
|
input.prepend_keymap = [
|
||||||
on = [ "<Esc>" ];
|
{
|
||||||
run = "close";
|
on = [ "<Esc>" ];
|
||||||
desc = "Cancel input";
|
run = "close";
|
||||||
}];
|
desc = "Cancel input";
|
||||||
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
theme = {
|
theme = {
|
||||||
status = {
|
status = {
|
||||||
|
|
|
||||||
|
|
@ -1,34 +1,44 @@
|
||||||
{ config, lib, pkgs, inputs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
with lib;
|
let
|
||||||
with lib.my;
|
cfg = config.modules.desktop.flameshot;
|
||||||
let cfg = config.modules.desktop.flameshot;
|
in
|
||||||
in {
|
{
|
||||||
options.modules.desktop.flameshot = { enable = mkBoolOpt false; };
|
options.modules.desktop.flameshot = {
|
||||||
config = mkIf cfg.enable {
|
enable = lib.my.mkBoolOpt false;
|
||||||
home-manager.users.${config.user.name} = { config, ... }: {
|
};
|
||||||
services.flameshot = {
|
config = lib.mkIf cfg.enable {
|
||||||
enable = true;
|
home-manager.users.${config.user.name} =
|
||||||
package = pkgs.flameshot.overrideAttrs (old: {
|
{ config, ... }:
|
||||||
src = inputs.flameshot-git;
|
{
|
||||||
cmakeFlags = [ "-DUSE_WAYLAND_GRIM=1" ];
|
services.flameshot = {
|
||||||
});
|
enable = true;
|
||||||
settings = {
|
package = pkgs.flameshot.overrideAttrs (old: {
|
||||||
General = {
|
src = inputs.flameshot-git;
|
||||||
showStartupLaunchMessage = false;
|
cmakeFlags = [ "-DUSE_WAYLAND_GRIM=1" ];
|
||||||
disabledTrayIcon = true;
|
});
|
||||||
showHelp = false;
|
settings = {
|
||||||
showDesktopNotification = false;
|
General = {
|
||||||
filenamePattern = "%F_%T";
|
showStartupLaunchMessage = false;
|
||||||
savePath = "${config.home.homeDirectory}/Pictures/Screenshots";
|
disabledTrayIcon = true;
|
||||||
savePathFixed = true;
|
showHelp = false;
|
||||||
saveAfterCopy = true;
|
showDesktopNotification = false;
|
||||||
uiColor = "#83A598";
|
filenamePattern = "%F_%T";
|
||||||
|
savePath = "${config.home.homeDirectory}/Pictures/Screenshots";
|
||||||
|
savePathFixed = true;
|
||||||
|
saveAfterCopy = true;
|
||||||
|
uiColor = "#83A598";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
home.packages = with pkgs.unstable; [ grim ];
|
||||||
home.packages = with pkgs.unstable; [ grim ];
|
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,45 +1,61 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
with lib;
|
let
|
||||||
with lib.my;
|
cfg = config.modules.desktop.htop;
|
||||||
let cfg = config.modules.desktop.htop;
|
in
|
||||||
in {
|
{
|
||||||
options.modules.desktop.htop = { enable = mkBoolOpt false; };
|
options.modules.desktop.htop = {
|
||||||
config = mkIf cfg.enable {
|
enable = lib.my.mkBoolOpt false;
|
||||||
home-manager.users.${config.user.name} = { config, ... }: {
|
};
|
||||||
programs.htop = {
|
config = lib.mkIf cfg.enable {
|
||||||
enable = true;
|
home-manager.users.${config.user.name} =
|
||||||
package = pkgs.htop-vim;
|
{ config, ... }:
|
||||||
settings = {
|
{
|
||||||
hide_userland_threads = true;
|
programs.htop = {
|
||||||
highlight_base_name = true;
|
enable = true;
|
||||||
vim_mode = true;
|
package = pkgs.htop-vim;
|
||||||
fields = with config.lib.htop.fields; [
|
settings =
|
||||||
PID
|
{
|
||||||
USER
|
hide_userland_threads = true;
|
||||||
M_RESIDENT
|
highlight_base_name = true;
|
||||||
M_SHARE
|
vim_mode = true;
|
||||||
STATE
|
fields = with config.lib.htop.fields; [
|
||||||
PERCENT_CPU
|
PID
|
||||||
PERCENT_MEM
|
USER
|
||||||
IO_RATE
|
M_RESIDENT
|
||||||
TIME
|
M_SHARE
|
||||||
COMM
|
STATE
|
||||||
];
|
PERCENT_CPU
|
||||||
} // (with config.lib.htop;
|
PERCENT_MEM
|
||||||
leftMeters [
|
IO_RATE
|
||||||
(bar "LeftCPUs2")
|
TIME
|
||||||
(bar "CPU")
|
COMM
|
||||||
(bar "Memory")
|
];
|
||||||
(bar "Swap")
|
}
|
||||||
]) // (with config.lib.htop;
|
// (
|
||||||
rightMeters [
|
with config.lib.htop;
|
||||||
(bar "RightCPUs2")
|
leftMeters [
|
||||||
(text "Tasks")
|
(bar "LeftCPUs2")
|
||||||
(text "LoadAverage")
|
(bar "CPU")
|
||||||
(text "Uptime")
|
(bar "Memory")
|
||||||
]);
|
(bar "Swap")
|
||||||
|
]
|
||||||
|
)
|
||||||
|
// (
|
||||||
|
with config.lib.htop;
|
||||||
|
rightMeters [
|
||||||
|
(bar "RightCPUs2")
|
||||||
|
(text "Tasks")
|
||||||
|
(text "LoadAverage")
|
||||||
|
(text "Uptime")
|
||||||
|
]
|
||||||
|
);
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,10 @@
|
||||||
{ inputs, config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
with lib;
|
|
||||||
with lib.my;
|
|
||||||
let
|
let
|
||||||
cfg = config.modules.desktop.themes.gtk;
|
cfg = config.modules.desktop.themes.gtk;
|
||||||
|
|
||||||
|
|
@ -9,8 +12,7 @@ let
|
||||||
name = "gruvbox-plus";
|
name = "gruvbox-plus";
|
||||||
version = "5.1";
|
version = "5.1";
|
||||||
src = pkgs.fetchurl {
|
src = pkgs.fetchurl {
|
||||||
url =
|
url = "https://github.com/SylEleuth/gruvbox-plus-icon-pack/releases/download/v${version}/gruvbox-plus-icon-pack-${version}.zip";
|
||||||
"https://github.com/SylEleuth/gruvbox-plus-icon-pack/releases/download/v${version}/gruvbox-plus-icon-pack-${version}.zip";
|
|
||||||
sha256 = "1n3hqwk1mqaj8vbmy0pqbiq6v5jqrhmhin506xbpnccl28f907j0";
|
sha256 = "1n3hqwk1mqaj8vbmy0pqbiq6v5jqrhmhin506xbpnccl28f907j0";
|
||||||
};
|
};
|
||||||
dontUnpack = true;
|
dontUnpack = true;
|
||||||
|
|
@ -20,10 +22,13 @@ let
|
||||||
'';
|
'';
|
||||||
|
|
||||||
};
|
};
|
||||||
in {
|
in
|
||||||
options.modules.desktop.themes.gtk = { enable = mkBoolOpt false; };
|
{
|
||||||
|
options.modules.desktop.themes.gtk = {
|
||||||
|
enable = lib.my.mkBoolOpt false;
|
||||||
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
|
||||||
systemd.packages = [ pkgs.dconf ];
|
systemd.packages = [ pkgs.dconf ];
|
||||||
|
|
||||||
|
|
@ -48,8 +53,12 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
xdg.configFile = {
|
xdg.configFile = {
|
||||||
"gtk-3.0/gtk.css" = { source = ./gtk.css; };
|
"gtk-3.0/gtk.css" = {
|
||||||
"gtk-4.0/gtk.css" = { source = ./gtk.css; };
|
source = ./gtk.css;
|
||||||
|
};
|
||||||
|
"gtk-4.0/gtk.css" = {
|
||||||
|
source = ./gtk.css;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,20 @@
|
||||||
{ inputs, config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
with lib;
|
let
|
||||||
with lib.my;
|
cfg = config.modules.desktop.themes.qt;
|
||||||
let cfg = config.modules.desktop.themes.qt;
|
|
||||||
|
|
||||||
in {
|
in
|
||||||
options.modules.desktop.themes.qt = { enable = mkBoolOpt false; };
|
{
|
||||||
|
options.modules.desktop.themes.qt = {
|
||||||
|
enable = lib.my.mkBoolOpt false;
|
||||||
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
libsForQt5.qt5.qtquickcontrols2
|
libsForQt5.qt5.qtquickcontrols2
|
||||||
|
|
|
||||||
|
|
@ -1,29 +1,32 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
with lib;
|
let
|
||||||
with lib.my;
|
cfg = config.modules.desktop.vscode;
|
||||||
let cfg = config.modules.desktop.vscode;
|
in
|
||||||
in {
|
{
|
||||||
options.modules.desktop.vscode = {
|
options.modules.desktop.vscode = {
|
||||||
enable = mkBoolOpt false;
|
enable = lib.my.mkBoolOpt false;
|
||||||
};
|
};
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
home-manager.users.${config.user.name} = {
|
home-manager.users.${config.user.name} = {
|
||||||
programs.vscode = {
|
programs.vscode = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.vscodium;
|
package = pkgs.vscodium;
|
||||||
extensions = (
|
extensions = with pkgs.vscode-extensions; [
|
||||||
with pkgs.vscode-extensions; [
|
pkief.material-icon-theme
|
||||||
pkief.material-icon-theme
|
jnoortheen.nix-ide
|
||||||
jnoortheen.nix-ide
|
arrterian.nix-env-selector
|
||||||
arrterian.nix-env-selector
|
scala-lang.scala
|
||||||
scala-lang.scala
|
scalameta.metals
|
||||||
scalameta.metals
|
hashicorp.terraform
|
||||||
hashicorp.terraform
|
bradlc.vscode-tailwindcss
|
||||||
bradlc.vscode-tailwindcss
|
asciidoctor.asciidoctor-vscode
|
||||||
asciidoctor.asciidoctor-vscode
|
];
|
||||||
]
|
|
||||||
);
|
|
||||||
userSettings = {
|
userSettings = {
|
||||||
"editor.formatOnSave" = true;
|
"editor.formatOnSave" = true;
|
||||||
"editor.quickSuggestions" = {
|
"editor.quickSuggestions" = {
|
||||||
|
|
@ -33,8 +36,14 @@ in {
|
||||||
"scala" = "html";
|
"scala" = "html";
|
||||||
};
|
};
|
||||||
"tailwindCSS.experimental.classRegex" = [
|
"tailwindCSS.experimental.classRegex" = [
|
||||||
[ "cls\\(([^)]*)\\)" "\"([^']*)\"" ]
|
[
|
||||||
[ "cls\\s*:=\\s*\\(?([^,^\\n^\\)]*)" "\"([^']*)\"" ]
|
"cls\\(([^)]*)\\)"
|
||||||
|
"\"([^']*)\""
|
||||||
|
]
|
||||||
|
[
|
||||||
|
"cls\\s*:=\\s*\\(?([^,^\\n^\\)]*)"
|
||||||
|
"\"([^']*)\""
|
||||||
|
]
|
||||||
];
|
];
|
||||||
|
|
||||||
"files.autoSave" = "onFocusChange";
|
"files.autoSave" = "onFocusChange";
|
||||||
|
|
@ -50,9 +59,7 @@ in {
|
||||||
"terraform.languageServer" = {
|
"terraform.languageServer" = {
|
||||||
"external" = true;
|
"external" = true;
|
||||||
"pathToBinary" = "";
|
"pathToBinary" = "";
|
||||||
"args" = [
|
"args" = [ "serve" ];
|
||||||
"serve"
|
|
||||||
];
|
|
||||||
"maxNumberOfProblems" = 100;
|
"maxNumberOfProblems" = 100;
|
||||||
"trace.server" = "off";
|
"trace.server" = "off";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,20 @@
|
||||||
{ options, config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
with lib;
|
lib,
|
||||||
with lib.my;
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.modules.desktop.wm;
|
cfg = config.modules.desktop.wm;
|
||||||
term = "${
|
term = "${config.home-manager.users.${config.user.name}.programs.kitty.package}/bin/kitty";
|
||||||
config.home-manager.users.${config.user.name}.programs.kitty.package
|
|
||||||
}/bin/kitty";
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.modules.desktop.wm = { enable = mkBoolOpt false; };
|
options.modules.desktop.wm = {
|
||||||
|
enable = lib.my.mkBoolOpt false;
|
||||||
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
|
||||||
modules = {
|
modules = {
|
||||||
desktop = {
|
desktop = {
|
||||||
|
|
@ -28,7 +30,9 @@ in
|
||||||
htop.enable = true;
|
htop.enable = true;
|
||||||
flameshot.enable = true;
|
flameshot.enable = true;
|
||||||
};
|
};
|
||||||
hardware = { audio.enable = true; };
|
hardware = {
|
||||||
|
audio.enable = true;
|
||||||
|
};
|
||||||
apps.rofi.enable = true;
|
apps.rofi.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -113,14 +117,20 @@ in
|
||||||
|
|
||||||
wayland.windowManager.hyprland = {
|
wayland.windowManager.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
package = pkgs.unstable.hyprland;
|
||||||
systemd.enable = true;
|
systemd.enable = true;
|
||||||
xwayland.enable = true;
|
xwayland.enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
"$mod" = "SUPER";
|
"$mod" = "SUPER";
|
||||||
|
|
||||||
env = [ "XCURSOR_SIZE,24" "WLR_NO_HARDWARE_CURSORS,1" ];
|
env = [
|
||||||
|
"XCURSOR_SIZE,24"
|
||||||
|
"WLR_NO_HARDWARE_CURSORS,1"
|
||||||
|
];
|
||||||
|
|
||||||
xwayland = { force_zero_scaling = true; };
|
xwayland = {
|
||||||
|
force_zero_scaling = true;
|
||||||
|
};
|
||||||
|
|
||||||
general = {
|
general = {
|
||||||
layout = "dwindle";
|
layout = "dwindle";
|
||||||
|
|
@ -134,7 +144,9 @@ in
|
||||||
hover_icon_on_border = false;
|
hover_icon_on_border = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
dwindle = { preserve_split = true; };
|
dwindle = {
|
||||||
|
preserve_split = true;
|
||||||
|
};
|
||||||
|
|
||||||
input = {
|
input = {
|
||||||
kb_layout = "fr";
|
kb_layout = "fr";
|
||||||
|
|
@ -294,9 +306,19 @@ in
|
||||||
height = 25;
|
height = 25;
|
||||||
spacing = 2;
|
spacing = 2;
|
||||||
reload-style-on-change = true;
|
reload-style-on-change = true;
|
||||||
modules-left = [ "cpu" "memory" "disk" "hyprland/window" ];
|
modules-left = [
|
||||||
|
"cpu"
|
||||||
|
"memory"
|
||||||
|
"disk"
|
||||||
|
"hyprland/window"
|
||||||
|
];
|
||||||
modules-center = [ "hyprland/workspaces" ];
|
modules-center = [ "hyprland/workspaces" ];
|
||||||
modules-right = [ "mpd" "battery" "clock" "tray" ];
|
modules-right = [
|
||||||
|
"mpd"
|
||||||
|
"battery"
|
||||||
|
"clock"
|
||||||
|
"tray"
|
||||||
|
];
|
||||||
|
|
||||||
tray = {
|
tray = {
|
||||||
icon-size = 14;
|
icon-size = 14;
|
||||||
|
|
@ -391,7 +413,11 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
packages = with pkgs.unstable; [ wlr-randr wl-clipboard wdisplays ];
|
packages = with pkgs.unstable; [
|
||||||
|
wlr-randr
|
||||||
|
wl-clipboard
|
||||||
|
wdisplays
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.swaylock = {
|
programs.swaylock = {
|
||||||
|
|
|
||||||
|
|
@ -1,67 +1,95 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
let cfg = config.modules.desktop.zsh;
|
let
|
||||||
in {
|
cfg = config.modules.desktop.zsh;
|
||||||
options.modules.desktop.zsh = { enable = lib.my.mkBoolOpt false; };
|
in
|
||||||
|
{
|
||||||
|
options.modules.desktop.zsh = {
|
||||||
|
enable = lib.my.mkBoolOpt false;
|
||||||
|
};
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
|
||||||
environment.pathsToLink = [ "/share/zsh" ];
|
environment.pathsToLink = [ "/share/zsh" ];
|
||||||
|
|
||||||
programs.zsh.enable = true;
|
programs.zsh.enable = true;
|
||||||
|
|
||||||
users.users.${config.user.name} = { shell = pkgs.zsh; };
|
users.users.${config.user.name} = {
|
||||||
|
shell = pkgs.zsh;
|
||||||
|
};
|
||||||
|
|
||||||
home-manager.users.${config.user.name} = {
|
home-manager.users.${config.user.name} = {
|
||||||
programs.zsh = {
|
programs = {
|
||||||
enable = true;
|
zsh = {
|
||||||
history = {
|
|
||||||
save = 50000;
|
|
||||||
size = 50000;
|
|
||||||
};
|
|
||||||
enableCompletion = true;
|
|
||||||
autosuggestion.enable = true;
|
|
||||||
syntaxHighlighting.enable = true;
|
|
||||||
initExtra = /*bash*/''
|
|
||||||
autoload -Uz up-line-or-beginning-search down-line-or-beginning-search
|
|
||||||
zle -N up-line-or-beginning-search
|
|
||||||
zle -N down-line-or-beginning-search
|
|
||||||
|
|
||||||
[[ -n "$key[Up]" ]] && bindkey -- "$key[Up]" up-line-or-beginning-search
|
|
||||||
[[ -n "$key[Down]" ]] && bindkey -- "$key[Down]" down-line-or-beginning-search
|
|
||||||
'';
|
|
||||||
oh-my-zsh = {
|
|
||||||
enable = true;
|
enable = true;
|
||||||
plugins = [ "git" "terraform" "systemd" ];
|
history = {
|
||||||
};
|
save = 50000;
|
||||||
plugins = [
|
size = 50000;
|
||||||
{
|
};
|
||||||
name = "nix-zsh-completions";
|
enableCompletion = true;
|
||||||
src = pkgs.nix-zsh-completions;
|
autosuggestion.enable = true;
|
||||||
}
|
syntaxHighlighting.enable = true;
|
||||||
{
|
initExtra = # bash
|
||||||
name = "zsh-completions";
|
''
|
||||||
src = pkgs.zsh-completions;
|
autoload -Uz up-line-or-beginning-search down-line-or-beginning-search
|
||||||
}
|
zle -N up-line-or-beginning-search
|
||||||
];
|
zle -N down-line-or-beginning-search
|
||||||
};
|
|
||||||
programs.thefuck = {
|
[[ -n "$key[Up]" ]] && bindkey -- "$key[Up]" up-line-or-beginning-search
|
||||||
enable = true;
|
[[ -n "$key[Down]" ]] && bindkey -- "$key[Down]" down-line-or-beginning-search
|
||||||
enableZshIntegration = true;
|
'';
|
||||||
};
|
oh-my-zsh = {
|
||||||
programs.starship = {
|
enable = true;
|
||||||
enable = true;
|
plugins = [
|
||||||
enableZshIntegration = true;
|
"git"
|
||||||
settings = {
|
"terraform"
|
||||||
add_newline = true;
|
"systemd"
|
||||||
cmd_duration = {
|
];
|
||||||
min_time = 0;
|
};
|
||||||
show_milliseconds = true;
|
plugins = [
|
||||||
|
{
|
||||||
|
name = "nix-zsh-completions";
|
||||||
|
src = pkgs.nix-zsh-completions;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "zsh-completions";
|
||||||
|
src = pkgs.zsh-completions;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
thefuck = {
|
||||||
|
enable = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
};
|
||||||
|
starship = {
|
||||||
|
enable = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
settings = {
|
||||||
|
add_newline = true;
|
||||||
|
cmd_duration = {
|
||||||
|
min_time = 0;
|
||||||
|
show_milliseconds = true;
|
||||||
|
};
|
||||||
|
scala = {
|
||||||
|
symbol = " ";
|
||||||
|
};
|
||||||
|
terraform = {
|
||||||
|
symbol = " ";
|
||||||
|
};
|
||||||
|
nix_shell = {
|
||||||
|
symbol = " ";
|
||||||
|
};
|
||||||
|
nodejs = {
|
||||||
|
symbol = " ";
|
||||||
|
};
|
||||||
|
php = {
|
||||||
|
symbol = " ";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
scala = { symbol = " "; };
|
|
||||||
terraform = { symbol = " "; };
|
|
||||||
nix_shell = { symbol = " "; };
|
|
||||||
nodejs = { symbol = " "; };
|
|
||||||
php = { symbol = " "; };
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,73 +1,93 @@
|
||||||
{ inputs, config, lib, pkgs, ... }:
|
{
|
||||||
|
inputs,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
with lib;
|
let
|
||||||
with lib.my;
|
cfg = config.modules.editor.emacs;
|
||||||
let cfg = config.modules.editor.emacs;
|
in
|
||||||
in {
|
{
|
||||||
options.modules.editor.emacs = { enable = mkBoolOpt false; };
|
options.modules.editor.emacs = {
|
||||||
|
enable = lib.my.mkBoolOpt false;
|
||||||
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
home-manager.users.${config.user.name} = {
|
home-manager.users.${config.user.name} = {
|
||||||
|
|
||||||
nixpkgs.overlays = [ inputs.emacs-overlay.overlay ];
|
nixpkgs.overlays = [ inputs.emacs-overlay.overlay ];
|
||||||
|
|
||||||
home.packages = with pkgs.unstable; [
|
home = {
|
||||||
binutils
|
packages = [
|
||||||
ripgrep
|
pkgs.unstable.binutils
|
||||||
fd
|
pkgs.unstable.ripgrep
|
||||||
findutils.locate
|
pkgs.unstable.fd
|
||||||
python311
|
pkgs.unstable.findutils.locate
|
||||||
libsecret
|
pkgs.unstable.python311
|
||||||
gcc
|
pkgs.unstable.libsecret
|
||||||
gnumake
|
pkgs.unstable.gcc
|
||||||
cmake
|
pkgs.unstable.gnumake
|
||||||
nodejs
|
pkgs.unstable.cmake
|
||||||
|
pkgs.unstable.nodejs
|
||||||
|
|
||||||
opentofu
|
pkgs.unstable.opentofu
|
||||||
pandoc
|
pkgs.unstable.pandoc
|
||||||
|
|
||||||
# Formatters and linters
|
# Formatters and linters
|
||||||
nixfmt-rfc-style # nix formatter
|
pkgs.unstable.nixfmt-rfc-style # nix formatter
|
||||||
nixpkgs-fmt
|
pkgs.unstable.nixpkgs-fmt
|
||||||
shfmt # sh formatter
|
pkgs.unstable.shfmt # sh formatter
|
||||||
shellcheck # sh linter
|
pkgs.unstable.shellcheck # sh linter
|
||||||
html-tidy # HTML formatter
|
pkgs.unstable.html-tidy # HTML formatter
|
||||||
nodePackages.stylelint # CSS linter
|
pkgs.unstable.nodePackages.stylelint # CSS linter
|
||||||
nodePackages.js-beautify # JS/CSS/HTML formatter
|
pkgs.unstable.nodePackages.js-beautify # JS/CSS/HTML formatter
|
||||||
|
|
||||||
# LSPs
|
# LSPs
|
||||||
coursier
|
pkgs.unstable.coursier
|
||||||
# metals # Scala
|
# metals # Scala
|
||||||
|
|
||||||
# Nix
|
# Nix
|
||||||
nil
|
pkgs.unstable.nil
|
||||||
|
|
||||||
pkgs.phpactor # PHP
|
pkgs.phpactor # PHP
|
||||||
#OCaml
|
#OCaml
|
||||||
ocaml
|
pkgs.unstable.ocaml
|
||||||
dune_3
|
pkgs.unstable.dune_3
|
||||||
ocamlPackages.ocaml-lsp
|
pkgs.unstable.ocamlPackages.ocaml-lsp
|
||||||
ocamlPackages.ocamlformat
|
pkgs.unstable.ocamlPackages.ocamlformat
|
||||||
ocamlPackages.utop
|
pkgs.unstable.ocamlPackages.utop
|
||||||
ocamlPackages.ocp-indent
|
pkgs.unstable.ocamlPackages.ocp-indent
|
||||||
ocamlPackages.merlin
|
pkgs.unstable.ocamlPackages.merlin
|
||||||
|
|
||||||
# Used by org-roam
|
# Used by org-roam
|
||||||
sqlite
|
pkgs.unstable.sqlite
|
||||||
graphviz
|
pkgs.unstable.graphviz
|
||||||
|
|
||||||
# Used by elfeed-tube
|
# Used by elfeed-tube
|
||||||
yt-dlp
|
pkgs.unstable.yt-dlp
|
||||||
mpv
|
pkgs.unstable.mpv
|
||||||
|
|
||||||
# Used by dirvish
|
# Used by dirvish
|
||||||
imagemagick
|
pkgs.unstable.imagemagick
|
||||||
ffmpegthumbnailer
|
pkgs.unstable.ffmpegthumbnailer
|
||||||
mediainfo
|
pkgs.unstable.mediainfo
|
||||||
poppler
|
pkgs.unstable.poppler
|
||||||
gnutar
|
pkgs.unstable.gnutar
|
||||||
unzip
|
pkgs.unstable.unzip
|
||||||
];
|
];
|
||||||
|
sessionPath = [ "${config.home-manager.users.${config.user.name}.xdg.configHome}/emacs/bin" ];
|
||||||
|
activation = {
|
||||||
|
installDoomEmacs = ''
|
||||||
|
if [ ! -d "${config.home-manager.users.${config.user.name}.xdg.configHome}/emacs" ]; then
|
||||||
|
git clone --depth=1 --single-branch https://github.com/doomemacs/doomemacs "${
|
||||||
|
config.home-manager.users.${config.user.name}.xdg.configHome
|
||||||
|
}/emacs"
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
services.emacs = {
|
services.emacs = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -83,29 +103,17 @@ in {
|
||||||
withTreeSitter = true;
|
withTreeSitter = true;
|
||||||
withWebP = true;
|
withWebP = true;
|
||||||
};
|
};
|
||||||
extraPackages = epkgs:
|
extraPackages =
|
||||||
with epkgs; [
|
epkgs: with epkgs; [
|
||||||
vterm
|
vterm
|
||||||
pdf-tools
|
pdf-tools
|
||||||
treesit-grammars.with-all-grammars
|
treesit-grammars.with-all-grammars
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
xdg.configFile = { "doom" = { source = ./doom.d; }; };
|
xdg.configFile = {
|
||||||
home.sessionPath = [
|
"doom" = {
|
||||||
"${
|
source = ./doom.d;
|
||||||
config.home-manager.users.${config.user.name}.xdg.configHome
|
};
|
||||||
}/emacs/bin"
|
|
||||||
];
|
|
||||||
home.activation = {
|
|
||||||
installDoomEmacs = ''
|
|
||||||
if [ ! -d "${
|
|
||||||
config.home-manager.users.${config.user.name}.xdg.configHome
|
|
||||||
}/emacs" ]; then
|
|
||||||
git clone --depth=1 --single-branch https://github.com/doomemacs/doomemacs "${
|
|
||||||
config.home-manager.users.${config.user.name}.xdg.configHome
|
|
||||||
}/emacs"
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,19 @@
|
||||||
{ options, config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
with lib;
|
let
|
||||||
with lib.my;
|
cfg = config.modules.hardware.audio;
|
||||||
let cfg = config.modules.hardware.audio;
|
in
|
||||||
in {
|
{
|
||||||
options.modules.hardware.audio = { enable = mkBoolOpt false; };
|
options.modules.hardware.audio = {
|
||||||
|
enable = lib.my.mkBoolOpt false;
|
||||||
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
sound.enable = true;
|
sound.enable = true;
|
||||||
|
|
||||||
security.rtkit.enable = true;
|
security.rtkit.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,29 @@
|
||||||
{ options, config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
with lib;
|
let
|
||||||
with lib.my;
|
cfg = config.modules.media.emulators;
|
||||||
let cfg = config.modules.media.emulators;
|
in
|
||||||
in {
|
{
|
||||||
options.modules.media.emulators = {
|
options.modules.media.emulators = {
|
||||||
psx.enable = mkBoolOpt false; # Playstation
|
psx.enable = lib.my.mkBoolOpt false; # Playstation
|
||||||
ds.enable = mkBoolOpt false; # Nintendo DS
|
ds.enable = lib.my.mkBoolOpt false; # Nintendo DS
|
||||||
gc.enable = mkBoolOpt false; # GameCube
|
gc.enable = lib.my.mkBoolOpt false; # GameCube
|
||||||
gb.enable = mkBoolOpt false; # GameBoy + GameBoy Color
|
gb.enable = lib.my.mkBoolOpt false; # GameBoy + GameBoy Color
|
||||||
gba.enable = mkBoolOpt false; # GameBoy Advance
|
gba.enable = lib.my.mkBoolOpt false; # GameBoy Advance
|
||||||
snes.enable = mkBoolOpt false; # Super Nintendo
|
snes.enable = lib.my.mkBoolOpt false; # Super Nintendo
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
user.packages = with pkgs; [
|
user.packages = [
|
||||||
(mkIf cfg.psx.enable duckstation)
|
(lib.mkIf cfg.psx.enable pkgs.duckstation)
|
||||||
(mkIf cfg.ds.enable desmume)
|
(lib.mkIf cfg.ds.enable pkgs.desmume)
|
||||||
(mkIf cfg.gc.enable dolphinEmu)
|
(lib.mkIf cfg.gc.enable pkgs.dolphinEmu)
|
||||||
(mkIf (cfg.gba.enable || cfg.gb.enable || cfg.snes.enable) higan)
|
(lib.mkIf (cfg.gba.enable || cfg.gb.enable || cfg.snes.enable) pkgs.higan)
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,25 @@
|
||||||
{ options, config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
with lib;
|
let
|
||||||
with lib.my;
|
cfg = config.modules.media;
|
||||||
let cfg = config.modules.media;
|
in
|
||||||
in {
|
{
|
||||||
options.modules.media = {
|
options.modules.media = {
|
||||||
steam.enable = mkBoolOpt false;
|
steam.enable = lib.my.mkBoolOpt false;
|
||||||
lutris.enable = mkBoolOpt false;
|
lutris.enable = lib.my.mkBoolOpt false;
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
user.packages = with pkgs; [
|
user.packages = [
|
||||||
(mkIf cfg.steam.enable steam)
|
(lib.mkIf cfg.steam.enable pkgs.steam)
|
||||||
(mkIf cfg.lutris.enable lutris)
|
(lib.mkIf cfg.lutris.enable pkgs.lutris)
|
||||||
(mkIf cfg.lutris.enable wine)
|
(lib.mkIf cfg.lutris.enable pkgs.wine)
|
||||||
(mkIf (cfg.steam.enable || cfg.lutris.enable) protontricks)
|
(lib.mkIf (cfg.steam.enable || cfg.lutris.enable) pkgs.protontricks)
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,34 +1,38 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, ... }:
|
||||||
|
|
||||||
with lib;
|
let
|
||||||
with lib.my;
|
cfg = config.modules.media.mpd;
|
||||||
let cfg = config.modules.media.mpd;
|
in
|
||||||
in {
|
{
|
||||||
options.modules.media.mpd = { enable = mkBoolOpt false; };
|
options.modules.media.mpd = {
|
||||||
config = mkIf cfg.enable {
|
enable = lib.my.mkBoolOpt false;
|
||||||
home-manager.users.${config.user.name} = { config, ... }: {
|
};
|
||||||
services.mpd = {
|
config = lib.mkIf cfg.enable {
|
||||||
enable = true;
|
home-manager.users.${config.user.name} =
|
||||||
network.listenAddress = "any";
|
{ config, ... }:
|
||||||
musicDirectory = "${config.home.homeDirectory}/Nextcloud/Media/Music";
|
{
|
||||||
playlistDirectory = "${config.home.homeDirectory}/Nextcloud/Playlists";
|
services.mpd = {
|
||||||
extraConfig = ''
|
enable = true;
|
||||||
max_output_buffer_size "16384"
|
network.listenAddress = "any";
|
||||||
auto_update "yes"
|
musicDirectory = "${config.home.homeDirectory}/Nextcloud/Media/Music";
|
||||||
audio_output {
|
playlistDirectory = "${config.home.homeDirectory}/Nextcloud/Playlists";
|
||||||
type "pulse"
|
extraConfig = ''
|
||||||
name "pulse audio"
|
max_output_buffer_size "16384"
|
||||||
device "pulse"
|
auto_update "yes"
|
||||||
mixer_type "hardware"
|
audio_output {
|
||||||
}
|
type "pulse"
|
||||||
audio_output {
|
name "pulse audio"
|
||||||
type "fifo"
|
device "pulse"
|
||||||
name "toggle_visualizer"
|
mixer_type "hardware"
|
||||||
path "/tmp/mpd.fifo"
|
}
|
||||||
format "44100:16:2"
|
audio_output {
|
||||||
}
|
type "fifo"
|
||||||
'';
|
name "toggle_visualizer"
|
||||||
|
path "/tmp/mpd.fifo"
|
||||||
|
format "44100:16:2"
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,19 @@
|
||||||
{ inputs, config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
with lib;
|
let
|
||||||
with lib.my;
|
cfg = config.modules.media.ncmpcpp;
|
||||||
let cfg = config.modules.media.ncmpcpp;
|
in
|
||||||
in {
|
{
|
||||||
options.modules.media.ncmpcpp = { enable = mkBoolOpt false; };
|
options.modules.media.ncmpcpp = {
|
||||||
|
enable = lib.my.mkBoolOpt false;
|
||||||
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
home-manager.users.${config.user.name} = {
|
home-manager.users.${config.user.name} = {
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,28 @@
|
||||||
{ config, options, lib, home-manager, ... }:
|
{
|
||||||
|
config,
|
||||||
|
options,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
with lib;
|
{
|
||||||
with lib.my; {
|
options = {
|
||||||
options = with types; { user = mkOpt attrs { }; };
|
user = lib.my.mkOpt lib.types.attrs { };
|
||||||
|
};
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
|
|
||||||
user = {
|
user = {
|
||||||
name = "froidmpa";
|
name = "froidmpa";
|
||||||
description = "The primary user account";
|
description = "The primary user account";
|
||||||
extraGroups = [ "wheel" "adbusers" ];
|
extraGroups = [
|
||||||
|
"wheel"
|
||||||
|
"adbusers"
|
||||||
|
];
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.${config.user.name} = mkAliasDefinitions options.user;
|
users.users.${config.user.name} = lib.mkAliasDefinitions options.user;
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
useUserPackages = true;
|
useUserPackages = true;
|
||||||
|
|
@ -21,7 +30,7 @@ with lib.my; {
|
||||||
users.${config.user.name} = {
|
users.${config.user.name} = {
|
||||||
home = {
|
home = {
|
||||||
enableNixpkgsReleaseCheck = true;
|
enableNixpkgsReleaseCheck = true;
|
||||||
stateVersion = config.system.stateVersion;
|
inherit (config.system) stateVersion;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,19 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
with lib;
|
let
|
||||||
with lib.my;
|
cfg = config.modules.services.belgian-eid;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.modules.services.belgian-eid = {
|
||||||
|
enable = lib.my.mkBoolOpt false;
|
||||||
|
};
|
||||||
|
|
||||||
let cfg = config.modules.services.belgian-eid;
|
config = lib.mkIf cfg.enable {
|
||||||
in {
|
|
||||||
options.modules.services.belgian-eid = { enable = mkBoolOpt false; };
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
|
|
||||||
services.pcscd.enable = true;
|
services.pcscd.enable = true;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,25 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
with lib;
|
let
|
||||||
with lib.my;
|
cfg = config.modules.services.docker;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.modules.services.docker = {
|
||||||
|
enable = lib.my.mkBoolOpt false;
|
||||||
|
};
|
||||||
|
|
||||||
let cfg = config.modules.services.docker;
|
config = lib.mkIf cfg.enable {
|
||||||
in {
|
|
||||||
options.modules.services.docker = { enable = mkBoolOpt false; };
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
|
|
||||||
virtualisation = {
|
virtualisation = {
|
||||||
docker = {
|
docker = {
|
||||||
enable = true;
|
enable = true;
|
||||||
autoPrune.enable = true;
|
autoPrune.enable = true;
|
||||||
enableOnBoot = mkDefault false;
|
enableOnBoot = lib.mkDefault false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,19 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
with lib;
|
let
|
||||||
with lib.my;
|
cfg = config.modules.services.flatpak;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.modules.services.flatpak = {
|
||||||
|
enable = lib.my.mkBoolOpt false;
|
||||||
|
};
|
||||||
|
|
||||||
let cfg = config.modules.services.flatpak;
|
config = lib.mkIf cfg.enable {
|
||||||
in {
|
|
||||||
options.modules.services.flatpak = { enable = mkBoolOpt false; };
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
services.flatpak.enable = true;
|
services.flatpak.enable = true;
|
||||||
|
|
||||||
xdg.portal = {
|
xdg.portal = {
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,14 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, ... }:
|
||||||
|
|
||||||
with lib;
|
let
|
||||||
with lib.my;
|
cfg = config.modules.services.languagetool;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.modules.services.languagetool = {
|
||||||
|
enable = lib.my.mkBoolOpt false;
|
||||||
|
};
|
||||||
|
|
||||||
let cfg = config.modules.services.languagetool;
|
config = lib.mkIf cfg.enable {
|
||||||
in {
|
|
||||||
options.modules.services.languagetool = { enable = mkBoolOpt false; };
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
services.languagetool = {
|
services.languagetool = {
|
||||||
enable = true;
|
enable = true;
|
||||||
allowOrigin = "*";
|
allowOrigin = "*";
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,19 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
with lib;
|
let
|
||||||
with lib.my;
|
cfg = config.modules.services.libvirt;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.modules.services.libvirt = {
|
||||||
|
enable = lib.my.mkBoolOpt false;
|
||||||
|
};
|
||||||
|
|
||||||
let cfg = config.modules.services.libvirt;
|
config = lib.mkIf cfg.enable {
|
||||||
in {
|
|
||||||
options.modules.services.libvirt = { enable = mkBoolOpt false; };
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
|
|
||||||
virtualisation = {
|
virtualisation = {
|
||||||
libvirtd.enable = true;
|
libvirtd.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1 @@
|
||||||
final: prev: {
|
final: prev: { activitywatch-bin = prev.callPackage ./packages/activitywatch.nix { }; }
|
||||||
activitywatch-bin = prev.callPackage ./packages/activitywatch.nix { };
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,13 @@
|
||||||
{ lib
|
{
|
||||||
, stdenv
|
lib,
|
||||||
, fetchzip
|
stdenv,
|
||||||
, autoPatchelfHook
|
fetchzip,
|
||||||
, libGL
|
autoPatchelfHook,
|
||||||
, freetype
|
libGL,
|
||||||
, libdrm
|
freetype,
|
||||||
, fontconfig
|
libdrm,
|
||||||
, harfbuzz
|
fontconfig,
|
||||||
|
harfbuzz,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
|
|
@ -18,7 +19,14 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "sha256-4lfUxJTBpjrsRO+pmW7DNKV69tMr2wiarA5Fy4wPgMk=";
|
sha256 = "sha256-4lfUxJTBpjrsRO+pmW7DNKV69tMr2wiarA5Fy4wPgMk=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ autoPatchelfHook libGL freetype libdrm fontconfig harfbuzz ];
|
nativeBuildInputs = [
|
||||||
|
autoPatchelfHook
|
||||||
|
libGL
|
||||||
|
freetype
|
||||||
|
libdrm
|
||||||
|
fontconfig
|
||||||
|
harfbuzz
|
||||||
|
];
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
cp -r * $out/
|
cp -r * $out/
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue