format nix files
This commit is contained in:
parent
8ae4ad026a
commit
8454cf382e
|
@ -6,5 +6,6 @@
|
|||
"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'';
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{ 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.".config/rofi/config.rasi".source = ./config.rasi;
|
||||
}
|
||||
|
|
|
@ -1,3 +1 @@
|
|||
{ pkgs, inputs, ... }: {
|
||||
home.packages = with pkgs.deploy-rs; [ deploy-rs ];
|
||||
}
|
||||
{ pkgs, inputs, ... }: { home.packages = with pkgs.deploy-rs; [ deploy-rs ]; }
|
||||
|
|
|
@ -1,6 +1 @@
|
|||
{tree, ...}: {
|
||||
imports = with tree; [
|
||||
home.apps.kitty
|
||||
home.apps.rofi
|
||||
];
|
||||
}
|
||||
{ tree, ... }: { imports = with tree; [ home.apps.kitty home.apps.rofi ]; }
|
||||
|
|
|
@ -71,4 +71,4 @@
|
|||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 6600 ];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
usb_data = import ./hardware/usb_data.nix {};
|
||||
ssd_data = import ./hardware/ssd_data.nix {};
|
||||
usb_data = import ./hardware/usb_data.nix { };
|
||||
ssd_data = import ./hardware/ssd_data.nix { };
|
||||
in {
|
||||
boot = {
|
||||
loader = {
|
||||
|
@ -25,33 +25,32 @@ in {
|
|||
"cryptd"
|
||||
];
|
||||
kernelModules = [ "kvm-intel" ];
|
||||
|
||||
|
||||
initrd.postDeviceCommands = pkgs.lib.mkBefore ''
|
||||
mkdir -m 0755 -p ${usb_data.mountpoint}
|
||||
initrd.postDeviceCommands = pkgs.lib.mkBefore ''
|
||||
mkdir -m 0755 -p ${usb_data.mountpoint}
|
||||
|
||||
while !(test -b ${usb_data.encrypted_path})
|
||||
do
|
||||
echo "Please Plug In USB"
|
||||
sleep 1
|
||||
done
|
||||
while !(test -b ${usb_data.encrypted_path})
|
||||
do
|
||||
echo "Please Plug In USB"
|
||||
sleep 1
|
||||
done
|
||||
|
||||
echo "Please Decrypt USB"
|
||||
echo "Please Decrypt USB"
|
||||
|
||||
cryptsetup luksOpen ${usb_data.encrypted_path} ${usb_data.mapper_name}
|
||||
cryptsetup luksOpen ${usb_data.encrypted_path} ${usb_data.mapper_name}
|
||||
|
||||
mount -n -t ${usb_data.unencrypted_fs_type} -o ro ${usb_data.mapper_path} ${usb_data.mountpoint}
|
||||
'';
|
||||
mount -n -t ${usb_data.unencrypted_fs_type} -o ro ${usb_data.mapper_path} ${usb_data.mountpoint}
|
||||
'';
|
||||
|
||||
initrd.luks.devices = {
|
||||
"${ssd_data.root_mapper_name}" = {
|
||||
device = "${ssd_data.encrypted_root_path}";
|
||||
keyFile = "${usb_data.lappy_encryption_key_path}";
|
||||
preLVM = false;
|
||||
allowDiscards = true;
|
||||
initrd.luks.devices = {
|
||||
"${ssd_data.root_mapper_name}" = {
|
||||
device = "${ssd_data.encrypted_root_path}";
|
||||
keyFile = "${usb_data.lappy_encryption_key_path}";
|
||||
preLVM = false;
|
||||
allowDiscards = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
|
|
|
@ -1,23 +1,23 @@
|
|||
{}: rec {
|
||||
# Mountpoints
|
||||
root_mountpoint = "/";
|
||||
boot_mountpoint = "/boot";
|
||||
{ }: rec {
|
||||
# Mountpoints
|
||||
root_mountpoint = "/";
|
||||
boot_mountpoint = "/boot";
|
||||
|
||||
# Partition Labels
|
||||
boot_label = "nixboot";
|
||||
encrypted_root_partlabel = "nixos_encrypted";
|
||||
# Partition Labels
|
||||
boot_label = "nixboot";
|
||||
encrypted_root_partlabel = "nixos_encrypted";
|
||||
|
||||
# Partition Filesystems
|
||||
unencrypted_root_fs_type = "ext4";
|
||||
boot_fs_type = "vfat";
|
||||
# Partition Filesystems
|
||||
unencrypted_root_fs_type = "ext4";
|
||||
boot_fs_type = "vfat";
|
||||
|
||||
# Mapper Name
|
||||
root_mapper_name = "cryptroot";
|
||||
# Mapper Name
|
||||
root_mapper_name = "cryptroot";
|
||||
|
||||
# FS Paths
|
||||
encrypted_root_path = "/dev/disk/by-partlabel/${encrypted_root_partlabel}";
|
||||
decrypted_root_path = "/dev/mapper/${root_mapper_name}";
|
||||
# FS Paths
|
||||
encrypted_root_path = "/dev/disk/by-partlabel/${encrypted_root_partlabel}";
|
||||
decrypted_root_path = "/dev/mapper/${root_mapper_name}";
|
||||
|
||||
boot_path = "/dev/disk/by-label/${boot_label}";
|
||||
boot_path = "/dev/disk/by-label/${boot_label}";
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,24 +1,23 @@
|
|||
{...}: rec {
|
||||
# Mountpoints
|
||||
mountpoint = "/usb";
|
||||
{ ... }: rec {
|
||||
# Mountpoints
|
||||
mountpoint = "/usb";
|
||||
|
||||
# Partition Labels
|
||||
encrypted_partlabel = "usb";
|
||||
unencrypted_label = "usb_unencrypted";
|
||||
# Partition Labels
|
||||
encrypted_partlabel = "usb";
|
||||
unencrypted_label = "usb_unencrypted";
|
||||
|
||||
# Partition Filesystems
|
||||
unencrypted_fs_type = "ext4";
|
||||
# Partition Filesystems
|
||||
unencrypted_fs_type = "ext4";
|
||||
|
||||
# Mapper Information
|
||||
mapper_name = "usb_unencrypted";
|
||||
# Mapper Information
|
||||
mapper_name = "usb_unencrypted";
|
||||
|
||||
# FS Paths
|
||||
encrypted_path = "/dev/disk/by-partlabel/${encrypted_partlabel}";
|
||||
unencrypted_path = "/dev/disk/by-label/${unencrypted_label}";
|
||||
mapper_path = "/dev/mapper/${mapper_name}";
|
||||
# FS Paths
|
||||
encrypted_path = "/dev/disk/by-partlabel/${encrypted_partlabel}";
|
||||
unencrypted_path = "/dev/disk/by-label/${unencrypted_label}";
|
||||
mapper_path = "/dev/mapper/${mapper_name}";
|
||||
|
||||
# Paths to some important files
|
||||
lappy_encryption_key_path = "${mountpoint}/encryption-keys/lappy.key";
|
||||
|
||||
# Paths to some important files
|
||||
lappy_encryption_key_path = "${mountpoint}/encryption-keys/lappy.key";
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
{lib, inputs, ...}: {
|
||||
imports = [
|
||||
"${inputs.nixpkgs}/nixos/modules/virtualisation/qemu-vm.nix"
|
||||
];
|
||||
users.users.root.password = "password";
|
||||
users.users.chaos.password = "password";
|
||||
home-manager.users.chaos.home.sessionVariables = {
|
||||
WLR_RENDERER_ALLOW_SOFTWARE = "1";
|
||||
};
|
||||
services.getty.extraArgs = lib.mkForce [];
|
||||
virtualisation.cores = 4;
|
||||
virtualisation.qemu.options = ["-vga" "qxl"];
|
||||
}
|
||||
{ lib, inputs, ... }: {
|
||||
imports = [ "${inputs.nixpkgs}/nixos/modules/virtualisation/qemu-vm.nix" ];
|
||||
users.users.root.password = "password";
|
||||
users.users.chaos.password = "password";
|
||||
home-manager.users.chaos.home.sessionVariables = {
|
||||
WLR_RENDERER_ALLOW_SOFTWARE = "1";
|
||||
};
|
||||
services.getty.extraArgs = lib.mkForce [ ];
|
||||
virtualisation.cores = 4;
|
||||
virtualisation.qemu.options = [ "-vga" "qxl" ];
|
||||
}
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, alsa-topology-conf
|
||||
, alsa-ucm-conf
|
||||
}:
|
||||
{ lib, stdenv, fetchurl, alsa-topology-conf, alsa-ucm-conf }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "alsa-lib";
|
||||
|
@ -44,4 +39,4 @@ stdenv.mkDerivation rec {
|
|||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ l-as ];
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,6 @@ final: prev: {
|
|||
};
|
||||
roc-toolkit-patched = final.callPackage ./roc-toolkit-patched { };
|
||||
roc-send-pcm = final.callPackage ./roc-send-pcm { };
|
||||
vivaldi = prev.vivaldi.override {
|
||||
alsa-lib = final.callPackage ./alsa-lib {};
|
||||
};
|
||||
vivaldi =
|
||||
prev.vivaldi.override { alsa-lib = final.callPackage ./alsa-lib { }; };
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
gnomeExtensions.appindicator
|
||||
gnome.gnome-tweaks
|
||||
gnomeExtensions.just-perfection
|
||||
];
|
||||
];
|
||||
services.udev.packages = with pkgs; [ gnome3.gnome-settings-daemon ];
|
||||
|
||||
services.power-profiles-daemon.enable = lib.mkForce false;
|
||||
|
|
|
@ -1,3 +1 @@
|
|||
_: {
|
||||
hardware.pulseaudio.daemon.config = { default-sample-rate = "48000"; };
|
||||
}
|
||||
_: { hardware.pulseaudio.daemon.config = { default-sample-rate = "48000"; }; }
|
||||
|
|
14
tree.nix
14
tree.nix
|
@ -16,7 +16,8 @@ let
|
|||
in result != null && builtins.length result > 0;
|
||||
nixFiles = filterAttrs isNixFile dirContents;
|
||||
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;
|
||||
dirPaths = getPaths directories;
|
||||
recursedPaths = mapAttrs (_: fullPath:
|
||||
|
@ -100,12 +101,11 @@ let
|
|||
let
|
||||
processFunctor = prev:
|
||||
prev // {
|
||||
__functor = self:
|
||||
_: {
|
||||
imports =
|
||||
attrValues (removeAttrs prev leafConfig.functor.excludes)
|
||||
++ leafConfig.functor.external;
|
||||
};
|
||||
__functor = self: _: {
|
||||
imports =
|
||||
attrValues (removeAttrs prev leafConfig.functor.excludes)
|
||||
++ leafConfig.functor.external;
|
||||
};
|
||||
};
|
||||
processAliasDefault = prev: prev.default;
|
||||
processDefault = prev:
|
||||
|
|
Loading…
Reference in a new issue