Modularize everything
This commit is contained in:
parent
d5cbf61286
commit
68d301c666
21 changed files with 536 additions and 240 deletions
22
modules/services/belgian-eid.nix
Normal file
22
modules/services/belgian-eid.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
with lib.my;
|
||||
|
||||
let cfg = config.modules.services.belgian-eid;
|
||||
in {
|
||||
options.modules.services.belgian-eid = { enable = mkBoolOpt false; };
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(final: prev: {
|
||||
firefox = prev.firefox.override { pkcs11Modules = [ prev.eid-mw ]; };
|
||||
})
|
||||
];
|
||||
|
||||
services.pcscd.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs.unstable; [ eid-mw ];
|
||||
};
|
||||
}
|
||||
18
modules/services/docker.nix
Normal file
18
modules/services/docker.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
with lib.my;
|
||||
|
||||
let cfg = config.modules.services.docker;
|
||||
in {
|
||||
options.modules.services.docker = { enable = mkBoolOpt false; };
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
virtualisation.docker.enable = true;
|
||||
users.users.froidmpa.extraGroups = [ "docker" ];
|
||||
|
||||
environment.systemPackages = with pkgs; [ docker-compose ];
|
||||
|
||||
};
|
||||
}
|
||||
19
modules/services/flatpak.nix
Normal file
19
modules/services/flatpak.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
with lib.my;
|
||||
|
||||
let cfg = config.modules.services.flatpak;
|
||||
in {
|
||||
options.modules.services.flatpak = { enable = mkBoolOpt false; };
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.flatpak.enable = true;
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
20
modules/services/libvirt.nix
Normal file
20
modules/services/libvirt.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
with lib.my;
|
||||
|
||||
let cfg = config.modules.services.libvirt;
|
||||
in {
|
||||
options.modules.services.libvirt = { enable = mkBoolOpt false; };
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
virtualisation = {
|
||||
libvirtd.enable = true;
|
||||
spiceUSBRedirection.enable = true;
|
||||
};
|
||||
users.users.froidmpa.extraGroups = [ "libvirtd" ];
|
||||
|
||||
environment.systemPackages = with pkgs; [ virt-manager ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue