Changed how additonal home manager modules are imported. Started work on desktop environment specific specialisations. Started actually configuring hyprland

This commit is contained in:
2025-11-11 10:59:44 +01:00
parent 12daec0fee
commit ee522bd869
12 changed files with 312 additions and 90 deletions

View File

@ -26,6 +26,28 @@
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
specialisation = {
gaming = {
configuration = {
imports = [
./plasma/kde-plasma.nix
];
programs.gamemode.enable = true;
};
};
minimal = {
inheritParentConfig = false;
configuration = {
imports = [
./minimal.nix
];
};
};
};
# Bootloader. # Bootloader.
boot.loader = { boot.loader = {
systemd-boot.enable = false; systemd-boot.enable = false;
@ -99,6 +121,8 @@
fprintd.tod.enable = true; fprintd.tod.enable = true;
fprintd.tod.driver = pkgs.libfprint-2-tod1-goodix; fprintd.tod.driver = pkgs.libfprint-2-tod1-goodix;
fwupd.enable = true; #Allows BIOS updates
locate = { locate = {
enable = true; enable = true;
package = pkgs.plocate; package = pkgs.plocate;
@ -137,7 +161,7 @@
displayManager = { displayManager = {
sddm = { sddm = {
enable = true; enable = false;
theme = "breeze"; theme = "breeze";
wayland.enable = true; wayland.enable = true;
}; };
@ -233,16 +257,9 @@
#So no user in the group Wheel has to input the password in order to use sudo #So no user in the group Wheel has to input the password in order to use sudo
security.sudo.wheelNeedsPassword = false; security.sudo.wheelNeedsPassword = false;
# #Install firefox.
#programs.firefox.enable = true;
#Enabled in a separate firefox.nix
#Allow Nix Commands #Allow Nix Commands
nix.settings.experimental-features = [ "nix-command" "flakes" ]; nix.settings.experimental-features = [ "nix-command" "flakes" ];
#To allow the Flake to build all packages (Too many open files error)
#systemd.services.nix-deamon.serviceConfig.LimitNOFILE = 100000;
# Allow unfree packages # Allow unfree packages
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;

79
flake.lock generated
View File

@ -213,6 +213,21 @@
"type": "github" "type": "github"
} }
}, },
"nixos-hardware": {
"locked": {
"lastModified": 1761933221,
"narHash": "sha256-rNHeoG3ZrA94jczyLSjxCtu67YYPYIlXXr0uhG3wNxM=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "7467f155fcba189eb088a7601f44fbef7688669b",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixos-hardware",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1760692209, "lastModified": 1760692209,
@ -245,6 +260,30 @@
"type": "github" "type": "github"
} }
}, },
"noctalia": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"quickshell": [
"quickshell"
],
"systems": "systems"
},
"locked": {
"lastModified": 1762462253,
"narHash": "sha256-WAgPlZkOpYNE/vgo4yNf5HnviFnYe8g0hQ7QsJFkXgU=",
"owner": "noctalia-dev",
"repo": "noctalia-shell",
"rev": "c6a9db6d8493d1fe5c1d533e13e628ff0d62a3ee",
"type": "github"
},
"original": {
"owner": "noctalia-dev",
"repo": "noctalia-shell",
"type": "github"
}
},
"nur": { "nur": {
"inputs": { "inputs": {
"flake-parts": [ "flake-parts": [
@ -270,12 +309,35 @@
"type": "github" "type": "github"
} }
}, },
"quickshell": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1761897390,
"narHash": "sha256-er4gYrIoThYLjlsOMTysoRfn67d1Gci+ZpqDrtQxrA0=",
"owner": "outfoxxed",
"repo": "quickshell",
"rev": "fc704e6b5d445899a1565955268c91942a4f263f",
"type": "github"
},
"original": {
"owner": "outfoxxed",
"repo": "quickshell",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"grub2-themes": "grub2-themes", "grub2-themes": "grub2-themes",
"home-manager": "home-manager", "home-manager": "home-manager",
"nix-flatpak": "nix-flatpak", "nix-flatpak": "nix-flatpak",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_2",
"noctalia": "noctalia",
"quickshell": "quickshell",
"stylix": "stylix", "stylix": "stylix",
"zen-browser": "zen-browser" "zen-browser": "zen-browser"
} }
@ -293,7 +355,7 @@
"nixpkgs" "nixpkgs"
], ],
"nur": "nur", "nur": "nur",
"systems": "systems", "systems": "systems_2",
"tinted-foot": "tinted-foot", "tinted-foot": "tinted-foot",
"tinted-kitty": "tinted-kitty", "tinted-kitty": "tinted-kitty",
"tinted-schemes": "tinted-schemes", "tinted-schemes": "tinted-schemes",
@ -329,6 +391,21 @@
"type": "github" "type": "github"
} }
}, },
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"tinted-foot": { "tinted-foot": {
"flake": false, "flake": false,
"locked": { "locked": {

View File

@ -4,6 +4,8 @@
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05"; nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
nixos-hardware.url = "github:NixOS/nixos-hardware"; #To Provide Framework13 hardware modules
home-manager.url = "github:nix-community/home-manager/release-25.05"; home-manager.url = "github:nix-community/home-manager/release-25.05";
home-manager.inputs.nixpkgs.follows = "nixpkgs"; home-manager.inputs.nixpkgs.follows = "nixpkgs";
@ -13,54 +15,66 @@
stylix.url = "github:nix-community/stylix"; stylix.url = "github:nix-community/stylix";
stylix.inputs.nixpkgs.follows = "nixpkgs"; stylix.inputs.nixpkgs.follows = "nixpkgs";
quickshell = {
url = "github:outfoxxed/quickshell";
inputs.nixpkgs.follows = "nixpkgs";
};
noctalia = {
url = "github:noctalia-dev/noctalia-shell";
inputs.nixpkgs.follows = "nixpkgs";
inputs.quickshell.follows = "quickshell";
};
nix-flatpak.url = "github:gmodena/nix-flatpak"; nix-flatpak.url = "github:gmodena/nix-flatpak";
grub2-themes.url = "github:vinceliuice/grub2-themes"; grub2-themes.url = "github:vinceliuice/grub2-themes";
}; };
outputs = inputs@{ nixpkgs, home-manager, stylix, zen-browser, grub2-themes, nix-flatpak, ... }: outputs = inputs@{ nixpkgs, home-manager, nixos-hardware ,stylix, zen-browser, grub2-themes, nix-flatpak, ... }:
let let
username = "cookiez"; username = "cookiez";
version = "25.05"; version = "25.05";
system = "x86_64-linux"; system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; }; pkgs = import nixpkgs { inherit system; };
hyprlandEnabled = false; hyprlandEnabled = true;
plasmaEnabled = true; plasmaEnabled = false;
in framework13 = true;
{ in
nixosConfigurations = { {
#Replace the below with your hostname!!! Like: {hostname} = nixpkgs.lib.nixosSystem { nixosConfigurations = {
nixos = nixpkgs.lib.nixosSystem { #Replace the below with your hostname!!! Like: {hostname} = nixpkgs.lib.nixosSystem {
inherit system; nixos = nixpkgs.lib.nixosSystem {
specialArgs = { inherit system;
inherit inputs username version hyprlandEnabled; specialArgs = {
}; inherit inputs username version;
modules = [
./configuration.nix
./firefox.nix
./boot-splash.nix
./zsh.nix
./neovim.nix
./packages.nix
grub2-themes.nixosModules.default
nix-flatpak.nixosModules.nix-flatpak
stylix.nixosModules.stylix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.${username} = ./home.nix;
home-manager.backupFileExtension = "backup"; # Automatically backs up conflicting files during activation
home-manager.extraSpecialArgs = { inherit inputs username version hyprlandEnabled; system = "x86_64-linux"; };
}
#Conditional Modules!
] ++ (if hyprlandEnabled then [ ./hyprland/hyprland.nix ] else [ ]) ++ [
] ++ (if plasmaEnabled then [ ./plasma/kde-plasma.nix ] else [ ]) ++ [
];
}; };
modules = [
./configuration.nix
./firefox.nix
./boot-splash.nix
./zsh.nix
./neovim.nix
./packages.nix
grub2-themes.nixosModules.default
nix-flatpak.nixosModules.nix-flatpak
stylix.nixosModules.stylix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.${username} = ./home.nix;
home-manager.backupFileExtension = "backup"; # Automatically backs up conflicting files during activation
home-manager.extraSpecialArgs = { inherit inputs username version; system = "x86_64-linux"; };
}
#Conditional Modules!
] ++ (if hyprlandEnabled then [ ./hyprland/hyprland.nix ] else [ ]) ++ [
] ++ (if plasmaEnabled then [ ./plasma/plasma.nix ] else [ ]) ++ [
] ++ (if framework13 then [ nixos-hardware.nixosModules.framework-13-7040-amd ] else [ ]) ++ [
];
}; };
}; };
};
} }

View File

@ -1,6 +1,5 @@
{ lib, inputs, config, pkgs, username, version, hyprlandEnabled, ... }: { lib, inputs, config, pkgs, username, version, ... }:
{ {
# Home Manager needs a bit of information about you and the # Home Manager needs a bit of information about you and the
# paths it should manage. # paths it should manage.
home.username = username; home.username = username;
@ -12,8 +11,7 @@
# or inputs.zen-browser.homeModules.twilight-official # or inputs.zen-browser.homeModules.twilight-official
./neovim-home.nix ./neovim-home.nix
./desktop-entries.nix ./desktop-entries.nix
] ];
++ lib.optional hyprlandEnabled ./hyprland/hyprland-home.nix;
# This value determines the Home Manager release that your # This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage # configuration is compatible with. This helps avoid breakage

21
hyprland/autostart.nix Normal file
View File

@ -0,0 +1,21 @@
{ config, pkgs, ... }:
{
#to show logs of services run: journalctl --user-unit={service-name} --user
systemd.user.services.autostart-noctalia = {
enable = false;
description = "automatically start noctalia shell";
after = [ "graphical-session.target" ];
wantedBy = [ "graphical-session.target" ];
partOf = [ "graphical-session.target" ];
serviceConfig = {
ExecStart = [ "qs -c noctalia-shell" ];
Restart = "on-failure";
RestartSec = "1s";
};
};
}

View File

@ -1,33 +1,27 @@
{pkgs, inputs, ...}:
{ {
imports = [
inputs.noctalia.homeModules.default
];
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
enable = true; enable = true;
xwayland.enable = true; xwayland.enable = true;
#settings = { #settings = {
# bind = [ # bind = [
# "SUPER, Space, pkill rofi || rofi -show drun -modi drun,filebrowser,run,window" # "SUPER, Space, pkill rofi || rofi -show drun -modi drun,filebrowser,run,window"
# ]; # ];
#}; #};
extraConfig = builtins.readFile ./hyprland.conf; extraConfig = builtins.readFile ./hyprland.conf;
};
#extraConfig = programs = {
# '' noctalia-shell = {
# input { #enable = true;
# kb_layout = de systemd.enable = true;
# # kb_variant = };
# # kb_model =
# # kb_rules =
# # kb_options = caps:Super_L
# # follow_mouse = 1
# # accel_profile = flat
# # force_no_accel = true
# # touchpad {
# # natural_scroll = no
# #}
# #sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
# #}
# '';
}; };
} }

View File

@ -37,10 +37,12 @@ $menu = wofi --show drun
# Autostart necessary processes (like notifications daemons, status bars, etc.) # Autostart necessary processes (like notifications daemons, status bars, etc.)
# Or execute your favorite apps at launch like this: # Or execute your favorite apps at launch like this:
#USE autostart.nix INSTEAD OF THIS!!!
# exec-once = $terminal # exec-once = $terminal
# exec-once = nm-applet & # exec-once = nm-applet &
# exec-once = waybar & hyprpaper & firefox # exec-once = waybar & hyprpaper & firefox
# exec-once = qs -c noctalia-shell
############################# #############################
### ENVIRONMENT VARIABLES ### ### ENVIRONMENT VARIABLES ###
@ -68,7 +70,7 @@ env = HYPRCURSOR_SIZE,24
# permission = /usr/(lib|libexec|lib64)/xdg-desktop-portal-hyprland, screencopy, allow # permission = /usr/(lib|libexec|lib64)/xdg-desktop-portal-hyprland, screencopy, allow
# permission = /usr/(bin|local/bin)/hyprpm, plugin, allow # permission = /usr/(bin|local/bin)/hyprpm, plugin, allow
#
##################### #####################
### LOOK AND FEEL ### ### LOOK AND FEEL ###
##################### #####################
@ -264,8 +266,8 @@ bind = $mainMod SHIFT, 9, movetoworkspace, 9
bind = $mainMod SHIFT, 0, movetoworkspace, 10 bind = $mainMod SHIFT, 0, movetoworkspace, 10
# Example special workspace (scratchpad) # Example special workspace (scratchpad)
bind = $mainMod, S, togglespecialworkspace, magic #bind = $mainMod, S, togglespecialworkspace, magic
bind = $mainMod SHIFT, S, movetoworkspace, special:magic #bind = $mainMod SHIFT, S, movetoworkspace, special:magic
# Scroll through existing workspaces with mainMod + scroll # Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, workspace, e+1 bind = $mainMod, mouse_down, workspace, e+1

View File

@ -1,15 +1,25 @@
{ config, pkgs, ... }: { config, inputs, pkgs, ... }:
{ {
imports = [
./autostart.nix
];
home-manager.sharedModules = [
./hyprland-home.nix
];
environment.systemPackages = with pkgs; environment.systemPackages = with pkgs;
[ [
(waybar.overrideAttrs (oldAttrs: { (waybar.overrideAttrs (oldAttrs: {
mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ]; mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ];
}) })
) )
dunst dunst
libnotify libnotify
hyprpaper hyprpaper
sway #Sway Wayland compositor sway #Sway Wayland compositor
inputs.noctalia.packages.${system}.default
#inputs.noctalia.nixosModules.default
#kitty #Terminal (Already Included by default) #kitty #Terminal (Already Included by default)
rofi-wayland #Search bar (Meta + Space) rofi-wayland #Search bar (Meta + Space)
@ -19,13 +29,15 @@
hyprland = { hyprland = {
enable = true; enable = true;
xwayland.enable = true; xwayland.enable = true;
withUWSM = true; withUWSM = false;
}; };
waybar.enable = true; waybar.enable = true;
#rofi.enable = true; #rofi.enable = true;
}; };
# services.noctalia-shell.enable = true;
#services.xserver.enable = true; #services.xserver.enable = true;
#services.xserver.displayManager.sddm.enable = true; #services.xserver.displayManager.sddm.enable = true;

77
minimal.nix Normal file
View File

@ -0,0 +1,77 @@
#Access Internet using:
#nmcli device wifi list
#nmcli device wifi connect <ssid> password <password>
# or if no password (open wifi)
#nmcli device wifi connect <ssid>
{ config, pkgs, lib, username, ... }:
{
imports =
[
./hardware-configuration.nix
];
#networking.hostName = "nixos";
# Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "Europe/Berlin";
# Select internationalisation properties.
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 = {
# Enable the OpenSSH daemon.
openssh.enable = true;
};
# Configure console keymap
console.keyMap = "de";
# Define a user account. Don't forget to set a password with passwd.
users.users.cookiez = {
isNormalUser = true;
description = "Cookiez";
extraGroups = [ "networkmanager" "wheel" "docker" ];
packages = with pkgs; [
#User Packages Here
];
};
virtualisation.docker.enable = true;
#So no user in the group Wheel has to input the password in order to use sudo
security.sudo.wheelNeedsPassword = false;
#Allow Nix Commands
nix.settings.experimental-features = [ "nix-command" "flakes" ];
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
environment.variables = {
EDITOR = "nvim";
# XKB_DEFAULT_LAYOUT = "de";
};
environment.sessionVariables = {
NIXOS_OZONE_WL = "1"; #For chromium to work under wayland and with virtual Keyboards (Only really needed for virtual keyboards, but doest hurt ...)
TERMINAL = "kitty";
};
}

View File

@ -75,6 +75,7 @@
moonlight-qt moonlight-qt
kitty kitty
tdrop tdrop
wmctrl #To Force windows into fullscreen
#CLI tools #CLI tools
pdftk pdftk

9
plasma/plasma-home.nix Normal file
View File

@ -0,0 +1,9 @@
{pkgs, inputs, ...}:
{
imports = [
];
programs = {
};
}