diff options
Diffstat (limited to 'nixos/configuration.nix')
-rw-r--r-- | nixos/configuration.nix | 281 |
1 files changed, 281 insertions, 0 deletions
diff --git a/nixos/configuration.nix b/nixos/configuration.nix new file mode 100644 index 0000000..4848515 --- /dev/null +++ b/nixos/configuration.nix @@ -0,0 +1,281 @@ +# 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, inputs, ... }: + +{ + imports = + [ # Include the results of the hardware scan. + ./hardware-configuration.nix + inputs.home-manager.nixosModules.default + ]; + + # Bootloader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + networking.hostName = "thinkpad"; # 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/London"; + + # Select internationalisation properties. + i18n.defaultLocale = "en_US.UTF-8"; + + i18n.extraLocaleSettings = { + LC_ADDRESS = "en_GB.UTF-8"; + LC_IDENTIFICATION = "en_GB.UTF-8"; + LC_MEASUREMENT = "en_GB.UTF-8"; + LC_MONETARY = "en_GB.UTF-8"; + LC_NAME = "en_GB.UTF-8"; + LC_NUMERIC = "en_GB.UTF-8"; + LC_PAPER = "en_GB.UTF-8"; + LC_TELEPHONE = "en_GB.UTF-8"; + LC_TIME = "en_GB.UTF-8"; + }; + + # Enable the X11 windowing system. + services.xserver.enable = true; + services.xserver.excludePackages = [ + pkgs.xterm + ]; + + # Enable the GNOME Desktop Environment. + services.xserver.displayManager.gdm.enable = true; + services.xserver.desktopManager.gnome.enable = true; + environment.gnome.excludePackages = with pkgs; [ + epiphany + gnome-connections + gnome-tour + gnome.geary + gnome.gnome-characters + gnome.gnome-contacts + gnome.gnome-maps + gnome.gnome-music + gnome.simple-scan + gnome.totem + gnome.yelp + snapshot + ]; + + services.xserver.libinput = { + enable = true; + touchpad = { + naturalScrolling = true; + }; + }; + + services.xserver.displayManager = { + defaultSession = "none+xmonad"; + #lightdm = { + # enable = true; + # greeter.enable = false; + #}; + #autoLogin = { + # enable = true; + # user = "venomade"; + #}; + }; + + services.xserver.windowManager.xmonad = { + enable = true; + enableContribAndExtras = true; + config = builtins.readFile config/xmonad.hs; + }; + + services.picom = { + enable = true; + settings = { + shadow = true; + shadow-radius = 7; + shadow-offset-x = -7; + shadow-offset-y = -7; + fading = true; + fade-in-step = 0.2; + fade-out-step = 0.2; + inactive-opacity-override = false; + corner-radius = 4; + rounded-corners-exclude = [ + "window_type = 'dock'" + "window_type = 'desktop'" + ]; + blur-method = "dual_kawase"; + blur-size = 12; + blur-strength = 5; + blur-kern = "3x3box"; + backend = "glx"; + vsync = true; + mark-wmwin-focused = true; + mark-ovredir-focused = true; + detect-rounded-corners = true; + detect-client-opacity = true; + detect-transient = true; + use-damage = true; + }; + }; + + # Location (It's approximate) + location = { + provider = "manual"; + longitude = 52.2; + latitude = 0.1; + }; + + # Redshift + services.redshift = { + enable = true; + brightness = { + day = "1"; + night = "1"; + }; + temperature = { + day = 5500; + night = 3700; + }; + }; + + # Configure keymap in X11 + services.xserver = { + layout = "us"; + xkbVariant = "colemak"; + xkbOptions = "caps:escape"; + }; + + # 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; + + # Define a user account. Don't forget to set a password with ‘passwd’. + users.users.venomade = { + isNormalUser = true; + description = "Venomade"; + extraGroups = [ "networkmanager" "wheel" ]; + shell = pkgs.zsh; + packages = with pkgs; [ + clang-tools + eza + firefox + gcc + ghc + haskellPackages.haskell-language-server + hut + musikcube + neovim + nil + nodejs_21 + protonvpn-cli_2 + starship + zsh + ]; + }; + + programs.zsh = { + enable = true; + autosuggestions.enable = true; + syntaxHighlighting.enable = true; + }; + + home-manager = { + # also pass inputs to home-manager modules + extraSpecialArgs = {inherit inputs;}; + users = { + "venomade" = import ./home.nix; + }; + }; + + # Allow unfree packages + nixpkgs.config.allowUnfree = true; + + # List packages installed in system profile. To search, run: + # $ nix search wget + environment.systemPackages = with pkgs; [ + git + vim + wget + # XMonad + (dmenu.override { + patches = [ + config/dmenu.patch + ]; + }) + feh + haskellPackages.xmobar + j4-dmenu-desktop + kitty + ncpamixer + nerdfonts + playerctl + pulseaudio + tomato-c + zathura + ranger + redshift + # DMScripts + clipmenu + didyoumean + jq + xclip + translate-shell + # Laptop + brightnessctl + # NixOS is not linux + steam-run + ]; + + nix.settings.experimental-features = [ "nix-command" "flakes" ]; + + # NixOS is not linux + + # 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; + # }; + + # 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? + +} |