Development
Johannes Hendrik Gerard van der Weide 2024-09-21 22:05:15 +02:00
parent bbd08b59c6
commit 0d8dc7087d
9 changed files with 158 additions and 0 deletions

10
cage.nix Normal file
View File

@ -0,0 +1,10 @@
{ pkgs, ... }:
{
services.cage = {
enable = true;
user = "cage";
program = "${pkgs.stremio}/bin/stremio";
};
}

63
flake.lock Normal file
View File

@ -0,0 +1,63 @@
{
"nodes": {
"nixlib": {
"locked": {
"lastModified": 1726362065,
"narHash": "sha256-4h15WKdrs9zf6DGaeeV7ntU/pHHGkH6geYt1QBW0CP4=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "9db4db09d82e4b2207bfa7f1e747a4f49d214555",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"nixos-generators": {
"inputs": {
"nixlib": "nixlib",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1726707592,
"narHash": "sha256-FCbXzY5cN9pMUF9xxvRAPBWj+pnmcouwuQb+OrMWo0M=",
"owner": "nix-community",
"repo": "nixos-generators",
"rev": "0ac657a7486103867cb4d7dcb660cc73c8c37651",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixos-generators",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1726447378,
"narHash": "sha256-2yV8nmYE1p9lfmLHhOCbYwQC/W8WYfGQABoGzJOb1JQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "086b448a5d54fd117f4dc2dee55c9f0ff461bdc1",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-24.05",
"type": "indirect"
}
},
"root": {
"inputs": {
"nixos-generators": "nixos-generators",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

31
flake.nix Normal file
View File

@ -0,0 +1,31 @@
{
inputs = {
nixpkgs.url = "nixpkgs/nixos-24.05";
nixos-generators = {
url = "github:nix-community/nixos-generators";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, nixos-generators, ... }: {
packages.x86_64-linux = {
default = nixos-generators.nixosGenerate {
system = "x86_64-linux";
modules = [
./system
./user.nix
./cage.nix
];
format = "raw-efi";
};
raw-efi = nixos-generators.nixosGenerate {
system = "x86_64-linux";
modules = [
./system
./user.nix
./cage.nix
];
format = "raw-efi";
};
};
};
}

6
system/audio.nix Normal file
View File

@ -0,0 +1,6 @@
{
services.pipewire = {
enable = true;
audio.enable = true;
};
}

8
system/default.nix Normal file
View File

@ -0,0 +1,8 @@
{
imports = [
./getty.nix
./audio.nix
./networking.nix
./other.nix
];
}

5
system/getty.nix Normal file
View File

@ -0,0 +1,5 @@
{
services.getty = {
autologinUser = "cage";
};
}

5
system/networking.nix Normal file
View File

@ -0,0 +1,5 @@
{
networking = {
hostName = "StremioCageTV";
};
}

21
system/other.nix Normal file
View File

@ -0,0 +1,21 @@
{ pkgs, ... }:
{
environment = {
# Systemwide installed packages
systemPackages = with pkgs; [
stremio
];
};
boot = {
kernelParams = [ "console=tty0" ];
loader = {
efi.canTouchEfiVariables = true;
systemd-boot = {
enable = true;
editor = false;
};
};
};
}

9
user.nix Normal file
View File

@ -0,0 +1,9 @@
{
users.users.cage = {
initialPassword = "";
isNormalUser = true;
description = "Cage User";
extraGroups = [ "networkmanager" "wheel" "sudo" "adm" "video" "audio" ];
};
}