aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/qutebrowser/config.py2
-rw-r--r--configuration.nix115
-rw-r--r--hardware-configuration.nix4
-rw-r--r--home.nix24
-rw-r--r--login.nix106
-rw-r--r--packages.nix1
6 files changed, 138 insertions, 114 deletions
diff --git a/config/qutebrowser/config.py b/config/qutebrowser/config.py
index f987440..2ea2c22 100644
--- a/config/qutebrowser/config.py
+++ b/config/qutebrowser/config.py
@@ -291,7 +291,7 @@ c.url.searchengines = {
'y': 'http://www.youtube.com/results?search_query={}',
'az': 'http://search.azlyrics.com/search.php?q={}',
- 'nix': 'https://search.nixos.org/packages?channel=unstable&query={}',
+ 'nx': 'https://search.nixos.org/packages?channel=unstable&query={}',
# Ignore
'DEFAULT': 'http://this-is-a-placeholder.com?q={}',
diff --git a/configuration.nix b/configuration.nix
index 3769491..668b50d 100644
--- a/configuration.nix
+++ b/configuration.nix
@@ -4,19 +4,12 @@
{ config, pkgs, ... }:
-let
- apps = (import ./packages/sensible-apps/sensible-apps.nix).apps;
- windowManagers = {
- dwm = ''
- while true; do
- (ssh-agent dwm &>> /tmp/dwm.log) || break;
- done
- '';
- };
-in {
+{
imports = [
+ <home-manager/nixos>
./hardware-configuration.nix
./packages.nix
+ ./login.nix
];
nixpkgs.config = {
@@ -33,72 +26,10 @@ in {
i18n.defaultLocale = "en_US.UTF-8";
services.xserver.layout = "us";
- # Global
- environment.variables = {
- EDITOR = apps.EDITOR;
- VISUAL = apps.EDITOR;
- TERMINAL = apps.TERMINAL;
- BROWSER = apps.BROWSER;
- PRIVATE_BROWSER = apps.PRIVATE_BROWSER;
- };
- environment.shells = [ pkgs.zsh pkgs.bashInteractive ];
- programs.zsh = {
- enable = true;
- enableCompletion = true;
- enableBashCompletion = true;
- autosuggestions.enable = true;
- syntaxHighlighting.enable = true;
- histFile = "~/.config/zshhistory";
- histSize = 50000;
- interactiveShellInit = ''source ~/nixos/external/zsh/zshrc'';
- promptInit = "";
- loginShellInit = ''
- setup_dwm() {
- echo "~/nixos/external/xconfig/init.sh; ${windowManagers.dwm}" > ~/.xinitrc;
- sleep 0.2;
- }
-
- case "$(tty)" in
- /dev/tty1) setup_dwm && startx ;;
- *) echo "Only tty for you, $(tty)" ;;
- esac;
- '';
- };
- services = {
- mingetty = {
- autologinUser = "imsohexy";
- helpLine = "";
- greetingLine = let
- c1 = "\\e{lightblue}";
- c2 = "\\e{lightcyan}";
- res = "\\e{reset}";
- in ''
-
-${c1} ▗▄▄▄ ${c2}▗▄▄▄▄ ▄▄▄▖${res}
-${c1} ▜███▙ ${c2}▜███▙ ▟███▛${res} ${c1}TTY:${res} \e{bold}\l${res}
-${c1} ▜███▙ ${c2}▜███▙▟███▛${res} ${c2}Time:${res} \e{halfbright}\d \t${res}
-${c1} ▜███▙ ${c2}▜██████▛${res} ${c2}Distr${res} \e{halfbright}\S{PRETTY_NAME} \m${res}
-${c1} ▟█████████████████▙ ${c2}▜████▛ ${c1}▟▙${res} ${c2}Kernal:${res} \e{halfbright}\s \r${res}
-${c1} ▟███████████████████▙ ${c2}▜███▙ ${c1}▟██▙${res} ${c2}WM:${res} \e{halfbright}dwm${res}
-${c1} ▄▄▄▄▖ ▜███▙ ${c1}▟███▛${res}
-${c1} ▟███▛ ▜██▛ ${c1}▟███▛${res}
-${c1} ▟███▛ ▜▛ ${c1}▟███▛${res}
-${c1}▟███████████▛ ${c1}▟██████████▙${res}
-${c1}▜██████████▛ ${c1}▟███████████▛${res}
-${c1} ▟███▛ ${c1}▟▙ ▟███▛${res}
-${c1} ▟███▛ ${c1}▟██▙ ▟███▛${res}
-${c1} ▟███▛ ${c1}▜███▙ ▝▀▀▀▀${res}
-${c1} ▜██▛ ${c1}▜███▙ ${c2}▜██████████████████▛${res}
-${c1} ▜▛ ${c1}▟████▙ ${c2}▜████████████████▛${res}
-${c1} ▟██████▙ ${c2}▜███▙${res}
-${c1} ▟███▛▜███▙ ${c2}▜███▙${res}
-${c1} ▟███▛ ▜███▙ ${c2}▜███▙${res}
-${c1} ▝▀▀▀ ▀▀▀▀▘ ${c2}▀▀▀▘${res}
-
-
-
-\e{bold}What's the password, dipshit?\e{reset}'';
- };
+ # Home manager
+ home-manager.users.imsohexy = { pkgs, ... }: {
+ imports = [./home.nix];
+ home = { stateVersion = "21.03"; };
};
# X11 config
@@ -118,23 +49,6 @@ ${c1} ▝▀▀▀ ▀▀▀▀▘ ${c2}▀▀▀▘${res}
cozette
noto-fonts-emoji
];
- #services.picom = {
- #enable = true;
- #inactiveOpacity = 0.8;
- #backend = "glx";
- #settings = {
- #"inactive-dim" = 0.3;
- #"focus-exclude" = [ "class_g = 'dwm'" "class_g = 'dmenu'"];
- #};
- #opacityRules = [
- #"98:class_g = 'St' && focused"
- #"85:class_g = 'St' && !focused"
- #"90:class_g = 'qutebrowser' && !focused"
- #"100:class_g = 'qutebrowser' && focused"
- #];
- #menuOpacity = 0.9;
- #};
-
# Enable CUPS to print documents.
# services.printing.enable = true;
@@ -142,21 +56,6 @@ ${c1} ▝▀▀▀ ▀▀▀▀▘ ${c2}▀▀▀▘${res}
sound.enable = true;
# hardware.pulseaudio.enable = true;
- # User
- users.users.imsohexy = {
- isNormalUser = true;
- extraGroups = [
- "wheel"
- "input"
- "audio"
- "video"
- "storage"
- "git"
- "networkmanager"
- ];
- shell = pkgs.zsh;
- };
-
programs.gnupg.agent = {
enable = true;
enableSSHSupport = false;
diff --git a/hardware-configuration.nix b/hardware-configuration.nix
index 518b633..d657746 100644
--- a/hardware-configuration.nix
+++ b/hardware-configuration.nix
@@ -2,10 +2,6 @@
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
-
-#let
- #rtl8822ce = pkgs.callPackage ./packages/drivers/rtl8822ce.nix {};
-#in
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
diff --git a/home.nix b/home.nix
new file mode 100644
index 0000000..b142b24
--- /dev/null
+++ b/home.nix
@@ -0,0 +1,24 @@
+{ pkgs, ... }:
+{
+ home.packages = with pkgs; [
+ picom
+ mtm
+ ];
+
+ services.picom = {
+ enable = true;
+ backend = "glx";
+ inactiveOpacity = "0.8";
+ inactiveDim = "0.3";
+ opacityRule = [
+ "98:class_g = 'St' && focused"
+ "85:class_g = 'St' && !focused"
+ "90:class_g = 'qutebrowser' && !focused"
+ "100:class_g = 'qutebrowser' && focused"
+ ];
+ extraOptions = ''
+ focus-exclude = [ "class_g = 'dwm'" "class_g = 'dmenu'"];
+ '';
+ menuOpacity = "0.9";
+ };
+}
diff --git a/login.nix b/login.nix
new file mode 100644
index 0000000..81c08c8
--- /dev/null
+++ b/login.nix
@@ -0,0 +1,106 @@
+{ pkgs, ... }:
+let
+ sessions = [
+ ["tty1" windowManagers.dwm ]
+ ["tty2" windowManagers.bspwm ]
+ ];
+ windowManagers = {
+ dwm = ''
+ while true; do
+ (ssh-agent dwm &>> /tmp/dwm.log) || break;
+ done
+ '';
+ # TODO
+ bspwm = ''
+ exec firefox;
+ '';
+ };
+in {
+ # User
+ users.users.imsohexy = {
+ isNormalUser = true;
+ extraGroups = [
+ "wheel"
+ "input"
+ "audio"
+ "video"
+ "storage"
+ "git"
+ "networkmanager"
+ ];
+ shell = pkgs.zsh;
+ };
+
+ # Global
+ environment.variables = let
+ apps = (import ./packages/sensible-apps/sensible-apps.nix).apps;
+ in {
+ EDITOR = apps.EDITOR;
+ VISUAL = apps.EDITOR;
+ TERMINAL = apps.TERMINAL;
+ BROWSER = apps.BROWSER;
+ PRIVATE_BROWSER = apps.PRIVATE_BROWSER;
+ };
+ environment.shells = with pkgs; [ zsh bashInteractive ];
+ programs.zsh = {
+ enable = true;
+ enableCompletion = true;
+ enableBashCompletion = true;
+ autosuggestions.enable = true;
+ syntaxHighlighting.enable = true;
+ histFile = "~/.config/zshhistory";
+ histSize = 50000;
+ interactiveShellInit = ''source ~/nixos/external/zsh/zshrc'';
+ promptInit = "";
+ loginShellInit = with builtins; let
+ cases = map (s: ''
+ /dev/${elemAt s 0})
+ echo "~/nixos/external/xconfig/init.sh; ${elemAt s 1}" > ~/.xinitrc;
+ sleep 0.2;
+ startx;
+ ;;
+ '') sessions;
+ in ''
+ case "$(tty)" in
+ ${toString cases}
+ *) echo "Only tty for you, $(tty)" ;;
+ esac;
+ '';
+ };
+ services = {
+ mingetty = {
+ autologinUser = "imsohexy";
+ helpLine = "";
+ greetingLine = let
+ c1 = "\\e{lightblue}";
+ c2 = "\\e{lightcyan}";
+ res = "\\e{reset}";
+ in ''
+
+${c1} ▗▄▄▄ ${c2}▗▄▄▄▄ ▄▄▄▖${res}
+${c1} ▜███▙ ${c2}▜███▙ ▟███▛${res} ${c1}TTY:${res} \e{bold}\l${res}
+${c1} ▜███▙ ${c2}▜███▙▟███▛${res} ${c2}Time:${res} \e{halfbright}\d \t${res}
+${c1} ▜███▙ ${c2}▜██████▛${res} ${c2}Distr${res} \e{halfbright}\S{PRETTY_NAME} \m${res}
+${c1} ▟█████████████████▙ ${c2}▜████▛ ${c1}▟▙${res} ${c2}Kernal:${res} \e{halfbright}\s \r${res}
+${c1} ▟███████████████████▙ ${c2}▜███▙ ${c1}▟██▙${res} ${c2}WM:${res} \e{halfbright}dwm${res}
+${c1} ▄▄▄▄▖ ▜███▙ ${c1}▟███▛${res}
+${c1} ▟███▛ ▜██▛ ${c1}▟███▛${res}
+${c1} ▟███▛ ▜▛ ${c1}▟███▛${res}
+${c1}▟███████████▛ ${c1}▟██████████▙${res}
+${c1}▜██████████▛ ${c1}▟███████████▛${res}
+${c1} ▟███▛ ${c1}▟▙ ▟███▛${res}
+${c1} ▟███▛ ${c1}▟██▙ ▟███▛${res}
+${c1} ▟███▛ ${c1}▜███▙ ▝▀▀▀▀${res}
+${c1} ▜██▛ ${c1}▜███▙ ${c2}▜██████████████████▛${res}
+${c1} ▜▛ ${c1}▟████▙ ${c2}▜████████████████▛${res}
+${c1} ▟██████▙ ${c2}▜███▙${res}
+${c1} ▟███▛▜███▙ ${c2}▜███▙${res}
+${c1} ▟███▛ ▜███▙ ${c2}▜███▙${res}
+${c1} ▝▀▀▀ ▀▀▀▀▘ ${c2}▀▀▀▘${res}
+
+
+
+\e{bold}What's the password, dipshit?\e{reset}'';
+ };
+ };
+}
diff --git a/packages.nix b/packages.nix
index 7a8b3c4..13379ba 100644
--- a/packages.nix
+++ b/packages.nix
@@ -49,7 +49,6 @@ let
lf
libnotify
dunst
- mtm
pass
xcwd
alsaUtils