mirror of
https://codeberg.org/muon/home.git
synced 2026-03-08 03:25:16 +00:00
Add musk
This commit is contained in:
parent
ece28c8164
commit
4dcef2c6c6
7 changed files with 346 additions and 0 deletions
|
|
@ -67,6 +67,9 @@
|
||||||
# work
|
# work
|
||||||
murk = utils.mkHost ./hosts/murk/configuration.nix;
|
murk = utils.mkHost ./hosts/murk/configuration.nix;
|
||||||
|
|
||||||
|
# work desktop
|
||||||
|
musk = utils.mkHost ./hosts/musk/configuration.nix;
|
||||||
|
|
||||||
# lenovo
|
# lenovo
|
||||||
muvo = utils.mkHost ./hosts/muvo/configuration.nix;
|
muvo = utils.mkHost ./hosts/muvo/configuration.nix;
|
||||||
|
|
||||||
|
|
|
||||||
117
hosts/musk/configuration.nix
Normal file
117
hosts/musk/configuration.nix
Normal file
|
|
@ -0,0 +1,117 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
system,
|
||||||
|
sources,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.mods;
|
||||||
|
keys = [
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKEio+Y5wBVD1wILaH2R3wV10FvVjiqy/4gGBWHOITTB muon@muon"
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKevYmkH7xvYoquBjnYZ7PJiVqf+GOh9fxAJBN6wZGBB gin4@hi.is"
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILmAOd9VbhyJeibt6Vrb101MNTk5W8+rh94Djv/C+pyu muon@muho"
|
||||||
|
];
|
||||||
|
in {
|
||||||
|
# Hardware
|
||||||
|
imports = [
|
||||||
|
./hardware-configuration.nix
|
||||||
|
"${
|
||||||
|
builtins.fetchTarball {
|
||||||
|
url = "https://github.com/nix-community/disko/archive/refs/tags/v1.12.0.tar.gz";
|
||||||
|
sha256 = "0wbx518d2x54yn4xh98cgm65wvj0gpy6nia6ra7ns4j63hx14fkq";
|
||||||
|
}
|
||||||
|
}/module.nix"
|
||||||
|
./disk-config.nix
|
||||||
|
# (inputs.nixpkgs
|
||||||
|
# + "/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
environment.systemPackages = with inputs.nix-alien.packages.${system}; [
|
||||||
|
nix-alien
|
||||||
|
pkgs.libratbag
|
||||||
|
pkgs.piper
|
||||||
|
pkgs.libpq
|
||||||
|
pkgs.qmk
|
||||||
|
pkgs.jq
|
||||||
|
pkgs.wireguard-tools
|
||||||
|
pkgs.opencode
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.binfmt = {
|
||||||
|
emulatedSystems = ["aarch64-linux"];
|
||||||
|
preferStaticEmulators = true; # Make it work with Docker
|
||||||
|
};
|
||||||
|
|
||||||
|
# System
|
||||||
|
mods.user.name = "muon";
|
||||||
|
networking.hostName = "musk";
|
||||||
|
networking.hostId = "a2309091";
|
||||||
|
mods.home.file = ./home.nix;
|
||||||
|
nix.settings.trusted-users = ["root" "muon"];
|
||||||
|
users.users.muon.extraGroups = ["docker"];
|
||||||
|
|
||||||
|
# Modules
|
||||||
|
mods.desktop.enable = true;
|
||||||
|
mods.boot.enable = true;
|
||||||
|
|
||||||
|
mods.theme.enable = true;
|
||||||
|
mods.theme.scheme = "woodland";
|
||||||
|
mods.theme.wallpaper = ./wallpaper.png;
|
||||||
|
|
||||||
|
services.xserver.windowManager.i3.enable = true;
|
||||||
|
# mods.desktop.wayland.enable = true;
|
||||||
|
|
||||||
|
mods.impermanence.enable = true;
|
||||||
|
|
||||||
|
virtualisation.docker.enable = true;
|
||||||
|
|
||||||
|
users.users.muon.openssh.authorizedKeys.keys = keys;
|
||||||
|
users.users.root.openssh.authorizedKeys.keys = keys;
|
||||||
|
|
||||||
|
# Persist
|
||||||
|
environment.persistence."/persist" = {
|
||||||
|
directories = ["/etc/NetworkManager" "/var/lib/NetworkManager"];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Hardware preferences
|
||||||
|
environment.variables = {
|
||||||
|
WINIT_HIDPI_FACTOR = "1";
|
||||||
|
WINIT_X11_SCALE_FACTOR = "1";
|
||||||
|
};
|
||||||
|
|
||||||
|
## Monitors
|
||||||
|
mods.monitors = {
|
||||||
|
primary = {
|
||||||
|
name = "DP-1";
|
||||||
|
config = {
|
||||||
|
enable = true;
|
||||||
|
mode = "2560x1440";
|
||||||
|
position = "0x0";
|
||||||
|
rate = "60.00";
|
||||||
|
dpi = 72;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
right = {
|
||||||
|
name = "HDMI-1";
|
||||||
|
config = {
|
||||||
|
enable = true;
|
||||||
|
mode = "2560x1440";
|
||||||
|
position = "2560x0";
|
||||||
|
rate = "60.00";
|
||||||
|
dpi = 72;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
## Mouse
|
||||||
|
services.libinput.mouse.accelProfile = "flat";
|
||||||
|
|
||||||
|
## Keyboard
|
||||||
|
hardware.keyboard.qmk.enable = true;
|
||||||
|
|
||||||
|
# Version of first install
|
||||||
|
system.stateVersion = "23.05";
|
||||||
|
}
|
||||||
72
hosts/musk/disk-config.nix
Normal file
72
hosts/musk/disk-config.nix
Normal file
|
|
@ -0,0 +1,72 @@
|
||||||
|
{
|
||||||
|
disko.devices = {
|
||||||
|
disk = {
|
||||||
|
main = {
|
||||||
|
type = "disk";
|
||||||
|
device = "/dev/sda";
|
||||||
|
content = {
|
||||||
|
type = "gpt";
|
||||||
|
partitions = {
|
||||||
|
ESP = {
|
||||||
|
size = "512M";
|
||||||
|
type = "EF00";
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = "vfat";
|
||||||
|
mountpoint = "/boot";
|
||||||
|
mountOptions = [ "umask=0077" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
luks = {
|
||||||
|
size = "100%";
|
||||||
|
content = {
|
||||||
|
type = "luks";
|
||||||
|
name = "crypted";
|
||||||
|
# disable settings.keyFile if you want to use interactive password entry
|
||||||
|
#passwordFile = "/tmp/secret.key"; # Interactive
|
||||||
|
# settings = {
|
||||||
|
# allowDiscards = true;
|
||||||
|
# keyFile = "/tmp/secret.key";
|
||||||
|
# };
|
||||||
|
# additionalKeyFiles = [ "/tmp/additionalSecret.key" ];
|
||||||
|
content = {
|
||||||
|
type = "btrfs";
|
||||||
|
extraArgs = [ "-f" ];
|
||||||
|
subvolumes = {
|
||||||
|
"/root" = {
|
||||||
|
mountpoint = "/";
|
||||||
|
mountOptions = [ "compress=zstd" "noatime" ];
|
||||||
|
};
|
||||||
|
"/home" = {
|
||||||
|
mountpoint = "/home";
|
||||||
|
mountOptions = [ "compress=zstd" "noatime" ];
|
||||||
|
};
|
||||||
|
"/nix" = {
|
||||||
|
mountpoint = "/nix";
|
||||||
|
mountOptions = [ "compress=zstd" "noatime" ];
|
||||||
|
};
|
||||||
|
"/persist" = {
|
||||||
|
mountpoint = "/persist";
|
||||||
|
mountOptions = [ "compress=zstd" "noatime" ];
|
||||||
|
};
|
||||||
|
"/log" = {
|
||||||
|
mountpoint = "/var/log";
|
||||||
|
mountOptions = [ "compress=zstd" "noatime" ];
|
||||||
|
};
|
||||||
|
"/swap" = {
|
||||||
|
mountpoint = "/swap";
|
||||||
|
swap.swapfile.size = "4G";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/persist".neededForBoot = true;
|
||||||
|
fileSystems."/var/log".neededForBoot = true;
|
||||||
|
}
|
||||||
18
hosts/musk/hardware-configuration.nix
Normal file
18
hosts/musk/hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
# 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 = [ "xhci_pci" "ahci" "nvme" "usbhid" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
||||||
82
hosts/musk/home.nix
Normal file
82
hosts/musk/home.nix
Normal file
|
|
@ -0,0 +1,82 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
osConfig,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = osConfig.mods;
|
||||||
|
in {
|
||||||
|
# Modules
|
||||||
|
mods.xdg.enable = true;
|
||||||
|
mods.i3.enable = true;
|
||||||
|
# mods.hyprland.enable = true;
|
||||||
|
mods.terminal.zsh.enable = true;
|
||||||
|
mods.terminal.emulator.enable = true;
|
||||||
|
mods.terminal.development.enable = true;
|
||||||
|
mods.terminal.tools.enable = true;
|
||||||
|
mods.desktop.development.enable = true;
|
||||||
|
mods.desktop.productivity.enable = false;
|
||||||
|
mods.zen.enable = true;
|
||||||
|
|
||||||
|
home.packages = with pkgs;
|
||||||
|
[
|
||||||
|
thunderbird
|
||||||
|
pulseaudio
|
||||||
|
pavucontrol
|
||||||
|
alsa-utils
|
||||||
|
rustdesk-flutter
|
||||||
|
|
||||||
|
# tools
|
||||||
|
docker
|
||||||
|
fish
|
||||||
|
devenv
|
||||||
|
dbeaver-bin
|
||||||
|
ruff
|
||||||
|
just
|
||||||
|
go
|
||||||
|
rainfrog
|
||||||
|
tealdeer
|
||||||
|
gh
|
||||||
|
(callPackage ./packages/mender-cli.nix {})
|
||||||
|
]
|
||||||
|
# Non-free </3
|
||||||
|
++ [google-cloud-sdk google-cloud-sql-proxy];
|
||||||
|
|
||||||
|
# Hardware preferences
|
||||||
|
## Monitors
|
||||||
|
xsession.windowManager.i3.config.workspaceOutputAssign = [
|
||||||
|
{
|
||||||
|
workspace = "1";
|
||||||
|
output = "${cfg.monitors.primary.name}";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
workspace = "2";
|
||||||
|
output = "${cfg.monitors.right.name}";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
services.autorandr.enable = true;
|
||||||
|
programs.autorandr = {
|
||||||
|
enable = true;
|
||||||
|
hooks.postswitch = {
|
||||||
|
"notify-i3" = "${pkgs.i3}/bin/i3-msg restart";
|
||||||
|
"set-wallpaper" = ''
|
||||||
|
${lib.getExe pkgs.feh} --bg-fill --nofehbg ${./wallpaper.png}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
profiles.default = {
|
||||||
|
fingerprint = {
|
||||||
|
"${cfg.monitors.right.name}" = "00ffffffffffff0030aef465010101011e1e0103803c22782a31d5a65453a0240a5054bfcf00d1c0d100b300a9c09500818081c08100e973006aa0a034504220680055502100001a565e00a0a0a029503020350055502100001a000000fd00304b0f6e1e000a202020202020000000fc00513237712d31300a202020202001ff020329f04b10050403021f1413121101230907078301000067030c001000183c681a00000101304b00023a801871382d40582c450055502100001e662156aa51001e30468f330055502100001eab22a0a050841a303020360055502100001a7c2e90a0601a1e403020360055502100001a000000000000000000000000000026";
|
||||||
|
"${cfg.monitors.primary.name}" = "00ffffffffffff0005e30427b11a0000321f0104a53c22783be445a554529e260d5054bfef00d1c0b30095008180814081c001010101565e00a0a0a029503020350055502100001e000000ff005141424d434841303036383333000000fc00513237563447350a2020202020000000fd00304b72721e010a2020202020200163020318f14b0103051404131f120211902309070783010000a073006aa0a029500820350055502100001a2a4480a0703827403020350055502100001a023a801871382d40582c450055502100001ef03c00d051a0355060883a0055502100001c000000000000000000000000000000000000000000000000000000000000005f";
|
||||||
|
};
|
||||||
|
config = {
|
||||||
|
"${cfg.monitors.primary.name}" = cfg.monitors.primary.config;
|
||||||
|
"${cfg.monitors.right.name}" = cfg.monitors.right.config;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Version of first install
|
||||||
|
home.stateVersion = "23.05";
|
||||||
|
}
|
||||||
54
hosts/musk/packages/mender-cli.nix
Normal file
54
hosts/musk/packages/mender-cli.nix
Normal file
|
|
@ -0,0 +1,54 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
stdenv,
|
||||||
|
buildGoModule,
|
||||||
|
fetchFromGitHub,
|
||||||
|
makeWrapper,
|
||||||
|
installShellFiles,
|
||||||
|
xz,
|
||||||
|
go,
|
||||||
|
}:
|
||||||
|
buildGoModule rec {
|
||||||
|
pname = "mender-cli";
|
||||||
|
version = "1.12.0";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "mendersoftware";
|
||||||
|
repo = "mender-cli";
|
||||||
|
rev = version;
|
||||||
|
sha256 = "sha256-Pf87wTHXcFlnYsgx7ieiIJ9PWJFPUkFJYTkKJKmMFEQ=";
|
||||||
|
};
|
||||||
|
|
||||||
|
vendorHash = "sha256-MqyBa+wsbuXqtM4DL/QGBUWuEYlG8BRxIXq7O1LJUyM=";
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
makeWrapper
|
||||||
|
installShellFiles
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
xz
|
||||||
|
];
|
||||||
|
|
||||||
|
allowGoReference = true;
|
||||||
|
|
||||||
|
postFixup = ''
|
||||||
|
wrapProgram "$out/bin/mender-cli" \
|
||||||
|
--prefix PATH : ${go}/bin
|
||||||
|
'';
|
||||||
|
|
||||||
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||||
|
installShellCompletion --cmd mender-cli \
|
||||||
|
--bash <($out/bin/mender-cli completion bash) \
|
||||||
|
--fish <($out/bin/mender-cli completion fish) \
|
||||||
|
--zsh <($out/bin/mender-cli completion zsh) \
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Mender CLI tool to simplify integration between the Mender server and cloud services like continuous integration (CI)/build automation";
|
||||||
|
mainProgram = "mender-cli";
|
||||||
|
homepage = "https://github.com/mendersoftware/mender-cli/";
|
||||||
|
changelog = "https://github.com/mendersoftware/mender-cli/releases/tag/${version}";
|
||||||
|
license = lib.licenses.asl20;
|
||||||
|
};
|
||||||
|
}
|
||||||
BIN
hosts/musk/wallpaper.png
Normal file
BIN
hosts/musk/wallpaper.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 19 MiB |
Loading…
Add table
Add a link
Reference in a new issue