Initial commit
This commit is contained in:
commit
80f33c8fbd
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
hardware-configuration.nix
|
281
configuration.nix
Normal file
281
configuration.nix
Normal file
@ -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, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
<home-manager/nixos>
|
||||
];
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
networking.hostName = "nixos"; # 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/Oslo";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_GB.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "nb_NO.UTF-8";
|
||||
LC_IDENTIFICATION = "nb_NO.UTF-8";
|
||||
LC_MEASUREMENT = "nb_NO.UTF-8";
|
||||
LC_MONETARY = "nb_NO.UTF-8";
|
||||
LC_NAME = "nb_NO.UTF-8";
|
||||
LC_NUMERIC = "nb_NO.UTF-8";
|
||||
LC_PAPER = "nb_NO.UTF-8";
|
||||
LC_TELEPHONE = "nb_NO.UTF-8";
|
||||
LC_TIME = "nb_NO.UTF-8";
|
||||
};
|
||||
|
||||
# Configure console keymap
|
||||
console.keyMap = "uk";
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.martin = {
|
||||
isNormalUser = true;
|
||||
description = "martin";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
packages = with pkgs; [];
|
||||
};
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
environment.variables = {
|
||||
EDITOR = "nvim";
|
||||
};
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
gnupg
|
||||
firefox
|
||||
wget
|
||||
git
|
||||
kitty
|
||||
swaynotificationcenter
|
||||
pipewire
|
||||
wireplumber
|
||||
xdg-utils
|
||||
xdg-desktop-portal-gtk
|
||||
xdg-desktop-portal-hyprland
|
||||
hyprpolkitagent
|
||||
waybar
|
||||
rofi-wayland
|
||||
kdePackages.dolphin
|
||||
kdePackages.qtwayland
|
||||
kdePackages.qtsvg
|
||||
kdePackages.qt6ct
|
||||
spotify
|
||||
protonmail-desktop
|
||||
adw-gtk3
|
||||
glib
|
||||
adwaita-icon-theme
|
||||
jetbrains.rust-rover
|
||||
jetbrains.webstorm
|
||||
vscodium
|
||||
stremio
|
||||
docker
|
||||
rustup
|
||||
nodejs
|
||||
fastfetch
|
||||
freetube
|
||||
];
|
||||
|
||||
home-manager = {
|
||||
backupFileExtension = "backup";
|
||||
|
||||
users.martin = {
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
theme = {
|
||||
name = "Adwaita-dark";
|
||||
package = pkgs.gnome-themes-extra;
|
||||
};
|
||||
};
|
||||
|
||||
home = {
|
||||
username = "martin";
|
||||
homeDirectory = "/home/martin";
|
||||
|
||||
sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
};
|
||||
|
||||
stateVersion = "24.11";
|
||||
};
|
||||
|
||||
programs = {
|
||||
git = {
|
||||
enable = true;
|
||||
userName = "Martin Berg Alstad";
|
||||
userEmail = "git@martials.no";
|
||||
};
|
||||
kitty.enable = true;
|
||||
neovim = {
|
||||
enable = true;
|
||||
vimAlias = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
#wayland.windowManager.hyprland.enable = true;
|
||||
};
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
# programs.mtr.enable = true;
|
||||
|
||||
programs = {
|
||||
bash = {
|
||||
# Starts the OS using Bash, then starts fish if it's not running
|
||||
interactiveShellInit = ''
|
||||
if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]]
|
||||
then
|
||||
shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=""
|
||||
exec ${pkgs.fish}/bin/fish $LOGIN_OPTION
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
||||
dconf = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
fish.enable = true;
|
||||
|
||||
gnupg.agent.enable = true;
|
||||
|
||||
hyprland = {
|
||||
enable = true;
|
||||
xwayland.enable = true;
|
||||
};
|
||||
|
||||
kdeconnect = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
|
||||
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
|
||||
localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
|
||||
};
|
||||
};
|
||||
|
||||
# List services that you want to enable:
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
# services.openssh.enable = true;
|
||||
|
||||
security.rtkit.enable = true;
|
||||
|
||||
services = {
|
||||
displayManager.sddm = {
|
||||
enable = true;
|
||||
wayland.enable = true;
|
||||
};
|
||||
|
||||
flatpak.enable = true;
|
||||
|
||||
gnome = {
|
||||
gnome-keyring.enable = true;
|
||||
};
|
||||
|
||||
pcscd.enable = true;
|
||||
|
||||
pipewire = {
|
||||
enable = true;
|
||||
alsa = {
|
||||
enable = true;
|
||||
support32Bit = true;
|
||||
};
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
tailscale = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
xserver = {
|
||||
enable = true;
|
||||
# Load Nvidia driver for Xorg and Wayland
|
||||
videoDrivers = ["nvidia"];
|
||||
# Configure keymap in X11
|
||||
xkb = {
|
||||
layout = "gb";
|
||||
variant = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
storageDriver = "btrfs";
|
||||
rootless = {
|
||||
enable = true;
|
||||
setSocketVariable = true;
|
||||
};
|
||||
};
|
||||
|
||||
qt = {
|
||||
enable = true;
|
||||
#platformTheme = "gnome";
|
||||
#style = "adwaita-dark";
|
||||
};
|
||||
|
||||
# Open ports in the firewall.
|
||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
# Or disable the firewall altogether.
|
||||
# networking.firewall.enable = false;
|
||||
|
||||
# Enable OpenGL
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
hardware.nvidia = {
|
||||
# Required
|
||||
modesetting.enable = true;
|
||||
|
||||
# Use closed-source drivers
|
||||
open = false;
|
||||
|
||||
# Enable the Nvidia settings menu
|
||||
nvidiaSettings = true;
|
||||
};
|
||||
|
||||
xdg.mime.defaultApplications = {
|
||||
"text/html" = "io.github.zen_browser.zen.desktop";
|
||||
"x-scheme-handler/http" = "io.github.zen_browser.zen.desktop";
|
||||
"x-scheme-handler/https" = "io.github.zen_browser.zen.desktop";
|
||||
"x-scheme-handler/about" = "io.github.zen_browser.zen.desktop";
|
||||
"x-scheme-handler/unknown" = "io.github.zen_browser.zen.desktop";
|
||||
};
|
||||
|
||||
# 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 = "24.11"; # Did you read the comment?
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user