finished m3-nix homeconfig

This commit is contained in:
m3tam3re 2023-02-05 14:36:38 +01:00
parent f7c149b4b8
commit 9fbd9cbbc9
33 changed files with 274 additions and 77 deletions

View File

@ -17,32 +17,27 @@
let
inherit (self) outputs;
lib = nixpkgs.lib;
homecfg = home-manager.lib.homeManagerConfiguration;
allowUnfree = { nixpkgs.config.allowUnfree = true; };
in {
nixosConfigurations = {
nixosConfigurations = {
lkk-nix-1 = lib.nixosSystem {
specialArgs = { inherit inputs; };
modules = [
./hosts/lkk-nix-1
agenix.nixosModule
];
modules = [ ./hosts/lkk-nix-1 agenix.nixosModule ];
};
}; homeConfigurations = {
};
homeConfigurations = {
# Laptop
"m3tam3re@m3-nix" = {
homecfg = {
extraSpecialArgs = { # pass things to the home configuration
};
modules = [ ./home/users/m3tam3re/m3-nix.nix ];
"m3tam3re@m3-nix" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages."x86_64-linux";
extraSpecialArgs = { # pass things to the home configuration
};
modules = [ ./home/users/m3tam3re/m3-nix.nix allowUnfree ];
};
# Company Root Server
"m3tam3re@lkk-nix-1" = {
homecfg = {
extraSpecialArgs = { # pass things to the home configuration
};
modules = [ ./home/users/m3tam3re/lkk-nix-1.nix ];
# Company Root Servera
"m3tam3re@lkk-nix-1" = home-manager.lib.homeManagerConfiguration {
extraSpecialArgs = { # pass things to the home configuration
};
modules = [ ./home/users/m3tam3re/lkk-nix-1.nix ];
};
};
deploy.nodes.lkk-nix-1 = {

View File

@ -1,20 +0,0 @@
{ ... }:
{
imports = [ ./tmux ];
nixpkgs.config = {
allowBroken = true;
allowUnfree = true;
manual.manpages.enable = true;
};
systemd.user.startServices = true;
programs = {
home-manager.enable = true;
git.enable = true;
};
}

View File

@ -4,6 +4,7 @@
./bat.nix
./fish.nix
./neofetch.nix
./secrets.nix
./starship.nix
./tmux.nix
];
@ -19,14 +20,16 @@
htop
httpie
jq
nixfmt
procs
progress
ripgrep
tldr
trash-cli
tree
<<<<<<< HEAD
=======
unrar
>>>>>>> f7c149b (Various changes in home-config)
unzip
zip
];

View File

@ -0,0 +1,8 @@
{ pkgs, ... }: {
imports = [ ./emacs.nix ./golang.nix ./nix.nix ./nodejs.nix ./tools.nix ];
home.packages = with pkgs;
[
];
}

View File

@ -1,5 +1,9 @@
{ pkgs, ... }: {
<<<<<<< HEAD
services.emacs.enable = true;
=======
services.emacs.anable = true;
>>>>>>> f7c149b (Various changes in home-config)
programs.emacs = { # 310
enable = true;
extraPackages = epkgs: [

View File

@ -2,7 +2,11 @@
{
home.packages = with pkgs; [
appimage-run
<<<<<<< HEAD
deploy-rs
=======
deloy-rs
>>>>>>> f7c149b (Various changes in home-config)
nil
nix-prefetch-git
nixfmt

View File

@ -1,3 +1,18 @@
<<<<<<< HEAD
{ config, lib, pkgs, ... }:
with lib;
let cfg = config.features.desktop.crypto;
in {
options.features.desktop.crypto.enable = mkEnableOption "Enable Crypto";
config = mkIf cfg.enable {
home.packages = with pkgs; [ bisq-desktop monero-gui trezord trezor-suite ];
};
=======
{ pkgs, ... }:
{
home.packages = with pkgs; [
@ -6,4 +21,5 @@
trezord
trezor-suite
];
>>>>>>> f7c149b (Various changes in home-config)
}

View File

@ -1,18 +1,15 @@
{ pkgs, lib, outputs, ... }:
{
imports = [
./alacritty.nix
./crypto.nix
./design.nix
./i3-gaps.nix
./fonts.nix
./extrafonts.nix
./media.nix
./polybar.nix
./qt.nix
./rofi.nix
./social.nix
./syncthing.nix
./video.nix
];
xdg.mimeApps.enable = true;
@ -33,10 +30,10 @@
autotiling
brave
blueberry
brighnessctl
brightnessctl
feh
flameshot
gnome.fileroller
gnome.file-roller
gnome.seahorse
gnome.vinagre
gsettings-desktop-schemas
@ -46,7 +43,11 @@
pasystray
pavucontrol
picom
<<<<<<< HEAD
qt5ct
=======
qt5-ct
>>>>>>> f7c149b (Various changes in home-config)
rustdesk
unrar
unzip

View File

@ -1,3 +1,28 @@
<<<<<<< HEAD
{ config, lib, pkgs, ... }:
with lib;
let cfg = config.features.desktop.design;
in {
options.features.desktop.design.enable = mkEnableOption "enable design tools";
config = mkIf cfg.enable {
home.packages = with pkgs; [
argyllcms
darktable
gimp-with-plugins
gimpPlugins.gmic
gmic
gmic-qt
imagemagick
inkscape
lcms2
];
};
=======
{ pkgs, ... }:
{
home.packages = with pkgs; [
@ -11,4 +36,5 @@
inkscape
lcms2
];
>>>>>>> f7c149b (Various changes in home-config)
}

View File

@ -0,0 +1,22 @@
{ config, lib, pkgs, ... }:
with lib;
let cfg = config.features.desktop.extrafonts;
in {
options.features.desktop.extrafonts.enable = mkEnableOption "install additional fonts for desktop apps";
config = mkIf cfg.enable {
home.packages = with pkgs; [
emacs-all-the-icons-fonts
fira-code
fira-code-symbols
font-manager
font-awesome
font-awesome_4
noto-fonts
];
};
}

View File

@ -2,11 +2,11 @@
with lib;
let cfg = config.features.extrafonts;
let cfg = config.features.desktop.extrafonts;
in {
options.features.extrafonts.enable = mkEnableOption "install additional fonts for desktop apps";
options.features.desktop.extrafonts.enable = mkEnableOption "install additional fonts for desktop apps";
config = mkIf cfg.enable {
home.packages = with pkgs; [

View File

@ -1,3 +1,33 @@
<<<<<<< HEAD
{ config, lib, pkgs, ... }:
with lib;
let cfg = config.features.desktop.media;
in {
options.features.desktop.media.enable = mkEnableOption "enable media features";
config = mkIf cfg.enable {
home.packages = with pkgs; [
betterdiscordctl
davinci-resolve
discord
element-desktop
ffmpeg
freetube
gphoto2
handbrake
makemkv
mpv
obs-studio
plexamp
vlc
youtube-dl
];
};
=======
{ pkgs, ... }:
{
home.packages = with pkgs; [
@ -16,4 +46,5 @@
vlc
youtube-dl
];
>>>>>>> f7c149b (Various changes in home-config)
}

View File

@ -1,3 +1,5 @@
{ pkgs, ... }:
{
services.polybar = {
enable = true;

View File

@ -1,4 +1,4 @@
{
{ pkgs, ... }: {
programs.rofi = {
enable = true;
plugins = [ pkgs.rofi-calc pkgs.rofi-emoji ];

View File

@ -0,0 +1,5 @@
{ pkgs, ... }:
{
services.syncthing = { enable = true; };
}

View File

@ -1,7 +1,6 @@
{ pkgs, ... }: {
imports = [
./steam.nix
./sunshine.nix
];
@ -14,5 +13,4 @@
winetricks
];
programs.gamemode.enable = true;
}

View File

@ -1,17 +0,0 @@
{ config, lib, pkgs, ... }:
with lib;
let cfg = config.features.gaming.steam;
in {
options.features.gaming.steam.enable = mkEnableOption "enable Steam";
config = mkIf cfg.enable {
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
};
}

View File

@ -2,7 +2,7 @@
with lib;
let cfg = config.features.gaming.steam;
let cfg = config.features.gaming.sunshine;
in {

View File

@ -1,4 +1,8 @@
<<<<<<< HEAD
{ imports = [ ./podman.nix ./qemu.nix ]; }
=======
imports = [
./podman.nix
./qemu.nix
];
>>>>>>> f7c149b (Various changes in home-config)

View File

@ -0,0 +1,16 @@
{ config, lib, pkgs, ... }:
with lib;
let cfg = config.features.virtualization.podman;
in {
options.features.virtualization.podman.enable = mkEnableOption "install podman";
config = mkIf cfg.enable {
home.packages = with pkgs; [
podman
];
};
}

View File

@ -1,7 +1,21 @@
<<<<<<< HEAD
{ config, lib, pkgs, ... }:
with lib;
let cfg = config.features.virtualization.qemu;
in {
options.features.virtualization.qemu.enable = mkEnableOption "install qemu tools";
config =
mkIf cfg.enable { home.packages = with pkgs; [ virt-manager virtiofsd ]; };
=======
{ pkgs, ... }:
{
home.packages = with pkgs; [
virt-manager
virtiofsd
];
>>>>>>> f7c149b (Various changes in home-config)
}

View File

@ -4,6 +4,10 @@ let
in {
programs = {
home-manager.enable = true;
<<<<<<< HEAD
git.enable = true;
=======
>>>>>>> f7c149b (Various changes in home-config)
git = {
userName = "m3tam3re";
userEmail = "m@m3tam3re.com";

View File

@ -12,18 +12,20 @@
cli = {
fish.enable = true;
neofetch.enable = true;
secrets.enable = true;
starship.enable = true;
tmux.enable = true;
};
gaming = {
steam.enable = true;
sunshine.enable = true;
};
gaming = { sunshine.enable = true; };
desktop = {
crypto.enable = true;
design.enable = true;
extrafonts.enable = true;
media.enable = true;
};
virtualization = {
podman.enable = true;
qemu.enable = true;
};
};

View File

@ -19,7 +19,7 @@
from = 3000;
to = 3100;
}];
firewall.allowedTCPPorts = [ 80 443 5432 3478 ];
firewall.allowedTCPPorts = [ 80 443 5432 3306 3478 ];
firewall.allowedUDPPortRanges = [{
from = 3478;
to = 3481;

View File

@ -36,6 +36,11 @@
fsType = "vfat";
};
fileSystems."/var/backup" =
{ device = "46.38.248.210:/voln527829a1";
fsType = "nfs";
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking

View File

@ -1,5 +1,7 @@
{
imports = [
./baserow.nix
./matomo.nix
./wordpress.nix
];
}

View File

@ -0,0 +1,16 @@
{ config, outputs, ... }: {
virtualisation.oci-containers.containers."matomo" = {
image = "docker.io/matomo";
environment = {
MATOMO_DATABASE_HOST = "mysql";
MATOMO_DATABASE_USERNAME = "matomo";
MATOMO_DATABASE_PASSWORD = "matomo";
MATOMO_DATABASE_DBNAME = "matomo";
PHP_MEMORY_LIMIT="2048M";
};
ports = [ "3003:80" ];
volumes = [ "matomo_data:/var/www/html" ];
extraOptions = [ "--add-host=mysql:10.88.0.1" ];
};
}

View File

@ -0,0 +1,14 @@
{ config, outputs, ... }: {
virtualisation.oci-containers.containers."lanakk_blog" = {
image = "docker.io/wordpress";
environment = {
WORDPRESS_DB_HOST = "mysql";
WORDPRESS_DB_USER = "wp";
WORDPRESS_DB_PASSWORD = "wp";
WORDPRESS_DB_NAME = "lanakk_blog";
};
ports = [ "3002:80" ];
volumes = [ "lanakk_blog_data:/var/www/html" ];
extraOptions = [ "--add-host=mysql:10.88.0.1" ];
};
}

View File

@ -2,7 +2,11 @@
imports = [
./container.nix
./gitea.nix
<<<<<<< HEAD
./mariadb.nix
=======
./mysql.nix
>>>>>>> f7c149b (Various changes in home-config)
./n8n.nix
./postgres.nix
./traefik.nix

View File

@ -2,5 +2,10 @@
services.gitea = {
enable = true;
rootUrl = "https://code.lanakk.com";
dump = {
enable = true;
interval = "03:30:00";
backupDir = "/var/backup/gitea";
};
};
}

View File

@ -4,4 +4,13 @@
services.mysql = {
enable = true;
package = pkgs.mariadb;
<<<<<<< HEAD
};
services.mysqlBackup = {
enable = true;
calendar = "03:00:00";
databases = [ "lanakk_blog" ];
};
=======
>>>>>>> f7c149b (Various changes in home-config)
}

View File

@ -18,5 +18,9 @@
ALTER DATABASE baserow OWNER to baserow;
'';
};
# services.postgresqlBackup.enable = true;
services.postgresqlBackup = {
enable = true;
startAt = "03:10:00";
databases = [ "baserow" ];
};
}

View File

@ -37,6 +37,8 @@
baserow.loadBalancer.servers = [{ url = "http://localhost:3001/"; }];
gitea.loadBalancer.servers = [{ url = "http://localhost:3000/"; }];
n8n.loadBalancer.servers = [{ url = "http://localhost:5678/"; }];
lanakk_blog.loadBalancer.servers = [{ url = "http://localhost:3002/"; }];
matomo.loadBalancer.servers = [{ url = "http://localhost:3003/"; }];
};
routers = {
api = {
@ -70,6 +72,24 @@
service = "n8n";
entrypoints = "websecure";
};
lanakk_blog = {
rule = "Host(`www.weltkarte-pinnwand.com`)";
tls = {
certResolver = "godaddy";
domains = "www.weltkarte-pinnwand.com";
};
service = "lanakk_blog";
entrypoints = "websecure";
};
matomo = {
rule = "Host(`stats.lanakk.com`)";
tls = {
certResolver = "godaddy";
domains = "stats.lanakk.com";
};
service = "matomo";
entrypoints = "websecure";
};
};
};
};