nixos-config/flake.nix

58 lines
2 KiB
Nix
Raw Normal View History

2021-03-31 22:15:08 +00:00
{
2021-06-02 20:46:32 +00:00
inputs.nixpkgs.url = "nixpkgs/nixos-21.05";
inputs.unstable.url = "nixpkgs/nixos-unstable";
2021-04-06 03:11:17 +00:00
2021-06-10 19:51:04 +00:00
outputs = { self, nixpkgs, ... }@inputs:
2021-06-05 06:22:38 +00:00
{
2021-06-12 01:32:23 +00:00
nixosModules = {
baseline = ./modules/baseline.nix;
cli = ./modules/cli.nix;
gnome = ./modules/gnome.nix;
phpipam = ./modules/phpipam.nix;
pipewire = ./modules/pipewire.nix;
profiles = ./modules/profiles.nix;
scansnap_s1300 = ./modules/scansnap_s1300.nix;
scroll-boost = ./modules/scroll-boost;
security-tools = ./modules/security-tools.nix;
status-on-console = ./modules/status-on-console.nix;
sway = ./modules/sway.nix;
};
nixosModule = { ... }: { imports = builtins.attrValues self.nixosModules; };
2021-06-05 06:22:38 +00:00
nixosConfigurations = self.lib.getHosts inputs ./hosts;
lib.getHosts = import lib/hosts.nix;
2021-06-10 19:51:04 +00:00
packages."x86_64-linux" =
2021-06-22 14:28:12 +00:00
with nixpkgs.legacyPackages."x86_64-linux";
2021-06-10 19:51:04 +00:00
{
binaryninja = callPackage ./pkgs/binary-ninja-personal { };
2021-06-22 14:38:28 +00:00
commander-x16 = callPackage ./pkgs/commander-x16 { };
gef = callPackage ./pkgs/gef { };
2021-06-17 19:42:58 +00:00
packettracer = callPackage ./pkgs/packettracer { };
2021-06-22 14:38:28 +00:00
weevely = callPackage ./pkgs/weevely { };
2021-06-10 19:51:04 +00:00
};
2021-06-12 02:41:50 +00:00
apps."x86_64-linux" =
2021-06-22 14:28:12 +00:00
with nixpkgs.legacyPackages."x86_64-linux";
2021-06-12 02:41:50 +00:00
{
format-luks = writeShellScriptBin "format-luks" ''
set -e
read -p "Path to new LUKS device: " blkdev
set -x
cryptsetup -y -v luksFormat "$blkdev"
cryptsetup --allow-discards open "$blkdev" cryptroot
mkfs.btrfs /dev/mapper/cryptroot
mount /dev/mapper/cryptroot /mnt -o discard,compress=zstd
btrfs subvolume create /mnt/os
btrfs subvolume create /mnt/home
umount /mnt
mount /dev/mapper/cryptroot /mnt -o discard,compress=zstd,subvol=/os
mkdir /mnt/home
mount /dev/mapper/cryptroot /mnt/home -o discard,compress=zstd,subvol=/home
'';
};
};
2021-03-31 22:15:08 +00:00
}