diff --git a/flake.lock b/flake.lock index eaae805..6d56e48 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,152 @@ { "nodes": { + "base16": { + "inputs": { + "fromYaml": "fromYaml" + }, + "locked": { + "lastModified": 1708890466, + "narHash": "sha256-LlrC09LoPi8OPYOGPXegD72v+//VapgAqhbOFS3i8sc=", + "owner": "SenchoPens", + "repo": "base16.nix", + "rev": "665b3c6748534eb766c777298721cece9453fdae", + "type": "github" + }, + "original": { + "owner": "SenchoPens", + "repo": "base16.nix", + "type": "github" + } + }, + "base16-alacritty": { + "flake": false, + "locked": { + "lastModified": 1703982197, + "narHash": "sha256-TNxKbwdiUXGi4Z4chT72l3mt3GSvOcz6NZsUH8bQU/k=", + "owner": "aarowill", + "repo": "base16-alacritty", + "rev": "c95c200b3af739708455a03b5d185d3d2d263c6e", + "type": "github" + }, + "original": { + "owner": "aarowill", + "repo": "base16-alacritty", + "type": "github" + } + }, + "base16-alacritty-yaml": { + "flake": false, + "locked": { + "lastModified": 1674275109, + "narHash": "sha256-Adwx9yP70I6mJrjjODOgZJjt4OPPe8gJu7UuBboXO4M=", + "owner": "aarowill", + "repo": "base16-alacritty", + "rev": "63d8ae5dfefe5db825dd4c699d0cdc2fc2c3eaf7", + "type": "github" + }, + "original": { + "owner": "aarowill", + "repo": "base16-alacritty", + "rev": "63d8ae5dfefe5db825dd4c699d0cdc2fc2c3eaf7", + "type": "github" + } + }, + "base16-fish": { + "flake": false, + "locked": { + "lastModified": 1622559957, + "narHash": "sha256-PebymhVYbL8trDVVXxCvZgc0S5VxI7I1Hv4RMSquTpA=", + "owner": "tomyun", + "repo": "base16-fish", + "rev": "2f6dd973a9075dabccd26f1cded09508180bf5fe", + "type": "github" + }, + "original": { + "owner": "tomyun", + "repo": "base16-fish", + "type": "github" + } + }, + "base16-foot": { + "flake": false, + "locked": { + "lastModified": 1696725948, + "narHash": "sha256-65bz2bUL/yzZ1c8/GQASnoiGwaF8DczlxJtzik1c0AU=", + "owner": "tinted-theming", + "repo": "base16-foot", + "rev": "eedbcfa30de0a4baa03e99f5e3ceb5535c2755ce", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-foot", + "type": "github" + } + }, + "base16-helix": { + "flake": false, + "locked": { + "lastModified": 1696727917, + "narHash": "sha256-FVrbPk+NtMra0jtlC5oxyNchbm8FosmvXIatkRbYy1g=", + "owner": "tinted-theming", + "repo": "base16-helix", + "rev": "dbe1480d99fe80f08df7970e471fac24c05f2ddb", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-helix", + "type": "github" + } + }, + "base16-kitty": { + "flake": false, + "locked": { + "lastModified": 1665001328, + "narHash": "sha256-aRaizTYPpuWEcvoYE9U+YRX+Wsc8+iG0guQJbvxEdJY=", + "owner": "kdrag0n", + "repo": "base16-kitty", + "rev": "06bb401fa9a0ffb84365905ffbb959ae5bf40805", + "type": "github" + }, + "original": { + "owner": "kdrag0n", + "repo": "base16-kitty", + "type": "github" + } + }, + "base16-tmux": { + "flake": false, + "locked": { + "lastModified": 1696725902, + "narHash": "sha256-wDPg5elZPcQpu7Df0lI5O8Jv4A3T6jUQIVg63KDU+3Q=", + "owner": "tinted-theming", + "repo": "base16-tmux", + "rev": "c02050bebb60dbb20cb433cd4d8ce668ecc11ba7", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-tmux", + "type": "github" + } + }, + "base16-vim": { + "flake": false, + "locked": { + "lastModified": 1663659192, + "narHash": "sha256-uJvaYYDMXvoo0fhBZUhN8WBXeJ87SRgof6GEK2efFT0=", + "owner": "chriskempson", + "repo": "base16-vim", + "rev": "3be3cd82cd31acfcab9a41bad853d9c68d30478d", + "type": "github" + }, + "original": { + "owner": "chriskempson", + "repo": "base16-vim", + "type": "github" + } + }, "disko": { "inputs": { "nixpkgs": "nixpkgs" @@ -46,10 +193,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "dirtyRev": "688c76af875a26c7ae3229937cd86bd79cf0e102-dirty", - "dirtyShortRev": "688c76af875a-dirty", - "lastModified": 1708611597, - "narHash": "sha256-w4mvH7EdpUg+QS7fWrVDJ7aomv0CPWNqAbd8BhE0iV0=", + "lastModified": 1709241862, + "narHash": "sha256-Xv0B24GjQ3byupOmffDGEhEuk8kZgKDbgi4MQPTVX0A=", + "ref": "refs/heads/v4", + "rev": "33965e2b286c16d590eba1612f337d95cde89395", + "revCount": 1048, "type": "git", "url": "file:///home/lxsameer/src/fg42" }, @@ -58,6 +206,22 @@ "url": "file:///home/lxsameer/src/fg42" } }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1673956053, + "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": "systems" @@ -81,11 +245,11 @@ "systems": "systems_2" }, "locked": { - "lastModified": 1705309234, - "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", + "lastModified": 1709126324, + "narHash": "sha256-q6EQdSeUZOG26WelxqkmR7kArjgWCdw5sfJVHPH/7j8=", "owner": "numtide", "repo": "flake-utils", - "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", + "rev": "d465f4819400de7c8d874d50b982301f28a84605", "type": "github" }, "original": { @@ -99,11 +263,11 @@ "systems": "systems_3" }, "locked": { - "lastModified": 1705309234, - "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", + "lastModified": 1709126324, + "narHash": "sha256-q6EQdSeUZOG26WelxqkmR7kArjgWCdw5sfJVHPH/7j8=", "owner": "numtide", "repo": "flake-utils", - "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", + "rev": "d465f4819400de7c8d874d50b982301f28a84605", "type": "github" }, "original": { @@ -112,6 +276,39 @@ "type": "github" } }, + "fromYaml": { + "flake": false, + "locked": { + "lastModified": 1689549921, + "narHash": "sha256-iX0pk/uB019TdBGlaJEWvBCfydT6sRq+eDcGPifVsCM=", + "owner": "SenchoPens", + "repo": "fromYaml", + "rev": "11fbbbfb32e3289d3c631e0134a23854e7865c84", + "type": "github" + }, + "original": { + "owner": "SenchoPens", + "repo": "fromYaml", + "type": "github" + } + }, + "gnome-shell": { + "flake": false, + "locked": { + "lastModified": 1698794309, + "narHash": "sha256-/TIkZ8y5Wv3QHLFp79Poao9fINurKs5pa4z0CRe+F8s=", + "owner": "GNOME", + "repo": "gnome-shell", + "rev": "a7c169c6c29cf02a4c392fa0acbbc5f5072823e7", + "type": "github" + }, + "original": { + "owner": "GNOME", + "ref": "45.1", + "repo": "gnome-shell", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -133,6 +330,27 @@ "type": "github" } }, + "home-manager_2": { + "inputs": { + "nixpkgs": [ + "stylix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1706001011, + "narHash": "sha256-J7Bs9LHdZubgNHZ6+eE/7C18lZ1P6S5/zdJSdXFItI4=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "3df2a80f3f85f91ea06e5e91071fa74ba92e5084", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, "nixlib": { "locked": { "lastModified": 1708821942, @@ -156,11 +374,11 @@ ] }, "locked": { - "lastModified": 1708940320, - "narHash": "sha256-QOWRJlqT5FRESiaO42/QV/GbSRNKSa4XUDs3cNQsoWI=", + "lastModified": 1709226763, + "narHash": "sha256-GlJ7g2srrtx6s5P2uswZ6Zcpy2u90tomIx+Gstlk97s=", "owner": "nix-community", "repo": "nixos-generators", - "rev": "5b7772406956f95e8a0e1f27218b1e7cf6e9164a", + "rev": "2c9562e7624fa1b50983fc18d504bf86202bef49", "type": "github" }, "original": { @@ -171,11 +389,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1708594753, - "narHash": "sha256-c/gH7iXS/IYH9NrFOT+aJqTq+iEBkvAkpWuUHGU3+f0=", + "lastModified": 1709147990, + "narHash": "sha256-vpXMWoaCtMYJ7lisJedCRhQG9BSsInEyZnnG5GfY9tQ=", "owner": "nixos", "repo": "nixos-hardware", - "rev": "3f7d0bca003eac1a1a7f4659bbab9c8f8c2a0958", + "rev": "33a97b5814d36ddd65ad678ad07ce43b1a67f159", "type": "github" }, "original": { @@ -280,6 +498,22 @@ "type": "github" } }, + "nixpkgs_5": { + "locked": { + "lastModified": 1700856099, + "narHash": "sha256-RnEA7iJ36Ay9jI0WwP+/y4zjEhmeN6Cjs9VOFBH7eVQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "0bd59c54ef06bc34eca01e37d689f5e46b3fe2f1", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "root": { "inputs": { "disko": "disko", @@ -289,7 +523,8 @@ "nixos-generators": "nixos-generators", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs_4", - "sops": "sops" + "sops": "sops", + "stylix": "stylix" } }, "sops": { @@ -300,11 +535,11 @@ "nixpkgs-stable": "nixpkgs-stable_2" }, "locked": { - "lastModified": 1708830076, - "narHash": "sha256-Cjh2xdjxC6S6nW6Whr2dxSeh8vjodzhTmQdI4zPJ4RA=", + "lastModified": 1708987867, + "narHash": "sha256-k2lDaDWNTU5sBVHanYzjDKVDmk29RHIgdbbXu5sdzBA=", "owner": "Mic92", "repo": "sops-nix", - "rev": "2874fbbe4a65bd2484b0ad757d27a16107f6bc17", + "rev": "a1c8de14f60924fafe13aea66b46157f0150f4cf", "type": "github" }, "original": { @@ -313,6 +548,37 @@ "type": "github" } }, + "stylix": { + "inputs": { + "base16": "base16", + "base16-alacritty": "base16-alacritty", + "base16-alacritty-yaml": "base16-alacritty-yaml", + "base16-fish": "base16-fish", + "base16-foot": "base16-foot", + "base16-helix": "base16-helix", + "base16-kitty": "base16-kitty", + "base16-tmux": "base16-tmux", + "base16-vim": "base16-vim", + "flake-compat": "flake-compat", + "gnome-shell": "gnome-shell", + "home-manager": "home-manager_2", + "nixpkgs": "nixpkgs_5" + }, + "locked": { + "lastModified": 1708896938, + "narHash": "sha256-oMjkMjeNhDUEpKIofo9+9RdUnmmZ4h0sm+kf6XKdy6k=", + "owner": "danth", + "repo": "stylix", + "rev": "fcff15ac5ffbe81f1c66e352f3167c270d79cdab", + "type": "github" + }, + "original": { + "owner": "danth", + "repo": "stylix", + "rev": "fcff15ac5ffbe81f1c66e352f3167c270d79cdab", + "type": "github" + } + }, "systems": { "locked": { "lastModified": 1681028828, diff --git a/flake.nix b/flake.nix index 66fe5f5..0efa49b 100644 --- a/flake.nix +++ b/flake.nix @@ -39,6 +39,7 @@ flake_utils.url = "github:numtide/flake-utils"; + stylix.url = "github:danth/stylix/fcff15ac5ffbe81f1c66e352f3167c270d79cdab"; # TODO: Checkout hercules # hercules-ci-agent.url = "github:hercules-ci/hercules-ci-agent"; # To build and android image diff --git a/modules/default.nix b/modules/default.nix index ea3e15f..ce023a7 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -84,20 +84,20 @@ rec { # Some compression/archiver tools. pkgs.unzip pkgs.zip - pkgs.ripgrep - pkgs.bat + pkgs.ripgrep + pkgs.bat pkgs.wget pkgs.curl pkgs.htop - pkgs.man - pkgs.man-pages - pkgs.man-pages-posix - + pkgs.man + pkgs.man-pages + pkgs.man-pages-posix + pkgs.emacs-nox - + universePkg ]; @@ -108,8 +108,8 @@ rec { documentation.dev.enable = true; documentation.man = { man-db.enable = true; - enable = true; - generateCaches = true; + enable = true; + generateCaches = true; }; nix.settings = { experimental-features = lib.mkDefault "nix-command flakes"; @@ -151,7 +151,7 @@ rec { defaultSession = "fg42"; startx.enable = true; }; - + # desktopManager = { # session = lib.mkForce [{ # name = "fg42"; @@ -184,9 +184,9 @@ rec { package = pkgs.mesa_drivers; driSupport = true; driSupport32Bit = true; - + }; - + environment.systemPackages = [ pkgs.glxinfo pkgs.xorg.xhost # not included by the x11 nixos module bydefault @@ -227,7 +227,7 @@ rec { ]; disko = import diskFile; - + environment.systemPackages = [ pkgs.disko ]; @@ -262,4 +262,48 @@ rec { ]; }; + styles = { lib, pkgs, inputs, ...}: { + + imports = [ + inputs.stylix.nixosModules.stylix + ]; + + stylix.image = ./wallpaper.jpg; + stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/stella.yaml"; + stylix.polarity = "dark"; + stylix.fonts = { + serif = { + package = pkgs.vazir-fonts; + name = "Vazirmatn"; + }; + + sansSerif = { + package = pkgs.vazir-fonts; + name = "Vazirmatn"; + }; + + monospace = { + package = pkgs.fira-mono; + name = "Fira Mono"; + }; + + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + sizes = { + applications = 10; + desktop = 10; + popups = 10; + terminal = 10; + }; + }; + + }; + + yubikey = { config, lib, pkgs, ...}: { + services.pcscd.enable = true; + services.udev.packages = [ pkgs.yubikey-personalization ]; + environment.systemPackages = []; + }; } diff --git a/modules/wallpaper.jpg b/modules/wallpaper.jpg new file mode 100644 index 0000000..6beb8af Binary files /dev/null and b/modules/wallpaper.jpg differ diff --git a/users/lxsameer/desktop.nix b/users/lxsameer/desktop.nix index 9e2030f..940659f 100644 --- a/users/lxsameer/desktop.nix +++ b/users/lxsameer/desktop.nix @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see . -{ config, pkgs, ... }@params: +{ config, lib, pkgs, ... }@params: { home.username = "lxsameer"; @@ -40,12 +40,14 @@ xsetroot -solid black & exec $HOME/.fg42-xsession ''; + home.file.".fg42.el".source = ./fg42.el; + home.file.".ssh/config".source = ./ssh/config; # set cursor size and dpi for 4k monitor xresources.properties = { - "Xcursor.size" = 16; - "Xft.dpi" = 96; + "Xcursor.size" = lib.mkDefault 16; + "Xft.dpi" = 96; # 72 "Xft.autohint" = 0; "Xft.lcdfilter" = "lcddefault"; "Xft.hintstyle" = "hintfull"; @@ -69,10 +71,16 @@ librewolf firefox + evince + pcmanfm + # utils ripgrep eza # A modern replacement for ‘ls’ fzf # A command-line fuzzy finder + fd # alternative to find + sysstat + lm_sensors # networking tools mtr # A network diagnostic tool @@ -123,6 +131,7 @@ fira-code nerdfonts thefuck + weechat yubioath-flutter ]; @@ -142,6 +151,7 @@ last = "log -1 HEAD"; lg = "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"; brs = "for-each-ref --sort='-authordate:iso8601' --count 20 --format=' %(color:green)%(authordate:relative)%09%(if)%(HEAD)%(then)%(color:brightwhite)*%(else)%(color:white) %(end)%(refname:short)%09%(color:yellow)%(authorname)%(authoremail)' refs/heads"; + e = "emacsclient"; }; signing = { key = "6F3FA93B4BD9C3CAEF3877E6384A12C310233CC5"; @@ -190,15 +200,13 @@ }; }; - # alacritty - a cross-platform, GPU-accelerated terminal emulator programs.alacritty = { enable = true; # custom settings settings = { env.TERM = "xterm-256color"; font = { - size = 10; - draw_bold_text_with_bright_colors = true; + size = lib.mkDefault 10; }; scrolling.multiplier = 5; selection.save_to_clipboard = true; @@ -208,7 +216,7 @@ programs.zsh = { enable = true; autocd = true; - # dotDir = ".config/zsh"; + enableAutosuggestions = true; enableCompletion = true; shellAliases = { @@ -217,38 +225,33 @@ l = "exa -l"; la = "exa -la"; ip = "ip --color=auto"; + g = "git"; + pu = "git push origin $(git branch --show-current)"; + pl = "git pull origin $(git branch --show-current)"; + + Ps = "ps -aux |grep "; + d = "docker"; n = "nix"; ew = "emacs -nw"; - pu = "git push origin $(git branch --show-current)"; - pl = "git pull origin $(git branch --show-current)"; + F = "find . -iname"; + f = "fd"; _ = "sudo"; + rebuild = "sudo nixos-rebuild switch --flake '/home/lxsameer/src/Universe#majin'"; + "..." = "../.."; + "...." = "../../.."; + "....." = "../../../.."; + "......" = "../../../../.."; }; initExtra = '' bindkey '^ ' autosuggest-accept - AGKOZAK_CMD_EXEC_TIME=5 - AGKOZAK_COLORS_CMD_EXEC_TIME='yellow' - AGKOZAK_COLORS_PROMPT_CHAR='magenta' - AGKOZAK_CUSTOM_SYMBOLS=( '⇣⇡' '⇣' '⇡' '+' 'x' '!' '>' '?' ) - AGKOZAK_MULTILINE=0 - AGKOZAK_PROMPT_CHAR=( ❯ ❯ ❮ ) eval $(thefuck --alias) autopair-init ''; plugins = with pkgs; [ - { - name = "agkozak-zsh-prompt"; - src = fetchFromGitHub { - owner = "agkozak"; - repo = "agkozak-zsh-prompt"; - rev = "v3.7.0"; - sha256 = "1iz4l8777i52gfynzpf6yybrmics8g4i3f1xs3rqsr40bb89igrs"; - }; - file = "agkozak-zsh-prompt.plugin.zsh"; - } { name = "formarks"; src = fetchFromGitHub { @@ -297,24 +300,24 @@ enableZshIntegration = true; }; + + systemd.user.sessionVariables.TMUX_FZF_LAUNCH_KEY = "Tab"; + programs.tmux = { enable = true; terminal = "tmux-256color"; historyLimit = 100000; keyMode = "emacs"; prefix = "M-Space"; - + baseIndex = 1; plugins = (with pkgs.tmuxPlugins; [ - cpu jump - mode-indicator - net-speed tmux-fzf ]); extraConfig = '' unbind C-b - set -g @jump-key 'M-1' + set -g @jump-key ')' bind C-b copy-mode -u bind Space copy-mode @@ -328,6 +331,8 @@ set-option -g visual-silence off set-window-option -g monitor-activity off set-option -g bell-action none + set -g @net_speed_interfaces "wlp8s0" + set -g status-right '%m-%d %H:%M ' ''; }; @@ -371,4 +376,10 @@ enableSshSupport = true; }; + gtk = { + enable = true; + iconTheme.package = pkgs.gnome.adwaita-icon-theme; + iconTheme.name = "Adwaita"; + }; + } diff --git a/users/lxsameer/ssh/config b/users/lxsameer/ssh/config new file mode 100644 index 0000000..8eab136 --- /dev/null +++ b/users/lxsameer/ssh/config @@ -0,0 +1,6 @@ +Host 192.168.0.87 + PreferredAuthentications=password + +Match all + Include ~/src/uw/build/node0.ssh_config +# Include this file in your main ssh config diff --git a/users/lxsameer/style.nix b/users/lxsameer/style.nix new file mode 100644 index 0000000..7080bfd --- /dev/null +++ b/users/lxsameer/style.nix @@ -0,0 +1,40 @@ +# Universe - The big bang to my universe +# +# Copyright (c) 2023-2024 Sameer Rahmani +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, version 2. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +{ pkgs, ...}: +{ + stylix.polarity = "dark"; + stylix.fonts = { + serif = { + package = pkgs.dejavu_fonts; + name = "DejaVu Serif"; + }; + + sansSerif = { + package = pkgs.dejavu_fonts; + name = "DejaVu Sans"; + }; + + monospace = { + package = pkgs.dejavu_fonts; + name = "DejaVu Sans Mono"; + }; + + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; +} diff --git a/worlds/majin.nix b/worlds/majin.nix index 181fc6d..583faba 100644 --- a/worlds/majin.nix +++ b/worlds/majin.nix @@ -35,7 +35,12 @@ let boot.initrd.kernelModules = [ "amdgpu" ]; hardware.enableRedistributableFirmware = true; - hardware.cpu.amd.updateMicrocode = true; + hardware.cpu.amd.updateMicrocode = true; + + networking.extraHosts = '' + 192.168.0.122 mc + 192.168.0.202 mary + ''; }; lxsameer = pkgs.callPackage ../users/lxsameer/default.nix {}; @@ -66,7 +71,8 @@ in { base lxsameer.user desktop - + styles + yubikey inputs.home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true;