summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaghuram Subramani <raghus2247@gmail.com>2024-02-01 18:40:39 +0530
committerGitHub <noreply@github.com>2024-02-01 18:40:39 +0530
commit88cc3e7e0765b5dd11b06db442ad46536342bba5 (patch)
treed3b1c7b0d54ef3c2274d64967a3bcd2818c03c8e
parent01bb0877c285383fd2857920048bd2576f4d31e9 (diff)
Updates (#1)
* . * . * . * . * . * . * . * . * . * . * update * . * temp * . * . * . * . * . * . * . * . * . * . * . * . * temp * . * . * . * update
-rw-r--r--config/alacritty/default.nix7
-rw-r--r--config/bash.nix43
-rw-r--r--config/dotfiles.nix8
-rw-r--r--config/dunst/dunstrc63
-rw-r--r--config/dwl.nix11
-rw-r--r--config/fuzzel/default.nix6
-rw-r--r--config/git/default.nix9
-rw-r--r--config/hypr/hyprland.conf108
-rw-r--r--config/hypr/hyprpaper.conf3
-rw-r--r--config/nvim/default.nix17
-rw-r--r--config/waybar/config58
-rw-r--r--config/waybar/style.css99
-rw-r--r--flake.lock6
-rw-r--r--flake.nix2
-rw-r--r--machines/x/configuration.nix (renamed from machines/z/configuration.nix)16
-rw-r--r--machines/x/hardware-configuration.nix (renamed from machines/z/hardware-configuration.nix)0
-rw-r--r--machines/x/home.nix44
-rw-r--r--machines/z/home.nix20
-rw-r--r--modules/audio.nix13
-rw-r--r--modules/bluetooth.nix7
-rw-r--r--modules/desktop.nix14
-rw-r--r--modules/fonts.nix7
-rw-r--r--modules/global.nix14
-rw-r--r--modules/login.nix46
-rw-r--r--modules/nvidia.nix2
-rw-r--r--modules/virtualization.nix6
-rw-r--r--packages/dwl-custom.nix97
l---------result1
28 files changed, 363 insertions, 364 deletions
diff --git a/config/alacritty/default.nix b/config/alacritty/default.nix
index af272ef..04ff1b8 100644
--- a/config/alacritty/default.nix
+++ b/config/alacritty/default.nix
@@ -1,11 +1,6 @@
{ pkgs, config, ... }:
{
- programs.git = {
- enable = true;
- userName = "Raghuram Subramani";
- userEmail = "raghus2247@gmail.com";
- };
-
programs.alacritty.enable = true;
+ home.file.".config/alacritty/alacritty.toml".source = ./alacritty.toml;
}
diff --git a/config/bash.nix b/config/bash.nix
new file mode 100644
index 0000000..506400c
--- /dev/null
+++ b/config/bash.nix
@@ -0,0 +1,43 @@
+{
+ programs.bash = {
+ enable = true;
+ initExtra= ''
+ export PS1="\[\e[38;5;243m\]\h \[\e[38;5;254m\]\w \[\033[0m\]> "
+ set -o vi
+
+ if [[ -n "$IN_NIX_SHELL" ]]; then
+ export PS1="\[\e[38;5;242m\](dev) $PS1"
+ fi
+
+ sessionizer() {
+ DIR=$(fd . /data --type d -L -H | fzf)
+ SESSION_NAME="$DIR_$(date +%M%S)"
+
+ if [ -n "$DIR" ]
+ then
+ if [ "$1" == "-cd" ]
+ then
+ cd $DIR
+ return
+ fi
+ tmux new-session -d -c "$DIR" -s "$SESSION_NAME"
+ if [ -n "$TMUX" ]
+ then
+ tmux switch -t "$SESSION_NAME"
+ else
+ tmux attach -t "$SESSION_NAME"
+ fi
+ fi
+ }
+
+ if [[ $- != *i* ]]
+ then
+ sessionizer
+ fi
+
+ bind '"\C-f": "sessionizer\n"'
+ bind '"\C-a": "sessionizer -cd\n"'
+ '';
+ };
+
+}
diff --git a/config/dotfiles.nix b/config/dotfiles.nix
new file mode 100644
index 0000000..1a89f9b
--- /dev/null
+++ b/config/dotfiles.nix
@@ -0,0 +1,8 @@
+{ home, lib, ... }:
+
+{
+ home.file = {
+ ".tmux.conf".source = ./.tmux.conf;
+ ".fdignore".source = ./.fdignore;
+ };
+}
diff --git a/config/dunst/dunstrc b/config/dunst/dunstrc
deleted file mode 100644
index 902ba1c..0000000
--- a/config/dunst/dunstrc
+++ /dev/null
@@ -1,63 +0,0 @@
-[global]
- monitor = 1
- follow = none
- indicate_hidden = yes
- shrink = no
- transparency = 0
- separator_height = 2
- padding = 8
- horizontal_padding = 8
- frame_width = 3
- frame_color = "#aaaaaa"
- separator_color = frame
- sort = yes
- idle_threshold = 120
- font = Monospace 8
- line_height = 0
- markup = full
- format = "<b>%s</b>\n%b"
- alignment = left
- vertical_alignment = center
- show_age_threshold = 60
- word_wrap = yes
- ellipsize = middle
- ignore_newline = no
- stack_duplicates = true
- hide_duplicate_count = false
- show_indicators = yes
- icon_position = left
- min_icon_size = 0
- max_icon_size = 32
- icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/
- sticky_history = yes
- history_length = 20
- dmenu = /usr/bin/dmenu -p dunst:
- browser = /usr/bin/sensible-browser
- always_run_script = true
- title = Dunst
- class = Dunst
- corner_radius = 0
- ignore_dbusclose = false
- force_xinerama = false
- mouse_left_click = close_current
- mouse_middle_click = do_action, close_current
- mouse_right_click = close_all
-[experimental]
- per_monitor_dpi = false
-
-[urgency_low]
- background = "#131417"
- foreground = "#ffffff"
- timeout = 10
-
-[urgency_normal]
- background = "#131417"
- foreground = "#ffffff"
- timeout = 10
-
-[urgency_critical]
- background = "#131417"
- foreground = "#ffffff"
- timeout = 0
-
-# vim: ft=cfg
diff --git a/config/dwl.nix b/config/dwl.nix
new file mode 100644
index 0000000..86d8f25
--- /dev/null
+++ b/config/dwl.nix
@@ -0,0 +1,11 @@
+{ pkgs, home, fetchFromGitHub, ... }:
+
+let
+ dwl-custom = (pkgs.callPackage ../packages/dwl-custom.nix {});
+in {
+ xdg.portal.enable = true;
+ xdg.portal.configPackages = [ pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-hyprland ];
+ xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-hyprland ];
+
+ home.packages = [ dwl-custom ];
+}
diff --git a/config/fuzzel/default.nix b/config/fuzzel/default.nix
new file mode 100644
index 0000000..13feee4
--- /dev/null
+++ b/config/fuzzel/default.nix
@@ -0,0 +1,6 @@
+{ pkgs, config, ... }:
+
+{
+ home.packages = [ pkgs.fuzzel ];
+ home.file.".config/fuzzel/fuzzel.ini".source = ./fuzzel.ini;
+}
diff --git a/config/git/default.nix b/config/git/default.nix
new file mode 100644
index 0000000..4fe7ef6
--- /dev/null
+++ b/config/git/default.nix
@@ -0,0 +1,9 @@
+{ pkgs, config, ... }:
+
+{
+ programs.git = {
+ enable = true;
+ userName = "Raghuram Subramani";
+ userEmail = "raghus2247@gmail.com";
+ };
+}
diff --git a/config/hypr/hyprland.conf b/config/hypr/hyprland.conf
deleted file mode 100644
index ff7a4a6..0000000
--- a/config/hypr/hyprland.conf
+++ /dev/null
@@ -1,108 +0,0 @@
-monitor=eDP-1,1920x1080@60,0x0,1
-monitor=HDMI-A-1,2560x1440@60,-2560x-350,1
-
-exec-once = hyprpaper & waybar & dunst & /nix/store/$(ls -la /nix/store | grep 'polkit-gnome' | grep 4096 | awk '{print $9}' | sed -n '$p')/libexec/polkit-gnome-authentication-agent-1 & blueman-applet & nm-applet
-
-xwayland {
- force_zero_scaling = true
-}
-
-input {
- kb_layout = us
- follow_mouse = 1
- touchpad {
- natural_scroll = yes
- }
- sensitivity = 0
-}
-
-general {
- gaps_in = 4
- gaps_out = 8
- border_size = 2
- col.active_border = rgba(f2f0faff)
- col.inactive_border = rgba(272727ff)
-
- layout = master
-}
-
-decoration {
- rounding = 10
-
- blur {
- enabled = true
- size = 3
- passes = 1
- }
-
- drop_shadow = yes
- shadow_range = 4
- shadow_render_power = 3
- col.shadow = rgba(1a1a1aee)
-}
-
-animations {
- enabled = yes
-
- bezier = myBezier, 0.05, 0.9, 0.1, 1.05
-
- animation = windows, 1, 4, myBezier
- animation = windowsOut, 1, 4, default, popin 80%
- animation = fade, 1, 4, default
- animation = workspaces, 1, 4, default
-}
-
-master {
- new_is_master = false
-}
-
-gestures {
- workspace_swipe = true
-}
-
-bind = SUPER SHIFT, RETURN, exec, alacritty
-bind = SUPER SHIFT, Q, killactive
-bind = SUPER SHIFT, B, exit
-bind = SUPER, E, exec, dolphin
-bind = SUPER SHIFT, F, togglefloating
-bind = SUPER, F, fullscreen, 1
-bind = SUPER, SPACE, exec, pkill fuzzel || fuzzel
-bind = SUPER, X, exec, swaylock
-
-bind = SUPER, RETURN, layoutmsg, swapwithmaster master
-bind = SUPER SHIFT, J, layoutmsg, swapnext
-bind = SUPER SHIFT, K, layoutmsg, swapprev
-
-# Move focus with mainMod + hjkl
-bind = SUPER, L, movefocus, r
-bind = SUPER, H, movefocus, l
-bind = SUPER, K, movefocus, u
-bind = SUPER, J, movefocus, d
-
-# Switch workspaces with mainMod + [0-9]
-bind = SUPER, 1, workspace, 1
-bind = SUPER, 2, workspace, 2
-bind = SUPER, 3, workspace, 3
-bind = SUPER, 4, workspace, 4
-bind = SUPER, 5, workspace, 5
-bind = SUPER, 6, workspace, 6
-bind = SUPER, 7, workspace, 7
-bind = SUPER, 8, workspace, 8
-bind = SUPER, 9, workspace, 9
-bind = SUPER, 0, workspace, 10
-
-# Move active window to a workspace with mainMod + SHIFT + [0-9]
-bind = SUPER SHIFT, 1, movetoworkspace, 1
-bind = SUPER SHIFT, 2, movetoworkspace, 2
-bind = SUPER SHIFT, 3, movetoworkspace, 3
-bind = SUPER SHIFT, 4, movetoworkspace, 4
-bind = SUPER SHIFT, 5, movetoworkspace, 5
-bind = SUPER SHIFT, 6, movetoworkspace, 6
-bind = SUPER SHIFT, 7, movetoworkspace, 7
-bind = SUPER SHIFT, 8, movetoworkspace, 8
-bind = SUPER SHIFT, 9, movetoworkspace, 9
-bind = SUPER SHIFT, 0, movetoworkspace, 10
-
-# Move/resize windows with mainMod + LMB/RMB and dragging
-bindm = SUPER, mouse:272, movewindow
-bindm = SUPER, mouse:273, resizewindow
diff --git a/config/hypr/hyprpaper.conf b/config/hypr/hyprpaper.conf
deleted file mode 100644
index 8204052..0000000
--- a/config/hypr/hyprpaper.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-preload = /home/compromyse/Pictures/wallpaper.jpg
-wallpaper = ,/home/compromyse/Pictures/wallpaper.jpg
-splash = false
diff --git a/config/nvim/default.nix b/config/nvim/default.nix
new file mode 100644
index 0000000..28b879b
--- /dev/null
+++ b/config/nvim/default.nix
@@ -0,0 +1,17 @@
+{ pkgs, config, ... }:
+
+{
+ programs.neovim = {
+ enable = true;
+ defaultEditor = true;
+ viAlias = true;
+ vimAlias = true;
+ vimdiffAlias = true;
+ };
+
+ home.file.".config/nvim/init.lua".source = ./init.lua;
+ home.file.".config/nvim/lua" = {
+ source = ./lua;
+ recursive = true;
+ };
+}
diff --git a/config/waybar/config b/config/waybar/config
deleted file mode 100644
index 6eca628..0000000
--- a/config/waybar/config
+++ /dev/null
@@ -1,58 +0,0 @@
-{
- "layer": "top",
- "height": 40,
- "modules-left": ["custom/launcher", "hyprland/workspaces", "hyprland/window"],
- "modules-right": ["tray", "cpu", "backlight", "battery", "clock"],
-
- // Modules configuration
- "custom/launcher": {
- "format": "<span font='24'></span>"
- },
- "hyprland/workspaces": {
- "disable-scroll": true,
- "on-click": "activate",
- "persistent-workspaces": {
- "*": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
- },
- "format": "{icon}",
- "format-icons": {
- "urgent": "󰀨",
- "active": "",
- "empty": "",
- "default": "",
- "visible": "",
- "sort-by-number": true
- }
- },
- "hyprland/window": {
- "format": "> {title}",
- "separate-outputs": true
- },
- "tray": {
- "spacing": 10
- },
- "clock": {
- "timezone": "Asia/Kolkata",
- "format": " {:%a, %Y-%m-%d  %H:%M}",
- },
- "cpu": {
- "format": " {usage}%",
- "tooltip": false
- },
- "backlight": {
- "format": "{icon} {percent}%",
- "format-icons": ["", "", "", "", "", "", "", "", ""]
- },
- "battery": {
- "bat": "BAT1",
- "states": {
- "warning": 30,
- "critical": 15
- },
- "format": "{icon} {capacity}%",
- "format-charging": " {capacity}%+",
- "format-plugged": " {capacity}%",
- "format-icons": ["", "", "", "", ""]
- }
-}
-
diff --git a/config/waybar/style.css b/config/waybar/style.css
deleted file mode 100644
index 139b7cd..0000000
--- a/config/waybar/style.css
+++ /dev/null
@@ -1,99 +0,0 @@
-* {
- font-family: UbuntuMono Nerd Font Mono;
- font-weight: 500;
- font-size: 16px;
-}
-
-window#waybar {
- background-color: rgba(27, 27, 27, 1);
- color: #f2f0fa;
- transition-property: background-color;
- transition-duration: .5s;
-}
-
-button {
- box-shadow: inset 0 -3px transparent;
- border: none;
- border-radius: 0px;
-}
-
-button:hover {
- background: inherit;
-}
-
-#custom-launcher {
- margin: 0 10px;
- padding: 0 10px;
-}
-
-#workspaces {
- border-radius: 10px;
- background-color: #f2f0fa;
- color: #272727;
- padding: 0 10px;
- margin: 0px 4px;
-}
-
-#workspaces button {
- padding: 0 10px;
- color: #272727;
- background-color: #f2f0fa;
-}
-
-#clock {
- padding: 0 10px;
- margin: 0 10px;
- color: #f2f0fa;
- border-radius: 0px;
-}
-
-#battery,
-#cpu,
-#backlight {
- padding: 0 10px;
- margin: 0 0px;
- background-color: #f2f0fa;
- color: #272727;
-}
-
-#battery {
- border-radius: 0px 10px 10px 0px;
-}
-
-#cpu {
- border-radius: 10px 0px 0px 10px;
-}
-
-#tray {
- padding: 0 10px;
- margin: 0 0px;
- border-radius: 10px;
- margin: 0 10px;
-}
-
-#window {
- margin: 0 4px;
-}
-
-/* If workspaces is the leftmost module, omit left margin */
-.modules-left > widget:first-child > #workspaces {
- margin-left: 0;
-}
-
-#battery.critical:not(.charging) {
- background-color: #f53c3c;
- color: #ffffff;
-}
-
-label:focus {
- background-color: #000000;
-}
-
-#tray > .passive {
- -gtk-icon-effect: dim;
-}
-
-#tray > .needs-attention {
- -gtk-icon-effect: highlight;
- background-color: #eb4d4b;
-}
diff --git a/flake.lock b/flake.lock
index 067fcfa..e83bacc 100644
--- a/flake.lock
+++ b/flake.lock
@@ -7,11 +7,11 @@
]
},
"locked": {
- "lastModified": 1706473109,
- "narHash": "sha256-iyuAvpKTsq2u23Cr07RcV5XlfKExrG8gRpF75hf1uVc=",
+ "lastModified": 1706746258,
+ "narHash": "sha256-9iNK1cP/dxCFh1NYVLJHijoJxlT3bXxTQToMDNZtjzU=",
"owner": "nix-community",
"repo": "home-manager",
- "rev": "d634c3abafa454551f2083b054cd95c3f287be61",
+ "rev": "2db6a2a42930ffff0ffd690dec3f2c0b6f4fe66d",
"type": "github"
},
"original": {
diff --git a/flake.nix b/flake.nix
index 1ea7430..3a45625 100644
--- a/flake.nix
+++ b/flake.nix
@@ -13,6 +13,8 @@
};
outputs = { self, nixpkgs, ... }@inputs: {
+ nixpkgs.overlays = [ import ./overlays/dwl.nix ];
+
# nixos-rebuild --flake .#machine
nixosConfigurations = {
z = nixpkgs.lib.nixosSystem {
diff --git a/machines/z/configuration.nix b/machines/x/configuration.nix
index 5af5c58..de93a4f 100644
--- a/machines/z/configuration.nix
+++ b/machines/x/configuration.nix
@@ -1,4 +1,4 @@
-{ lib, inputs, ... }:
+{ lib, inputs, pkgs, ... }:
{
imports = [
@@ -7,6 +7,13 @@
] ++ (map (path: ../../modules/${path}) [
"global.nix"
"compromyse.nix"
+ "desktop.nix"
+ "login.nix"
+ "fonts.nix"
+ "bluetooth.nix"
+ "audio.nix"
+ # "virtualization.nix"
+ # "nvidia.nix"
]);
boot.loader.systemd-boot.enable = true;
@@ -15,12 +22,17 @@
boot.extraModprobeConfig = "options kvm_intel nested=1";
+ nixpkgs.config.allowUnfree = true;
+ nixpkgs.config.allowUnfreePredicate = _: true;
+
+ hardware.opengl.enable = true;
+
fileSystems."/data" = {
device = "/dev/sda";
fsType = "ext4";
};
- networking.hostName = "z";
+ networking.hostName = "x";
home-manager.users.compromyse = import ./home.nix;
}
diff --git a/machines/z/hardware-configuration.nix b/machines/x/hardware-configuration.nix
index aeb8272..aeb8272 100644
--- a/machines/z/hardware-configuration.nix
+++ b/machines/x/hardware-configuration.nix
diff --git a/machines/x/home.nix b/machines/x/home.nix
new file mode 100644
index 0000000..292495c
--- /dev/null
+++ b/machines/x/home.nix
@@ -0,0 +1,44 @@
+{ pkgs, ... }:
+
+{
+ nixpkgs.config.allowUnfree = true;
+
+ home = {
+ username = "compromyse";
+ homeDirectory = "/home/compromyse";
+ };
+
+ home.packages = with pkgs; [
+ wget
+
+ tmux
+ fzf
+ fd
+ ripgrep
+
+ cinnamon.nemo
+ mate.eom
+
+ # spotify
+ # firefox
+
+ # obs-studio
+
+ pavucontrol
+ blueman
+ brillo
+ ];
+
+ imports = (map (path: ../../config/${path}) [
+ "themes.nix"
+ "dotfiles.nix"
+ "git"
+ "nvim"
+ "alacritty"
+ "dwl.nix"
+ "bash.nix"
+ "fuzzel"
+ ]);
+
+ home.stateVersion = "23.11";
+}
diff --git a/machines/z/home.nix b/machines/z/home.nix
deleted file mode 100644
index 564d4d5..0000000
--- a/machines/z/home.nix
+++ /dev/null
@@ -1,20 +0,0 @@
-{ pkgs, ... }:
-
-{
-
- home = {
- username = "compromyse";
- homeDirectory = "/home/compromyse";
- };
-
- imports = [
- ../../config/themes.nix
- ../../config/alacritty
- ];
-
- home.packages = with pkgs; [
- wget
- ];
-
- home.stateVersion = "23.11";
-}
diff --git a/modules/audio.nix b/modules/audio.nix
new file mode 100644
index 0000000..f358c2c
--- /dev/null
+++ b/modules/audio.nix
@@ -0,0 +1,13 @@
+{ config, ... }:
+
+{
+ sound.enable = true;
+ hardware.pulseaudio.enable = false;
+ services.pipewire = {
+ enable = true;
+ alsa.enable = true;
+ alsa.support32Bit = true;
+ pulse.enable = true;
+ jack.enable = true;
+ };
+}
diff --git a/modules/bluetooth.nix b/modules/bluetooth.nix
new file mode 100644
index 0000000..5e64d97
--- /dev/null
+++ b/modules/bluetooth.nix
@@ -0,0 +1,7 @@
+{ config, ... }:
+
+{
+ hardware.bluetooth.enable = true;
+ hardware.bluetooth.powerOnBoot = true;
+ services.blueman.enable = true;
+}
diff --git a/modules/desktop.nix b/modules/desktop.nix
new file mode 100644
index 0000000..a40691b
--- /dev/null
+++ b/modules/desktop.nix
@@ -0,0 +1,14 @@
+{ pkgs, ... }:
+
+{
+ environment.sessionVariables.NIXOS_OZONE_WL = "1";
+
+ environment.systemPackages = with pkgs; [
+ networkmanagerapplet
+
+ polkit_gnome
+
+ pkgs.libnotify
+ pkgs.libappindicator
+ ];
+}
diff --git a/modules/fonts.nix b/modules/fonts.nix
new file mode 100644
index 0000000..5a85316
--- /dev/null
+++ b/modules/fonts.nix
@@ -0,0 +1,7 @@
+{ pkgs, ... }:
+
+{
+ fonts.packages = with pkgs; [
+ (nerdfonts.override { fonts = [ "UbuntuMono" ]; })
+ ];
+}
diff --git a/modules/global.nix b/modules/global.nix
index 61575c1..d727f75 100644
--- a/modules/global.nix
+++ b/modules/global.nix
@@ -1,12 +1,22 @@
+{ pkgs, ... }:
+
{
nix.settings = {
experimental-features = [ "nix-command" "flakes" ];
auto-optimise-store = true;
};
- nixpkgs.config.allowUnfree = true;
-
time.timeZone = "Asia/Kolkata";
+ networking.networkmanager.enable = true;
+
+ security.rtkit.enable = true;
+
+ /* environment.etc."inputrc".text = pkgs.lib.mkForce (
+ builtins.readFile <nixpkgs/nixos/modules/programs/bash/inputrc> + ''
+ set completion-ignore-case on
+ ''
+ ); */
+
system.stateVersion = "23.11";
}
diff --git a/modules/login.nix b/modules/login.nix
new file mode 100644
index 0000000..61e3060
--- /dev/null
+++ b/modules/login.nix
@@ -0,0 +1,46 @@
+{ pkgs, ... }:
+
+{
+ environment.systemPackages = with pkgs; [
+ greetd.tuigreet
+ greetd.greetd
+ ];
+
+ services.greetd = {
+ enable = true;
+ settings = {
+ default_session = {
+ command = "tuigreet --time --remember --cmd dwl";
+ user = "greeter";
+ };
+ };
+ };
+
+ services.logind.extraConfig = ''
+ HandlePowerKey=ignore
+ '';
+
+ systemd.services.greetd.serviceConfig = {
+ Type = "idle";
+ StandardInput = "tty";
+ StandardOutput = "tty";
+ StandardError = "journal";
+ TTYReset = true;
+ TTYVHangup = true;
+ TTYVTDisallocate = true;
+ };
+
+ security.polkit.enable = true;
+
+ security.pam.services.swaylock.text = ''
+ auth include login
+ '';
+
+ services.xserver.libinput.enable = true;
+
+ programs.gnupg.agent = {
+ enable = true;
+ };
+
+ programs.dconf.enable = true;
+}
diff --git a/modules/nvidia.nix b/modules/nvidia.nix
index a3f6074..c72317f 100644
--- a/modules/nvidia.nix
+++ b/modules/nvidia.nix
@@ -22,4 +22,6 @@
nvidiaBusId = "PCI:1:0:0";
};
};
+
+ environment.systemPackages = [ pkgs.cudatoolkit ];
}
diff --git a/modules/virtualization.nix b/modules/virtualization.nix
new file mode 100644
index 0000000..12e8d08
--- /dev/null
+++ b/modules/virtualization.nix
@@ -0,0 +1,6 @@
+{ pkgs, config, ... }:
+
+{
+ virtualisation.libvirtd.enable = true;
+ programs.virt-manager.enable = true;
+}
diff --git a/packages/dwl-custom.nix b/packages/dwl-custom.nix
new file mode 100644
index 0000000..a7a4652
--- /dev/null
+++ b/packages/dwl-custom.nix
@@ -0,0 +1,97 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, installShellFiles
+, libX11
+, libinput
+, libxcb
+, libxkbcommon
+, pixman
+, pkg-config
+, substituteAll
+, wayland-scanner
+, wayland
+, wayland-protocols
+, wlroots
+, writeText
+, xcbutilwm
+, xwayland
+, enableXWayland ? true
+, conf ? null
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+ pname = "dwl";
+ version = "0.5";
+
+ src = fetchFromGitHub {
+ owner = "compromyse";
+ repo = "dwl";
+ rev = "master";
+ hash = "sha256-QNRE/qCSSsMLbmO5VHsPlIO4f9IgnsV00ALDdzDIBrE=";
+ };
+
+ nativeBuildInputs = [
+ installShellFiles
+ pkg-config
+ wayland-scanner
+ ];
+
+ buildInputs = [
+ libinput
+ libxcb
+ libxkbcommon
+ pixman
+ wayland
+ wayland-protocols
+ wlroots
+ ] ++ lib.optionals enableXWayland [
+ libX11
+ xcbutilwm
+ xwayland
+ ];
+
+ outputs = [ "out" "man" ];
+
+ # Allow users to set an alternative config.def.h
+ postPatch = let
+ configFile = if lib.isDerivation conf || builtins.isPath conf
+ then conf
+ else writeText "config.def.h" conf;
+ in lib.optionalString (conf != null) "cp ${configFile} config.def.h";
+
+ makeFlags = [
+ "PKG_CONFIG=${stdenv.cc.targetPrefix}pkg-config"
+ "WAYLAND_SCANNER=wayland-scanner"
+ "PREFIX=$(out)"
+ "MANDIR=$(man)/share/man"
+ ];
+
+ preBuild = ''
+ makeFlagsArray+=(
+ XWAYLAND=${lib.optionalString enableXWayland "-DXWAYLAND"}
+ XLIBS=${lib.optionalString enableXWayland "xcb\\ xcb-icccm"}
+ )
+ '';
+
+ meta = {
+ homepage = "https://github.com/djpohly/dwl/";
+ description = "Dynamic window manager for Wayland";
+ longDescription = ''
+ dwl is a compact, hackable compositor for Wayland based on wlroots. It is
+ intended to fill the same space in the Wayland world that dwm does in X11,
+ primarily in terms of philosophy, and secondarily in terms of
+ functionality. Like dwm, dwl is:
+
+ - Easy to understand, hack on, and extend with patches
+ - One C source file (or a very small number) configurable via config.h
+ - Limited to 2000 SLOC to promote hackability
+ - Tied to as few external dependencies as possible
+ '';
+ changelog = "https://github.com/djpohly/dwl/releases/tag/v${finalAttrs.version}";
+ license = lib.licenses.gpl3Only;
+ maintainers = [ lib.maintainers.AndersonTorres ];
+ inherit (wayland.meta) platforms;
+ mainProgram = "dwl";
+ };
+})
diff --git a/result b/result
new file mode 120000
index 0000000..7057989
--- /dev/null
+++ b/result
@@ -0,0 +1 @@
+/nix/store/mfb1wrb37sj74m5i0r782hv3iv22z1ky-nixos-system-z-24.05.20240129.97b17f3 \ No newline at end of file