This commit is contained in:
fwastring 2025-09-06 13:54:37 +02:00
parent 70b6634137
commit 6a9b5e8267
16 changed files with 154 additions and 626 deletions

View file

@ -9,124 +9,50 @@
pkgs,
myhostname,
...
}:
}:
let
btusb = pkgs.callPackage ../../moduler/btusb.nix { inherit (config.boot.kernelPackages) kernel; };
in
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
inputs.home-manager.nixosModules.home-manager
../../moduler/users.nix
../../moduler/network.nix
../../moduler/programs.nix
../../moduler/system.nix
../../moduler/dev.nix
../../moduler/lsp.nix
../../moduler/sway.nix
../../moduler/hyprland.nix
];
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
home-manager.extraSpecialArgs = { inherit inputs pkgs; };
home-manager.users.fw = {
../../moduler/base.nix
inputs.home-manager.nixosModules.home-manager
../../moduler/users.nix
../../moduler/network.nix
../../moduler/programs.nix
../../moduler/system.nix
../../moduler/dev.nix
../../moduler/lsp.nix
../../moduler/sway.nix
../../moduler/hyprland.nix
../../moduler/sound.nix
];
home-manager.extraSpecialArgs = { inherit inputs pkgs; };
home-manager.users.fw = {
imports = [
./../../config/home.nix
./../../moduler/home.nix
];
};
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.kernelPackages = pkgs.linuxPackages_latest;
hardware.enableRedistributableFirmware = true;
boot.extraModulePackages = [
(btusb.overrideAttrs (_: {
patches = [ ../../config/btusb-add-mt7925.patch ];
}))
];
fonts.packages = with pkgs; [
nerd-fonts.comic-shanns-mono
nerd-fonts.fira-code
boot.extraModulePackages = [
(btusb.overrideAttrs (_: {
patches = [ ../../moduler/btusb-add-mt7925.patch ];
}))
];
hardware = {
bluetooth = {
enable = true;
powerOnBoot = true;
settings = {
General = {
Disable = "Headset";
};
};
};
};
environment.sessionVariables = {
EDITOR = "nvim";
VISUAL = "nvim";
};
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;
nix.settings = {
experimental-features = "nix-command flakes";
auto-optimise-store = true;
};
hardware.enableRedistributableFirmware = true;
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;
services = {
#tailscale.enable = true;
picom.enable = true;
openssh = {
enable = true;
@ -134,42 +60,12 @@ services = {
blueman = {
enable = true;
};
printing.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 = 140;
system.stateVersion = "25.05"; # Did you read the comment?