feat: added preliminary media-server module options

This commit is contained in:
serenity-F 2026-10-03 03:53:36 +10:00
parent 2d6cc6bd08
commit 5fc681ee97
No known key found for this signature in database
3 changed files with 65 additions and 19 deletions

View file

@ -67,6 +67,7 @@ For the purposes of authenticity and earnestness
- [Home Manager](https://nix-community.github.io/home-manager/)
- [Niri Flake](https://github.com/epireyn/niri-flake)
- [Stylix](https://stylix.danth.me/)
- [Nixflix](https://kiriwalawren.github.io/nixflix/)
## 🙋 Attributions

View file

@ -19,23 +19,17 @@
# flake inputs
inputs = {
# nix hardware - https://github.com/NixOS/nixos-hardware
hardware = {
url = "github:nixos/nixos-hardware";
};
# nixos core module inputs - https://wiki.nixos.org/wiki/NixOS_Wiki
# nixpkgs version - https://github.com/NixOS/nixpkgs
nixpkgs = {
url = "github:nixos/nixpkgs/nixos-unstable";
};
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
# nix hardware - https://github.com/NixOS/nixos-hardware
hardware.url = "github:nixos/nixos-hardware";
# dendritic stuff - https://github.com/mightyiam/dendritic
flake-parts = {
url = "github:hercules-ci/flake-parts";
};
import-tree = {
url = "github:vic/import-tree";
};
# flake parts - https://github.com/hercules-ci/flake-parts
# import tree - https://github.com/denful/import-tree
flake-parts.url = "github:hercules-ci/flake-parts";
import-tree.url = "github:vic/import-tree";
# helix editor plugins - https://codeberg.org/maxschipper/helix-plugins-nix
helix-plugins = {
@ -43,14 +37,22 @@
inputs.nixpkgs.follows = "nixpkgs";
};
# sound driver optimisations - https://github.com/musnix/musnix
musnix = {
url = "github:musnix/musnix";
};
# nice-to-haves for gaming - https://github.com/fufexan/nix-gaming
nix-gaming = {
url = "github:fufexan/nix-gaming";
inputs.nixpkgs.follows = "nixpkgs";
};
# sound driver optimisations - https://github.com/musnix/musnix
musnix = {
url = "github:musnix/musnix";
inputs.nixpkgs.follows = "nixpkgs";
};
# media server nixos module - https://github.com/kiriwalawren/nixflix
nixflix = {
url = "github:kiriwalawren/nixflix";
inputs.nixpkgs.follows = "nixpkgs";
};
# declarative dots - https://github.com/nix-community/home-manager
@ -62,6 +64,7 @@
# easy theming - https://github.com/nix-community/stylix
stylix = {
url = "github:danth/stylix";
inputs.nixpkgs.follows = "nixpkgs";
};
# niri window manager - https://github.com/YaLTeR/niri

View file

@ -0,0 +1,42 @@
# base level inputs, should only ever be self and inputs
{ self, inputs, ... }:
{
# module name declaration, as well as any required inputs
flake.nixosModules.media-server =
{ user-parts, ... }:
{
# import system level module for home manager functionality
imports = [ inputs.home-manager.nixosModules.home-manager ];
# system level nixflix options
nixflix = {
enable = true;
mediaDir = "/run/media/serenity/Orcus/media-share";
stateDir = "/home/serenity/.config/nixflix/.state";
jellyfin = {
enable = true;
users.{user-parts.user.username} = {
policy.isAdministrator = true;
password = "password";
};
};
};
# home manager options
home-manager.users.${user-parts.user.username} = {
# necessary for module name functionality
#imports = [ ];
};
};
}