2
0
Fork 0
forked from pub-solar/os

neo: init on aarch64-linux

This commit is contained in:
teutat3s 2025-03-10 22:59:30 +01:00 committed by teutat3s
parent 8b20f4b533
commit dc7cb7e273
Signed by: teutat3s
GPG key ID: 4FA1D3FA524F22C1
15 changed files with 351 additions and 27 deletions

2
.gitignore vendored
View file

@ -11,3 +11,5 @@ pkgs/_sources/.shake*
tags
/owners
results

42
flake.lock generated
View file

@ -242,6 +242,31 @@
"type": "github"
}
},
"nixos-apple-silicon": {
"inputs": {
"flake-compat": [
"flake-compat"
],
"nixpkgs": [
"nixpkgs"
],
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1738646032,
"narHash": "sha256-57BdBE9anNpIpf48EiTVLGxg4mOQ04XjHCEP0gLTsFA=",
"owner": "tpwrules",
"repo": "nixos-apple-silicon",
"rev": "e77031211944723a38bebc043e48847c36e43668",
"type": "github"
},
"original": {
"owner": "tpwrules",
"ref": "releasep2-2024-12-25",
"repo": "nixos-apple-silicon",
"type": "github"
}
},
"nixos-hardware": {
"locked": {
"lastModified": 1743167577,
@ -299,12 +324,29 @@
"lix-module": "lix-module",
"nix-darwin": "nix-darwin",
"nix-direnv": "nix-direnv",
"nixos-apple-silicon": "nixos-apple-silicon",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs",
"unstable": "unstable",
"watson": "watson"
}
},
"rust-overlay": {
"flake": false,
"locked": {
"lastModified": 1686795910,
"narHash": "sha256-jDa40qRZ0GRQtP9EMZdf+uCbvzuLnJglTUI2JoHfWDc=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "5c2b97c0a9bc5217fc3dfb1555aae0fb756d99f9",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,

View file

@ -46,6 +46,10 @@
watson.url = "github:pub-solar/watson";
watson.inputs.nixpkgs.follows = "nixpkgs";
watson.inputs.flake-parts.follows = "flake-parts";
nixos-apple-silicon.url = "github:tpwrules/nixos-apple-silicon?ref=releasep2-2024-12-25";
nixos-apple-silicon.inputs.nixpkgs.follows = "nixpkgs";
nixos-apple-silicon.inputs.flake-compat.follows = "flake-compat";
};
outputs =

View file

@ -66,6 +66,28 @@
];
};
neo = self.inputs.nixpkgs.lib.nixosSystem {
specialArgs = {
flake = {
inherit self inputs config;
};
};
modules = [
self.nixosModules.base
./neo
inputs.nixos-apple-silicon.nixosModules.default
self.nixosModules.teutat3s
self.nixosModules.audio
self.nixosModules.bluetooth
self.nixosModules.desktop-extended
self.nixosModules.docker
self.nixosModules.graphical
#self.nixosModules.nextcloud
#self.nixosModules.office
#self.nixosModules.printing
];
};
fae = self.inputs.nixpkgs.lib.nixosSystem {
specialArgs = {
flake = {

View file

@ -0,0 +1,30 @@
### Input configuration
#
# You can get the names of your inputs by running: swaymsg -t get_inputs
# Read `man 5 sway-input` for more information about this section.
input "type:keyboard" {
xkb_layout us(intl),de
xkb_model pc105
xkb_options ctrl:nocaps
}
input "type:touchpad" {
tap enabled
natural_scroll enabled
# Disable while typing
dwt enabled
}
# Screen brightness controls
bindsym XF86MonBrightnessUp exec "brightnessctl set +10%"
bindsym XF86MonBrightnessDown exec "brightnessctl set 10%-"
# Pulse Audio controls
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%; exec pactl set-sink-mute @DEFAULT_SINK@ 0 #increase sound volume
bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%; exec pactl set-sink-mute @DEFAULT_SINK@ 0 #decrease sound volume
bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle # mute sound
# Media player controls
bindsym XF86AudioPlay exec "playerctl play-pause; notify-send 'Play/Pause'"
bindsym XF86AudioNext exec "playerctl next; notify-send 'Next'"
bindsym XF86AudioPrev exec "playerctl previous; notify-send 'Prev.'"

7
hosts/neo/default.nix Normal file
View file

@ -0,0 +1,7 @@
{ ... }:
{
imports = [
./neo.nix
./hardware-configuration.nix
];
}

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,39 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "usb_storage" "sdhci_pci" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/914e73e5-596f-409e-933a-9b29a7047ace";
fsType = "ext4";
};
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/2022c72f-e309-4f8b-b591-03ca89a5cb49";
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/84BE-1608";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
swapDevices = [ ];
# 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
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.wlan0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
}

166
hosts/neo/neo.nix Normal file
View file

@ -0,0 +1,166 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
{ config, lib, pkgs, ... }:
let
psCfg = config.pub-solar;
in
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
pub-solar.terminal-life.full = true;
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = false;
boot.kernelParams = [
"hid_apple.fnmode=2"
];
# Specify path to peripheral firmware files
hardware.asahi = {
peripheralFirmwareDirectory = ./firmware;
withRust = true;
useExperimentalGPUDriver = true;
experimentalGPUInstallMode = "replace";
setupAsahiSound = true;
};
# Enable udev rules for gnupg smart cards
hardware.gpgSmartcards.enable = true;
#hardware.keyboard.uhk.enable = true;
networking.hostName = "neo"; # Define your hostname.
services.fstrim.enable = true;
home-manager =
pkgs.lib.setAttrByPath
[
"users"
psCfg.user.name
]
{
# Custom device sway configs
xdg.configFile = {
#"sway/config.d/10-applications.conf".source = ./.config/sway/config.d/applications.conf;
#"sway/config.d/autostart.conf".source = ./.config/sway/config.d/autostart.conf;
#"sway/config.d/10-custom-keybindings.conf".source = ./.config/sway/config.d/custom-keybindings.conf;
"sway/config.d/input-defaults.conf".source = ./.config/sway/config.d/input-defaults.conf;
#"sway/config.d/screens.conf".source = ./.config/sway/config.d/screens.conf;
};
};
# 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.
# Set your time zone.
#time.timeZone = "Europe/Berlin";
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Select internationalisation properties.
# i18n.defaultLocale = "en_US.UTF-8";
# console = {
# font = "Lat2-Terminus16";
# keyMap = "us";
# useXkbConfig = true; # use xkb.options in tty.
# };
# Enable the X11 windowing system.
# services.xserver.enable = true;
#programs.sway.enable = true;
# Configure keymap in X11
# services.xserver.xkb.layout = "us";
# services.xserver.xkb.options = "eurosign:e,caps:escape";
# Enable CUPS to print documents.
# services.printing.enable = true;
# Enable sound.
# hardware.pulseaudio.enable = true;
# OR
# services.pipewire = {
# enable = true;
# pulse.enable = true;
# };
# Enable touchpad support (enabled default in most desktopManager).
# services.libinput.enable = true;
# Define a user account. Don't forget to set a password with passwd.
#users.users.nixos = {
# isNormalUser = true;
# extraGroups = [ "wheel" ]; # Enable sudo for the user.
# packages = with pkgs; [
# tree
# ];
#};
# programs.firefox.enable = true;
# List packages installed in system profile. To search, run:
# $ nix search wget
#environment.systemPackages = with pkgs; [
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
# wget
#];
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
# List services that you want to enable:
# Enable the OpenSSH daemon.
# services.openssh.enable = true;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# Copy the NixOS configuration file and link it from the resulting system
# (/run/current-system/configuration.nix). This is useful in case you
# accidentally delete configuration.nix.
# system.copySystemConfiguration = true;
# This option defines the first version of NixOS you have installed on this particular machine,
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
#
# Most users should NEVER change this value after the initial install, for any reason,
# even if you've upgraded your system to a new NixOS release.
#
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
# so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
# to actually do that.
#
# This value being lower than the current NixOS release does NOT mean your system is
# out of date, out of support, or vulnerable.
#
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
# and migrated your data accordingly.
#
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
system.stateVersion = "24.11"; # Did you read the comment?
}

View file

@ -23,7 +23,7 @@ final: prev: {
meta = with prev.lib; {
homepage = "https://github.com/TritonDataCenter/prr";
description = "Tooling to assist with GitHub pull requests";
platforms = [ "x86_64-linux" ];
platforms = [ "x86_64-linux" "aarch64-linux" ];
maintainers = with maintainers; [ teutat3s ];
};
};

View file

@ -11,7 +11,7 @@
fetchSubmodules = true;
deepClone = false;
leaveDotGit = true;
sha256 = "sha256-Sm+Vt4FI+OAEFSKTp0ddIaZVqoa4ICitNcD6xFx2TL4=";
sha256 = "sha256-+rb/yUjTdZOtrDLENTkkujYWhTKMcS3spFgxQVZmNh8=";
};
date = "2024-04-20";
};

View file

@ -3,6 +3,7 @@ let
machines = {
dumpyourvms = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILDATEWAgDZFfYs1ZPh33Kg4sqQ9tWMVKyk8XqFu3Koe host@dumpyourvms";
ryzensun = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH/l7MfEmt510BMeNjuXNPmZ0brcQidvrrpcea+qJMjX root@ryzensun";
neo = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO1zkA1CMuEnnYwdThDxcDp5uPB33L+m8AEom+F8sAHY root@neo";
fae = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINP3xI8c8+SI5QPTHqR0YIwKvG8x2MJGC/arBu4BkCP0 root@fae";
};
users = {
@ -12,6 +13,7 @@ let
allKeys = [
machines.dumpyourvms
machines.ryzensun
machines.neo
users.teutat3s
users.teutat3s-5-nfc
];

View file

@ -64,23 +64,28 @@ in
inherit pkgs;
};
home.packages = with pkgs; [
AusweisApp2
drone-docker-runner
gpu-switch
ifmetric
ipmitool
thunderbird-128
veracrypt
age-plugin-yubikey
#cockroach-bin
obs-studio
scan2paperless
wlvncc
uhk-agent
restic
notes
];
home.packages =
with pkgs;
[
AusweisApp2
drone-docker-runner
gpu-switch
ifmetric
ipmitool
thunderbird-128
veracrypt
age-plugin-yubikey
#cockroach-bin
scan2paperless
wlvncc
restic
notes
]
++ lib.optionals stdenv.hostPlatform.isLinux
&& stdenv.hostPlatform.isx86_64 [
obs-studio
uhk-agent
];
programs.bash.initExtra = ''
source ${config.age.secrets.environment-secrets.path}

View file

@ -44,14 +44,19 @@ in
psCfg.user.name
]
{
home.packages = with pkgs; [
zoom-us
slack
notion-repackaged
prr
tmate
jira-cli-go
];
home.packages =
with pkgs;
[
prr
tmate
jira-cli-go
]
++ lib.optionals stdenv.hostPlatform.isLinux
&& stdenv.hostPlatform.isx86_64 [
zoom-us
slack
notion-repackaged
];
};
};
}