feat!(flake): update homix
Update flake (`neovim-nightly-overlay` is fixed) Format all `.nix` files Unify package/module argument order: - `inputs`, `outputs`, `lib`, `pkgs`, `config`, ... Move Jellyfin config to a `NixOS` module (first one, yay) Add `direnv` to `reo101-shell` modules (was used, but not defined as wanted) - TODO: make it optional (module config options)
This commit is contained in:
parent
6a0898753d
commit
df9ce2d4e2
17 changed files with 194 additions and 158 deletions
|
@ -2,14 +2,13 @@
|
|||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ inputs, outputs, config, pkgs, ... }:
|
||||
{ inputs, outputs, lib, pkgs, config, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
];
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
### Set boot options
|
||||
boot = {
|
||||
|
@ -61,14 +60,27 @@
|
|||
|
||||
nix = {
|
||||
package = pkgs.nixFlakes;
|
||||
|
||||
# Enable flakes, the new `nix` commands and better support for flakes in it
|
||||
extraOptions = ''
|
||||
experimental-features = nix-command flakes repl-flake
|
||||
'';
|
||||
|
||||
# This will add each flake input as a registry
|
||||
# To make nix3 commands consistent with your flake
|
||||
registry = lib.mapAttrs (_: value: { flake = value; }) inputs;
|
||||
|
||||
# This will additionally add your inputs to the system's legacy channels
|
||||
# Making legacy nix commands consistent as well, awesome!
|
||||
nixPath = lib.mapAttrsToList (key: value: "${key}=${value.to.path}") config.nix.registry;
|
||||
|
||||
settings = {
|
||||
trusted-users = [
|
||||
"root"
|
||||
"reo101"
|
||||
];
|
||||
|
||||
# Add nix-community and rix101 cachix caches
|
||||
substituters = [
|
||||
"https://rix101.cachix.org"
|
||||
"https://nix-community.cachix.org"
|
||||
|
@ -80,7 +92,11 @@
|
|||
};
|
||||
};
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nixpkgs = {
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
};
|
||||
};
|
||||
|
||||
### NVIDIA
|
||||
services.xserver = {
|
||||
|
@ -165,11 +181,13 @@
|
|||
useUserPackages = true;
|
||||
useGlobalPkgs = false;
|
||||
|
||||
extraSpecialArgs = { inherit inputs outputs; } ;
|
||||
extraSpecialArgs = { inherit inputs outputs; };
|
||||
};
|
||||
|
||||
### Enable plymouth (bootscreen customizations)
|
||||
boot.plymouth.enable = true;
|
||||
boot.plymouth = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
|
@ -182,19 +200,8 @@
|
|||
];
|
||||
|
||||
### Jellyfin
|
||||
virtualisation.oci-containers.containers."jellyfin" = {
|
||||
autoStart = true;
|
||||
image = "docker.io/jellyfin/jellyfin:latest";
|
||||
volumes = [
|
||||
"/var/cache/jellyfin/config:/config"
|
||||
"/var/cache/jellyfin/cache:/cache"
|
||||
"/var/log/jellyfin:/log"
|
||||
"/media:/media:ro"
|
||||
];
|
||||
ports = [ "8096:8096" ];
|
||||
environment = {
|
||||
JELLYFIN_LOG_DIR = "/log";
|
||||
};
|
||||
reo101.jellyfin = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
### Transmission
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
# 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, ... }:
|
||||
{ lib, pkgs, config, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
[
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||
|
@ -14,12 +15,14 @@
|
|||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/7f720420-41d8-4efd-bdf2-f445e52db998";
|
||||
{
|
||||
device = "/dev/disk/by-uuid/7f720420-41d8-4efd-bdf2-f445e52db998";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/5BF4-74EF";
|
||||
{
|
||||
device = "/dev/disk/by-uuid/5BF4-74EF";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ inputs, outputs, lib, config, pkgs, ... }:
|
||||
{ inputs, outputs, lib, pkgs, config, ... }:
|
||||
|
||||
{
|
||||
imports = builtins.attrValues outputs.homeManagerModules ++ [
|
||||
|
@ -7,7 +7,7 @@
|
|||
|
||||
nixpkgs = {
|
||||
overlays = builtins.attrValues outputs.overlays ++ [
|
||||
# inputs.neovim-nightly-overlay.overlay
|
||||
inputs.neovim-nightly-overlay.overlay
|
||||
inputs.zig-overlay.overlays.default
|
||||
inputs.wired.overlays.default
|
||||
];
|
||||
|
@ -29,6 +29,7 @@
|
|||
river # window manager
|
||||
swww # wallpaper deamon
|
||||
# wired-notify # dunst on wayland
|
||||
waybar # status bar
|
||||
|
||||
## Terminals
|
||||
wezterm
|
||||
|
@ -99,7 +100,7 @@
|
|||
RestartSec = 5;
|
||||
};
|
||||
Install = {
|
||||
WantedBy = ["graphical-session.target"];
|
||||
WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue