Compare commits

..

1 Commits

Author SHA1 Message Date
Sravan Balaji
2ec9230a0a First attempt at adding polybar-dwm-module
- Update flake.lock
- Switch from awesome back to dwm
- Attempt to modify existing polybar nix package
  to point to mihirlad55's polybar-dwm-module
2024-03-30 16:12:07 -04:00
20 changed files with 48 additions and 278 deletions

View File

@@ -1,77 +0,0 @@
let
installDisk = "sda";
bootPartitionSize = "512M";
swapfileSize = "10G";
in {
disko.devices = {
disk = {
main = {
type = "disk";
device = "/dev/" + installDisk;
content = {
type = "gpt";
partitions = {
boot = {
size = "1M";
type = "EF02"; # for grub MBR
};
ESP = {
size = bootPartitionSize;
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [
"defaults"
];
};
};
luks = {
size = "100%";
content = {
type = "luks";
name = "cryptroot";
settings.allowDiscards = true;
content = {
type = "btrfs";
extraArgs = [ "-f" ];
subvolumes = {
"@root" = {
mountpoint = "/";
mountOptions = [ "compress=zstd" "noatime" ];
};
"@home" = {
mountpoint = "/home";
mountOptions = [ "compress=zstd" "noatime" ];
};
"@games" = {
mountpoint = "/games";
mountOptions = [ "compress=zstd" "noatime" ];
};
"@nix" = {
mountpoint = "/nix";
mountOptions = [ "compress=zstd" "noatime" ];
};
"@log" = {
mountpoint = "/var/log";
mountOptions = [ "compress=zstd" "noatime" ];
};
"@swap" = {
mountpoint = "/swap";
swap.swapfile.size = swapfileSize;
};
"@.snapshots" = {
mountpoint = "/.snapshots";
mountOptions = [ "compress=zstd" "noatime" ];
};
};
};
};
};
};
};
};
};
};
}

View File

@@ -1,7 +1,7 @@
let
installDisk = "sda";
bootPartitionSize = "512M";
swapfileSize = "34G";
swapfileSize = "10G";
in {
disko.devices = {
disk = {
@@ -37,26 +37,34 @@ in {
type = "btrfs";
extraArgs = [ "-f" ];
subvolumes = {
"@" = {
"@root" = {
mountpoint = "/";
mountOptions = [ "compress=zstd" "noatime" "discard=async" "space_cache=v2" "ssd" ];
mountOptions = [ "compress=zstd" "noatime" ];
};
"@home" = {
mountpoint = "/home";
mountOptions = [ "compress=zstd" "noatime" "discard=async" "space_cache=v2" "ssd" ];
mountOptions = [ "compress=zstd" "noatime" ];
};
"@.snapshots" = {
mountpoint = "/.snapshots";
mountOptions = [ "compress=zstd" "noatime" "discard=async" "space_cache=v2" "ssd" ];
"@games" = {
mountpoint = "/games";
mountOptions = [ "compress=zstd" "noatime" ];
};
"@nix" = {
mountpoint = "/nix";
mountOptions = [ "compress=zstd" "noatime" "discard=async" "space_cache=v2" "ssd" ];
mountOptions = [ "compress=zstd" "noatime" ];
};
"@log" = {
mountpoint = "/var/log";
mountOptions = [ "compress=zstd" "noatime" ];
};
"@swap" = {
mountpoint = "/swap";
swap.swapfile.size = swapfileSize;
};
"@.snapshots" = {
mountpoint = "/.snapshots";
mountOptions = [ "compress=zstd" "noatime" ];
};
};
};
};

12
flake.lock generated
View File

@@ -7,11 +7,11 @@
]
},
"locked": {
"lastModified": 1711934712,
"narHash": "sha256-sBDe+QmX/QohlnKeSEzrftcXyZL5FY09OMjZ59Rpyy4=",
"lastModified": 1711588700,
"narHash": "sha256-vBB5HoQVnA6c/UrDOhLXKAahEwSRccw2YXYHxD7qoi4=",
"owner": "nix-community",
"repo": "disko",
"rev": "611c9ea53250f7bb22286b3d26872280a0e608f9",
"rev": "502241afa3de2a24865ddcbe4c122f4546e32092",
"type": "github"
},
"original": {
@@ -224,11 +224,11 @@
]
},
"locked": {
"lastModified": 1712016346,
"narHash": "sha256-O2nO7pD+krq+4HgkLB4VThRtAucIPfXDs/jJqCGlK1w=",
"lastModified": 1711625603,
"narHash": "sha256-W+9dfqA9bqUIBV5u7jaIARAzMe3kTq/Hp2SpSVXKRQw=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "4be0464472675212654dedf3e021bd5f1d58b92f",
"rev": "c0ef0dab55611c676ad7539bf4e41b3ec6fa87d2",
"type": "github"
},
"original": {

View File

@@ -56,19 +56,23 @@
LC_TIME = systemSettings.locale;
};
users.groups.${userSettings.username} = {
name = userSettings.username;
gid = 1000;
};
users.users.${userSettings.username} = {
isNormalUser = true;
description = userSettings.name;
extraGroups = [ "${userSettings.username}" "networkmanager" "wheel" "input" "dialout" ];
extraGroups = [ "networkmanager" "wheel" "input" "dialout" ];
packages = [];
uid = 1000;
};
# environment.systemPackages = with pkgs; [
# ];
environment.shells = with pkgs; [ zsh ];
users.defaultUserShell = pkgs.zsh;
programs.zsh.enable = true;
fonts.fontDir.enable = true;
# xdg.portal = {
# enable = true;
# extraPortals = [

View File

@@ -18,7 +18,6 @@
../../user/media/default.nix
../../user/productivity/default.nix
(../../user/terminal + "/${userSettings.term}.nix")
../../user/terminal/prompt.nix
../../user/utilities/default.nix
];

View File

@@ -17,23 +17,19 @@
windowManager.dwm = {
enable = true;
# Override dwm package with personal dwm-flexipatch config
package = (pkgs.dwm.overrideAttrs (finalAttrs: previousAttrs: {
pname = previousAttrs.pname + "-flexipatch";
version = "6.5";
package = pkgs.dwm.overrideAttrs {
src = (/home + "/${userSettings.username}" + /.config/dwm-flexipatch);
# Add dependencies for dwmipc / polybar communication patches
buildInputs = previousAttrs.buildInputs ++ (with pkgs; [
# Dependencies for swallow patch
buildInputs = with pkgs; [
xorg.libX11.dev
xorg.libXinerama
xorg.libXft
xorg.libxcb
xorg.xcbutil
# Dependencies for dwm-ipc patch
yajl
jsoncpp
]);
}));
];
};
};
displayManager = {
@@ -42,85 +38,27 @@
};
};
# Picom Compositor
services.picom.enable = true;
# Night Light
services.redshift = {
enable = true;
package = pkgs.redshift;
executable = "/bin/redshift-gtk";
};
services.geoclue2 = {
enable = true;
};
location.provider = "geoclue2";
# File Manager
programs.thunar = {
enable = true;
plugins = with pkgs.xfce; [
thunar-volman
thunar-archive-plugin
thunar-media-tags-plugin
];
};
environment.systemPackages = with pkgs; [
# X11 Utilities
arandr
autorandr
unclutter-xfixes
# Wallpaper
nitrogen
# Terminal
kitty
# System Monitor
btop
qdirstat
gnome.gnome-disk-utility
# Media / Volume Controls
playerctl
pavucontrol
# Polybar Media Module Dependency
zscroll
# Notification Daemon
deadd-notification-center
# Automounter
udiskie
# Power Management
xfce.xfce4-power-manager
# Polybar with DWM Module
(polybar.overrideAttrs (finalAttrs: previousAttrs: {
pname = previousAttrs.pname + "-dwm-module";
version = "3.5.2";
src = fetchFromGitHub {
src = fetchFromGithub {
owner = "mihirlad55";
repo = "polybar-dwm-module";
rev = "0c3e139ac54e081c06ef60548927e679d80d4297";
hash = "sha256-ZL7yDGGiZFGgVXZXS+d3xUDhOOd5lp2mo2ipFN92mIY=";
hash = "sha256-DGij8dNp5nnQ05vA+6LcAdPoXAN0eYJHBimXC2Gt5JQ=";
fetchSubmodules = true;
};
# Extra dependencies for dwm module
buildInputs = previousAttrs.buildInputs ++ [
jsoncpp
git
libpulseaudio
];
# Remove patches applied by default polybar package
patches = [];
}))
];
}

View File

@@ -1,17 +1,15 @@
{ config, lib, pkgs, ... }:
{
fonts.fontDir.enable = true;
fonts.packages = with pkgs; [
corefonts
ubuntu_font_family
font-awesome
nerdfonts
noto-fonts-color-emoji
powerline
ipafont
baekmuk-ttf
nerdfonts
font-awesome
ubuntu_font_family
(nerdfonts.override {
fonts = [
"FiraCode"
];
})
];
}

View File

@@ -1,20 +1,8 @@
{ config, lib, pkgs, ... }:
{
# Printing
services.printing.enable = true;
services.avahi.enable = true;
services.avahi.nssmdns4 = true;
services.avahi.openFirewall = true;
# Scanning
services.saned.enable = true;
environment.systemPackages = with pkgs; [
# HP Printer Drivers
hplip
# Scanner Frontend
libsForQt5.skanlite
];
}

View File

@@ -1,7 +0,0 @@
{ config, lib, pkgs, userSettings, ... }:
{
environment.systemPackages = with pkgs; [
rclone
];
}

View File

@@ -7,9 +7,5 @@
./miscellaneous.nix
./gaming.nix
./backups.nix
./user-shell.nix
./samba.nix
./cloud.nix
./phone.nix
];
}

View File

@@ -12,7 +12,5 @@
home-manager
tree
btop
openssh
gh
];
}

View File

@@ -1,10 +0,0 @@
{ config, lib, pkgs, systemSettings, ... }:
{
programs.kdeconnect = {
enable = true;
package = (if systemSettings.desktop == "gnome"
then pkgs.gnomeExtensions.gsconnect
else pkgs.libsForQt5.kdeconnect-kde);
};
}

View File

@@ -1,32 +0,0 @@
{ config, lib, pkgs, userSettings, ... }:
{
environment.systemPackages = with pkgs; [
cifs-utils
lxqt.lxqt-policykit # provides a default authentification client for policykit
];
fileSystems."/mnt/fileserver" = {
device = "//192.168.12.5/fileserver";
fsType = "cifs";
options =
let
# this line prevents hanging on network split
automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s";
username = userSettings.username;
uid = config.users.users.${username}.uid;
gid = config.users.groups.${username}.gid;
in [ "${automount_opts},credentials=/etc/nixos/smb-secrets,uid=${toString uid},gid=${toString gid}" ];
# Make sure to create `/etc/nixos/smb-secrets` with following content
# where domain can be optional
# username=<USERNAME>
# domain=<DOMAIN>
# password=<PASSWORD>
};
# Samba discovery of machines and shares
networking.firewall.extraCommands = ''iptables -t raw -A OUTPUT -p udp -m udp --dport 137 -j CT --helper netbios-ns'';
# GVFS
services.gvfs.enable = true;
}

View File

@@ -1,7 +0,0 @@
{ config, lib, pkgs, ... }:
{
environment.shells = with pkgs; [ zsh ];
users.defaultUserShell = pkgs.zsh;
programs.zsh.enable = true;
}

View File

@@ -5,6 +5,5 @@
blender
obs-studio
freecad
sweethome3d.application
]);
}

View File

@@ -9,7 +9,6 @@
spotify
spicetify-cli
ani-cli
mangal
calibre
]);
}

View File

@@ -1,8 +0,0 @@
{ config, lib, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
qalculate-gtk
octave
];
}

View File

@@ -1,8 +0,0 @@
{ config, lib, pkgs, ... }:
{
home.packages = (with pkgs; [
starship
krabby
]);
}

View File

@@ -9,6 +9,5 @@
./passwords.nix
./xdg.nix
./screenshot.nix
./downloads.nix
];
}

View File

@@ -1,7 +0,0 @@
{ config, lib, pkgs, ... }:
{
home.packages = (with pkgs; [
qbittorrent-qt5
]);
}