Skip to content

Commit

Permalink
24.11
Browse files Browse the repository at this point in the history
did not test samba and headscale yet

juanfont/headscale#2210 (comment)
  • Loading branch information
motiejus committed Nov 19, 2024
1 parent 112e51d commit e1b782a
Show file tree
Hide file tree
Showing 12 changed files with 53 additions and 64 deletions.
28 changes: 14 additions & 14 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
description = "motiejus/config";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
flake-compat.url = "github:nix-community/flake-compat";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
nur.url = "github:nix-community/NUR";

home-manager.url = "github:nix-community/home-manager/release-24.05";
home-manager.url = "github:nix-community/home-manager/release-24.11";
home-manager.inputs.nixpkgs.follows = "nixpkgs";

agenix = {
Expand Down
2 changes: 1 addition & 1 deletion hosts/fwminex/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ in
'';
"irc.jakstys.lt".extraConfig =
let
gamja = pkgs.pkgs-unstable.compressDrvWeb (pkgs.gamja.override {
gamja = pkgs.compressDrvWeb (pkgs.gamja.override {
gamjaConfig = {
server = {
url = "irc.jakstys.lt:6698";
Expand Down
8 changes: 1 addition & 7 deletions hosts/mtworx/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ in
kernelModules = [ "kvm-intel" ];
loader.systemd-boot.enable = true;

# 6.10+ to fix audio. Thanks https://github.com/ilian/cfg/blob/4588b90e674827304cd8e0b9d1aecd75416d1cde/hosts/carbon/configuration.nix#L19
kernelPackages = pkgs.linuxPackages_6_11;

initrd = {
availableKernelModules = [
"xhci_pci"
Expand All @@ -45,10 +42,7 @@ in
"usbhid"
"tpm_tis"
];
systemd = {
enableTpm2 = true;
emergencyAccess = true;
};
systemd.emergencyAccess = true;
luks.devices = {
luksroot = {
device = "${nvme}-part3";
Expand Down
2 changes: 0 additions & 2 deletions hosts/vm/configuration.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
self,
pkgs,
modulesPath,
...
}:
Expand All @@ -24,7 +23,6 @@

boot = {
loader.systemd-boot.enable = true;
kernelPackages = pkgs.zfs.latestCompatibleLinuxPackages;
supportedFilesystems = [
"zfs"
"btrfs"
Expand Down
1 change: 0 additions & 1 deletion hosts/vno1-gdrx/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ in
};

boot = {
kernelPackages = pkgs.linuxPackages_latest;
kernelModules = [ "kvm-intel" ];
loader.systemd-boot.enable = true;
initrd = {
Expand Down
2 changes: 1 addition & 1 deletion hosts/vno3-rp3b/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
# shared printing
services.avahi = {
enable = true;
nssmdns = true;
nssmdns4 = true;
openFirewall = true;
publish = {
enable = true;
Expand Down
9 changes: 4 additions & 5 deletions modules/profiles/desktop/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ in
ffmpeg
tinycc
scrcpy
cheese
arandr
pandoc
evince
Expand All @@ -163,6 +164,7 @@ in
libheif
mplayer
tcpflow
nautilus
smplayer
inkscape
chromium
Expand Down Expand Up @@ -209,10 +211,12 @@ in
graphicsmagick
magic-wormhole
signal-desktop
gnome-calendar
element-desktop
netsurf-browser
man-pages-posix
git-filter-repo
gnome-calculator
age-plugin-yubikey
hunspellDicts.en_US
python3Packages.ipython
Expand All @@ -225,11 +229,6 @@ in
gcc_latest
clang-tools

gnome.cheese
gnome.nautilus
gnome.gnome-calculator
gnome.gnome-calendar

xorg.xev
xorg.xeyes
xorg.lndir
Expand Down
2 changes: 1 addition & 1 deletion modules/services/gitea/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
route /static/assets/* {
uri strip_prefix /static
file_server * {
root ${pkgs.pkgs-unstable.compressDrvWeb pkgs.gitea.data { }}/public
root ${pkgs.compressDrvWeb pkgs.gitea.data { }}/public
precompressed zstd br gzip
}
}
Expand Down
4 changes: 2 additions & 2 deletions modules/services/headscale/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
server_url = "https://vpn.jakstys.lt";
ip_prefixes = [ config.mj.services.headscale.subnetCIDR ];
log.level = "warn";
dns_config = {
nameservers = [
dns = {
nameservers.global = [
"1.1.1.1"
"8.8.4.4"
];
Expand Down
7 changes: 1 addition & 6 deletions modules/services/immich/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@
lib,
pkgs,
myData,
nixpkgs-unstable,
...
}:
let
cfg = config.mj.services.immich;
immich-package = pkgs.pkgs-unstable.immich;
immich-user = config.services.immich.user;
immich-group = config.services.immich.group;
startScript = pkgs.writeShellApplication {
Expand All @@ -28,7 +26,7 @@ let
exec setpriv \
--ruid ${immich-user} \
--inh-caps -all \
${lib.getExe immich-package}
${lib.getExe pkgs.immich}
'';
};
in
Expand All @@ -38,12 +36,9 @@ in
bindPaths = lib.mkOption { type = attrsOf str; };
};

imports = [ "${nixpkgs-unstable}/nixos/modules/services/web-apps/immich.nix" ];

config = lib.mkIf cfg.enable {

services.immich = {
package = immich-package;
enable = true;
port = myData.ports.immich-server;

Expand Down
48 changes: 26 additions & 22 deletions modules/services/jakstpub/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,28 +31,32 @@ in
'';
};

samba = {
# https://wiki.samba.org/index.php/Setting_up_Samba_as_a_Standalone_Server
enable = true;
securityType = "user";
enableNmbd = false;
enableWinbindd = false;
extraConfig = ''
map to guest = Bad User
guest account = jakstpub
server role = standalone server
'';
shares =
let
defaults = {
"public" = "yes";
"mangled names" = "no";
"guest ok" = "yes";
"force user" = "jakstpub";
"force group" = "jakstpub";
samba =
let
defaults = {
"public" = "yes";
"mangled names" = "no";
"guest ok" = "yes";
"force user" = "jakstpub";
"force group" = "jakstpub";
};
in
{
# https://wiki.samba.org/index.php/Setting_up_Samba_as_a_Standalone_Server
enable = true;

nmbd.enable = false;
winbindd.enable = false;

settings = {
global = {
security = "user";

"map to guest" = "Bad User";
"guest account" = "jakstpub";
"server role" = "standalone server";
};
in
{

public = defaults // {
"path" = cfg.dataDir;
"writeable" = "yes";
Expand All @@ -66,7 +70,7 @@ in
"read only" = "yes";
};
};
};
};

samba-wsdd = {
enable = true;
Expand Down

0 comments on commit e1b782a

Please sign in to comment.