197 lines
4.8 KiB
Nix
197 lines
4.8 KiB
Nix
# This is your system's configuration file.
|
|
# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix)
|
|
{
|
|
inputs,
|
|
lib,
|
|
config,
|
|
pkgs,
|
|
...
|
|
}: {
|
|
imports = [
|
|
./hardware-configuration.nix
|
|
inputs.dms.nixosModules.dank-material-shell
|
|
];
|
|
|
|
nixpkgs = {
|
|
# You can add overlays here
|
|
overlays = [
|
|
# If you want to use overlays exported from other flakes:
|
|
# neovim-nightly-overlay.overlays.default
|
|
|
|
# Or define it inline, for example:
|
|
# (final: prev: {
|
|
# hi = final.hello.overrideAttrs (oldAttrs: {
|
|
# patches = [ ./change-hello-to-hi.patch ];
|
|
# });
|
|
# })
|
|
];
|
|
# Configure your nixpkgs instance
|
|
config = {
|
|
allowUnfree = true;
|
|
};
|
|
};
|
|
|
|
nix = let
|
|
flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs;
|
|
in {
|
|
settings = {
|
|
# Enable flakes and new 'nix' command
|
|
experimental-features = "nix-command flakes";
|
|
# Opinionated: disable global registry
|
|
flake-registry = "";
|
|
# Workaround for https://github.com/NixOS/nix/issues/9574
|
|
nix-path = config.nix.nixPath;
|
|
};
|
|
# Opinionated: disable channels
|
|
channel.enable = false;
|
|
|
|
# Opinionated: make flake registry and nix path match flake inputs
|
|
registry = lib.mapAttrs (_: flake: {inherit flake;}) flakeInputs;
|
|
nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs;
|
|
};
|
|
|
|
|
|
# Bootloader.
|
|
boot.loader.systemd-boot.enable = true;
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
|
|
|
|
|
# Enable networking
|
|
networking.networkmanager.enable = true;
|
|
|
|
# Set your time zone.
|
|
time.timeZone = "Europe/Helsinki";
|
|
|
|
# Select internationalisation properties.
|
|
i18n.defaultLocale = "en_US.UTF-8";
|
|
|
|
i18n.extraLocaleSettings = {
|
|
LC_ADDRESS = "fi_FI.UTF-8";
|
|
LC_IDENTIFICATION = "fi_FI.UTF-8";
|
|
LC_MEASUREMENT = "fi_FI.UTF-8";
|
|
LC_MONETARY = "fi_FI.UTF-8";
|
|
LC_NAME = "fi_FI.UTF-8";
|
|
LC_NUMERIC = "fi_FI.UTF-8";
|
|
LC_PAPER = "fi_FI.UTF-8";
|
|
LC_TELEPHONE = "fi_FI.UTF-8";
|
|
LC_TIME = "fi_FI.UTF-8";
|
|
};
|
|
|
|
|
|
# Configure console keymap
|
|
console.keyMap = "fi";
|
|
|
|
# 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;
|
|
# If you want to use JACK applications, uncomment this
|
|
#jack.enable = true;
|
|
};
|
|
|
|
# Additional packages
|
|
environment.systemPackages = [
|
|
pkgs.xwayland-satellite
|
|
];
|
|
|
|
|
|
# Use DMS and niri
|
|
programs.dank-material-shell = {
|
|
enable = true;
|
|
systemd = {
|
|
enable = true;
|
|
restartIfChanged = true;
|
|
};
|
|
enableSystemMonitoring = true;
|
|
enableVPN = true;
|
|
enableDynamicTheming = true;
|
|
enableAudioWavelength = true;
|
|
enableCalendarEvents = true;
|
|
};
|
|
|
|
programs.niri = {
|
|
enable = true;
|
|
};
|
|
services.displayManager.dms-greeter = {
|
|
enable = true;
|
|
compositor.name = "niri"; # Or "hyprland" or "sway"
|
|
configHome = "/home/janne";
|
|
};
|
|
programs.dsearch = {
|
|
enable = true;
|
|
systemd = {
|
|
enable = true; # Enable systemd user service
|
|
target = "default.target"; # Start with user session
|
|
};
|
|
};
|
|
|
|
#services.displayManager.sddm = {
|
|
# enable = true;
|
|
# wayland = {
|
|
# enable = true;
|
|
# };
|
|
#};
|
|
# services.desktopManager.plasma6.enable = true;
|
|
|
|
# Activate global programs
|
|
programs.firefox.enable = true;
|
|
programs.steam.enable = true;
|
|
|
|
fonts.packages = with pkgs; [
|
|
noto-fonts
|
|
noto-fonts-color-emoji
|
|
fira-code
|
|
fira-code-symbols
|
|
vista-fonts
|
|
corefonts
|
|
] ++ builtins.filter lib.attrsets.isDerivation (builtins.attrValues pkgs.nerd-fonts);
|
|
|
|
# Set up 1password
|
|
programs._1password.enable = true;
|
|
programs._1password-gui = {
|
|
enable = true;
|
|
polkitPolicyOwners = [ "janne" ];
|
|
};
|
|
|
|
# Hostname and users
|
|
networking.hostName = "hermes";
|
|
users.users = {
|
|
janne = {
|
|
isNormalUser = true;
|
|
openssh.authorizedKeys.keys = [
|
|
# TODO: Add your SSH public key(s) here, if you plan on using SSH to connect
|
|
];
|
|
extraGroups = ["wheel" "networkmanager"];
|
|
};
|
|
};
|
|
|
|
# ssh-agent; do not use the Gnome agent
|
|
services.gnome.gcr-ssh-agent.enable = false;
|
|
programs.ssh.startAgent = true;
|
|
|
|
# This setups a SSH server. Very important if you're setting up a headless system.
|
|
# Feel free to remove if you don't need it.
|
|
services.openssh = {
|
|
enable = true;
|
|
settings = {
|
|
PermitRootLogin = "no";
|
|
PasswordAuthentication = false;
|
|
};
|
|
};
|
|
|
|
networking.firewall = rec {
|
|
allowedTCPPortRanges = [{ from = 1714; to = 1764; } ];
|
|
allowedUDPPortRanges = allowedTCPPortRanges;
|
|
};
|
|
|
|
|
|
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
|
system.stateVersion = "25.05";
|
|
}
|