nix-fmt
parent
3a3683baa9
commit
2176df3047
|
@ -4,20 +4,21 @@
|
||||||
# Should also incorporate shortcuts like scripts/{hm-switch,conf-sysnix}.sh in here instead
|
# Should also incorporate shortcuts like scripts/{hm-switch,conf-sysnix}.sh in here instead
|
||||||
#
|
#
|
||||||
# It should not contain PDE
|
# It should not contain PDE
|
||||||
{pkgs? import <nixpkgs> {}
|
{ pkgs ? import <nixpkgs> { }
|
||||||
,lib
|
, lib
|
||||||
,...}: pkgs.mkShell {
|
, ...
|
||||||
|
}: pkgs.mkShell {
|
||||||
# mkShell doesn't care about the differences across nativeBuildInputs,
|
# mkShell doesn't care about the differences across nativeBuildInputs,
|
||||||
# buildInputs, or packages
|
# buildInputs, or packages
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
# shell scripts
|
# shell scripts
|
||||||
(lib.shellAsDrv {script = ''echo "hello world"''; pname = "hello";})
|
(lib.shellAsDrv { script = ''echo "hello world"''; pname = "hello"; })
|
||||||
# TODO: decompose hm-switch.sh with a base version (where HOME_MANAGER_BIN is injected)
|
# TODO: decompose hm-switch.sh with a base version (where HOME_MANAGER_BIN is injected)
|
||||||
# (lib.shellAsDrv {script = builtins.readFile ./scripts/hm-switch.sh; pname = "hm-switch";})
|
# (lib.shellAsDrv {script = builtins.readFile ./scripts/hm-switch.sh; pname = "hm-switch";})
|
||||||
pkgs.rust4cargo
|
pkgs.rust4cargo
|
||||||
];
|
];
|
||||||
|
|
||||||
# env vars
|
# env vars
|
||||||
lol="hello world";
|
lol = "hello world";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -123,5 +123,6 @@
|
||||||
debug = {
|
debug = {
|
||||||
inherit final_inputs hosts users modules lib inputs_w_lib unit_tests pkgs nixpkgs;
|
inherit final_inputs hosts users modules lib inputs_w_lib unit_tests pkgs nixpkgs;
|
||||||
};
|
};
|
||||||
|
formatter."${system}" = pkgs.nixpkgs-fmt;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,12 @@
|
||||||
{nixpkgs, agenix, home-manager, flake-utils, nixgl, rust-overlay, flake-compat
|
{ nixpkgs
|
||||||
,pkgs, lib, proj_root}: {
|
, agenix
|
||||||
|
, home-manager
|
||||||
}
|
, flake-utils
|
||||||
|
, nixgl
|
||||||
|
, rust-overlay
|
||||||
|
, flake-compat
|
||||||
|
, pkgs
|
||||||
|
, lib
|
||||||
|
, proj_root
|
||||||
|
}: { }
|
||||||
|
|
||||||
|
|
|
@ -5,25 +5,28 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
[
|
||||||
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
||||||
# boot.initrd.kernelModules = [ "amdgpu" ];
|
# boot.initrd.kernelModules = [ "amdgpu" ];
|
||||||
boot.initrd.kernelModules = [];
|
boot.initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ "kvm-amd" "coretemp"];
|
boot.kernelModules = [ "kvm-amd" "coretemp" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" =
|
||||||
# Might be wise to use /dev/nvme0p1 instead
|
# Might be wise to use /dev/nvme0p1 instead
|
||||||
{ device = "/dev/disk/by-uuid/27fc09b3-e3b7-4883-94a0-c313a0e0abe2";
|
{
|
||||||
|
device = "/dev/disk/by-uuid/27fc09b3-e3b7-4883-94a0-c313a0e0abe2";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" =
|
||||||
# Might be wise to use /dev/nvme0p2 instead
|
# Might be wise to use /dev/nvme0p2 instead
|
||||||
{ device = "/dev/disk/by-uuid/EBA6-394D";
|
{
|
||||||
|
device = "/dev/disk/by-uuid/EBA6-394D";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,75 +1,90 @@
|
||||||
{nixpkgs, agenix, home-manager, flake-utils, nixgl, rust-overlay, flake-compat
|
{ nixpkgs
|
||||||
,pkgs, lib, proj_root, nixosDefaultVersion? "22.05", defaultSystem? "x86_64-linux",...}@finalInputs: let
|
, agenix
|
||||||
config = {
|
, home-manager
|
||||||
bao.metadata = {
|
, flake-utils
|
||||||
# req
|
, nixgl
|
||||||
hostName = "bao";
|
, rust-overlay
|
||||||
# opts
|
, flake-compat
|
||||||
ssh_pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIBuAaAE7TiQmMH300VRj/pYCri1qPmHjd+y9aX2J0Fs";
|
, pkgs
|
||||||
nixosVersion = "22.11";
|
, lib
|
||||||
system = "x86_64-linux";
|
, proj_root
|
||||||
preset = "base";
|
, nixosDefaultVersion ? "22.05"
|
||||||
|
, defaultSystem ? "x86_64-linux"
|
||||||
|
, ...
|
||||||
|
}@finalInputs:
|
||||||
|
let
|
||||||
|
config = {
|
||||||
|
bao.metadata = {
|
||||||
|
# req
|
||||||
|
hostName = "bao";
|
||||||
|
# opts
|
||||||
|
ssh_pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIBuAaAE7TiQmMH300VRj/pYCri1qPmHjd+y9aX2J0Fs";
|
||||||
|
nixosVersion = "22.11";
|
||||||
|
system = "x86_64-linux";
|
||||||
|
preset = "base";
|
||||||
|
};
|
||||||
|
# TODO: add override so that we can add wsl config on top
|
||||||
|
bao.nixosConfig = {
|
||||||
|
modules = [
|
||||||
|
(import ../modules/nvgpu.sys.nix)
|
||||||
|
(import ../modules/kde.sys.nix)
|
||||||
|
(import ../modules/pulseaudio.sys.nix)
|
||||||
|
(import ../modules/storage.perso.sys.nix)
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
# TODO: add override so that we can add wsl config on top
|
propagate = hostConfig@{ metadata, nixosConfig }:
|
||||||
bao.nixosConfig = {
|
let
|
||||||
modules = [
|
# req
|
||||||
(import ../modules/nvgpu.sys.nix)
|
inherit (metadata) hostName;
|
||||||
(import ../modules/kde.sys.nix)
|
# opts
|
||||||
(import ../modules/pulseaudio.sys.nix)
|
ssh_pubkey = lib.attrByPath [ "ssh_pubkey" ] null metadata; # metadata.ssh_pubkey??undefined
|
||||||
(import ../modules/storage.perso.sys.nix)
|
users = lib.attrByPath [ "users" ] { } metadata;
|
||||||
];
|
nixosVersion = lib.attrByPath [ "nixosVersion" ] nixosDefaultVersion metadata;
|
||||||
};
|
system = lib.attrByPath [ "system" ] defaultSystem metadata;
|
||||||
};
|
preset = lib.attrByPath [ "preset" ] "base" metadata;
|
||||||
propagate = hostConfig@{metadata, nixosConfig}: let
|
# infer
|
||||||
# req
|
hardwareConfig = import "${proj_root.hosts.path}/${hostName}/hardware-configuration.nix";
|
||||||
inherit (metadata) hostName;
|
# alias to prevent infinite recursion
|
||||||
# opts
|
_nixosConfig = nixosConfig;
|
||||||
ssh_pubkey = lib.attrByPath ["ssh_pubkey"] null metadata; # metadata.ssh_pubkey??undefined
|
in
|
||||||
users = lib.attrByPath ["users"] {} metadata;
|
{
|
||||||
nixosVersion = lib.attrByPath ["nixosVersion"] nixosDefaultVersion metadata;
|
inherit hostName ssh_pubkey users nixosVersion system preset hardwareConfig;
|
||||||
system = lib.attrByPath ["system"] defaultSystem metadata;
|
nixosConfig = _nixosConfig // {
|
||||||
preset = lib.attrByPath ["preset"] "base" metadata;
|
inherit system;
|
||||||
# infer
|
modules = [
|
||||||
hardwareConfig = import "${proj_root.hosts.path}/${hostName}/hardware-configuration.nix";
|
{
|
||||||
# alias to prevent infinite recursion
|
config._module.args = {
|
||||||
_nixosConfig = nixosConfig;
|
inherit proj_root;
|
||||||
in {
|
my-lib = finalInputs.lib;
|
||||||
inherit hostName ssh_pubkey users nixosVersion system preset hardwareConfig;
|
};
|
||||||
nixosConfig = _nixosConfig // {
|
}
|
||||||
inherit system;
|
hardwareConfig
|
||||||
modules = [
|
{
|
||||||
{
|
system.stateVersion = nixosVersion;
|
||||||
config._module.args = {
|
networking.hostName = hostName;
|
||||||
inherit proj_root;
|
users.users = users;
|
||||||
my-lib = finalInputs.lib;
|
}
|
||||||
};
|
{
|
||||||
}
|
imports = [ agenix.nixosModule ];
|
||||||
hardwareConfig
|
environment.systemPackages = [ agenix.defaultPackage.x86_64-linux ];
|
||||||
{
|
}
|
||||||
system.stateVersion = nixosVersion;
|
(import "${proj_root.modules.path}/secrets.nix")
|
||||||
networking.hostName = hostName;
|
(import "${proj_root.modules.path}/${preset}.sys.nix")
|
||||||
users.users = users;
|
] ++ _nixosConfig.modules;
|
||||||
}
|
};
|
||||||
{
|
};
|
||||||
imports = [agenix.nixosModule];
|
# we are blessed by the fact that we engulfed nixpkgs.lib.* at top level
|
||||||
environment.systemPackages = [agenix.defaultPackage.x86_64-linux];
|
mkHostFromPropagated = propagatedHostConfig@{ nixosConfig, ... }: nixpkgs.lib.nixosSystem nixosConfig;
|
||||||
}
|
<<<<<<< HEAD
|
||||||
(import "${proj_root.modules.path}/secrets.nix")
|
mkHost = hostConfig: (lib.pipe [ propagate mkHostFromPropagated ] hostConfig);
|
||||||
(import "${proj_root.modules.path}/${preset}.sys.nix")
|
trimNull = lib.filterAttrsRecursive (name: value: value != null);
|
||||||
] ++ _nixosConfig.modules;
|
flattenPubkey = lib.mapAttrs (hostName: meta_config: meta_config.metadata.ssh_pubkey);
|
||||||
};
|
=======
|
||||||
};
|
mkHost = hostConfig: (lib.pipe hostConfig [ propagate mkHostFromPropagated ]);
|
||||||
# we are blessed by the fact that we engulfed nixpkgs.lib.* at top level
|
>>>>>>> 4619ea4 (rekey)
|
||||||
mkHostFromPropagated = propagatedHostConfig@{nixosConfig,...}: nixpkgs.lib.nixosSystem nixosConfig;
|
in {
|
||||||
<<<<<<< HEAD
|
|
||||||
mkHost = hostConfig: (lib.pipe [propagate mkHostFromPropagated] hostConfig);
|
|
||||||
trimNull = lib.filterAttrsRecursive (name: value: value != null);
|
|
||||||
flattenPubkey = lib.mapAttrs (hostName: meta_config: meta_config.metadata.ssh_pubkey);
|
|
||||||
=======
|
|
||||||
mkHost = hostConfig: (lib.pipe hostConfig [propagate mkHostFromPropagated]);
|
|
||||||
>>>>>>> 4619ea4 (rekey)
|
|
||||||
in {
|
|
||||||
nixosConfigurations = lib.mapAttrs (name: hostConfig: mkHost hostConfig) config;
|
nixosConfigurations = lib.mapAttrs (name: hostConfig: mkHost hostConfig) config;
|
||||||
# {bao = "ssh-ed25519 ..."; another_host = "ssh-rsa ...";}
|
# {bao = "ssh-ed25519 ..."; another_host = "ssh-rsa ...";}
|
||||||
pubKeys = lib.getPubkey config;
|
pubKeys = lib.getPubkey config;
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,8 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
[
|
||||||
|
(modulesPath + "/profiles/qemu-guest.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "virtio_pci" "virtio_scsi" "ahci" "sd_mod" ];
|
boot.initrd.availableKernelModules = [ "virtio_pci" "virtio_scsi" "ahci" "sd_mod" ];
|
||||||
|
@ -23,13 +24,13 @@
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" =
|
||||||
{ device = "/dev/sda";
|
{
|
||||||
|
device = "/dev/sda";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices =
|
swapDevices =
|
||||||
[ { device = "/dev/sdb"; }
|
[{ device = "/dev/sdb"; }];
|
||||||
];
|
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
|
|
@ -1,4 +1,11 @@
|
||||||
{nixpkgs, agenix, home-manager, flake-utils, nixgl, rust-overlay, flake-compat
|
{ nixpkgs
|
||||||
,pkgs, lib, proj_root}: {
|
, agenix
|
||||||
|
, home-manager
|
||||||
}
|
, flake-utils
|
||||||
|
, nixgl
|
||||||
|
, rust-overlay
|
||||||
|
, flake-compat
|
||||||
|
, pkgs
|
||||||
|
, lib
|
||||||
|
, proj_root
|
||||||
|
}: { }
|
||||||
|
|
|
@ -5,7 +5,8 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
[
|
||||||
|
(modulesPath + "/profiles/qemu-guest.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "virtio_pci" "virtio_scsi" "ahci" "sd_mod" ];
|
boot.initrd.availableKernelModules = [ "virtio_pci" "virtio_scsi" "ahci" "sd_mod" ];
|
||||||
|
@ -13,7 +14,7 @@
|
||||||
boot.kernelModules = [ ];
|
boot.kernelModules = [ ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
boot.kernelParams = ["console=ttyS0,19200n8"];
|
boot.kernelParams = [ "console=ttyS0,19200n8" ];
|
||||||
boot.loader.grub.extraConfig = ''
|
boot.loader.grub.extraConfig = ''
|
||||||
serial --speed=19200 --unit=0 --word=8 --parity=no --stop=1
|
serial --speed=19200 --unit=0 --word=8 --parity=no --stop=1
|
||||||
terminal_input serial;
|
terminal_input serial;
|
||||||
|
@ -23,13 +24,13 @@
|
||||||
boot.loader.grub.device = "nodev";
|
boot.loader.grub.device = "nodev";
|
||||||
boot.loader.timeout = 10;
|
boot.loader.timeout = 10;
|
||||||
fileSystems."/" =
|
fileSystems."/" =
|
||||||
{ device = "/dev/sda";
|
{
|
||||||
|
device = "/dev/sda";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices =
|
swapDevices =
|
||||||
[ { device = "/dev/sdb"; }
|
[{ device = "/dev/sdb"; }];
|
||||||
];
|
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
|
|
@ -1,23 +1,28 @@
|
||||||
{pkgs
|
{ pkgs
|
||||||
# ,nixpkgs
|
# ,nixpkgs
|
||||||
,proj_root
|
, proj_root
|
||||||
# ,agenix
|
# ,agenix
|
||||||
,nixosDefaultVersion? "22.05"
|
, nixosDefaultVersion ? "22.05"
|
||||||
,defaultSystem? "x86_64-linux"
|
, defaultSystem ? "x86_64-linux"
|
||||||
,...}@inputs: let
|
, ...
|
||||||
|
}@inputs:
|
||||||
|
let
|
||||||
lib = pkgs.lib;
|
lib = pkgs.lib;
|
||||||
inputs_w_lib = (inputs // {inherit lib;});
|
inputs_w_lib = (inputs // { inherit lib; });
|
||||||
serde = import ./serde.nix inputs_w_lib;
|
serde = import ./serde.nix inputs_w_lib;
|
||||||
shellAsDrv = {script, pname}: (pkgs.callPackage (
|
shellAsDrv = { script, pname }: (pkgs.callPackage
|
||||||
# just a pattern that we must remember: args to this are children of pkgs.
|
(
|
||||||
{writeShellScriptBin}: writeShellScriptBin pname script
|
# just a pattern that we must remember: args to this are children of pkgs.
|
||||||
) {});
|
{ writeShellScriptBin }: writeShellScriptBin pname script
|
||||||
|
)
|
||||||
|
{ });
|
||||||
trimNull = lib.filterAttrs (name: value: value != null);
|
trimNull = lib.filterAttrs (name: value: value != null);
|
||||||
# ssh
|
# ssh
|
||||||
flattenPubkey = lib.mapAttrs (_identity: meta_config: lib.attrByPath ["metadata" "ssh_pubkey"] null meta_config);
|
flattenPubkey = lib.mapAttrs (_identity: meta_config: lib.attrByPath [ "metadata" "ssh_pubkey" ] null meta_config);
|
||||||
getPubkey = config: (lib.pipe config [flattenPubkey trimNull]);
|
getPubkey = config: (lib.pipe config [ flattenPubkey trimNull ]);
|
||||||
# procedure =
|
# procedure =
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
# short-hand to create a shell derivation
|
# short-hand to create a shell derivation
|
||||||
# NOTE: this is pure. This means, env vars from devShells might not
|
# NOTE: this is pure. This means, env vars from devShells might not
|
||||||
# be accessible unless MAYBE they are `export`ed
|
# be accessible unless MAYBE they are `export`ed
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# TODO: Add to* formats from pkgs.formats.*
|
# TODO: Add to* formats from pkgs.formats.*
|
||||||
{ pkgs
|
{ pkgs
|
||||||
, lib
|
, lib
|
||||||
,...
|
, ...
|
||||||
} @ inputs:
|
} @ inputs:
|
||||||
let
|
let
|
||||||
yamlToJsonDrv = yamlContent: outputPath: pkgs.callPackage
|
yamlToJsonDrv = yamlContent: outputPath: pkgs.callPackage
|
||||||
|
@ -16,14 +16,16 @@ let
|
||||||
echo "$yamlContent" | yq >$out
|
echo "$yamlContent" | yq >$out
|
||||||
'')
|
'')
|
||||||
{ };
|
{ };
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
# Takes in a yaml string and produces a derivation with translated JSON at $outputPath
|
# Takes in a yaml string and produces a derivation with translated JSON at $outputPath
|
||||||
# similar to builtins.fromJSON, turns a YAML string to nix attrset
|
# similar to builtins.fromJSON, turns a YAML string to nix attrset
|
||||||
fromYaml = yamlContent: builtins.fromJSON (builtins.readFile (yamlToJsonDrv yamlContent "any_output.json"));
|
fromYaml = yamlContent: builtins.fromJSON (builtins.readFile (yamlToJsonDrv yamlContent "any_output.json"));
|
||||||
fromYamlPath = yamlPath: builtins.fromJSON (
|
fromYamlPath = yamlPath: builtins.fromJSON (
|
||||||
builtins.readFile (
|
builtins.readFile (
|
||||||
yamlToJsonDrv (
|
yamlToJsonDrv
|
||||||
builtins.readFile yamlPath)
|
(
|
||||||
"any-output.json"));
|
builtins.readFile yamlPath)
|
||||||
|
"any-output.json"));
|
||||||
# TODO: fromToml?
|
# TODO: fromToml?
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1 @@
|
||||||
{lib,...}: {
|
{ lib, ... }: { }
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
imports = [./gpu.sys.nix];
|
imports = [ ./gpu.sys.nix ];
|
||||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||||
services.xserver.enable = true;
|
services.xserver.enable = true;
|
||||||
services.xserver.videoDrivers = [ "amdgpu" ];
|
services.xserver.videoDrivers = [ "amdgpu" ];
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
{pkgs
|
{ pkgs
|
||||||
,lib
|
, lib
|
||||||
,proj_root
|
, proj_root
|
||||||
,...
|
, ...
|
||||||
}:{
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
./minimal.sys.nix
|
./minimal.sys.nix
|
||||||
./mosh.sys.nix
|
./mosh.sys.nix
|
||||||
./tailscale.sys.nix
|
./tailscale.sys.nix
|
||||||
./ssh.sys.nix
|
./ssh.sys.nix
|
||||||
];
|
];
|
||||||
environment.systemPackages = [pkgs.lm_sensors];
|
environment.systemPackages = [ pkgs.lm_sensors ];
|
||||||
time.timeZone = "America/Phoenix";
|
time.timeZone = "America/Phoenix";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
inputs: {}
|
inputs: { }
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ pkgs
|
{ pkgs
|
||||||
, my-lib
|
, my-lib
|
||||||
,...
|
, ...
|
||||||
}: {
|
}: {
|
||||||
environment.noXlibs = my-lib.mkForce false;
|
environment.noXlibs = my-lib.mkForce false;
|
||||||
# TODO: wireless networking
|
# TODO: wireless networking
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
{pkgs
|
{ pkgs
|
||||||
,lib
|
, lib
|
||||||
,proj_root
|
, proj_root
|
||||||
,modulesPath
|
, modulesPath
|
||||||
,...
|
, ...
|
||||||
}:{
|
}: {
|
||||||
imports = ["${modulesPath}/profiles/minimal.nix"];
|
imports = [ "${modulesPath}/profiles/minimal.nix" ];
|
||||||
# prune old builds after a while
|
# prune old builds after a while
|
||||||
nix.settings.auto-optimise-store = true;
|
nix.settings.auto-optimise-store = true;
|
||||||
nix.package = pkgs.nixFlakes; # nix flakes
|
nix.package = pkgs.nixFlakes; # nix flakes
|
||||||
nix.extraOptions = ''
|
nix.extraOptions = ''
|
||||||
experimental-features = nix-command flakes
|
experimental-features = nix-command flakes
|
||||||
'';
|
'';
|
||||||
programs.neovim = {
|
programs.neovim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
defaultEditor = true;
|
defaultEditor = true;
|
||||||
};
|
};
|
||||||
programs.git.enable = true;
|
programs.git.enable = true;
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
{pkgs
|
{ pkgs
|
||||||
,lib
|
, lib
|
||||||
,config
|
, config
|
||||||
,...
|
, ...
|
||||||
}: {
|
}: {
|
||||||
environment.systemPackages = [pkgs.mosh];
|
environment.systemPackages = [ pkgs.mosh ];
|
||||||
networking.firewall = lib.mkIf config.networking.firewall.enable {
|
networking.firewall = lib.mkIf config.networking.firewall.enable {
|
||||||
allowedUDPPortRanges = [
|
allowedUDPPortRanges = [
|
||||||
{ from = 60000; to = 61000; } # mosh
|
{ from = 60000; to = 61000; } # mosh
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{config,...}: {
|
{ config, ... }: {
|
||||||
imports = [./gpu.sys.nix];
|
imports = [ ./gpu.sys.nix ];
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
services.xserver.enable = true;
|
services.xserver.enable = true;
|
||||||
services.xserver.videoDrivers = [ "nvidia" ];
|
services.xserver.videoDrivers = [ "nvidia" ];
|
||||||
|
|
|
@ -1,18 +1,21 @@
|
||||||
{config, pkgs, lib}:
|
{ config, pkgs, lib }:
|
||||||
let
|
let
|
||||||
gpu_pkgs = [ pkgs.clinfo pkgs.lshw pkgs.glxinfo pkgs.pciutils pkgs.vulkan-tools ];
|
gpu_pkgs = [ pkgs.clinfo pkgs.lshw pkgs.glxinfo pkgs.pciutils pkgs.vulkan-tools ];
|
||||||
gpu_conf = {
|
gpu_conf = {
|
||||||
# openCL
|
# openCL
|
||||||
hardware.opengl = {
|
hardware.opengl = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraPackages = let
|
extraPackages =
|
||||||
inherit (pkgs) rocm-opencl-icd rocm-opencl-runtime;
|
let
|
||||||
in [rocm-opencl-icd rocm-opencl-runtime];
|
inherit (pkgs) rocm-opencl-icd rocm-opencl-runtime;
|
||||||
# Vulkan
|
in
|
||||||
driSupport = true;
|
[ rocm-opencl-icd rocm-opencl-runtime ];
|
||||||
driSupport32Bit = true;
|
# Vulkan
|
||||||
package = pkgs.mesa.drivers;
|
driSupport = true;
|
||||||
package32 = pkgs.pkgsi686Linux.mesa.drivers;
|
driSupport32Bit = true;
|
||||||
};
|
package = pkgs.mesa.drivers;
|
||||||
};
|
package32 = pkgs.pkgsi686Linux.mesa.drivers;
|
||||||
in;
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{proj_root
|
{ proj_root
|
||||||
,...}: {
|
, ...
|
||||||
|
}: {
|
||||||
age.secrets.s3fs = {
|
age.secrets.s3fs = {
|
||||||
file = "${proj_root.secrets.path}/s3fs.age";
|
file = "${proj_root.secrets.path}/s3fs.age";
|
||||||
# mode = "600"; # owner + group only
|
# mode = "600"; # owner + group only
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Personal configuration on storage solution
|
# Personal configuration on storage solution
|
||||||
{ pkgs, config, lib,... }: {
|
{ pkgs, config, lib, ... }: {
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
pkgs.s3fs
|
pkgs.s3fs
|
||||||
pkgs.cifs-utils
|
pkgs.cifs-utils
|
||||||
|
@ -70,28 +70,32 @@
|
||||||
bucket = "digital-garden";
|
bucket = "digital-garden";
|
||||||
})
|
})
|
||||||
(
|
(
|
||||||
let args = {
|
let
|
||||||
"-fstype" = "cifs";
|
args = {
|
||||||
credentials = config.age.secrets._nhitrl_cred.path;
|
"-fstype" = "cifs";
|
||||||
user = null;
|
credentials = config.age.secrets._nhitrl_cred.path;
|
||||||
uid = "1001";
|
user = null;
|
||||||
gid = "100";
|
uid = "1001";
|
||||||
dir_mode = "0777";
|
gid = "100";
|
||||||
file_mode = "0777";
|
dir_mode = "0777";
|
||||||
};
|
file_mode = "0777";
|
||||||
in "felia_d ${confToBackendArg args} ://felia.coati-celsius.ts.net/d"
|
};
|
||||||
|
in
|
||||||
|
"felia_d ${confToBackendArg args} ://felia.coati-celsius.ts.net/d"
|
||||||
)
|
)
|
||||||
(
|
(
|
||||||
let args = {
|
let
|
||||||
"-fstype" = "cifs";
|
args = {
|
||||||
credentials = config.age.secrets._nhitrl_cred.path;
|
"-fstype" = "cifs";
|
||||||
user = null;
|
credentials = config.age.secrets._nhitrl_cred.path;
|
||||||
uid = "1001";
|
user = null;
|
||||||
gid = "100";
|
uid = "1001";
|
||||||
dir_mode = "0777";
|
gid = "100";
|
||||||
file_mode = "0777";
|
dir_mode = "0777";
|
||||||
};
|
file_mode = "0777";
|
||||||
in "felia_f ${confToBackendArg args} ://felia.coati-celsius.ts.net/f"
|
};
|
||||||
|
in
|
||||||
|
"felia_f ${confToBackendArg args} ://felia.coati-celsius.ts.net/f"
|
||||||
)
|
)
|
||||||
];
|
];
|
||||||
persoConf = pkgs.writeText "auto.personal" (builtins.concatStringsSep "\n" personalStorage);
|
persoConf = pkgs.writeText "auto.personal" (builtins.concatStringsSep "\n" personalStorage);
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
{pkgs
|
{ pkgs
|
||||||
,config
|
, config
|
||||||
,lib
|
, lib
|
||||||
,...}: {
|
, ...
|
||||||
environment.systemPackages = [pkgs.tailscale];
|
}: {
|
||||||
|
environment.systemPackages = [ pkgs.tailscale ];
|
||||||
services.tailscale.enable = true;
|
services.tailscale.enable = true;
|
||||||
|
|
||||||
systemd.services.tailscale-autoconnect = {
|
systemd.services.tailscale-autoconnect = {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{config,...}: {
|
{ config, ... }: {
|
||||||
networking.wireless.enable = true;
|
networking.wireless.enable = true;
|
||||||
networking.wireless.environmentFile = config.age.secrets."wifi.env";
|
networking.wireless.environmentFile = config.age.secrets."wifi.env";
|
||||||
networking.wireless.networks = {
|
networking.wireless.networks = {
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
mkModuleArgs = import ./mkModuleArgs.nix;
|
mkModuleArgs = import ./mkModuleArgs.nix;
|
||||||
modules = [
|
modules = [
|
||||||
./alacritty.nix
|
./alacritty.nix
|
||||||
./git.nix
|
./git.nix
|
||||||
./ssh.nix
|
./ssh.nix
|
||||||
./shells.nix
|
./shells.nix
|
||||||
{
|
{
|
||||||
config.programs.home-manager.enable = true;
|
config.programs.home-manager.enable = true;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,7 +66,7 @@ in
|
||||||
example = 3000;
|
example = 3000;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
# TODO : anyway to override configuration?
|
# TODO : anyway to override configuration?
|
||||||
config.programs.git = {
|
config.programs.git = {
|
||||||
inherit (cfg) enable ignores;
|
inherit (cfg) enable ignores;
|
||||||
userName = cfg.name;
|
userName = cfg.name;
|
||||||
|
|
|
@ -22,8 +22,8 @@ in
|
||||||
keyfile_path = lib.mkOption {
|
keyfile_path = lib.mkOption {
|
||||||
type = lib.types.nullOr lib.types.path;
|
type = lib.types.nullOr lib.types.path;
|
||||||
description = ''
|
description = ''
|
||||||
Path to key file for the database
|
Path to key file for the database
|
||||||
If null, then the field is unset
|
If null, then the field is unset
|
||||||
'';
|
'';
|
||||||
default = null;
|
default = null;
|
||||||
example = "/path/to/mykeyfile.key";
|
example = "/path/to/mykeyfile.key";
|
||||||
|
@ -47,7 +47,7 @@ in
|
||||||
] ++ (if cfg.use_gui or config.base.graphics._enable then [
|
] ++ (if cfg.use_gui or config.base.graphics._enable then [
|
||||||
pkgs.keepass # Personal secret management
|
pkgs.keepass # Personal secret management
|
||||||
] else [ ]);
|
] else [ ]);
|
||||||
home.file.".kp/config.ini".text = lib.generators.toINI {} (trimNull {
|
home.file.".kp/config.ini".text = lib.generators.toINI { } (trimNull {
|
||||||
default = {
|
default = {
|
||||||
KEEPASSDB = cfg.path;
|
KEEPASSDB = cfg.path;
|
||||||
KEEPASSDB_KEYFILE = cfg.keyfile_path;
|
KEEPASSDB_KEYFILE = cfg.keyfile_path;
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
# A module that takes care of a GUI-ful, productive desktop environment
|
# A module that takes care of a GUI-ful, productive desktop environment
|
||||||
inputs@{pkgs,...}: {
|
inputs@{ pkgs, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
# slack
|
# slack
|
||||||
({pkgs,...}: {
|
({ pkgs, ... }: {
|
||||||
home.packages = [pkgs.slack];
|
home.packages = [ pkgs.slack ];
|
||||||
})
|
})
|
||||||
./private_chromium.nix
|
./private_chromium.nix
|
||||||
];
|
];
|
||||||
|
|
|
@ -83,12 +83,12 @@ in
|
||||||
oh-my-zsh = {
|
oh-my-zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
plugins = [
|
plugins = [
|
||||||
"git" # git command aliases: https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/git#aliases
|
"git" # git command aliases: https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/git#aliases
|
||||||
# "sudo" # double-escape to prepend sudo # UPDATE: just use vi-mode lol
|
# "sudo" # double-escape to prepend sudo # UPDATE: just use vi-mode lol
|
||||||
"command-not-found" # suggests which package to install; does not support nixos (we have solution already)
|
"command-not-found" # suggests which package to install; does not support nixos (we have solution already)
|
||||||
"gitignore" # `gi list` -> `gi java >>.gitignore`
|
"gitignore" # `gi list` -> `gi java >>.gitignore`
|
||||||
"ripgrep" # adds completion for `rg`
|
"ripgrep" # adds completion for `rg`
|
||||||
"rust" # compe for rustc/cargo
|
"rust" # compe for rustc/cargo
|
||||||
# "vi-mode" # edit promps with vi motions :)
|
# "vi-mode" # edit promps with vi motions :)
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
@ -96,9 +96,9 @@ in
|
||||||
# VI_MODE_RESET_PROMPT_ON_MODE_CHANGE = true;
|
# VI_MODE_RESET_PROMPT_ON_MODE_CHANGE = true;
|
||||||
# VI_MODE_SET_CURSOR = true;
|
# VI_MODE_SET_CURSOR = true;
|
||||||
# ZVM_VI_ESCAPE_BINDKEY = "";
|
# ZVM_VI_ESCAPE_BINDKEY = "";
|
||||||
ZVM_READKEY_ENGINE="$ZVM_READKEY_ENGINE_NEX";
|
ZVM_READKEY_ENGINE = "$ZVM_READKEY_ENGINE_NEX";
|
||||||
ZVM_KEYTIMEOUT=0.004; # 40ms, or subtly around 25 FPS. I'm a gamer :)
|
ZVM_KEYTIMEOUT = 0.004; # 40ms, or subtly around 25 FPS. I'm a gamer :)
|
||||||
ZVM_ESCAPE_KEYTIMEOUT=0.004; # 40ms, or subtly around 25 FPS. I'm a gamer :)
|
ZVM_ESCAPE_KEYTIMEOUT = 0.004; # 40ms, or subtly around 25 FPS. I'm a gamer :)
|
||||||
};
|
};
|
||||||
initExtra = (cfg.shellInitExtra or "") + ''
|
initExtra = (cfg.shellInitExtra or "") + ''
|
||||||
source ${pkgs.zsh-vi-mode}/share/zsh-vi-mode/zsh-vi-mode.plugin.zsh
|
source ${pkgs.zsh-vi-mode}/share/zsh-vi-mode/zsh-vi-mode.plugin.zsh
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ config
|
{ config
|
||||||
, proj_root
|
, proj_root
|
||||||
, myLib
|
, myLib
|
||||||
, ...
|
, ...
|
||||||
}:
|
}:
|
||||||
let cfg = config.base.ssh;
|
let cfg = config.base.ssh;
|
||||||
in
|
in
|
||||||
|
|
|
@ -36,7 +36,18 @@
|
||||||
, ...
|
, ...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
system = "x86_64-linux";
|
# config_fn:: system -> config
|
||||||
|
cross_platform = config_fn: ({
|
||||||
|
packages = builtins.foldl'
|
||||||
|
(prev: system: prev // {
|
||||||
|
"${system}" = config_fn system;
|
||||||
|
})
|
||||||
|
{ }
|
||||||
|
flake-utils.lib.defaultSystems;
|
||||||
|
});
|
||||||
|
in
|
||||||
|
cross_platform (system:
|
||||||
|
let
|
||||||
overlays = import ./../../overlays.nix flake_inputs;
|
overlays = import ./../../overlays.nix flake_inputs;
|
||||||
# pkgs = nixpkgs.legacyPackages.${system}.appendOverlays overlays;
|
# pkgs = nixpkgs.legacyPackages.${system}.appendOverlays overlays;
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
|
@ -47,10 +58,10 @@
|
||||||
base = import ./base;
|
base = import ./base;
|
||||||
inherit (base) mkModuleArgs;
|
inherit (base) mkModuleArgs;
|
||||||
|
|
||||||
kde_module = {config, pkgs, ...}: {
|
kde_module = { config, pkgs, ... }: {
|
||||||
fonts.fontconfig.enable = true;
|
fonts.fontconfig.enable = true;
|
||||||
home.packages = [
|
home.packages = [
|
||||||
(pkgs.nerdfonts.override {fonts = ["DroidSansMono"];})
|
(pkgs.nerdfonts.override { fonts = [ "DroidSansMono" ]; })
|
||||||
];
|
];
|
||||||
# For some reasons, Windows es in the font name as DroidSansMono NF
|
# For some reasons, Windows es in the font name as DroidSansMono NF
|
||||||
# so we need to override this
|
# so we need to override this
|
||||||
|
@ -62,13 +73,14 @@
|
||||||
inherit overlays pkgs base;
|
inherit overlays pkgs base;
|
||||||
};
|
};
|
||||||
homeConfigurations =
|
homeConfigurations =
|
||||||
let x11_wsl = ''
|
let
|
||||||
# x11 output for WSL
|
x11_wsl = ''
|
||||||
export DISPLAY=$(ip route list default | awk '{print $3}'):0
|
# x11 output for WSL
|
||||||
export LIBGL_ALWAYS_INDIRECT=1
|
export DISPLAY=$(ip route list default | awk '{print $3}'):0
|
||||||
'';
|
export LIBGL_ALWAYS_INDIRECT=1
|
||||||
|
'';
|
||||||
in
|
in
|
||||||
rec {
|
{
|
||||||
"hungtr" = home-manager.lib.homeManagerConfiguration {
|
"hungtr" = home-manager.lib.homeManagerConfiguration {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
modules = base.modules ++ [
|
modules = base.modules ++ [
|
||||||
|
@ -109,6 +121,7 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
"htran" = home-manager.lib.homeManagerConfiguration { };
|
||||||
"nixos@Felia" = home-manager.lib.homeManagerConfiguration {
|
"nixos@Felia" = home-manager.lib.homeManagerConfiguration {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
modules = [
|
modules = [
|
||||||
|
@ -174,5 +187,5 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,109 +1,111 @@
|
||||||
{
|
{
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
from-yaml ={
|
from-yaml = {
|
||||||
url = "github:pegasust/fromYaml";
|
url = "github:pegasust/fromYaml";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
outputs = {nixpkgs,from-yaml, ...}: let
|
outputs = { nixpkgs, from-yaml, ... }:
|
||||||
system = "x86_64-linux";
|
let
|
||||||
pkgs = import nixpkgs {inherit system;};
|
system = "x86_64-linux";
|
||||||
lib = {
|
pkgs = import nixpkgs { inherit system; };
|
||||||
fromYaml = import "${from-yaml}/fromYaml.nix" {lib = pkgs.lib;};
|
lib = {
|
||||||
|
fromYaml = import "${from-yaml}/fromYaml.nix" { lib = pkgs.lib; };
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
inherit nixpkgs;
|
||||||
|
inherit from-yaml;
|
||||||
|
inherit lib;
|
||||||
|
inherit pkgs;
|
||||||
|
fromYamlFn = lib.fromYaml;
|
||||||
|
yamlCmd = str: (builtins.fromJSON (pkgs.runCommand "echo ${str} | yq"));
|
||||||
|
test_0 = ''
|
||||||
|
key_bindings:
|
||||||
|
- hello:
|
||||||
|
"N"
|
||||||
|
'';
|
||||||
|
key_bind = ''
|
||||||
|
key_bindings:
|
||||||
|
- { key: N, mods: Control, action: CreateNewWindow }
|
||||||
|
# - { key: Paste, action: Paste }
|
||||||
|
# - { key: Copy, action: Copy }
|
||||||
|
#- { key: L, mods: Control, action: ClearLogNotice }
|
||||||
|
#- { key: L, mods: Control, mode: ~Vi|~Search, chars: "\x0c" }
|
||||||
|
#- { key: PageUp, mods: Shift, mode: ~Alt, action: ScrollPageUp }
|
||||||
|
#- { key: PageDown, mods: Shift, mode: ~Alt, action: ScrollPageDown }
|
||||||
|
#- { key: Home, mods: Shift, mode: ~Alt, action: ScrollToTop }
|
||||||
|
#- { key: End, mods: Shift, mode: ~Alt, action: ScrollToBottom }
|
||||||
|
|
||||||
|
# Vi Mode
|
||||||
|
#- { key: Space, mods: Shift|Control, mode: ~Search, action: ToggleViMode }
|
||||||
|
- { key: Escape, mods: Shift, mode: ~Search, action: ToggleViMode }
|
||||||
|
#- { key: Space, mods: Shift|Control, mode: Vi|~Search, action: ScrollToBottom }
|
||||||
|
#- { key: Escape, mode: Vi|~Search, action: ClearSelection }
|
||||||
|
#- { key: I, mode: Vi|~Search, action: ToggleViMode }
|
||||||
|
#- { key: I, mode: Vi|~Search, action: ScrollToBottom }
|
||||||
|
#- { key: C, mods: Control, mode: Vi|~Search, action: ToggleViMode }
|
||||||
|
#- { key: Y, mods: Control, mode: Vi|~Search, action: ScrollLineUp }
|
||||||
|
#- { key: E, mods: Control, mode: Vi|~Search, action: ScrollLineDown }
|
||||||
|
#- { key: G, mode: Vi|~Search, action: ScrollToTop }
|
||||||
|
#- { key: G, mods: Shift, mode: Vi|~Search, action: ScrollToBottom }
|
||||||
|
#- { key: B, mods: Control, mode: Vi|~Search, action: ScrollPageUp }
|
||||||
|
#- { key: F, mods: Control, mode: Vi|~Search, action: ScrollPageDown }
|
||||||
|
#- { key: U, mods: Control, mode: Vi|~Search, action: ScrollHalfPageUp }
|
||||||
|
#- { key: D, mods: Control, mode: Vi|~Search, action: ScrollHalfPageDown }
|
||||||
|
#- { key: Y, mode: Vi|~Search, action: Copy }
|
||||||
|
#- { key: Y, mode: Vi|~Search, action: ClearSelection }
|
||||||
|
#- { key: Copy, mode: Vi|~Search, action: ClearSelection }
|
||||||
|
#- { key: V, mode: Vi|~Search, action: ToggleNormalSelection }
|
||||||
|
#- { key: V, mods: Shift, mode: Vi|~Search, action: ToggleLineSelection }
|
||||||
|
#- { key: V, mods: Control, mode: Vi|~Search, action: ToggleBlockSelection }
|
||||||
|
#- { key: V, mods: Alt, mode: Vi|~Search, action: ToggleSemanticSelection }
|
||||||
|
#- { key: Return, mode: Vi|~Search, action: Open }
|
||||||
|
#- { key: Z, mode: Vi|~Search, action: CenterAroundViCursor }
|
||||||
|
#- { key: K, mode: Vi|~Search, action: Up }
|
||||||
|
#- { key: J, mode: Vi|~Search, action: Down }
|
||||||
|
#- { key: H, mode: Vi|~Search, action: Left }
|
||||||
|
#- { key: L, mode: Vi|~Search, action: Right }
|
||||||
|
#- { key: Up, mode: Vi|~Search, action: Up }
|
||||||
|
#- { key: Down, mode: Vi|~Search, action: Down }
|
||||||
|
#- { key: Left, mode: Vi|~Search, action: Left }
|
||||||
|
#- { key: Right, mode: Vi|~Search, action: Right }
|
||||||
|
#- { key: Key0, mode: Vi|~Search, action: First }
|
||||||
|
#- { key: Key4, mods: Shift, mode: Vi|~Search, action: Last }
|
||||||
|
#- { key: Key6, mods: Shift, mode: Vi|~Search, action: FirstOccupied }
|
||||||
|
#- { key: H, mods: Shift, mode: Vi|~Search, action: High }
|
||||||
|
#- { key: M, mods: Shift, mode: Vi|~Search, action: Middle }
|
||||||
|
#- { key: L, mods: Shift, mode: Vi|~Search, action: Low }
|
||||||
|
#- { key: B, mode: Vi|~Search, action: SemanticLeft }
|
||||||
|
#- { key: W, mode: Vi|~Search, action: SemanticRight }
|
||||||
|
#- { key: E, mode: Vi|~Search, action: SemanticRightEnd }
|
||||||
|
#- { key: B, mods: Shift, mode: Vi|~Search, action: WordLeft }
|
||||||
|
#- { key: W, mods: Shift, mode: Vi|~Search, action: WordRight }
|
||||||
|
#- { key: E, mods: Shift, mode: Vi|~Search, action: WordRightEnd }
|
||||||
|
#- { key: Key5, mods: Shift, mode: Vi|~Search, action: Bracket }
|
||||||
|
#- { key: Slash, mode: Vi|~Search, action: SearchForward }
|
||||||
|
#- { key: Slash, mods: Shift, mode: Vi|~Search, action: SearchBackward }
|
||||||
|
#- { key: N, mode: Vi|~Search, action: SearchNext }
|
||||||
|
#- { key: N, mods: Shift, mode: Vi|~Search, action: SearchPrevious }
|
||||||
|
|
||||||
|
# Search Mode
|
||||||
|
#- { key: Return, mode: Search|Vi, action: SearchConfirm }
|
||||||
|
#- { key: Escape, mode: Search, action: SearchCancel }
|
||||||
|
#- { key: C, mods: Control, mode: Search, action: SearchCancel }
|
||||||
|
#- { key: U, mods: Control, mode: Search, action: SearchClear }
|
||||||
|
#- { key: W, mods: Control, mode: Search, action: SearchDeleteWord }
|
||||||
|
#- { key: P, mods: Control, mode: Search, action: SearchHistoryPrevious }
|
||||||
|
#- { key: N, mods: Control, mode: Search, action: SearchHistoryNext }
|
||||||
|
#- { key: Up, mode: Search, action: SearchHistoryPrevious }
|
||||||
|
#- { key: Down, mode: Search, action: SearchHistoryNext }
|
||||||
|
#- { key: Return, mode: Search|~Vi, action: SearchFocusNext }
|
||||||
|
#- { key: Return, mods: Shift, mode: Search|~Vi, action: SearchFocusPrevious }
|
||||||
|
|
||||||
|
# (Windows, Linux, and BSD only)
|
||||||
|
- { key: V, mods: Control|Shift, mode: ~Vi, action: Paste }
|
||||||
|
- { key: C, mods: Control|Shift, action: Copy }
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
in {
|
|
||||||
inherit nixpkgs;
|
|
||||||
inherit from-yaml;
|
|
||||||
inherit lib;
|
|
||||||
inherit pkgs;
|
|
||||||
fromYamlFn = lib.fromYaml;
|
|
||||||
yamlCmd = str: (builtins.fromJSON(pkgs.runCommand "echo ${str} | yq"));
|
|
||||||
test_0 = ''
|
|
||||||
key_bindings:
|
|
||||||
- hello:
|
|
||||||
"N"
|
|
||||||
'';
|
|
||||||
key_bind = ''
|
|
||||||
key_bindings:
|
|
||||||
- { key: N, mods: Control, action: CreateNewWindow }
|
|
||||||
# - { key: Paste, action: Paste }
|
|
||||||
# - { key: Copy, action: Copy }
|
|
||||||
#- { key: L, mods: Control, action: ClearLogNotice }
|
|
||||||
#- { key: L, mods: Control, mode: ~Vi|~Search, chars: "\x0c" }
|
|
||||||
#- { key: PageUp, mods: Shift, mode: ~Alt, action: ScrollPageUp }
|
|
||||||
#- { key: PageDown, mods: Shift, mode: ~Alt, action: ScrollPageDown }
|
|
||||||
#- { key: Home, mods: Shift, mode: ~Alt, action: ScrollToTop }
|
|
||||||
#- { key: End, mods: Shift, mode: ~Alt, action: ScrollToBottom }
|
|
||||||
|
|
||||||
# Vi Mode
|
|
||||||
#- { key: Space, mods: Shift|Control, mode: ~Search, action: ToggleViMode }
|
|
||||||
- { key: Escape, mods: Shift, mode: ~Search, action: ToggleViMode }
|
|
||||||
#- { key: Space, mods: Shift|Control, mode: Vi|~Search, action: ScrollToBottom }
|
|
||||||
#- { key: Escape, mode: Vi|~Search, action: ClearSelection }
|
|
||||||
#- { key: I, mode: Vi|~Search, action: ToggleViMode }
|
|
||||||
#- { key: I, mode: Vi|~Search, action: ScrollToBottom }
|
|
||||||
#- { key: C, mods: Control, mode: Vi|~Search, action: ToggleViMode }
|
|
||||||
#- { key: Y, mods: Control, mode: Vi|~Search, action: ScrollLineUp }
|
|
||||||
#- { key: E, mods: Control, mode: Vi|~Search, action: ScrollLineDown }
|
|
||||||
#- { key: G, mode: Vi|~Search, action: ScrollToTop }
|
|
||||||
#- { key: G, mods: Shift, mode: Vi|~Search, action: ScrollToBottom }
|
|
||||||
#- { key: B, mods: Control, mode: Vi|~Search, action: ScrollPageUp }
|
|
||||||
#- { key: F, mods: Control, mode: Vi|~Search, action: ScrollPageDown }
|
|
||||||
#- { key: U, mods: Control, mode: Vi|~Search, action: ScrollHalfPageUp }
|
|
||||||
#- { key: D, mods: Control, mode: Vi|~Search, action: ScrollHalfPageDown }
|
|
||||||
#- { key: Y, mode: Vi|~Search, action: Copy }
|
|
||||||
#- { key: Y, mode: Vi|~Search, action: ClearSelection }
|
|
||||||
#- { key: Copy, mode: Vi|~Search, action: ClearSelection }
|
|
||||||
#- { key: V, mode: Vi|~Search, action: ToggleNormalSelection }
|
|
||||||
#- { key: V, mods: Shift, mode: Vi|~Search, action: ToggleLineSelection }
|
|
||||||
#- { key: V, mods: Control, mode: Vi|~Search, action: ToggleBlockSelection }
|
|
||||||
#- { key: V, mods: Alt, mode: Vi|~Search, action: ToggleSemanticSelection }
|
|
||||||
#- { key: Return, mode: Vi|~Search, action: Open }
|
|
||||||
#- { key: Z, mode: Vi|~Search, action: CenterAroundViCursor }
|
|
||||||
#- { key: K, mode: Vi|~Search, action: Up }
|
|
||||||
#- { key: J, mode: Vi|~Search, action: Down }
|
|
||||||
#- { key: H, mode: Vi|~Search, action: Left }
|
|
||||||
#- { key: L, mode: Vi|~Search, action: Right }
|
|
||||||
#- { key: Up, mode: Vi|~Search, action: Up }
|
|
||||||
#- { key: Down, mode: Vi|~Search, action: Down }
|
|
||||||
#- { key: Left, mode: Vi|~Search, action: Left }
|
|
||||||
#- { key: Right, mode: Vi|~Search, action: Right }
|
|
||||||
#- { key: Key0, mode: Vi|~Search, action: First }
|
|
||||||
#- { key: Key4, mods: Shift, mode: Vi|~Search, action: Last }
|
|
||||||
#- { key: Key6, mods: Shift, mode: Vi|~Search, action: FirstOccupied }
|
|
||||||
#- { key: H, mods: Shift, mode: Vi|~Search, action: High }
|
|
||||||
#- { key: M, mods: Shift, mode: Vi|~Search, action: Middle }
|
|
||||||
#- { key: L, mods: Shift, mode: Vi|~Search, action: Low }
|
|
||||||
#- { key: B, mode: Vi|~Search, action: SemanticLeft }
|
|
||||||
#- { key: W, mode: Vi|~Search, action: SemanticRight }
|
|
||||||
#- { key: E, mode: Vi|~Search, action: SemanticRightEnd }
|
|
||||||
#- { key: B, mods: Shift, mode: Vi|~Search, action: WordLeft }
|
|
||||||
#- { key: W, mods: Shift, mode: Vi|~Search, action: WordRight }
|
|
||||||
#- { key: E, mods: Shift, mode: Vi|~Search, action: WordRightEnd }
|
|
||||||
#- { key: Key5, mods: Shift, mode: Vi|~Search, action: Bracket }
|
|
||||||
#- { key: Slash, mode: Vi|~Search, action: SearchForward }
|
|
||||||
#- { key: Slash, mods: Shift, mode: Vi|~Search, action: SearchBackward }
|
|
||||||
#- { key: N, mode: Vi|~Search, action: SearchNext }
|
|
||||||
#- { key: N, mods: Shift, mode: Vi|~Search, action: SearchPrevious }
|
|
||||||
|
|
||||||
# Search Mode
|
|
||||||
#- { key: Return, mode: Search|Vi, action: SearchConfirm }
|
|
||||||
#- { key: Escape, mode: Search, action: SearchCancel }
|
|
||||||
#- { key: C, mods: Control, mode: Search, action: SearchCancel }
|
|
||||||
#- { key: U, mods: Control, mode: Search, action: SearchClear }
|
|
||||||
#- { key: W, mods: Control, mode: Search, action: SearchDeleteWord }
|
|
||||||
#- { key: P, mods: Control, mode: Search, action: SearchHistoryPrevious }
|
|
||||||
#- { key: N, mods: Control, mode: Search, action: SearchHistoryNext }
|
|
||||||
#- { key: Up, mode: Search, action: SearchHistoryPrevious }
|
|
||||||
#- { key: Down, mode: Search, action: SearchHistoryNext }
|
|
||||||
#- { key: Return, mode: Search|~Vi, action: SearchFocusNext }
|
|
||||||
#- { key: Return, mods: Shift, mode: Search|~Vi, action: SearchFocusPrevious }
|
|
||||||
|
|
||||||
# (Windows, Linux, and BSD only)
|
|
||||||
- { key: V, mods: Control|Shift, mode: ~Vi, action: Paste }
|
|
||||||
- { key: C, mods: Control|Shift, action: Copy }
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,14 +26,14 @@ in
|
||||||
};
|
};
|
||||||
home.packages = pkgs.lib.unique ([
|
home.packages = pkgs.lib.unique ([
|
||||||
# pkgs.ncdu
|
# pkgs.ncdu
|
||||||
pkgs.rclone # cloud file operations
|
pkgs.rclone # cloud file operations
|
||||||
pkgs.htop # system diagnostics in CLI
|
pkgs.htop # system diagnostics in CLI
|
||||||
pkgs.ripgrep # content fuzzy search
|
pkgs.ripgrep # content fuzzy search
|
||||||
pkgs.unzip # compression
|
pkgs.unzip # compression
|
||||||
pkgs.zip # compression
|
pkgs.zip # compression
|
||||||
|
|
||||||
# cool utilities
|
# cool utilities
|
||||||
pkgs.yq # Yaml adaptor for jq (only pretty print, little query)
|
pkgs.yq # Yaml adaptor for jq (only pretty print, little query)
|
||||||
pkgs.xorg.xclock # TODO: only include if have gui # For testing GL installation
|
pkgs.xorg.xclock # TODO: only include if have gui # For testing GL installation
|
||||||
pkgs.logseq # TODO: only include if have GL # Obsidian alt
|
pkgs.logseq # TODO: only include if have GL # Obsidian alt
|
||||||
pkgs.mosh # Parsec for SSH
|
pkgs.mosh # Parsec for SSH
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# main module exporter for different configuration profiles
|
# main module exporter for different configuration profiles
|
||||||
{pkgs, libs,...} @ inputs:
|
{ pkgs, libs, ... } @ inputs:
|
||||||
{
|
{
|
||||||
hwtr = import ./hwtr.nix;
|
hwtr = import ./hwtr.nix;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
{ pkgs
|
{ pkgs
|
||||||
, lib ? pkgs.lib
|
, lib ? pkgs.lib
|
||||||
, ... }@flake_import:
|
, ...
|
||||||
let serde = import ./serde { inherit pkgs lib; };
|
}@flake_import:
|
||||||
recursiveUpdate = lib.recursiveUpdate;
|
let
|
||||||
|
serde = import ./serde { inherit pkgs lib; };
|
||||||
|
recursiveUpdate = lib.recursiveUpdate;
|
||||||
in
|
in
|
||||||
recursiveUpdate (recursiveUpdate pkgs.lib lib) {
|
recursiveUpdate (recursiveUpdate pkgs.lib lib) {
|
||||||
fromYaml = serde.fromYaml;
|
fromYaml = serde.fromYaml;
|
||||||
|
|
|
@ -15,14 +15,16 @@ let
|
||||||
echo "$yamlContent" | yq >$out
|
echo "$yamlContent" | yq >$out
|
||||||
'')
|
'')
|
||||||
{ };
|
{ };
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
# Takes in a yaml string and produces a derivation with translated JSON at $outputPath
|
# Takes in a yaml string and produces a derivation with translated JSON at $outputPath
|
||||||
# similar to builtins.fromJSON, turns a YAML string to nix attrset
|
# similar to builtins.fromJSON, turns a YAML string to nix attrset
|
||||||
fromYaml = yamlContent: builtins.fromJSON (builtins.readFile (yamlToJsonDrv yamlContent "any_output.json"));
|
fromYaml = yamlContent: builtins.fromJSON (builtins.readFile (yamlToJsonDrv yamlContent "any_output.json"));
|
||||||
fromYamlPath = yamlPath: builtins.fromJSON (
|
fromYamlPath = yamlPath: builtins.fromJSON (
|
||||||
builtins.readFile (
|
builtins.readFile (
|
||||||
yamlToJsonDrv (
|
yamlToJsonDrv
|
||||||
builtins.readFile yamlPath)
|
(
|
||||||
"any-output.json"));
|
builtins.readFile yamlPath)
|
||||||
|
"any-output.json"));
|
||||||
# TODO: fromToml?
|
# TODO: fromToml?
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,8 @@ let
|
||||||
all = users // systems;
|
all = users // systems;
|
||||||
# stands for calculus
|
# stands for calculus
|
||||||
c_ = builtins;
|
c_ = builtins;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
"system/secrets/s3fs.age".publicKeys = c_.attrValues (all);
|
"system/secrets/s3fs.age".publicKeys = c_.attrValues (all);
|
||||||
"system/secrets/s3fs.digital-garden.age".publicKeys = c_.attrValues (all);
|
"system/secrets/s3fs.digital-garden.age".publicKeys = c_.attrValues (all);
|
||||||
"system/secrets/_nhitrl.age".publicKeys = c_.attrValues (all);
|
"system/secrets/_nhitrl.age".publicKeys = c_.attrValues (all);
|
||||||
|
|
|
@ -29,7 +29,7 @@ with lib;
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
home = "/home/hungtr";
|
home = "/home/hungtr";
|
||||||
description = "pegasust/hungtr";
|
description = "pegasust/hungtr";
|
||||||
extraGroups = [ "wheel" "networkmanager" "audio"];
|
extraGroups = [ "wheel" "networkmanager" "audio" ];
|
||||||
};
|
};
|
||||||
users.users.root = {
|
users.users.root = {
|
||||||
# openssh runs in root, no? This is because port < 1024 requires root.
|
# openssh runs in root, no? This is because port < 1024 requires root.
|
||||||
|
|
|
@ -27,10 +27,11 @@
|
||||||
age.secrets._nhitrl_cred = {
|
age.secrets._nhitrl_cred = {
|
||||||
file = ./secrets/_nhitrl.age;
|
file = ./secrets/_nhitrl.age;
|
||||||
};
|
};
|
||||||
environment.systemPackages = [agenix.defaultPackage.x86_64-linux];
|
environment.systemPackages = [ agenix.defaultPackage.x86_64-linux ];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
# Windows with NixOS WSL
|
# Windows with NixOS WSL
|
||||||
nixosConfigurations.Felia = nixpkgs.lib.nixosSystem {
|
nixosConfigurations.Felia = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
|
@ -206,163 +207,165 @@
|
||||||
};
|
};
|
||||||
nixosConfigurations.bao = nixpkgs.lib.nixosSystem {
|
nixosConfigurations.bao = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
specialArgs.hostname = "bao";
|
specialArgs.hostname = "bao";
|
||||||
modules = base_modules ++ [
|
modules = base_modules ++ [
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
./../../modules/storage.perso.sys.nix
|
./../../modules/storage.perso.sys.nix
|
||||||
# GPU, sound, networking stuffs
|
# GPU, sound, networking stuffs
|
||||||
({ config, pkgs, lib, ... }:
|
({ config, pkgs, lib, ... }:
|
||||||
let
|
let
|
||||||
gpu_pkgs = [ pkgs.clinfo pkgs.lshw pkgs.glxinfo pkgs.pciutils pkgs.vulkan-tools ];
|
gpu_pkgs = [ pkgs.clinfo pkgs.lshw pkgs.glxinfo pkgs.pciutils pkgs.vulkan-tools ];
|
||||||
gpu_conf = {
|
gpu_conf = {
|
||||||
# openCL
|
# openCL
|
||||||
hardware.opengl = {
|
hardware.opengl = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraPackages = let
|
extraPackages =
|
||||||
inherit (pkgs) rocm-opencl-icd rocm-opencl-runtime;
|
let
|
||||||
in [rocm-opencl-icd rocm-opencl-runtime];
|
inherit (pkgs) rocm-opencl-icd rocm-opencl-runtime;
|
||||||
# Vulkan
|
in
|
||||||
driSupport = true;
|
[ rocm-opencl-icd rocm-opencl-runtime ];
|
||||||
driSupport32Bit = true;
|
# Vulkan
|
||||||
package = pkgs.mesa.drivers;
|
driSupport = true;
|
||||||
package32 = pkgs.pkgsi686Linux.mesa.drivers;
|
driSupport32Bit = true;
|
||||||
|
package = pkgs.mesa.drivers;
|
||||||
|
package32 = pkgs.pkgsi686Linux.mesa.drivers;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
amd_rx470 = {
|
||||||
amd_rx470 = {
|
# early amd gpu usage
|
||||||
# early amd gpu usage
|
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||||
boot.initrd.kernelModules = ["amdgpu"];
|
services.xserver.enable = true;
|
||||||
|
services.xserver.videoDrivers = [ "amdgpu" ];
|
||||||
|
};
|
||||||
|
nv_rtx3060 = {
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
services.xserver.enable = true;
|
||||||
|
services.xserver.videoDrivers = [ "nvidia" ];
|
||||||
|
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||||
|
};
|
||||||
|
systemPackages = [ ] ++ gpu_pkgs;
|
||||||
|
in
|
||||||
|
lib.recursiveUpdate gpu_conf (lib.recursiveUpdate nv_rtx3060 {
|
||||||
|
# Use UEFI
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
|
||||||
|
networking.hostName = "bao"; # Define your hostname.
|
||||||
|
# Pick only one of the below networking options.
|
||||||
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||||
|
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
||||||
|
|
||||||
|
# Enable the X11 windowing system.
|
||||||
services.xserver.enable = true;
|
services.xserver.enable = true;
|
||||||
services.xserver.videoDrivers = ["amdgpu"];
|
# KDE & Plasma 5
|
||||||
};
|
services.xserver.displayManager.sddm.enable = true;
|
||||||
nv_rtx3060 = {
|
services.xserver.desktopManager.plasma5 = {
|
||||||
nixpkgs.config.allowUnfree = true;
|
enable = true;
|
||||||
services.xserver.enable = true;
|
excludePackages = let plasma5 = pkgs.libsForQt5; in [
|
||||||
services.xserver.videoDrivers = ["nvidia"];
|
plasma5.elisa # audio viewer
|
||||||
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
|
plasma5.konsole # I use alacritty instaed
|
||||||
};
|
plasma5.plasma-browser-integration
|
||||||
systemPackages = [] ++ gpu_pkgs;
|
plasma5.print-manager # will enable if I need
|
||||||
in
|
plasma5.khelpcenter # why not just write manpages instead :(
|
||||||
lib.recursiveUpdate gpu_conf (lib.recursiveUpdate nv_rtx3060 {
|
# plasma5.ksshaskpass # pls just put prompts on my dear terminal
|
||||||
# Use UEFI
|
];
|
||||||
boot.loader.systemd-boot.enable = true;
|
};
|
||||||
|
|
||||||
networking.hostName = "bao"; # Define your hostname.
|
# disables KDE's setting of askpassword
|
||||||
# Pick only one of the below networking options.
|
programs.ssh.askPassword = "";
|
||||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
programs.ssh.enableAskPassword = false;
|
||||||
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
|
||||||
|
|
||||||
# Enable the X11 windowing system.
|
time.timeZone = "America/Phoenix";
|
||||||
services.xserver.enable = true;
|
# Configure keymap in X11
|
||||||
# KDE & Plasma 5
|
services.xserver.layout = "us";
|
||||||
services.xserver.displayManager.sddm.enable = true;
|
# services.xserver.xkbOptions = {
|
||||||
services.xserver.desktopManager.plasma5 = {
|
# "eurosign:e";
|
||||||
enable = true;
|
# "caps:escape" # map caps to escape.
|
||||||
excludePackages = let plasma5 = pkgs.libsForQt5; in [
|
# };
|
||||||
plasma5.elisa # audio viewer
|
|
||||||
plasma5.konsole # I use alacritty instaed
|
|
||||||
plasma5.plasma-browser-integration
|
|
||||||
plasma5.print-manager # will enable if I need
|
|
||||||
plasma5.khelpcenter # why not just write manpages instead :(
|
|
||||||
# plasma5.ksshaskpass # pls just put prompts on my dear terminal
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
# disables KDE's setting of askpassword
|
# Enable CUPS to print documents.
|
||||||
programs.ssh.askPassword = "";
|
# services.printing.enable = true;
|
||||||
programs.ssh.enableAskPassword = false;
|
|
||||||
|
|
||||||
time.timeZone = "America/Phoenix";
|
# Enable sound. (pulse audio)
|
||||||
# Configure keymap in X11
|
sound.enable = true;
|
||||||
services.xserver.layout = "us";
|
programs.dconf.enable = true;
|
||||||
# services.xserver.xkbOptions = {
|
hardware.pulseaudio.enable = true;
|
||||||
# "eurosign:e";
|
hardware.pulseaudio.support32Bit = true;
|
||||||
# "caps:escape" # map caps to escape.
|
nixpkgs.config.pulseaudio = true;
|
||||||
# };
|
hardware.pulseaudio.extraConfig = "load-module module-combine-sink";
|
||||||
|
|
||||||
# Enable CUPS to print documents.
|
# Sound: pipewire
|
||||||
# services.printing.enable = true;
|
# sound.enable = false;
|
||||||
|
# hardware.pulseaudio.enable = false;
|
||||||
# Enable sound. (pulse audio)
|
# services.pipewire = {
|
||||||
sound.enable = true;
|
# enable = true;
|
||||||
programs.dconf.enable = true;
|
# alsa.enable = true;
|
||||||
hardware.pulseaudio.enable = true;
|
# alsa.support32Bit = true;
|
||||||
hardware.pulseaudio.support32Bit = true;
|
# pulse.enable = true;
|
||||||
nixpkgs.config.pulseaudio = true;
|
# # Might want to use JACK in the future
|
||||||
hardware.pulseaudio.extraConfig = "load-module module-combine-sink";
|
# jack.enable = true;
|
||||||
|
# };
|
||||||
# Sound: pipewire
|
#
|
||||||
# sound.enable = false;
|
# security.rtkit.enable = true;
|
||||||
# hardware.pulseaudio.enable = false;
|
|
||||||
# services.pipewire = {
|
|
||||||
# enable = true;
|
|
||||||
# alsa.enable = true;
|
|
||||||
# alsa.support32Bit = true;
|
|
||||||
# pulse.enable = true;
|
|
||||||
# # Might want to use JACK in the future
|
|
||||||
# jack.enable = true;
|
|
||||||
# };
|
|
||||||
#
|
|
||||||
# security.rtkit.enable = true;
|
|
||||||
|
|
||||||
|
|
||||||
# Enable touchpad support (enabled default in most desktopManager).
|
# Enable touchpad support (enabled default in most desktopManager).
|
||||||
# services.xserver.libinput.enable = true;
|
# services.xserver.libinput.enable = true;
|
||||||
|
|
||||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||||
# users.users.alice = {
|
# users.users.alice = {
|
||||||
# isNormalUser = true;
|
# isNormalUser = true;
|
||||||
# extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
# extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
||||||
# packages = with pkgs; [
|
# packages = with pkgs; [
|
||||||
# firefox
|
# firefox
|
||||||
# thunderbird
|
# thunderbird
|
||||||
# ];
|
# ];
|
||||||
# };
|
# };
|
||||||
# Just an initial user to get this started lol
|
# Just an initial user to get this started lol
|
||||||
users.users.user = {
|
users.users.user = {
|
||||||
initialPassword = "pw123";
|
initialPassword = "pw123";
|
||||||
extraGroups = [ "wheel" "networkmanager" "audio"];
|
extraGroups = [ "wheel" "networkmanager" "audio" ];
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# List packages installed in system profile. To search, run:
|
# List packages installed in system profile. To search, run:
|
||||||
# $ nix search wget
|
# $ nix search wget
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
neovim
|
neovim
|
||||||
wget
|
wget
|
||||||
] ++ systemPackages;
|
] ++ systemPackages;
|
||||||
|
|
||||||
# Some programs need SUID wrappers, can be configured further or are
|
# Some programs need SUID wrappers, can be configured further or are
|
||||||
# started in user sessions.
|
# started in user sessions.
|
||||||
# programs.mtr.enable = true;
|
# programs.mtr.enable = true;
|
||||||
# programs.gnupg.agent = {
|
# programs.gnupg.agent = {
|
||||||
# enable = true;
|
# enable = true;
|
||||||
# enableSSHSupport = true;
|
# enableSSHSupport = true;
|
||||||
# };
|
# };
|
||||||
|
|
||||||
# List services that you want to enable:
|
# List services that you want to enable:
|
||||||
|
|
||||||
# Enable the OpenSSH daemon.
|
# Enable the OpenSSH daemon.
|
||||||
services.openssh.enable = true;
|
services.openssh.enable = true;
|
||||||
|
|
||||||
# Open ports in the firewall.
|
# Open ports in the firewall.
|
||||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||||
# Or disable the firewall altogether.
|
# Or disable the firewall altogether.
|
||||||
# networking.firewall.enable = false;
|
# networking.firewall.enable = false;
|
||||||
|
|
||||||
# Copy the NixOS configuration file and link it from the resulting system
|
# Copy the NixOS configuration file and link it from the resulting system
|
||||||
# (/run/current-system/configuration.nix). This is useful in case you
|
# (/run/current-system/configuration.nix). This is useful in case you
|
||||||
# accidentally delete configuration.nix.
|
# accidentally delete configuration.nix.
|
||||||
# system.copySystemConfiguration = true;
|
# system.copySystemConfiguration = true;
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
# This value determines the NixOS release from which the default
|
||||||
# settings for stateful data, like file locations and database versions
|
# settings for stateful data, like file locations and database versions
|
||||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||||
# this value at the release version of the first install of this system.
|
# this value at the release version of the first install of this system.
|
||||||
# Before changing this value read the documentation for this option
|
# Before changing this value read the documentation for this option
|
||||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||||
system.stateVersion = "22.11"; # Did you read the comment?
|
system.stateVersion = "22.11"; # Did you read the comment?
|
||||||
}))
|
}))
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -5,7 +5,8 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
[
|
||||||
|
(modulesPath + "/profiles/qemu-guest.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "virtio_pci" "virtio_scsi" "ahci" "sd_mod" ];
|
boot.initrd.availableKernelModules = [ "virtio_pci" "virtio_scsi" "ahci" "sd_mod" ];
|
||||||
|
@ -23,13 +24,13 @@
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" =
|
||||||
{ device = "/dev/sda";
|
{
|
||||||
|
device = "/dev/sda";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices =
|
swapDevices =
|
||||||
[ { device = "/dev/sdb"; }
|
[{ device = "/dev/sdb"; }];
|
||||||
];
|
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
|
|
@ -5,24 +5,27 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
[
|
||||||
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
||||||
# boot.initrd.kernelModules = [ "amdgpu" ];
|
# boot.initrd.kernelModules = [ "amdgpu" ];
|
||||||
boot.initrd.kernelModules = [];
|
boot.initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ "kvm-amd" "coretemp"];
|
boot.kernelModules = [ "kvm-amd" "coretemp" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" =
|
||||||
# Might be wise to use /dev/nvme0p1 instead
|
# Might be wise to use /dev/nvme0p1 instead
|
||||||
{ device = "/dev/disk/by-uuid/27fc09b3-e3b7-4883-94a0-c313a0e0abe2";
|
{
|
||||||
|
device = "/dev/disk/by-uuid/27fc09b3-e3b7-4883-94a0-c313a0e0abe2";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" =
|
||||||
# Might be wise to use /dev/nvme0p2 instead
|
# Might be wise to use /dev/nvme0p2 instead
|
||||||
{ device = "/dev/disk/by-uuid/EBA6-394D";
|
{
|
||||||
|
device = "/dev/disk/by-uuid/EBA6-394D";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,8 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
[
|
||||||
|
(modulesPath + "/profiles/qemu-guest.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "virtio_pci" "virtio_scsi" "ahci" "sd_mod" ];
|
boot.initrd.availableKernelModules = [ "virtio_pci" "virtio_scsi" "ahci" "sd_mod" ];
|
||||||
|
@ -23,13 +24,13 @@
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" =
|
||||||
{ device = "/dev/sda";
|
{
|
||||||
|
device = "/dev/sda";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices =
|
swapDevices =
|
||||||
[ { device = "/dev/sdb"; }
|
[{ device = "/dev/sdb"; }];
|
||||||
];
|
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
|
|
@ -5,7 +5,8 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
[
|
||||||
|
(modulesPath + "/profiles/qemu-guest.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "virtio_pci" "virtio_scsi" "ahci" "sd_mod" ];
|
boot.initrd.availableKernelModules = [ "virtio_pci" "virtio_scsi" "ahci" "sd_mod" ];
|
||||||
|
@ -13,7 +14,7 @@
|
||||||
boot.kernelModules = [ ];
|
boot.kernelModules = [ ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
boot.kernelParams = ["console=ttyS0,19200n8"];
|
boot.kernelParams = [ "console=ttyS0,19200n8" ];
|
||||||
boot.loader.grub.extraConfig = ''
|
boot.loader.grub.extraConfig = ''
|
||||||
serial --speed=19200 --unit=0 --word=8 --parity=no --stop=1
|
serial --speed=19200 --unit=0 --word=8 --parity=no --stop=1
|
||||||
terminal_input serial;
|
terminal_input serial;
|
||||||
|
@ -23,13 +24,13 @@
|
||||||
boot.loader.grub.device = "nodev";
|
boot.loader.grub.device = "nodev";
|
||||||
boot.loader.timeout = 10;
|
boot.loader.timeout = 10;
|
||||||
fileSystems."/" =
|
fileSystems."/" =
|
||||||
{ device = "/dev/sda";
|
{
|
||||||
|
device = "/dev/sda";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices =
|
swapDevices =
|
||||||
[ { device = "/dev/sdb"; }
|
[{ device = "/dev/sdb"; }];
|
||||||
];
|
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
|
|
@ -20,6 +20,6 @@ let
|
||||||
'';
|
'';
|
||||||
});
|
});
|
||||||
in
|
in
|
||||||
(with pure; [nixGLIntel nixVulkanNvidia nixGLNvidia nixVulkanIntel])
|
(with pure; [ nixGLIntel nixVulkanNvidia nixGLNvidia nixVulkanIntel ])
|
||||||
++ (with versionFile440.auto; [nixGLNvidia nixGLDefault nixVulkanNvidia])
|
++ (with versionFile440.auto; [ nixGLNvidia nixGLDefault nixVulkanNvidia ])
|
||||||
++ (with versionFile510.auto; [nixGLNvidia nixGLDefault nixVulkanNvidia])
|
++ (with versionFile510.auto; [ nixGLNvidia nixGLDefault nixVulkanNvidia ])
|
||||||
|
|
|
@ -1,24 +1,25 @@
|
||||||
{ ## Nvidia informations.
|
{
|
||||||
|
## Nvidia informations.
|
||||||
# Version of the system kernel module. Let it to null to enable auto-detection.
|
# Version of the system kernel module. Let it to null to enable auto-detection.
|
||||||
nvidiaVersion ? null,
|
nvidiaVersion ? null
|
||||||
# Hash of the Nvidia driver .run file. null is fine, but fixing a value here
|
, # Hash of the Nvidia driver .run file. null is fine, but fixing a value here
|
||||||
# will be more reproducible and more efficient.
|
# will be more reproducible and more efficient.
|
||||||
nvidiaHash ? null,
|
nvidiaHash ? null
|
||||||
# Alternatively, you can pass a path that points to a nvidia version file
|
, # Alternatively, you can pass a path that points to a nvidia version file
|
||||||
# and let nixGL extract the version from it. That file must be a copy of
|
# and let nixGL extract the version from it. That file must be a copy of
|
||||||
# /proc/driver/nvidia/version. Nix doesn't like zero-sized files (see
|
# /proc/driver/nvidia/version. Nix doesn't like zero-sized files (see
|
||||||
# https://github.com/NixOS/nix/issues/3539 ).
|
# https://github.com/NixOS/nix/issues/3539 ).
|
||||||
nvidiaVersionFile ? null,
|
nvidiaVersionFile ? null
|
||||||
# Enable 32 bits driver
|
, # Enable 32 bits driver
|
||||||
# This is on by default, you can switch it to off if you want to reduce a
|
# This is on by default, you can switch it to off if you want to reduce a
|
||||||
# bit the size of nixGL closure.
|
# bit the size of nixGL closure.
|
||||||
enable32bits ? true,
|
enable32bits ? true
|
||||||
# Make sure to enable config.allowUnfree to the instance of nixpkgs to be
|
, # Make sure to enable config.allowUnfree to the instance of nixpkgs to be
|
||||||
# able to access the nvidia drivers.
|
# able to access the nvidia drivers.
|
||||||
pkgs ? import <nixpkgs> {
|
pkgs ? import <nixpkgs> {
|
||||||
config = { allowUnfree = true; };
|
config = { allowUnfree = true; };
|
||||||
},
|
}
|
||||||
# Enable all Intel specific extensions which only works on x86_64
|
, # Enable all Intel specific extensions which only works on x86_64
|
||||||
enableIntelX86Extensions ? true
|
enableIntelX86Extensions ? true
|
||||||
}:
|
}:
|
||||||
pkgs.callPackage ./nixGL.nix ({
|
pkgs.callPackage ./nixGL.nix ({
|
||||||
|
@ -28,8 +29,8 @@ pkgs.callPackage ./nixGL.nix ({
|
||||||
nvidiaHash
|
nvidiaHash
|
||||||
enable32bits
|
enable32bits
|
||||||
;
|
;
|
||||||
} // (if enableIntelX86Extensions then {}
|
} // (if enableIntelX86Extensions then { }
|
||||||
else {
|
else {
|
||||||
intel-media-driver = null;
|
intel-media-driver = null;
|
||||||
vaapiIntel = null;
|
vaapiIntel = null;
|
||||||
}))
|
}))
|
||||||
|
|
|
@ -8,13 +8,14 @@
|
||||||
(flake-utils.lib.eachDefaultSystem (system:
|
(flake-utils.lib.eachDefaultSystem (system:
|
||||||
let
|
let
|
||||||
isIntelX86Platform = system == "x86_64-linux";
|
isIntelX86Platform = system == "x86_64-linux";
|
||||||
nix_pkgs = import nixpkgs {inherit system;};
|
nix_pkgs = import nixpkgs { inherit system; };
|
||||||
pkgs = import ./default.nix {
|
pkgs = import ./default.nix {
|
||||||
pkgs = nix_pkgs;
|
pkgs = nix_pkgs;
|
||||||
enable32bits = isIntelX86Platform;
|
enable32bits = isIntelX86Platform;
|
||||||
enableIntelX86Extensions = isIntelX86Platform;
|
enableIntelX86Extensions = isIntelX86Platform;
|
||||||
};
|
};
|
||||||
in rec {
|
in
|
||||||
|
rec {
|
||||||
|
|
||||||
packages = {
|
packages = {
|
||||||
# makes it easy to use "nix run nixGL --impure -- program"
|
# makes it easy to use "nix run nixGL --impure -- program"
|
||||||
|
@ -31,16 +32,16 @@
|
||||||
# deprecated attributes for retro compatibility
|
# deprecated attributes for retro compatibility
|
||||||
defaultPackage = packages;
|
defaultPackage = packages;
|
||||||
})) // rec {
|
})) // rec {
|
||||||
# deprecated attributes for retro compatibility
|
# deprecated attributes for retro compatibility
|
||||||
overlay = overlays.default;
|
overlay = overlays.default;
|
||||||
overlays.default = final: _:
|
overlays.default = final: _:
|
||||||
let isIntelX86Platform = final.system == "x86_64-linux";
|
let isIntelX86Platform = final.system == "x86_64-linux";
|
||||||
in {
|
in {
|
||||||
nixgl = import ./default.nix {
|
nixgl = import ./default.nix {
|
||||||
pkgs = final;
|
pkgs = final;
|
||||||
enable32bits = isIntelX86Platform;
|
enable32bits = isIntelX86Platform;
|
||||||
enableIntelX86Extensions = isIntelX86Platform;
|
enableIntelX86Extensions = isIntelX86Platform;
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,7 +62,7 @@ let
|
||||||
It contains the builder for different nvidia configuration, parametrized by
|
It contains the builder for different nvidia configuration, parametrized by
|
||||||
the version of the driver and sha256 sum of the driver installer file.
|
the version of the driver and sha256 sum of the driver installer file.
|
||||||
*/
|
*/
|
||||||
nvidiaPackages = { version, sha256? fetch_db."${version}".sha256 }:
|
nvidiaPackages = { version, sha256 ? fetch_db."${version}".sha256 }:
|
||||||
let
|
let
|
||||||
nvidiaDrivers = (linuxPackages.nvidia_x11.override { }).overrideAttrs
|
nvidiaDrivers = (linuxPackages.nvidia_x11.override { }).overrideAttrs
|
||||||
(oldAttrs: {
|
(oldAttrs: {
|
||||||
|
|
|
@ -13,7 +13,8 @@ let
|
||||||
inherit (pubKeys) users hosts;
|
inherit (pubKeys) users hosts;
|
||||||
all = users // hosts;
|
all = users // hosts;
|
||||||
c_ = builtins;
|
c_ = builtins;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
"secrets/s3fs.age".publicKeys = c_.attrValues (all);
|
"secrets/s3fs.age".publicKeys = c_.attrValues (all);
|
||||||
"secrets/s3fs.digital-garden.age".publicKeys = c_.attrValues (all);
|
"secrets/s3fs.digital-garden.age".publicKeys = c_.attrValues (all);
|
||||||
"secrets/_nhitrl.age".publicKeys = c_.attrValues (all);
|
"secrets/_nhitrl.age".publicKeys = c_.attrValues (all);
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
# TODO: put ssh keys as user/host config
|
# TODO: put ssh keys as user/host config
|
||||||
inputs: let
|
inputs:
|
||||||
|
let
|
||||||
# user-specific (~/.ssh/id_ed25519.pub)
|
# user-specific (~/.ssh/id_ed25519.pub)
|
||||||
users = {
|
users = {
|
||||||
"hungtr@bao" = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK+1+gps6phbZboIb9fH51VNPUCkhSSOAbkI3tq3Ou0Z";
|
"hungtr@bao" = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK+1+gps6phbZboIb9fH51VNPUCkhSSOAbkI3tq3Ou0Z";
|
||||||
|
@ -11,7 +12,8 @@ inputs: let
|
||||||
all = users // systems;
|
all = users // systems;
|
||||||
# stands for calculus
|
# stands for calculus
|
||||||
c_ = builtins;
|
c_ = builtins;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
"system/secrets/s3fs.age".publicKeys = c_.attrValues (all);
|
"system/secrets/s3fs.age".publicKeys = c_.attrValues (all);
|
||||||
"system/secrets/s3fs.digital-garden.age".publicKeys = c_.attrValues (all);
|
"system/secrets/s3fs.digital-garden.age".publicKeys = c_.attrValues (all);
|
||||||
"system/secrets/_nhitrl.age".publicKeys = c_.attrValues (all);
|
"system/secrets/_nhitrl.age".publicKeys = c_.attrValues (all);
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
# TODO: templates should be able to have initial states like
|
# TODO: templates should be able to have initial states like
|
||||||
# repo name, author,...
|
# repo name, author,...
|
||||||
{pkgs
|
{ pkgs
|
||||||
,lib
|
, lib
|
||||||
,...
|
, ...
|
||||||
}: {
|
}: {
|
||||||
rust = {
|
rust = {
|
||||||
path = ./rust;
|
path = ./rust;
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
(import (
|
(import
|
||||||
fetchTarball {
|
(
|
||||||
url = "https://github.com/edolstra/flake-compat/archive/99f1c2157fba4bfe6211a321fd0ee43199025dbf.tar.gz";
|
fetchTarball {
|
||||||
sha256 = "0x2jn3vrawwv9xp15674wjz9pixwjyj3j771izayl962zziivbx2"; }
|
url = "https://github.com/edolstra/flake-compat/archive/99f1c2157fba4bfe6211a321fd0ee43199025dbf.tar.gz";
|
||||||
) {
|
sha256 = "0x2jn3vrawwv9xp15674wjz9pixwjyj3j771izayl962zziivbx2";
|
||||||
src = ./.;
|
}
|
||||||
}).defaultNix
|
)
|
||||||
|
{
|
||||||
|
src = ./.;
|
||||||
|
}).defaultNix
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
(import (
|
(import
|
||||||
fetchTarball {
|
(
|
||||||
url = "https://github.com/edolstra/flake-compat/archive/99f1c2157fba4bfe6211a321fd0ee43199025dbf.tar.gz";
|
fetchTarball {
|
||||||
sha256 = "0x2jn3vrawwv9xp15674wjz9pixwjyj3j771izayl962zziivbx2"; }
|
url = "https://github.com/edolstra/flake-compat/archive/99f1c2157fba4bfe6211a321fd0ee43199025dbf.tar.gz";
|
||||||
) {
|
sha256 = "0x2jn3vrawwv9xp15674wjz9pixwjyj3j771izayl962zziivbx2";
|
||||||
src = ./.;
|
}
|
||||||
}).shellNix
|
)
|
||||||
|
{
|
||||||
|
src = ./.;
|
||||||
|
}).shellNix
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
(import (
|
(import
|
||||||
fetchTarball {
|
(
|
||||||
url = "https://github.com/edolstra/flake-compat/archive/99f1c2157fba4bfe6211a321fd0ee43199025dbf.tar.gz";
|
fetchTarball {
|
||||||
sha256 = "0x2jn3vrawwv9xp15674wjz9pixwjyj3j771izayl962zziivbx2"; }
|
url = "https://github.com/edolstra/flake-compat/archive/99f1c2157fba4bfe6211a321fd0ee43199025dbf.tar.gz";
|
||||||
) {
|
sha256 = "0x2jn3vrawwv9xp15674wjz9pixwjyj3j771izayl962zziivbx2";
|
||||||
src = ./.;
|
}
|
||||||
}).defaultNix
|
)
|
||||||
|
{
|
||||||
|
src = ./.;
|
||||||
|
}).defaultNix
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
(import (
|
(import
|
||||||
fetchTarball {
|
(
|
||||||
url = "https://github.com/edolstra/flake-compat/archive/99f1c2157fba4bfe6211a321fd0ee43199025dbf.tar.gz";
|
fetchTarball {
|
||||||
sha256 = "0x2jn3vrawwv9xp15674wjz9pixwjyj3j771izayl962zziivbx2"; }
|
url = "https://github.com/edolstra/flake-compat/archive/99f1c2157fba4bfe6211a321fd0ee43199025dbf.tar.gz";
|
||||||
) {
|
sha256 = "0x2jn3vrawwv9xp15674wjz9pixwjyj3j771izayl962zziivbx2";
|
||||||
src = ./.;
|
}
|
||||||
}).shellNix
|
)
|
||||||
|
{
|
||||||
|
src = ./.;
|
||||||
|
}).shellNix
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
{lib,...}@inputs: let
|
{ lib, ... }@inputs:
|
||||||
config = {
|
let
|
||||||
hungtr.metadata = {
|
config = {
|
||||||
|
hungtr.metadata = { };
|
||||||
|
"hungtr@bao".metadata = {
|
||||||
|
ssh_pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK+1+gps6phbZboIb9fH51VNPUCkhSSOAbkI3tq3Ou0Z";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
"hungtr@bao".metadata = {
|
in
|
||||||
ssh_pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK+1+gps6phbZboIb9fH51VNPUCkhSSOAbkI3tq3Ou0Z";
|
{
|
||||||
};
|
homeConfigurations = { };
|
||||||
};
|
|
||||||
in {
|
|
||||||
homeConfigurations = {};
|
|
||||||
pubKeys = lib.getPubkey config;
|
pubKeys = lib.getPubkey config;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue