Several hosts first try

This commit is contained in:
2026-07-07 17:32:45 +02:00
parent 1ad01c35da
commit 9eae3d1e12
9 changed files with 154 additions and 34 deletions
+123
View File
@@ -0,0 +1,123 @@
# 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 = "nixos"; # Define your hostname.
networking.networkmanager.enable = true;
networking.networkmanager.wifi.powersave = false;
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 = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICpiU4gStAtrJOBSkQA2YJh98fpWPpxWtWgwAGzVa/wc johansson.olov@gmail.com"
];
description = "ulve";
extraGroups = [ "networkmanager" "wheel" ];
};
programs.steam.enable = true;
programs.zsh.enable = true;
security.pam.services.swaylock = {};
security.polkit.enable = true;
programs.firefox.enable = true;
programs.niri.enable = true;
services.upower.enable = true;
xdg.portal = {
enable = true;
wlr.enable = true;
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
};
nixpkgs.config.allowUnfree = true;
nixpkgs.overlays = [
(final: prev: {
steam = prev.steam.override {
extraArgs = "-cef-disable-gpu-compositing";
};
})
];
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?
}
+33
View File
@@ -0,0 +1,33 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/0d311965-cc9f-4010-babe-4234c748c66e";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/617F-3B27";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/9e4eaa57-5ac4-4594-8882-3870fa27113c"; }
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}
+35
View File
@@ -0,0 +1,35 @@
{config, pkgs, herdr, ...}:
{
imports = [ ../../modules/home-common.nix ../../modules/niri.nix ];
niri.useNoctalia = true;
home.sessionVariables = {
NIXOS_OZONE_WL = "1";
};
# ── Config files ─────────────────────────────────────────────────────────────
xdg.dataFile."applications/switch-wallpaper.desktop".source = ../../config/applications/switch-wallpaper.desktop;
xdg.dataFile."applications/signal.desktop".source = ../../config/applications/signal.desktop;
xdg.dataFile."applications/vesktop.desktop".source = ../../config/applications/vesktop.desktop;
xdg.dataFile."applications/steam.desktop".source = ../../config/applications/steam.desktop;
# ── Packages ─────────────────────────────────────────────────────────────────
home.packages = with pkgs; [
herdr.packages.${pkgs.system}.default # wallpaper manager
brave # browser
teams-for-linux # teams
# terminal
foot # terminal
# file managers
thunar # gui file manager
# messaging
telegram-desktop
signal-desktop
vesktop
karere
];
}