Compare commits
10 commits
a7386c46e5
...
b8e5166a0f
Author | SHA1 | Date | |
---|---|---|---|
![]() |
b8e5166a0f | ||
![]() |
4d27e802d8 | ||
![]() |
6b7f7211e1 | ||
![]() |
109551a5b7 | ||
![]() |
bd1a4c753a | ||
![]() |
befc7c1572 | ||
![]() |
0fce83c2ba | ||
![]() |
ef17814f60 | ||
![]() |
de40392d0c | ||
![]() |
28105b23c0 |
|
@ -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
34
filebrowser.nix
Normal 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
27
flake.lock
Normal 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
|
||||
}
|
|
@ -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
|
||||
];
|
||||
|
||||
};
|
||||
};
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -23,6 +23,7 @@ in
|
|||
# acmeRoot = null;
|
||||
};
|
||||
};
|
||||
postgresql.enable = true;
|
||||
#
|
||||
nextcloud = {
|
||||
enable = true;
|
||||
|
|
Loading…
Reference in a new issue