format nix files

This commit is contained in:
ChaotiCryptidz 2022-02-15 11:04:08 +00:00
parent 8ae4ad026a
commit 8454cf382e
14 changed files with 84 additions and 102 deletions

View file

@ -6,5 +6,6 @@
"script-opts" = "ytdl_hook-ytdl_path=${pkgs.yt-dlp}/bin/yt-dlp"; "script-opts" = "ytdl_hook-ytdl_path=${pkgs.yt-dlp}/bin/yt-dlp";
}; };
}; };
programs.zsh.shellAliases.listen = "${pkgs.mpv}/bin/mpv \"https://music:$(cat /secrets/music-stream-password)@stream.owo.monster/flac\" --cache=yes --cache-pause-initial=yes --cache-pause-wait=5"; programs.zsh.shellAliases.listen = ''
${pkgs.mpv}/bin/mpv "https://music:$(cat /secrets/music-stream-password)@stream.owo.monster/flac" --cache=yes --cache-pause-initial=yes --cache-pause-wait=5'';
} }

View file

@ -1,5 +1,5 @@
{ pkgs, ... }: { { pkgs, ... }: {
home.packages = with pkgs; [rofi]; home.packages = with pkgs; [ rofi ];
home.file.".local/share/rofi/themes/rofi-nord.rasi".source = ./rofi-nord.rasi; home.file.".local/share/rofi/themes/rofi-nord.rasi".source = ./rofi-nord.rasi;
home.file.".config/rofi/config.rasi".source = ./config.rasi; home.file.".config/rofi/config.rasi".source = ./config.rasi;
} }

View file

@ -1,3 +1 @@
{ pkgs, inputs, ... }: { { pkgs, inputs, ... }: { home.packages = with pkgs.deploy-rs; [ deploy-rs ]; }
home.packages = with pkgs.deploy-rs; [ deploy-rs ];
}

View file

@ -1,6 +1 @@
{tree, ...}: { { tree, ... }: { imports = with tree; [ home.apps.kitty home.apps.rofi ]; }
imports = with tree; [
home.apps.kitty
home.apps.rofi
];
}

View file

@ -1,7 +1,7 @@
{ pkgs, ... }: { pkgs, ... }:
let let
usb_data = import ./hardware/usb_data.nix {}; usb_data = import ./hardware/usb_data.nix { };
ssd_data = import ./hardware/ssd_data.nix {}; ssd_data = import ./hardware/ssd_data.nix { };
in { in {
boot = { boot = {
loader = { loader = {
@ -26,7 +26,6 @@ in {
]; ];
kernelModules = [ "kvm-intel" ]; kernelModules = [ "kvm-intel" ];
initrd.postDeviceCommands = pkgs.lib.mkBefore '' initrd.postDeviceCommands = pkgs.lib.mkBefore ''
mkdir -m 0755 -p ${usb_data.mountpoint} mkdir -m 0755 -p ${usb_data.mountpoint}
@ -51,7 +50,7 @@ in {
allowDiscards = true; allowDiscards = true;
}; };
}; };
}; };
fileSystems = { fileSystems = {
"/" = { "/" = {

View file

@ -1,4 +1,4 @@
{}: rec { { }: rec {
# Mountpoints # Mountpoints
root_mountpoint = "/"; root_mountpoint = "/";
boot_mountpoint = "/boot"; boot_mountpoint = "/boot";

View file

@ -1,4 +1,4 @@
{...}: rec { { ... }: rec {
# Mountpoints # Mountpoints
mountpoint = "/usb"; mountpoint = "/usb";
@ -17,7 +17,6 @@
unencrypted_path = "/dev/disk/by-label/${unencrypted_label}"; unencrypted_path = "/dev/disk/by-label/${unencrypted_label}";
mapper_path = "/dev/mapper/${mapper_name}"; mapper_path = "/dev/mapper/${mapper_name}";
# Paths to some important files # Paths to some important files
lappy_encryption_key_path = "${mountpoint}/encryption-keys/lappy.key"; lappy_encryption_key_path = "${mountpoint}/encryption-keys/lappy.key";

View file

@ -1,13 +1,11 @@
{lib, inputs, ...}: { { lib, inputs, ... }: {
imports = [ imports = [ "${inputs.nixpkgs}/nixos/modules/virtualisation/qemu-vm.nix" ];
"${inputs.nixpkgs}/nixos/modules/virtualisation/qemu-vm.nix"
];
users.users.root.password = "password"; users.users.root.password = "password";
users.users.chaos.password = "password"; users.users.chaos.password = "password";
home-manager.users.chaos.home.sessionVariables = { home-manager.users.chaos.home.sessionVariables = {
WLR_RENDERER_ALLOW_SOFTWARE = "1"; WLR_RENDERER_ALLOW_SOFTWARE = "1";
}; };
services.getty.extraArgs = lib.mkForce []; services.getty.extraArgs = lib.mkForce [ ];
virtualisation.cores = 4; virtualisation.cores = 4;
virtualisation.qemu.options = ["-vga" "qxl"]; virtualisation.qemu.options = [ "-vga" "qxl" ];
} }

View file

@ -1,9 +1,4 @@
{ lib { lib, stdenv, fetchurl, alsa-topology-conf, alsa-ucm-conf }:
, stdenv
, fetchurl
, alsa-topology-conf
, alsa-ucm-conf
}:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "alsa-lib"; pname = "alsa-lib";

View file

@ -12,7 +12,6 @@ final: prev: {
}; };
roc-toolkit-patched = final.callPackage ./roc-toolkit-patched { }; roc-toolkit-patched = final.callPackage ./roc-toolkit-patched { };
roc-send-pcm = final.callPackage ./roc-send-pcm { }; roc-send-pcm = final.callPackage ./roc-send-pcm { };
vivaldi = prev.vivaldi.override { vivaldi =
alsa-lib = final.callPackage ./alsa-lib {}; prev.vivaldi.override { alsa-lib = final.callPackage ./alsa-lib { }; };
};
} }

View file

@ -1,3 +1 @@
_: { _: { hardware.pulseaudio.daemon.config = { default-sample-rate = "48000"; }; }
hardware.pulseaudio.daemon.config = { default-sample-rate = "48000"; };
}

View file

@ -16,7 +16,8 @@ let
in result != null && builtins.length result > 0; in result != null && builtins.length result > 0;
nixFiles = filterAttrs isNixFile dirContents; nixFiles = filterAttrs isNixFile dirContents;
getPath = entry: "${realPath}/${entry}"; getPath = entry: "${realPath}/${entry}";
getPaths = mapAttrs' (n: v: nameValuePair (removeSuffix ".nix" n) (getPath n)); getPaths =
mapAttrs' (n: v: nameValuePair (removeSuffix ".nix" n) (getPath n));
nixFilePaths = getPaths nixFiles; nixFilePaths = getPaths nixFiles;
dirPaths = getPaths directories; dirPaths = getPaths directories;
recursedPaths = mapAttrs (_: fullPath: recursedPaths = mapAttrs (_: fullPath:
@ -100,8 +101,7 @@ let
let let
processFunctor = prev: processFunctor = prev:
prev // { prev // {
__functor = self: __functor = self: _: {
_: {
imports = imports =
attrValues (removeAttrs prev leafConfig.functor.excludes) attrValues (removeAttrs prev leafConfig.functor.excludes)
++ leafConfig.functor.external; ++ leafConfig.functor.external;