1
0
Fork 0

Rename hosts folder

This commit is contained in:
Malte Brandy 2020-07-02 21:36:42 +02:00
parent 9f71bd4f8e
commit 1105278ca2
No known key found for this signature in database
GPG key ID: 226A2D41EF5378C9
84 changed files with 69 additions and 44 deletions

Binary file not shown.

View file

@ -15,7 +15,7 @@
inherit (pkgs) minetest; inherit (pkgs) minetest;
inherit (pkgs.wineWowPackages) staging; inherit (pkgs.wineWowPackages) staging;
gw2 = pkgs.writeShellScriptBin "gw2" '' gw2 = pkgs.writeShellScriptBin "gw2" ''
cd /home/maralorn/GW2 cd /home/maralorn/volatile/GW2
# Intel/AMD Mesa Specific Env_vars # Intel/AMD Mesa Specific Env_vars
# export vblank_mode=0 # export vblank_mode=0

View file

@ -101,8 +101,8 @@ in {
default = makeConfig "hera" [ default = makeConfig "hera" [
./on-my-machine.nix ./on-my-machine.nix
./headless.nix ./headless.nix
../hosts/hera/weechat ..nixos/machineshera/weechat
../hosts/hera/secret ..nixos/machineshera/secret
./kassandra-server.nix ./kassandra-server.nix
./headless-mpd.nix ./headless-mpd.nix
./mail.nix ./mail.nix

View file

@ -1,8 +1,26 @@
{ pkgs, config, ... }: { { pkgs, config, ... }: {
home.file.".config/beets/config.yaml".text = builtins.toJSON {
directory = "~/media/audio";
library = "~/.config/beets/musiclibrary.db";
import = { move = true; };
paths = {
default = "$genre/%the{$albumartist}/$album%aunique{}/$track $title";
singleton = "$genre/%the{$artist}/singles/$title";
comp = "$genre/%the{$artist}/$album%aunique{}/$track $title";
"genre:soundtrack" = "Soundtrack/$album%aunique{}/$track $title";
"genre::classical" = "$genre/%the{$composer}/$album%aunique{}/$track $title";
};
plugins = "convert web mpdstats mpdupdate fromfilename the";
convert = {
auto = true;
format = "opus";
never_convert_lossy_files = true;
};
};
services = { services = {
mpd = { mpd = {
enable = true; enable = true;
network.listenAddress = "::1"; #network.listenAddress = "::1";
musicDirectory = "${config.home.homeDirectory}/media/audio"; musicDirectory = "${config.home.homeDirectory}/media/audio";
extraConfig = '' extraConfig = ''
audio_output { audio_output {

View file

@ -5,8 +5,8 @@
let let
inherit (config.m-0) hosts prefix private; inherit (config.m-0) hosts prefix private;
inherit (private) me wireguard; inherit (private) me wireguard;
nixos-hardware = (import ../../nix/sources.nix).nixos-hardware; nixos-hardware = (import ../../../nix/sources.nix).nixos-hardware;
inherit (import ../../common/common.nix { inherit pkgs; }) syncthing; inherit (import ../../../common/common.nix { inherit pkgs; }) syncthing;
in { in {
imports = [ imports = [
@ -14,11 +14,11 @@ in {
"${nixos-hardware}/common/pc/ssd" "${nixos-hardware}/common/pc/ssd"
"${(builtins.fetchGit "ssh://git@git.darmstadt.ccc.de/cdark.net/nixdark")}" "${(builtins.fetchGit "ssh://git@git.darmstadt.ccc.de/cdark.net/nixdark")}"
./hardware-configuration.nix ./hardware-configuration.nix
../../system ../../roles
../../system/fonts.nix ../../roles/fonts.nix
../../system/boot-key.nix ../../roles/boot-key.nix
../../system/standalone ../../roles/standalone
../../system/use-cache.nix ../../roles/use-cache.nix
]; ];
networking = { networking = {
@ -28,7 +28,7 @@ in {
m0wire = { m0wire = {
allowedIPsAsRoutes = false; allowedIPsAsRoutes = false;
ips = [ "${hosts.apollo-wg}/112" ]; ips = [ "${hosts.apollo-wg}/112" ];
privateKeyFile = "/etc/nixos/hosts/apollo/secret/wireguard-private"; privateKeyFile = "/etc/nixosnixos/machinesapollo/secret/wireguard-private";
peers = [{ peers = [{
publicKey = wireguard.pub.hera; publicKey = wireguard.pub.hera;
allowedIPs = [ "::/0" ]; allowedIPs = [ "::/0" ];
@ -45,6 +45,12 @@ in {
m-0 = { laptop.enable = true; }; m-0 = { laptop.enable = true; };
services = { services = {
beesd.filesystems.root = {
spec = "LABEL=root";
hashTableSizeMB = 2048;
verbosity = "crit";
extraOptions = [ "--loadavg-target" "4.0" ];
};
snapper = { snapper = {
configs.home = { configs.home = {
subvolume = "/home"; subvolume = "/home";
@ -71,8 +77,8 @@ in {
openDefaultPorts = true; openDefaultPorts = true;
declarative = syncthing.declarativeWith [ "hera" ] "/home/maralorn/media" declarative = syncthing.declarativeWith [ "hera" ] "/home/maralorn/media"
// { // {
cert = "/etc/nixos/hosts/apollo/secret/syncthing/cert.pem"; cert = "/etc/nixosnixos/machinesapollo/secret/syncthing/cert.pem";
key = "/etc/nixos/hosts/apollo/secret/syncthing/key.pem"; key = "/etc/nixosnixos/machinesapollo/secret/syncthing/key.pem";
}; };
}; };
gnome3.chrome-gnome-shell.enable = true; gnome3.chrome-gnome-shell.enable = true;

View file

@ -32,6 +32,7 @@
"/" = { "/" = {
device = "/dev/disk/by-uuid/ce5b0ac6-6eaf-45a6-b6c8-bd4958caf335"; device = "/dev/disk/by-uuid/ce5b0ac6-6eaf-45a6-b6c8-bd4958caf335";
fsType = "btrfs"; fsType = "btrfs";
options = ["compress=zstd" "autodefrag" "noatime"];
}; };
"/boot/EFI" = { "/boot/EFI" = {
device = "/dev/disk/by-uuid/C4A6-3DB5"; device = "/dev/disk/by-uuid/C4A6-3DB5";

View file

@ -20,7 +20,7 @@ let
privateNetwork = true; privateNetwork = true;
hostBridge = "bridge"; hostBridge = "bridge";
config = { pkgs, ... }: { config = { pkgs, ... }: {
imports = [ ../../system ]; imports = [ ../../roles ];
networking = { networking = {
interfaces.eth0 = { interfaces.eth0 = {

View file

@ -1,29 +1,29 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
# You need pw-files for every configured user in ./secret/pw-useralias for login to work. # You need pw-files for every configured user in ./secret/pw-useralias for login to work.
# dropbearkey -t rsa -f /etc/nixos/hosts/<hostname>/secret/boot_rsa # dropbearkey -t rsa -f /etc/nixosnixos/machines<hostname>/secret/boot_rsa
let let
inherit (config.m-0.private) me; inherit (config.m-0.private) me;
inherit (import ../../common/common.nix { inherit pkgs; }) syncthing; inherit (import ../../../common/common.nix { inherit pkgs; }) syncthing;
in { in {
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
../../system ../../roles
../../system/test-timer.nix ../../roles/test-timer.nix
../../system/standalone ../../roles/standalone
../../system/server ../../roles/server
../../system/git.nix ../../roles/git.nix
../../system/riot.nix ../../roles/riot.nix
../../system/mathechor.de.nix ../../roles/mathechor.de.nix
../../system/monitoring ../../roles/monitoring
../../system/blog.nix ../../roles/blog.nix
../../system/email2matrix.nix ../../roles/email2matrix.nix
../../system/matrix-synapse.nix ../../roles/matrix-synapse.nix
../../system/coturn.nix ../../roles/coturn.nix
../../system/serve-store.nix ../../roles/serve-store.nix
../../system/go-neb.nix ../../roles/go-neb.nix
./web.nix ./web.nix
./mail.nix ./mail.nix
./boot.nix ./boot.nix
@ -103,8 +103,8 @@ in {
user = "maralorn"; user = "maralorn";
openDefaultPorts = true; openDefaultPorts = true;
declarative = syncthing.declarativeWith [ "apollo" ] "/media" // { declarative = syncthing.declarativeWith [ "apollo" ] "/media" // {
cert = "/etc/nixos/hosts/hera/secret/syncthing/cert.pem"; cert = "/etc/nixosnixos/machineshera/secret/syncthing/cert.pem";
key = "/etc/nixos/hosts/hera/secret/syncthing/key.pem"; key = "/etc/nixosnixos/machineshera/secret/syncthing/key.pem";
}; };
}; };
}; };
@ -117,7 +117,7 @@ in {
isNormalUser = true; isNormalUser = true;
uid = 1001; uid = 1001;
extraGroups = [ "wheel" "systemd-journal" ]; extraGroups = [ "wheel" "systemd-journal" ];
passwordFile = "/etc/nixos/hosts/hera/secret/pw-choreutes"; passwordFile = "/etc/nixosnixos/machineshera/secret/pw-choreutes";
}; };
# This value determines the NixOS release with which your system is to be # This value determines the NixOS release with which your system is to be

View file

@ -25,7 +25,7 @@ in {
autoStart = true; autoStart = true;
config = { pkgs, lib, ... }: { config = { pkgs, lib, ... }: {
imports = imports =
[ ../../system "${(import ../../nix/sources.nix).nixos-mailserver}" ]; [ ../../roles "${(import ../../../nix/sources.nix).nixos-mailserver}" ];
services.prometheus.exporters = { services.prometheus.exporters = {
node.port = 9101; node.port = 9101;
postfix = { postfix = {

View file

@ -54,7 +54,7 @@ in {
wireguard.interfaces = { wireguard.interfaces = {
m0wire = { m0wire = {
ips = [ "${hosts.hera-wg}/112" ]; ips = [ "${hosts.hera-wg}/112" ];
privateKeyFile = "/etc/nixos/hosts/hera/secret/wireguard-private"; privateKeyFile = "/etc/nixosnixos/machineshera/secret/wireguard-private";
listenPort = wireguard.port; listenPort = wireguard.port;
peers = [{ peers = [{
publicKey = wireguard.pub.apollo; publicKey = wireguard.pub.apollo;

View file

@ -2,7 +2,7 @@
let me = config.m-0.private.me; let me = config.m-0.private.me;
in { in {
imports = [ imports = [
../common ../../common
./modules/laptop.nix ./modules/laptop.nix
./modules/loginctl-linger.nix ./modules/loginctl-linger.nix
]; ];
@ -10,7 +10,7 @@ in {
i18n = { defaultLocale = "en_US.UTF-8"; }; i18n = { defaultLocale = "en_US.UTF-8"; };
# For nixos-rebuild # For nixos-rebuild
nixpkgs.overlays = import ../overlays { inherit lib; }; nixpkgs.overlays = import ../../overlays { inherit lib; };
time.timeZone = "Europe/Berlin"; time.timeZone = "Europe/Berlin";

View file

@ -1,5 +1,5 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
let inherit (import ../lib) sources; let inherit (import ../../lib) sources;
local-nix-cache = import sources.local-nix-cache { }; local-nix-cache = import sources.local-nix-cache { };
in { in {
imports = [ (local-nix-cache.path + "/module.nix") ]; imports = [ (local-nix-cache.path + "/module.nix") ];

View file

@ -29,7 +29,7 @@
environment = { environment = {
# Put these into an extra file so the essential packages can also be included on non selfadminstrated systems from home-manager # Put these into an extra file so the essential packages can also be included on non selfadminstrated systems from home-manager
systemPackages = builtins.attrValues ({ systemPackages = builtins.attrValues ({
inherit (import ../../lib/update-system.nix { inherit (import ../../../lib/update-system.nix {
inherit pkgs; inherit pkgs;
nixos-rebuild = config.system.build.nixos-rebuild; nixos-rebuild = config.system.build.nixos-rebuild;
}) })

View file

@ -1,7 +1,7 @@
{ pkgs, config, lib, ... }: { pkgs, config, lib, ... }:
let let
user = "maralorn"; user = "maralorn";
inherit (import ../lib/update-system.nix { inherit (import ../../lib/update-system.nix {
nixos-rebuild = config.system.build.nixos-rebuild; nixos-rebuild = config.system.build.nixos-rebuild;
inherit pkgs; inherit pkgs;
}) })

View file

@ -12,7 +12,7 @@ let
providers = [{ providers = [{
name = "Static dashboards"; name = "Static dashboards";
folder = ""; folder = "";
options.path = ../../system/monitoring/grafana-dashboards; options.path = ../../nixos/roles/monitoring/grafana-dashboards;
orgId = 1; orgId = 1;
type = "file"; type = "file";
updateIntervalSeconds = 60; updateIntervalSeconds = 60;

View file

@ -11,7 +11,7 @@ self: super: {
inherit (self) inherit (self)
git-crypt htop tree pwgen borgbackup inotifyTools direnv socat nmap ncdu git-crypt htop tree pwgen borgbackup inotifyTools direnv socat nmap ncdu
tcpdump tmux tig exa fzf ag fd bat ripgrep ranger pass sshuttle vnstat tcpdump tmux tig exa fzf ag fd bat ripgrep ranger pass sshuttle vnstat
entr libargon2 mblaze niv; entr libargon2 mblaze niv compsize;
}; };
my-home-pkgs = { my-home-pkgs = {

View file

@ -26,7 +26,7 @@ in {
name = "test-system-config"; name = "test-system-config";
inherit bins; inherit bins;
inherit imports; inherit imports;
} (haskellBody "system" ''nix_build $ ["<nixpkgs/nixos>", "-A", "system"] ++ paths ++ ["-I", [i|nixos-config=#{configDir}/hosts/#{hostname}/configuration.nix|], "-o", [i|result-system-#{hostname}|]] ++ fmap toString args''); } (haskellBody "system" ''nix_build $ ["<nixpkgs/nixos>", "-A", "system"] ++ paths ++ ["-I", [i|nixos-config=#{configDir}nixos/machines#{hostname}/configuration.nix|], "-o", [i|result-system-#{hostname}|]] ++ fmap toString args'');
test-home-config = self.writeHaskellScript { test-home-config = self.writeHaskellScript {
name = "test-home-config"; name = "test-home-config";