1
0
Fork 0

WIP: adsb-antenna system

This commit is contained in:
Daniel Kempkens 2022-08-01 22:39:14 +02:00
parent ac9f82f5c2
commit 03c64e4f94
8 changed files with 194 additions and 5 deletions

View file

@ -35,19 +35,35 @@
outputs = inputs@{ self, ... }:
let
config-Styx = import ./system/flakes/Styx.nix {
Styx = import ./system/flakes/Styx.nix {
inherit (inputs) nixpkgs;
inherit (inputs) home-manager;
inherit (inputs) darwin;
inherit inputs;
};
config-sail = import ./system/flakes/sail.nix {
sail = import ./system/flakes/sail.nix {
inherit (inputs) nixpkgs;
inherit (inputs) home-manager;
inherit (inputs) arion;
inherit inputs;
};
adsb-antenna = import ./system/flakes/adsb-antenna.nix {
inherit (inputs) nixpkgs;
inherit (inputs) home-manager;
inherit (inputs) arion;
inherit inputs;
};
in
config-Styx // config-sail;
{
darwinConfigurations = {
"Styx" = Styx.system;
};
nixosConfigurations = {
sail = sail.system;
adsb-antenna = adsb-antenna.system;
};
};
}

View file

@ -0,0 +1,28 @@
{ config, lib, pkgs, modulesPath, ... }:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot = {
initrd = {
availableKernelModules = [ "xhci_pci" "usbhid" ];
kernelModules = [ ];
};
kernelModules = [ ];
extraModulePackages = [ ];
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888";
fsType = "ext4";
};
swapDevices = [ ];
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.eth0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlan0.useDHCP = lib.mkDefault true;
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
}

View file

@ -0,0 +1,26 @@
{ pkgs, ... }:
{
imports = [
../programs/fish.nix
../programs/starship.nix
../programs/nvim
../programs/git.nix
../programs/bat.nix
../programs/fzf.nix
../programs/jq.nix
];
home = {
stateVersion = "22.11";
packages = with pkgs; [
ripgrep
];
};
}

Binary file not shown.

View file

@ -21,7 +21,7 @@ let
};
in
{
darwinConfigurations."Styx" = darwin.lib.darwinSystem {
system = darwin.lib.darwinSystem {
system = "aarch64-darwin";
modules = [
../hosts/Styx.nix

View file

@ -0,0 +1,46 @@
{ nixpkgs, home-manager, arion, inputs, ... }:
let
overlay-arion = arion.overlay;
overlay-neovim = inputs.neovim-nightly-overlay.overlay;
overlay-zig = _: prev: { zigpkgs = inputs.zig-overlay.packages.${prev.system}; };
overlay-nifoc = inputs.nifoc-overlay.overlay;
nixpkgsConfig = {
overlays = [
overlay-arion
overlay-neovim
overlay-zig
overlay-nifoc
];
config = {
allowUnfree = true;
allowBroken = true;
};
};
in
{
system = nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
modules = [
({
nixpkgs.overlays = nixpkgsConfig.overlays;
nixpkgs.config = nixpkgsConfig.config;
})
arion.nixosModules.arion
../hosts/adsb-antenna.nix
home-manager.nixosModules.home-manager
{
nixpkgs = nixpkgsConfig;
nix.nixPath = [ "nixpkgs=${nixpkgs}" ];
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.daniel = import ../../home/hosts/adsb-antenna.nix;
}
];
};
}

View file

@ -21,7 +21,7 @@ let
};
in
{
nixosConfigurations.sail = nixpkgs.lib.nixosSystem {
system = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
({

View file

@ -0,0 +1,73 @@
{ pkgs, ... }:
let
secret = import ../../secret/hosts/adsb-antenna.nix;
ssh-keys = import ../shared/ssh-keys.nix;
in
{
imports = [
../../hardware/hosts/adsb-antenna.nix
../nixos/ssh.nix
../nixos/git.nix
];
nix = {
package = pkgs.nixFlakes;
binaryCaches = [
"https://nix-community.cachix.org"
];
binaryCachePublicKeys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
extraOptions = ''
experimental-features = nix-command flakes
keep-derivations = true
keep-outputs = true
auto-optimise-store = true
'';
};
boot = {
loader = {
grub.enable = false;
generic-extlinux-compatible.enable = true;
};
cleanTmpDir = true;
};
networking = {
hostName = "adsb-antenna";
dhcpcd.denyInterfaces = [ "veth*" ];
timeServers = [
"ntp1.hetzner.de"
"ntp2.hetzner.com"
"ntp3.hetzner.net"
"time.cloudflare.com"
];
};
programs.fish.enable = true;
users.users = {
root = {
openssh.authorizedKeys.keys = [ ssh-keys.LAN ];
};
daniel = {
hashedPassword = secret.users.daniel.hashedPassword;
isNormalUser = true;
home = "/home/daniel";
description = "Daniel";
extraGroups = [ "wheel" ];
shell = pkgs.fish;
openssh.authorizedKeys.keys = [ ssh-keys.LAN ];
};
};
}