Files

162 lines
3.7 KiB
Nix
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 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
];
services.openssh = {
enable = true;
settings = {
X11Forwarding = false;
PermitRootLogin = "no";
PasswordAuthentication = false;
};
openFirewall = true;
};
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "fractalus"; # Define your hostname.
networking.networkmanager.enable = true;
time.timeZone = "Europe/Stockholm";
i18n.defaultLocale = "en_US.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";
};
services.xserver = {
enable = true;
autoRepeatInterval = 35;
};
services.displayManager.ly.enable = true;
services.xserver.xkb = {
layout = "se";
variant = "nodeadkeys";
options = "caps:escape";
};
console.keyMap = "sv-latin1";
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
users.users."ulve" = {
isNormalUser = true;
shell = pkgs.zsh;
openssh.authorizedKeys.keys = [
# macbook
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICpiU4gStAtrJOBSkQA2YJh98fpWPpxWtWgwAGzVa/wc johansson.olov@gmail.com"
# nixserve
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAmkoqQiLfkT3d2MTYsqXgK9UzlcJ0TwYa20ITMdg+HY nixserve"
];
description = "ulve";
extraGroups = [ "networkmanager" "wheel" ];
};
programs.steam.enable = true;
hardware.graphics.enable = true;
hardware.graphics.enable32Bit = true;
services.xserver.videoDrivers = [ "nvidia" ];
hardware.nvidia = {
modesetting.enable = true;
open = false;
nvidiaSettings = true;
};
programs.zsh.enable = true;
security.pam.services.swaylock = {};
security.polkit.enable = true;
programs.firefox.enable = true;
programs.niri.enable = true;
services.hardware.openrgb = {
enable = true;
motherboard = "amd";
};
services.tailscale = {
enable = true;
openFirewall = true;
};
services.syncthing = {
enable = true;
user = "ulve";
dataDir = "/home/ulve";
configDir = "/home/ulve/.config/syncthing";
openDefaultPorts = true;
settings.devices."macbook" = {
id = "U4YVRUT-JAAXHQ4-TA6FAGH-SO6Z7CI-KDFPRNG-UZYNXDK-6OQY7ZA-UBTZRQW";
};
settings.devices."phone" = {
id = "WXTP2PT-GW3C3EJ-JYYYXUT-VEKCAQV-NQTPQLI-TOMDAI3-CSUUHF5-6DH72AM";
};
settings.folders."xdnt7-iaqtd" = {
path = "/home/ulve/Vaults";
devices = [ "macbook" ];
};
settings.folders."yrw8u-ut036" = {
path = "/home/ulve/Phone";
devices = [ "phone" ];
};
};
services.upower.enable = true;
xdg.portal = {
enable = true;
wlr.enable = true;
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
};
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
wget
curl
];
fonts.packages = with pkgs; [
nerd-fonts.jetbrains-mono
];
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 14d";
};
nix.settings.auto-optimise-store = true;
nix.settings.experimental-features = ["nix-command" "flakes"];
system.stateVersion = "26.05"; # Did you read the comment?
}