adds swap to all devices
Some checks failed
Nix Format Check / check-format (push) Failing after 38s

adds noatime to all devices root partition mount options
adds cosmic desktop to workstations
adds xanmod kernel to workstations
adds xanmod with zfs to servers
adds perplexityai extension to brave
removes openra flatpak
adds threads limit to upgrade command to prevent system freezes
removes fcitx5 completely
This commit is contained in:
2024-12-11 14:51:35 +01:00
parent 56913879cb
commit 76e9cb0371
15 changed files with 199 additions and 66 deletions

View File

@@ -1,5 +1,8 @@
{ config, pkgs, ... }:
{
# Install xanmod kernel
boot.kernelPackages = pkgs.linuxKernel.packages.linux_xanmod_stable.zfs;
services.openssh = {
enable = true;
ports = [ 400 ];

View File

@@ -7,6 +7,13 @@
services.xserver.displayManager.gdm.enable = true;
services.xserver.desktopManager.gnome.enable = true;
# Enable the Cosmic Desktop Environment.
services.desktopManager.cosmic.enable = true;
services.displayManager.cosmic-greeter.enable = true;
# Install xanmod kernel
boot.kernelPackages = pkgs.linuxKernel.packages.linux_xanmod_stable;
environment.systemPackages = with pkgs; [
gnome-session
xdg-desktop-portal
@@ -30,16 +37,6 @@
pulse.enable = true;
};
# Japanese input
# i18n.inputMethod = {
# enabled = "fcitx5";
# fcitx5.addons = with pkgs; [
# fcitx5-mozc
# fcitx5-gtk
# ];
# ibus.engines = with pkgs.ibus-engines; [ mozc ];
# };
# Open ports in the firewall
networking.firewall = {
enable = true;

113
config/nixos/flake.lock generated
View File

@@ -1,16 +1,69 @@
{
"nodes": {
"nixpkgs": {
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1733550349,
"narHash": "sha256-NcGumB4Lr6KSDq+nIqXtNA8QwAQKDSZT7N9OTGWbTrs=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "e2605d0744c2417b09f8bf850dfca42fcf537d34",
"lastModified": 1717312683,
"narHash": "sha256-FrlieJH50AuvagamEvWMIE6D2OAnERuDboFDYAED/dE=",
"owner": "nix-community",
"repo": "flake-compat",
"rev": "38fd3954cf65ce6faf3d0d45cd26059e059f07ea",
"type": "github"
},
"original": {
"owner": "nixos",
"owner": "nix-community",
"repo": "flake-compat",
"type": "github"
}
},
"nixos-cosmic": {
"inputs": {
"flake-compat": "flake-compat",
"nixpkgs": "nixpkgs",
"nixpkgs-stable": "nixpkgs-stable",
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1733708804,
"narHash": "sha256-PiUrztTiR4aVRC2fMdNcOWYWF1ojvqbrSUYmhtp3970=",
"owner": "lilyinstarlight",
"repo": "nixos-cosmic",
"rev": "1531210f371ecf966ff67e87975f684553bdbbf7",
"type": "github"
},
"original": {
"owner": "lilyinstarlight",
"repo": "nixos-cosmic",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1733581040,
"narHash": "sha256-Qn3nPMSopRQJgmvHzVqPcE3I03zJyl8cSbgnnltfFDY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "22c3f2cf41a0e70184334a958e6b124fb0ce3e01",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1733412085,
"narHash": "sha256-FillH0qdWDt/nlO6ED7h4cmN+G9uXwGjwmCnHs0QVYM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "4dc2fc4e62dbf62b84132fe526356fbac7b03541",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.11",
"repo": "nixpkgs",
"type": "github"
@@ -18,11 +71,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1733581040,
"narHash": "sha256-Qn3nPMSopRQJgmvHzVqPcE3I03zJyl8cSbgnnltfFDY=",
"lastModified": 1733759999,
"narHash": "sha256-463SNPWmz46iLzJKRzO3Q2b0Aurff3U1n0nYItxq7jU=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "22c3f2cf41a0e70184334a958e6b124fb0ce3e01",
"rev": "a73246e2eef4c6ed172979932bc80e1404ba2d56",
"type": "github"
},
"original": {
@@ -32,11 +85,49 @@
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1733808091,
"narHash": "sha256-KWwINTQelKOoQgrXftxoqxmKFZb9pLVfnRvK270nkVk=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "a0f3e10d94359665dba45b71b4227b0aeb851f8e",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-24.11",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs",
"nixos-cosmic": "nixos-cosmic",
"nixpkgs": "nixpkgs_2",
"nixpkgs-unstable": "nixpkgs-unstable"
}
},
"rust-overlay": {
"inputs": {
"nixpkgs": [
"nixos-cosmic",
"nixpkgs"
]
},
"locked": {
"lastModified": 1733625333,
"narHash": "sha256-tIML2axjm4AnlKP29upVJxzBpj4Cy4ak+PKonqQtXmc=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "430c8b054e45ea44fd2c9521a378306ada507a6c",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
}
},
"root": "root",

View File

@@ -4,6 +4,7 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-24.11";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
nixos-cosmic.url = "github:lilyinstarlight/nixos-cosmic";
};
outputs =
@@ -11,6 +12,7 @@
self,
nixpkgs,
nixpkgs-unstable,
nixos-cosmic,
}:
let
system = "x86_64-linux";
@@ -33,6 +35,13 @@
./hardware/mennos-laptop.nix
./common/workstation.nix
./configuration.nix
nixos-cosmic.nixosModules.default
{
nix.settings = {
substituters = [ "https://cosmic.cachix.org/" ];
trusted-public-keys = [ "cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE=" ];
};
}
];
specialArgs = {
inherit pkgs-unstable;
@@ -47,6 +56,13 @@
./hardware/mennos-gamingpc.nix
./common/workstation.nix
./configuration.nix
nixos-cosmic.nixosModules.default
{
nix.settings = {
substituters = [ "https://cosmic.cachix.org/" ];
trusted-public-keys = [ "cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE=" ];
};
}
];
specialArgs = {
inherit pkgs-unstable;

View File

@@ -8,6 +8,13 @@
{
imports = [ /etc/nixos/hardware-configuration.nix ];
networking.hostName = "mennos-gamingpc";
fileSystems."/" = {
device = "/dev/disk/by-uuid/ac5a70cf-4b12-4d02-b5b4-a6eddf4c40b5";
fsType = "ext4";
options = [ "noatime" ];
};
networking.interfaces.enp8s0.wakeOnLan = {
enable = true;
};
@@ -19,6 +26,14 @@
# Enable Vulkan support for AMD graphics cards
hardware.graphics.extraPackages32 = with pkgs.pkgsi686Linux; [ amdvlk ];
# Swap file (Desktop PC has 48GB of RAM so 8GB swap should be enough)
swapDevices = [
{
device = "/swapfile";
size = 8192;
}
];
# Enable graphics
hardware.graphics = {
enable = true;

View File

@@ -9,6 +9,12 @@
imports = [ /etc/nixos/hardware-configuration.nix ];
networking.hostName = "mennos-laptop";
fileSystems."/" = {
device = "/dev/disk/by-uuid/1356cd09-5c55-45b5-8b06-6aadc84cee37";
fsType = "ext4";
options = [ "noatime" ];
};
# Bootloader
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
@@ -22,6 +28,14 @@
];
};
# Swap file (Laptop has 32GB of RAM so 8GB swap should be enough)
swapDevices = [
{
device = "/swapfile";
size = 8192;
}
];
# Load AMD and NVIDIA drivers for Xorg and Wayland
services.xserver.videoDrivers = [
"nvidia"

View File

@@ -11,6 +11,12 @@
./mennos-server/zfs.nix
];
fileSystems."/" = {
device = "/dev/disk/by-uuid/dd3fa13c-a1bd-4dc9-bcb4-aee17c7f12d1";
fsType = "ext4";
options = [ "noatime" ];
};
networking.hostName = "mennos-server";
networking.hostId = "64519940";
@@ -37,6 +43,14 @@
enable = true;
};
# Swap file (Laptop has 64GB of RAM so 16GB swap should be enough)
swapDevices = [
{
device = "/swapfile";
size = 16384;
}
];
hardware.nvidia = {
modesetting.enable = true;
powerManagement.enable = false;

View File

@@ -0,0 +1,6 @@
{ config, pkgs, ... }:
{
# Import all the package modules
imports = [
];
}