fixed linting
This commit is contained in:
parent
6105d8bc05
commit
0933b2b504
59 changed files with 2843 additions and 2638 deletions
23
flake.nix
23
flake.nix
|
@ -46,8 +46,17 @@
|
||||||
attic.url = "github:zhaofengli/attic";
|
attic.url = "github:zhaofengli/attic";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, nixpkgs_stable, vault-secrets, colmena
|
outputs =
|
||||||
, nixos-generators, nur, attic, ... }@inputs:
|
{ self
|
||||||
|
, nixpkgs
|
||||||
|
, nixpkgs_stable
|
||||||
|
, vault-secrets
|
||||||
|
, colmena
|
||||||
|
, nixos-generators
|
||||||
|
, nur
|
||||||
|
, attic
|
||||||
|
, ...
|
||||||
|
}@inputs:
|
||||||
let
|
let
|
||||||
inherit (nixpkgs) lib;
|
inherit (nixpkgs) lib;
|
||||||
|
|
||||||
|
@ -81,7 +90,8 @@
|
||||||
source /etc/set-environment
|
source /etc/set-environment
|
||||||
nix repl --file "${./.}/repl.nix" $@
|
nix repl --file "${./.}/repl.nix" $@
|
||||||
'';
|
'';
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
# Make the nixosConfigurations for compat reasons (e.g. vault)
|
# Make the nixosConfigurations for compat reasons (e.g. vault)
|
||||||
nixosConfigurations =
|
nixosConfigurations =
|
||||||
(import (inputs.colmena + "/src/nix/hive/eval.nix") {
|
(import (inputs.colmena + "/src/nix/hive/eval.nix") {
|
||||||
|
@ -93,12 +103,14 @@
|
||||||
}).nodes;
|
}).nodes;
|
||||||
|
|
||||||
# Make the colmena configuration
|
# Make the colmena configuration
|
||||||
colmena = lib.foldr (el: acc: acc // util.mkColmenaHost el) {
|
colmena = lib.foldr (el: acc: acc // util.mkColmenaHost el)
|
||||||
|
{
|
||||||
meta = {
|
meta = {
|
||||||
inherit specialArgs;
|
inherit specialArgs;
|
||||||
nixpkgs = pkgs;
|
nixpkgs = pkgs;
|
||||||
};
|
};
|
||||||
} nixHosts;
|
}
|
||||||
|
nixHosts;
|
||||||
|
|
||||||
packages.${system} = {
|
packages.${system} = {
|
||||||
inherit apply-local;
|
inherit apply-local;
|
||||||
|
@ -137,6 +149,7 @@
|
||||||
statix
|
statix
|
||||||
terraform
|
terraform
|
||||||
nixfmt
|
nixfmt
|
||||||
|
nixpkgs-fmt
|
||||||
nixUnstable
|
nixUnstable
|
||||||
nil
|
nil
|
||||||
vault
|
vault
|
||||||
|
|
|
@ -2,10 +2,12 @@
|
||||||
imports =
|
imports =
|
||||||
[ ./users ./modules inputs.vault-secrets.nixosModules.vault-secrets ];
|
[ ./users ./modules inputs.vault-secrets.nixosModules.vault-secrets ];
|
||||||
|
|
||||||
vault-secrets = let
|
vault-secrets =
|
||||||
|
let
|
||||||
inherit (config.networking) domain hostName;
|
inherit (config.networking) domain hostName;
|
||||||
server = if domain == "olympus" then "vault" else "vault-0";
|
server = if domain == "olympus" then "vault" else "vault-0";
|
||||||
in lib.mkIf (domain == "olympus" || domain == "hades") {
|
in
|
||||||
|
lib.mkIf (domain == "olympus" || domain == "hades") {
|
||||||
vaultPrefix = "${domain}_secrets/nixos";
|
vaultPrefix = "${domain}_secrets/nixos";
|
||||||
vaultAddress = "http://${server}.${domain}:8200/";
|
vaultAddress = "http://${server}.${domain}:8200/";
|
||||||
approlePrefix = "${domain}-${hostName}";
|
approlePrefix = "${domain}-${hostName}";
|
||||||
|
|
|
@ -21,9 +21,26 @@
|
||||||
users.victor = import ./home.nix;
|
users.victor = import ./home.nix;
|
||||||
extraSpecialArgs = { inherit inputs; };
|
extraSpecialArgs = { inherit inputs; };
|
||||||
};
|
};
|
||||||
|
services = {
|
||||||
|
|
||||||
# Enable my config for the gnome desktop environment
|
# Enable my config for the gnome desktop environment
|
||||||
services.v.gnome.enable = true;
|
v.gnome.enable = true;
|
||||||
|
|
||||||
|
# Enable CUPS to print documents.
|
||||||
|
printing.enable = true;
|
||||||
|
pipewire = {
|
||||||
|
enable = true;
|
||||||
|
alsa.enable = true;
|
||||||
|
alsa.support32Bit = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
# If you want to use JACK applications, uncomment this
|
||||||
|
#jack.enable = true;
|
||||||
|
|
||||||
|
# use the example session manager (no others are packaged yet so this is enabled by default,
|
||||||
|
# no need to redefine it in your config for now)
|
||||||
|
#media-session.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# Set your time zone.
|
# Set your time zone.
|
||||||
time.timeZone = "Europe/Amsterdam";
|
time.timeZone = "Europe/Amsterdam";
|
||||||
|
@ -42,9 +59,6 @@
|
||||||
LC_TIME = "nl_NL.UTF-8";
|
LC_TIME = "nl_NL.UTF-8";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Enable CUPS to print documents.
|
|
||||||
services.printing.enable = true;
|
|
||||||
|
|
||||||
# Global Packages
|
# Global Packages
|
||||||
environment = { systemPackages = with pkgs; [ wireguard-tools sbctl ]; };
|
environment = { systemPackages = with pkgs; [ wireguard-tools sbctl ]; };
|
||||||
|
|
||||||
|
@ -52,18 +66,6 @@
|
||||||
sound.enable = true;
|
sound.enable = true;
|
||||||
hardware.pulseaudio.enable = false;
|
hardware.pulseaudio.enable = false;
|
||||||
security.rtkit.enable = true;
|
security.rtkit.enable = true;
|
||||||
services.pipewire = {
|
|
||||||
enable = true;
|
|
||||||
alsa.enable = true;
|
|
||||||
alsa.support32Bit = true;
|
|
||||||
pulse.enable = true;
|
|
||||||
# If you want to use JACK applications, uncomment this
|
|
||||||
#jack.enable = true;
|
|
||||||
|
|
||||||
# use the example session manager (no others are packaged yet so this is enabled by default,
|
|
||||||
# no need to redefine it in your config for now)
|
|
||||||
#media-session.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
virtualisation = {
|
virtualisation = {
|
||||||
podman.enable = true;
|
podman.enable = true;
|
||||||
|
@ -84,8 +86,10 @@
|
||||||
[ "DejaVuSansMono" "Ubuntu" "DroidSansMono" "NerdFontsSymbolsOnly" ];
|
[ "DejaVuSansMono" "Ubuntu" "DroidSansMono" "NerdFontsSymbolsOnly" ];
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
programs = {
|
||||||
|
steam = {
|
||||||
|
|
||||||
|
|
||||||
programs.steam = {
|
|
||||||
enable = true;
|
enable = true;
|
||||||
# Open ports in the firewall for Steam Remote Play
|
# Open ports in the firewall for Steam Remote Play
|
||||||
remotePlay.openFirewall = true;
|
remotePlay.openFirewall = true;
|
||||||
|
@ -94,11 +98,15 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.gamemode.enable = true;
|
|
||||||
|
|
||||||
programs.adb.enable = true;
|
gamemode.enable = true;
|
||||||
|
|
||||||
|
adb.enable = true;
|
||||||
|
};
|
||||||
|
networking = {
|
||||||
# Networking
|
# Networking
|
||||||
networking.networkmanager.enable = true;
|
networkmanager.enable = true;
|
||||||
networking.firewall.checkReversePath = false;
|
firewall.checkReversePath = false;
|
||||||
networking.firewall.enable = false;
|
firewall.enable = false;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,8 @@ let
|
||||||
dnd-5e-latex-template = { pkgs = [ pkgs.v.dnd-5e-latex-template ]; };
|
dnd-5e-latex-template = { pkgs = [ pkgs.v.dnd-5e-latex-template ]; };
|
||||||
};
|
};
|
||||||
my-python-packages = ps: with ps; [ pandas requests numpy ];
|
my-python-packages = ps: with ps; [ pandas requests numpy ];
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
(python3.withPackages my-python-packages)
|
(python3.withPackages my-python-packages)
|
||||||
btop
|
btop
|
||||||
|
@ -37,40 +38,43 @@ in {
|
||||||
|
|
||||||
# Enable my own hm modules
|
# Enable my own hm modules
|
||||||
themes.v.catppuccin.enable = true;
|
themes.v.catppuccin.enable = true;
|
||||||
programs.v.vscode.enable = true;
|
programs = {
|
||||||
|
v.vscode.enable = true;
|
||||||
|
|
||||||
programs.riff = {
|
riff = {
|
||||||
enable = true;
|
enable = true;
|
||||||
direnv = true;
|
direnv = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.firefox.enable = true;
|
firefox.enable = true;
|
||||||
|
|
||||||
programs.chromium = {
|
chromium = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.ungoogled-chromium;
|
package = pkgs.ungoogled-chromium;
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.direnv = {
|
direnv = {
|
||||||
enable = true;
|
enable = true;
|
||||||
nix-direnv.enable = true;
|
nix-direnv.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.zsh = {
|
zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
sessionVariables = { DIRENV_LOG_FORMAT = ""; };
|
sessionVariables = { DIRENV_LOG_FORMAT = ""; };
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.thunderbird = {
|
thunderbird = {
|
||||||
enable = true;
|
enable = true;
|
||||||
profiles.default = {
|
profiles.default = {
|
||||||
isDefault = true;
|
isDefault = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# Syncthing
|
# Syncthing
|
||||||
services.syncthing.enable = true;
|
services.syncthing.enable = true;
|
||||||
xdg.userDirs = let home = config.home.homeDirectory;
|
xdg.userDirs =
|
||||||
|
let home = config.home.homeDirectory;
|
||||||
in {
|
in {
|
||||||
enable = true;
|
enable = true;
|
||||||
createDirectories = true;
|
createDirectories = true;
|
||||||
|
|
|
@ -3,10 +3,12 @@ with lib;
|
||||||
let cfg = config.themes.v.catppuccin;
|
let cfg = config.themes.v.catppuccin;
|
||||||
in {
|
in {
|
||||||
options.themes.v.catppuccin = { enable = mkEnableOption "catppuccin"; };
|
options.themes.v.catppuccin = { enable = mkEnableOption "catppuccin"; };
|
||||||
config = let
|
config =
|
||||||
|
let
|
||||||
theme = "Catppuccin-Pink-Dark";
|
theme = "Catppuccin-Pink-Dark";
|
||||||
cursorTheme = config.home.pointerCursor.name;
|
cursorTheme = config.home.pointerCursor.name;
|
||||||
in mkIf cfg.enable {
|
in
|
||||||
|
mkIf cfg.enable {
|
||||||
home.pointerCursor = {
|
home.pointerCursor = {
|
||||||
name = "Bibata_Ghost";
|
name = "Bibata_Ghost";
|
||||||
size = 24;
|
size = 24;
|
||||||
|
|
|
@ -65,12 +65,14 @@ in {
|
||||||
comment-nvim = { enable = true; };
|
comment-nvim = { enable = true; };
|
||||||
lsp = {
|
lsp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
servers.nil_ls.enable = true;
|
servers = {
|
||||||
servers.rust-analyzer.enable = true;
|
nil_ls.enable = true;
|
||||||
servers.pyright.enable = true;
|
rust-analyzer.enable = true;
|
||||||
servers.elixirls.enable = true;
|
pyright.enable = true;
|
||||||
servers.clangd.enable = true;
|
elixirls.enable = true;
|
||||||
servers.yamlls.enable = true;
|
clangd.enable = true;
|
||||||
|
yamlls.enable = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
trouble.enable = true;
|
trouble.enable = true;
|
||||||
lspkind.enable = true;
|
lspkind.enable = true;
|
||||||
|
|
|
@ -15,7 +15,8 @@ let
|
||||||
ptr6Data = { hostname, realm, ip6, ... }: ''"${ip6} ${hostname}.${realm}"'';
|
ptr6Data = { hostname, realm, ip6, ... }: ''"${ip6} ${hostname}.${realm}"'';
|
||||||
|
|
||||||
cfg = config.services.v.dns;
|
cfg = config.services.v.dns;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.services.v.dns = {
|
options.services.v.dns = {
|
||||||
enable = mkEnableOption "v.dns";
|
enable = mkEnableOption "v.dns";
|
||||||
|
|
||||||
|
@ -47,7 +48,7 @@ in {
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
networking.firewall = mkIf cfg.openFirewall {
|
networking.firewall = mkIf cfg.openFirewall {
|
||||||
allowedTCPPorts = [ 53 ] ;
|
allowedTCPPorts = [ 53 ];
|
||||||
allowedUDPPorts = [ 53 ];
|
allowedUDPPorts = [ 53 ];
|
||||||
};
|
};
|
||||||
services.prometheus.exporters.unbound = mkIf cfg.enableMetrics {
|
services.prometheus.exporters.unbound = mkIf cfg.enableMetrics {
|
||||||
|
|
|
@ -14,22 +14,28 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
services.xserver.enable = true;
|
services = {
|
||||||
services.xserver.excludePackages = [ pkgs.xterm ];
|
xserver = {
|
||||||
|
enable = true;
|
||||||
|
excludePackages = [ pkgs.xterm ];
|
||||||
|
|
||||||
|
# Configure keymap in X11
|
||||||
|
|
||||||
|
layout = "us";
|
||||||
|
xkbVariant = "altgr-intl";
|
||||||
|
|
||||||
|
|
||||||
|
# Enable the GNOME Desktop Environment.
|
||||||
|
displayManager.gdm.enable = true;
|
||||||
|
desktopManager.gnome.enable = true;
|
||||||
|
};
|
||||||
|
udev.packages = with pkgs; [ gnome.gnome-settings-daemon ];
|
||||||
|
dbus.enable = true;
|
||||||
|
udisks2.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
# Add Home-manager dconf stuff
|
# Add Home-manager dconf stuff
|
||||||
home-manager.sharedModules = mkIf cfg.hm [ ./hm.nix ];
|
home-manager.sharedModules = mkIf cfg.hm [ ./hm.nix ];
|
||||||
|
|
||||||
# Configure keymap in X11
|
|
||||||
services.xserver = {
|
|
||||||
layout = "us";
|
|
||||||
xkbVariant = "altgr-intl";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Enable the GNOME Desktop Environment.
|
|
||||||
services.xserver.displayManager.gdm.enable = true;
|
|
||||||
services.xserver.desktopManager.gnome.enable = true;
|
|
||||||
services.udev.packages = with pkgs; [ gnome.gnome-settings-daemon ];
|
|
||||||
environment.gnome.excludePackages =
|
environment.gnome.excludePackages =
|
||||||
(with pkgs; [ gnome-photos gnome-tour gnome-connections ])
|
(with pkgs; [ gnome-photos gnome-tour gnome-connections ])
|
||||||
++ (with pkgs.gnome; [
|
++ (with pkgs.gnome; [
|
||||||
|
@ -54,8 +60,6 @@ in {
|
||||||
|
|
||||||
# Services required for gnome
|
# Services required for gnome
|
||||||
programs.dconf.enable = true;
|
programs.dconf.enable = true;
|
||||||
services.dbus.enable = true;
|
|
||||||
services.udisks2.enable = true;
|
|
||||||
|
|
||||||
# Extra gnome packages
|
# Extra gnome packages
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
|
|
@ -7,15 +7,18 @@ let
|
||||||
generate_custom_keybindings = binds:
|
generate_custom_keybindings = binds:
|
||||||
{
|
{
|
||||||
"org/gnome/settings-daemon/plugins/media-keys" = {
|
"org/gnome/settings-daemon/plugins/media-keys" = {
|
||||||
custom-keybindings = map (name:
|
custom-keybindings = map
|
||||||
|
(name:
|
||||||
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/${name}/")
|
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/${name}/")
|
||||||
(attrNames binds);
|
(attrNames binds);
|
||||||
};
|
};
|
||||||
} // mapAttrs' (name:
|
} // mapAttrs'
|
||||||
|
(name:
|
||||||
nameValuePair
|
nameValuePair
|
||||||
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/${name}")
|
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/${name}")
|
||||||
binds;
|
binds;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
xdg.mimeApps.enable = true;
|
xdg.mimeApps.enable = true;
|
||||||
xdg.mimeApps.defaultApplications = {
|
xdg.mimeApps.defaultApplications = {
|
||||||
"text/plain" = "org.gnome.TextEditor.desktop";
|
"text/plain" = "org.gnome.TextEditor.desktop";
|
||||||
|
|
|
@ -20,7 +20,8 @@ let
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.meta = {
|
options.meta = {
|
||||||
|
|
||||||
exposes = mkOption {
|
exposes = mkOption {
|
||||||
|
@ -38,6 +39,5 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = { };
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,8 @@ in {
|
||||||
options.services.v.nginx.autoExpose =
|
options.services.v.nginx.autoExpose =
|
||||||
mkEnableOption "generate vhosts";
|
mkEnableOption "generate vhosts";
|
||||||
|
|
||||||
config = let
|
config =
|
||||||
|
let
|
||||||
|
|
||||||
proxy = url: {
|
proxy = url: {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
|
@ -19,12 +20,13 @@ in {
|
||||||
hosts' =
|
hosts' =
|
||||||
filter (hasAttr "exposes") (attrValues hosts.${config.networking.domain});
|
filter (hasAttr "exposes") (attrValues hosts.${config.networking.domain});
|
||||||
exposes = { ip, exposes, ... }:
|
exposes = { ip, exposes, ... }:
|
||||||
map ({ domain, port ? 80}: { inherit ip domain port; }) (attrValues exposes);
|
map ({ domain, port ? 80 }: { inherit ip domain port; }) (attrValues exposes);
|
||||||
mkVhost = { ip, domain, port}: {
|
mkVhost = { ip, domain, port }: {
|
||||||
"${domain}" = proxy "http://${ip}:${toString port}";
|
"${domain}" = proxy "http://${ip}:${toString port}";
|
||||||
};
|
};
|
||||||
vhosts = foldr (el: acc: acc // mkVhost el) { } (concatMap exposes hosts');
|
vhosts = foldr (el: acc: acc // mkVhost el) { } (concatMap exposes hosts');
|
||||||
in mkIf cfg.autoExpose {
|
in
|
||||||
|
mkIf cfg.autoExpose {
|
||||||
services.nginx.virtualHosts = vhosts;
|
services.nginx.virtualHosts = vhosts;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,7 +57,8 @@ let
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.services.unpackerr = {
|
options.services.unpackerr = {
|
||||||
enable = mkEnableOption "unpackerr";
|
enable = mkEnableOption "unpackerr";
|
||||||
|
|
||||||
|
@ -257,7 +258,8 @@ in {
|
||||||
after = [ "network.target" ];
|
after = [ "network.target" ];
|
||||||
description = "unpackerr system service";
|
description = "unpackerr system service";
|
||||||
# Filter out all unset variables else unpackerr complains
|
# Filter out all unset variables else unpackerr complains
|
||||||
environment = filterAttrs (_n: v: stringLength v > 0) {
|
environment = filterAttrs (_n: v: stringLength v > 0)
|
||||||
|
{
|
||||||
# General options
|
# General options
|
||||||
UN_DEBUG = "${toString cfg.debug}";
|
UN_DEBUG = "${toString cfg.debug}";
|
||||||
UN_INTERVAL = "${cfg.interval}";
|
UN_INTERVAL = "${cfg.interval}";
|
||||||
|
|
|
@ -8,12 +8,15 @@ let
|
||||||
vault_hosts =
|
vault_hosts =
|
||||||
filter ({ tags ? [ ], ip ? "", ... }: (elem "vault" tags) && (ip != hostIP))
|
filter ({ tags ? [ ], ip ? "", ... }: (elem "vault" tags) && (ip != hostIP))
|
||||||
flat_hosts;
|
flat_hosts;
|
||||||
cluster_config = concatStrings (map ({ ip, ... }: ''
|
cluster_config = concatStrings (map
|
||||||
|
({ ip, ... }: ''
|
||||||
retry_join {
|
retry_join {
|
||||||
leader_api_addr = "http://${ip}:${toString cfg.port}"
|
leader_api_addr = "http://${ip}:${toString cfg.port}"
|
||||||
}
|
}
|
||||||
'') vault_hosts);
|
'')
|
||||||
in {
|
vault_hosts);
|
||||||
|
in
|
||||||
|
{
|
||||||
options.services.v.vault = {
|
options.services.v.vault = {
|
||||||
enable = mkEnableOption "v's vault";
|
enable = mkEnableOption "v's vault";
|
||||||
|
|
||||||
|
|
|
@ -23,23 +23,27 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users.victor = {
|
home-manager.users.victor = {
|
||||||
programs.home-manager.enable = true;
|
programs = {
|
||||||
|
home-manager.enable = true;
|
||||||
|
|
||||||
home.username = "victor";
|
v.nvim.enable = true;
|
||||||
home.homeDirectory = "/home/victor";
|
v.git.enable = true;
|
||||||
home.stateVersion = "23.05";
|
|
||||||
|
|
||||||
programs.v.nvim.enable = true;
|
tmux = {
|
||||||
programs.v.git.enable = true;
|
|
||||||
|
|
||||||
programs.tmux = {
|
|
||||||
enable = true;
|
enable = true;
|
||||||
shortcut = "b";
|
shortcut = "b";
|
||||||
terminal = "screen-256color";
|
terminal = "screen-256color";
|
||||||
clock24 = true;
|
clock24 = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.bat.enable = true;
|
bat.enable = true;
|
||||||
|
};
|
||||||
|
home = {
|
||||||
|
|
||||||
|
username = "victor";
|
||||||
|
homeDirectory = "/home/victor";
|
||||||
|
stateVersion = "23.05";
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,8 @@ let
|
||||||
# https://github.com/immich-app/immich/releases
|
# https://github.com/immich-app/immich/releases
|
||||||
# version = "1.55.1";
|
# version = "1.55.1";
|
||||||
dataDir = "/var/lib/immich";
|
dataDir = "/var/lib/immich";
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
imports = [ ];
|
imports = [ ];
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
# This value determines the NixOS release from which the default
|
||||||
|
|
|
@ -24,7 +24,8 @@ let
|
||||||
|
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
};
|
};
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
imports = [ ./hardware-configuration.nix ];
|
imports = [ ./hardware-configuration.nix ];
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
# This value determines the NixOS release from which the default
|
||||||
|
@ -46,10 +47,12 @@ in {
|
||||||
trivy
|
trivy
|
||||||
wapiti
|
wapiti
|
||||||
];
|
];
|
||||||
|
boot.loader = {
|
||||||
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
efi.canTouchEfiVariables = true;
|
||||||
boot.loader.efi.efiSysMountPoint = "/boot";
|
efi.efiSysMountPoint = "/boot";
|
||||||
|
};
|
||||||
|
|
||||||
virtualisation.docker.enable = true;
|
virtualisation.docker.enable = true;
|
||||||
|
|
||||||
|
|
|
@ -5,8 +5,9 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
|
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
|
||||||
|
boot = {
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [
|
initrd.availableKernelModules = [
|
||||||
"uhci_hcd"
|
"uhci_hcd"
|
||||||
"ehci_pci"
|
"ehci_pci"
|
||||||
"ahci"
|
"ahci"
|
||||||
|
@ -15,9 +16,10 @@
|
||||||
"sd_mod"
|
"sd_mod"
|
||||||
"sr_mod"
|
"sr_mod"
|
||||||
];
|
];
|
||||||
boot.initrd.kernelModules = [ ];
|
initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ ];
|
kernelModules = [ ];
|
||||||
boot.extraModulePackages = [ ];
|
extraModulePackages = [ ];
|
||||||
|
};
|
||||||
|
|
||||||
fileSystems."/" = {
|
fileSystems."/" = {
|
||||||
device = "/dev/disk/by-uuid/749c02fd-209d-4974-917e-38b749d10ec2";
|
device = "/dev/disk/by-uuid/749c02fd-209d-4974-917e-38b749d10ec2";
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
let
|
let
|
||||||
vs = config.vault-secrets.secrets;
|
vs = config.vault-secrets.secrets;
|
||||||
cfg = config.services.mastodon;
|
cfg = config.services.mastodon;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
system.stateVersion = "21.05";
|
system.stateVersion = "21.05";
|
||||||
# Use DHCP with static leases
|
# Use DHCP with static leases
|
||||||
networking.interfaces.eth0.useDHCP = true;
|
networking.interfaces.eth0.useDHCP = true;
|
||||||
|
@ -100,6 +101,7 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.firewall = let cfg = config.services.mastodon;
|
networking.firewall =
|
||||||
|
let cfg = config.services.mastodon;
|
||||||
in { allowedTCPPorts = [ cfg.streamingPort cfg.webPort ]; };
|
in { allowedTCPPorts = [ cfg.streamingPort cfg.webPort ]; };
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,8 @@ let
|
||||||
proxyWebsockets = true;
|
proxyWebsockets = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
imports = [ ];
|
imports = [ ];
|
||||||
|
|
||||||
nixpkgs.config.permittedInsecurePackages = [ "openssl-1.1.1t" ];
|
nixpkgs.config.permittedInsecurePackages = [ "openssl-1.1.1t" ];
|
||||||
|
@ -25,10 +26,12 @@ in {
|
||||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||||
system.stateVersion = "23.05"; # Did you read the comment?
|
system.stateVersion = "23.05"; # Did you read the comment?
|
||||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||||
|
security.acme = {
|
||||||
|
|
||||||
security.acme.defaults.email = "victorheld12@gmail.com";
|
defaults.email = "victorheld12@gmail.com";
|
||||||
security.acme.acceptTerms = true;
|
acceptTerms = true;
|
||||||
security.acme.preliminarySelfsigned = true;
|
preliminarySelfsigned = true;
|
||||||
|
};
|
||||||
|
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -39,12 +42,13 @@ in {
|
||||||
clientMaxBodySize = "1024m";
|
clientMaxBodySize = "1024m";
|
||||||
|
|
||||||
package = pkgs.nginxMainline;
|
package = pkgs.nginxMainline;
|
||||||
|
virtualHosts = {
|
||||||
|
|
||||||
virtualHosts."cshub.nl" = proxy "http://192.168.0.113";
|
"cshub.nl" = proxy "http://192.168.0.113";
|
||||||
virtualHosts."api.cshub.nl" = proxy "http://192.168.0.113";
|
"api.cshub.nl" = proxy "http://192.168.0.113";
|
||||||
|
|
||||||
virtualHosts."ha.xirion.net" = proxy "http://192.168.0.129:8123";
|
"ha.xirion.net" = proxy "http://192.168.0.129:8123";
|
||||||
virtualHosts."xirion.net" = {
|
"xirion.net" = {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
locations."/".extraConfig = ''
|
locations."/".extraConfig = ''
|
||||||
|
@ -56,20 +60,20 @@ in {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
# virtualHosts."blog.xirion.net" = proxy "http://10.10.10.12";
|
# virtualHosts."blog.xirion.net" = proxy "http://10.10.10.12";
|
||||||
virtualHosts."git.xirion.net" = proxy "http://10.10.10.12";
|
"git.xirion.net" = proxy "http://10.10.10.12";
|
||||||
# virtualHosts."mail.xirion.net" = proxy "http://192.168.0.118";
|
# virtualHosts."mail.xirion.net" = proxy "http://192.168.0.118";
|
||||||
virtualHosts."o.xirion.net" = proxy "http://192.168.0.112:9000";
|
"o.xirion.net" = proxy "http://192.168.0.112:9000";
|
||||||
virtualHosts."g.xirion.net" = proxy "http://garage.hades:3900";
|
"g.xirion.net" = proxy "http://garage.hades:3900";
|
||||||
virtualHosts."requests.xirion.net" = proxy "http://overseerr.hades:5055";
|
"requests.xirion.net" = proxy "http://overseerr.hades:5055";
|
||||||
virtualHosts."pass.xirion.net" = proxy "http://bitwarden_rs";
|
"pass.xirion.net" = proxy "http://bitwarden_rs";
|
||||||
virtualHosts."repo.xirion.net" = proxy "http://archlinux";
|
"repo.xirion.net" = proxy "http://archlinux";
|
||||||
virtualHosts."thelounge.xirion.net" = proxy "http://thelounge:9000";
|
"thelounge.xirion.net" = proxy "http://thelounge:9000";
|
||||||
virtualHosts."attic.xirion.net" = proxy "http://attic.hades:8080";
|
"attic.xirion.net" = proxy "http://attic.hades:8080";
|
||||||
|
|
||||||
virtualHosts."tautulli.xirion.net" = proxy "http://tautulli.hades:8080";
|
"tautulli.xirion.net" = proxy "http://tautulli.hades:8080";
|
||||||
virtualHosts."peepeepoopoo.xirion.net" = proxy "http://tautulli.hades:8080"; # Deprecated but Ricardo has it bookmarked already!
|
"peepeepoopoo.xirion.net" = proxy "http://tautulli.hades:8080"; # Deprecated but Ricardo has it bookmarked already!
|
||||||
|
|
||||||
virtualHosts."registry.xirion.net" = proxy "http://docker-registry:5000"
|
"registry.xirion.net" = proxy "http://docker-registry:5000"
|
||||||
// {
|
// {
|
||||||
locations."/".extraConfig = ''
|
locations."/".extraConfig = ''
|
||||||
allow 127.0.0.1;
|
allow 127.0.0.1;
|
||||||
|
@ -83,7 +87,7 @@ in {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
virtualHosts."plex.xirion.net" = {
|
"plex.xirion.net" = {
|
||||||
# Since we want a secure connection, we force SSL
|
# Since we want a secure connection, we force SSL
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
|
@ -138,12 +142,13 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
virtualHosts."fedi.xirion.net" = {
|
"fedi.xirion.net" = {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
|
|
||||||
root = "${pkgs.v.glitch-soc}/public/";
|
root = "${pkgs.v.glitch-soc}/public/";
|
||||||
locations."/".tryFiles = "$uri @proxy";
|
locations = {
|
||||||
|
"/".tryFiles = "$uri @proxy";
|
||||||
|
|
||||||
# location ~ ^/(emoji|packs|system/accounts/avatars|system/media_attachments/files) {
|
# location ~ ^/(emoji|packs|system/accounts/avatars|system/media_attachments/files) {
|
||||||
# add_header Cache-Control "public, max-age=31536000, immutable";
|
# add_header Cache-Control "public, max-age=31536000, immutable";
|
||||||
|
@ -157,17 +162,19 @@ in {
|
||||||
# try_files $uri @proxy;
|
# try_files $uri @proxy;
|
||||||
# }
|
# }
|
||||||
|
|
||||||
locations."@proxy" = {
|
"@proxy" = {
|
||||||
proxyPass = "http://192.168.0.138:55001";
|
proxyPass = "http://192.168.0.138:55001";
|
||||||
proxyWebsockets = true;
|
proxyWebsockets = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
locations."/api/v1/streaming" = {
|
"/api/v1/streaming" = {
|
||||||
proxyPass = "http://192.168.0.138:55000";
|
proxyPass = "http://192.168.0.138:55000";
|
||||||
proxyWebsockets = true;
|
proxyWebsockets = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
virtualHosts."fedi-media.xirion.net" = proxy "http://garage.hades:3902";
|
"fedi-media.xirion.net" = proxy "http://garage.hades:3902";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,8 @@ let
|
||||||
-v "/etc/pmm/TVShows.yml:/config/TVShows.yml:ro" \
|
-v "/etc/pmm/TVShows.yml:/config/TVShows.yml:ro" \
|
||||||
${container} --run
|
${container} --run
|
||||||
'';
|
'';
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
imports = [ ];
|
imports = [ ];
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
# This value determines the NixOS release from which the default
|
||||||
|
|
|
@ -21,13 +21,15 @@ in {
|
||||||
vault-secrets.secrets.rtorrent = { services = [ "wg-quick-wg0" ]; };
|
vault-secrets.secrets.rtorrent = { services = [ "wg-quick-wg0" ]; };
|
||||||
|
|
||||||
# Mullvad VPN
|
# Mullvad VPN
|
||||||
networking.wg-quick.interfaces = let
|
networking.wg-quick.interfaces =
|
||||||
|
let
|
||||||
postUpScript = pkgs.writeScriptBin "post_up" ''
|
postUpScript = pkgs.writeScriptBin "post_up" ''
|
||||||
#!${pkgs.stdenv.shell}
|
#!${pkgs.stdenv.shell}
|
||||||
${pkgs.iproute2}/bin/ip route add 10.42.42.0/23 via 192.168.0.1
|
${pkgs.iproute2}/bin/ip route add 10.42.42.0/23 via 192.168.0.1
|
||||||
${pkgs.iproute2}/bin/ip route add 10.100.0.0/24 via 192.168.0.1
|
${pkgs.iproute2}/bin/ip route add 10.100.0.0/24 via 192.168.0.1
|
||||||
'';
|
'';
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
wg0 = {
|
wg0 = {
|
||||||
address = [ "10.66.153.191/32" "fc00:bbbb:bbbb:bb01::3:99be/128" ];
|
address = [ "10.66.153.191/32" "fc00:bbbb:bbbb:bb01::3:99be/128" ];
|
||||||
dns = [ "10.64.0.1" ];
|
dns = [ "10.64.0.1" ];
|
||||||
|
@ -37,7 +39,7 @@ in {
|
||||||
peers = [
|
peers = [
|
||||||
{
|
{
|
||||||
publicKey = "HQHCrq4J6bSpdW1fI5hR/bvcrYa6HgGgwaa5ZY749ik=";
|
publicKey = "HQHCrq4J6bSpdW1fI5hR/bvcrYa6HgGgwaa5ZY749ik=";
|
||||||
allowedIPs = [ "0.0.0.0/0" "::/0"];
|
allowedIPs = [ "0.0.0.0/0" "::/0" ];
|
||||||
endpoint = "185.213.155.73:51820";
|
endpoint = "185.213.155.73:51820";
|
||||||
# persistentKeepalive = 25;
|
# persistentKeepalive = 25;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,8 @@
|
||||||
port = 54945; # Port Forwarded in mullvad
|
port = 54945; # Port Forwarded in mullvad
|
||||||
downloadDir = "/mnt/storage/torrents/r";
|
downloadDir = "/mnt/storage/torrents/r";
|
||||||
package = pkgs.jesec-rtorrent;
|
package = pkgs.jesec-rtorrent;
|
||||||
configText = let cfg = config.services.rtorrent;
|
configText =
|
||||||
|
let cfg = config.services.rtorrent;
|
||||||
in pkgs.lib.mkForce ''
|
in pkgs.lib.mkForce ''
|
||||||
# rTorrent runtime directory (cfg.basedir) [default: "$HOME/.local/share/rtorrent"]
|
# rTorrent runtime directory (cfg.basedir) [default: "$HOME/.local/share/rtorrent"]
|
||||||
method.insert = cfg.basedir, private|const|string, (cat,"${cfg.dataDir}/")
|
method.insert = cfg.basedir, private|const|string, (cat,"${cfg.dataDir}/")
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, lib, pkgs_stable,... }: {
|
{ pkgs, lib, pkgs_stable, ... }: {
|
||||||
system.stateVersion = "21.05";
|
system.stateVersion = "21.05";
|
||||||
networking.interfaces.eth0.useDHCP = true;
|
networking.interfaces.eth0.useDHCP = true;
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,8 @@ let
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
# Include the results of the hardware scan.
|
# Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
|
|
@ -5,12 +5,14 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
|
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
|
||||||
|
boot = {
|
||||||
|
|
||||||
boot.initrd.availableKernelModules =
|
initrd.availableKernelModules =
|
||||||
[ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ];
|
[ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ];
|
||||||
boot.initrd.kernelModules = [ ];
|
initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ ];
|
kernelModules = [ ];
|
||||||
boot.extraModulePackages = [ ];
|
extraModulePackages = [ ];
|
||||||
|
};
|
||||||
|
|
||||||
fileSystems."/" = {
|
fileSystems."/" = {
|
||||||
device = "/dev/disk/by-uuid/e8427097-8545-4924-b033-2659fcf9adca";
|
device = "/dev/disk/by-uuid/e8427097-8545-4924-b033-2659fcf9adca";
|
||||||
|
|
|
@ -9,7 +9,8 @@ let
|
||||||
db_name = "dex";
|
db_name = "dex";
|
||||||
inherit (config.meta.exposes.dex) port;
|
inherit (config.meta.exposes.dex) port;
|
||||||
metricsPort = 5558;
|
metricsPort = 5558;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
imports = [ ];
|
imports = [ ];
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
# This value determines the NixOS release from which the default
|
||||||
|
|
|
@ -10,7 +10,8 @@ let
|
||||||
hosts =
|
hosts =
|
||||||
filter (h: hasAttr "ip" h && hasAttr "mac" h && h.realm == localDomain)
|
filter (h: hasAttr "ip" h && hasAttr "mac" h && h.realm == localDomain)
|
||||||
flat_hosts;
|
flat_hosts;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
networking = {
|
networking = {
|
||||||
defaultGateway = "10.42.42.1";
|
defaultGateway = "10.42.42.1";
|
||||||
nameservers = [ "10.42.42.15" "10.42.42.16" ];
|
nameservers = [ "10.42.42.15" "10.42.42.16" ];
|
||||||
|
|
|
@ -5,12 +5,14 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
|
boot = {
|
||||||
|
|
||||||
boot.initrd.availableKernelModules =
|
initrd.availableKernelModules =
|
||||||
[ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
[ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
||||||
boot.initrd.kernelModules = [ ];
|
initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
kernelModules = [ "kvm-intel" ];
|
||||||
boot.extraModulePackages = [ ];
|
extraModulePackages = [ ];
|
||||||
|
};
|
||||||
|
|
||||||
fileSystems."/" = {
|
fileSystems."/" = {
|
||||||
device = "/dev/disk/by-uuid/947a98af-9a4e-4811-a2ca-9aa00b319e9c";
|
device = "/dev/disk/by-uuid/947a98af-9a4e-4811-a2ca-9aa00b319e9c";
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
{ pkgs, config, ... }: {
|
{ pkgs, config, ... }: {
|
||||||
hardware.enableAllFirmware = true;
|
hardware = {
|
||||||
|
enableAllFirmware = true;
|
||||||
services.hardware.bolt.enable = true;
|
nvidia = {
|
||||||
|
|
||||||
services.xserver.videoDrivers = [ "nvidia" ];
|
|
||||||
hardware.nvidia = {
|
|
||||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||||
|
|
||||||
# Open drivers cause gdm to crash
|
# Open drivers cause gdm to crash
|
||||||
|
@ -15,28 +12,35 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
# Hardware acceleration
|
# Hardware acceleration
|
||||||
hardware.opengl = {
|
opengl = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
# Vulkan
|
# Vulkan
|
||||||
driSupport = true;
|
driSupport = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
hardware.logitech.wireless = {
|
logitech.wireless = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableGraphical = true;
|
enableGraphical = true;
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
services = {
|
||||||
|
|
||||||
|
hardware.bolt.enable = true;
|
||||||
|
|
||||||
|
xserver.videoDrivers = [ "nvidia" ];
|
||||||
|
|
||||||
# udev
|
# udev
|
||||||
services.udev.packages = with pkgs; [
|
udev.packages = with pkgs; [
|
||||||
android-udev-rules
|
android-udev-rules
|
||||||
logitech-udev-rules
|
logitech-udev-rules
|
||||||
wooting-udev-rules
|
wooting-udev-rules
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# SSD Trim
|
||||||
|
fstrim.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
# FS
|
# FS
|
||||||
fileSystems."/".options = [ "compress=zstd" ];
|
fileSystems."/".options = [ "compress=zstd" ];
|
||||||
|
|
||||||
# SSD Trim
|
|
||||||
services.fstrim.enable = true;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,8 @@
|
||||||
let
|
let
|
||||||
vs = config.vault-secrets.secrets;
|
vs = config.vault-secrets.secrets;
|
||||||
inherit (config.meta.exposes.git) port;
|
inherit (config.meta.exposes.git) port;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
imports = [ ];
|
imports = [ ];
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
# This value determines the NixOS release from which the default
|
||||||
|
@ -23,27 +24,16 @@ in {
|
||||||
environment.noXlibs = lib.mkForce false;
|
environment.noXlibs = lib.mkForce false;
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [ port ];
|
networking.firewall.allowedTCPPorts = [ port ];
|
||||||
|
services = {
|
||||||
|
|
||||||
services.openssh.startWhenNeeded = false;
|
openssh.startWhenNeeded = false;
|
||||||
|
|
||||||
services.fail2ban = {
|
fail2ban = {
|
||||||
enable = true;
|
enable = true;
|
||||||
maxretry = 3;
|
maxretry = 3;
|
||||||
};
|
};
|
||||||
|
|
||||||
vault-secrets.secrets.gitea = {
|
gitea = {
|
||||||
user = "gitea";
|
|
||||||
group = "gitea";
|
|
||||||
};
|
|
||||||
|
|
||||||
system.activationScripts.gitea-theme =
|
|
||||||
let target_dir = "${config.services.gitea.stateDir}/custom/public/css/";
|
|
||||||
in lib.stringAfter [ "var" ] ''
|
|
||||||
mkdir -p ${target_dir}
|
|
||||||
ln -sf ${pkgs.v.gitea-agatheme} "${target_dir}/theme-agatheme.css"
|
|
||||||
'';
|
|
||||||
|
|
||||||
services.gitea = {
|
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.forgejo;
|
package = pkgs.forgejo;
|
||||||
lfs.enable = true;
|
lfs.enable = true;
|
||||||
|
@ -99,4 +89,17 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
vault-secrets.secrets.gitea = {
|
||||||
|
user = "gitea";
|
||||||
|
group = "gitea";
|
||||||
|
};
|
||||||
|
|
||||||
|
system.activationScripts.gitea-theme =
|
||||||
|
let target_dir = "${config.services.gitea.stateDir}/custom/public/css/";
|
||||||
|
in lib.stringAfter [ "var" ] ''
|
||||||
|
mkdir -p ${target_dir}
|
||||||
|
ln -sf ${pkgs.v.gitea-agatheme} "${target_dir}/theme-agatheme.css"
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,8 @@ let
|
||||||
db_user = "hedgedoc";
|
db_user = "hedgedoc";
|
||||||
inherit (config.meta.exposes.md) port;
|
inherit (config.meta.exposes.md) port;
|
||||||
vs = config.vault-secrets.secrets;
|
vs = config.vault-secrets.secrets;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
imports = [ ];
|
imports = [ ];
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
# This value determines the NixOS release from which the default
|
||||||
|
@ -67,7 +68,8 @@ in {
|
||||||
secretKey = "$MINIO_SECRET_KEY";
|
secretKey = "$MINIO_SECRET_KEY";
|
||||||
};
|
};
|
||||||
email = false;
|
email = false;
|
||||||
oauth2 = let url = "https://dex.0x76.dev";
|
oauth2 =
|
||||||
|
let url = "https://dex.0x76.dev";
|
||||||
in {
|
in {
|
||||||
providerName = "Dex";
|
providerName = "Dex";
|
||||||
clientID = "hedgedoc";
|
clientID = "hedgedoc";
|
||||||
|
|
|
@ -97,11 +97,12 @@ in {
|
||||||
autoIndexExclude = [ "\\Junk" ];
|
autoIndexExclude = [ "\\Junk" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
services = {
|
||||||
|
|
||||||
services.postfix.relayHost = "smtp.ziggozakelijk.nl";
|
postfix.relayHost = "smtp.ziggozakelijk.nl";
|
||||||
services.postfix.relayPort = 587;
|
postfix.relayPort = 587;
|
||||||
|
|
||||||
services.roundcube = {
|
roundcube = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.roundcube.withPlugins
|
package = pkgs.roundcube.withPlugins
|
||||||
(plugins: [ plugins.persistent_login pkgs.v.roundcube-swipe ]);
|
(plugins: [ plugins.persistent_login pkgs.v.roundcube-swipe ]);
|
||||||
|
@ -138,7 +139,8 @@ in {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
services.nginx = { enable = true; };
|
nginx = { enable = true; };
|
||||||
|
};
|
||||||
|
|
||||||
security.acme.acceptTerms = true;
|
security.acme.acceptTerms = true;
|
||||||
security.acme.defaults.email = "v@0x76.dev";
|
security.acme.defaults.email = "v@0x76.dev";
|
||||||
|
|
|
@ -7,7 +7,8 @@ let
|
||||||
vs = config.vault-secrets.secrets;
|
vs = config.vault-secrets.secrets;
|
||||||
listenPort = config.meta.exposes.minio.port;
|
listenPort = config.meta.exposes.minio.port;
|
||||||
consolePort = listenPort + 1;
|
consolePort = listenPort + 1;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
imports = [ ];
|
imports = [ ];
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
# This value determines the NixOS release from which the default
|
||||||
|
|
|
@ -13,7 +13,8 @@ let
|
||||||
add_header Access-Control-Allow-Origin *;
|
add_header Access-Control-Allow-Origin *;
|
||||||
return 200 '${builtins.toJSON data}';
|
return 200 '${builtins.toJSON data}';
|
||||||
'';
|
'';
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
# This value determines the NixOS release from which the default
|
# This value determines the NixOS release from which the default
|
||||||
# settings for stateful data, like file locations and database versions
|
# settings for stateful data, like file locations and database versions
|
||||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||||
|
@ -23,11 +24,12 @@ in {
|
||||||
system.stateVersion = "21.05"; # Did you read the comment?
|
system.stateVersion = "21.05"; # Did you read the comment?
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||||
|
services = {
|
||||||
|
|
||||||
# Generates vhosts for all hosts that have an `exposes` section
|
# Generates vhosts for all hosts that have an `exposes` section
|
||||||
services.v.nginx.autoExpose = true;
|
v.nginx.autoExpose = true;
|
||||||
|
|
||||||
services.nginx = {
|
nginx = {
|
||||||
enable = true;
|
enable = true;
|
||||||
statusPage = true;
|
statusPage = true;
|
||||||
recommendedProxySettings = true;
|
recommendedProxySettings = true;
|
||||||
|
@ -43,42 +45,47 @@ in {
|
||||||
"pass.0x76.dev" = {
|
"pass.0x76.dev" = {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
locations."/" = {
|
locations = {
|
||||||
|
|
||||||
|
"/".proxyPass = "http://vaultwarden.olympus:8222";
|
||||||
|
"/".proxyWebsockets = true;
|
||||||
|
|
||||||
|
"/notifications/hub/negotiate" = {
|
||||||
proxyPass = "http://vaultwarden.olympus:8222";
|
proxyPass = "http://vaultwarden.olympus:8222";
|
||||||
proxyWebsockets = true;
|
proxyWebsockets = true;
|
||||||
};
|
};
|
||||||
locations."/notifications/hub/negotiate" = {
|
"/notifications/hub" = {
|
||||||
proxyPass = "http://vaultwarden.olympus:8222";
|
|
||||||
proxyWebsockets = true;
|
|
||||||
};
|
|
||||||
locations."/notifications/hub" = {
|
|
||||||
proxyPass = "http://vaultwarden.olympus:3012";
|
proxyPass = "http://vaultwarden.olympus:3012";
|
||||||
proxyWebsockets = true;
|
proxyWebsockets = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# Meow
|
# Meow
|
||||||
"meowy.tech" = {
|
"meowy.tech" = {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
locations."/".extraConfig = ''
|
locations = {
|
||||||
|
"/".extraConfig = ''
|
||||||
add_header Content-Type 'text/html; charset=UTF-8';
|
add_header Content-Type 'text/html; charset=UTF-8';
|
||||||
return 200 '<h1>meow</h1>';
|
return 200 '<h1>meow</h1>';
|
||||||
'';
|
'';
|
||||||
locations."= /.well-known/matrix/client".extraConfig =
|
"= /.well-known/matrix/client".extraConfig =
|
||||||
mkWellKnown clientConfig;
|
mkWellKnown clientConfig;
|
||||||
locations."= /.well-known/matrix/server".extraConfig =
|
"= /.well-known/matrix/server".extraConfig =
|
||||||
mkWellKnown serverConfig;
|
mkWellKnown serverConfig;
|
||||||
};
|
};
|
||||||
|
};
|
||||||
"chat.meowy.tech" = {
|
"chat.meowy.tech" = {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
locations."/".extraConfig = ''
|
locations = {
|
||||||
|
"/".extraConfig = ''
|
||||||
return 307 https://element.chat.meowy.tech;
|
return 307 https://element.chat.meowy.tech;
|
||||||
'';
|
'';
|
||||||
locations."/_matrix".proxyPass = "http://synapse.olympus:8008";
|
"/_matrix".proxyPass = "http://synapse.olympus:8008";
|
||||||
locations."/_synapse/client".proxyPass = "http://synapse.olympus:8008";
|
"/_synapse/client".proxyPass = "http://synapse.olympus:8008";
|
||||||
locations."/_synapse/admin" = {
|
"/_synapse/admin" = {
|
||||||
# Allow only local and my own IPs
|
# Allow only local and my own IPs
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
allow 127.0.0.1;
|
allow 127.0.0.1;
|
||||||
|
@ -92,6 +99,7 @@ in {
|
||||||
proxyPass = "http://synapse.olympus:8008";
|
proxyPass = "http://synapse.olympus:8008";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
"element.chat.meowy.tech" = {
|
"element.chat.meowy.tech" = {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
|
@ -124,14 +132,19 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
security.acme.defaults.email = "victorheld12@gmail.com";
|
prometheus.exporters = {
|
||||||
security.acme.acceptTerms = true;
|
|
||||||
security.acme.preliminarySelfsigned = true;
|
|
||||||
|
|
||||||
services.prometheus.exporters = {
|
|
||||||
nginx = {
|
nginx = {
|
||||||
enable = true;
|
enable = true;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
security = {
|
||||||
|
acme = {
|
||||||
|
|
||||||
|
defaults.email = "victorheld12@gmail.com";
|
||||||
|
acceptTerms = true;
|
||||||
|
preliminarySelfsigned = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,8 @@
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [ 80 9090 ];
|
networking.firewall.allowedTCPPorts = [ 80 9090 ];
|
||||||
|
|
||||||
services.ntfy-sh = let datadir = "/var/lib/ntfy-sh";
|
services.ntfy-sh =
|
||||||
|
let datadir = "/var/lib/ntfy-sh";
|
||||||
in {
|
in {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
|
|
@ -6,7 +6,8 @@
|
||||||
let
|
let
|
||||||
vs = config.vault-secrets.secrets;
|
vs = config.vault-secrets.secrets;
|
||||||
inherit (config.meta.exposes.outline) port;
|
inherit (config.meta.exposes.outline) port;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
imports = [ ];
|
imports = [ ];
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
# This value determines the NixOS release from which the default
|
||||||
|
|
|
@ -7,7 +7,8 @@ let
|
||||||
vs = config.vault-secrets.secrets;
|
vs = config.vault-secrets.secrets;
|
||||||
port = 8008;
|
port = 8008;
|
||||||
metricsPort = 9000;
|
metricsPort = 9000;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
imports = [ ];
|
imports = [ ];
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
# This value determines the NixOS release from which the default
|
||||||
|
@ -49,7 +50,8 @@ in {
|
||||||
"${vs.synapse}/email_password" # Also contains the rest of the email config
|
"${vs.synapse}/email_password" # Also contains the rest of the email config
|
||||||
];
|
];
|
||||||
|
|
||||||
settings = let
|
settings =
|
||||||
|
let
|
||||||
log_file = pkgs.writeText "log.yml" ''
|
log_file = pkgs.writeText "log.yml" ''
|
||||||
version: 1
|
version: 1
|
||||||
|
|
||||||
|
@ -71,7 +73,8 @@ in {
|
||||||
level: INFO
|
level: INFO
|
||||||
handlers: [file]
|
handlers: [file]
|
||||||
'';
|
'';
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
server_name = "meowy.tech";
|
server_name = "meowy.tech";
|
||||||
enable_registration = true;
|
enable_registration = true;
|
||||||
public_baseurl = "https://chat.meowy.tech";
|
public_baseurl = "https://chat.meowy.tech";
|
||||||
|
|
|
@ -6,7 +6,8 @@
|
||||||
let
|
let
|
||||||
vs = config.vault-secrets.secrets;
|
vs = config.vault-secrets.secrets;
|
||||||
cfg = config.services.vaultwarden.config;
|
cfg = config.services.vaultwarden.config;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
imports = [ ];
|
imports = [ ];
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
# This value determines the NixOS release from which the default
|
||||||
|
|
|
@ -8,7 +8,8 @@ let
|
||||||
grafanaDomain = config.meta.exposes.grafana.domain;
|
grafanaDomain = config.meta.exposes.grafana.domain;
|
||||||
grafanaPort = config.meta.exposes.grafana.port;
|
grafanaPort = config.meta.exposes.grafana.port;
|
||||||
vs = config.vault-secrets.secrets;
|
vs = config.vault-secrets.secrets;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
imports = [ ];
|
imports = [ ];
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
# This value determines the NixOS release from which the default
|
||||||
|
@ -20,15 +21,16 @@ in {
|
||||||
system.stateVersion = "21.11"; # Did you read the comment?
|
system.stateVersion = "21.11"; # Did you read the comment?
|
||||||
networking.firewall.allowedTCPPorts = [ vmPort grafanaPort ];
|
networking.firewall.allowedTCPPorts = [ vmPort grafanaPort ];
|
||||||
networking.firewall.allowedUDPPorts = [ vmPort ];
|
networking.firewall.allowedUDPPorts = [ vmPort ];
|
||||||
|
services = {
|
||||||
|
|
||||||
services.victoriametrics = {
|
victoriametrics = {
|
||||||
enable = true;
|
enable = true;
|
||||||
listenAddress = ":${toString vmPort}";
|
listenAddress = ":${toString vmPort}";
|
||||||
# Data Retention period in months
|
# Data Retention period in months
|
||||||
retentionPeriod = 36;
|
retentionPeriod = 36;
|
||||||
};
|
};
|
||||||
|
|
||||||
services.vmagent = {
|
vmagent = {
|
||||||
enable = true;
|
enable = true;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
prometheusConfig = {
|
prometheusConfig = {
|
||||||
|
@ -68,7 +70,7 @@ in {
|
||||||
{
|
{
|
||||||
job_name = "ntfy";
|
job_name = "ntfy";
|
||||||
static_configs = [{
|
static_configs = [{
|
||||||
targets = [ "ntfy.olympus:9090"];
|
targets = [ "ntfy.olympus:9090" ];
|
||||||
labels.app = "ntfy";
|
labels.app = "ntfy";
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
@ -90,12 +92,7 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
vault-secrets.secrets.grafana = {
|
grafana = {
|
||||||
user = "grafana";
|
|
||||||
group = "grafana";
|
|
||||||
};
|
|
||||||
|
|
||||||
services.grafana = {
|
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
server = {
|
server = {
|
||||||
|
@ -123,4 +120,10 @@ in {
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
vault-secrets.secrets.grafana = {
|
||||||
|
user = "grafana";
|
||||||
|
group = "grafana";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,33 +19,19 @@ in {
|
||||||
environment.systemPackages = with pkgs; [ wireguard-tools ];
|
environment.systemPackages = with pkgs; [ wireguard-tools ];
|
||||||
|
|
||||||
environment.noXlibs = lib.mkForce false;
|
environment.noXlibs = lib.mkForce false;
|
||||||
|
networking = {
|
||||||
|
|
||||||
networking.firewall.allowedUDPPorts =
|
firewall.allowedUDPPorts =
|
||||||
[ config.networking.wireguard.interfaces.wg0.listenPort ];
|
[ config.networking.wireguard.interfaces.wg0.listenPort ];
|
||||||
networking.firewall.checkReversePath = false;
|
firewall.checkReversePath = false;
|
||||||
|
|
||||||
vault-secrets.secrets.wireguard = {
|
nat = {
|
||||||
services = [ "wireguard-wg0" ];
|
|
||||||
loginRetries = 25;
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.nat = {
|
|
||||||
enable = true;
|
enable = true;
|
||||||
internalInterfaces = [ "wg0" "eth0" ];
|
internalInterfaces = [ "wg0" "eth0" ];
|
||||||
externalInterface = "eth0";
|
externalInterface = "eth0";
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.kernel.sysctl = {
|
wireguard.interfaces.wg0 = {
|
||||||
"net.ipv4.ip_forward" = 1;
|
|
||||||
"net.ipv6.conf.all.forwarding" = 1;
|
|
||||||
};
|
|
||||||
|
|
||||||
services.prometheus.exporters.wireguard = {
|
|
||||||
enable = true;
|
|
||||||
openFirewall = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.wireguard.interfaces.wg0 = {
|
|
||||||
ips = [ "10.100.0.1/24" ];
|
ips = [ "10.100.0.1/24" ];
|
||||||
listenPort = 51821;
|
listenPort = 51821;
|
||||||
privateKeyFile = "${vs.wireguard}/privateKey";
|
privateKeyFile = "${vs.wireguard}/privateKey";
|
||||||
|
@ -82,4 +68,20 @@ in {
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
vault-secrets.secrets.wireguard = {
|
||||||
|
services = [ "wireguard-wg0" ];
|
||||||
|
loginRetries = 25;
|
||||||
|
};
|
||||||
|
|
||||||
|
boot.kernel.sysctl = {
|
||||||
|
"net.ipv4.ip_forward" = 1;
|
||||||
|
"net.ipv6.conf.all.forwarding" = 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.prometheus.exporters.wireguard = {
|
||||||
|
enable = true;
|
||||||
|
openFirewall = true;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,12 +5,14 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
|
boot = {
|
||||||
|
|
||||||
boot.initrd.availableKernelModules =
|
initrd.availableKernelModules =
|
||||||
[ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod" "sdhci_pci" ];
|
[ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod" "sdhci_pci" ];
|
||||||
boot.initrd.kernelModules = [ ];
|
initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ "kvm-amd" ];
|
kernelModules = [ "kvm-amd" ];
|
||||||
boot.extraModulePackages = [ ];
|
extraModulePackages = [ ];
|
||||||
|
};
|
||||||
|
|
||||||
fileSystems."/" = {
|
fileSystems."/" = {
|
||||||
device = "/dev/disk/by-uuid/c184866a-9a53-4a9f-9a1f-493792af7ea9";
|
device = "/dev/disk/by-uuid/c184866a-9a53-4a9f-9a1f-493792af7ea9";
|
||||||
|
|
|
@ -1,50 +1,58 @@
|
||||||
{ pkgs, ... }: {
|
{ pkgs, ... }: {
|
||||||
hardware.enableAllFirmware = true;
|
hardware = {
|
||||||
|
enableAllFirmware = true;
|
||||||
|
|
||||||
hardware.bluetooth.enable = true;
|
bluetooth.enable = true;
|
||||||
|
|
||||||
services.hardware.bolt.enable = true;
|
# Vulkan
|
||||||
|
opengl.driSupport = true;
|
||||||
|
opengl.extraPackages = with pkgs; [
|
||||||
|
amdvlk
|
||||||
|
rocm-opencl-icd
|
||||||
|
rocm-opencl-runtime
|
||||||
|
];
|
||||||
|
};
|
||||||
|
services = {
|
||||||
|
|
||||||
services.fprintd.enable = true;
|
hardware.bolt.enable = true;
|
||||||
|
|
||||||
|
fprintd.enable = true;
|
||||||
|
|
||||||
|
# Video Driver
|
||||||
|
xserver.videoDrivers = [ "amdgpu" ];
|
||||||
|
xserver = {
|
||||||
|
dpi = 280;
|
||||||
|
xkbOptions = "caps:swapescape";
|
||||||
|
};
|
||||||
|
|
||||||
|
# SSD Trim
|
||||||
|
fstrim.enable = true;
|
||||||
|
|
||||||
|
# Power Management
|
||||||
|
upower.enable = true;
|
||||||
|
thermald.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
# hardware.trackpoint.enable = true;
|
# hardware.trackpoint.enable = true;
|
||||||
|
|
||||||
# FS
|
# FS
|
||||||
fileSystems."/".options = [ "compress=zstd" ];
|
fileSystems."/".options = [ "compress=zstd" ];
|
||||||
|
|
||||||
# Video Driver
|
|
||||||
services.xserver.videoDrivers = [ "amdgpu" ];
|
|
||||||
services.xserver = {
|
|
||||||
dpi = 280;
|
|
||||||
xkbOptions = "caps:swapescape";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Vulkan
|
|
||||||
hardware.opengl.driSupport = true;
|
|
||||||
hardware.opengl.extraPackages = with pkgs; [
|
|
||||||
amdvlk
|
|
||||||
rocm-opencl-icd
|
|
||||||
rocm-opencl-runtime
|
|
||||||
];
|
|
||||||
|
|
||||||
systemd.tmpfiles.rules =
|
systemd.tmpfiles.rules =
|
||||||
[ "L+ /opt/rocm/hip - - - - ${pkgs.hip}" ];
|
[ "L+ /opt/rocm/hip - - - - ${pkgs.hip}" ];
|
||||||
|
|
||||||
# SSD Trim
|
|
||||||
services.fstrim.enable = true;
|
|
||||||
|
|
||||||
# Power Management
|
|
||||||
services.upower.enable = true;
|
|
||||||
services.thermald.enable = true;
|
|
||||||
|
|
||||||
powerManagement = {
|
powerManagement = {
|
||||||
enable = true;
|
enable = true;
|
||||||
powertop.enable = true;
|
powertop.enable = true;
|
||||||
};
|
};
|
||||||
|
security = {
|
||||||
|
tpm2 = {
|
||||||
|
|
||||||
# tpm
|
# tpm
|
||||||
security.tpm2.enable = true;
|
enable = true;
|
||||||
security.tpm2.pkcs11.enable = true; # expose /run/current-system/sw/lib/libtpm2_pkcs11.so
|
pkcs11.enable = true; # expose /run/current-system/sw/lib/libtpm2_pkcs11.so
|
||||||
security.tpm2.tctiEnvironment.enable = true; # TPM2TOOLS_TCTI and TPM2_PKCS11_TCTI env variables
|
tctiEnvironment.enable = true;
|
||||||
|
};
|
||||||
|
}; # TPM2TOOLS_TCTI and TPM2_PKCS11_TCTI env variables
|
||||||
users.users.victor.extraGroups = [ "tss" ]; # tss group has access to TPM devices
|
users.users.victor.extraGroups = [ "tss" ]; # tss group has access to TPM devices
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }: {
|
||||||
# Custom dconf settings
|
# Custom dconf settings
|
||||||
dconf.settings."org/gnome/desktop/input-sources" = {
|
dconf.settings."org/gnome/desktop/input-sources" = {
|
||||||
xkb-options = [ "caps:swapescape" ];
|
xkb-options = [ "caps:swapescape" ];
|
||||||
|
|
|
@ -30,23 +30,39 @@ let
|
||||||
|
|
||||||
exec Hyprland
|
exec Hyprland
|
||||||
'';
|
'';
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
# Include the results of the hardware scan.
|
# Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./rescue-boot.nix
|
./rescue-boot.nix
|
||||||
./networking.nix
|
./networking.nix
|
||||||
];
|
];
|
||||||
|
home-manager = {
|
||||||
|
|
||||||
# home-manager
|
# home-manager
|
||||||
home-manager.useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
home-manager.useUserPackages = true;
|
useUserPackages = true;
|
||||||
home-manager.users.victor = import ./home;
|
users.victor = import ./home;
|
||||||
home-manager.extraSpecialArgs = { inherit inputs; };
|
extraSpecialArgs = { inherit inputs; };
|
||||||
|
};
|
||||||
|
security = {
|
||||||
|
|
||||||
security.pam.services.swaylock = { };
|
pam.services.swaylock = { };
|
||||||
|
|
||||||
security.sudo.wheelNeedsPassword = true;
|
sudo.wheelNeedsPassword = true;
|
||||||
|
rtkit.enable = true;
|
||||||
|
|
||||||
|
# Enables logging in with my Solokey
|
||||||
|
pam.u2f = {
|
||||||
|
enable = true;
|
||||||
|
debug = false;
|
||||||
|
cue = true;
|
||||||
|
control = "sufficient";
|
||||||
|
authFile =
|
||||||
|
"/etc/u2f-mappings"; # use `pamu2fcfg` from `pkgs.pam_u2f` to generate this config
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
fonts = {
|
fonts = {
|
||||||
fonts = with pkgs; [
|
fonts = with pkgs; [
|
||||||
|
@ -79,108 +95,35 @@ in {
|
||||||
# boot.initrd.systemd.enable = true; # Experimental
|
# boot.initrd.systemd.enable = true; # Experimental
|
||||||
boot = {
|
boot = {
|
||||||
kernelPackages = pkgs.linuxPackages_latest;
|
kernelPackages = pkgs.linuxPackages_latest;
|
||||||
loader.systemd-boot.editor = false;
|
loader = {
|
||||||
loader.systemd-boot.enable = true;
|
systemd-boot.editor = false;
|
||||||
|
systemd-boot.enable = true;
|
||||||
# loader.systemd-boot.configurationLimit = 6;
|
# loader.systemd-boot.configurationLimit = 6;
|
||||||
loader.efi.canTouchEfiVariables = true;
|
efi.canTouchEfiVariables = true;
|
||||||
loader.efi.efiSysMountPoint = "/boot/efi";
|
efi.efiSysMountPoint = "/boot/efi";
|
||||||
|
};
|
||||||
|
|
||||||
kernel.sysctl = { "fs.inotify.max_user_watches" = 524288; };
|
kernel.sysctl = { "fs.inotify.max_user_watches" = 524288; };
|
||||||
};
|
};
|
||||||
|
services = {
|
||||||
|
|
||||||
services.gnome.gnome-keyring.enable = true;
|
gnome.gnome-keyring.enable = true;
|
||||||
|
|
||||||
fileSystems."/".options = [ "compress=zstd" ];
|
udisks2.enable = true;
|
||||||
fileSystems."/home".options = [ "compress=zstd" ];
|
dbus.enable = true;
|
||||||
fileSystems."/nix".options = [ "compress=zstd" "noatime" ];
|
|
||||||
|
|
||||||
# Filesystem dedup
|
xserver = {
|
||||||
# services.beesd.filesystems = {
|
|
||||||
# root = {
|
|
||||||
# spec = "LABEL=nixos";
|
|
||||||
# hashTableSizeMB = 256;
|
|
||||||
# verbosity = "crit";
|
|
||||||
# extraOptions = [ "--loadavg-target" "2.0" ];
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
|
|
||||||
# Select internationalisation properties.
|
|
||||||
i18n.defaultLocale = "en_GB.utf8";
|
|
||||||
|
|
||||||
i18n.extraLocaleSettings = {
|
|
||||||
LC_ADDRESS = "nl_NL.UTF-8";
|
|
||||||
LC_IDENTIFICATION = "nl_NL.UTF-8";
|
|
||||||
LC_MEASUREMENT = "nl_NL.UTF-8";
|
|
||||||
LC_MONETARY = "nl_NL.UTF-8";
|
|
||||||
LC_NAME = "nl_NL.UTF-8";
|
|
||||||
LC_NUMERIC = "nl_NL.UTF-8";
|
|
||||||
LC_PAPER = "nl_NL.UTF-8";
|
|
||||||
LC_TELEPHONE = "nl_NL.UTF-8";
|
|
||||||
LC_TIME = "en_DK.UTF-8";
|
|
||||||
};
|
|
||||||
|
|
||||||
i18n.supportedLocales =
|
|
||||||
[ "en_GB.UTF-8/UTF-8" "nl_NL.UTF-8/UTF-8" "en_DK.UTF-8/UTF-8" ];
|
|
||||||
|
|
||||||
xdg.portal = {
|
|
||||||
enable = true;
|
|
||||||
wlr.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
services.udisks2.enable = true;
|
|
||||||
services.dbus.enable = true;
|
|
||||||
|
|
||||||
# Hyprland
|
|
||||||
programs.hyprland = {
|
|
||||||
enable = true;
|
|
||||||
package = null; # Managed by home manager
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.loginShellInit = ''
|
|
||||||
if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then
|
|
||||||
${run-hyprland}/bin/run-hyprland
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
|
|
||||||
services.xserver = {
|
|
||||||
enable = false;
|
enable = false;
|
||||||
layout = "us";
|
layout = "us";
|
||||||
xkbVariant = "altgr-intl";
|
xkbVariant = "altgr-intl";
|
||||||
xkbOptions = "caps:swapescape";
|
xkbOptions = "caps:swapescape";
|
||||||
videoDrivers = [ "nvidia" ];
|
videoDrivers = [ "nvidia" ];
|
||||||
};
|
};
|
||||||
|
blueman.enable = true;
|
||||||
hardware.nvidia.prime = {
|
|
||||||
offload.enable = true;
|
|
||||||
intelBusId = "PCI:0:2:0";
|
|
||||||
nvidiaBusId = "PCI:1:0:0";
|
|
||||||
};
|
|
||||||
|
|
||||||
hardware.opengl = {
|
|
||||||
enable = true;
|
|
||||||
extraPackages = with pkgs; [
|
|
||||||
vaapiVdpau
|
|
||||||
intel-media-driver # LIBVA_DRIVER_NAME=iHD
|
|
||||||
vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
|
|
||||||
libvdpau-va-gl
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
hardware.bluetooth.enable = true;
|
|
||||||
services.blueman.enable = true;
|
|
||||||
|
|
||||||
virtualisation.podman.enable = true;
|
|
||||||
|
|
||||||
hardware.saleae-logic.enable = true;
|
|
||||||
|
|
||||||
# Enable CUPS to print documents.
|
# Enable CUPS to print documents.
|
||||||
services.printing.enable = true;
|
printing.enable = true;
|
||||||
|
pipewire = {
|
||||||
# Enable sound with pipewire.
|
|
||||||
sound.enable = true;
|
|
||||||
hardware.pulseaudio.enable = false;
|
|
||||||
security.rtkit.enable = true;
|
|
||||||
services.pipewire = {
|
|
||||||
enable = true;
|
enable = true;
|
||||||
alsa.enable = true;
|
alsa.enable = true;
|
||||||
alsa.support32Bit = true;
|
alsa.support32Bit = true;
|
||||||
|
@ -193,6 +136,111 @@ in {
|
||||||
#media-session.enable = true;
|
#media-session.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
fstrim.enable = true;
|
||||||
|
|
||||||
|
# don't shutdown when power button is short-pressed
|
||||||
|
logind.extraConfig = ''
|
||||||
|
HandlePowerKey=suspend
|
||||||
|
'';
|
||||||
|
|
||||||
|
udev.packages = with pkgs; [
|
||||||
|
android-udev-rules
|
||||||
|
logitech-udev-rules
|
||||||
|
wooting-udev-rules
|
||||||
|
];
|
||||||
|
};
|
||||||
|
fileSystems = {
|
||||||
|
|
||||||
|
"/".options = [ "compress=zstd" ];
|
||||||
|
"/home".options = [ "compress=zstd" ];
|
||||||
|
"/nix".options = [ "compress=zstd" "noatime" ];
|
||||||
|
};
|
||||||
|
i18n = {
|
||||||
|
|
||||||
|
# Filesystem dedup
|
||||||
|
# services.beesd.filesystems = {
|
||||||
|
# root = {
|
||||||
|
# spec = "LABEL=nixos";
|
||||||
|
# hashTableSizeMB = 256;
|
||||||
|
# verbosity = "crit";
|
||||||
|
# extraOptions = [ "--loadavg-target" "2.0" ];
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
|
||||||
|
# Select internationalisation properties.
|
||||||
|
defaultLocale = "en_GB.utf8";
|
||||||
|
|
||||||
|
extraLocaleSettings = {
|
||||||
|
LC_ADDRESS = "nl_NL.UTF-8";
|
||||||
|
LC_IDENTIFICATION = "nl_NL.UTF-8";
|
||||||
|
LC_MEASUREMENT = "nl_NL.UTF-8";
|
||||||
|
LC_MONETARY = "nl_NL.UTF-8";
|
||||||
|
LC_NAME = "nl_NL.UTF-8";
|
||||||
|
LC_NUMERIC = "nl_NL.UTF-8";
|
||||||
|
LC_PAPER = "nl_NL.UTF-8";
|
||||||
|
LC_TELEPHONE = "nl_NL.UTF-8";
|
||||||
|
LC_TIME = "en_DK.UTF-8";
|
||||||
|
};
|
||||||
|
|
||||||
|
supportedLocales =
|
||||||
|
[ "en_GB.UTF-8/UTF-8" "nl_NL.UTF-8/UTF-8" "en_DK.UTF-8/UTF-8" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
xdg.portal = {
|
||||||
|
enable = true;
|
||||||
|
wlr.enable = true;
|
||||||
|
};
|
||||||
|
programs = {
|
||||||
|
|
||||||
|
# Hyprland
|
||||||
|
hyprland = {
|
||||||
|
enable = true;
|
||||||
|
package = null; # Managed by home manager
|
||||||
|
};
|
||||||
|
|
||||||
|
steam = {
|
||||||
|
enable = true;
|
||||||
|
remotePlay.openFirewall = true;
|
||||||
|
dedicatedServer.openFirewall = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
ssh.startAgent = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.loginShellInit = ''
|
||||||
|
if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then
|
||||||
|
${run-hyprland}/bin/run-hyprland
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
hardware = {
|
||||||
|
|
||||||
|
nvidia.prime = {
|
||||||
|
offload.enable = true;
|
||||||
|
intelBusId = "PCI:0:2:0";
|
||||||
|
nvidiaBusId = "PCI:1:0:0";
|
||||||
|
};
|
||||||
|
|
||||||
|
opengl = {
|
||||||
|
enable = true;
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
vaapiVdpau
|
||||||
|
intel-media-driver # LIBVA_DRIVER_NAME=iHD
|
||||||
|
vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
|
||||||
|
libvdpau-va-gl
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
bluetooth.enable = true;
|
||||||
|
|
||||||
|
saleae-logic.enable = true;
|
||||||
|
pulseaudio.enable = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
virtualisation.podman.enable = true;
|
||||||
|
|
||||||
|
# Enable sound with pipewire.
|
||||||
|
sound.enable = true;
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
pciutils
|
pciutils
|
||||||
nvidia-offload
|
nvidia-offload
|
||||||
|
@ -204,42 +252,11 @@ in {
|
||||||
swaylock-effects # Has to be installed globally so that pam module works
|
swaylock-effects # Has to be installed globally so that pam module works
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.steam = {
|
|
||||||
enable = true;
|
|
||||||
remotePlay.openFirewall = true;
|
|
||||||
dedicatedServer.openFirewall = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
services.fstrim.enable = true;
|
|
||||||
|
|
||||||
nix.extraOptions = ''
|
nix.extraOptions = ''
|
||||||
keep-outputs = true
|
keep-outputs = true
|
||||||
keep-derivations = true
|
keep-derivations = true
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Enables logging in with my Solokey
|
|
||||||
security.pam.u2f = {
|
|
||||||
enable = true;
|
|
||||||
debug = false;
|
|
||||||
cue = true;
|
|
||||||
control = "sufficient";
|
|
||||||
authFile =
|
|
||||||
"/etc/u2f-mappings"; # use `pamu2fcfg` from `pkgs.pam_u2f` to generate this config
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.ssh.startAgent = true;
|
|
||||||
|
|
||||||
# don't shutdown when power button is short-pressed
|
|
||||||
services.logind.extraConfig = ''
|
|
||||||
HandlePowerKey=suspend
|
|
||||||
'';
|
|
||||||
|
|
||||||
services.udev.packages = with pkgs; [
|
|
||||||
android-udev-rules
|
|
||||||
logitech-udev-rules
|
|
||||||
wooting-udev-rules
|
|
||||||
];
|
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
# This value determines the NixOS release from which the default
|
||||||
# settings for stateful data, like file locations and database versions
|
# settings for stateful data, like file locations and database versions
|
||||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||||
|
|
|
@ -5,35 +5,39 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
|
boot = {
|
||||||
|
|
||||||
boot.initrd.availableKernelModules =
|
initrd.availableKernelModules =
|
||||||
[ "xhci_pci" "ahci" "nvme" "rtsx_pci_sdmmc" ];
|
[ "xhci_pci" "ahci" "nvme" "rtsx_pci_sdmmc" ];
|
||||||
boot.initrd.kernelModules = [ ];
|
initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
kernelModules = [ "kvm-intel" ];
|
||||||
boot.extraModulePackages = [ ];
|
extraModulePackages = [ ];
|
||||||
|
};
|
||||||
|
fileSystems = {
|
||||||
|
|
||||||
fileSystems."/" = {
|
"/" = {
|
||||||
device = "/dev/disk/by-uuid/d4f56e5b-2509-4e63-8324-65a35c71e90c";
|
device = "/dev/disk/by-uuid/d4f56e5b-2509-4e63-8324-65a35c71e90c";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [ "subvol=@" ];
|
options = [ "subvol=@" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/nix" = {
|
"/nix" = {
|
||||||
device = "/dev/disk/by-uuid/d4f56e5b-2509-4e63-8324-65a35c71e90c";
|
device = "/dev/disk/by-uuid/d4f56e5b-2509-4e63-8324-65a35c71e90c";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [ "subvol=@/nix" ];
|
options = [ "subvol=@/nix" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/home" = {
|
"/home" = {
|
||||||
device = "/dev/disk/by-uuid/d4f56e5b-2509-4e63-8324-65a35c71e90c";
|
device = "/dev/disk/by-uuid/d4f56e5b-2509-4e63-8324-65a35c71e90c";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [ "subvol=@home" ];
|
options = [ "subvol=@home" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot/efi" = {
|
"/boot/efi" = {
|
||||||
device = "/dev/disk/by-uuid/D478-6F66";
|
device = "/dev/disk/by-uuid/D478-6F66";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
swapDevices = [ ];
|
swapDevices = [ ];
|
||||||
|
|
||||||
|
|
|
@ -4,15 +4,115 @@ let
|
||||||
inherit (pkgs.texlive) scheme-full;
|
inherit (pkgs.texlive) scheme-full;
|
||||||
dnd-5e-latex-template = { pkgs = [ pkgs.v.dnd-5e-latex-template ]; };
|
dnd-5e-latex-template = { pkgs = [ pkgs.v.dnd-5e-latex-template ]; };
|
||||||
};
|
};
|
||||||
in {
|
in
|
||||||
programs.home-manager.enable = true;
|
{
|
||||||
home.username = "victor";
|
programs = {
|
||||||
home.homeDirectory = "/home/victor";
|
home-manager.enable = true;
|
||||||
home.stateVersion = "22.05";
|
|
||||||
|
|
||||||
imports = [ ./hyprland.nix ./neovim.nix ./eww ./theme.nix ];
|
foot = { enable = true; };
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
nix-index.enable = true;
|
||||||
|
|
||||||
|
exa = {
|
||||||
|
enable = true;
|
||||||
|
enableAliases = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
bat.enable = true;
|
||||||
|
|
||||||
|
git = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.gitAndTools.gitFull;
|
||||||
|
userName = "Victor";
|
||||||
|
userEmail = "victor@xirion.net";
|
||||||
|
lfs.enable = true;
|
||||||
|
# delta.enable = true;
|
||||||
|
extraConfig = {
|
||||||
|
push.autoSetupRemote = true;
|
||||||
|
init.defaultBranch = "main";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
mako = {
|
||||||
|
enable = true;
|
||||||
|
extraConfig = ''
|
||||||
|
[mode=do-not-disturb]
|
||||||
|
invisible=1
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
tmux = {
|
||||||
|
enable = true;
|
||||||
|
shortcut = "b";
|
||||||
|
terminal = "screen-256color";
|
||||||
|
clock24 = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
firefox = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.firefox-devedition-bin;
|
||||||
|
};
|
||||||
|
|
||||||
|
vscode = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.vscode;
|
||||||
|
userSettings = {
|
||||||
|
"ltex.language" = "en-GB";
|
||||||
|
"latex-workshop" = {
|
||||||
|
"linting.chktex.enabled" = true;
|
||||||
|
"latex.clean.subfolder.enabled" = true;
|
||||||
|
"latex.outDir" = "%TMPDIR%/%RELATIVE_DOC%";
|
||||||
|
};
|
||||||
|
"workbench.colorTheme" = "Catppuccin Frappé";
|
||||||
|
"editor.fontFamily" =
|
||||||
|
"'DejaVuSansMono Nerd Font', 'monospace', monospace";
|
||||||
|
"keyboard.dispatch" = "keyCode";
|
||||||
|
"rust-analyzer.server.path" = "${pkgs.rust-analyzer}/bin/rust-analyzer";
|
||||||
|
"terminal.integrated.defaultProfile.linux" = "zsh";
|
||||||
|
"nix.enableLanguageServer" = true; # Enable LSP.
|
||||||
|
"nix.serverPath" =
|
||||||
|
"${pkgs.nil}/bin/nil"; # The path to the LSP server executable.
|
||||||
|
"[nix]" = { "editor.defaultFormatter" = "brettm12345.nixfmt-vscode"; };
|
||||||
|
};
|
||||||
|
extensions = with pkgs.vscode-extensions;
|
||||||
|
with pkgs.v.vscode-extensions; [
|
||||||
|
# astro-build.astro-vscode
|
||||||
|
brettm12345.nixfmt-vscode
|
||||||
|
catppuccin.catppuccin-vsc
|
||||||
|
codezombiech.gitignore
|
||||||
|
editorconfig.editorconfig
|
||||||
|
foxundermoon.shell-format
|
||||||
|
james-yu.latex-workshop
|
||||||
|
jnoortheen.nix-ide
|
||||||
|
matklad.rust-analyzer
|
||||||
|
mkhl.direnv
|
||||||
|
ms-vscode-remote.remote-ssh
|
||||||
|
ms-vscode.cpptools
|
||||||
|
platformio.platformio-ide
|
||||||
|
redhat.vscode-yaml
|
||||||
|
tamasfe.even-better-toml
|
||||||
|
valentjn.vscode-ltex
|
||||||
|
vscodevim.vim
|
||||||
|
xaver.clang-format
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
direnv = {
|
||||||
|
enable = true;
|
||||||
|
nix-direnv = { enable = true; };
|
||||||
|
};
|
||||||
|
|
||||||
|
zsh = {
|
||||||
|
enable = true;
|
||||||
|
sessionVariables = { DIRENV_LOG_FORMAT = ""; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
home = {
|
||||||
|
username = "victor";
|
||||||
|
homeDirectory = "/home/victor";
|
||||||
|
stateVersion = "22.05";
|
||||||
|
|
||||||
|
packages = with pkgs; [
|
||||||
appimage-run
|
appimage-run
|
||||||
brightnessctl
|
brightnessctl
|
||||||
btop
|
btop
|
||||||
|
@ -58,10 +158,14 @@ in {
|
||||||
wofi # Wayland rofi
|
wofi # Wayland rofi
|
||||||
wpa_supplicant_gui
|
wpa_supplicant_gui
|
||||||
];
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
imports = [ ./hyprland.nix ./neovim.nix ./eww ./theme.nix ];
|
||||||
|
|
||||||
xdg.mimeApps = {
|
xdg.mimeApps = {
|
||||||
enable = true;
|
enable = true;
|
||||||
defaultApplications = let browser = [ "firefox.desktop" ];
|
defaultApplications =
|
||||||
|
let browser = [ "firefox.desktop" ];
|
||||||
in {
|
in {
|
||||||
"image/*" = "org.gnome.eog.desktop";
|
"image/*" = "org.gnome.eog.desktop";
|
||||||
"text/html" = browser;
|
"text/html" = browser;
|
||||||
|
@ -85,105 +189,8 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.foot = { enable = true; };
|
xdg.userDirs =
|
||||||
|
let home = config.home.homeDirectory;
|
||||||
programs.nix-index.enable = true;
|
|
||||||
|
|
||||||
programs.exa = {
|
|
||||||
enable = true;
|
|
||||||
enableAliases = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.bat.enable = true;
|
|
||||||
|
|
||||||
programs.git = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.gitAndTools.gitFull;
|
|
||||||
userName = "Victor";
|
|
||||||
userEmail = "victor@xirion.net";
|
|
||||||
lfs.enable = true;
|
|
||||||
# delta.enable = true;
|
|
||||||
extraConfig = {
|
|
||||||
push.autoSetupRemote = true;
|
|
||||||
init.defaultBranch = "main";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.mako = {
|
|
||||||
enable = true;
|
|
||||||
extraConfig = ''
|
|
||||||
[mode=do-not-disturb]
|
|
||||||
invisible=1
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.tmux = {
|
|
||||||
enable = true;
|
|
||||||
shortcut = "b";
|
|
||||||
terminal = "screen-256color";
|
|
||||||
clock24 = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.firefox = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.firefox-devedition-bin;
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.vscode = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.vscode;
|
|
||||||
userSettings = {
|
|
||||||
"ltex.language" = "en-GB";
|
|
||||||
"latex-workshop" = {
|
|
||||||
"linting.chktex.enabled" = true;
|
|
||||||
"latex.clean.subfolder.enabled" = true;
|
|
||||||
"latex.outDir" = "%TMPDIR%/%RELATIVE_DOC%";
|
|
||||||
};
|
|
||||||
"workbench.colorTheme" = "Catppuccin Frappé";
|
|
||||||
"editor.fontFamily" =
|
|
||||||
"'DejaVuSansMono Nerd Font', 'monospace', monospace";
|
|
||||||
"keyboard.dispatch" = "keyCode";
|
|
||||||
"rust-analyzer.server.path" = "${pkgs.rust-analyzer}/bin/rust-analyzer";
|
|
||||||
"terminal.integrated.defaultProfile.linux" = "zsh";
|
|
||||||
"nix.enableLanguageServer" = true; # Enable LSP.
|
|
||||||
"nix.serverPath" =
|
|
||||||
"${pkgs.nil}/bin/nil"; # The path to the LSP server executable.
|
|
||||||
"[nix]" = { "editor.defaultFormatter" = "brettm12345.nixfmt-vscode"; };
|
|
||||||
};
|
|
||||||
extensions = with pkgs.vscode-extensions;
|
|
||||||
with pkgs.v.vscode-extensions; [
|
|
||||||
# astro-build.astro-vscode
|
|
||||||
brettm12345.nixfmt-vscode
|
|
||||||
catppuccin.catppuccin-vsc
|
|
||||||
codezombiech.gitignore
|
|
||||||
editorconfig.editorconfig
|
|
||||||
foxundermoon.shell-format
|
|
||||||
james-yu.latex-workshop
|
|
||||||
jnoortheen.nix-ide
|
|
||||||
matklad.rust-analyzer
|
|
||||||
mkhl.direnv
|
|
||||||
ms-vscode-remote.remote-ssh
|
|
||||||
ms-vscode.cpptools
|
|
||||||
platformio.platformio-ide
|
|
||||||
redhat.vscode-yaml
|
|
||||||
tamasfe.even-better-toml
|
|
||||||
valentjn.vscode-ltex
|
|
||||||
vscodevim.vim
|
|
||||||
xaver.clang-format
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.direnv = {
|
|
||||||
enable = true;
|
|
||||||
nix-direnv = { enable = true; };
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.zsh = {
|
|
||||||
enable = true;
|
|
||||||
sessionVariables = { DIRENV_LOG_FORMAT = ""; };
|
|
||||||
};
|
|
||||||
|
|
||||||
xdg.userDirs = let home = config.home.homeDirectory;
|
|
||||||
in {
|
in {
|
||||||
enable = true;
|
enable = true;
|
||||||
createDirectories = true;
|
createDirectories = true;
|
||||||
|
|
|
@ -1,38 +1,42 @@
|
||||||
{ pkgs, ... }: {
|
{ pkgs, ... }: {
|
||||||
home.packages = with pkgs; [
|
home = {
|
||||||
|
packages = with pkgs; [
|
||||||
eww-wayland
|
eww-wayland
|
||||||
pamixer
|
pamixer
|
||||||
lua
|
lua
|
||||||
(nerdfonts.override { fonts = [ "JetBrainsMono" ]; })
|
(nerdfonts.override { fonts = [ "JetBrainsMono" ]; })
|
||||||
];
|
];
|
||||||
|
file = {
|
||||||
|
|
||||||
home.file.".config/eww/eww.yuck".source = ./eww.yuck;
|
".config/eww/eww.yuck".source = ./eww.yuck;
|
||||||
home.file.".config/eww/eww.scss".text = builtins.readFile ./eww.scss;
|
".config/eww/eww.scss".text = builtins.readFile ./eww.scss;
|
||||||
|
|
||||||
# scripts
|
# scripts
|
||||||
# TODO: just link all scripts in ./scripts to .config/eww/scripts
|
# TODO: just link all scripts in ./scripts to .config/eww/scripts
|
||||||
home.file.".config/eww/scripts/volume.sh" = {
|
".config/eww/scripts/volume.sh" = {
|
||||||
source = ./scripts/volume.sh;
|
source = ./scripts/volume.sh;
|
||||||
executable = true;
|
executable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
home.file.".config/eww/scripts/wifi.sh" = {
|
".config/eww/scripts/wifi.sh" = {
|
||||||
source = ./scripts/wifi.sh;
|
source = ./scripts/wifi.sh;
|
||||||
executable = true;
|
executable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
home.file.".config/eww/scripts/workspaces.sh" = {
|
".config/eww/scripts/workspaces.sh" = {
|
||||||
source = ./scripts/workspaces.sh;
|
source = ./scripts/workspaces.sh;
|
||||||
executable = true;
|
executable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
home.file.".config/eww/scripts/workspaces.lua" = {
|
".config/eww/scripts/workspaces.lua" = {
|
||||||
source = ./scripts/workspaces.lua;
|
source = ./scripts/workspaces.lua;
|
||||||
executable = true;
|
executable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
home.file.".config/eww/scripts/do-not-disturb.sh" = {
|
".config/eww/scripts/do-not-disturb.sh" = {
|
||||||
source = ./scripts/do-not-disturb.sh;
|
source = ./scripts/do-not-disturb.sh;
|
||||||
executable = true;
|
executable = true;
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,8 @@
|
||||||
wallpaper = eDP-1,~/cloud/Pictures/Wallpapers-Laptop/wallpaper-nix-pink.png
|
wallpaper = eDP-1,~/cloud/Pictures/Wallpapers-Laptop/wallpaper-nix-pink.png
|
||||||
'';
|
'';
|
||||||
|
|
||||||
wayland.windowManager.hyprland = let
|
wayland.windowManager.hyprland =
|
||||||
|
let
|
||||||
startup-script = pkgs.writeScriptBin "startup" ''
|
startup-script = pkgs.writeScriptBin "startup" ''
|
||||||
#!${pkgs.stdenv.shell}
|
#!${pkgs.stdenv.shell}
|
||||||
hyprctl setcursor Catppuccin-Frappe-Pink-Cursors ${
|
hyprctl setcursor Catppuccin-Frappe-Pink-Cursors ${
|
||||||
|
@ -19,7 +20,8 @@
|
||||||
webcord &
|
webcord &
|
||||||
element-desktop &
|
element-desktop &
|
||||||
'';
|
'';
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
enable = true;
|
enable = true;
|
||||||
recommendedEnvironment = true;
|
recommendedEnvironment = true;
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
|
|
|
@ -27,9 +27,11 @@
|
||||||
};
|
};
|
||||||
lsp = {
|
lsp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
servers.rust-analyzer.enable = true;
|
servers = {
|
||||||
servers.rnix-lsp.enable = true;
|
rust-analyzer.enable = true;
|
||||||
servers.pyright.enable = true;
|
rnix-lsp.enable = true;
|
||||||
|
pyright.enable = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
nvim-cmp = { enable = true; };
|
nvim-cmp = { enable = true; };
|
||||||
};
|
};
|
||||||
|
|
|
@ -34,18 +34,50 @@ let
|
||||||
|
|
||||||
hex = mapAttrs (_name: value: "#${value}") colour;
|
hex = mapAttrs (_name: value: "#${value}") colour;
|
||||||
};
|
};
|
||||||
in {
|
in
|
||||||
home.file.".xsettingsd".text = ''
|
{
|
||||||
|
home = {
|
||||||
|
file.".xsettingsd".text = ''
|
||||||
Net/ThemeName "${theme}"
|
Net/ThemeName "${theme}"
|
||||||
Gtk/CursorThemeName "${cursorTheme}"
|
Gtk/CursorThemeName "${cursorTheme}"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
home.pointerCursor = {
|
pointerCursor = {
|
||||||
name = "Catppuccin-Frappe-Pink-Cursors";
|
name = "Catppuccin-Frappe-Pink-Cursors";
|
||||||
size = 32;
|
size = 32;
|
||||||
package = pkgs.catppuccin-cursors.frappePink;
|
package = pkgs.catppuccin-cursors.frappePink;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
file.".config/eww/eww.scss".text = lib.mkBefore ''
|
||||||
|
$rosewater: ${colour.hex.rosewater};
|
||||||
|
$flamingo: ${colour.hex.flamingo};
|
||||||
|
$pink: ${colour.hex.pink};
|
||||||
|
$mauve: ${colour.hex.mauve};
|
||||||
|
$red: ${colour.hex.red};
|
||||||
|
$maroon: ${colour.hex.maroon};
|
||||||
|
$peach: ${colour.hex.peach};
|
||||||
|
$yellow: ${colour.hex.yellow};
|
||||||
|
$green: ${colour.hex.green};
|
||||||
|
$teal: ${colour.hex.teal};
|
||||||
|
$sky: ${colour.hex.sky};
|
||||||
|
$sapphire: ${colour.hex.sapphire};
|
||||||
|
$blue: ${colour.hex.blue};
|
||||||
|
$lavender: ${colour.hex.lavender};
|
||||||
|
$text: ${colour.hex.text};
|
||||||
|
$subtext0: ${colour.hex.subtext0};
|
||||||
|
$subtext1: ${colour.hex.subtext1};
|
||||||
|
$overlay0: ${colour.hex.overlay0};
|
||||||
|
$overlay1: ${colour.hex.overlay1};
|
||||||
|
$overlay2: ${colour.hex.overlay2};
|
||||||
|
$surface0: ${colour.hex.surface0};
|
||||||
|
$surface1: ${colour.hex.surface1};
|
||||||
|
$surface2: ${colour.hex.surface2};
|
||||||
|
$base: ${colour.hex.base};
|
||||||
|
$mantle: ${colour.hex.mantle};
|
||||||
|
$crust: ${colour.hex.crust};
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
gtk = {
|
gtk = {
|
||||||
enable = true;
|
enable = true;
|
||||||
theme = {
|
theme = {
|
||||||
|
@ -92,33 +124,4 @@ in {
|
||||||
textColor = colour.hex.text;
|
textColor = colour.hex.text;
|
||||||
borderRadius = 5;
|
borderRadius = 5;
|
||||||
};
|
};
|
||||||
|
|
||||||
home.file.".config/eww/eww.scss".text = lib.mkBefore ''
|
|
||||||
$rosewater: ${colour.hex.rosewater};
|
|
||||||
$flamingo: ${colour.hex.flamingo};
|
|
||||||
$pink: ${colour.hex.pink};
|
|
||||||
$mauve: ${colour.hex.mauve};
|
|
||||||
$red: ${colour.hex.red};
|
|
||||||
$maroon: ${colour.hex.maroon};
|
|
||||||
$peach: ${colour.hex.peach};
|
|
||||||
$yellow: ${colour.hex.yellow};
|
|
||||||
$green: ${colour.hex.green};
|
|
||||||
$teal: ${colour.hex.teal};
|
|
||||||
$sky: ${colour.hex.sky};
|
|
||||||
$sapphire: ${colour.hex.sapphire};
|
|
||||||
$blue: ${colour.hex.blue};
|
|
||||||
$lavender: ${colour.hex.lavender};
|
|
||||||
$text: ${colour.hex.text};
|
|
||||||
$subtext0: ${colour.hex.subtext0};
|
|
||||||
$subtext1: ${colour.hex.subtext1};
|
|
||||||
$overlay0: ${colour.hex.overlay0};
|
|
||||||
$overlay1: ${colour.hex.overlay1};
|
|
||||||
$overlay2: ${colour.hex.overlay2};
|
|
||||||
$surface0: ${colour.hex.surface0};
|
|
||||||
$surface1: ${colour.hex.surface1};
|
|
||||||
$surface2: ${colour.hex.surface2};
|
|
||||||
$base: ${colour.hex.base};
|
|
||||||
$mantle: ${colour.hex.mantle};
|
|
||||||
$crust: ${colour.hex.crust};
|
|
||||||
'';
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,8 @@ let
|
||||||
boot.supportedFilesystems = [ "btrfs" "ext4" ];
|
boot.supportedFilesystems = [ "btrfs" "ext4" ];
|
||||||
environment.systemPackages = with pkgs; [ git ];
|
environment.systemPackages = with pkgs; [ git ];
|
||||||
};
|
};
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
boot.loader.systemd-boot = {
|
boot.loader.systemd-boot = {
|
||||||
extraEntries = {
|
extraEntries = {
|
||||||
"rescue.conf" = ''
|
"rescue.conf" = ''
|
||||||
|
|
|
@ -1,9 +1,22 @@
|
||||||
{ lib, stdenv, nodejs-slim, bundlerEnv, nixosTests, yarn, callPackage
|
{ lib
|
||||||
, imagemagick, ffmpeg, file, ruby_3_0, writeShellScript, fetchYarnDeps
|
, stdenv
|
||||||
|
, nodejs-slim
|
||||||
|
, bundlerEnv
|
||||||
|
, nixosTests
|
||||||
|
, yarn
|
||||||
|
, callPackage
|
||||||
|
, imagemagick
|
||||||
|
, ffmpeg
|
||||||
|
, file
|
||||||
|
, ruby_3_0
|
||||||
|
, writeShellScript
|
||||||
|
, fetchYarnDeps
|
||||||
, fixup_yarn_lock
|
, fixup_yarn_lock
|
||||||
|
|
||||||
# Allow building a fork or custom version of Mastodon:
|
# Allow building a fork or custom version of Mastodon:
|
||||||
, pname ? "mastodon", version ? import ./version.nix, srcOverride ? null
|
, pname ? "mastodon"
|
||||||
|
, version ? import ./version.nix
|
||||||
|
, srcOverride ? null
|
||||||
, dependenciesDir ? ./. # Should contain gemset.nix, yarn.nix and package.json.
|
, dependenciesDir ? ./. # Should contain gemset.nix, yarn.nix and package.json.
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
@ -106,12 +119,14 @@ stdenv.mkDerivation rec {
|
||||||
ln -s /tmp tmp
|
ln -s /tmp tmp
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = let
|
installPhase =
|
||||||
|
let
|
||||||
run-streaming = writeShellScript "run-streaming.sh" ''
|
run-streaming = writeShellScript "run-streaming.sh" ''
|
||||||
# NixOS helper script to consistently use the same NodeJS version the package was built with.
|
# NixOS helper script to consistently use the same NodeJS version the package was built with.
|
||||||
${nodejs-slim}/bin/node ./streaming
|
${nodejs-slim}/bin/node ./streaming
|
||||||
'';
|
'';
|
||||||
in ''
|
in
|
||||||
|
''
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
cp -r * $out/
|
cp -r * $out/
|
||||||
ln -s ${run-streaming} $out/run-streaming.sh
|
ln -s ${run-streaming} $out/run-streaming.sh
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,11 +1,13 @@
|
||||||
# This file was generated by pkgs.mastodon.updateScript.
|
# This file was generated by pkgs.mastodon.updateScript.
|
||||||
{ fetchgit, applyPatches }: let
|
{ fetchgit, applyPatches }:
|
||||||
|
let
|
||||||
src = fetchgit {
|
src = fetchgit {
|
||||||
url = "https://github.com/glitch-soc/mastodon.git";
|
url = "https://github.com/glitch-soc/mastodon.git";
|
||||||
rev = "a1df9fdb06854bd55f018918236132ccfa7d9d84";
|
rev = "a1df9fdb06854bd55f018918236132ccfa7d9d84";
|
||||||
sha256 = "0amqiigq3qgag6qm119aaysmd2k93vwgr1aynxjxmbpn35ykcay3";
|
sha256 = "0amqiigq3qgag6qm119aaysmd2k93vwgr1aynxjxmbpn35ykcay3";
|
||||||
};
|
};
|
||||||
in applyPatches {
|
in
|
||||||
|
applyPatches {
|
||||||
inherit src;
|
inherit src;
|
||||||
patches = [];
|
patches = [ ];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,14 @@
|
||||||
{ runCommand, lib, makeWrapper, yarn2nix, bundix, coreutils, diffutils
|
{ runCommand
|
||||||
, nix-prefetch-git, gnused, jq }:
|
, lib
|
||||||
|
, makeWrapper
|
||||||
|
, yarn2nix
|
||||||
|
, bundix
|
||||||
|
, coreutils
|
||||||
|
, diffutils
|
||||||
|
, nix-prefetch-git
|
||||||
|
, gnused
|
||||||
|
, jq
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
binPath = lib.makeBinPath [
|
binPath = lib.makeBinPath [
|
||||||
yarn2nix
|
yarn2nix
|
||||||
|
@ -10,7 +19,9 @@ let
|
||||||
gnused
|
gnused
|
||||||
jq
|
jq
|
||||||
];
|
];
|
||||||
in runCommand "mastodon-update-script" {
|
in
|
||||||
|
runCommand "mastodon-update-script"
|
||||||
|
{
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
|
|
@ -2,8 +2,10 @@
|
||||||
let
|
let
|
||||||
sources = builtins.fromJSON (builtins.readFile ./sources.json);
|
sources = builtins.fromJSON (builtins.readFile ./sources.json);
|
||||||
source = lib.findFirst (x: x.platform == stdenv.hostPlatform.system)
|
source = lib.findFirst (x: x.platform == stdenv.hostPlatform.system)
|
||||||
(throw "unsupported platform: ${stdenv.hostPlatform.system}") sources;
|
(throw "unsupported platform: ${stdenv.hostPlatform.system}")
|
||||||
in plexRaw.overrideAttrs (attrs: {
|
sources;
|
||||||
|
in
|
||||||
|
plexRaw.overrideAttrs (attrs: {
|
||||||
pname = attrs.pname + "-plexpass";
|
pname = attrs.pname + "-plexpass";
|
||||||
inherit (source) version;
|
inherit (source) version;
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
|
|
|
@ -6,7 +6,8 @@ let
|
||||||
mkdir -p $out/plugins/
|
mkdir -p $out/plugins/
|
||||||
cp -r ${src} $out/plugins/swipe
|
cp -r ${src} $out/plugins/swipe
|
||||||
'';
|
'';
|
||||||
in roundcubePlugin rec {
|
in
|
||||||
|
roundcubePlugin rec {
|
||||||
pname = "roundcube-swipe";
|
pname = "roundcube-swipe";
|
||||||
version = "0.5";
|
version = "0.5";
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,8 @@ let
|
||||||
mailserver.nixosModules.mailserver
|
mailserver.nixosModules.mailserver
|
||||||
attic.nixosModules.atticd
|
attic.nixosModules.atticd
|
||||||
];
|
];
|
||||||
type_import = let
|
type_import =
|
||||||
|
let
|
||||||
import_cases = {
|
import_cases = {
|
||||||
"lxc" = [
|
"lxc" = [
|
||||||
"${nixpkgs}/nixos/modules/virtualisation/lxc-container.nix"
|
"${nixpkgs}/nixos/modules/virtualisation/lxc-container.nix"
|
||||||
|
@ -19,7 +20,8 @@ let
|
||||||
./common/desktop
|
./common/desktop
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
in type: import_cases.${type} ++ base_imports;
|
in
|
||||||
|
type: import_cases.${type} ++ base_imports;
|
||||||
# Helper function to resolve what should be imported depending on the type of config (lxc, vm, bare metal)
|
# Helper function to resolve what should be imported depending on the type of config (lxc, vm, bare metal)
|
||||||
resolve_imports = { hostname, realm, profile ? hostname, type ? "lxc", ... }:
|
resolve_imports = { hostname, realm, profile ? hostname, type ? "lxc", ... }:
|
||||||
type_import type
|
type_import type
|
||||||
|
@ -46,12 +48,20 @@ let
|
||||||
# outputs
|
# outputs
|
||||||
|
|
||||||
# Helper function to build a colmena host definition
|
# Helper function to build a colmena host definition
|
||||||
mkColmenaHost = { ip ? null, exposes ? null, hostname, tags, realm
|
mkColmenaHost =
|
||||||
, type ? "lxc", ... }@host:
|
{ ip ? null
|
||||||
|
, exposes ? null
|
||||||
|
, hostname
|
||||||
|
, tags
|
||||||
|
, realm
|
||||||
|
, type ? "lxc"
|
||||||
|
, ...
|
||||||
|
}@host:
|
||||||
let
|
let
|
||||||
# this makes local apply work a bit nicer
|
# this makes local apply work a bit nicer
|
||||||
name = if type == "local" then hostname else "${hostname}.${realm}";
|
name = if type == "local" then hostname else "${hostname}.${realm}";
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
"${name}" = {
|
"${name}" = {
|
||||||
imports = resolve_imports host;
|
imports = resolve_imports host;
|
||||||
networking = {
|
networking = {
|
||||||
|
@ -73,4 +83,5 @@ let
|
||||||
hosts = add_realm_to_tags (import ./hosts);
|
hosts = add_realm_to_tags (import ./hosts);
|
||||||
flat_hosts = flatten_hosts hosts;
|
flat_hosts = flatten_hosts hosts;
|
||||||
nixHosts = filter_nix_hosts flat_hosts;
|
nixHosts = filter_nix_hosts flat_hosts;
|
||||||
in { inherit base_imports mkColmenaHost hosts flat_hosts nixHosts; }
|
in
|
||||||
|
{ inherit base_imports mkColmenaHost hosts flat_hosts nixHosts; }
|
||||||
|
|
3
repl.nix
3
repl.nix
|
@ -1,6 +1,7 @@
|
||||||
let
|
let
|
||||||
flake = builtins.getFlake (toString ./.);
|
flake = builtins.getFlake (toString ./.);
|
||||||
nixpkgs = import <nixpkgs> { };
|
nixpkgs = import <nixpkgs> { };
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
inherit flake;
|
inherit flake;
|
||||||
} // flake // builtins // nixpkgs // nixpkgs.lib // flake.nixosConfigurations
|
} // flake // builtins // nixpkgs // nixpkgs.lib // flake.nixosConfigurations
|
||||||
|
|
Loading…
Add table
Reference in a new issue