General cleanup: Not using Linux GUI

This commit is contained in:
Sridhar Ratnakumar 2025-08-24 13:47:55 -04:00
parent 10eb6ddfe4
commit 2e54d35ed1
81 changed files with 25 additions and 2502 deletions

View file

@ -43,41 +43,9 @@
LC_TIME = "en_US.UTF-8";
};
# Enable the X11 windowing system.
services.xserver.enable = true;
# Enable the GNOME Desktop Environment.
services.xserver.displayManager.gdm.enable = true;
services.xserver.desktopManager.gnome.enable = true;
# Configure keymap in X11
services.xserver.xkb = {
layout = "us";
variant = "";
};
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable sound with pipewire.
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
# If you want to use JACK applications, uncomment this
#jack.enable = true;
# use the example session manager (no others are packaged yet so this is enabled by default,
# no need to redefine it in your config for now)
#media-session.enable = true;
};
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;
# Define a user account. Don't forget to set a password with passwd.
users.users.srid = {
isNormalUser = true;
@ -88,8 +56,6 @@
];
};
# Install firefox.
programs.firefox.enable = true;
# Allow unfree packages
nixpkgs.config.allowUnfree = true;

View file

@ -8,19 +8,10 @@ in
imports = [
self.nixosModules.default
inputs.nixos-hardware.nixosModules.lenovo-thinkpad-p14s-amd-gen4
(self + /modules/nixos/linux/gui/_1password.nix)
(self + /modules/nixos/linux/gui/steam.nix)
(self + /modules/nixos/linux/gui/desktopish/monitor-brightness.nix)
./configuration.nix
];
boot.initrd.kernelModules = [ "amdgpu" ];
services.xserver.videoDrivers = [ "amdgpu" ];
services.tailscale.enable = true;
environment.systemPackages = with pkgs; [
google-chrome
zed-editor
calibre
];
}

455
flake.lock generated
View file

@ -21,39 +21,6 @@
"type": "github"
}
},
"aquamarine": {
"inputs": {
"hyprutils": [
"hyprland",
"hyprutils"
],
"hyprwayland-scanner": [
"hyprland",
"hyprwayland-scanner"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1731959031,
"narHash": "sha256-TGcvIjftziC1CjuiHCzrYDwmOoSFYIhdiKmLetzB5L0=",
"owner": "hyprwm",
"repo": "aquamarine",
"rev": "4468981c1c50999f315baa1508f0e53c4ee70c52",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "aquamarine",
"type": "github"
}
},
"cachix-push": {
"locked": {
"lastModified": 1725315090,
@ -74,7 +41,7 @@
"devshell": "devshell",
"flake-parts": "flake-parts_5",
"haskell-flake": "haskell-flake",
"nixpkgs": "nixpkgs_8",
"nixpkgs": "nixpkgs_7",
"pre-commit-hooks-nix": "pre-commit-hooks-nix",
"treefmt-nix": "treefmt-nix"
},
@ -257,22 +224,6 @@
"type": "github"
}
},
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
@ -396,7 +347,7 @@
},
"flake-utils": {
"inputs": {
"systems": "systems_4"
"systems": "systems_3"
},
"locked": {
"lastModified": 1681202837,
@ -414,7 +365,7 @@
},
"flake-utils_2": {
"inputs": {
"systems": "systems_5"
"systems": "systems_4"
},
"locked": {
"lastModified": 1731533236,
@ -432,7 +383,7 @@
},
"flake-utils_3": {
"inputs": {
"systems": "systems_7"
"systems": "systems_6"
},
"locked": {
"lastModified": 1681202837,
@ -528,28 +479,6 @@
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"hyprland",
"pre-commit-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"gitignore_2": {
"inputs": {
"nixpkgs": [
"vira",
@ -676,227 +605,6 @@
"type": "github"
}
},
"hyprcursor": {
"inputs": {
"hyprlang": [
"hyprland",
"hyprlang"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1728669738,
"narHash": "sha256-EDNAU9AYcx8OupUzbTbWE1d3HYdeG0wO6Msg3iL1muk=",
"owner": "hyprwm",
"repo": "hyprcursor",
"rev": "0264e698149fcb857a66a53018157b41f8d97bb0",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprcursor",
"type": "github"
}
},
"hyprgraphics": {
"inputs": {
"hyprutils": [
"hyprland",
"hyprutils"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1734906236,
"narHash": "sha256-vH/ysV2ONGQgYZPtcJKwc8jJivzyVxru2aaOxC20ZOE=",
"owner": "hyprwm",
"repo": "hyprgraphics",
"rev": "6dea3fba08fd704dd624b6d4b261638fb4003c9c",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprgraphics",
"type": "github"
}
},
"hyprland": {
"inputs": {
"aquamarine": "aquamarine",
"hyprcursor": "hyprcursor",
"hyprgraphics": "hyprgraphics",
"hyprland-protocols": "hyprland-protocols",
"hyprland-qtutils": "hyprland-qtutils",
"hyprlang": "hyprlang",
"hyprutils": "hyprutils",
"hyprwayland-scanner": "hyprwayland-scanner",
"nixpkgs": "nixpkgs_2",
"pre-commit-hooks": "pre-commit-hooks",
"systems": "systems_2",
"xdph": "xdph"
},
"locked": {
"lastModified": 1734636407,
"narHash": "sha256-HF5shWnOv5uJJSKJnnbLvE+lqCTCTKY2JlKs14kVKOo=",
"owner": "hyprwm",
"repo": "Hyprland",
"rev": "0bd541f2fd902dbfa04c3ea2ccf679395e316887",
"type": "github"
},
"original": {
"owner": "hyprwm",
"ref": "v0.46.2",
"repo": "Hyprland",
"type": "github"
}
},
"hyprland-protocols": {
"inputs": {
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1728345020,
"narHash": "sha256-xGbkc7U/Roe0/Cv3iKlzijIaFBNguasI31ynL2IlEoM=",
"owner": "hyprwm",
"repo": "hyprland-protocols",
"rev": "a7c183800e74f337753de186522b9017a07a8cee",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprland-protocols",
"type": "github"
}
},
"hyprland-qtutils": {
"inputs": {
"hyprutils": [
"hyprland",
"hyprutils"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1734906472,
"narHash": "sha256-pWPRv/GA/X/iAwoE6gMNUqn/ZeJX1IeLPRpZI0tTPK0=",
"owner": "hyprwm",
"repo": "hyprland-qtutils",
"rev": "c77109d7e1ddbcdb87cafd32ce411f76328ae152",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprland-qtutils",
"type": "github"
}
},
"hyprlang": {
"inputs": {
"hyprutils": [
"hyprland",
"hyprutils"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1728168612,
"narHash": "sha256-AnB1KfiXINmuiW7BALYrKqcjCnsLZPifhb/7BsfPbns=",
"owner": "hyprwm",
"repo": "hyprlang",
"rev": "f054f2e44d6a0b74607a6bc0f52dba337a3db38e",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprlang",
"type": "github"
}
},
"hyprutils": {
"inputs": {
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1731702627,
"narHash": "sha256-+JeO9gevnXannQxMfR5xzZtF4sYmSlWkX/BPmPx0mWk=",
"owner": "hyprwm",
"repo": "hyprutils",
"rev": "e911361a687753bbbdfe3b6a9eab755ecaf1d9e1",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprutils",
"type": "github"
}
},
"hyprwayland-scanner": {
"inputs": {
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1726874836,
"narHash": "sha256-VKR0sf0PSNCB0wPHVKSAn41mCNVCnegWmgkrneKDhHM=",
"owner": "hyprwm",
"repo": "hyprwayland-scanner",
"rev": "500c81a9e1a76760371049a8d99e008ea77aa59e",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprwayland-scanner",
"type": "github"
}
},
"inspect": {
"flake": false,
"locked": {
@ -969,7 +677,7 @@
"nixpkgs": [
"nixpkgs"
],
"systems": "systems_3"
"systems": "systems_2"
},
"locked": {
"lastModified": 1754815323,
@ -1113,7 +821,7 @@
"nixos-vscode-server": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs_3"
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1684517665,
@ -1172,22 +880,6 @@
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1730741070,
"narHash": "sha256-edm8WG19kWozJ/GqyYx2VjW99EdhjKwbY3ZwdlPAAlo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d063c1dd113c91ab27959ba540c0d9753409edf3",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1744868846,
@ -1205,22 +897,6 @@
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1731676054,
"narHash": "sha256-OZiZ3m8SCMfh3B6bfGC/Bm4x3qc1m2SVEAlkV6iY7Yg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5e4fbfb6b3de1aa2872b76d49fafc942626e2add",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1682526928,
"narHash": "sha256-2cKh4O6t1rQ8Ok+v16URynmb0rV7oZPEbXkU0owNLQs=",
@ -1233,7 +909,7 @@
"type": "indirect"
}
},
"nixpkgs_4": {
"nixpkgs_3": {
"locked": {
"lastModified": 1755027561,
"narHash": "sha256-IVft239Bc8p8Dtvf7UAACMG5P3ZV+3/aO28gXpGtMXI=",
@ -1249,7 +925,7 @@
"type": "github"
}
},
"nixpkgs_5": {
"nixpkgs_4": {
"locked": {
"lastModified": 1701436327,
"narHash": "sha256-tRHbnoNI8SIM5O5xuxOmtSLnswEByzmnQcGGyNRjxsE=",
@ -1263,7 +939,7 @@
"url": "https://flakehub.com/f/NixOS/nixpkgs/0.1.%2A.tar.gz"
}
},
"nixpkgs_6": {
"nixpkgs_5": {
"locked": {
"lastModified": 1725194671,
"narHash": "sha256-tLGCFEFTB5TaOKkpfw3iYT9dnk4awTP/q4w+ROpMfuw=",
@ -1279,7 +955,7 @@
"type": "github"
}
},
"nixpkgs_7": {
"nixpkgs_6": {
"locked": {
"lastModified": 1755577059,
"narHash": "sha256-5hYhxIpco8xR+IpP3uU56+4+Bw7mf7EMyxS/HqUYHQY=",
@ -1295,7 +971,7 @@
"type": "github"
}
},
"nixpkgs_8": {
"nixpkgs_7": {
"locked": {
"lastModified": 1738264807,
"narHash": "sha256-6x6WLFwoLdR3w3FYtCnLye2Xe32SqsL7Zf0jpa5wJMM=",
@ -1311,7 +987,7 @@
"type": "github"
}
},
"nixpkgs_9": {
"nixpkgs_8": {
"locked": {
"lastModified": 1748217807,
"narHash": "sha256-P3u2PXxMlo49PutQLnk2PhI/imC69hFl1yY4aT5Nax8=",
@ -1334,7 +1010,7 @@
"nixpkgs"
],
"nuschtosSearch": "nuschtosSearch",
"systems": "systems_6"
"systems": "systems_5"
},
"locked": {
"lastModified": 1755095763,
@ -1352,7 +1028,7 @@
},
"nuenv": {
"inputs": {
"nixpkgs": "nixpkgs_5",
"nixpkgs": "nixpkgs_4",
"rust-overlay": "rust-overlay"
},
"locked": {
@ -1405,9 +1081,9 @@
"nix-systems-aarch64-linux": "nix-systems-aarch64-linux",
"nix-systems-x86_64-darwin": "nix-systems-x86_64-darwin",
"nix-systems-x86_64-linux": "nix-systems-x86_64-linux",
"nixpkgs": "nixpkgs_6",
"nixpkgs": "nixpkgs_5",
"rust-flake": "rust-flake",
"systems": "systems_8",
"systems": "systems_7",
"true": "true"
},
"locked": {
@ -1424,34 +1100,10 @@
"type": "github"
}
},
"pre-commit-hooks": {
"pre-commit-hooks-nix": {
"inputs": {
"flake-compat": "flake-compat",
"gitignore": "gitignore",
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1732021966,
"narHash": "sha256-mnTbjpdqF0luOkou8ZFi2asa1N3AA2CchR/RqCNmsGE=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "3308484d1a443fc5bc92012435d79e80458fe43c",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "git-hooks.nix",
"type": "github"
}
},
"pre-commit-hooks-nix": {
"inputs": {
"flake-compat": "flake-compat_2",
"gitignore": "gitignore_2",
"nixpkgs": [
"vira",
"co-log-effectful",
@ -1495,14 +1147,13 @@
"git-hooks": "git-hooks",
"github-nix-ci": "github-nix-ci",
"home-manager": "home-manager_2",
"hyprland": "hyprland",
"nix-darwin": "nix-darwin",
"nix-doom-emacs-unstraightened": "nix-doom-emacs-unstraightened",
"nix-index-database": "nix-index-database",
"nixos-hardware": "nixos-hardware",
"nixos-unified": "nixos-unified",
"nixos-vscode-server": "nixos-vscode-server",
"nixpkgs": "nixpkgs_4",
"nixpkgs": "nixpkgs_3",
"nixpkgs-unstable": "nixpkgs-unstable",
"nixvim": "nixvim",
"nuenv": "nuenv",
@ -1596,16 +1247,16 @@
},
"systems_2": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"repo": "default",
"type": "github"
}
},
@ -1684,21 +1335,6 @@
"type": "github"
}
},
"systems_8": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"treefmt-nix": {
"inputs": {
"nixpkgs": [
@ -1739,7 +1375,7 @@
"try": {
"inputs": {
"flake-parts": "flake-parts_4",
"nixpkgs": "nixpkgs_7"
"nixpkgs": "nixpkgs_6"
},
"locked": {
"lastModified": 1755714246,
@ -1789,7 +1425,7 @@
"htmx": "htmx",
"htmx-extensions": "htmx-extensions",
"nixos-unified": "nixos-unified_2",
"nixpkgs": "nixpkgs_9",
"nixpkgs": "nixpkgs_8",
"process-compose-flake": "process-compose-flake"
},
"locked": {
@ -1805,47 +1441,6 @@
"repo": "vira",
"type": "github"
}
},
"xdph": {
"inputs": {
"hyprland-protocols": [
"hyprland",
"hyprland-protocols"
],
"hyprlang": [
"hyprland",
"hyprlang"
],
"hyprutils": [
"hyprland",
"hyprutils"
],
"hyprwayland-scanner": [
"hyprland",
"hyprwayland-scanner"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1731703417,
"narHash": "sha256-rheDc/7C+yI+QspYr9J2z9kQ5P9F4ATapI7qyFAe1XA=",
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"rev": "8070f36deec723de71e7557441acb17e478204d3",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"type": "github"
}
}
},
"root": "root",

View file

@ -24,7 +24,6 @@
nix-index-database.url = "github:nix-community/nix-index-database";
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
omnix.url = "github:juspay/omnix";
hyprland.url = "github:hyprwm/Hyprland/v0.46.2";
vertex.url = "github:juspay/vertex";
vertex.inputs = {
nixpkgs.follows = "nixpkgs";

View file

@ -1,5 +0,0 @@
{ pkgs, ... }: {
imports = [
./protonmail-bridge.nix
];
}

View file

@ -1,17 +0,0 @@
{ pkgs, ... }: {
environment.systemPackages = [ pkgs.protonmail-bridge ];
services.gnome.gnome-keyring.enable = true;
# Before starting the service, use `protonmail-bridge --cli` and run 'login'
# to configure.
systemd.user.services.protonmail-bridge = {
description = "Protonmail Bridge";
after = [ "network.target" ];
wantedBy = [ "default.target" ];
path = [ pkgs.pass ];
serviceConfig = {
Restart = "always";
ExecStart = "${pkgs.protonmail-bridge}/bin/protonmail-bridge --noninteractive";
};
};
}

View file

@ -1,11 +0,0 @@
# https://nixos.wiki/wiki/1Password
{
programs._1password.enable = true;
programs._1password-gui = {
enable = true;
# Certain features, including CLI integration and system authentication support,
# require enabling PolKit integration on some desktop environments (e.g. Plasma).
polkitPolicyOwners = [ "srid" ];
};
security.polkit.enable = true;
}

View file

@ -1 +0,0 @@
Individual features to be added to tiling window managers and such as to provide a desktop-like experience.

View file

@ -1,58 +0,0 @@
{ config, pkgs, ... }:
let
caffeine =
pkgs.writeScriptBin "caffeine"
''
#!${pkgs.runtimeShell}
set -xe
HOURS=$*
SECS=`expr 1 + 60 \* 60 \* $HOURS`
date
${pkgs.xautolock}/bin/xautolock -disable
${pkgs.cowsay}/bin/cowsay "Autolock de-activated for next $HOURS hours"
sleep $SECS
date
${pkgs.xautolock}/bin/xautolock -enable
${pkgs.cowsay}/bin/cowsay "Autolock re-activated."
'';
in
{
services.xserver.xautolock = {
enable = true;
time = 5; # mins
# Some modes freeze P71, so explicitly select a mode that is known to be stable.
locker = "${pkgs.xlockmore}/bin/xlock -mode space";
# Suspend after lock.
killtime = 10; # mins
killer = "${pkgs.systemd}/bin/systemctl suspend";
};
environment.systemPackages = [
# TODO: replace this with https://github.com/jD91mZM2/xidlehook
#
# A script to disable auto-suspend until unlocking the computer the next
# time. The idea is to leave this running on desktop, whilst taking my
# laptop to another room and ssh to the desktop.
(pkgs.writeScriptBin "estivate"
''
#!${pkgs.runtimeShell}
set -xe
date
${pkgs.xautolock}/bin/xautolock -disable
${pkgs.xlockmore}/bin/xlock -mode blank
date
${pkgs.xautolock}/bin/xautolock -enable
${pkgs.cowsay}/bin/cowsay "Welcome back!"
'')
# Run this before watching a movie
(pkgs.writeScriptBin "caffeine-2hr"
''
#!${pkgs.runtimeShell}
set -xe
${caffeine} 2
'')
caffeine
];
}

View file

@ -1,40 +0,0 @@
{ pkgs, ... }: {
imports = [
# Isolated features
./hidpi.nix
./swap-caps-ctrl.nix
./light-terminal.nix
./screencapture.nix
./fonts.nix
./touchpad-trackpoint.nix
./autolock.nix
./redshift.nix
./gnome-keyring.nix
./guiapps.nix
./polybar.nix
./hotplug.nix
# WMish things
./xmonad
#./taffybar # Disabled, because it rarely works (and memory hungry)
# ./xmobar # shit UX
];
environment.systemPackages = with pkgs; [
acpi
mpv
youtube-dl
xorg.xmessage
];
services.xserver = {
enable = true;
displayManager.lightdm.enable = true;
};
# Speed up boot
# https://discourse.nixos.org/t/boot-faster-by-disabling-udev-settle-and-nm-wait-online/6339
systemd.services.systemd-udev-settle.enable = false;
systemd.services.NetworkManager-wait-online.enable = false;
}

View file

@ -1,16 +0,0 @@
{ pkgs, ... }:
{
fonts = {
enableDefaultPackages = true;
packages = with pkgs; [
# NOTE: Some fonts may break colour emojis in Chrome
# cf. https://github.com/NixOS/nixpkgs/issues/69073#issuecomment-621982371
# If this happens , keep noto-fonts-emoji and try disabling others (nerdfonts, etc.)
noto-fonts-emoji
fira-code
font-awesome
];
};
}

View file

@ -1,8 +0,0 @@
{ pkgs, ... }: {
services.gnome.at-spi2-core.enable = true; # Not sure what this is for.
# https://unix.stackexchange.com/a/434752
security.pam.services.lightdm.enableGnomeKeyring = true;
services.gnome.gnome-keyring.enable = true;
programs.seahorse.enable = true; # keyring GUI
}

View file

@ -1,26 +0,0 @@
{ pkgs, ... }: {
imports = [
./vscode.nix
];
# Apps I use on desktops and laptops
environment.systemPackages = with pkgs; [
firefox
# onlyoffice-bin
obsidian
simplescreenrecorder
obs-studio
vlc
qbittorrent
# X stuff
caffeine-ng
xorg.xdpyinfo
xorg.xrandr
xclip
xsel
arandr
];
}

View file

@ -1,12 +0,0 @@
{ config, pkgs, lib, ... }:
{
hardware.video.hidpi.enable = true;
services.xserver.dpi = 170;
services.xserver.displayManager.sessionCommands = ''
${pkgs.xorg.xrdb}/bin/xrdb -merge <<EOF
Xft.dpi: 192
Xcursor.theme: Adwaita
Xcursor.size: 64
EOF
'';
}

View file

@ -1,7 +0,0 @@
{ pkgs, ... }:
{
services.autorandr = {
enable = true;
};
}

View file

@ -1,17 +0,0 @@
{ config, pkgs, ... }:
let
# Suckless Terminal provides good performance. Just need to increase the
# fontsize on retina display.
myst = pkgs.writeScriptBin "myst"
''
#!${pkgs.runtimeShell}
# Use fc-list to lookup font names
exec ${pkgs.st}/bin/st -f "Iosevka:pixelsize=26" $*
'';
in
{
environment.systemPackages = with pkgs; [
myst
alacritty
];
}

View file

@ -1,34 +0,0 @@
# TODO: GNOME support via https://extensions.gnome.org/extension/2645/brightness-control-using-ddcutil/
#
# NOTE: For Apple Display, we need https://github.com/juliuszint/asdbctl
{ pkgs, flake, ... }: {
# ddcutils requires i2c
hardware.i2c.enable = true;
environment.systemPackages = with pkgs;
[
# ddcutil can manage *external* monitor's brightness
ddcutil
# This can control the laptop display.
brightnessctl
];
security.sudo.extraRules = [
{
users = [ flake.config.me.username ];
commands = [
{
command = "${pkgs.ddcutil}/bin/ddcutil";
options = [ "NOPASSWD" ];
}
];
}
];
users.users.${flake.config.me.username} = {
extraGroups = [ "i2c" ];
};
}

View file

@ -1,424 +0,0 @@
;==========================================================
;
;
; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗
; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝
; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗
; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║
; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝
;
;
; To learn more about how to configure Polybar
; go to https://github.com/polybar/polybar
;
; The README contains a lot of information
;
;==========================================================
[colors]
;background = ${xrdb:color0:#222}
background = #222
background-alt = #444
;foreground = ${xrdb:color7:#222}
foreground = #dfdfdf
foreground-alt = #555
primary = #ffb52a
secondary = #e60053
alert = #bd2c40
[bar/example]
;monitor = ${env:MONITOR:HDMI-1}
width = 100%
height = 48
;offset-x = 1%
;offset-y = 1%
radius = 6.0
fixed-center = false
background = ${colors.background}
foreground = ${colors.foreground}
line-size = 3
line-color = #f00
border-size = 4
border-color = #00000000
padding-left = 0
padding-right = 2
module-margin-left = 1
module-margin-right = 2
font-0 = fixed:pixelsize=64;1
font-1 = unifont:fontformat=truetype:size=64:antialias=false;0
font-2 = siji:pixelsize=64;1
modules-left = bspwm
modules-center =
modules-right = filesystem xbacklight alsa xkeyboard memory cpu wlan eth battery temperature date powermenu
tray-position = right
tray-padding = 2
;tray-background = #0063ff
;wm-restack = bspwm
;wm-restack = i3
;override-redirect = true
;scroll-up = bspwm-desknext
;scroll-down = bspwm-deskprev
;scroll-up = i3wm-wsnext
;scroll-down = i3wm-wsprev
cursor-click = pointer
cursor-scroll = ns-resize
[module/xwindow]
type = internal/xwindow
label = %title:0:30:...%
[module/xkeyboard]
type = internal/xkeyboard
blacklist-0 = num lock
format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt}
format-prefix-underline = ${colors.secondary}
label-layout = %layout%
label-layout-underline = ${colors.secondary}
label-indicator-padding = 2
label-indicator-margin = 1
label-indicator-background = ${colors.secondary}
label-indicator-underline = ${colors.secondary}
[module/filesystem]
type = internal/fs
interval = 25
mount-0 = /
label-mounted = %{F#0a81f5}%mountpoint%%{F-}: %percentage_used%%
label-unmounted = %mountpoint% not mounted
label-unmounted-foreground = ${colors.foreground-alt}
[module/bspwm]
type = internal/bspwm
label-focused = %index%
label-focused-background = ${colors.background-alt}
label-focused-underline= ${colors.primary}
label-focused-padding = 2
label-occupied = %index%
label-occupied-padding = 2
label-urgent = %index%!
label-urgent-background = ${colors.alert}
label-urgent-padding = 2
label-empty = %index%
label-empty-foreground = ${colors.foreground-alt}
label-empty-padding = 2
; Separator in between workspaces
; label-separator = |
[module/i3]
type = internal/i3
format = <label-state> <label-mode>
index-sort = true
wrapping-scroll = false
; Only show workspaces on the same output as the bar
;pin-workspaces = true
label-mode-padding = 2
label-mode-foreground = #000
label-mode-background = ${colors.primary}
; focused = Active workspace on focused monitor
label-focused = %index%
label-focused-background = ${colors.background-alt}
label-focused-underline= ${colors.primary}
label-focused-padding = 2
; unfocused = Inactive workspace on any monitor
label-unfocused = %index%
label-unfocused-padding = 2
; visible = Active workspace on unfocused monitor
label-visible = %index%
label-visible-background = ${self.label-focused-background}
label-visible-underline = ${self.label-focused-underline}
label-visible-padding = ${self.label-focused-padding}
; urgent = Workspace with urgency hint set
label-urgent = %index%
label-urgent-background = ${colors.alert}
label-urgent-padding = 2
; Separator in between workspaces
; label-separator = |
[module/mpd]
type = internal/mpd
format-online = <label-song> <icon-prev> <icon-stop> <toggle> <icon-next>
icon-prev = 
icon-stop = 
icon-play = 
icon-pause = 
icon-next = 
label-song-maxlen = 25
label-song-ellipsis = true
[module/xbacklight]
type = internal/xbacklight
format = <label> <bar>
label = BL
bar-width = 10
bar-indicator = |
bar-indicator-foreground = #fff
bar-indicator-font = 2
bar-fill = ─
bar-fill-font = 2
bar-fill-foreground = #9f78e1
bar-empty = ─
bar-empty-font = 2
bar-empty-foreground = ${colors.foreground-alt}
[module/backlight-acpi]
inherit = module/xbacklight
type = internal/backlight
card = intel_backlight
[module/cpu]
type = internal/cpu
interval = 2
format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt}
format-underline = #f90000
label = %percentage:2%%
[module/memory]
type = internal/memory
interval = 2
format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt}
format-underline = #4bffdc
label = %percentage_used%%
[module/wlan]
type = internal/network
interface = net1
interval = 3.0
format-connected = <ramp-signal> <label-connected>
format-connected-underline = #9f78e1
label-connected = %essid%
format-disconnected =
;format-disconnected = <label-disconnected>
;format-disconnected-underline = ${self.format-connected-underline}
;label-disconnected = %ifname% disconnected
;label-disconnected-foreground = ${colors.foreground-alt}
ramp-signal-0 = 
ramp-signal-1 = 
ramp-signal-2 = 
ramp-signal-3 = 
ramp-signal-4 = 
ramp-signal-foreground = ${colors.foreground-alt}
[module/eth]
type = internal/network
interface = net0
interval = 3.0
format-connected-underline = #55aa55
format-connected-prefix = " "
format-connected-prefix-foreground = ${colors.foreground-alt}
label-connected = %local_ip%
format-disconnected =
;format-disconnected = <label-disconnected>
;format-disconnected-underline = ${self.format-connected-underline}
;label-disconnected = %ifname% disconnected
;label-disconnected-foreground = ${colors.foreground-alt}
[module/date]
type = internal/date
interval = 5
date =
date-alt = " %Y-%m-%d"
time = %H:%M
time-alt = %H:%M:%S
format-prefix = 
format-prefix-foreground = ${colors.foreground-alt}
format-underline = #0a6cf5
label = %date% %time%
[module/pulseaudio]
type = internal/pulseaudio
format-volume = <label-volume> <bar-volume>
label-volume = VOL %percentage%%
label-volume-foreground = ${root.foreground}
label-muted = 🔇 muted
label-muted-foreground = #666
bar-volume-width = 10
bar-volume-foreground-0 = #55aa55
bar-volume-foreground-1 = #55aa55
bar-volume-foreground-2 = #55aa55
bar-volume-foreground-3 = #55aa55
bar-volume-foreground-4 = #55aa55
bar-volume-foreground-5 = #f5a70a
bar-volume-foreground-6 = #ff5555
bar-volume-gradient = false
bar-volume-indicator = |
bar-volume-indicator-font = 2
bar-volume-fill = ─
bar-volume-fill-font = 2
bar-volume-empty = ─
bar-volume-empty-font = 2
bar-volume-empty-foreground = ${colors.foreground-alt}
[module/alsa]
type = internal/alsa
format-volume = <label-volume> <bar-volume>
label-volume = VOL
label-volume-foreground = ${root.foreground}
format-muted-prefix = " "
format-muted-foreground = ${colors.foreground-alt}
label-muted = sound muted
bar-volume-width = 10
bar-volume-foreground-0 = #55aa55
bar-volume-foreground-1 = #55aa55
bar-volume-foreground-2 = #55aa55
bar-volume-foreground-3 = #55aa55
bar-volume-foreground-4 = #55aa55
bar-volume-foreground-5 = #f5a70a
bar-volume-foreground-6 = #ff5555
bar-volume-gradient = false
bar-volume-indicator = |
bar-volume-indicator-font = 2
bar-volume-fill = ─
bar-volume-fill-font = 2
bar-volume-empty = ─
bar-volume-empty-font = 2
bar-volume-empty-foreground = ${colors.foreground-alt}
[module/battery]
type = internal/battery
battery = BAT0
adapter = ADP1
full-at = 98
format-charging = <animation-charging> <label-charging>
format-charging-underline = #ffb52a
format-discharging = <animation-discharging> <label-discharging>
format-discharging-underline = ${self.format-charging-underline}
format-full-prefix = " "
format-full-prefix-foreground = ${colors.foreground-alt}
format-full-underline = ${self.format-charging-underline}
ramp-capacity-0 = 
ramp-capacity-1 = 
ramp-capacity-2 = 
ramp-capacity-foreground = ${colors.foreground-alt}
animation-charging-0 = 
animation-charging-1 = 
animation-charging-2 = 
animation-charging-foreground = ${colors.foreground-alt}
animation-charging-framerate = 750
animation-discharging-0 = 
animation-discharging-1 = 
animation-discharging-2 = 
animation-discharging-foreground = ${colors.foreground-alt}
animation-discharging-framerate = 750
[module/temperature]
type = internal/temperature
thermal-zone = 0
warn-temperature = 60
format = <ramp> <label>
format-underline = #f50a4d
format-warn = <ramp> <label-warn>
format-warn-underline = ${self.format-underline}
label = %temperature-c%
label-warn = %temperature-c%
label-warn-foreground = ${colors.secondary}
ramp-0 = 
ramp-1 = 
ramp-2 = 
ramp-foreground = ${colors.foreground-alt}
[module/powermenu]
type = custom/menu
expand-right = true
format-spacing = 1
label-open = 
label-open-foreground = ${colors.secondary}
label-close =  cancel
label-close-foreground = ${colors.secondary}
label-separator = |
label-separator-foreground = ${colors.foreground-alt}
menu-0-0 = reboot
menu-0-0-exec = menu-open-1
menu-0-1 = power off
menu-0-1-exec = menu-open-2
menu-1-0 = cancel
menu-1-0-exec = menu-open-0
menu-1-1 = reboot
menu-1-1-exec = sudo reboot
menu-2-0 = power off
menu-2-0-exec = sudo poweroff
menu-2-1 = cancel
menu-2-1-exec = menu-open-0
[settings]
screenchange-reload = true
;compositing-background = xor
;compositing-background = screen
;compositing-foreground = source
;compositing-border = over
;pseudo-transparency = false
[global/wm]
margin-top = 5
margin-bottom = 5
; vim:ft=dosini

View file

@ -1,22 +0,0 @@
{ config, pkgs, ... }:
{
systemd.user.services.polybar = {
enable = true;
description = "Polybar";
wantedBy = [ "graphical-session.target" ];
serviceConfig = {
ExecStart = "${pkgs.polybar}/bin/polybar -c /etc/nixos/nixos/desktopish/polybar example";
Restart = "on-abnormal";
};
};
environment.systemPackages = [ pkgs.polybar ];
fonts = {
fonts = with pkgs; [
siji
];
};
}

View file

@ -1,8 +0,0 @@
{ config, pkgs, ... }:
# Based on https://nixos.wiki/wiki/Redshift
{
services.redshift = {
enable = true;
};
}

View file

@ -1,13 +0,0 @@
{ config, pkgs, ... }:
let
screenshot = pkgs.writeScriptBin "screenshot"
''
#!${pkgs.runtimeShell}
${pkgs.maim}/bin/maim -s | ${pkgs.xclip}/bin/xclip -selection clipboard -t image/png
'';
in
{
environment.systemPackages = with pkgs; [
screenshot
];
}

View file

@ -1,5 +0,0 @@
{ config, pkgs, ... }:
{
services.xserver.xkbOptions = "ctrl:swapcaps";
console.useXkbConfig = true;
}

View file

@ -1,30 +0,0 @@
{ config, pkgs, ... }:
let
taffyPkg = pkgs.callPackage ./taffybar-srid { inherit pkgs; };
in
{
systemd.user.services.taffybar = {
enable = true;
description = "Taffybar";
wantedBy = [ "graphical-session.target" ];
serviceConfig = {
ExecStart = "${taffyPkg}/bin/taffybar-srid";
Restart = "on-abnormal";
};
};
# Battery widget requires this.
services.upower = {
enable = true;
};
# https://github.com/taffybar/taffybar/issues/403
services.xserver.gdk-pixbuf.modulePackages = [ pkgs.librsvg ];
gtk.iconCache.enable = true;
environment.systemPackages = with pkgs; [
# https://github.com/NixOS/nixpkgs/issues/43836#issuecomment-419217138
hicolor-icon-theme
gnome-icon-theme
];
}

View file

@ -1,2 +0,0 @@
result
dist-newstyle

View file

@ -1,8 +0,0 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"haskell.haskell",
"arrterian.nix-env-selector"
]
}

View file

@ -1,6 +0,0 @@
{
"nixEnvSelector.nixShellConfig": "${workspaceRoot}/default.nix",
"editor.formatOnType": true,
"editor.formatOnSave": true,
"nixEnvSelector.nixFile": "${workspaceRoot}/default.nix"
}

View file

@ -1,5 +0,0 @@
# Revision history
## 0.1.0.0 -- YYYY-mm-dd
* First version. Released on an unsuspecting world.

View file

@ -1,111 +0,0 @@
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
import Control.Exception (SomeException, catch)
import Control.Monad.Reader (ReaderT (ReaderT), runReaderT)
import Data.Foldable (traverse_)
import GI.Gtk.Objects.Widget (Widget)
import System.Log.Logger
( Priority (DEBUG),
getLogger,
saveGlobalLogger,
setLevel,
)
import System.Taffybar (startTaffybar)
import System.Taffybar.Context (TaffyIO)
import System.Taffybar.Information.CPU (cpuLoad)
import System.Taffybar.SimpleConfig (SimpleTaffyConfig (endWidgets), barHeight, defaultSimpleTaffyConfig, startWidgets, toTaffyConfig)
import System.Taffybar.Util ((<|||>))
import System.Taffybar.Widget (WindowIconPixbufGetter, defaultClockConfig, defaultWorkspacesConfig, getWindowIconPixbuf, getWindowIconPixbufFromClass, getWindowIconPixbufFromDesktopEntry, getWindowIconPixbufFromEWMH, scaledWindowIconPixbufGetter, textClockNewWith, workspacesNew)
import System.Taffybar.Widget.Battery (batteryIconNew)
import System.Taffybar.Widget.CommandRunner (commandRunnerNew)
import System.Taffybar.Widget.Generic.Graph
( GraphConfig (..),
defaultGraphConfig,
graphLabel,
)
import System.Taffybar.Widget.Generic.PollingGraph (pollingGraphNew)
import System.Taffybar.Widget.Layout
( defaultLayoutConfig,
layoutNew,
)
-- FIXME: Too much memory usage, https://github.com/srid/nixos-config/issues/8
main :: IO ()
main = do
-- enableDebugLogging
startTaffybar $ toTaffyConfig cfg
cfg :: SimpleTaffyConfig
cfg =
defaultSimpleTaffyConfig
{ startWidgets =
[ workspacesW
],
endWidgets =
[ clockW,
batteryW,
-- scratchW,
-- FIXME: doesn't work
-- menuWidgetNew Nothing,
layoutNew defaultLayoutConfig
-- cpuW
],
barHeight = 50
}
workspacesW :: TaffyIO Widget
workspacesW =
workspacesNew $
defaultWorkspacesConfig
{ getWindowIconPixbuf = myGetWindowIconPixbuf
}
clockW :: TaffyIO Widget
clockW = textClockNewWith defaultClockConfig
batteryW :: TaffyIO Widget
batteryW = batteryIconNew
scratchW :: TaffyIO Widget
scratchW = commandRunnerNew 1.0 "uname" [] "Cmd failed"
cpuW :: TaffyIO Widget
cpuW =
pollingGraphNew cpuCfg 0.5 $ do
(_, systemLoad, totalLoad) <- cpuLoad
pure [totalLoad, systemLoad]
where
cpuCfg =
defaultGraphConfig
{ graphDataColors = [(0, 1, 0, 1), (1, 0, 1, 0.5)],
graphLabel = Just "cpu",
graphWidth = 150
}
enableDebugLogging :: IO ()
enableDebugLogging = do
traverse_ (saveGlobalLogger . setLevel DEBUG)
=<< sequence
[ getLogger "",
getLogger "System.Taffybar",
getLogger "StatusNotifier.Tray",
getLogger "System.Taffybar.Widget.Battery"
]
-- More reliable than taffybar's version:
-- https://github.com/taffybar/taffybar/issues/403#issuecomment-870403234
myGetWindowIconPixbuf :: WindowIconPixbufGetter
myGetWindowIconPixbuf =
scaledWindowIconPixbufGetter $
handleException getWindowIconPixbufFromDesktopEntry
<|||> handleException getWindowIconPixbufFromClass
<|||> handleException getWindowIconPixbufFromEWMH
where
handleException :: WindowIconPixbufGetter -> WindowIconPixbufGetter
handleException getter = \size windowData ->
ReaderT $ \c ->
catch (runReaderT (getter size windowData) c) $ \(_ :: SomeException) ->
return Nothing

View file

@ -1,3 +0,0 @@
# Srid's taffybar configuration
Use `bin/run` to run reloadable taffybar during development.

View file

@ -1,2 +0,0 @@
import Distribution.Simple
main = defaultMain

View file

@ -1,3 +0,0 @@
#!/usr/bin/env bash
set -xe
nix-shell --run "ghcid -T \":main $*\""

View file

@ -1,19 +0,0 @@
# Since the xmonad config will be built by nixos-rebuild, we use the
# nix-channel's nixpkgs.
{ pkgs ? import <nixpkgs> { } }:
let
inherit (import ./dep/gitignoresrc { inherit (pkgs) lib; }) gitignoreSource;
in
pkgs.haskellPackages.developPackage {
name = "taffybar-srid";
root = gitignoreSource ./.;
modifier = drv:
pkgs.haskell.lib.addBuildTools drv (with pkgs.haskellPackages;
[
cabal-install
cabal-fmt
ghcid
haskell-language-server
]);
overrides = self: super: with pkgs.haskell.lib; { };
}

View file

@ -1,2 +0,0 @@
# DO NOT HAND-EDIT THIS FILE
import (import ./thunk.nix)

View file

@ -1,7 +0,0 @@
{
"owner": "hercules-ci",
"repo": "gitignore.nix",
"private": false,
"rev": "c4662e662462e7bf3c2a968483478a665d00e717",
"sha256": "1npnx0h6bd0d7ql93ka7azhj40zgjp815fw2r6smg8ch9p7mzdlx"
}

View file

@ -1,14 +0,0 @@
# DO NOT HAND-EDIT THIS FILE
let
fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
if !fetchSubmodules && !private then
builtins.fetchTarball
{
url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
} else
(import <nixpkgs> { }).fetchFromGitHub {
inherit owner repo rev sha256 fetchSubmodules private;
};
json = builtins.fromJSON (builtins.readFile ./github.json);
in
fetch json

View file

@ -1,4 +0,0 @@
cradle:
cabal:
- path: "./"
component: "exe:taffybar-srid"

View file

@ -1,27 +0,0 @@
cabal-version: 3.0
name: taffybar-srid
version: 0.1.0.0
license: BSD-3-Clause
author: Sridhar Ratnakumar
maintainer: srid@srid.ca
extra-source-files: CHANGELOG.md
executable taffybar-srid
main-is: Main.hs
build-depends:
, base
-- Use a version that fixes memory leak,
-- https://github.com/taffybar/taffybar/blob/master/CHANGELOG.md
, taffybar >= 3.2.2
, xmonad
, xmonad-contrib
, xmobar
, containers
, text
, time
, dbus
, gi-gtk
, hslogger
, mtl
ghc-options: -threaded -rtsopts -with-rtsopts=-N
default-language: Haskell2010

View file

@ -1,42 +0,0 @@
{ config, pkgs, ... }:
let
fixTrackpointAccelCli =
"${pkgs.xorg.xinput}/bin/xinput --set-prop 'TPPS/2 Elan TrackPoint' 'libinput Accel Speed' 0.7";
in
{
# NOTE: libinput changes require a reboot
services.xserver.libinput = {
enable = true;
# macOS like scrolling
mouse.naturalScrolling = true;
touchpad.naturalScrolling = true;
# Tap to click
touchpad.tapping = true;
};
hardware.trackpoint = {
enable = true;
device = "TPPS/2 Elan TrackPoint"; # Check with `xinput`
# FIXME: This doesn't have any effect. Whereas `xinput set-prop` (on CLI) does. See fixTrackpointAccelCli
#sensitivity = 240;
#speed = 250;
};
# Automating the aforementioned `xinput set-prop` ...
services.xserver.displayManager.sessionCommands = ''
${fixTrackpointAccelCli}
'';
environment.systemPackages = with pkgs; [
libinput # libinput CLI
(pkgs.writeScriptBin "fix-trackpoint-accel"
''
#!${pkgs.runtimeShell}
${fixTrackpointAccelCli}
'')
];
}

View file

@ -1,23 +0,0 @@
{ pkgs, ... }: {
/* imports = [
flake.inputs.nixos-vscode-server.nixosModules.default
];
services.vscode-server.enable = true;
services.vscode-server.installPath = "~/.vscode-server-insiders";
*/
# https://unix.stackexchange.com/q/659901/14042
services.gnome.gnome-keyring.enable = true;
environment.systemPackages = with pkgs; [
# (vscode-with-extensions.override
# { vscodeExtensions = with vscode-extensions; [ ms-vsliveshare.vsliveshare ]; })
vscode
nodejs-16_x # Need this for https://nixos.wiki/wiki/Vscode server
];
# https://code.visualstudio.com/docs/setup/linux#_visual-studio-code-is-unable-to-watch-for-file-changes-in-this-large-workspace-error-enospc
boot.kernel.sysctl = {
"fs.inotify.max_user_watches" = "524288";
};
}

View file

@ -1,23 +0,0 @@
{ config, pkgs, ... }:
let
xmobarPkg = pkgs.callPackage ./xmobar-srid { inherit pkgs; };
in
{
systemd.user.services.xmobar = {
enable = true;
description = "Xmobar";
wantedBy = [ "graphical-session.target" ];
serviceConfig = {
ExecStart = "${xmobarPkg}/bin/xmobar-srid";
# ExecStart = "${pkgs.xmobar}/bin/xmobar -v -x 2 -f xft:Consolas:size=12 -c '[Run PipeReader \"/etc/nixos/pipe\" \"thepipe\"]' -t \"%%thepipe%%\"";
Restart = "on-abnormal";
};
};
environment.systemPackages = [ xmobarPkg ];
# Battery widget requires this.
services.upower = {
enable = true;
};
}

View file

@ -1,2 +0,0 @@
result
dist-newstyle

View file

@ -1,8 +0,0 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"haskell.haskell",
"arrterian.nix-env-selector"
]
}

View file

@ -1,6 +0,0 @@
{
"nixEnvSelector.nixShellConfig": "${workspaceRoot}/default.nix",
"editor.formatOnType": true,
"editor.formatOnSave": true,
"nixEnvSelector.nixFile": "${workspaceRoot}/default.nix"
}

View file

@ -1,22 +0,0 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Build System & Restart Xmobar",
"type": "shell",
// TODO: Run in tmux (for those cases which kills X server)
"command": "bash",
"args": [
"-c",
"cd /etc/nixos && sudo nixos-rebuild switch && systemctl restart --user xmobar"
],
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
}
}
]
}

View file

@ -1,5 +0,0 @@
# Revision history for xmobar-srid
## 0.1.0.0 -- YYYY-mm-dd
* First version. Released on an unsuspecting world.

View file

@ -1,40 +0,0 @@
module Main where
import Xmobar
main :: IO ()
main =
xmobar $
-- Override ref: https://github.com/jaor/xmobar/blob/master/src/Xmobar/App/Config.hs#L37
defaultConfig
{ font = "xft:FiraCode:size=12",
bgColor = "#02183b",
fgColor = "#dce8fc",
allDesktops = True,
persistent = True,
commands =
[Run HelloWorld]
}
data HelloWorld = HelloWorld
deriving (Read, Show)
instance Exec HelloWorld where
alias HelloWorld = "hw"
run HelloWorld = return "<fc=red>Hello World!!</fc>"
{- Run $ Date "%a %b %_d %Y * %H:%M:%S" "theDate" 10,
Run $
Battery
[ "--template",
"<acstatus>",
"--Low",
"15",
-- battery specific options start here.
"--",
"--off",
"<left> (<timeleft>)"
]
100,
Run $ MultiCpu [] 100
-}

View file

@ -1,2 +0,0 @@
import Distribution.Simple
main = defaultMain

View file

@ -1,16 +0,0 @@
# Since the xmonad config will be built by nixos-rebuild, we use the
# nix-channel's nixpkgs.
{ pkgs ? import <nixpkgs> { } }:
pkgs.haskellPackages.developPackage {
name = "xmobar-srid";
root = ./.;
modifier = drv:
pkgs.haskell.lib.addBuildTools drv (with pkgs.haskellPackages;
[
cabal-install
cabal-fmt
ghcid
haskell-language-server
]);
overrides = self: super: with pkgs.haskell.lib; { };
}

View file

@ -1,4 +0,0 @@
cradle:
cabal:
- path: "./"
component: "exe:xmobar-srid"

View file

@ -1,29 +0,0 @@
cabal-version: 3.0
-- Initial package description 'xmobar-srid.cabal' generated by 'cabal
-- init'. For further documentation, see
-- http://haskell.org/cabal/users-guide/
name: xmobar-srid
version: 0.1.0.0
-- synopsis:
-- description:
-- bug-reports:
-- license:
author: Sridhar Ratnakumar
maintainer: srid@srid.ca
-- copyright:
-- category:
build-type: Simple
extra-source-files: CHANGELOG.md
executable xmobar-srid
main-is: Main.hs
-- other-modules:
-- other-extensions:
build-depends: base
, xmobar >= 0.39
, text
-- hs-source-dirs:
default-language: Haskell2010
ghc-options: -threaded -rtsopts -with-rtsopts=-N -funbox-strict-fields

View file

@ -1,34 +0,0 @@
{ config, pkgs, ... }:
let
myXmonadProject = ./xmonad-srid;
in
{
environment.systemPackages = with pkgs; [
xorg.xdpyinfo
xorg.xrandr
arandr
autorandr
dmenu
gmrun
dzen2
];
services.xserver = {
enable = true;
windowManager.xmonad = {
enable = true;
haskellPackages = pkgs.haskellPackages.extend
(import "${myXmonadProject}/overlay.nix" { inherit pkgs; });
extraPackages = hpkgs: with pkgs.haskell.lib; [
hpkgs.xmonad-contrib
hpkgs.xmonad-extras
];
# enableContribAndExtras = true; -- using our own
config = pkgs.lib.readFile "${myXmonadProject}/Main.hs";
};
};
services.xserver.displayManager.defaultSession = "none+xmonad";
}

View file

@ -1,2 +0,0 @@
result
dist-newstyle

View file

@ -1,8 +0,0 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"haskell.haskell",
"arrterian.nix-env-selector"
]
}

View file

@ -1,5 +0,0 @@
{
"editor.formatOnType": true,
"editor.formatOnSave": true,
"nixEnvSelector.nixFile": "${workspaceRoot}/default.nix"
}

View file

@ -1,22 +0,0 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Build System & Restart Xmonad",
"type": "shell",
// TODO: Run in tmux (for those cases which kills X server)
"command": "bash",
"args": [
"-c",
"cd /etc/nixos && sudo nixos-rebuild switch && xmonad --restart"
],
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
}
}
]
}

View file

@ -1,5 +0,0 @@
# Revision history for xmonad-srid
## 0.1.0.0 -- YYYY-mm-dd
* First version. Released on an unsuspecting world.

View file

@ -1,74 +0,0 @@
{-# LANGUAGE OverloadedStrings #-}
import qualified Data.Map.Strict as M
import XMonad
import XMonad.Actions.UpdatePointer (updatePointer)
import XMonad.Hooks.EwmhDesktops (ewmh)
import XMonad.Hooks.ManageDocks (ToggleStruts (..), avoidStruts, docks)
import XMonad.Layout.Decoration (Decoration, DefaultShrinker, ModifiedLayout)
import XMonad.Layout.DwmStyle (Theme (decoHeight))
import XMonad.Layout.NoBorders (withBorder)
import qualified XMonad.Layout.Simplest as Simplest
import XMonad.Layout.Spacing (Border (Border), spacingRaw)
import XMonad.Layout.Tabbed
import XMonad.Layout.ThreeColumns (ThreeCol (..))
-- NOTE:
-- Chromium won't respect Xmonad's border width, until this is done:
-- https://wiki.archlinux.org/index.php/xmonad#Chrome/Chromium_not_displaying_defined_window_border_color
main :: IO ()
main = do
xmonad $ docks $ ewmh cfg
where
cfg =
def
{ modMask = mod4Mask, -- Use Super instead of Alt (Using Alt messes up bash shortcuts)
terminal = "alacritty", -- "myst",
layoutHook =
borderSpacingBetweenWindows $
avoidStruts $ myThreeCol ||| myTabbed ||| layoutHook def,
logHook =
pointerFollowsFocus,
keys = myKeys,
-- https://htmlcolorcodes.com/
focusedBorderColor = "#50CBE8"
}
myThreeCol =
ThreeColMid
1 -- Master window count
(3 / 100) -- Resize delta
(1 / 2) -- Initial column size
myTabbed :: ModifiedLayout (Decoration TabbedDecoration DefaultShrinker) Simplest.Simplest Window
myTabbed =
-- FIXME: This doesn't work reliably.
tabbed shrinkText $ def {decoHeight = 10, activeColor = "#50CBE8", fontName = "xft:Consolas:size=12"}
pointerFollowsFocus =
let centerOfWindow = ((0.5, 0.5), (0, 0))
in uncurry updatePointer centerOfWindow
myKeys baseConfig@XConfig {modMask = modKey} =
keys def baseConfig
<> M.fromList
[ -- Disable it, to prevent accidental press.
-- ((modKey, xK_q), restart "/run/current-system/sw/bin/xmonad" True),
((modKey, xK_f), spawn "screenshot"),
((modKey, xK_b), sendMessage ToggleStruts)
-- ...
]
borderSpacingBetweenWindows =
withBorder 5
. spacingRaw
-- Apply borders only when there are 2 or more windows
True
-- Screen border
(Border 0 10 10 10)
-- Enable screen border?
False
-- Window borders
(Border 10 10 10 10)
-- Enable window border?
True

View file

@ -1,13 +0,0 @@
# Srid's XMonad configuration
See https://www.srid.ca/xmonad-conf-ide
## Reloading running XMonad
Once the new `xmonad` binary is in $PATH (as a result of running `nixos-rebuild` which uses this package), run:
```
xmonad --restart
```
In VSCode, just press <kbd>Ctrl+Shift+B</kbd>.

View file

@ -1,2 +0,0 @@
import Distribution.Simple
main = defaultMain

View file

@ -1,20 +0,0 @@
# Since the xmonad config will be built by nixos-rebuild, we use the
# nix-channel's nixpkgs.
{ pkgs ? import <nixpkgs> { } }:
let
inherit (import ./dep/gitignoresrc { inherit (pkgs) lib; }) gitignoreSource;
haskellOverlays = import ./overlay.nix { inherit pkgs; };
in
# FIXME: overlays not working
(pkgs.haskellPackages.extend haskellOverlays).developPackage {
name = "xmonad-srid";
root = gitignoreSource ./.;
modifier = drv:
pkgs.haskell.lib.addBuildTools drv (with pkgs.haskellPackages;
[
cabal-install
cabal-fmt
ghcid
haskell-language-server
]);
}

View file

@ -1,2 +0,0 @@
# DO NOT HAND-EDIT THIS FILE
import (import ./thunk.nix)

View file

@ -1,7 +0,0 @@
{
"owner": "hercules-ci",
"repo": "gitignore.nix",
"private": false,
"rev": "c4662e662462e7bf3c2a968483478a665d00e717",
"sha256": "1npnx0h6bd0d7ql93ka7azhj40zgjp815fw2r6smg8ch9p7mzdlx"
}

View file

@ -1,14 +0,0 @@
# DO NOT HAND-EDIT THIS FILE
let
fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
if !fetchSubmodules && !private then
builtins.fetchTarball
{
url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
} else
(import <nixpkgs> { }).fetchFromGitHub {
inherit owner repo rev sha256 fetchSubmodules private;
};
json = builtins.fromJSON (builtins.readFile ./github.json);
in
fetch json

View file

@ -1,4 +0,0 @@
cradle:
cabal:
- path: "./"
component: "exe:xmonad-srid"

View file

@ -1,12 +0,0 @@
{ pkgs, ... }:
(self: super:
let
justFuckingBuild = drv: with pkgs.haskell.lib; dontHaddock (dontCheck drv);
in
{
xmonad = justFuckingBuild (self.callHackage "xmonad" "0.17.0" { });
xmonad-contrib = justFuckingBuild (self.callHackage "xmonad-contrib" "0.17.0" { });
xmonad-extras = justFuckingBuild (self.callHackage "xmonad-extras" "0.17.0" { });
}
)

View file

@ -1,20 +0,0 @@
cabal-version: 3.0
name: xmonad-srid
version: 0.1.0.0
license: BSD-3-Clause
author: Sridhar Ratnakumar
maintainer: srid@srid.ca
extra-source-files: CHANGELOG.md
executable xmonad-srid
main-is: Main.hs
build-depends:
, base
, xmonad
, xmonad-contrib
, xmobar
, containers
, text
, time
ghc-options: -threaded -rtsopts -with-rtsopts=-N
default-language: Haskell2010

View file

@ -1,12 +0,0 @@
{ pkgs, ... }: {
services.xserver = {
enable = true;
displayManager.gdm.enable = true;
desktopManager.gnome.enable = true;
};
environment.systemPackages = with pkgs; [
# This is necessary to set CAPS to CTRL
gnome-tweaks
];
}

View file

@ -1,41 +0,0 @@
{ flake, pkgs, ... }:
let
inherit (flake) inputs;
hyprlandPkgs = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system};
in
{
programs.hyprland = {
enable = true;
# set the flake package
package = hyprlandPkgs.hyprland;
# make sure to also set the portal package, so that they are in sync
portalPackage = hyprlandPkgs.xdg-desktop-portal-hyprland;
};
security.pam.services.hyprlock = { };
home-manager.sharedModules = [ ./home ];
# hint Electron apps to use Wayland
environment.sessionVariables.NIXOS_OZONE_WL = "1";
environment.systemPackages = with pkgs; [
grimblast
acpi
acpilight
pavucontrol
# TODO: https://github.com/nix-community/home-manager/pull/5489
hyprshade
hyprshot
hyprpaper
playerctl
# TODO: https://github.com/nix-community/home-manager/issues/5899
hyprlock
wl-clipboard
];
}

View file

@ -1,19 +0,0 @@
{ pkgs, lib, ... }:
{
imports = [
./fix-cursor.nix
./waybar.nix
./settings.nix
];
wayland.windowManager.hyprland = {
enable = true;
};
services.dunst.enable = true;
programs.hyprlock.enable = true;
programs.rofi = {
enable = true;
terminal = lib.getExe pkgs.rio;
plugins = [ pkgs.rofi-emoji ];
};
}

View file

@ -1,29 +0,0 @@
# https://wiki.hyprland.org/0.41.0/Nix/Hyprland-on-Home-Manager/#fixing-problems-with-themes
{ pkgs, ... }:
{
home.pointerCursor = {
gtk.enable = true;
# x11.enable = true;
package = pkgs.bibata-cursors;
name = "Bibata-Modern-Classic";
size = 16;
};
gtk = {
enable = true;
theme = {
package = pkgs.flat-remix-gtk;
name = "Flat-Remix-GTK-Grey-Darkest";
};
iconTheme = {
package = pkgs.adwaita-icon-theme;
name = "Adwaita";
};
font = {
name = "Sans";
size = 11;
};
};
}

View file

@ -1,43 +0,0 @@
// from https://github.com/hyprwm/Hyprland/issues/1140#issuecomment-1335128437
precision highp float;
varying vec2 v_texcoord;
uniform sampler2D tex;
const float temperature = 3600.0;
const float temperatureStrength = 1.0;
#define WithQuickAndDirtyLuminancePreservation
const float LuminancePreservationFactor = 1.0;
// function from https://www.shadertoy.com/view/4sc3D7
// valid from 1000 to 40000 K (and additionally 0 for pure full white)
vec3 colorTemperatureToRGB(const in float temperature) {
// values from: http://blenderartists.org/forum/showthread.php?270332-OSL-Goodness&p=2268693&viewfull=1#post2268693
mat3 m = (temperature <= 6500.0) ? mat3(vec3(0.0, -2902.1955373783176, -8257.7997278925690),
vec3(0.0, 1669.5803561666639, 2575.2827530017594),
vec3(1.0, 1.3302673723350029, 1.8993753891711275))
: mat3(vec3(1745.0425298314172, 1216.6168361476490, -8257.7997278925690),
vec3(-2666.3474220535695, -2173.1012343082230, 2575.2827530017594),
vec3(0.55995389139931482, 0.70381203140554553, 1.8993753891711275));
return mix(clamp(vec3(m[0] / (vec3(clamp(temperature, 1000.0, 40000.0)) + m[1]) + m[2]), vec3(0.0), vec3(1.0)),
vec3(1.0), smoothstep(1000.0, 0.0, temperature));
}
void main() {
vec4 pixColor = texture2D(tex, v_texcoord);
// RGB
vec3 color = vec3(pixColor[0], pixColor[1], pixColor[2]);
#ifdef WithQuickAndDirtyLuminancePreservation
color *= mix(1.0, dot(color, vec3(0.2126, 0.7152, 0.0722)) / max(dot(color, vec3(0.2126, 0.7152, 0.0722)), 1e-5),
LuminancePreservationFactor);
#endif
color = mix(color, color * colorTemperatureToRGB(temperature), temperatureStrength);
vec4 outCol = vec4(color, pixColor[3]);
gl_FragColor = outCol;
}

View file

@ -1,198 +0,0 @@
# See default config here:
# https://github.com/hyprwm/Hyprland/blob/main/example/hyprland.conf
{ pkgs, lib, ... }:
let
blue-light-filter = ./old-config/blue-light-filter.glsl;
screenshot = pkgs.writeShellApplication {
name = "screenshot";
meta.description = ''
Blue-light filter screenshot script for Hyprland. Directly copies region to clipboard.
'';
runtimeInputs = with pkgs; [ grim slurp wl-clipboard ];
text = ''
#!/bin/sh
trap 'hyprshade on ${blue-light-filter}' EXIT
# Turn off blue light filter
hyprshade off
# Take a screenshot of a region and copy it to clipboard
grim -g "$(slurp -w 0 -b 00000088)" - | wl-copy
'';
};
screenrec = pkgs.writeShellApplication {
name = "screenrec";
meta.description = ''
Blue-light filter screen recording script for Hyprland. Stores videos in ~/Videos.
'';
runtimeInputs = with pkgs; [ wl-screenrec slurp ];
text = ''
#!/bin/sh
trap 'hyprshade on ${blue-light-filter}' EXIT
# Turn off blue light filter
hyprshade off
# Grab region and start recording.
cd
FN="$HOME/Videos/screenrec-$(date +'%Y%m%d%H%M%S').mp4"
echo "Selecting and recording ($FN) ... press Ctrl+C to end recording."
wl-screenrec -g "$(slurp)" -f "$FN"
'';
};
in
{
home.packages = [
screenrec # Can't bind key, because user must C-c manually to end recording.
];
wayland.windowManager.hyprland.settings = {
"$mainMod" = "SUPER";
source = "~/.hyprland-local.conf";
bind = [
"$mainMod, Q, exec, ghostty"
# Window management
"$mainMod, C, killactive,"
"$mainMod, J, togglesplit,"
"$mainMod, F, fullscreen"
"$mainMod SHIFT, F, togglefloating"
# Move focus
"$mainMod, H, movefocus, l"
"$mainMod, L, movefocus, r"
"$mainMod, K, movefocus, u"
"$mainMod, J, movefocus, d"
# Move window position
"$mainMod SHIFT, H, movewindow, l"
"$mainMod SHIFT, L, movewindow, r"
"$mainMod SHIFT, K, movewindow, u"
"$mainMod SHIFT, J, movewindow, d"
# Workspace management
# Switch
"$mainMod, 1, workspace, 1"
"$mainMod, 2, workspace, 2"
"$mainMod, 3, workspace, 3"
"$mainMod, 4, workspace, 4"
"$mainMod, 5, workspace, 5"
# Move window to workspace
"$mainMod SHIFT, 1, movetoworkspace, 1"
"$mainMod SHIFT, 2, movetoworkspace, 2"
"$mainMod SHIFT, 3, movetoworkspace, 3"
"$mainMod SHIFT, 4, movetoworkspace, 4"
"$mainMod SHIFT, 5, movetoworkspace, 5"
"$mainMod SHIFT, left, movecurrentworkspacetomonitor, +1"
"$mainMod, SPACE, togglespecialworkspace, special"
"$mainMod SHIFT, SPACE, movetoworkspace, special"
];
# Move/resize windows with mouse
bindm = [
"$mainMod, mouse:272, movewindow"
"$mainMod, mouse:273, resizewindow"
];
# Fn keys
bindl = [
# Laptop multimedia keys for volume and LCD brightness
", XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"
", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
", XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
", XF86MonBrightnessUp, exec, brightnessctl s 10%+"
", XF86MonBrightnessDown, exec, brightnessctl s 10%-"
# Requires playerctl
", XF86AudioNext, exec, playerctl next"
", XF86AudioPause, exec, playerctl play-pause"
", XF86AudioPlay, exec, playerctl play-pause"
", XF86AudioPrev, exec, playerctl previous"
", XF86Favorites, exec, rofi -show drun"
"SHIFT, XF86Favorites, exec, rofi -mode emoji -show emoji"
", Print, exec, ${lib.getExe screenshot}"
];
exec-once = [
"${lib.getExe pkgs.hyprshade} on ${blue-light-filter}"
];
/* COMMENTED OUT:
# Since this shit changes all the time, I'm managing it by hand in
# ~/.hyperland-local.conf (see `source` above)
monitor = [
# Laptop screen (OLED 2k)
",highres,auto,2"
# Apple Studio Display
#"DP-6,highres,auto-up,2"
#"DP-5,disable" # Same as DP-5
"DP-3,highres,auto-up,2"
"DP-4,disable" # Same as DP-5
];
*/
general = {
border_size = 2;
gaps_out = 5;
"col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg";
"col.inactive_border" = "rgba(595959aa)";
resize_on_border = true;
};
decoration = {
rounding = 10;
/* shadow = {
enable = true;
range = 4;
render_power = 3;
color = "rgba(1a1a1aee)";
}; */
blur = {
enabled = true;
size = 3;
};
};
animations = {
enabled = true;
# Default animations
bezier = [
"easeOutQuint,0.23,1.0,0.32,1"
"easeInOutCubic,0.65,0.05,0.36,1"
"linear,0,0,1,1"
"almostLinear,0.5,0.5,0.75,1.0"
"quick,0.15,0.9,1,1"
];
animation = [
"global, 1, 10, default"
"border, 1, 5.39, easeOutQuint"
"windows, 1, 4.79, easeOutQuint"
"windowsIn, 1, 4.79, easeOutQuint, popin 87%"
"windowsOut, 1, 4.79, linear, popin 87%"
"fadeIn, 1, 1.73, almostLinear"
"fadeOut, 1, 1.46, almostLinear"
"fade, 1, 3.03, quick"
"layers, 1, 3.81, easeOutQuint"
"layersIn, 1, 4, easeOutQuint, fade"
"layersOut, 1, 5, linear, fade"
"fadeLayersIn, 1, 1.79, almostLinear"
"fadeLayersOut, 1, 1.39, almostLinear"
"workspaces, 1, 1.94, almostLinear, fade"
"workspacesIn, 1, 1.21, almostLinear, fade"
"workspacesOut, 1, 1.94, almostLinear, fade"
];
};
misc = {
force_default_wallpaper = 2;
};
input = {
follow_mouse = 1;
natural_scroll = true;
touchpad.natural_scroll = true;
kb_options = "ctrl:nocaps";
};
};
}

View file

@ -1,121 +0,0 @@
# https://github.com/Alexays/Waybar/wiki/Configuration
{
programs.waybar = {
enable = true;
settings = {
mainBar = {
# output = [ "eDP-1" ]; # Laptop screen only
height = 30;
modules-center = [
# "hyprland/window"
"clock"
];
modules-right = [
"hyprland/workspaces"
"cpu"
"memory"
"backlight"
"battery"
"power-profiles-daemon"
"pulseaudio"
"network"
"tray"
];
"hyprland/workspaces" = {
# active-only = true;
# all-outputs = true;
show-special = true;
/*
format = "{name}{icon}";
format-icons = {
active = "";
default = "";
};
*/
};
"cpu" = {
format = "{}% ";
};
"memory" = {
format = "{}% ";
};
"backlight" = {
format = "{percent}% {icon}";
format-icons = [ "" "" "" "" "" "" "" "" "" ];
};
battery = {
states = {
warning = 30;
critical = 15;
};
format = "{capacity}% {icon}";
format-full = "{capacity}% {icon}";
format-charging = "{capacity}% ";
format-plugged = "{capacity}% ";
format-alt = "{time} {icon}";
format-icons = [ "" "" "" "" "" ];
};
"power-profiles-daemon" = {
format = "{icon}";
tooltip-format = "Power profile: {profile}\\nDriver: {driver}";
tooltip = true;
format-icons = {
default = "";
performance = "";
balanced = "";
"power-saver" = "";
};
};
"network" = {
format-wifi = "{essid} ({signalStrength}%) ";
format-ethernet = "{ipaddr}/{cidr} ";
tooltip-format = "{ifname} via {gwaddr} ";
format-linked = "{ifname} (No IP) ";
format-disconnected = "Disconnected ";
format-alt = "{ifname}: {ipaddr}/{cidr}";
};
pulseaudio = {
format = "{volume}% {icon} {format_source}";
format-bluetooth = "{volume}% {icon} {format_source}";
format-bluetooth-muted = " {icon} {format_source}";
format-muted = " {format_source}";
format-source = "{volume}% ";
format-source-muted = "";
format-icons = {
headphone = "";
"hands-free" = "";
headset = "";
phone = "";
portable = "";
car = "";
default = [ "" "" "" ]; # Assuming consistent icons for simplicity
};
on-click = "pavucontrol";
};
"clock" = {
format = "{:%H:%M} ";
format-alt = "{:%A, %B %d, %Y (%R)} ";
tooltip-format = "<tt><small>{calendar}</small></tt>";
calendar = {
mode = "year";
mode-mon-col = 3;
weeks-pos = "right";
on-scroll = 1;
format = {
months = "<span color='#ffead3'><b>{}</b></span>";
days = "<span color='#ecc6d9'>{}</span>";
weeks = "<span color='#99ffdd'>{}</span>";
weekdays = "<span color='#ffcc66'>{}</span>";
today = "<span color='#ffee99'><b><u>{}</u></b></span>";
};
};
actions = {
"on-click-right" = "mode";
"on-scroll-up" = "shift_up";
"on-scroll-down" = "shift_down";
};
};
};
};
};
}

View file

@ -1,13 +0,0 @@
{ pkgs, lib, ... }: {
services.xserver = {
enable = true;
displayManager.sddm.enable = true;
desktopManager.plasma5.enable = true;
};
hardware.video.hidpi.enable = lib.mkDefault true;
# services.xserver.dpi = 192;
environment.systemPackages = with pkgs; [
];
}

View file

@ -1,11 +0,0 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
logseq
];
# For logseq
nixpkgs.config.permittedInsecurePackages = [
"electron-27.3.11"
];
}

View file

@ -1,10 +0,0 @@
{
programs.steam = {
enable = true;
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
};
}

View file

@ -1,7 +0,0 @@
{ pkgs, flake, ... }: {
virtualisation.virtualbox.host = {
enable = true;
enableExtensionPack = true;
};
users.extraGroups.vboxusers.members = [ flake.config.me.username ];
}

View file

@ -1,22 +0,0 @@
{ pkgs, ... }:
{
# PostgreSQL itself
services.postgresql = {
enable = true;
package = pkgs.postgresql_12; # HACK: for work
# enableTCPIP = false;
# https://nixos.wiki/wiki/PostgreSQL
authentication = pkgs.lib.mkOverride 10
''
# Unix domain socket
local all all trust
# TCP/IP connections from loopback only
host all all ::1/128 trust
'';
initialScript = pkgs.writeText "backend-initScript" ''
CREATE ROLE nixcloud WITH LOGIN PASSWORD 'nixcloud' CREATEDB;
CREATE DATABASE nixcloud;
GRANT ALL PRIVILEGES ON DATABASE nixcloud TO nixcloud;
'';
};
}

View file

@ -1,47 +0,0 @@
{ pkgs, ... }:
let
postgrest = pkgs.haskellPackages.postgrest;
in
{
# PostgreSQL itself
services.postgresql = {
enable = true;
package = pkgs.postgresql_13;
enableTCPIP = false;
# https://nixos.wiki/wiki/PostgreSQL
authentication = pkgs.lib.mkOverride 10
''
# Unix domain socket
local all all trust
# TCP/IP connections from loopback only
host all all ::1/128 trust
'';
initialScript = pkgs.writeText "backend-initScript" ''
CREATE ROLE nixcloud WITH LOGIN PASSWORD 'nixcloud' CREATEDB;
CREATE DATABASE nixcloud;
GRANT ALL PRIVILEGES ON DATABASE nixcloud TO nixcloud;
'';
};
# PostgREST as systemd service
systemd.services.postgrest = {
enable = true;
description = "PostgREST daemon";
after = [ "postgresql.service" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart =
let
pgrstConf = pkgs.writeText "pgrst.conf" ''
db-uri = "postgres://postgres@localhost/postgres"
db-schema = "chronicle"
# TODO: change when going production
db-anon-role = "postgres"
server-port = 7000
'';
in
"${postgrest}/bin/postgrest ${pgrstConf}";
Restart = "always";
};
};
}

View file

@ -1,20 +0,0 @@
{ pkgs, flake, ... }:
{
environment.systemPackages = with pkgs; [
protonvpn-cli
protonvpn-gui
];
security.sudo.extraRules = [
{
users = [ flake.config.me.username ];
commands = [
{
command = "${pkgs.protonvpn-cli}/bin/protonvpn";
options = [ "NOPASSWD" ];
}
];
}
];
}

View file

@ -1,8 +1,6 @@
{
nix.settings.trusted-public-keys = [
# "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
];
nix.settings.substituters = [
# "https://hyprland.cachix.org"
];
}