Compare commits

..

10 commits

Author SHA1 Message Date
admin b8e5166a0f working filebrowser for jelly files 2024-03-06 22:14:44 +01:00
admin 4d27e802d8 init filebrowser 2024-03-06 20:48:43 +01:00
admin 6b7f7211e1 movie drive 2024-03-06 20:10:06 +01:00
admin 109551a5b7 movie drive 2024-03-03 09:19:19 +01:00
admin bd1a4c753a tailscale network interface 2024-03-03 09:16:42 +01:00
admin befc7c1572 explicit add db service 2024-03-02 17:32:59 +01:00
admin 0fce83c2ba disable powerMan 2024-03-02 16:50:14 +01:00
admin ef17814f60 init tailscale 2024-03-02 11:00:50 +01:00
admin de40392d0c fix starship fish 2024-03-02 10:53:24 +01:00
admin 28105b23c0 use kde 2024-03-02 08:31:13 +01:00
6 changed files with 106 additions and 7 deletions

View file

@ -11,6 +11,7 @@
];
nix.settings.experimental-features = [ "nix-command" "flakes" ];
powerManagement.enable = false;
# Bootloader.
boot.loader.grub.enable = true;
@ -26,6 +27,14 @@
# Enable networking
networking.networkmanager.enable = true;
services.tailscale = {
enable =true;
useRoutingFeatures = "server";
extraUpFlags = [
"--advertise-exit-node"
"--exit-node"
];
};
# Set your time zone.
time.timeZone = "Europe/Stockholm";
@ -51,10 +60,11 @@
# Enable the XFCE Desktop Environment.
# services.xserver.displayManager.lightdm.enable = true;
# services.xserver.desktopManager.xfce.enable = true;
services.xserver.desktopManager.plasma5.enable = true;
# Enable automatic login for the user.
# services.xserver.displayManager.autoLogin.enable = true;
# services.xserver.displayManager.autoLogin.user = "sondell";
services.xserver.displayManager.autoLogin.enable = true;
services.xserver.displayManager.autoLogin.user = "sondell";
# Configure keymap in X11
services.xserver = {
@ -108,12 +118,26 @@
environment.systemPackages = with pkgs; [
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
# wget
filebrowser
git
helix
fish
nil
starship
];
programs.fish= {
enable=true;
shellInit = "starship init fish | source";
};
programs.starship.enable = true;
programs.starship.settings = {
shell = {
disabled = false;
fish_indicator = "";
bash_indicator = "BASH";
};
};
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;

34
filebrowser.nix Normal file
View file

@ -0,0 +1,34 @@
{ config, pkgs, ... }:
let
domain = "files.sondell.org";
in
{
systemd.services.filebrowser = with pkgs; {
enable = true;
description = "web app file explorer";
wantedBy = [ "multi-user.target" ];
unitConfig = {
After="network-online.target";
};
serviceConfig = {
ExecStart = "${filebrowser}/bin/filebrowser -r /mnt/movie_drive -d /var/lib/filebrowser/filebrowser.db";
User= "jellyfin";
Type= "simple";
};
};
services.nginx.virtualHosts.${domain} = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://localhost:8080/";
proxyWebsockets = true;
# extraConfig = ''
# access_log /var/log/nginx/access.log main if=$forgejo_access_log;
# '';
};
};
}

27
flake.lock Normal file
View file

@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1709237383,
"narHash": "sha256-cy6ArO4k5qTx+l5o+0mL9f5fa86tYUX3ozE1S+Txlds=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "1536926ef5621b09bba54035ae2bb6d806d72ac8",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

View file

@ -6,7 +6,14 @@
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = attrs;
modules = [ ./configuration.nix ./forgejo.nix ./nextcloud.nix ./audiobooks.nix ./jellyfin.nix ];
modules = [
./configuration.nix
./forgejo.nix
./nextcloud.nix
./audiobooks.nix
./jellyfin.nix
./filebrowser.nix
];
};
};

View file

@ -8,8 +8,8 @@
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ata_piix" "pata_jmicron" "usbhid" "usb_storage" "floppy" "sd_mod" ];
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ata_piix" "pata_jmicron" "usbhid" "floppy" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
@ -17,6 +17,11 @@
{ device = "/dev/disk/by-uuid/a0be6182-8c58-4cac-b2c4-58148b1847e8";
fsType = "ext4";
};
fileSystems."/mnt/movie_drive" =
{ device = "/dev/disk/by-uuid/f3463885-fde8-4488-9442-37ced2b2c8f3";
fsType = "ext4";
};
swapDevices = [ ];
@ -26,6 +31,7 @@
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp4s0.useDHCP = lib.mkDefault true;
# networking.interfaces.tailscale0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;

View file

@ -23,6 +23,7 @@ in
# acmeRoot = null;
};
};
postgresql.enable = true;
#
nextcloud = {
enable = true;