Compare commits

..

18 Commits

Author SHA1 Message Date
Sravan Balaji
ff832c6e0a Move kdeconnect to system and install qbittorrent with home manager 2024-04-01 20:43:21 -04:00
Sravan Balaji
d0e27148c7 Update flake.lock 2024-04-01 20:24:19 -04:00
Sravan Balaji
902408e764 Add geoclue service to fix redshift missing location 2024-04-01 20:23:25 -04:00
Sravan Balaji
33a657d209 Update flake.lock and fix samba syntax errors 2024-04-01 20:15:22 -04:00
Sravan Balaji
f2e2471c20 Add XFCE Power Manager 2024-03-31 10:44:24 -04:00
Sravan Balaji
b1c750b960 Bunch More Packages
- Add thunar file manager to dwm
- Add nitrogen wallpaper setter to dwm
- Add rclone, sweethome 3D, mangal, qalculate-gtk, octave, and
  qbittorrent packages
2024-03-31 10:16:17 -04:00
Sravan Balaji
0adc8dadcd Samba Share, Night Light, and Dev Packages
- Add default group with gid 1000
- Add redshift night light to dwm
- Add samba mount nix
- Add openssh and github cli packages
2024-03-31 09:58:40 -04:00
Sravan Balaji
b51a77befa Udiskie, KDE Connect, and Config Cleanup
- Move shell and font configs out of configuration.nix
  and into separate files
- Add udiskie to dwm
- Add kdeconnect for phone connection
2024-03-31 09:27:11 -04:00
Sravan Balaji
e397b4a2ed Update flake.lock 2024-03-31 09:09:15 -04:00
Sravan Balaji
aef313b4f1 HP Printer & Scanner + DWM/Polybar Dependencies
- Add packages / services to support HP printer / scanner
- Add packages to dwm that polybar modules rely on
2024-03-31 09:06:52 -04:00
Sravan Balaji
79ae89cf80 Dwm and Polybar Cleanup (finally working fully!)
- Override dwm package attributes to reflect new name
  of "dwm-flexipatch" and version 6.5
- Build off existing buildInputs for dwm rather than overwriting
  original list of dependencies
- Add playctl and zscroll packages for polybar
- Add libpulseaudio as build dependency for polybar
2024-03-30 21:33:20 -04:00
Sravan Balaji
02b601529d Fonts & Shell Prompt
- More fonts
- Add krabby and starship packages for shell prompt
2024-03-30 20:59:06 -04:00
Sravan Balaji
b2ecd969fd Fix Disko Config for Current System and Fix dwm polybar override
- Restore luks-btrfs-subvolumes.nix to old subvolume / swap size
- Make a copy of modified luks-btrfs-subvolumes.nix for future use
- Disable the polybar patch step which doesn't work
- Add git as a build input for polybar-dwm-module
2024-03-30 16:38:59 -04:00
Sravan Balaji
aa28eb8e3d First attempt at adding polybar-dwm-module (fails to build)
- 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:18:41 -04:00
Sravan Balaji
80473968ae Add btrbk for backups 2024-03-30 16:11:12 -04:00
Sravan Balaji
2e87b2ecad Add AwesomeWM 2024-03-30 16:11:12 -04:00
Sravan Balaji
0cc1298285 Modify disko BTRFS Subvolume Layout
- Decrease swapfile size to 10G (don't really need hibernation)
- Remove extra BTRFS mount options like disarcd=async, space_cache=v2,
  and ssd
- Add a games subvolume
- Add a subvolume for /var/log
2024-03-30 16:11:12 -04:00
Sravan Balaji
7db963f519 Gui Reorg and More Programs
- Gui config reorganization
- Enable picom for dwm
- Install some utilities like arandr, autorandr, and unclutter-xfixes
  for dwm
- Add nerdfonts for FiraCode
- Remove conditional imports list syntax
- Add audio tools like playerctl and pavucontrol
- Enable polkit and add GNOME polkit
- Add more media programs like freecad, audacity, ani-cli, and calibre
- Add flameshot
2024-03-28 20:16:07 -04:00
32 changed files with 383 additions and 68 deletions

View File

@@ -0,0 +1,77 @@
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" ];
};
};
};
};
};
};
};
};
};
};
}

24
flake.lock generated
View File

@@ -7,11 +7,11 @@
]
},
"locked": {
"lastModified": 1711588700,
"narHash": "sha256-vBB5HoQVnA6c/UrDOhLXKAahEwSRccw2YXYHxD7qoi4=",
"lastModified": 1711934712,
"narHash": "sha256-sBDe+QmX/QohlnKeSEzrftcXyZL5FY09OMjZ59Rpyy4=",
"owner": "nix-community",
"repo": "disko",
"rev": "502241afa3de2a24865ddcbe4c122f4546e32092",
"rev": "611c9ea53250f7bb22286b3d26872280a0e608f9",
"type": "github"
},
"original": {
@@ -224,11 +224,11 @@
]
},
"locked": {
"lastModified": 1711625603,
"narHash": "sha256-W+9dfqA9bqUIBV5u7jaIARAzMe3kTq/Hp2SpSVXKRQw=",
"lastModified": 1712016346,
"narHash": "sha256-O2nO7pD+krq+4HgkLB4VThRtAucIPfXDs/jJqCGlK1w=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "c0ef0dab55611c676ad7539bf4e41b3ec6fa87d2",
"rev": "4be0464472675212654dedf3e021bd5f1d58b92f",
"type": "github"
},
"original": {
@@ -313,11 +313,11 @@
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1711460390,
"narHash": "sha256-akSgjDZL6pVHEfSE6sz1DNSXuYX6hq+P/1Z5IoYWs7E=",
"lastModified": 1711668574,
"narHash": "sha256-u1dfs0ASQIEr1icTVrsKwg2xToIpn7ZXxW3RHfHxshg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "44733514b72e732bd49f5511bd0203dea9b9a434",
"rev": "219951b495fc2eac67b1456824cc1ec1fd2ee659",
"type": "github"
},
"original": {
@@ -329,11 +329,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1711523803,
"narHash": "sha256-UKcYiHWHQynzj6CN/vTcix4yd1eCu1uFdsuarupdCQQ=",
"lastModified": 1711703276,
"narHash": "sha256-iMUFArF0WCatKK6RzfUJknjem0H9m4KgorO/p3Dopkk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "2726f127c15a4cc9810843b96cad73c7eb39e443",
"rev": "d8fe5e6c92d0d190646fb9f1056741a229980089",
"type": "github"
},
"original": {

View File

@@ -56,23 +56,19 @@
LC_TIME = systemSettings.locale;
};
users.groups.${userSettings.username} = {
name = userSettings.username;
gid = 1000;
};
users.users.${userSettings.username} = {
isNormalUser = true;
description = userSettings.name;
extraGroups = [ "networkmanager" "wheel" "input" "dialout" ];
extraGroups = [ "${userSettings.username}" "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,6 +18,7 @@
../../user/media/default.nix
../../user/productivity/default.nix
(../../user/terminal + "/${userSettings.term}.nix")
../../user/terminal/prompt.nix
../../user/utilities/default.nix
];

19
system/gui/awesome.nix Normal file
View File

@@ -0,0 +1,19 @@
{ config, lib, pkgs, userSettings, ... }:
{
imports = [
./default.nix
./lightdm.nix
./x11.nix
];
services.xserver.windowManager.awesome = {
enable = true;
luaModules = with pkgs.luaPackages; [
luarocks
luadbi-mysql
];
};
services.xserver.displayManager.defaultSession = "none+awesome";
}

View File

@@ -3,6 +3,5 @@
{
imports = [
./fonts.nix
./utilities.nix
];
}

View File

@@ -3,25 +3,124 @@
{
imports = [
./default.nix
./lightdm.nix
./x11.nix
];
services.xserver.windowManager.dwm = {
services.xserver = {
enable = true;
package = pkgs.dwm.overrideAttrs {
xkb = {
layout = "us";
variant = "";
options = "";
};
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";
src = (/home + "/${userSettings.username}" + /.config/dwm-flexipatch);
buildInputs = with pkgs; [
xorg.libX11.dev
xorg.libXinerama
xorg.libXft
# Add dependencies for dwmipc / polybar communication patches
buildInputs = previousAttrs.buildInputs ++ (with pkgs; [
# Dependencies for swallow patch
xorg.libxcb
xorg.xcbutil
# Dependencies for dwm-ipc patch
yajl
jsoncpp
];
]);
}));
};
displayManager = {
defaultSession = "none+dwm";
lightdm.enable = true;
};
};
services.xserver.displayManager.defaultSession = "none+dwm";
# 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 {
owner = "mihirlad55";
repo = "polybar-dwm-module";
rev = "0c3e139ac54e081c06ef60548927e679d80d4297";
hash = "sha256-ZL7yDGGiZFGgVXZXS+d3xUDhOOd5lp2mo2ipFN92mIY=";
fetchSubmodules = true;
};
# Extra dependencies for dwm module
buildInputs = previousAttrs.buildInputs ++ [
jsoncpp
git
libpulseaudio
];
# Remove patches applied by default polybar package
patches = [];
}))
];
}

View File

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

View File

@@ -3,12 +3,14 @@
{
imports = [
./default.nix
(if systemSettings.desktopType == "x11" then ./x11.nix else "")
];
services.xserver.displayManager.gdm = {
services.xserver = {
displayManager.gdm = {
enable = true;
wayland = (if systemSettings.desktopType == "x11" then false else true);
};
services.xserver.desktopManager.gnome.enable = true;
desktopManager.gnome.enable = true;
};
}

View File

@@ -3,13 +3,16 @@
{
imports = [
./default.nix
(if systemSettings.desktopType == "x11" then ./x11.nix else "")
];
services.xserver.displayManager = {
sddm.enable = true;
sddm.wayland.enable = (if systemSettings.desktopType == "x11" then false else true);
sddm = {
enable = true;
wayland.enable = (if systemSettings.desktopType == "x11" then false else true);
};
defaultSession = (if systemSettings.desktopType == "x11" then "plasmax11" else "plasma");
};
services.desktopManager.plasma6.enable = true;
}

View File

@@ -1,5 +0,0 @@
{ config, lib, pkgs, ... }:
{
services.xserver.displayManager.lightdm.enable = true;
}

View File

@@ -1,12 +0,0 @@
{ config, lib, pkgs, ... }:
{
services.xserver = {
enable = true;
xkb = {
layout = "us";
variant = "";
options = "";
};
};
}

View File

@@ -11,4 +11,8 @@
pulse.enable = true;
jack.enable = true;
};
environment.systemPackages = with pkgs; [
playerctl
pavucontrol
];
}

View File

@@ -1,6 +1,10 @@
{ config, lib, pkgs, ... }:
{
hardware.bluetooth.enable = true;
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
};
services.blueman.enable = true;
}

View File

@@ -1,8 +1,20 @@
{ 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

@@ -4,5 +4,6 @@
imports = [
./firewall.nix
./gpg.nix
./polkit.nix
];
}

View File

@@ -0,0 +1,8 @@
{ config, lib, pkgs, ... }:
{
security.polkit.enable = true;
environment.systemPackages = with pkgs; [
polkit_gnome
];
}

View File

@@ -2,7 +2,6 @@
{
environment.systemPackages = with pkgs; [
arandr
autorandr
btrbk
];
}

View File

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

View File

@@ -6,5 +6,10 @@
./gnome-keyring.nix
./miscellaneous.nix
./gaming.nix
./backups.nix
./user-shell.nix
./samba.nix
./cloud.nix
./phone.nix
];
}

View File

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

View File

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

View File

@@ -0,0 +1,32 @@
{ 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

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

View File

@@ -4,5 +4,7 @@
home.packages = (with pkgs; [
blender
obs-studio
freecad
sweethome3d.application
]);
}

View File

@@ -5,5 +5,6 @@
gimp
libsForQt5.kdenlive
ffmpeg
audacity
]);
}

View File

@@ -8,5 +8,8 @@
pocket-casts
spotify
spicetify-cli
ani-cli
mangal
calibre
]);
}

View File

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

8
user/terminal/prompt.nix Normal file
View File

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

View File

@@ -8,5 +8,7 @@
./keyboard-configuration.nix
./passwords.nix
./xdg.nix
./screenshot.nix
./downloads.nix
];
}

View File

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

View File

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