Mon Jun 10 12:14:37 PM CEST 2024
This commit is contained in:
parent
b192b20d97
commit
31e0001a58
77
flake.nix
77
flake.nix
|
@ -30,25 +30,22 @@
|
||||||
./hosts/${host}/hardware-configuration.nix
|
./hosts/${host}/hardware-configuration.nix
|
||||||
{ nixpkgs.overlays = [ nur.overlay ]; }
|
{ nixpkgs.overlays = [ nur.overlay ]; }
|
||||||
{
|
{
|
||||||
hardware.opengl = {
|
|
||||||
enable = true;
|
|
||||||
driSupport = true;
|
|
||||||
driSupport32Bit = true;
|
|
||||||
};
|
|
||||||
security.polkit.enable = true;
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
networking.hostName = host;
|
networking.hostName = host;
|
||||||
boot.loader.systemd-boot = {
|
boot.loader.systemd-boot.enable = true;
|
||||||
enable = true;
|
|
||||||
memtest86.enable = true;
|
|
||||||
netbootxyz.enable = true;
|
|
||||||
};
|
|
||||||
boot.loader.timeout = 1;
|
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
|
||||||
time.timeZone = "Europe/Brussels";
|
time.timeZone = "Europe/Brussels";
|
||||||
|
|
||||||
|
programs.hyprland = {
|
||||||
|
enable = true;
|
||||||
|
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
|
||||||
|
};
|
||||||
nix.settings = {
|
nix.settings = {
|
||||||
substituters = [ "https://hyprland.cachix.org" "https://nix-community.cachix.org" "https://cuda-maintainers.cachix.org" "https://nixos-rocm.cachix.org" ];
|
substituters = [
|
||||||
|
"https://hyprland.cachix.org"
|
||||||
|
"https://nix-community.cachix.org"
|
||||||
|
"https://cuda-maintainers.cachix.org"
|
||||||
|
"https://nixos-rocm.cachix.org"
|
||||||
|
];
|
||||||
trusted-public-keys = [
|
trusted-public-keys = [
|
||||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
|
@ -56,7 +53,7 @@
|
||||||
"nixos-rocm.cachix.org-1:VEpsf7pRIijjd8csKjFNBGzkBqOmw8H9PRmgAq14LnE="
|
"nixos-rocm.cachix.org-1:VEpsf7pRIijjd8csKjFNBGzkBqOmw8H9PRmgAq14LnE="
|
||||||
];
|
];
|
||||||
experimental-features = [ "nix-command" "flakes" ];
|
experimental-features = [ "nix-command" "flakes" ];
|
||||||
trusted-users = [ "root" "user" ];
|
trusted-users = [ "root" user ];
|
||||||
auto-optimise-store = true;
|
auto-optimise-store = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -66,31 +63,6 @@
|
||||||
options = "--delete-older-than 2d";
|
options = "--delete-older-than 2d";
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.zsh.enable = true;
|
|
||||||
programs.hyprland = {
|
|
||||||
enable = true;
|
|
||||||
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
|
|
||||||
};
|
|
||||||
|
|
||||||
services.greetd = {
|
|
||||||
enable = true;
|
|
||||||
settings = rec {
|
|
||||||
initial_session = {
|
|
||||||
command = "Hyprland";
|
|
||||||
user = "user";
|
|
||||||
};
|
|
||||||
default_session = initial_session;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
security.rtkit.enable = true;
|
|
||||||
services.pipewire = {
|
|
||||||
enable = true;
|
|
||||||
alsa.enable = true;
|
|
||||||
alsa.support32Bit = true;
|
|
||||||
pulse.enable = true;
|
|
||||||
jack.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
users.users.${user} = {
|
users.users.${user} = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
|
@ -106,31 +78,8 @@
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [ wget curl git lm_sensors ];
|
|
||||||
|
|
||||||
services.openssh = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
PermitRootLogin = "no";
|
|
||||||
PasswordAuthentication = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.firewall.enable = false;
|
|
||||||
system.stateVersion = "23.11";
|
system.stateVersion = "23.11";
|
||||||
environment.sessionVariables.NIXOS_OZONE_WL =
|
environment.sessionVariables.NIXOS_OZONE_WL = "1"; # hint electron apps to use wayland:
|
||||||
"1"; # hint electron apps to use wayland:
|
|
||||||
|
|
||||||
fonts.packages = with pkgs; [
|
|
||||||
noto-fonts
|
|
||||||
noto-fonts-cjk
|
|
||||||
noto-fonts-emoji
|
|
||||||
iosevka
|
|
||||||
nerdfonts
|
|
||||||
roboto
|
|
||||||
font-awesome
|
|
||||||
];
|
|
||||||
|
|
||||||
}
|
}
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
./ssh
|
./ssh
|
||||||
./mpv
|
./mpv
|
||||||
];
|
];
|
||||||
home.packages = with pkgs; [ telegram-desktop webcord devenv loupe ];
|
home.packages = with pkgs; [ telegram-desktop webcord devenv loupe evince ];
|
||||||
programs.ssh.matchBlocks."*".identityFile = "/home/server/.secrets/SSH/Kell/id_ed25519";
|
programs.ssh.matchBlocks."*".identityFile = "/home/server/.secrets/SSH/Kell/id_ed25519";
|
||||||
|
|
||||||
services.hyprpaper = {
|
services.hyprpaper = {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, config, ... }:
|
{ pkgs, inputs, config, ... }:
|
||||||
let
|
let
|
||||||
mkConnection = name: cfg: {
|
mkConnection = name: cfg: {
|
||||||
connection = {
|
connection = {
|
||||||
|
@ -34,24 +34,17 @@ connections = {
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
services.pcscd.enable = true;
|
imports = [
|
||||||
|
(import ../Common { inherit inputs pkgs; })
|
||||||
|
];
|
||||||
|
|
||||||
services.xserver.videoDrivers = ["nvidia"];
|
services.xserver.videoDrivers = ["nvidia"];
|
||||||
hardware.opengl.extraPackages = [
|
hardware.opengl.extraPackages = [
|
||||||
pkgs.intel-compute-runtime
|
pkgs.intel-compute-runtime
|
||||||
pkgs.intel-media-driver
|
pkgs.intel-media-driver
|
||||||
];
|
];
|
||||||
services.thermald.enable = true;
|
|
||||||
services.fwupd.enable = true;
|
|
||||||
services.fstrim.enable = true;
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
wireguard-tools
|
# Cuda
|
||||||
|
|
||||||
# Podman
|
|
||||||
dive
|
|
||||||
podman-tui
|
|
||||||
docker-compose
|
|
||||||
|
|
||||||
# CUDA
|
|
||||||
pciutils
|
pciutils
|
||||||
file
|
file
|
||||||
gnumake
|
gnumake
|
||||||
|
@ -89,41 +82,13 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
services.udev.packages = [ pkgs.yubikey-personalization ];
|
|
||||||
|
|
||||||
# Enable common container config files in /etc/containers
|
|
||||||
virtualisation.containers.enable = true;
|
|
||||||
virtualisation = {
|
|
||||||
podman = {
|
|
||||||
enable = true;
|
|
||||||
dockerCompat = true;
|
|
||||||
defaultNetwork.settings.dns_enabled = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services.ollama = {
|
services.ollama = {
|
||||||
enable = true;
|
enable = true;
|
||||||
acceleration = "cuda";
|
acceleration = "cuda";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Calendar
|
|
||||||
programs.dconf.enable = true;
|
|
||||||
services.gnome.evolution-data-server.enable = true;
|
|
||||||
services.gnome.gnome-online-accounts.enable = true;
|
|
||||||
services.gnome.gnome-keyring.enable = true;
|
|
||||||
|
|
||||||
# Add the server using gnome-online-accounts:
|
|
||||||
# nix-shell -p gnome.gnome-control-center --run "gnome-control-center"
|
|
||||||
# Just add the main webdav server and gnome-calendar will automatically pick up all available calendars.
|
|
||||||
|
|
||||||
# networking.nameservers = [ "1.1.1.1#one.one.one.one" "1.0.0.1#one.one.one.one" ];
|
|
||||||
# services.resolved = {
|
|
||||||
# enable = true;
|
|
||||||
# dnssec = "true";
|
|
||||||
# domains = [ "~." ];
|
|
||||||
# fallbackDns = [ "1.1.1.1#one.one.one.one" "1.0.0.1#one.one.one.one" ];
|
|
||||||
# dnsovertls = "true";
|
|
||||||
# };
|
|
||||||
|
|
||||||
networking.wg-quick.interfaces = {
|
networking.wg-quick.interfaces = {
|
||||||
wg0 = {
|
wg0 = {
|
||||||
|
@ -161,49 +126,4 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services.resolved = {
|
|
||||||
enable = true;
|
|
||||||
fallbackDns = [ "1.1.1.1" "1.0.0.1" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
hardware.bluetooth.enable = true;
|
|
||||||
hardware.bluetooth.powerOnBoot = true;
|
|
||||||
services.blueman.enable = true;
|
|
||||||
systemd.user.services.mpris-proxy = {
|
|
||||||
description = "Mpris proxy";
|
|
||||||
after = [ "network.target" "sound.target" ];
|
|
||||||
wantedBy = [ "default.target" ];
|
|
||||||
serviceConfig.ExecStart = "${pkgs.bluez}/bin/mpris-proxy";
|
|
||||||
};
|
|
||||||
hardware.bluetooth.settings = {
|
|
||||||
General = {
|
|
||||||
Experimental = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/home/server" = {
|
|
||||||
device = "10.1:/home/server";
|
|
||||||
fsType = "nfs";
|
|
||||||
options = [ "x-systemd.automount" "x-systemd.mount-timeout=1" "_netdev" "noauto" "timeo=1" ];
|
|
||||||
};
|
|
||||||
fileSystems."/home/user/Workspace" = {
|
|
||||||
device = "10.1:/home/server/Workspace";
|
|
||||||
fsType = "nfs";
|
|
||||||
options = [ "x-systemd.automount" "x-systemd.mount-timeout=1" "_netdev" "noauto" "timeo=1" ];
|
|
||||||
};
|
|
||||||
fileSystems."/home/user/Documents" = {
|
|
||||||
device = "10.1:/home/server/Storage/Thomas/Documents";
|
|
||||||
fsType = "nfs";
|
|
||||||
options = [ "x-systemd.automount" "x-systemd.mount-timeout=1" "_netdev" "noauto" "timeo=1" ];
|
|
||||||
};
|
|
||||||
fileSystems."/home/user/Pictures" = {
|
|
||||||
device = "10.1:/home/server/Storage/Thomas/Pictures";
|
|
||||||
fsType = "nfs";
|
|
||||||
options = [ "x-systemd.automount" "x-systemd.mount-timeout=1" "_netdev" "noauto" "timeo=1" ];
|
|
||||||
};
|
|
||||||
fileSystems."/home/user/Videos" = {
|
|
||||||
device = "10.1:/home/server/Storage/Thomas/Videos";
|
|
||||||
fsType = "nfs";
|
|
||||||
options = [ "x-systemd.automount" "x-systemd.mount-timeout=1" "_netdev" "noauto" "timeo=1" ];
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,139 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
security.polkit.enable = true;
|
||||||
|
|
||||||
|
boot.loader.systemd-boot.memtest86.enable = true;
|
||||||
|
boot.loader.systemd-boot.netbootxyz.enable = true;
|
||||||
|
boot.loader.timeout = 1;
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
|
services.thermald.enable = true;
|
||||||
|
services.pcscd.enable = true;
|
||||||
|
services.fwupd.enable = true;
|
||||||
|
services.fstrim.enable = true;
|
||||||
|
hardware.opengl = {
|
||||||
|
enable = true;
|
||||||
|
driSupport = true;
|
||||||
|
driSupport32Bit = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.zsh.enable = true;
|
||||||
|
|
||||||
|
services.openssh = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
PermitRootLogin = "no";
|
||||||
|
PasswordAuthentication = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
fonts.packages = with pkgs; [
|
||||||
|
noto-fonts
|
||||||
|
noto-fonts-cjk
|
||||||
|
noto-fonts-emoji
|
||||||
|
iosevka
|
||||||
|
nerdfonts
|
||||||
|
roboto
|
||||||
|
font-awesome
|
||||||
|
];
|
||||||
|
|
||||||
|
networking.firewall.enable = false;
|
||||||
|
|
||||||
|
services.greetd = {
|
||||||
|
enable = true;
|
||||||
|
settings = rec {
|
||||||
|
initial_session = {
|
||||||
|
command = "Hyprland";
|
||||||
|
user = "user";
|
||||||
|
};
|
||||||
|
default_session = initial_session;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
services.pipewire = {
|
||||||
|
enable = true;
|
||||||
|
alsa.enable = true;
|
||||||
|
alsa.support32Bit = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
jack.enable = true;
|
||||||
|
};
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
wget
|
||||||
|
curl
|
||||||
|
git
|
||||||
|
lm_sensors
|
||||||
|
wireguard-tools
|
||||||
|
|
||||||
|
# Podman
|
||||||
|
dive
|
||||||
|
podman-tui
|
||||||
|
docker-compose
|
||||||
|
];
|
||||||
|
services.udev.packages = [ pkgs.yubikey-personalization ];
|
||||||
|
|
||||||
|
virtualisation.containers.enable = true;
|
||||||
|
virtualisation = {
|
||||||
|
podman = {
|
||||||
|
enable = true;
|
||||||
|
dockerCompat = true;
|
||||||
|
defaultNetwork.settings.dns_enabled = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Calendar
|
||||||
|
# Add the server using gnome-online-accounts:
|
||||||
|
# nix-shell -p gnome.gnome-control-center --run "gnome-control-center"
|
||||||
|
# Just add the main webdav server and gnome-calendar will automatically pick up all available calendars.
|
||||||
|
programs.dconf.enable = true;
|
||||||
|
services.gnome.evolution-data-server.enable = true;
|
||||||
|
services.gnome.gnome-online-accounts.enable = true;
|
||||||
|
services.gnome.gnome-keyring.enable = true;
|
||||||
|
|
||||||
|
services.resolved = {
|
||||||
|
enable = true;
|
||||||
|
fallbackDns = [ "1.1.1.1" "1.0.0.1" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
hardware.bluetooth.enable = true;
|
||||||
|
hardware.bluetooth.powerOnBoot = true;
|
||||||
|
services.blueman.enable = true;
|
||||||
|
systemd.user.services.mpris-proxy = {
|
||||||
|
description = "Mpris proxy";
|
||||||
|
after = [ "network.target" "sound.target" ];
|
||||||
|
wantedBy = [ "default.target" ];
|
||||||
|
serviceConfig.ExecStart = "${pkgs.bluez}/bin/mpris-proxy";
|
||||||
|
};
|
||||||
|
hardware.bluetooth.settings = {
|
||||||
|
General = {
|
||||||
|
Experimental = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/home/server" = {
|
||||||
|
device = "10.1:/home/server";
|
||||||
|
fsType = "nfs";
|
||||||
|
options = [ "x-systemd.automount" "x-systemd.mount-timeout=1" "_netdev" "noauto" "timeo=1" ];
|
||||||
|
};
|
||||||
|
fileSystems."/home/user/Workspace" = {
|
||||||
|
device = "10.1:/home/server/Workspace";
|
||||||
|
fsType = "nfs";
|
||||||
|
options = [ "x-systemd.automount" "x-systemd.mount-timeout=1" "_netdev" "noauto" "timeo=1" ];
|
||||||
|
};
|
||||||
|
fileSystems."/home/user/Documents" = {
|
||||||
|
device = "10.1:/home/server/Storage/Thomas/Documents";
|
||||||
|
fsType = "nfs";
|
||||||
|
options = [ "x-systemd.automount" "x-systemd.mount-timeout=1" "_netdev" "noauto" "timeo=1" ];
|
||||||
|
};
|
||||||
|
fileSystems."/home/user/Pictures" = {
|
||||||
|
device = "10.1:/home/server/Storage/Thomas/Pictures";
|
||||||
|
fsType = "nfs";
|
||||||
|
options = [ "x-systemd.automount" "x-systemd.mount-timeout=1" "_netdev" "noauto" "timeo=1" ];
|
||||||
|
};
|
||||||
|
fileSystems."/home/user/Videos" = {
|
||||||
|
device = "10.1:/home/server/Storage/Thomas/Videos";
|
||||||
|
fsType = "nfs";
|
||||||
|
options = [ "x-systemd.automount" "x-systemd.mount-timeout=1" "_netdev" "noauto" "timeo=1" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
|
@ -1,6 +1,10 @@
|
||||||
{ inputs, config, pkgs, ... }:
|
{ inputs, config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
imports = [
|
||||||
|
(import ../Common { inherit inputs pkgs; })
|
||||||
|
];
|
||||||
|
|
||||||
# AMD CPU
|
# AMD CPU
|
||||||
boot.blacklistedKernelModules = [ "k10temp" ];
|
boot.blacklistedKernelModules = [ "k10temp" ];
|
||||||
boot.extraModulePackages = [ config.boot.kernelPackages.zenpower ];
|
boot.extraModulePackages = [ config.boot.kernelPackages.zenpower ];
|
||||||
|
@ -8,37 +12,7 @@
|
||||||
|
|
||||||
# AMD CPU & GPU
|
# AMD CPU & GPU
|
||||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||||
services.pcscd.enable = true;
|
|
||||||
services.udev.packages = [ pkgs.yubikey-personalization ];
|
|
||||||
services.logind.extraConfig = ''HandlePowerKey=suspend'';
|
services.logind.extraConfig = ''HandlePowerKey=suspend'';
|
||||||
services.fstrim.enable = true;
|
|
||||||
services.fwupd.enable = true;
|
|
||||||
|
|
||||||
# Calendar
|
|
||||||
programs.dconf.enable = true;
|
|
||||||
services.gnome.evolution-data-server.enable = true;
|
|
||||||
services.gnome.gnome-online-accounts.enable = true;
|
|
||||||
services.gnome.gnome-keyring.enable = true;
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
wireguard-tools
|
|
||||||
|
|
||||||
# Podman
|
|
||||||
dive
|
|
||||||
podman-tui
|
|
||||||
docker-compose
|
|
||||||
];
|
|
||||||
# Add the server using gnome-online-accounts:
|
|
||||||
# nix-shell -p gnome.gnome-control-center --run "gnome-control-center"
|
|
||||||
# Just add the main webdav server and gnome-calendar will automatically pick up all available calendars.
|
|
||||||
|
|
||||||
virtualisation.containers.enable = true;
|
|
||||||
virtualisation = {
|
|
||||||
podman = {
|
|
||||||
enable = true;
|
|
||||||
dockerCompat = true;
|
|
||||||
defaultNetwork.settings.dns_enabled = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services.ollama = {
|
services.ollama = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -58,29 +32,4 @@
|
||||||
}];
|
}];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
fileSystems."/home/server" = {
|
|
||||||
device = "192.168.1.2:/home/server";
|
|
||||||
fsType = "nfs";
|
|
||||||
options = [ "x-systemd.automount" "noauto" ];
|
|
||||||
};
|
|
||||||
fileSystems."/home/user/Workspace" = {
|
|
||||||
device = "192.168.1.2:/home/server/Workspace";
|
|
||||||
fsType = "nfs";
|
|
||||||
options = [ "x-systemd.automount" "noauto" ];
|
|
||||||
};
|
|
||||||
fileSystems."/home/user/Documents" = {
|
|
||||||
device = "192.168.1.2:/home/server/Storage/Thomas/Documents";
|
|
||||||
fsType = "nfs";
|
|
||||||
options = [ "x-systemd.automount" "noauto" ];
|
|
||||||
};
|
|
||||||
fileSystems."/home/user/Pictures" = {
|
|
||||||
device = "192.168.1.2:/home/server/Storage/Thomas/Pictures";
|
|
||||||
fsType = "nfs";
|
|
||||||
options = [ "x-systemd.automount" "noauto" ];
|
|
||||||
};
|
|
||||||
fileSystems."/home/user/Videos" = {
|
|
||||||
device = "192.168.1.2:/home/server/Storage/Thomas/Videos";
|
|
||||||
fsType = "nfs";
|
|
||||||
options = [ "x-systemd.automount" "noauto" ];
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue