1
0
nix-config/hosts/antoine-nixos/configuration.nix

169 lines
3.7 KiB
Nix
Raw Normal View History

2024-03-24 14:08:27 +01:00
{ pkgs, lib, hyprlock, hypridle, ... }:
2024-02-16 14:14:24 +01:00
{
imports = [
# Modules
../../modules/linux/passthrough.nix
../../modules/linux/nvidia.nix
../../modules/neovim
2024-02-16 14:14:24 +01:00
2024-02-16 18:06:10 +01:00
# Host specific
2024-02-16 14:14:24 +01:00
./hardware-configuration.nix
./services.nix
];
nixpkgs.config.allowUnfree = true;
2024-04-10 00:07:04 +02:00
# nixpkgs.config.permittedInsecurePackages = [
# "nix-2.16.2"
# ];
2024-02-16 14:14:24 +01:00
nix.settings.experimental-features = [ "nix-command" "flakes" ];
2024-02-23 10:29:33 +01:00
system.stateVersion = "24.05";
2024-03-10 23:49:19 +01:00
time.timeZone = "Europe/Paris";
console.keyMap = "fr";
sound.enable = true;
virtualisation.docker.enable = true;
2024-02-16 14:14:24 +01:00
boot.loader.grub = {
enable = true;
device = "/dev/nvme0n1";
useOSProber = true;
};
networking = {
networkmanager = {
enable = true;
dns = "none";
};
2024-02-16 14:14:24 +01:00
hostName = "antoine-nixos";
nameservers = [
2024-03-14 16:13:09 +01:00
"10.0.0.2"
"fe80::1ac0:4dff:fe8f:ad21"
2024-02-16 14:14:24 +01:00
"1.1.1.1"
"1.0.0.1"
"2606:4700:4700::1111"
"2606:4700:4700::1001"
];
wireless.enable = false;
};
hardware = {
pulseaudio.enable = false;
opengl = {
enable = true;
driSupport = true;
};
2024-02-16 14:14:24 +01:00
};
2024-03-10 23:49:19 +01:00
i18n = {
defaultLocale = "en_US.UTF-8";
extraLocaleSettings = {
LC_ADDRESS = "fr_FR.UTF-8";
LC_IDENTIFICATION = "fr_FR.UTF-8";
LC_MEASUREMENT = "fr_FR.UTF-8";
LC_MONETARY = "fr_FR.UTF-8";
LC_NAME = "fr_FR.UTF-8";
LC_NUMERIC = "fr_FR.UTF-8";
LC_PAPER = "fr_FR.UTF-8";
LC_TELEPHONE = "fr_FR.UTF-8";
LC_TIME = "fr_FR.UTF-8";
};
};
security = {
rtkit.enable = true;
polkit.enable = true;
pam.services = {
swaylock = {};
hyprlock = {};
};
2024-02-16 14:14:24 +01:00
};
xdg = {
portal = {
enable = true;
};
};
2024-02-16 14:14:24 +01:00
users = {
defaultUserShell = pkgs.zsh;
users.datahearth = {
isNormalUser = true;
description = "Antoine Langlois";
2024-04-04 15:21:40 +02:00
extraGroups = [ "networkmanager" "wheel" "docker" "wireshark" ];
2024-02-16 14:14:24 +01:00
};
};
environment = {
shells = with pkgs; [ zsh bash ];
2024-03-11 16:45:40 +01:00
# variables = {
# KWIN_DRM_USE_MODIFIERS = "0";
# };
systemPackages = with pkgs; [
networkmanagerapplet
pinentry
home-manager
docker
looking-glass-client
playerctl
2024-03-14 16:13:09 +01:00
kdePackages.okular
2024-04-04 15:21:40 +02:00
wireshark
2024-03-10 23:49:19 +01:00
# Libraries
kdePackages.qtwayland
libsForQt5.qt5.qtwayland
];
2024-02-16 14:14:24 +01:00
};
fonts.packages = with pkgs; [
(nerdfonts.override {
2024-03-08 15:14:14 +01:00
fonts = ["FiraCode" "Mononoki"];
2024-02-16 14:14:24 +01:00
})
2024-03-11 16:45:40 +01:00
corefonts
2024-02-16 14:14:24 +01:00
];
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
2024-03-24 14:08:27 +01:00
extraSpecialArgs = { inherit hyprlock hypridle; };
users = {
"datahearth" = import ./home-manager/home.nix;
};
};
2024-02-16 14:14:24 +01:00
programs = {
steam.enable = true;
hyprland.enable = true;
2024-02-16 14:14:24 +01:00
zsh.enable = true;
2024-04-04 15:21:40 +02:00
wireshark.enable = true;
2024-02-16 14:14:24 +01:00
};
custom = {
neovim.enable = true;
};
2024-02-16 14:14:24 +01:00
2024-03-19 10:15:59 +01:00
systemd.tmpfiles.rules = [
"f /dev/shm/looking-glass 0660 datahearth libvirtd -"
];
2024-02-16 14:14:24 +01:00
fileSystems = let
# this line prevents hanging on network split
automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s";
smb_secrets = "/home/datahearth/.config/nix-config/smb-secrets";
2024-02-16 14:14:24 +01:00
in {
"/mnt/cronos/medias" = lib.mkForce {
2024-02-16 14:14:24 +01:00
device = "//10.0.0.2/medias";
fsType = "cifs";
options = [ automount_opts "credentials=${smb_secrets}/cronos" ];
2024-02-16 14:14:24 +01:00
};
"/mnt/cronos/isos" = lib.mkForce {
2024-02-16 14:14:24 +01:00
device = "//10.0.0.2/isos";
fsType = "cifs";
options = [ "${automount_opts},credentials=${smb_secrets}/cronos" ];
2024-02-16 14:14:24 +01:00
};
"/mnt/linux-games" = lib.mkForce {
device = "/dev/disk/by-uuid/a0bd2373-edc1-4c95-aac1-85aa6c5bacc0";
fsType = "ext4";
options = [ automount_opts ];
};
2024-02-16 14:14:24 +01:00
};
}