This commit is contained in:
fwastring 2025-09-03 09:35:51 +02:00
parent c680c2503a
commit 4d8f3f1921
16 changed files with 451 additions and 63 deletions

View file

@ -1,5 +1,7 @@
# This is your system's configuration file.
# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix)
# 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).
{
inputs,
lib,
@ -8,24 +10,140 @@
myhostname,
...
}: {
# You can import other NixOS modules here
imports = [
./hardware-configuration.nix
../../config/base.nix
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
../../config/users.nix
../../config/network.nix
../../config/programs.nix
../../config/system.nix
../../config/dev.nix
../../config/lsp.nix
../../config/sway.nix
];
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
fonts.packages = with pkgs; [
nerd-fonts.comic-shanns-mono
nerd-fonts.fira-code
];
environment.systemPackages = with pkgs; [
kubectl
azure-cli
];
hardware = {
bluetooth = {
enable = true;
powerOnBoot = true;
settings = {
General = {
Disable = "Headset";
};
};
};
};
nix.registry = (lib.mapAttrs (_: flake: { inherit flake; })) (
(lib.filterAttrs (_: lib.isType "flake")) inputs
);
nix.nixPath = [ "/etc/nix/path" ];
users.defaultUserShell = pkgs.bash;
documentation.man.generateCaches = false;
programs.fish.enable = true;
programs.bash = {
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
'';
};
environment.etc = lib.mapAttrs' (name: value: {
name = "nix/path/${name}";
value.source = value.flake;
}) config.nix.registry;
networking.hostName = myhostname;
nix.settings = {
experimental-features = "nix-command flakes";
auto-optimise-store = true;
};
services.xserver.dpi = 140;
system.stateVersion = "23.11";
networking.hostName = myhostname; # Define your hostname.
# Enable networking
networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "Europe/Stockholm";
# Select internationalisation properties.
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";
};
# Enable the X11 windowing system.
services = {
tailscale.enable = true;
picom.enable = true;
openssh = {
enable = true;
};
blueman = {
enable = true;
};
};
# Configure console keymap
console.keyMap = "sv-latin1";
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable sound with pipewire.
services.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
virtualisation.docker = {
enable = true;
};
# Define a user account. Don't forget to set a password with passwd.
users.users.fw = {
isNormalUser = true;
description = "Fredrik Wastring";
extraGroups = [ "networkmanager" "wheel" "docker" ];
};
# Install firefox.
programs.firefox.enable = true;
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
services.xserver.dpi = 180;
system.stateVersion = "25.05"; # Did you read the comment?
}

View file

@ -0,0 +1,31 @@
# This is your system's configuration file.
# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix)
{
inputs,
lib,
config,
pkgs,
myhostname,
...
}: {
# You can import other NixOS modules here
imports = [
./hardware-configuration.nix
../../config/base.nix
../../config/users.nix
];
environment.systemPackages = with pkgs; [
kubectl
azure-cli
];
networking.hostName = myhostname;
services.xserver.dpi = 140;
system.stateVersion = "23.11";
}

View file

@ -8,23 +8,24 @@
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "usbhid" "sd_mod" "rtsx_pci_sdmmc" ];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/231d66c5-7d08-4317-8c3c-b0a160af83e7";
{ device = "/dev/disk/by-uuid/40bb9f8c-1a35-476a-8d78-18763ec97171";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/2646-A8BA";
{ device = "/dev/disk/by-uuid/FAC4-0F98";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/cc350407-ca49-4831-9780-b7757b6540a6"; }
[ { device = "/dev/disk/by-uuid/d14d1b31-04fb-4ec8-a70f-438939898c3f"; }
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
@ -33,7 +34,7 @@
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true;
# networking.interfaces.enp59s0u1u2.useDHCP = lib.mkDefault true;
# networking.interfaces.enp59s0u1u4.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";