Created
March 21, 2024 07:43
-
-
Save nozense/73e77dd25970caf9f8b82866fea215a2 to your computer and use it in GitHub Desktop.
configuration.nix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Edit this configuration file to define what should be installed on | |
| # your system. Help is available in the configuration.nix(5) man page | |
| # and in the NixOS manual (accessible by running ‘nixos-help’). | |
| { config, pkgs, ... }: | |
| { | |
| imports = | |
| [ # Include the results of the hardware scan. | |
| ./hardware-configuration.nix | |
| ./pcloud.nix | |
| ]; | |
| # Bootloader. | |
| boot.loader.systemd-boot.enable = true; | |
| boot.loader.efi.canTouchEfiVariables = true; | |
| boot.initrd.luks.devices."luks-a015f108-f471-4722-8a06-225d9bf405fc".device = "/dev/disk/by-uuid/a015f108-f471-4722-8a06-225d9bf405fc"; | |
| networking.hostName = "nozenseZlaptop"; # Define your hostname. | |
| # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. | |
| # Configure network proxy if necessary | |
| # networking.proxy.default = "http://user:password@proxy:port/"; | |
| # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; | |
| # Enable networking | |
| networking.networkmanager.enable = true; | |
| # Set your time zone. | |
| time.timeZone = "Europe/Stockholm"; | |
| # Select internationalisation properties. | |
| i18n.defaultLocale = "sv_SE.UTF-8"; | |
| i18n.extraLocaleSettings = { | |
| LC_ADDRESS = "sv_SE.UTF-8"; | |
| LC_IDENTIFICATION = "sv_SE.UTF-8"; | |
| LC_MEASUREMENT = "sv_SE.UTF-8"; | |
| LC_MONETARY = "sv_SE.UTF-8"; | |
| LC_NAME = "sv_SE.UTF-8"; | |
| LC_NUMERIC = "sv_SE.UTF-8"; | |
| LC_PAPER = "sv_SE.UTF-8"; | |
| LC_TELEPHONE = "sv_SE.UTF-8"; | |
| LC_TIME = "sv_SE.UTF-8"; | |
| }; | |
| # Enable the X11 windowing system. | |
| services.xserver.enable = true; | |
| # Enable the XFCE Desktop Environment. | |
| services.xserver.displayManager.lightdm.enable = true; | |
| services.xserver.desktopManager.xfce.enable = true; | |
| # Configure keymap in X11 | |
| services.xserver = { | |
| xkb.layout = "se"; | |
| xkb.variant = ""; | |
| }; | |
| # Configure console keymap | |
| console.keyMap = "sv-latin1"; | |
| # Enable CUPS to print documents. | |
| services.printing.enable = true; | |
| # Enable bluetooth | |
| hardware.bluetooth.enable = true; # enables support for Bluetooth | |
| hardware.bluetooth.powerOnBoot = true; # powers up the default Bluetooth controller on boot | |
| #Blueman to handle bluetooth | |
| services.blueman.enable = true; | |
| # LAPTOP THINGS - powermanagment and such | |
| powerManagement.enable = true; | |
| services.thermald.enable = true; | |
| services.tlp = { | |
| enable = true; | |
| settings = { | |
| CPU_SCALING_GOVERNOR_ON_AC = "performance"; | |
| CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; | |
| CPU_ENERGY_PERF_POLICY_ON_BAT = "power"; | |
| CPU_ENERGY_PERF_POLICY_ON_AC = "performance"; | |
| CPU_MIN_PERF_ON_AC = 0; | |
| CPU_MAX_PERF_ON_AC = 100; | |
| CPU_MIN_PERF_ON_BAT = 0; | |
| CPU_MAX_PERF_ON_BAT = 20; | |
| #Optional helps save long term battery health | |
| START_CHARGE_THRESH_BAT0 = 40; # 40 and bellow it starts to charge | |
| STOP_CHARGE_THRESH_BAT0 = 80; # 80 and above it stops charging | |
| }; | |
| }; | |
| # Enable sound with pipewire. | |
| sound.enable = true; | |
| hardware.pulseaudio.enable = false; | |
| security.rtkit.enable = true; | |
| services.pipewire = { | |
| enable = true; | |
| alsa.enable = true; | |
| alsa.support32Bit = true; | |
| pulse.enable = true; | |
| # If you want to use JACK applications, uncomment this | |
| #jack.enable = true; | |
| # use the example session manager (no others are packaged yet so this is enabled by default, | |
| # no need to redefine it in your config for now) | |
| #media-session.enable = true; | |
| }; | |
| # Enable touchpad support (enabled default in most desktopManager). | |
| services.xserver.libinput.enable = true; | |
| nixpkgs.config = | |
| { | |
| # Allow proprietary packages | |
| allowUnfree = true; | |
| # Create an alias for the unstable channel | |
| packageOverrides = pkgs: | |
| { | |
| # sudo nix-channel --add https://nixos.org/channels/nixos-22.11 nixos-22 | |
| # Old version for pCloud | |
| nixos22 = import <nixos-22> | |
| { | |
| # pass the nixpkgs config to the unstable alias | |
| # to ensure `allowUnfree = true;` is propagated: | |
| config = config.nixpkgs.config; | |
| }; | |
| unstable = import <nixos-unstable> | |
| { | |
| # pass the nixpkgs config to the unstable alias | |
| # to ensure `allowUnfree = true;` is propagated: | |
| config = config.nixpkgs.config; | |
| }; | |
| }; | |
| }; | |
| # Enable the Flakes feature and the accompanying new nix command-line tool | |
| # nix.settings.experimental-features = [ "nix-command" "flakes" ]; | |
| # FONTS! (= | |
| fonts.packages = with pkgs; [ | |
| (nerdfonts.override { fonts = [ "Iosevka"]; }) | |
| ]; | |
| # List packages installed in system profile. To search, run: | |
| environment.systemPackages = with pkgs; [ | |
| git | |
| ripgrep | |
| # bluez # bluetooth stack - funkar? | |
| # bluez-tools # bluethooth tools | |
| # blueman # gui for bluetooth | |
| fd | |
| tlp # laptop power managment | |
| gcc | |
| xclip | |
| lshw | |
| curl | |
| wget | |
| neovim | |
| alacritty | |
| (catppuccin-gtk.override { | |
| accents = [ "teal" ]; # You can specify multiple accents here to output multiple themes | |
| size = "compact"; | |
| tweaks = [ "normal" ]; # You can also specify multiple tweaks here | |
| variant = "macchiato"; | |
| }) | |
| ]; | |
| users.users.nozense = { | |
| isNormalUser = true; | |
| home = "/home/nozense"; | |
| extraGroups = [ "wheel" "networkmanager" ]; | |
| packages = with pkgs; [ | |
| firefox | |
| #pcloud | |
| unzip | |
| chezmoi | |
| gotop | |
| syncthing | |
| ulauncher | |
| zsh | |
| tmux | |
| emacs | |
| asciidoc | |
| vlc | |
| gimp | |
| protonvpn-cli | |
| protonvpn-gui | |
| todoist-electron | |
| discord | |
| ]; | |
| }; | |
| # Some programs need SUID wrappers, can be configured further or are | |
| # started in user sessions. | |
| # programs.mtr.enable = true; | |
| # programs.gnupg.agent = { | |
| # enable = true; | |
| # enableSSHSupport = true; | |
| # }; | |
| # Use neovim! | |
| programs.neovim.enable = true; | |
| programs.neovim.defaultEditor = true; | |
| systemd.services.ulauncher.enable = true; | |
| # List services that you want to enable: | |
| # Enable the OpenSSH daemon. | |
| # services.openssh.enable = true; | |
| # Open ports in the firewall. | |
| # networking.firewall.allowedTCPPorts = [ ... ]; | |
| # networking.firewall.allowedUDPPorts = [ ... ]; | |
| # Or disable the firewall altogether. | |
| # networking.firewall.enable = false; | |
| # This value determines the NixOS release from which the default | |
| # settings for stateful data, like file locations and database versions | |
| # on your system were taken. It‘s perfectly fine and recommended to leave | |
| # this value at the release version of the first install of this system. | |
| # Before changing this value read the documentation for this option | |
| # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). | |
| system.stateVersion = "23.11"; # Did you read the comment? | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment