use nix-maid

This commit is contained in:
lucy 2026-10-02 10:51:07 +02:00
commit b05c69f720
5 changed files with 372 additions and 0 deletions

128
configuration.nix Executable file
View file

@ -0,0 +1,128 @@
{ config, pkgs, ... }:
{
imports = [
./hardware-configuration.nix
];
nixpkgs.overlays = [
(final: prev: {
inherit (prev.lixPackageSets.stable)
nixpkgs-review
nix-eval-jobs
nix-fast-build
colmena
;
})
];
nix.package = pkgs.lixPackageSets.stable.lix;
hardware.graphics.enable = true;
services.xserver.videoDrivers = [ "nvidia" ];
hardware.nvidia = {
modesetting.enable = true;
open = true;
package = config.boot.kernelPackages.nvidiaPackages.new_feature;
};
environment.sessionVariables.NIXOS_OZONE_WL = "1";
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.kernelPackages = pkgs.linuxPackages_latest;
networking.hostName = "nerv";
networking.networkmanager.enable = true;
time.timeZone = "Europe/Berlin";
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "de_DE.UTF-8";
LC_IDENTIFICATION = "de_DE.UTF-8";
LC_MEASUREMENT = "de_DE.UTF-8";
LC_MONETARY = "de_DE.UTF-8";
LC_NAME = "de_DE.UTF-8";
LC_NUMERIC = "de_DE.UTF-8";
LC_PAPER = "de_DE.UTF-8";
LC_TELEPHONE = "de_DE.UTF-8";
LC_TIME = "de_DE.UTF-8";
};
services.displayManager.gdm.enable = true;
services.desktopManager.gnome.enable = true;
services.emacs.enable = false;
services.xserver.xkb = {
layout = "eu";
variant = "";
};
services.printing.enable = true;
services.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
programs.nixcord = {
enable = true;
user = "lucy";
discord.vencord.enable = true;
discord.krisp.enable = true;
discord.openASAR.enable = false;
config.plugins = {
messageLogger.enable = true;
messageClickActions.enable = true;
};
config.enabledThemes = [ "tinted.css" ];
};
users.users."lucy" = {
isNormalUser = true;
description = "lucy";
extraGroups = [
"networkmanager"
"wheel"
];
packages = with pkgs; [
stow
ufetch
rbw
clang
clang-tools
gnumake
emacs
tinty
foot
pinentry-gnome3
git
nixd
nixfmt
xournalpp
btop
chromium
];
};
fonts.packages = with pkgs; [
jetbrains-mono
nerd-fonts.jetbrains-mono
noto-fonts
noto-fonts-cjk-sans
noto-fonts-color-emoji
];
programs.chromium.enable = true;
programs.chromium.extensions = [
"nngceckbapebfimnlniiiahkandclblb" # bitwarden
"ddkjiahejlhfcafbddmgiahcphecmpfh" # ublock origin lite
];
nixpkgs.config.allowUnfree = true;
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
environment.etc = {
"chromium" = {
enable = true;
mode = "symlink";
source = "/home/lucy/.local/share/tinted-theming/tinty/tinted-chromium-build-file.json";
target = "chromium/policies/managed/theme.json";
};
};
system.stateVersion = "26.05"; # Did you read the comment?
}

166
flake.lock generated Executable file
View file

