aboutsummaryrefslogtreecommitdiff
path: root/nixos
diff options
context:
space:
mode:
Diffstat (limited to 'nixos')
-rw-r--r--nixos/machine/adm-mpd.nix30
-rw-r--r--nixos/machine/adm-omnia.nix4
-rw-r--r--nixos/machine/default.nix2
-rw-r--r--nixos/machine/spt-mox.nix10
-rw-r--r--nixos/machine/spt-omnia.nix17
-rw-r--r--nixos/modules/generic.nix32
6 files changed, 84 insertions, 11 deletions
diff --git a/nixos/machine/adm-mpd.nix b/nixos/machine/adm-mpd.nix
index 3e103e1..aa85445 100644
--- a/nixos/machine/adm-mpd.nix
+++ b/nixos/machine/adm-mpd.nix
@@ -5,6 +5,7 @@ with lib;
{
config = {
+
fileSystems = {
"/" = {
device = "/dev/mmcblk0p2";
@@ -18,6 +19,35 @@ with lib;
device = "/dev/mmcblk0p1";
};
};
+
+ networking.wireless = {
+ enable = true;
+ networks = filterAttrs (n: v: n == "Nela") config.secrets.wifiNetworks;
+ environmentFile = "/run/secrets/wifi.env";
+ userControlled.enable = true;
+ };
+
+ services.pipewire = {
+ enable = true;
+ alsa.enable = true;
+ pulse.enable = true;
+ };
+
+ services.spotifyd = {
+ enable = true;
+ settings.global = {
+ device_name = "Adámkovi";
+ device = "sysdefault";
+ mixer = "Master";
+ bitrate = 320;
+ cache_path = "/var/cahe/spotify";
+ no_audio_cache = true;
+ volume_normalisation = true;
+ normalisation_pregain = -10;
+ initial_volume = 60;
+ };
+ };
+
};
}
diff --git a/nixos/machine/adm-omnia.nix b/nixos/machine/adm-omnia.nix
index 21bfeb6..f5ca827 100644
--- a/nixos/machine/adm-omnia.nix
+++ b/nixos/machine/adm-omnia.nix
@@ -5,6 +5,10 @@ with lib;
{
config = {
+ cynerd = {
+ openvpn.oldpersonal = true;
+ };
+
};
}
diff --git a/nixos/machine/default.nix b/nixos/machine/default.nix
index 87c9d15..32ad5ab 100644
--- a/nixos/machine/default.nix
+++ b/nixos/machine/default.nix
@@ -14,5 +14,5 @@
machine-adm-omnia = import ./adm-omnia.nix;
machine-adm-omnia2 = import ./adm-omnia2.nix;
- machine-adm-mpd = import ./spt-mpd.nix;
+ machine-adm-mpd = import ./adm-mpd.nix;
}
diff --git a/nixos/machine/spt-mox.nix b/nixos/machine/spt-mox.nix
index eb304b2..bb0ac5e 100644
--- a/nixos/machine/spt-mox.nix
+++ b/nixos/machine/spt-mox.nix
@@ -24,6 +24,16 @@ with lib;
];
};
};
+ interfaces.brlan = {
+ ipv4 = {
+ addresses = [{
+ address = config.cynerd.hosts.spt.mox;
+ prefixLength = 24;
+ }];
+ };
+ };
+ defaultGateway = config.cynerd.hosts.spt.omnia;
+ nameservers = [ config.cynerd.hosts.spt.omnia "1.1.1.1" "8.8.8.8" ];
dhcpcd.allowInterfaces = [ "brlan" ];
};
};
diff --git a/nixos/machine/spt-omnia.nix b/nixos/machine/spt-omnia.nix
index 21bfeb6..4cb80c4 100644
--- a/nixos/machine/spt-omnia.nix
+++ b/nixos/machine/spt-omnia.nix
@@ -5,6 +5,23 @@ with lib;
{
config = {
+ cynerd = {
+ openvpn.oldpersonal = true;
+ };
+
+ services.syncthing = {
+ enable = true;
+ #user = mkDefault "cynerd";
+ #group = mkDefault "cynerd";
+ openDefaultPorts = true;
+
+ overrideDevices = false;
+ overrideFolders = false;
+
+ dataDir = "/data";
+ configDir = "/srv/syncthing";
+ };
+
};
}
diff --git a/nixos/modules/generic.nix b/nixos/modules/generic.nix
index 2b3c3fd..57c5d82 100644
--- a/nixos/modules/generic.nix
+++ b/nixos/modules/generic.nix
@@ -2,7 +2,11 @@
with lib;
-{
+let
+
+ isNative = config.nixpkgs.crossSystem == null;
+
+in {
config = {
system.stateVersion = "22.05";
@@ -12,12 +16,10 @@ with lib;
settings = {
auto-optimise-store = true;
substituters = [
- "https://cache.nixos.org"
"https://thefloweringash-armv7.cachix.org"
"https://arm.cachix.org"
];
trusted-public-keys = [
- "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"thefloweringash-armv7.cachix.org-1:v+5yzBD2odFKeXbmC+OPWVqx4WVoIVO6UXgnSAWFtso="
"arm.cachix.org-1:K3XjAeWPgWkFtSS9ge5LJSLw3xgnNqyOaG7MDecmTQ8="
];
@@ -41,7 +43,8 @@ with lib;
environment.systemPackages = with pkgs; [
git # We need git for this repository to even work
# Administration tools
- coreutils moreutils binutils psmisc progress lshw file
+ #coreutils moreutils binutils psmisc progress lshw file
+ coreutils binutils psmisc progress lshw file
ldns wget
gnumake
exfat exfatprogs
@@ -49,16 +52,16 @@ with lib;
usbutils
# NCurses tools
- htop iotop glances
+ htop iotop #glances
mc
screen tmux
- ncdu
+ #ncdu
# ls tools
tree
- mlocate
lsof
strace
+ #mlocate
sourceHighlight # Colors for less
unrar p7zip zip unzip
@@ -71,7 +74,16 @@ with lib;
lm_sensors
- ] ++ optional (system == "x86_64-linux") ltrace;
+ ] ++ optionals (system == "x86_64-linux") [
+ ltrace
+ ] ++ optionals (!isNative) [
+ ncdu_1
+ ] ++ optionals (isNative) [
+ moreutils
+ glances
+ ncdu
+ mlocate
+ ];
users.mutableUsers = false;
users.groups.cynerd.gid = 1000;
@@ -87,14 +99,14 @@ with lib;
subGidRanges = [{ count = 65534; startGid = 10000; }];
isNormalUser = true;
createHome = true;
- shell = pkgs.zsh.out;
+ shell = if isNative then pkgs.zsh.out else pkgs.bash.out;
passwordFile = "/run/secrets/cynerd.pass";
openssh.authorizedKeys.keyFiles = [
(config.personal-secrets + "/unencrypted/git-private.pub")
];
};
};
- programs.zsh.enable = true;
+ programs.zsh.enable = isNative;
programs.shellrc.enable = true;
programs.vim.defaultEditor = mkDefault true;