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

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 ./bat.nix
./fish.nix ./fish.nix
./neofetch.nix ./neofetch.nix
./secrets.nix
./starship.nix ./starship.nix
./tmux.nix ./tmux.nix
]; ];
@ -19,14 +20,16 @@
htop htop
httpie httpie
jq jq
nixfmt
procs procs
progress progress
ripgrep ripgrep
tldr tldr
trash-cli trash-cli
tree tree
<<<<<<< HEAD
=======
unrar unrar
>>>>>>> f7c149b (Various changes in home-config)
unzip unzip
zip 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, ... }: { { pkgs, ... }: {
<<<<<<< HEAD
services.emacs.enable = true;
=======
services.emacs.anable = true; services.emacs.anable = true;
>>>>>>> f7c149b (Various changes in home-config)
programs.emacs = { # 310 programs.emacs = { # 310
enable = true; enable = true;
extraPackages = epkgs: [ extraPackages = epkgs: [

View File

@ -2,7 +2,11 @@
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
appimage-run appimage-run
<<<<<<< HEAD
deploy-rs
=======
deloy-rs deloy-rs
>>>>>>> f7c149b (Various changes in home-config)
nil nil
nix-prefetch-git nix-prefetch-git
nixfmt 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, ... }: { pkgs, ... }:
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
@ -6,4 +21,5 @@
trezord trezord
trezor-suite trezor-suite
]; ];
>>>>>>> f7c149b (Various changes in home-config)
} }

View File

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

View File

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

View File

@ -1,4 +1,4 @@
{ { pkgs, ... }: {
programs.rofi = { programs.rofi = {
enable = true; enable = true;
plugins = [ pkgs.rofi-calc pkgs.rofi-emoji ]; 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, ... }: { { pkgs, ... }: {
imports = [ imports = [
./steam.nix
./sunshine.nix ./sunshine.nix
]; ];
@ -14,5 +13,4 @@
winetricks 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; with lib;
let cfg = config.features.gaming.steam; let cfg = config.features.gaming.sunshine;
in { in {

View File

@ -1,4 +1,8 @@
<<<<<<< HEAD
{ imports = [ ./podman.nix ./qemu.nix ]; }
=======
imports = [ imports = [
./podman.nix ./podman.nix
./qemu.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, ... }: { pkgs, ... }:
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
virt-manager virt-manager
virtiofsd virtiofsd
]; ];
>>>>>>> f7c149b (Various changes in home-config)
} }

View File

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

View File

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

View File

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

View File

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

View File

@ -1,5 +1,7 @@
{ {
imports = [ imports = [
./baserow.nix ./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 = [ imports = [
./container.nix ./container.nix
./gitea.nix ./gitea.nix
<<<<<<< HEAD
./mariadb.nix
=======
./mysql.nix ./mysql.nix
>>>>>>> f7c149b (Various changes in home-config)
./n8n.nix ./n8n.nix
./postgres.nix ./postgres.nix
./traefik.nix ./traefik.nix

View File

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

View File

@ -4,4 +4,13 @@
services.mysql = { services.mysql = {
enable = true; enable = true;
package = pkgs.mariadb; 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; 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/"; }]; baserow.loadBalancer.servers = [{ url = "http://localhost:3001/"; }];
gitea.loadBalancer.servers = [{ url = "http://localhost:3000/"; }]; gitea.loadBalancer.servers = [{ url = "http://localhost:3000/"; }];
n8n.loadBalancer.servers = [{ url = "http://localhost:5678/"; }]; n8n.loadBalancer.servers = [{ url = "http://localhost:5678/"; }];
lanakk_blog.loadBalancer.servers = [{ url = "http://localhost:3002/"; }];
matomo.loadBalancer.servers = [{ url = "http://localhost:3003/"; }];
}; };
routers = { routers = {
api = { api = {
@ -70,6 +72,24 @@
service = "n8n"; service = "n8n";
entrypoints = "websecure"; 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";
};
}; };
}; };
}; };