wip - fixes to import and config location

This commit is contained in:
Remy Moll 2025-01-30 10:54:27 +01:00
parent 1cd68c8ce1
commit 5c79c29b7d
10 changed files with 110 additions and 109 deletions

View File

@ -42,5 +42,6 @@ This will create an iso image in the result directory.
## Inspirations
- https://github.com/the-nix-way/dev-templates
- https://fasterthanli.me/series/building-a-rust-service-with-nix/part-10
- https://codeberg.org/theDoctor/nixOS-config
- https://ianthehenry.com/posts/how-to-learn-nix/profiles/
- https://ianthehenry.com/posts/how-to-learn-nix/profiles/
- https://github.com/JohnRTitor/nix-conf
- https://github.com/mwaldleben/nix-config

View File

@ -55,6 +55,9 @@
inputs.nix-flatpak.homeManagerModules.nix-flatpak
inputs.walker.homeManagerModules.default
];
nixpkgs.overlays = [ inputs.hyprpanel.overlay ];
# _module.args = { inherit inputs; };
}
];
};

View File

@ -4,7 +4,6 @@
imports = [
./configuration.nix
./hardware-configuration.nix
../../modules/nixos/flatpak.nix
../../modules/nixos/hyprland.nix
../../modules/nixos/monitoring.nix
../../modules/nixos/nvidia.nix

View File

@ -1,19 +1,24 @@
{ lib, ... }: {
{ lib, pkgs, ... }: {
services.flatpak.enable = true;
services.flatpak.update.auto.enable = false;
services.flatpak.uninstallUnmanaged = false;
# services.flatpak.enable = true;
# xdg.portal.enable = true;
# # install the xdg-desktop-portal-gtk package
# # to enable the portal service
# xdg.portal.extraPortals = with pkgs; [
# xdg-desktop-portal-gtk
# ];
# services.flatpak.update.auto.enable = false;
# services.flatpak.uninstallUnmanaged = false;
services.flatpak.packages = [
"com.calibre_ebook.calibre"
"com.github.flxzt.rnote"
"com.github.tchx84.Flatseal"
"com.spotify.Client"
"io.podman_desktop.PodmanDesktop"
"org.pipewire.Helvum"
"io.github.zen_browser.zen"
"im.riot.Riot"
];
# services.flatpak.packages = [
# "com.calibre_ebook.calibre"
# "com.github.flxzt.rnote"
# "com.github.tchx84.Flatseal"
# "com.spotify.Client"
# "io.podman_desktop.PodmanDesktop"
# "org.pipewire.Helvum"
# "io.github.zen_browser.zen"
# "im.riot.Riot"
# ];
}

View File

@ -1,8 +1,10 @@
{inputs, pkgs, ...}:
{
programs.kitty.enable = true;
wayland.windowManager.hyprland = {
enable = true;
systemd.enable = true;
settings = {
"$mod" = "SUPER";
bind =
@ -10,33 +12,65 @@
"$mod, F, exec, firefox"
"$mod, return, exec, walker"
"$mod_SHIFT, return, exec, kitty"
"$mod_SHIFT, q, kill"
"$mod, s, exec, code"
];
# plugin.virtual-desktops = {
general = {
gaps_in = 5;
gaps_out = 5;
border_size = 1;
};
misc = {
disable_hyprland_logo = true;
};
# }
exec-once = [
"${pkgs.hyprpanel}/bin/hyprpanel"
];
input = {
kb_layout = "de";
};
decoration = {
rounding = 5;
};
# plugin.virtual-desktops = {}
};
plugins = [
# Touch gestures: https://github.com/horriblename/hyprgrass
inputs.hyprgrass.packages.${pkgs.system}.default
# inputs.hyprgrass.packages.${pkgs.system}.default
# Virtual desktops: https://github.com/levnikmyskin/hyprland-virtual-desktops
# inputs.hyprland-virtual-desktops.packages.${pkgs.system}.virtual-desktops
];
};
imports = [ inputs.hyprpanel.homeManagerModules.hyprpanel ];
# the overlay makes this available as a home manager module
programs.hyprpanel = {
enable = true;
hyprland.enable = true;
overwrite.enable = true;
overlay.enable = true;
settings = {
bar = {
clock.format = "%H:%M";
clock.showIcon = false;
launcher.icon = "🚀";
};
};
# Add custom widgets + styling
};
programs.walker = {
enable = true;
runAsService = true;
# All options from the config.json can be used here.
config = {
search.placeholder = "Example";
search.placeholder = "Search";
ui.fullscreen = true;
list = {
height = 200;
@ -53,8 +87,21 @@
# '';
};
# # Set waybar config
# ".config/waybar/config".text = ''
# ''
programs.hyprlock = {
enable = true;
settings = {
general = {
grace = 5;
no_fade_in = false;
disable_loading_bar = false;
};
};
# Style the lock screen
};
services.network-manager-applet = {
enable = true;
};
}

View File

@ -1,9 +0,0 @@
{
config,
lib,
pkgs,
...
}:
{
services.flatpak.enable = true;
}

View File

@ -1,45 +0,0 @@
{
config,
lib,
pkgs,
...
}:
{
# this actually does not enable xorg, but it is required for GDM
services.xserver.enable = true;
services.xserver.displayManager.gdm.enable = true;
services.xserver.desktopManager.gnome.enable = true;
# here we set wayland to be used
services.xserver.displayManager.gdm.wayland = true;
## Slim down the gnome dependencies
environment.gnome.excludePackages = (with pkgs; [
gnome-photos
gnome-tour
geary
gedit
tali
gnome-music
cheese
epiphany
gnome-calendar
gnome-maps
simple-scan
yelp
gnome-disk-utility
gnome-notes
gnome-weather
gnome-secrets
gnome-characters
gnome-font-viewer
gnome-system-monitor
gnome-text-editor
gnome-connections
gnome-clocks
baobab
gnome-contacts
gnome-logs
]);
}

View File

@ -5,31 +5,21 @@
...
}:
{
programs.uwsm.enable = true;
# Use hyprland as the main desktop environment but use gdm as desktop manager
programs.hyprland = {
enable = true;
xwayland.enable = false;
withUWSM = true;
};
# launch hyprland on login
# systemd.services.hyprland = {
# description = "Hyprland";
# wantedBy = [ "graphical.target" ];
# after = [ "display-manager.service" ];
# serviceConfig = {
# Type = "simple";
# ExecStart = "${pkgs.hyprland}/bin/hyprland";
# Restart = "always";
# RestartSec = "5";
# User = config.var.username;
# };
# };
environment.systemPackages = with pkgs; [
waybar
];
services.displayManager = {
defaultSession = "hyprland";
};
services.xserver.displayManager.gdm = {
enable = true;
wayland = true;
};
}

View File

@ -0,0 +1,4 @@
{lib, ...}:{
networking.networkmanager.enable = true;
networking.networkmanager.wifi.powersave = lib.mkDefault true;
}

View File

@ -47,12 +47,12 @@
# In the global configuration, we blacklist the nouveau driver and load the nvidia driver
boot.extraModprobeConfig = lib.mkDefault ''
boot.extraModprobeConfig = ''
blacklist nouveau
options nouveau modeset=0
'';
services.udev.extraRules = lib.mkDefault ''
services.udev.extraRules = ''
# Remove NVIDIA USB xHCI Host Controller devices, if present
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c0330", ATTR{power/control}="auto", ATTR{remove}="1"
# Remove NVIDIA USB Type-C UCSI devices, if present
@ -61,10 +61,12 @@
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x040300", ATTR{power/control}="auto", ATTR{remove}="1"
# Remove NVIDIA VGA/3D controller devices
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030000", ATTR{power/control}="auto", ATTR{remove}="1"
# Remove the whole bridge responsible for the VGA/3D controller
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{class}=="0x060400", ATTR{power/control}="auto", ATTR{remove}="1"
'';
# # Remove the whole bridge responsible for the VGA/3D controller
# ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{class}=="0x060400", ATTR{power/control}="auto", ATTR{remove}="1"
# # somehow the udev rules are not enough to prevent the nouveau driver from loading
# # Also unload remove the bus by id manually
# # unload 0000:01:00.1 and 0000:01:00.0
@ -86,5 +88,9 @@
boot.blacklistedKernelModules = lib.mkDefault [ "nouveau" "nvidia" "nvidia_drm" "nvidia_modeset" ];
boot.blacklistedKernelModules = [ "nouveau" "nvidia" "nvidia_drm" "nvidia_modeset" ];
}
# Warning: used to have
# lib.mkdDefault