From 0bd148997c6be6449e9f4e46a712455aa062fb38 Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Wed, 3 Sep 2025 09:45:48 -0700 Subject: [PATCH] Update to flakes on liminal --- framework/configuration.nix | 99 ++++++++++++++------------- framework/flake.lock | 133 ++++++++++++++++++++++++++++++++++++ framework/flake.nix | 42 ++++++++++++ 3 files changed, 228 insertions(+), 46 deletions(-) create mode 100644 framework/flake.lock create mode 100644 framework/flake.nix diff --git a/framework/configuration.nix b/framework/configuration.nix index b5d0f0a..7cc33f3 100644 --- a/framework/configuration.nix +++ b/framework/configuration.nix @@ -1,41 +1,12 @@ # Config for framework16 -{ config, pkgs, lib, ... }: - -let - nixos-hardware = builtins.fetchTarball "https://github.com/NixOS/nixos-hardware/archive/master.tar.gz"; - impermanence = builtins.fetchTarball "https://github.com/nix-community/impermanence/archive/master.tar.gz"; - unstable = import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz") { - config = config.nixpkgs.config; - overlays = config.nixpkgs.overlays; - }; - #unstable = import nixos-unstable { - # #config = config.nixpkgs.config; - # inherit (pkgs) system; - #}; - #hp15c = pkgs.callPackage ./pkgs/hp15c/default.nix { inherit unstable; }; - #nonpareil = pkgs.callPackage ./pkgs/nonpareil/default.nix { inherit pkgs; }; - #custom1Password = pkgs.symlinkJoin { - # name = "1password-gui-custom"; - # paths = [ unstable._1password-gui ]; - # buildInputs = [ pkgs.makeWrapper ]; - # postBuild = '' - # # Create directory for our custom policy - # mkdir -p $out/share/polkit-1/actions/ - - # # Copy the original policy file - # cp ${unstable._1password-gui}/share/polkit-1/actions/com.1password.1Password.policy $out/share/polkit-1/actions/ - - # # Modify the policy file to add the annotation - # sed -i '//,/<\/action>/ s|<\/defaults>|<\/defaults>\n unix-user:hunner<\/annotate>|' $out/share/polkit-1/actions/com.1password.1Password.policy - # ''; - #}; -in -{ +{ config, pkgs, lib, nixos-hardware, impermanence, talon-nix, ... }: + { imports = [ - "${nixos-hardware}/framework/16-inch/7040-amd" + nixos-hardware.nixosModules.framework-16-7040-amd ./hardware-configuration.nix - "${impermanence}/nixos.nix" + impermanence.nixosModules.impermanence + talon-nix.nixosModules.talon ]; boot = { @@ -87,6 +58,7 @@ in networking.extraHosts = '' 127.0.0.1 keycloak + 127.0.0.1 k3d-cmvm ''; environment.persistence."/persist" = { @@ -135,6 +107,12 @@ in extraOptions = "--storage-driver=overlay2"; }; programs.hyprland.enable = true; + programs.hyprland.xwayland.enable = false; + programs.hyprland.withUWSM = true; + programs.hyprlock.enable = true; + services.hypridle.enable = true; + programs.waybar.enable = true; + environment.sessionVariables.NIXOS_OZONE_WL = "1"; # hint electron apps to use wayland programs.zsh.enable = true; services.openssh.enable = true; services.openssh.settings.PermitRootLogin = "yes"; @@ -174,6 +152,7 @@ in extraPortals = [ pkgs.xdg-desktop-portal-wlr pkgs.xdg-desktop-portal-gtk + #pkgs.xdg-desktop-portal-hyprland ]; }; @@ -232,8 +211,8 @@ in pass diff-so-fancy webex - unstable.zed-editor - unstable.package-version-server + pkgs.unstable.zed-editor + pkgs.unstable.package-version-server amdgpu_top nixd # for zed rust-analyzer # for zed @@ -241,11 +220,28 @@ in rustc # for zed rustup # for zed gcc # for zed - ruff # for zed + #ruff # for zed goose-cli teams-for-linux claude-code neofetch + eww + hyprpaper # for hyprland + hyprcursor # for hyprland + nordzy-icon-theme + nordzy-cursor-theme + wl-clipboard + onlyoffice-desktopeditors + calibre + clipse + plex-desktop + signal-desktop + flyctl + dtach + gromit-mpx + urbanterror + ghostty + talon-nix.packages.${pkgs.system}.default ]; }; systemd.user.services = { @@ -297,6 +293,7 @@ in powertop alacritty rofi + wofi xlockmore dzen2 arandr @@ -311,7 +308,7 @@ in hsetroot redshift flameshot - unstable.code-cursor + pkgs.unstable.code-cursor pwvucontrol pamixer helvum @@ -319,12 +316,18 @@ in #nonpareil framework-tool kitty # for Hyprland + kdePackages.dolphin # file browser in hyprland + cliphist restic xscreensaver unzip scarlett2 alsa-scarlett-gui - ndi + pkgs.unstable.ndi-6 + xdg-utils + btrbk + devenv + lsof ]; services.clipmenu.enable = true; @@ -341,27 +344,26 @@ in }; programs.direnv = { enable = true; - #package = unstable.direnv; nix-direnv.enable = true; #nix-direnv.package = unstable.nix-direnv; }; programs._1password = { enable = true; - #package = unstable._1password-cli; }; programs._1password-gui = { enable = true; - #package = unstable._1password-gui; polkitPolicyOwners = [ "hunner" ]; }; programs.obs-studio = { enable = true; + package = pkgs.unstable.obs-studio; enableVirtualCamera = true; - plugins = with pkgs.obs-studio-plugins; [ + plugins = with pkgs.unstable.obs-studio-plugins; [ wlrobs obs-backgroundremoval obs-pipewire-audio-capture - obs-ndi + #obs-ndi + distroav ]; }; @@ -369,7 +371,10 @@ in nerd-fonts.droid-sans-mono nerd-fonts.liberation nerd-fonts.jetbrains-mono + nerd-fonts.sauce-code-pro + nerd-fonts.symbols-only liberation_ttf + font-awesome ]; # Some programs need SUID wrappers, can be configured further or are @@ -379,6 +384,7 @@ in # enable = true; # enableSSHSupport = true; # }; + services.pcscd.enable = true; # List services that you want to enable: @@ -386,8 +392,8 @@ in # services.openssh.enable = true; # Open ports in the firewall. - # networking.firewall.allowedTCPPorts = [ ... ]; - # networking.firewall.allowedUDPPorts = [ ... ]; + networking.firewall.allowedTCPPorts = [ 8080 8081 8082 ]; + networking.firewall.allowedUDPPorts = [ 8080 8081 8082 ]; # Or disable the firewall altogether. # networking.firewall.enable = false; systemd.services.upower.enable = true; @@ -424,6 +430,7 @@ in flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo ''; }; + systemd.services."user@".serviceConfig.Delegate = "cpu io memory pids cpuset"; services.fprintd.enable = true; #security.pam.services = { diff --git a/framework/flake.lock b/framework/flake.lock new file mode 100644 index 0000000..175eb51 --- /dev/null +++ b/framework/flake.lock @@ -0,0 +1,133 @@ +{ + "nodes": { + "impermanence": { + "locked": { + "lastModified": 1737831083, + "narHash": "sha256-LJggUHbpyeDvNagTUrdhe/pRVp4pnS6wVKALS782gRI=", + "owner": "nix-community", + "repo": "impermanence", + "rev": "4b3e914cdf97a5b536a889e939fb2fd2b043a170", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "impermanence", + "type": "github" + } + }, + "nix-github-actions": { + "inputs": { + "nixpkgs": [ + "talon-nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1693660503, + "narHash": "sha256-B/g2V4v6gjirFmy+I5mwB2bCYc0l3j5scVfwgl6WOl8=", + "owner": "nix-community", + "repo": "nix-github-actions", + "rev": "bd5bdbb52350e145c526108f4ef192eb8e554fa0", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nix-github-actions", + "type": "github" + } + }, + "nixos-hardware": { + "locked": { + "lastModified": 1756750488, + "narHash": "sha256-e4ZAu2sjOtGpvbdS5zo+Va5FUUkAnizl4wb0/JlIL2I=", + "owner": "NixOS", + "repo": "nixos-hardware", + "rev": "47eb4856cfd01eaeaa7bb5944a0f27db8fb9b94a", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixos-hardware", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1756886854, + "narHash": "sha256-6tooT142NLcFjt24Gi4B0G1pgWLvfw7y93sYEfSHlLI=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "0e6684e6c5755325f801bda1751a8a4038145d7d", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-25.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-unstable": { + "locked": { + "lastModified": 1756787288, + "narHash": "sha256-rw/PHa1cqiePdBxhF66V7R+WAP8WekQ0mCDG4CFqT8Y=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "d0fc30899600b9b3466ddb260fd83deb486c32f1", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1756787288, + "narHash": "sha256-rw/PHa1cqiePdBxhF66V7R+WAP8WekQ0mCDG4CFqT8Y=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "d0fc30899600b9b3466ddb260fd83deb486c32f1", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "impermanence": "impermanence", + "nixos-hardware": "nixos-hardware", + "nixpkgs": "nixpkgs", + "nixpkgs-unstable": "nixpkgs-unstable", + "talon-nix": "talon-nix" + } + }, + "talon-nix": { + "inputs": { + "nix-github-actions": "nix-github-actions", + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1746431176, + "narHash": "sha256-bwXLFy2pDpNE60EkVltrmiRgwNWLo4eYBesP997p8mg=", + "owner": "nix-community", + "repo": "talon-nix", + "rev": "cc110629c5f0be12e839b2aea6a16880f1822706", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "talon-nix", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/framework/flake.nix b/framework/flake.nix new file mode 100644 index 0000000..3fcffce --- /dev/null +++ b/framework/flake.nix @@ -0,0 +1,42 @@ +{ + description = "NixOS configuration for liminal (Framework 16)"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05"; + nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; + + nixos-hardware.url = "github:NixOS/nixos-hardware"; + impermanence.url = "github:nix-community/impermanence"; + talon-nix.url = "github:nix-community/talon-nix"; + }; + + outputs = { self, nixpkgs, nixpkgs-unstable, nixos-hardware, impermanence, talon-nix, ... }: + let + system = "x86_64-linux"; + + # Create unstable overlay + overlay-unstable = final: prev: { + unstable = import nixpkgs-unstable { + inherit system; + config.allowUnfree = true; + }; + }; + in + { + nixosConfigurations.liminal = nixpkgs.lib.nixosSystem { + inherit system; + + specialArgs = { + inherit nixos-hardware impermanence talon-nix; + }; + + modules = [ + # Add unstable overlay + ({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; }) + + # Import configuration + ./configuration.nix + ]; + }; + }; +}