From 6741cf73c4126f711e8a081de7f051fd554c37d6 Mon Sep 17 00:00:00 2001 From: Theo Hahn Date: Sun, 20 Sep 2026 14:25:56 +0200 Subject: [PATCH] working flake --- config/hypr/hyprland.lua | 8 +++--- configuration.nix | 32 ++++++++++++------------ flake.lock | 53 +++++++++++++++++++++++++++++++--------- flake.nix | 10 +++++--- home.nix | 4 ++- justfile | 2 +- 6 files changed, 72 insertions(+), 37 deletions(-) diff --git a/config/hypr/hyprland.lua b/config/hypr/hyprland.lua index fc8f507..703e033 100644 --- a/config/hypr/hyprland.lua +++ b/config/hypr/hyprland.lua @@ -50,11 +50,9 @@ local menu = "hyprlauncher" -- Autostart necessary processes (like notifications daemons, status bars, etc.) -- Or execute your favorite apps at launch like this: -- --- hl.on("hyprland.start", function () --- hl.exec_cmd(terminal) --- hl.exec_cmd("nm-applet") --- hl.exec_cmd("waybar & hyprpaper & firefox") --- end) +hl.on("hyprland.start", function () + hl.exec_cmd("ashell") +end) ------------------------------- diff --git a/configuration.nix b/configuration.nix index 4d096e8..95326ad 100644 --- a/configuration.nix +++ b/configuration.nix @@ -8,7 +8,7 @@ imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix - "${builtins.fetchGit { url = "https://github.com/NixOS/nixos-hardware.git"; }}/apple/t2" + # "${builtins.fetchGit { url = "https://github.com/NixOS/nixos-hardware.git"; }}/apple/t2" ]; # Use the systemd-boot EFI boot loader. @@ -19,18 +19,23 @@ networking.hostName = "tnix"; # Define your hostname. services.upower.enable = true; - hardware.firmware = [ - (pkgs.stdenvNoCC.mkDerivation (final: { - name = "brcm-firmware"; - src = "./firmware/brcm"; - phases = [ "installPhase" ]; - installPhase = '' - mkdir -p $out/lib/firmware/brcm - cp -r ./. "$out/lib/firmware/brcm" - ''; - })) + nix.settings.experimental-features = [ + "nix-command" + "flakes" ]; + # hardware.firmware = [ + # (pkgs.stdenvNoCC.mkDerivation (final: { + # name = "brcm-firmware"; + # src = "./firmware/brcm"; + # phases = [ "installPhase" ]; + # installPhase = '' + # mkdir -p $out/lib/firmware/brcm + # cp -r ./. "$out/lib/firmware/brcm" + # ''; + # })) + # ]; + # Configure network connections interactively with nmcli or nmtui. networking.networkmanager.enable = true; @@ -105,11 +110,6 @@ # 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. # diff --git a/flake.lock b/flake.lock index 81bb43d..0bd4f38 100644 --- a/flake.lock +++ b/flake.lock @@ -7,32 +7,62 @@ ] }, "locked": { - "lastModified": 1789267039, - "narHash": "sha256-LWiBv9yAYFi2LPbUhDGHPGKYskJQjj2fw12OlyO1uQo=", + "lastModified": 1789867870, + "narHash": "sha256-sOag/7DTqw4tXLI7UxjrZxPGV+dlTe6zFtJn0VSkgFM=", "owner": "nix-community", "repo": "home-manager", - "rev": "ec172013fa62135f58fb58dd17ae9651e8f39727", + "rev": "d2a22a3659a6ae99847ea9176114f6957b8ac62e", "type": "github" }, "original": { "owner": "nix-community", - "ref": "release-26.05", "repo": "home-manager", "type": "github" } }, + "nixos-hardware": { + "inputs": { + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1789752250, + "narHash": "sha256-q0J27mJDfd4BM9a7KcMVbcRmqyU+goQwudbMIu66qsg=", + "owner": "nixos", + "repo": "nixos-hardware", + "rev": "b2d7d02644f0002535a3bb51a73780945cdc7ba4", + "type": "github" + }, + "original": { + "owner": "nixos", + "repo": "nixos-hardware", + "type": "github" + } + }, "nixpkgs": { "locked": { - "lastModified": 1789749394, - "narHash": "sha256-cFTsMQz8Hzn8MT49oaeLSHg62tE86NykugCWkeM2ypk=", - "owner": "nixos", + "lastModified": 1789546076, + "narHash": "sha256-vWkSk5bbfTqdtMoSgD9FshACO8JCvXTFi+3cqEp0mH0=", + "rev": "b1b875982b17dabde9b4a37f3e229e74913e6db3", + "type": "tarball", + "url": "https://releases.nixos.org/nixos/unstable/nixos-26.11pre1074753.b1b875982b17/nixexprs.tar.xz" + }, + "original": { + "type": "tarball", + "url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1781577229, + "narHash": "sha256-lrp67w8AulE9Ks53n27I45ADSzbOCn4H+CNW1Ck8B+8=", + "owner": "NixOS", "repo": "nixpkgs", - "rev": "cf9d2fb3e50fa1cd5114c47505ea9177f7ff5f49", + "rev": "567a49d1913ce81ac6e9582e3553dd90a955875f", "type": "github" }, "original": { - "owner": "nixos", - "ref": "nixos-26.05", + "owner": "NixOS", + "ref": "567a49d", "repo": "nixpkgs", "type": "github" } @@ -40,7 +70,8 @@ "root": { "inputs": { "home-manager": "home-manager", - "nixpkgs": "nixpkgs" + "nixos-hardware": "nixos-hardware", + "nixpkgs": "nixpkgs_2" } } }, diff --git a/flake.nix b/flake.nix index 8c27efc..581cfec 100644 --- a/flake.nix +++ b/flake.nix @@ -2,19 +2,23 @@ description = "tNixOS configuration"; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-26.05"; + nixpkgs.url = "github:NixOS/nixpkgs/567a49d"; + home-manager = { - url = "github:nix-community/home-manager/release-26.05"; + url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; + + nixos-hardware.url = "github:nixos/nixos-hardware"; }; - outputs = inputs@{ nixpkgs, home-manager, ... }: { + outputs = inputs@{ nixpkgs, home-manager, nixos-hardware, ... }: { nixosConfigurations = { tnix = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ ./configuration.nix + nixos-hardware.nixosModules.apple-t2 ./home.nix home-manager.nixosModules.home-manager diff --git a/home.nix b/home.nix index 1d9a264..b0140d7 100644 --- a/home.nix +++ b/home.nix @@ -21,10 +21,12 @@ ashell kitty hyprlauncher + + nil ]; programs.bash.enable = true; - home.stateVersion = "26.05"; + home.stateVersion = "26.11"; }; } diff --git a/justfile b/justfile index cf8977f..29230eb 100644 --- a/justfile +++ b/justfile @@ -6,7 +6,7 @@ install: sudo nixos-install rebuild: - sudo nixos-rebuild switch --flake .#tnix --impure + sudo nixos-rebuild switch --flake .#tnix setup: ln -sf ~/tnixos/config/hypr ~/.config/hypr