Create desktop.nix

This commit is contained in:
Thomas Avé 2024-06-13 13:21:06 +02:00
parent 0d1ba34155
commit 84c3c5fbad
8 changed files with 75 additions and 71 deletions

View File

@ -103,7 +103,7 @@
specialArgs = inputs;
};
systems = {
nixos = { user = "user"; };
NixVM = { user = "user"; };
Kell = { user = "user"; };
Aloria = { user = "user"; };
};

View File

@ -3,5 +3,8 @@
{
imports = [
(import ./utils/common.nix { inherit inputs config pkgs; })
./ssh
];
programs.ssh.matchBlocks."*".identityFile = "/home/user/.secrets/SSH/NixVM/id_ed25519";
}

View File

@ -20,64 +20,4 @@
evince
loupe
];
services.greetd = {
enable = true;
settings = rec {
initial_session = {
command = "Hyprland";
user = "user";
};
default_session = initial_session;
};
};
fonts.packages = with pkgs; [
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
iosevka
nerdfonts
roboto
font-awesome
];
hardware.opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
hardware.bluetooth.settings = {
General = {
Experimental = 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;
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";
};
}

View File

@ -3,6 +3,7 @@
imports = [
(import ../Common/default.nix { inherit inputs pkgs config; })
(import ../Common/nvidia.nix { inherit inputs pkgs config; })
(import ../Common/desktop.nix { inherit inputs pkgs config; })
];
hardware.opengl.extraPackages = [
pkgs.intel-compute-runtime

View File

@ -1,6 +1,9 @@
{ pkgs, ... }:
{
security.polkit.enable = true;
security.rtkit.enable = true;
programs.zsh.enable = true;
networking.firewall.enable = false;
boot.loader.systemd-boot.memtest86.enable = true;
boot.loader.systemd-boot.netbootxyz.enable = true;
@ -12,8 +15,6 @@
services.fwupd.enable = true;
services.gvfs.enable = true;
services.fstrim.enable = true;
programs.zsh.enable = true;
services.openssh = {
enable = true;
settings = {
@ -22,9 +23,6 @@
};
};
networking.firewall.enable = false;
security.rtkit.enable = true;
environment.systemPackages = with pkgs; [
wget
curl
@ -37,7 +35,6 @@
podman-tui
docker-compose
];
services.udev.packages = [ pkgs.yubikey-personalization ];
virtualisation.containers.enable = true;
virtualisation = {

64
hosts/Common/desktop.nix Normal file
View File

@ -0,0 +1,64 @@
{ pkgs, ... }:
{
services.udev.packages = [ pkgs.yubikey-personalization ];
hardware.opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};
fonts.packages = with pkgs; [
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
iosevka
nerdfonts
roboto
font-awesome
];
services.greetd = {
enable = true;
settings = rec {
initial_session = {
command = "Hyprland";
user = "user";
};
default_session = initial_session;
};
};
# 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.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
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;
};
};
}

View File

@ -2,7 +2,8 @@
{
imports = [
(import ../Common { inherit inputs pkgs; })
(import ../Common/default.nix { inherit inputs pkgs; })
(import ../Common/desktop.nix { inherit inputs pkgs config; })
];
# AMD CPU

View File

@ -1,8 +1,6 @@
{ inputs, config, pkgs, ... }:
{
imports = [
(import ./common.nix { inherit inputs config pkgs; })
../ssh
(import ../Common/default.nix { inherit inputs config pkgs; })
];
programs.ssh.matchBlocks."*".identityFile = "/home/user/.secrets/SSH/NixVM/id_ed25519";
}