summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flake.nix20
-rw-r--r--home-manager/modules/base.nix9
-rw-r--r--hosts/diamond/default.nix5
-rw-r--r--hosts/phosphophyllite/default.nix5
-rw-r--r--nixos/base.nix7
-rw-r--r--nixos/configuration.nix278
-rw-r--r--nixos/hardware-configuration.nix33
7 files changed, 31 insertions, 326 deletions
diff --git a/flake.nix b/flake.nix
index b456354..9295725 100644
--- a/flake.nix
+++ b/flake.nix
@@ -34,6 +34,7 @@
} @ inputs: let
mkHost = {
hostname,
+ username,
system ? "x86_64-linux",
modules ? [],
}:
@@ -45,6 +46,11 @@
{
networking.hostName = hostname;
nixpkgs.overlays = [ ocnix.overlays.default ];
+ users.users.${username} = {
+ isNormalUser = true;
+ extraGroups = [ "networkmanager" "wheel" ];
+ packages = [ ];
+ };
}
ocnix.nixosModules.opencode
home-manager.nixosModules.home-manager
@@ -53,8 +59,10 @@
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.backupFileExtension = "backup";
- home-manager.extraSpecialArgs = { inherit inputs; };
- home-manager.users.phos = import ./home-manager/home.nix;
+ home-manager.extraSpecialArgs = {
+ inherit inputs hostname username;
+ };
+ home-manager.users.${username} = import ./home-manager/home.nix;
}
]
++ modules;
@@ -65,6 +73,7 @@
nixosConfigurations = {
phosphophyllite = mkHost {
hostname = "phosphophyllite";
+ username = "phos";
modules = [
./hosts/phosphophyllite
];
@@ -73,6 +82,7 @@
# Add your laptop here when ready.
# laptop-hostname = mkHost {
# hostname = "laptop-hostname";
+ # username = "dia";
# modules = [ ./hosts/laptop ];
# };
};
@@ -84,7 +94,11 @@
"phos@phosphophyllite" = home-manager.lib.homeManagerConfiguration {
# Home-manager requires 'pkgs' instance
pkgs = nixpkgs.legacyPackages.x86_64-linux; # FIXME replace x86_64-linux with your architecture
- extraSpecialArgs = {inherit inputs;};
+ extraSpecialArgs = {
+ inherit inputs;
+ hostname = "phosphophyllite";
+ username = "phos";
+ };
# > Our main home-manager configuration file <
modules = [./home-manager/home.nix];
};
diff --git a/home-manager/modules/base.nix b/home-manager/modules/base.nix
index 63e2496..8d75e45 100644
--- a/home-manager/modules/base.nix
+++ b/home-manager/modules/base.nix
@@ -1,7 +1,10 @@
-{...}: {
+{
+ username,
+ ...
+}: {
home = {
- username = "phos";
- homeDirectory = "/home/phos";
+ inherit username;
+ homeDirectory = "/home/${username}";
stateVersion = "25.11";
};
diff --git a/hosts/diamond/default.nix b/hosts/diamond/default.nix
new file mode 100644
index 0000000..0668e07
--- /dev/null
+++ b/hosts/diamond/default.nix
@@ -0,0 +1,5 @@
+{ ... }: {
+ imports = [
+ ./hardware-configuration.nix
+ ];
+} \ No newline at end of file
diff --git a/hosts/phosphophyllite/default.nix b/hosts/phosphophyllite/default.nix
index 86a64f9..104cbf1 100644
--- a/hosts/phosphophyllite/default.nix
+++ b/hosts/phosphophyllite/default.nix
@@ -1,4 +1,4 @@
-{...}: {
+{ ... }: {
imports = [
./hardware-configuration.nix
];
@@ -17,7 +17,8 @@
enable = true;
enable32Bit = true;
};
-
+
+
services.pipewire.wireplumber.extraConfig."10-rename-devices" = {
"monitor.alsa.rules" = [
diff --git a/nixos/base.nix b/nixos/base.nix
index 2cb24ce..fd75641 100644
--- a/nixos/base.nix
+++ b/nixos/base.nix
@@ -1,6 +1,5 @@
{
lib,
- pkgs,
...
}: {
nixpkgs = {
@@ -43,12 +42,6 @@
LC_TIME = "sk_SK.UTF-8";
};
- users.users.phos = {
- isNormalUser = true;
- extraGroups = [ "networkmanager" "wheel" ];
- packages = with pkgs; [ ];
- };
-
services.tailscale = {
enable = true;
useRoutingFeatures = "client";
diff --git a/nixos/configuration.nix b/nixos/configuration.nix
deleted file mode 100644
index 5edf510..0000000
--- a/nixos/configuration.nix
+++ /dev/null
@@ -1,278 +0,0 @@
-# This is your system's configuration file.
-# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix)
-{
- inputs,
- lib,
- config,
- pkgs,
- ...
-}: {
- # You can import other NixOS modules here
- imports = [
- # If you want to use modules from other flakes (such as nixos-hardware):
- # inputs.hardware.nixosModules.common-cpu-amd
- # inputs.hardware.nixosModules.common-ssd
-
- # You can also split up your configuration and import pieces of it here:
- # ./users.nix
-
- # Import your generated (nixos-generate-config) hardware configuration
- ./hardware-configuration.nix
- inputs.serpantinum.nixosModules.default
- inputs.spicetify-nix.nixosModules.default
- inputs.helium-flake.nixosModules.default
- inputs.lanzaboote.nixosModules.lanzaboote
- ];
-
- nixpkgs = {
- # You can add overlays here
- overlays = [
- # If you want to use overlays exported from other flakes:
- # neovim-nightly-overlay.overlays.default
-
- # Or define it inline, for example:
- # (final: prev: {
- # hi = final.hello.overrideAttrs (oldAttrs: {
- # patches = [ ./change-hello-to-hi.patch ];
- # });
- # })
- ];
- # Configure your nixpkgs instance
- config = {
- # Disable if you don't want unfree packages
- allowUnfree = true;
- permittedInsecurePackages = ["librewolf-152.0.2-1" "librewolf-unwrapped-152.0.2-1"];
- };
- };
-
- nix = {
- settings = {
- # Enable flakes and new 'nix' command
- experimental-features = "nix-command flakes";
- # Opinionated: disable global registry
- flake-registry = "";
- };
- # Opinionated: disable channels
- channel.enable = false;
- };
-
- # boot.loader.systemd-boot.enable = true;
- boot.loader.systemd-boot.enable = lib.mkForce false;
- boot.loader.efi.canTouchEfiVariables = true;
-
- boot.lanzaboote = {
- enable = true;
- pkiBundle = "/var/lib/sbctl";
- };
-
- networking.hostName = "phosphophyllite"; # Define your hostname.
-
- programs.hyprland = {
- enable = true;
- package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
- portalPackage = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
- xwayland.enable = true;
- };
- services.xserver.enable = true;
- services.displayManager.gdm = {
- enable = true;
- };
- services.desktopManager.gnome.enable = false;
- # Enable networking
- networking.networkmanager.enable = true;
-
- # Set your time zone.
- time.timeZone = "Europe/Bratislava";
-
- # Select internationalisation properties.
- i18n.defaultLocale = "en_US.UTF-8";
-
- i18n.extraLocaleSettings = {
- LC_ADDRESS = "sk_SK.UTF-8";
- LC_IDENTIFICATION = "sk_SK.UTF-8";
- LC_MEASUREMENT = "sk_SK.UTF-8";
- LC_MONETARY = "sk_SK.UTF-8";
- LC_NAME = "sk_SK.UTF-8";
- LC_NUMERIC = "sk_SK.UTF-8";
- LC_PAPER = "sk_SK.UTF-8";
- LC_TELEPHONE = "sk_SK.UTF-8";
- LC_TIME = "sk_SK.UTF-8";
- };
-
- # Configure keymap in X11
- services.xserver.xkb = {
- layout = "us";
- variant = "";
- };
-
- hardware.graphics = {
- enable = true;
- enable32Bit = true; # Critical for Steam/Proton performance
- };
- services.xserver.videoDrivers = [ "nvidia" ];
-
- hardware.nvidia = {
- modesetting.enable = true;
- powerManagement.enable = false;
- powerManagement.finegrained = false;
- open = false; # Set to true if you prefer NVIDIA open kernel modules
- nvidiaSettings = true;
- };
-
- # Define a user account. Don't forget to set a password with ‘passwd’.
- users.users."phos" = {
- isNormalUser = true;
- extraGroups = [ "networkmanager" "wheel" ];
- packages = with pkgs; [];
- };
-
- services.pipewire = {
- enable = true;
- alsa.enable = true;
- alsa.support32Bit = true;
- pulse.enable = true;
-
- wireplumber.extraConfig."10-rename-devices" = {
- "monitor.alsa.rules" = [
- {
- matches = [
- {
- "node.name" = "alsa_output.pci-0000_0a_00.4.analog-stereo";
- }
- ];
- actions = {
- update-props = {
- "node.description" = "Speakers";
- };
- };
- }
- {
- matches = [
- {
- "node.name" = "alsa_output.pci-0000_08_00.1.hdmi-stereo";
- }
- ];
- actions = {
- update-props = {
- "device.disabled" = true;
- };
- };
- }
- # Example for your HyperX headset (replace with full name from wpctl status):
- {
- matches = [
- {
- "node.name" = "alsa_output.usb-HP__Inc_HyperX_Cloud_II_Core_Wireless-00";
- }
- ];
- actions = {
- update-props = {
- "node.description" = "HyperX Cloud II";
- };
- };
- }
- ];
-};
- };
-
- services.tailscale = {
- # Enable tailscale at startup
- enable = true;
- useRoutingFeatures = "client";
- # If you would like to use a preauthorized key, set
- # authKeyFile = "/run/secrets/tailscale_key";
- # Note: maximum expire time is 90 days
- };
-fonts.packages = with pkgs; [
- nerd-fonts.jetbrains-mono
- # If you are on an older NixOS version (24.05 or prior), use this syntax instead:
- # (nerdfonts.override { fonts = [ "JetBrainsMono" ]; })
-];
- environment.systemPackages = with pkgs; [
- sbctl
- wget
- foot
- starship
- fastfetch
- git
- neovim
- qemu
- firefox-bin
- cliphist
- easyeffects
- vscodium
- tmux
- pulseaudio
- inotify-tools
- matugen
- pipes
- vesktop
- claude-code
- bibata-cursors
- wl-clipboard
- uv
- adw-gtk3
- papirus-icon-theme
- papirus-folders
- glib
- cliphist
- opencode
- gamescope
- godot_4-mono
- inputs.serpantinum.packages.${pkgs.stdenv.hostPlatform.system}.default
- (prismlauncher.override {
- # Include required JDKs for various Minecraft versions
- jdks = [
- zulu8 # < 1.17
- zulu17 # 1.18 – 1.20.4
- zulu21 # >= 1.20.5
- ];
- # Optional tools needed by specific mods
- additionalPrograms = [ ffmpeg ];
- })
- ];
-
- programs.direnv.enable = true;
-
- programs.helium = {
- enable = true;
- flags = [
- "--ozone-platform-hint=auto" # Enables native Wayland for Hyprland
- ];
- };
-
- programs.thunar.enable = true;
- services.flatpak.enable = true;
-
- programs.ssh = {
- startAgent = true;
- };
-
- programs.steam = {
- enable = true;
- gamescopeSession.enable = true;
- };
-
-programs.spicetify = let
- spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.stdenv.hostPlatform.system};
-in {
- enable = true;
- theme = {
- name = "Matugen";
- src = ./spicetify-theme;
- injectCss = true;
- replaceColors = true;
- overwriteAssets = false;
- };
- colorScheme = "Matugen";
- enabledExtensions = with spicePkgs.extensions; [
- adblock
- shuffle
- ];
-};
-
- programs.dconf.enable = true;
- programs.serpantinum.enable = true;
- # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
- system.stateVersion = "25.11";
-}
diff --git a/nixos/hardware-configuration.nix b/nixos/hardware-configuration.nix
deleted file mode 100644
index 0ce8cdf..0000000
--- a/nixos/hardware-configuration.nix
+++ /dev/null
@@ -1,33 +0,0 @@
-# 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/95d04e16-97f5-4dda-bd99-eebcfece01f7";
- fsType = "ext4";
- };
-
- fileSystems."/boot" =
- { device = "/dev/disk/by-uuid/EE61-21CA";
- fsType = "vfat";
- options = [ "fmask=0077" "dmask=0077" ];
- };
-
- swapDevices =
- [ { device = "/dev/disk/by-uuid/a0e6ef0c-6429-466c-964b-67b4656e8027"; }
- ];
-
- nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
- hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
-}