bebop: Initial config
bebop is the Raspberry Pi hanging around my table utterly unused for close to a year now. About time it saw some use as tiny home server.
This commit is contained in:
parent
970fd0a259
commit
bad999e00b
3 changed files with 110 additions and 10 deletions
35
flake.lock
35
flake.lock
|
@ -22,11 +22,11 @@
|
|||
},
|
||||
"emacs-overlay": {
|
||||
"locked": {
|
||||
"lastModified": 1649128109,
|
||||
"narHash": "sha256-KYj8bJJJDdo1jH4+Au6hrEBlXg+0pPtpOWp1WoLDqxA=",
|
||||
"lastModified": 1649874862,
|
||||
"narHash": "sha256-OWsZbVrs/sJOW5CSSRh2AsW6yFr/zrjFazuaD+e4Kyk=",
|
||||
"owner": "nix-community",
|
||||
"repo": "emacs-overlay",
|
||||
"rev": "d32cf21820f0c14bb4dc7911e4d8d81b891a8f82",
|
||||
"rev": "46353b3bce539bd99eace5584f804320661ec18a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -42,11 +42,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1649130493,
|
||||
"narHash": "sha256-tp2UxeS1A5ESb+I/rh4GoD0DH7edOGdc2fsP6D8o27Y=",
|
||||
"lastModified": 1649887921,
|
||||
"narHash": "sha256-h2LZzn5LLwIFvVFLCdR8+VWluEP3U1I5y+0mDZjFjAk=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "07b941f0c45ac4af6732d96f4cb6142824eee3df",
|
||||
"rev": "92f58b6728e7c631a7ea0ed68cd21bb29a4876ff",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -55,6 +55,22 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixos-hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1649849514,
|
||||
"narHash": "sha256-zQyTr2UebTKUh1KLyLtevhHsM8umPK1LfQLGUGjRjiQ=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "1a0ccdbf4583ed0fce37eea7955e8ef90f840a9f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "master",
|
||||
"repo": "nixos-hardware",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
@ -77,11 +93,11 @@
|
|||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1649012074,
|
||||
"narHash": "sha256-vQUROcJ3FfT3GTB/nJrXwVvjuq8WfK0ImN+RUgDVN1c=",
|
||||
"lastModified": 1649809588,
|
||||
"narHash": "sha256-f6sgDj9A8FXTVyA2zkxA66YX+j6BftxE9VHTeIMhEKE=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "bc4b9eef3ce3d5a90d8693e8367c9cbfc9fc1e13",
|
||||
"rev": "ff9efb0724de5ae0f9db9df2debefced7eb1571d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -96,6 +112,7 @@
|
|||
"agenix": "agenix",
|
||||
"emacs-overlay": "emacs-overlay",
|
||||
"home-manager": "home-manager",
|
||||
"nixos-hardware": "nixos-hardware",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-unstable": "nixpkgs-unstable"
|
||||
}
|
||||
|
|
23
flake.nix
23
flake.nix
|
@ -19,9 +19,10 @@
|
|||
url = "github:ryantm/agenix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, home-manager, emacs-overlay, agenix, ... }: {
|
||||
outputs = { self, nixpkgs, home-manager, emacs-overlay, agenix, nixos-hardware, ... }: {
|
||||
nixosConfigurations = {
|
||||
enterprise = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
|
@ -55,6 +56,26 @@
|
|||
|
||||
];
|
||||
};
|
||||
|
||||
bebop = nixpkgs.lib.nixosSystem {
|
||||
system = "aarch64-linux";
|
||||
modules = [
|
||||
|
||||
# Common
|
||||
./nix.nix
|
||||
./cachix.nix
|
||||
|
||||
# Modules and module config
|
||||
# agenix.nixosModules.age
|
||||
# ./modules/agenix.nix
|
||||
|
||||
# Host-specific config
|
||||
nixos-hardware.nixosModules.raspberry-pi-4
|
||||
# ./hosts/bebop/fish.nix
|
||||
# ./hosts/bebop/backup.nix
|
||||
./hosts/bebop/configuration.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
62
hosts/bebop/configuration.nix
Normal file
62
hosts/bebop/configuration.nix
Normal file
|
@ -0,0 +1,62 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
user = "payas";
|
||||
password = "guest";
|
||||
SSID = "mywifi";
|
||||
SSIDpassword = "mypassword";
|
||||
interface = "wlan0";
|
||||
hostname = "bebop";
|
||||
in
|
||||
{
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "/dev/disk/by-label/NIXOS_SD";
|
||||
fsType = "ext4";
|
||||
options = [ "noatime" ];
|
||||
};
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = hostname;
|
||||
wireless = {
|
||||
enable = true;
|
||||
networks."${SSID}".psk = SSIDpassword;
|
||||
interfaces = [ interface ];
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
neovim
|
||||
git
|
||||
ripgrep
|
||||
jq
|
||||
fd
|
||||
|
||||
direnv
|
||||
nix-direnv
|
||||
];
|
||||
|
||||
services.openssh.enable = true;
|
||||
|
||||
users = {
|
||||
# mutableUsers = false;
|
||||
users."${user}" = {
|
||||
isNormalUser = true;
|
||||
password = password;
|
||||
extraGroups = [ "wheel" ];
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPziuF0B4Vj/W434rpshcvQu2KieXjGc8HnwymLapyLu nixos@enterprise"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# Enable GPU acceleration
|
||||
hardware.raspberry-pi."4".fkms-3d.enable = true;
|
||||
|
||||
# services.xserver = {
|
||||
# enable = true;
|
||||
# displayManager.lightdm.enable = true;
|
||||
# desktopManager.lxqt.enable = true;
|
||||
# };
|
||||
}
|
Reference in a new issue