Skip to content

Commit

Permalink
feat(nixos): media
Browse files Browse the repository at this point in the history
  • Loading branch information
caarlos0 committed Nov 24, 2023
1 parent 505e95e commit 9717c0d
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 6 deletions.
22 changes: 20 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,24 @@
in
{
nixosConfigurations = {
media = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
{ nixpkgs.overlays = overlays; }
./machines/media.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.carlos = {
imports = [
./modules/home.nix
./modules/shell.nix
];
};
}
];
};
darkstar = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
Expand All @@ -77,8 +95,8 @@
./modules/yamllint.nix
./modules/go.nix
./modules/fzf.nix
./modules/tmux/default.nix
./modules/neovim/default.nix
./modules/tmux
./modules/neovim
./modules/gpg.nix
./modules/git.nix
./modules/gh/default.nix
Expand Down
34 changes: 34 additions & 0 deletions machines/hardware/media.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Do not modify this file! It was generated by ‘nixos-generate-config’
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:

{
imports =
[
(modulesPath + "/profiles/qemu-guest.nix")
];

boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];

fileSystems."/" =
{
device = "/dev/disk/by-uuid/c55ba4fa-f107-4d4e-9228-5e8f7f5dc6a1";
fsType = "ext4";
};

swapDevices = [ ];

# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.ens18.useDHCP = lib.mkDefault true;

nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}

10 changes: 6 additions & 4 deletions machines/media.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,13 @@
imports =
[
./shared.nix
/etc/nixos/hardware-configuration.nix
./hardware/media.nix
];

networking.hostName = "media"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
networking.hostName = "media";

users.users.carlos.packages = with pkgs; [
unrar
unpackerr
];

services.jellyfin = {
Expand Down Expand Up @@ -68,6 +66,10 @@
};
};

environment.systemPackages = with pkgs; [
unpackerr
];

systemd.services.unpackerr = {
description = "Unpackerr";
after = [ "network.target" ];
Expand Down

0 comments on commit 9717c0d

Please sign in to comment.