Compare commits

..

6 Commits

Author SHA1 Message Date
Christian Ott 9c610c086a working hyprlock 2 years ago
Christian Ott 566976b50a hyprland: initial dunst configuration and xdg portal 2 years ago
Christian Ott 3f5be7bb74 ♲ extract hyprland into own module 2 years ago
Christian Ott cc0a856bd8 🧱 Improve system config 2 years ago
Christian Ott c15ecb2f45 Use tuigreet as greeter for Hyprland and Gnome sessions 2 years ago
Christian Ott 10bddd9ec8 Add hyprland 2 years ago
  1. 26
      configuration.nix
  2. 51
      flake.lock
  3. 9
      flake.nix
  4. 32
      greeter.nix
  5. 12
      home.nix
  6. 121
      hyperland/default.nix
  7. 100
      modules/dunst.nix

@ -43,12 +43,29 @@
# Enable the X11 windowing system.
services.xserver.enable = true;
programs.hyprland.enable = true;
# Enable the GNOME Desktop Environment.
services.xserver.displayManager.gdm.enable = true;
services.xserver.displayManager.gdm.enable = false;
services.xserver.desktopManager.gnome.enable = true;
services.fwupd.enable = true;
# AMD has better battery life with PPD over TLP:
# https://community.frame.work/t/responded-amd-7040-sleep-states/38101/13
services.power-profiles-daemon.enable = true;
# For fingerprint support
services.fprintd.enable = true;
# Needed for desktop environments to detect/manage display brightness
hardware.sensor.iio.enable = true;
# Trim ssd for longer life and better storage
services.fstrim.enable = true;
# Enable non-root access to QMK firmware
hardware.keyboard.qmk.enable = true;
# Configure keymap in X11
# services.xserver.xkb.layout = "us";
# services.xserver.xkb.options = "eurosign:e,caps:escape";
@ -76,6 +93,11 @@
tree
];
};
xdg.portal = {
enable = true;
extraPortals = [ pkgs.xdg-desktop-portal-hyprland ];
configPackages = [ pkgs.xdg-desktop-portal-hyprland ];
};
# List packages installed in system profile. To search, run:
# $ nix search wget

@ -1,5 +1,21 @@
{
"nodes": {
"base16-schemes": {
"flake": false,
"locked": {
"lastModified": 1696158499,
"narHash": "sha256-5yIHgDTPjoX/3oDEfLSQ0eJZdFL1SaCfb9d6M0RmOTM=",
"owner": "tinted-theming",
"repo": "base16-schemes",
"rev": "a9112eaae86d9dd8ee6bb9445b664fba2f94037a",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "base16-schemes",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@ -21,6 +37,25 @@
"type": "github"
}
},
"nix-colors": {
"inputs": {
"base16-schemes": "base16-schemes",
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1707825078,
"narHash": "sha256-hTfge2J2W+42SZ7VHXkf4kjU+qzFqPeC9k66jAUBMHk=",
"owner": "misterio77",
"repo": "nix-colors",
"rev": "b01f024090d2c4fc3152cd0cf12027a7b8453ba1",
"type": "github"
},
"original": {
"owner": "misterio77",
"repo": "nix-colors",
"type": "github"
}
},
"nixos-hardware": {
"locked": {
"lastModified": 1714465198,
@ -53,6 +88,21 @@
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1697935651,
"narHash": "sha256-qOfWjQ2JQSQL15KLh6D7xQhx0qgZlYZTYlcEiRuAMMw=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "e1e11fdbb01113d85c7f41cada9d2847660e3902",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1713248628,
@ -72,6 +122,7 @@
"root": {
"inputs": {
"home-manager": "home-manager",
"nix-colors": "nix-colors",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable"

@ -5,13 +5,14 @@
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
nix-colors.url = "github:misterio77/nix-colors";
home-manager = {
url = github:nix-community/home-manager/release-23.11;
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, nixpkgs-unstable, nixos-hardware, home-manager, ... }@inputs:
outputs = { self, nixpkgs, nixpkgs-unstable, nixos-hardware, home-manager, nix-colors, ... }@inputs:
let
username = "chrigi";
lib = nixpkgs.lib;
@ -24,14 +25,18 @@
};
in {
nixosConfigurations.nix-fw16 = lib.nixosSystem {
specialArgs = {
inherit pkgs-unstable;
};
modules = [
./configuration.nix
./greeter.nix
nixos-hardware.nixosModules.framework-16-7040-amd
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.${username} = import ./home.nix;
home-manager.extraSpecialArgs = {inherit pkgs-unstable username; };
home-manager.extraSpecialArgs = {inherit pkgs-unstable username nix-colors; };
}
];
};

@ -0,0 +1,32 @@
{ config, pkgs, pkgs-unstable, lib, ... }:
let
tuigreet = "${pkgs-unstable.greetd.tuigreet}/bin/tuigreet";
hyprland-session = "${pkgs-unstable.hyprland}/share/wayland-sessions";
# https://github.com/bytemouse/config/blob/48d9be51a9666c9b62f4b8e84322b9d892ee0aea/modules/gnome.nix#L11
gnome-script = pkgs.writeShellScriptBin "gnome-script" ''
export XDG_SESSION_TYPE=wayland
${pkgs.dbus}/bin/dbus-run-session ${pkgs.gnome.gnome-session}/bin/gnome-session
'';
gnome-desktop = pkgs.makeDesktopItem {
name = "gnome-desktop";
desktopName = "Gnome Desktop";
exec = "${gnome-script}/bin/gnome-script";
terminal = true;
};
in {
services.greetd = {
enable = true;
settings = {
default_session = {
command = "${tuigreet} --time --remember --greeting Hoi! --remember-session --sessions ${hyprland-session}:${gnome-desktop}/share/applications";
user = "greeter";
};
};
};
environment.systemPackages = with pkgs-unstable; [ greetd.tuigreet ];
}

@ -1,18 +1,28 @@
{ config, pkgs, pkgs-unstable, username, ... }:
{ config, pkgs, pkgs-unstable, nix-colors, username, ... }:
{
imports = [
nix-colors.homeManagerModules.default
./modules/dunst.nix
./hyperland
];
colorScheme = nix-colors.colorSchemes.gruvbox-material-dark-hard;
# TODO please change the username & home directory to your own
home.username = "${username}";
home.homeDirectory = "/home/${username}";
# Packages that should be installed to the user profile.
home.packages = with pkgs; [
kitty
eza
pkgs-unstable.obsidian
jq
pkgs-unstable._1password
pkgs-unstable._1password-gui
pkgs-unstable.skypeforlinux
pkgs-unstable.hyprlock
];
programs.ssh = {

@ -0,0 +1,121 @@
{ config, pkgs, pkgs-unstable, username, ... }:
{
home.packages = with pkgs; [
dunst
waybar
swww
rofi
# (pkgs.waybar.overrideAttrs (oldAttrs: {
# mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ];
# }))
];
home.file.".config/hypr/hyprlock.conf".text =
''
background {
monitor =
# path = screenshot
color = rgba(152, 179, 166, 0.9)
blur_passes = 1
blur_size = 7
noise = 0.0117
contrast = 0.8916
brightness = 0.8172
vibrancy = 0.1696
vibrancy_darkness = 0.0
}
input-field {
monitor =
size = 200, 50
outline_thickness = 3
dots_size = 0.33 # Scale of input-field height, 0.2 - 0.8
dots_spacing = 0.15 # Scale of dots' absolute size, 0.0 - 1.0
dots_center = true
dots_rounding = -1 # -1 default circle, -2 follow input-field rounding
outer_color = rgb(151515)
inner_color = rgb(200, 200, 200)
font_color = rgb(10, 10, 10)
fade_on_empty = true
fade_timeout = 1000 # Milliseconds before fade_on_empty is triggered.
placeholder_text = <i>Input Password...</i> # Text rendered in the input box when it's empty.
hide_input = false
rounding = -1 # -1 means complete rounding (circle/oval)
check_color = rgb(204, 136, 34)
fail_color = rgb(204, 34, 34) # if authentication failed, changes outer_color and fail message color
fail_text = <i>$FAIL <b>($ATTEMPTS)</b></i> # can be set to empty
fail_transition = 300 # transition time in ms between normal outer_color and fail_color
capslock_color = -1
numlock_color = -1
bothlock_color = -1 # when both locks are active. -1 means don't change outer color (same for above)
invert_numlock = false # change color if numlock is off
position = 0, 200
halign = center
valign = center
}
label {
monitor =
text = cmd[update:1000] echo "$TIME"
color = rgba(200, 200, 200, 1.0)
font_size = 55
font_family = JetBrainsMono Nerd Font
position = 0, 150
halign = center
valign = bottom
shadow_passes = 5
shadow_size = 10
}
label {
monitor =
text = $USER
color = rgba(200, 200, 200, 1.0)
font_size = 20
font_family = JetBrainsMono Nerd Font
position = 0, 80
halign = center
valign = bottom
shadow_passes = 5
shadow_size = 10
}
'';
wayland.windowManager.hyprland.enable = true;
wayland.windowManager.hyprland.settings = {
"$mod" = "SUPER";
exec-once = [
"dunst"
"waybar"
];
bind =
[
"$mod, F, exec, firefox"
"$mod, k, exec, kitty"
", Print, exec, grimblast copy area"
"$mod, l, exec, hyprlock" # Add a keybinding to lock the screen
"$mod, C, exec, codium"
"$mod, E, exec, hyprctl dispatch exit"
]
++ (
# workspaces
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
builtins.concatLists (builtins.genList (
x: let
ws = let
c = (x + 1) / 10;
in
builtins.toString (x + 1 - (c * 10));
in [
"$mod, ${ws}, workspace, ${toString (x + 1)}"
"$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}"
]
)
10)
);
};
}

@ -0,0 +1,100 @@
{
inputs,
config,
...
}:{
services.dunst = {
enable = true;
settings = {
global = {
background = "#${config.colorScheme.palette.base00}";
foreground = "#${config.colorScheme.palette.base06}";
monitor = 0;
follow = "mouse";
width = "(0,600)";
height = 350;
progress_bar = true;
progress_bar_height = 25;
progress_bar_frame_width = 3;
progress_bar_min_width = 460;
progress_bar_max_width = 480;
highlight = "#79dcaa";
indicate_hidden = true;
shrink = true;
transparency = 5;
separator_height = 5;
padding = 10;
horizontal_padding = 10;
frame_width = 0;
frame_color = "#${config.colorScheme.palette.base06}";
sort = true;
idle_threshold = 0;
font = "JetBrains Mono Nerd Font 13";
line_height = 2;
markup = "full";
origin = "top-right";
offset = "10x10";
format = "<b>%s</b>''\n%b";
alignment = "left";
show_age_threshold = 60;
word_wrap = true;
ignore_newline = true;
stack_duplicates = true;
hide_duplicate_count = false;
show_indicators = true;
icon_position = "left";
max_icon_size = 86;
min_icon_size = 32;
icon_theme = "Papirus";
enable_recursive_icon_lookup = true;
sticky_history = true;
history_length = 20;
browser = "firefox";
always_run_script = true;
title = "Dunst";
class = "Dunst";
corner_radius = 10;
icon_corner_radius= 5;
notification_limit = 5;
mouse_left_click = "close_current";
mouse_middle_click = "do_action";
mouse_right_click = "context_all";
ignore_dbusclose = true;
ellipsize = "middle";
};
urgency_normal = {
timeout = 6;
background = "#${config.colorScheme.palette.base00}";
frame_color = "#${config.colorScheme.palette.base07}";
foreground = "#${config.colorScheme.palette.base06}";
};
urgency_low = {
timeout = 2;
background = "#${config.colorScheme.palette.base00}";
frame_color = "#${config.colorScheme.palette.base07}";
foreground = "#${config.colorScheme.palette.base06}";
};
urgency_critical = {
timeout = 30;
background = "#${config.colorScheme.palette.base00}";
frame_color = "#${config.colorScheme.palette.base07}";
foreground = "#${config.colorScheme.palette.base06}";
};
fullscreen_show_critical = {
msg_urgency = "critical";
fullscreen = "pushback";
};
network = {
appname = "network";
new_icon = "network";
summary = "*";
format = "<span size='x-large' weight='bold'>%s</span>''\n<span font_desc='Cooper Hewitt,Iosevka Nerd Font 12'>%b</span>";
};
NetworkManager_Applet = {
appname = "NetworkManager Applet";
new_icon = "network-wireless";
};
};
};
}
Loading…
Cancel
Save

Powered by TurnKey Linux.