@ -0,0 +1,166 @@
{
"nodes": {
"home-manager": {
"inputs": {
"nixpkgs": [
"nixcord",
"nixpkgs"
]
},
"locked": {
"lastModified": 1790742243,
"narHash": "sha256-kaNo6xHiL31AbNNEreG0OTKf4j6Cxlo5bPawjX7lnbQ=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "e5fcd298a00f08b6e8390baf04aa8edb62203070",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-26.05",
"repo": "home-manager",
"type": "github"
}
},
"nix-darwin": {
"inputs": {
"nixpkgs": [
"nixcord",
"nixpkgs"
]
},
"locked": {
"lastModified": 1783744694,
"narHash": "sha256-2cp6N3rrwnGYLTx9l6N+NI+kwrCWxvJUbj5WJhvB29A=",
"owner": "nix-darwin",
"repo": "nix-darwin",
"rev": "c3e90c89649b07d1a96e4b9dd6cd0d6e44b91a74",
"type": "github"
},
"original": {
"owner": "nix-darwin",
"ref": "nix-darwin-26.05",
"repo": "nix-darwin",
"type": "github"
}
},
"nix-maid": {
"locked": {
"lastModified": 1790770868,
"narHash": "sha256-9OEVMURNKXNBqXxlCXmJ0jv0QHR8CR7A0n7pJKRbOik=",
"ref": "refs/heads/master",
"rev": "13d29cdde641216c0bb7ee8ec3229f865c7dc51a",
"revCount": 134,
"type": "git",
"url": "https://codeberg.org/viperML/nix-maid"
},
"original": {
"type": "git",
"url": "https://codeberg.org/viperML/nix-maid"
}
},
"nixcord": {
"inputs": {
"home-manager": "home-manager",
"nix-darwin": "nix-darwin",
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-ci": "nixpkgs-ci",
"nixpkgs-nixcord": "nixpkgs-nixcord",
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1790763193,
"narHash": "sha256-OTR/sEdqetEuPcWQJRjFz0+XRuYgBXPEAAXe12D3IeM=",
"owner": "4evy",
"repo": "nixcord",
"rev": "6a60ccd7ba6f43b40ea4bb45e905b2d4596a11a5",
"type": "github"
},
"original": {
"owner": "4evy",
"repo": "nixcord",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1790689126,
"narHash": "sha256-ilerN1WLSvF+HMjziC/Wv99J5y02maDH+6hZPwsORKg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b4fd65b198c599cbe814fcb9f42d25d021595ec9",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-ci": {
"locked": {
"lastModified": 1790600678,
"narHash": "sha256-6k3n7X2UsZ6tAlWTz99RimiZab+17tMUrw9sRUcELiA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "f45c6f04c2f013f004bf94e284e95d72898d9393",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-nixcord": {
"locked": {
"lastModified": 1790635395,
"narHash": "sha256-bNyvoIyOCu7lzoCpWKWGIsHpTtERUWzqYWFPlN++WTw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "7fc6f2c20af09cdcaf48b92ec3121860139ec668",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-26.05",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nix-maid": "nix-maid",
"nixcord": "nixcord",
"nixpkgs": "nixpkgs"
}
},
"treefmt-nix": {
"inputs": {
"nixpkgs": [
"nixcord",
"nixpkgs"
]
},
"locked": {
"lastModified": 1786901030,
"narHash": "sha256-WSFCsDSE5ffgD2MqzkM2CYjeFiKhRF/dJUN8uedb6YE=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "27b3b12a8e6375f28ebe122f07d230ca5459bbfa",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

35
flake.nix Executable file
View file

@ -0,0 +1,35 @@
{
description = "A very basic flake";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixcord = {
url = "github:4evy/nixcord";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-maid = {
url = "git+https://codeberg.org/viperML/nix-maid";
};
};
outputs =
inputs@{
self,
nixpkgs,
nixcord,
nix-maid,
}:
{
nixosConfigurations.nerv = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; };
system = "x86_64-linux";
modules = [
inputs.nixcord.nixosModules.nixcord
nix-maid.nixosModules.default
./configuration.nix
./maid.nix
];
};
};
}

33
hardware-configuration.nix Executable file
View file

@ -0,0 +1,33 @@
# Do not modify this file! It was generated by ‘nixos-generate-config’
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/48badf37-8adb-48d0-b861-fbf71cbaddd7";
fsType = "xfs";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/DC66-ACA6";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/3b0e79c9-e3d8-4b58-99b4-63c98309ac85"; }
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

10
maid.nix Normal file
View file

@ -0,0 +1,10 @@
{ pkgs, ... }: {
users.users.lucy.maid = {
gsettings.settings = {
"color-scheme" = "prefer-dark";
"gtk-theme" = "adw-gtk3";
"cursor-theme" = "Adwaita";
"cursor-size" = 24;
};
};
}