Compare commits

...

12 commits

4 changed files with 91 additions and 62 deletions

View file

@ -1,6 +1,7 @@
{ {
inputs, inputs,
pkgs, pkgs,
config,
... ...
}: }:
@ -9,6 +10,7 @@
inputs.disko.nixosModules.disko inputs.disko.nixosModules.disko
./hardware-configuration.nix ./hardware-configuration.nix
./disko-config.nix ./disko-config.nix
./syncthing.nix
../../modules/security.nix ../../modules/security.nix
../../modules/nix-config.nix ../../modules/nix-config.nix
../../modules/timezone.nix ../../modules/timezone.nix
@ -24,33 +26,32 @@
config.boot.loader.grub.efiInstallAsRemovable = true; config.boot.loader.grub.efiInstallAsRemovable = true;
#config.boot.loader.efi.efiSysMountPoint = "/boot/efi"; #config.boot.loader.efi.efiSysMountPoint = "/boot/efi";
# Define on which hard drive you want to install Grub. # Define on which hard drive you want to install Grub.
config.boot.loader.grub.device = "/dev/sdb"; # or "nodev" for efi only config.boot.loader.grub.device = "/dev/disk/by-id/ata-HGST_HTS725050A7E630_TF655AY92SM3XL"; # or "nodev" for efi only
config.security.sudo.wheelNeedsPassword = false; config.security.sudo.wheelNeedsPassword = false;
config.networking = { config.networking = {
hostName = "igor"; hostName = "igor";
domain = "failco.de"; domain = "failco.de";
wireless.enable = false;
useDHCP = false; wireless = {
enableIPv6 = false; enable = true;
networkmanager.enable = true; userControlled.enable = true;
interfaces.enp0s25 = { allowAuxiliaryImperativeNetworks = true;
ipv4.addresses = [ secretsFile = "/etc/wireless.conf";
{ networks = {
address = "192.168.178.2"; Prapsschnalinen.pskRaw = "ext:home";
prefixLength = 24; };
}
];
}; };
defaultGateway = "192.168.178.1";
nameservers = [ useDHCP = true;
"192.168.178.1" enableIPv6 = true;
"1.1.1.1" networkmanager.enable = false;
"8.8.8.8"
];
firewall.enable = true; firewall.enable = true;
firewall.allowedTCPPorts = [
config.services.mysql.settings.mysqld.port
];
}; };
config.security.sudo = { config.security.sudo = {
@ -99,14 +100,6 @@
config.services.mysql = { config.services.mysql = {
enable = true; enable = true;
package = pkgs.mariadb; package = pkgs.mariadb;
ensureUsers = [
{
name = "mediathekview";
ensurePermissions = {
"mediathekview.*" = "ALL PERMISSIONS";
};
}
];
}; };
config.programs.firefox.enable = true; config.programs.firefox.enable = true;
@ -118,6 +111,7 @@
isNormalUser = true; isNormalUser = true;
extraGroups = [ "wheel" ]; # Enable sudo for the user. extraGroups = [ "wheel" ]; # Enable sudo for the user.
shell = pkgs.zsh; shell = pkgs.zsh;
packages = [ pkgs.devenv ];
}; };
config.environment.systemPackages = with pkgs; [ config.environment.systemPackages = with pkgs; [
@ -126,8 +120,15 @@
waybar waybar
hyprpaper hyprpaper
wofi wofi
tmux
lftp
]; ];
config.programs.direnv = {
enable = true;
silent = true;
};
config.programs.hyprland = { config.programs.hyprland = {
enable = true; enable = true;
withUWSM = true; withUWSM = true;

View file

@ -26,35 +26,35 @@
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
# fileSystems."/" = # fileSystems."/" =
# { device = "/dev/disk/by-uuid/e7720a57-f96a-4f37-a2ad-43527868418c"; # { device = "/dev/disk/by-uuid/e7720a57-f96a-4f37-a2ad-43527868418c";
# fsType = "btrfs"; # fsType = "btrfs";
# options = [ "subvol=rootfs" ]; # options = [ "subvol=rootfs" ];
# }; # };
#
# fileSystems."/.swapvol" = # fileSystems."/.swapvol" =
# { device = "/dev/disk/by-uuid/e7720a57-f96a-4f37-a2ad-43527868418c"; # { device = "/dev/disk/by-uuid/e7720a57-f96a-4f37-a2ad-43527868418c";
# fsType = "btrfs"; # fsType = "btrfs";
# options = [ "subvol=swap" ]; # options = [ "subvol=swap" ];
# }; # };
#
# fileSystems."/boot" = # fileSystems."/boot" =
# { device = "/dev/disk/by-uuid/2EDA-47FD"; # { device = "/dev/disk/by-uuid/2EDA-47FD";
# fsType = "vfat"; # fsType = "vfat";
# options = [ "fmask=0022" "dmask=0022" ]; # options = [ "fmask=0022" "dmask=0022" ];
# }; # };
#
# fileSystems."/home" = # fileSystems."/home" =
# { device = "/dev/disk/by-uuid/e7720a57-f96a-4f37-a2ad-43527868418c"; # { device = "/dev/disk/by-uuid/e7720a57-f96a-4f37-a2ad-43527868418c";
# fsType = "btrfs"; # fsType = "btrfs";
# options = [ "subvol=home" ]; # options = [ "subvol=home" ];
# }; # };
#
# fileSystems."/nix" = # fileSystems."/nix" =
# { device = "/dev/disk/by-uuid/e7720a57-f96a-4f37-a2ad-43527868418c"; # { device = "/dev/disk/by-uuid/e7720a57-f96a-4f37-a2ad-43527868418c";
# fsType = "btrfs"; # fsType = "btrfs";
# options = [ "subvol=nix" ]; # options = [ "subvol=nix" ];
# }; # };
swapDevices = [ ]; swapDevices = [ ];

29
hosts/igor/syncthing.nix Normal file
View file

@ -0,0 +1,29 @@
{ config, lib, ... }:
{
config.services.syncthing = {
enable = true;
user = "vsftpd";
group = "vsftpd";
dataDir = "/var/lib/vsftpd";
settings.devices = {
thrall = {
id = "P52YQU2-7LCEOVV-DSGTAZG-AJ2DSJD-JPHSUJE-HC2KAGO-YR4SXQD-V6OQ7QF";
addresses = [ "tcp://195.90.211.228:22000" ];
};
};
settings.folders = {
paperless = {
path = "${config.services.vsftpd.localRoot}/scan";
devices = [ "thrall" ];
versioning = {
type = "trashcan";
params.cleanoutDays = "90";
};
};
};
};
}

View file

@ -5,13 +5,12 @@
localUsers = true; localUsers = true;
writeEnable = true; writeEnable = true;
chrootlocalUser = true; chrootlocalUser = true;
allowWriteableChroot = true; userDbPath = "/etc/vsftpd/users";
userlist = [ "scan" ]; enableVirtualUsers = true;
virtualUseLocalPrivs = true;
localRoot = "/var/lib/vsftpd/data";
extraConfig = "local_umask=002";
}; };
config.users.users.scan = { config.networking.firewall.allowedTCPPorts = [ 20 21 ];
isNormalUser = true;
};
config.networking.firewall.allowedTCPPorts = [ 21 ];
} }