diff --git a/flake.lock b/flake.lock index 86e63cb..c38e837 100644 --- a/flake.lock +++ b/flake.lock @@ -89,13 +89,29 @@ "url": "https://git.lix.systems/lix-project/nixos-module/archive/2.91.1-1.tar.gz" } }, + "nixos-hardware": { + "locked": { + "lastModified": 1735388221, + "narHash": "sha256-e5IOgjQf0SZcFCEV/gMGrsI0gCJyqOKShBQU0iiM3Kg=", + "owner": "NixOS", + "repo": "nixos-hardware", + "rev": "7c674c6734f61157e321db595dbfcd8523e04e19", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "master", + "repo": "nixos-hardware", + "type": "github" + } + }, "nixpkgs": { "locked": { - "lastModified": 1735531152, - "narHash": "sha256-As8I+ebItDKtboWgDXYZSIjGlKeqiLBvjxsQHUmAf1Q=", + "lastModified": 1735922141, + "narHash": "sha256-vk0xwGZSlvZ/596yxOtsk4gxsIx2VemzdjiU8zhjgWw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3ffbbdbac0566a0977da3d2657b89cbcfe9a173b", + "rev": "d29ab98cd4a70a387b8ceea3e930b3340d41ac5a", "type": "github" }, "original": { @@ -109,6 +125,7 @@ "inputs": { "home-manager": "home-manager", "lix-module": "lix-module", + "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs" } }, diff --git a/flake.nix b/flake.nix index 4b4200e..80868de 100644 --- a/flake.nix +++ b/flake.nix @@ -1,6 +1,7 @@ { inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; + nixos-hardware.url = "github:NixOS/nixos-hardware/master"; home-manager = { url = "github:nix-community/home-manager/release-24.11"; @@ -19,6 +20,7 @@ nixpkgs, home-manager, lix-module, + nixos-hardware, }: { nixosConfigurations = @@ -27,6 +29,7 @@ inherit nixpkgs; inherit home-manager; inherit lix-module; + inherit nixos-hardware; common-modules = [ lix-module.nixosModules.default ./common diff --git a/hosts/ona-book/default.nix b/hosts/ona-book/default.nix index 36a2a5c..2231494 100644 --- a/hosts/ona-book/default.nix +++ b/hosts/ona-book/default.nix @@ -2,36 +2,45 @@ nixpkgs, common-modules, desktop-modules, + nixos-hardware, + home-manager, ... }: nixpkgs.lib.nixosSystem { system = "x86_64-linux"; - modules = - common-modules - ++ desktop-modules - ++ [ - ./hardware.nix - ../../home/gnome.nix - ../../users/ronja.nix - ../../modules/gnome.nix + modules = common-modules ++ [ + home-manager.nixosModules.home-manager + ../../home + ../../modules/desktop-environment.nix - { - networking.hostName = "ona-book"; - services.xserver.xkb = { - layout = "us"; - options = "eurosign:e,caps:escape"; - }; - } + nixos-hardware.nixosModules.apple-macbook-pro-14-1 + { allowedUnfreePackages = [ "b43-firmware" ]; } - { - home-manager.users.ronja = import ../../home/ronja; + ./hardware.nix + ../../home/gnome.nix + ../../users/ronja.nix + ../../modules/gnome.nix - users.users.ronja.openssh.authorizedKeys.keys = [ - ]; - } + { + networking = { + hostName = "ona-book"; + networkmanager.enable = true; + }; + services.xserver.xkb = { + layout = "us"; + options = "eurosign:e,caps:escape"; + }; + } - { + { + home-manager.users.ronja = import ../../home/ronja; - } - ]; + users.users.ronja.openssh.authorizedKeys.keys = [ + ]; + } + + { + + } + ]; } diff --git a/hosts/ona-book/hardware.nix b/hosts/ona-book/hardware.nix index 3a1601b..bf4fdc4 100644 --- a/hosts/ona-book/hardware.nix +++ b/hosts/ona-book/hardware.nix @@ -20,8 +20,24 @@ "sd_mod" ]; initrd.kernelModules = [ ]; - kernelModules = [ "kvm-intel" ]; + kernelModules = [ + "kvm-intel" + "snd_hda_codec_cs8409" + "hci_uart" + "bluetooth" + "btbcm" + ]; extraModulePackages = [ ]; + blacklistedKernelModules = [ ]; + kernelParams = []; + loader = { + efi.canTouchEfiVariables = true; + systemd-boot = { + enable = true; + editor = false; # do not allow changing kernel parameters + consoleMode = "max"; + }; + }; }; fileSystems = { @@ -53,5 +69,11 @@ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + + hardware.enableAllFirmware = true; + nixpkgs.config.allowUnfree = true; + hardware.enableRedistributableFirmware = true; + + hardware.facetimehd.enable = true; }; } diff --git a/hosts/vinzenz-lpt2/default.nix b/hosts/vinzenz-lpt2/default.nix index 7114544..c2944b1 100644 --- a/hosts/vinzenz-lpt2/default.nix +++ b/hosts/vinzenz-lpt2/default.nix @@ -21,7 +21,10 @@ nixpkgs.lib.nixosSystem { ../../modules/podman.nix { - networking.hostName = "vinzenz-lpt2"; + networking = { + hostName = "vinzenz-lpt2"; + networkmanager.enable = true; + }; nix.settings.extra-platforms = [ "aarch64-linux" "i686-linux" diff --git a/hosts/vinzenz-pc2/default.nix b/hosts/vinzenz-pc2/default.nix index c90e3ec..707457a 100644 --- a/hosts/vinzenz-pc2/default.nix +++ b/hosts/vinzenz-pc2/default.nix @@ -20,7 +20,10 @@ nixpkgs.lib.nixosSystem { ../../modules/printing.nix ../../modules/podman.nix { - networking.hostName = "vinzenz-pc2"; + networking = { + hostName = "vinzenz-pc2"; + networkmanager.enable = true; + }; nix.settings.extra-platforms = [ "aarch64-linux" "i686-linux" diff --git a/modules/desktop-environment.nix b/modules/desktop-environment.nix index 7ac36ae..cf860e5 100644 --- a/modules/desktop-environment.nix +++ b/modules/desktop-environment.nix @@ -58,8 +58,6 @@ }; networking = { - networkmanager.enable = true; - firewall = { allowedTCPPortRanges = [ {