From dfc0391d27c23d2051ec7ef1166c3585ad44be38 Mon Sep 17 00:00:00 2001 From: tristan Date: Thu, 3 Apr 2025 17:05:52 +0100 Subject: [PATCH] framework: install --- flake.nix | 13 ++++++ hardware/framework-14.nix | 88 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 101 insertions(+) create mode 100644 hardware/framework-14.nix diff --git a/flake.nix b/flake.nix index f52a96d..cf9da0f 100644 --- a/flake.nix +++ b/flake.nix @@ -68,6 +68,19 @@ ]; }; + framework-14 = mkConf { + nixos-modules = [ + ./hardware/framework-14.nix + ./nixos/workstation.nix + ./nixos/modules/work.nix + ./nixos/programs/hyprland.nix + ]; + home-modules = [ + ./home/programs/work.nix + ./home/programs/graphical.nix + ]; + }; + alpine = mkConf { nixos-modules = [ ./hardware/alpine.nix diff --git a/hardware/framework-14.nix b/hardware/framework-14.nix new file mode 100644 index 0000000..d093b25 --- /dev/null +++ b/hardware/framework-14.nix @@ -0,0 +1,88 @@ +# 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" "thunderbolt" "nvme" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/745ff46c-6fec-44cf-97eb-40ced0442b0d"; + fsType = "btrfs"; + options = [ "subvol=@root" ]; + }; + + boot.initrd.luks.devices."crypted".device = "/dev/disk/by-uuid/84ad0e15-0056-4d46-801d-7735c2c6a5f6"; + + fileSystems."/home" = + { device = "/dev/disk/by-uuid/745ff46c-6fec-44cf-97eb-40ced0442b0d"; + fsType = "btrfs"; + options = [ "subvol=@home" ]; + }; + + fileSystems."/nix" = + { device = "/dev/disk/by-uuid/745ff46c-6fec-44cf-97eb-40ced0442b0d"; + fsType = "btrfs"; + options = [ "subvol=@nix" ]; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/9EA1-04BB"; + fsType = "vfat"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/b22fb59e-3882-4acc-b7cd-d24916ae3c63"; } + ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp166s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + + + networking.hostName = "framework-14"; + + system.stateVersion = "24.11"; # do not change + home-manager.users.${config.user}.imports = [ + { + home.stateVersion = "24.11"; + + wayland.windowManager.hyprland = { + settings = { + bind = [ + "SUPER_SHIFT, Q, killactive," + ]; + }; + extraConfig = '' + device { + name = at-translated-set-2-keyboard + kb_variant = dvorak, + kb_layout = gb,gb + kb_options = grp:alt_shift_toggle,caps:escape + } + ''; + }; + } + ]; + + + + + + +} + +