Initial framework setup
Some checks are pending
Some checks are pending
This commit is contained in:
parent
99061b65da
commit
da0c64baea
2 changed files with 138 additions and 0 deletions
37
homes/x86_64-linux/alejandro@framework/default.nix
Normal file
37
homes/x86_64-linux/alejandro@framework/default.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{ lib, pkgs, ... }:
|
||||
let
|
||||
|
||||
internal_display_settings = "eDP-1,preferred,auto,1";
|
||||
clamshell_script = pkgs.writeShellScriptBin "clamshell" ''
|
||||
if ${pkgs.hyprland}/bin/hyprctl monitors | ${pkgs.ripgrep}/bin/rg -q '\sDP-'; then
|
||||
if [[ "$1" == "open" ]]; then
|
||||
${pkgs.hyprland}/bin/hyprctl keyword monitor ${internal_display_settings}
|
||||
else
|
||||
${pkgs.hyprland}/bin/hyprctl keyword monitor "eDP-1,disable"
|
||||
fi
|
||||
fi
|
||||
'';
|
||||
in
|
||||
{
|
||||
aa.isHeadless = false;
|
||||
aa.windowManagers.sway.clamshell.enable = true;
|
||||
aa.programs.opencode.enable = true;
|
||||
aa.windowManagers.hyprland = {
|
||||
enable = true;
|
||||
monitor = [
|
||||
"eDP-1,preferred,auto,1"
|
||||
"desc:Dell Inc. DELL U4025QW BH2F734,3440x1440,auto,1"
|
||||
",preferred,auto,1"
|
||||
];
|
||||
};
|
||||
aa.services.hypridle.suspendInhibitWhenPluggedIn = true;
|
||||
aa.windowManagers.sway.enable = lib.mkForce false;
|
||||
|
||||
wayland.windowManager.hyprland.settings.bindl = [
|
||||
", switch:off:Lid Switch, exec, ${clamshell_script}/bin/clamshell open"
|
||||
", switch:on:Lid Switch, exec, ${clamshell_script}/bin/clamshell close"
|
||||
];
|
||||
|
||||
catppuccin.zathura.enable = true;
|
||||
programs.zathura.enable = true;
|
||||
}
|
||||
101
systems/x86_64-linux/framework/default.nix
Normal file
101
systems/x86_64-linux/framework/default.nix
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
{ inputs, pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
# ./hardware-configuration-zfs.nix
|
||||
# ./zfs.nix
|
||||
inputs.nixos-hardware.nixosModules.framework-13-7040-amd
|
||||
];
|
||||
|
||||
aa = {
|
||||
nix = {
|
||||
enable = true;
|
||||
useSelfhostedCache = true;
|
||||
remoteBuilder.client.enable = false;
|
||||
};
|
||||
|
||||
archetypes.workstation.enable = true;
|
||||
|
||||
# services.printing.enable = true;
|
||||
services.tailscale = {
|
||||
enable = true;
|
||||
configureClientRouting = true;
|
||||
};
|
||||
|
||||
hardware.audio.enable = true;
|
||||
hardware.bluetooth.enable = true;
|
||||
hardware.tlp.enable = true;
|
||||
|
||||
# system.zfs.enable = true;
|
||||
apps.yubikey.enable = true;
|
||||
|
||||
user.extraGroups = [
|
||||
"dialout"
|
||||
"video"
|
||||
];
|
||||
};
|
||||
|
||||
virtualisation = {
|
||||
docker = {
|
||||
enable = true;
|
||||
storageDriver = "overlay2";
|
||||
rootless = {
|
||||
enable = true;
|
||||
setSocketVariable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = "framework";
|
||||
networkmanager.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
};
|
||||
|
||||
# This service is problematic
|
||||
# See: https://github.com/NixOS/nixpkgs/issues/180175
|
||||
systemd.services.NetworkManager-wait-online.enable = false;
|
||||
|
||||
# services.tlp.settings = {
|
||||
# USB_DENYLIST = "0000:1111 2222:3333 4444:5555";
|
||||
# };
|
||||
# Still need to run `nix run nixpkgs#bolt -- enroll DEVICE_UUID`
|
||||
services.hardware.bolt.enable = true;
|
||||
|
||||
time.timeZone = "America/Los_Angeles";
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
pavucontrol
|
||||
# android-tools
|
||||
# sanoid
|
||||
# # Below 3 installed for sanoid
|
||||
# pv
|
||||
# lzop
|
||||
# mbuffer
|
||||
|
||||
# wireguard-tools
|
||||
|
||||
chromium
|
||||
# prusa-slicer
|
||||
traceroute
|
||||
gnumake
|
||||
hugo
|
||||
nixos-generators
|
||||
vlc
|
||||
signal-desktop
|
||||
# zoom-us
|
||||
];
|
||||
environment.pathsToLink = [
|
||||
"/share/applications"
|
||||
"/share/xdg-desktop-portal"
|
||||
];
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "25.05"; # Did you read the comment?
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue