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
|
@ -1,7 +1,7 @@
|
|||
# This is your home-manager configuration file
|
||||
# Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix)
|
||||
|
||||
{ inputs, outputs, lib, config, pkgs, ... }: {
|
||||
{ inputs, outputs, lib, pkgs, config, ... }: {
|
||||
# You can import other home-manager modules here
|
||||
imports = [
|
||||
# If you want to use modules your own flake exports (from modules/home-manager):
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{ inputs, outputs, lib, config, pkgs, ... }:
|
||||
{ inputs, outputs, lib, pkgs, config, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [];
|
||||
environment.systemPackages = with pkgs; [ ];
|
||||
|
||||
# environment.darwinConfig = builtins.toString ./configuration.nix;
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
|||
nix.package = pkgs.nix;
|
||||
|
||||
# Create /etc/zshrc that loads the nix-darwin environment.
|
||||
programs.zsh.enable = true; # default shell on catalina
|
||||
programs.zsh.enable = true; # default shell on catalina
|
||||
|
||||
# Fonts
|
||||
fonts.fontDir.enable = true;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ inputs, lib, config, pkgs, ... }:
|
||||
{ inputs, outputs, lib, pkgs, config, ... }:
|
||||
|
||||
{
|
||||
home = {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{ inputs, outputs, lib, config, pkgs, ... }:
|
||||
{ inputs, outputs, lib, pkgs, config, ... }:
|
||||
|
||||
{
|
||||
environment.packages = with pkgs; [];
|
||||
environment.packages = with pkgs; [ ];
|
||||
|
||||
# Backup etc files instead of failing to activate generation if a file already exists in /etc
|
||||
environment.etcBackupExtension = ".bak";
|
||||
|
@ -30,7 +30,7 @@
|
|||
};
|
||||
fontPath = "share/fonts/truetype/NerdFonts/Fira Code Regular Nerd Font Complete Mono.ttf";
|
||||
in
|
||||
"${firacode}/${fontPath}";
|
||||
"${firacode}/${fontPath}";
|
||||
|
||||
home-manager = {
|
||||
config = ./home.nix;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ inputs, lib, config, pkgs, ... }:
|
||||
{ inputs, outputs, lib, pkgs, config, ... }:
|
||||
|
||||
{
|
||||
# Home Manager needs a bit of information about you and the
|
||||
|
@ -84,12 +84,12 @@
|
|||
# neovimRcContent = "";
|
||||
|
||||
extraPackages = with pkgs; [
|
||||
tree-sitter
|
||||
rnix-lsp
|
||||
# sumneko-lua-language-server
|
||||
# stylua
|
||||
# texlab
|
||||
# rust-analyzer
|
||||
tree-sitter
|
||||
rnix-lsp
|
||||
# sumneko-lua-language-server
|
||||
# stylua
|
||||
# texlab
|
||||
# rust-analyzer
|
||||
];
|
||||
};
|
||||
|
||||
|
@ -279,7 +279,7 @@
|
|||
};
|
||||
|
||||
custom.local = {
|
||||
shell = ["zsh" "-d" "-f"];
|
||||
shell = [ "zsh" "-d" "-f" ];
|
||||
when = ''[[ -z "$SSH_CLIENT" ]] && [[ `whoami` != "root" ]]'';
|
||||
format = "[$symbol$output]($style)[@](bold yellow)";
|
||||
command = "whoami";
|
||||
|
@ -288,7 +288,7 @@
|
|||
};
|
||||
|
||||
custom.local_root = {
|
||||
shell = ["zsh" "-d" "-f"];
|
||||
shell = [ "zsh" "-d" "-f" ];
|
||||
when = ''[[ -z "$SSH_CLIENT" ]] && [[ `whoami` == "root" ]]'';
|
||||
format = "[ $output ]($style)[@](bold yellow)";
|
||||
command = "whoami";
|
||||
|
@ -296,7 +296,7 @@
|
|||
};
|
||||
|
||||
custom.ssh = {
|
||||
shell = ["zsh" "-d" "-f"];
|
||||
shell = [ "zsh" "-d" "-f" ];
|
||||
when = ''[[ -n "$SSH_CLIENT" ]] && [[ `whoami` != "root" ]]'';
|
||||
format = "[ $symbol$output ]($style)[@](bold yellow)";
|
||||
command = "whoami";
|
||||
|
@ -306,7 +306,7 @@
|
|||
};
|
||||
|
||||
custom.ssh_root = {
|
||||
shell = ["zsh" "-d" "-f"];
|
||||
shell = [ "zsh" "-d" "-f" ];
|
||||
when = ''[[ -n "$SSH_CLIENT" ]] && [[ `whoami` == "root" ]]'';
|
||||
format = "[ $symbol$output ]($style)[@](bold yellow)";
|
||||
command = "whoami";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# This is your system's configuration file.
|
||||
# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix)
|
||||
|
||||
{ inputs, outputs, lib, config, pkgs, ... }: {
|
||||
{ inputs, outputs, lib, pkgs, config, ... }: {
|
||||
# You can import other NixOS modules here
|
||||
imports = [
|
||||
# If you want to use modules your own flake exports (from modules/nixos):
|
||||
|
|
|
@ -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