❄️ Nix configurations
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

smaller modifications and refactoring

+40 -37
+5
README.md
··· 6 6 For Home-Manager on Linux 7 7 ```shell 8 8 home-manager switch --flake .#alex 9 + ``` 10 + 11 + For NixOS 12 + ```shell 13 + sudo nixos-rebuild switch --flake .#otter --impure 9 14 ```
+22 -18
nixos/otter/configuration.nix
··· 1 - # Edit this configuration file to define what should be installed on 2 - # your system. Help is available in the configuration.nix(5) man page 3 - # and in the NixOS manual (accessible by running ‘nixos-help’). 4 - 5 1 { config, pkgs, inputs, ... }: 6 2 7 3 { 8 - imports = 9 - [ # Include the results of the hardware scan. 4 + imports = [ # Include the results of the hardware scan. 10 5 ./hardware-configuration.nix 11 6 12 7 inputs.nixos-hardware.nixosModules.framework-13-7040-amd 13 - ]; 8 + ]; 9 + 10 + hardware.enableRedistributableFirmware = true; 11 + boot.kernelPackages = pkgs.linuxKernel.packages.linux_zen; 14 12 15 13 # Bootloader. 16 14 boot.loader.systemd-boot.enable = true; 17 15 boot.loader.efi.canTouchEfiVariables = true; 18 16 19 17 boot.initrd.luks.devices."luks-cd4e7e78-243a-4091-90dd-9ee091fbb27d".device = "/dev/disk/by-uuid/cd4e7e78-243a-4091-90dd-9ee091fbb27d"; 20 - networking.hostName = "nixos"; # Define your hostname. 18 + networking.hostName = "otter"; 19 + 21 20 # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. 21 + 22 + # Configure the governor used to regulate the frequency of the available CPUs. 23 + powerManagement.cpuFreqGovernor = "powersave"; 24 + 22 25 23 26 # Framework quirks 24 27 hardware.framework.amd-7040.preventWakeOnAC = true; ··· 96 99 isNormalUser = true; 97 100 description = "Alex"; 98 101 extraGroups = [ "networkmanager" "wheel" ]; 99 - packages = with pkgs; [ 100 - # thunderbird 101 - ]; 102 + packages = with pkgs; []; 102 103 }; 103 104 104 105 # Install firefox. ··· 135 136 # Or disable the firewall altogether. 136 137 # networking.firewall.enable = false; 137 138 138 - # This value determines the NixOS release from which the default 139 - # settings for stateful data, like file locations and database versions 140 - # on your system were taken. It‘s perfectly fine and recommended to leave 141 - # this value at the release version of the first install of this system. 142 - # Before changing this value read the documentation for this option 143 - # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). 144 - system.stateVersion = "24.05"; # Did you read the comment? 139 + services.logind = { 140 + powerKey = "suspend-then-hibernate"; 141 + lidSwitch = "suspend-then-hibernate"; 142 + lidSwitchExternalPower = "suspend"; 143 + extraConfig = '' 144 + PowerKeyIgnoreInhibited=yes 145 + LidSwitchIgnoreInhibited=no 146 + ''; 147 + }; 145 148 149 + system.stateVersion = "24.05"; 146 150 }
+13 -19
nixos/otter/hardware-configuration.nix
··· 1 - # Do not modify this file! It was generated by ‘nixos-generate-config’ 2 - # and may be overwritten by future invocations. Please make changes 3 - # to /etc/nixos/configuration.nix instead. 4 1 { config, lib, pkgs, modulesPath, ... }: 5 2 6 3 { 7 - imports = 8 - [ 9 - (modulesPath + "/installer/scan/not-detected.nix") 10 - ]; 4 + imports = [ 5 + (modulesPath + "/installer/scan/not-detected.nix") 6 + ]; 11 7 12 8 boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod" ]; 13 9 boot.initrd.kernelModules = [ ]; 14 10 boot.kernelModules = [ "kvm-amd" ]; 15 11 boot.extraModulePackages = [ ]; 16 12 17 - fileSystems."/" = 18 - { device = "/dev/disk/by-uuid/d03072f3-9413-401e-b2dd-31589f3b4a05"; 19 - fsType = "ext4"; 20 - }; 13 + fileSystems."/" = { 14 + device = "/dev/disk/by-uuid/d03072f3-9413-401e-b2dd-31589f3b4a05"; 15 + fsType = "ext4"; 16 + }; 21 17 22 18 boot.initrd.luks.devices."luks-d2d68a53-c760-44db-bfd6-cc508e7f8406".device = "/dev/disk/by-uuid/d2d68a53-c760-44db-bfd6-cc508e7f8406"; 23 19 24 - fileSystems."/boot" = 25 - { device = "/dev/disk/by-uuid/CF41-F52D"; 26 - fsType = "vfat"; 27 - options = [ "fmask=0077" "dmask=0077" ]; 28 - }; 20 + fileSystems."/boot" = { 21 + device = "/dev/disk/by-uuid/CF41-F52D"; 22 + fsType = "vfat"; 23 + options = [ "fmask=0077" "dmask=0077" ]; 24 + }; 29 25 30 - swapDevices = 31 - [ { device = "/dev/disk/by-uuid/767cf96c-be48-473d-b7a7-15fa1cb7a3f2"; } 32 - ]; 26 + swapDevices = [ { device = "/dev/disk/by-uuid/767cf96c-be48-473d-b7a7-15fa1cb7a3f2"; } ]; 33 27 34 28 # Enables DHCP on each ethernet and wireless interface. In case of scripted networking 35 29 # (the default) this is the recommended approach. When using systemd-networkd it's