This commit is contained in:
Tyler Beckman 2024-12-12 15:33:50 -07:00
parent 32a1ca6843
commit 18febeff87
Signed by: Ty
GPG key ID: 2813440C772555A4
5 changed files with 109 additions and 3 deletions

69
flake.lock generated
View file

@ -145,6 +145,24 @@
"type": "github"
}
},
"flake-utils_4": {
"inputs": {
"systems": "systems_3"
},
"locked": {
"lastModified": 1681202837,
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "cfacdce06f30d2b68473a46042957675eebb3401",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@ -288,6 +306,20 @@
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1682134069,
"narHash": "sha256-TnI/ZXSmRxQDt2sjRYK/8j8iha4B4zP2cnQCZZ3vp7k=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "fd901ef4bf93499374c5af385b2943f5801c0833",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"plasma-manager": {
"inputs": {
"home-manager": [
@ -322,7 +354,8 @@
"nixpkgs-24-11": "nixpkgs-24-11",
"plasma-manager": "plasma-manager",
"sddm-sugar-candy-nix": "sddm-sugar-candy-nix",
"vscode-extensions": "vscode-extensions"
"vscode-extensions": "vscode-extensions",
"vscode-server": "vscode-server"
}
},
"sddm-sugar-candy-nix": {
@ -375,6 +408,21 @@
"type": "github"
}
},
"systems_3": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"vscode-extensions": {
"inputs": {
"flake-compat": "flake-compat_2",
@ -396,6 +444,25 @@
"repo": "nix-vscode-extensions",
"type": "github"
}
},
"vscode-server": {
"inputs": {
"flake-utils": "flake-utils_4",
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1729422940,
"narHash": "sha256-DlvJv33ml5UTKgu4b0HauOfFIoDx6QXtbqUF3vWeRCY=",
"owner": "nix-community",
"repo": "nixos-vscode-server",
"rev": "8b6db451de46ecf9b4ab3d01ef76e59957ff549f",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixos-vscode-server",
"type": "github"
}
}
},
"root": "root",

View file

@ -48,9 +48,11 @@
url = "github:nix-community/nix-vscode-extensions";
inputs.nixpkgs.follows = "nixpkgs";
};
# VSCode server support
vscode-server.url = "github:nix-community/nixos-vscode-server";
};
outputs = inputs@{ nixpkgs, home-manager, plasma-manager, nix-index-database, ... }: let
outputs = inputs@{ nixpkgs, home-manager, plasma-manager, nix-index-database, vscode-server, ... }: let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
secrets = import ./secrets.nix;
@ -108,6 +110,10 @@
vscode.enable = false;
};
}
# VSCode server support
vscode-server.nixosModules.default
({ pkgs, ... }: { services.vscode-server = { enable = true; nodejsPackage = pkgs.nodejs-18_x; installPath = "$HOME/.vscodium-server"; }; })
];
specialArgs = {

View file

@ -10,6 +10,7 @@
imports = [
./hardware-configuration.nix
./modules
./services
];
system.stateVersion = "24.11";

View file

@ -0,0 +1,15 @@
{ ... }:
{
imports = [
./jellyfin.nix
];
networking = {
nat = {
enable = true;
internalInterfaces = ["ve-+"];
externalInterface = "wlp2s0";
};
networkmanager.unmanaged = [ "interface-name:ve-*" ];
};
}

View file

@ -0,0 +1,17 @@
{ config, ... }:
{
containers.jellyfin = {
config = { pkgs, ...}: {
system.stateVersion = "25.05";
services.jellyfin = {
enable = true;
package = pkgs.jellyfin;
};
};
autoStart = true;
privateNetwork = true;
hostAddress = "172.30.0.2"; # TODO define in config option
localAddress = "172.30.0.2";
};
}