Skip to content

Commit 74ea995

Browse files
committed
hosts: add pi
1 parent 8ae82fb commit 74ea995

File tree

3 files changed

+172
-0
lines changed

3 files changed

+172
-0
lines changed

hosts/default.nix

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,16 @@ in
3333
specialArgs = { inherit inputs; };
3434
};
3535

36+
pi = nixpkgs.lib.nixosSystem rec {
37+
system = "aarch64-linux";
38+
pkgs = mkPkgs {
39+
inherit nixpkgs system;
40+
overlay = (final: prev: {});
41+
};
42+
modules = [ ./pi ];
43+
specialArgs = { inherit inputs; };
44+
};
45+
3646
capivaras = stable.lib.nixosSystem rec {
3747
system = "aarch64-linux";
3848
pkgs = mkPkgs {

hosts/pi/default.nix

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
# Edit this configuration file to define what should be installed on
2+
# your system. Help is available in the configuration.nix(5) man page, on
3+
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
4+
5+
{
6+
config,
7+
lib,
8+
pkgs,
9+
...
10+
}:
11+
12+
{
13+
imports = [
14+
# Include the results of the hardware scan.
15+
./hardware-configuration.nix
16+
../../modules/common/autoUpgrade.nix
17+
../../modules/common/nix.nix
18+
../../modules/common/openssh.nix
19+
../../modules/common/user.nix
20+
];
21+
22+
# Use the extlinux boot loader. (NixOS wants to enable GRUB by default)
23+
boot.loader.grub.enable = false;
24+
# Enables the generation of /boot/extlinux/extlinux.conf
25+
boot.loader.generic-extlinux-compatible.enable = true;
26+
27+
networking.hostName = "pi"; # Define your hostname.
28+
29+
# Configure network connections interactively with nmcli or nmtui.
30+
networking.networkmanager.enable = true;
31+
32+
# Set your time zone.
33+
time.timeZone = "America/Sao_Paulo";
34+
35+
# Configure network proxy if necessary
36+
# networking.proxy.default = "http://user:password@proxy:port/";
37+
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
38+
39+
# Select internationalisation properties.
40+
# i18n.defaultLocale = "en_US.UTF-8";
41+
# console = {
42+
# font = "Lat2-Terminus16";
43+
# keyMap = "us";
44+
# useXkbConfig = true; # use xkb.options in tty.
45+
# };
46+
47+
# Enable the X11 windowing system.
48+
# services.xserver.enable = true;
49+
50+
# Configure keymap in X11
51+
# services.xserver.xkb.layout = "us";
52+
# services.xserver.xkb.options = "eurosign:e,caps:escape";
53+
54+
# Enable CUPS to print documents.
55+
# services.printing.enable = true;
56+
57+
# Enable sound.
58+
# services.pulseaudio.enable = true;
59+
# OR
60+
# services.pipewire = {
61+
# enable = true;
62+
# pulse.enable = true;
63+
# };
64+
65+
# Enable touchpad support (enabled default in most desktopManager).
66+
# services.libinput.enable = true;
67+
68+
# Define a user account. Don't forget to set a password with ‘passwd’.
69+
# users.users.alice = {
70+
# isNormalUser = true;
71+
# extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
72+
# packages = with pkgs; [
73+
# tree
74+
# ];
75+
# };
76+
77+
# programs.firefox.enable = true;
78+
79+
# List packages installed in system profile.
80+
# You can use https://search.nixos.org/ to find more packages (and options).
81+
# environment.systemPackages = with pkgs; [
82+
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
83+
# wget
84+
# ];
85+
86+
# Some programs need SUID wrappers, can be configured further or are
87+
# started in user sessions.
88+
# programs.mtr.enable = true;
89+
# programs.gnupg.agent = {
90+
# enable = true;
91+
# enableSSHSupport = true;
92+
# };
93+
94+
# List services that you want to enable:
95+
96+
# Enable the OpenSSH daemon.
97+
services.openssh.enable = true;
98+
99+
# Open ports in the firewall.
100+
# networking.firewall.allowedTCPPorts = [ ... ];
101+
# networking.firewall.allowedUDPPorts = [ ... ];
102+
# Or disable the firewall altogether.
103+
# networking.firewall.enable = false;
104+
105+
# Copy the NixOS configuration file and link it from the resulting system
106+
# (/run/current-system/configuration.nix). This is useful in case you
107+
# accidentally delete configuration.nix.
108+
# system.copySystemConfiguration = true;
109+
110+
# This option defines the first version of NixOS you have installed on this particular machine,
111+
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
112+
#
113+
# Most users should NEVER change this value after the initial install, for any reason,
114+
# even if you've upgraded your system to a new NixOS release.
115+
#
116+
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
117+
# so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
118+
# to actually do that.
119+
#
120+
# This value being lower than the current NixOS release does NOT mean your system is
121+
# out of date, out of support, or vulnerable.
122+
#
123+
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
124+
# and migrated your data accordingly.
125+
#
126+
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
127+
system.stateVersion = "25.11"; # Did you read the comment?
128+
129+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
config,
3+
lib,
4+
pkgs,
5+
modulesPath,
6+
...
7+
}:
8+
9+
{
10+
imports = [
11+
(modulesPath + "/installer/scan/not-detected.nix")
12+
];
13+
14+
boot.initrd.availableKernelModules = [
15+
"xhci_pci"
16+
"usbhid"
17+
"uas"
18+
];
19+
boot.initrd.kernelModules = [ ];
20+
boot.kernelModules = [ ];
21+
boot.extraModulePackages = [ ];
22+
23+
fileSystems."/" = {
24+
device = "/dev/disk/by-uuid/305ef5bb-7f87-4b35-ad0f-1302f155fcd4";
25+
fsType = "ext4";
26+
};
27+
28+
swapDevices = [
29+
{ device = "/dev/disk/by-uuid/a780e585-2dfd-4ee1-b3c7-e14929015645"; }
30+
];
31+
32+
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
33+
}

0 commit comments

Comments
 (0)