Flake for my NixOS devices

Remove old config

bwc9876.dev 5288a5ce cb0e94ef

verified
+4 -5152
+4 -21
README.md
··· 3 3 This repo contains the flake I use to configure any of my NixOS-configured 4 4 devices. 5 5 6 - ## Structure 6 + ## Current Configurations 7 7 8 - - flake.nix: Central file for exporting all my configs and anything else I need. 9 - - lib.nix: Helper functions 10 - - systemconfigs/: All systems this flake configures, each system has some 11 - options that describe it but the main thing that determines what options they 12 - set are _roles_. 13 - - nixosModules/: A set of path-"routed" NixOS modules that represent "roles". A 14 - role is a feature a system can have (ex. the `graphics` role enables Hyprland, 15 - GUI apps, etc). Roles can either be a singular nix file, or a folder of them 16 - if they're complicated. Files named `role1+role2.nix` represent an _overlap_ 17 - role, which is applied if all roles delimited by `+` are turned on. 18 - - base/: This folder contains modules applied unconditionally to all systems. 19 - - res/: Non-nix files used in the config. Pictures, scripts, etc. 20 - - pkgs/: Custom nix packages made for my config. 21 - - create-sys/: WIP tool for automating the creation of new systems. Currently 22 - just has an interactive prompt for adding a new `.nix` file to `systems/`. 23 - 24 - ## Implementation 25 - 26 - I'm not going to lie, I have no idea what I'm doing. Is every feature here 27 - implmemented well? Definitely not, but that's okay! 8 + - `aperture` - Framework 13 Laptop 9 + - `black-mesa` - Desktop Computer w/ AMD GPU 10 + - `installer` - Installer/LiveCD ISO for my flake
-14
oldNixosModules/base/base.nix
··· 1 - { 2 - pkgs, 3 - inputs, 4 - config, 5 - ... 6 - }: { 7 - environment.variables."HOSTNAME" = config.networking.hostName; 8 - environment.systemPackages = with pkgs; [ 9 - uutils-coreutils-noprefix 10 - ]; 11 - environment.etc."flake-src".source = inputs.self; 12 - home-manager.useGlobalPkgs = true; 13 - home-manager.useUserPackages = true; 14 - }
-7
oldNixosModules/base/boot.nix
··· 1 - {lib, ...}: { 2 - # /tmp should be clean! 3 - boot.tmp.cleanOnBoot = true; 4 - 5 - # Give me back my RAM! 6 - services.logind.settings.Login.RuntimeDirectorySize = "100M"; 7 - }
-47
oldNixosModules/base/nix.nix
··· 1 - { 2 - pkgs, 3 - inputs, 4 - lib, 5 - ... 6 - }: { 7 - environment.systemPackages = with pkgs; [ 8 - nh 9 - nix-output-monitor 10 - ]; 11 - 12 - nix = { 13 - channel.enable = false; 14 - registry.p.flake = inputs.self; 15 - package = pkgs.lix; 16 - settings = { 17 - # So we can do `import <nixpkgs>` 18 - nix-path = "nixpkgs=${inputs.nixpkgs}"; 19 - experimental-features = [ 20 - "nix-command" 21 - "flakes" 22 - "pipe-operator" 23 - ]; 24 - auto-optimise-store = true; 25 - fallback = true; 26 - }; 27 - gc = { 28 - automatic = false; 29 - dates = "weekly"; 30 - }; 31 - }; 32 - 33 - # Switch ng is not as weird 34 - # system.switch = { 35 - # enable = false; 36 - # enableNg = true; 37 - # }; 38 - 39 - # Kill nix daemon builds over user sessions 40 - systemd.services.nix-daemon.serviceConfig.OOMScoreAdjust = lib.mkDefault 250; 41 - 42 - # Keeps flake inputs when GCing 43 - system.extraDependencies = with builtins; let 44 - flakeDeps = flake: [flake.outPath] ++ (foldl' (a: b: a ++ b) [] (map flakeDeps (attrValues flake.inputs or {}))); 45 - in 46 - flakeDeps inputs.self; 47 - }
-34
oldNixosModules/base/personal.nix
··· 1 - { 2 - inputs, 3 - config, 4 - ... 5 - }: { 6 - imports = [inputs.hm.nixosModules.default]; 7 - 8 - time.timeZone = "America/New_York"; 9 - 10 - users.users.bean = { 11 - isNormalUser = true; 12 - description = "Benjamin Crocker"; 13 - autoSubUidGidRange = true; 14 - extraGroups = ["wheel"]; # For sudo 15 - }; 16 - 17 - home-manager.users.root = { 18 - imports = [inputs.nix-index-db.homeModules.nix-index]; 19 - home = { 20 - username = "root"; 21 - homeDirectory = "/root"; 22 - stateVersion = config.system.stateVersion; 23 - }; 24 - }; 25 - 26 - home-manager.users.bean = { 27 - home = { 28 - username = "bean"; 29 - homeDirectory = "/home/bean"; 30 - file.".face".source = "${../../res/pictures/cow.png}"; 31 - stateVersion = config.system.stateVersion; 32 - }; 33 - }; 34 - }
-66
oldNixosModules/base/shell.nix
··· 1 - { 2 - pkgs, 3 - inputs, 4 - ... 5 - }: { 6 - imports = [inputs.nix-index-db.nixosModules.nix-index]; 7 - 8 - users.users.bean.shell = pkgs.nushell; 9 - users.users.root.shell = pkgs.nushell; 10 - programs.fish.enable = true; 11 - documentation.man.generateCaches = false; 12 - programs.ssh.startAgent = true; 13 - services.upower.enable = true; 14 - 15 - security.sudo.extraConfig = '' 16 - Defaults lecture = never 17 - ''; 18 - 19 - environment = { 20 - shells = with pkgs; [nushell fish]; 21 - variables.EDITOR = "nvim"; 22 - 23 - systemPackages = with pkgs; [ 24 - nushell 25 - file 26 - screen 27 - util-linux 28 - inetutils 29 - just 30 - man-pages 31 - htop 32 - dig 33 - doggo 34 - ]; 35 - }; 36 - 37 - programs.git.enable = true; 38 - 39 - programs.neovim = { 40 - enable = true; 41 - viAlias = true; 42 - vimAlias = true; 43 - }; 44 - 45 - nixpkgs.overlays = [ 46 - inputs.nix-index-db.overlays.nix-index 47 - ]; 48 - 49 - home-manager.users.bean.programs = { 50 - command-not-found.enable = false; 51 - nix-index.enable = true; 52 - zoxide.enable = true; 53 - ripgrep.enable = true; 54 - bat = { 55 - enable = true; 56 - extraPackages = with pkgs.bat-extras; [batman]; 57 - }; 58 - }; 59 - 60 - home-manager.users.root.programs = { 61 - zoxide.enable = true; 62 - ripgrep.enable = true; 63 - command-not-found.enable = false; 64 - bat.enable = true; 65 - }; 66 - }
-37
oldNixosModules/base/theming.nix
··· 1 - {inputs, ...}: let 2 - catppuccin = { 3 - enable = true; 4 - flavor = "mocha"; 5 - accent = "green"; 6 - }; 7 - in { 8 - imports = [ 9 - inputs.catppuccin.nixosModules.catppuccin 10 - ]; 11 - 12 - inherit catppuccin; 13 - 14 - home-manager.users.bean = { 15 - imports = [ 16 - inputs.catppuccin.homeModules.catppuccin 17 - ]; 18 - 19 - catppuccin = 20 - { 21 - mako.enable = false; 22 - } 23 - // catppuccin; 24 - }; 25 - 26 - home-manager.users.root = { 27 - imports = [ 28 - inputs.catppuccin.homeModules.catppuccin 29 - ]; 30 - 31 - catppuccin = 32 - { 33 - mako.enable = false; 34 - } 35 - // catppuccin; 36 - }; 37 - }
-24
oldNixosModules/default.nix
··· 1 - {lib, ...}: let 2 - allNodesOf = nodeType: dir: lib.attrNames (lib.filterAttrs (_n: v: v == nodeType) dir); 3 - allRoles = builtins.readDir ./.; 4 - allNixFiles = dir: 5 - lib.pipe (builtins.readDir dir) [ 6 - (allNodesOf "regular") 7 - (builtins.filter (s: s != "default.nix")) 8 - (builtins.filter (lib.hasSuffix ".nix")) 9 - ]; 10 - 11 - # Flat Roles: roles that are normal .nix file in nixosModules/ 12 - rolesFiles = builtins.map (lib.removeSuffix ".nix") (allNixFiles ./.); 13 - flatRoles = lib.genAttrs rolesFiles (p: ./. + "/${p}.nix"); 14 - 15 - # Nested Roles: roles that are a folder containing a number of .nix files 16 - rolesDirs = allNodesOf "directory" allRoles; 17 - createNestedRole = dir: let 18 - nixFiles = allNixFiles (./. + "/${dir}"); 19 - in { 20 - imports = builtins.map (f: ./. + "/${dir}" + "/${f}") nixFiles; 21 - }; 22 - nestedRoles = lib.genAttrs rolesDirs createNestedRole; 23 - in 24 - flatRoles // nestedRoles
-156
oldNixosModules/dev+graphics/code.nix
··· 1 - {pkgs, ...}: { 2 - # Because vsc is annoying with not following fallbacks 3 - # fonts.packages = with pkgs; [nerd-fonts.fira-code]; 4 - # 5 - # home-manager.users.bean = { 6 - # home.file.".vscode/argv.json".text = builtins.toJSON { 7 - # "enable-crash-reporter" = false; 8 - # "crash-reporter-id" = ""; 9 - # "password-store" = "gnome-libsecret"; 10 - # }; 11 - # 12 - # programs.vscode = { 13 - # enable = true; 14 - # enableUpdateCheck = false; 15 - # enableExtensionUpdateCheck = false; 16 - # mutableExtensionsDir = false; 17 - # 18 - # extensions = with pkgs.vscode-extensions; [ 19 - # # Theme 20 - # (pkgs.catppuccin-vsc.override { 21 - # accent = "green"; 22 - # boldKeywords = true; 23 - # italicComments = true; 24 - # italicKeywords = true; 25 - # extraBordersEnabled = false; 26 - # workbenchMode = "default"; 27 - # bracketMode = "rainbow"; 28 - # colorOverrides = {}; 29 - # customUIColors = {}; 30 - # }) 31 - # catppuccin.catppuccin-vsc-icons 32 - # 33 - # # Nix 34 - # bbenoist.nix 35 - # kamadorueda.alejandra 36 - # 37 - # # Markdown 38 - # yzhang.markdown-all-in-one 39 - # bierner.markdown-mermaid 40 - # davidanson.vscode-markdownlint 41 - # 42 - # # Rust 43 - # rust-lang.rust-analyzer 44 - # tamasfe.even-better-toml 45 - # 46 - # # C / C++ 47 - # ms-vscode.cpptools 48 - # twxs.cmake 49 - # 50 - # # Java 51 - # redhat.java 52 - # 53 - # # Typescript / Javascript 54 - # denoland.vscode-deno 55 - # yoavbls.pretty-ts-errors 56 - # dbaeumer.vscode-eslint 57 - # esbenp.prettier-vscode 58 - # 59 - # # Astro 60 - # astro-build.astro-vscode 61 - # unifiedjs.vscode-mdx 62 - # 63 - # # Misc. Web 64 - # bradlc.vscode-tailwindcss 65 - # 66 - # # .NET 67 - # ms-dotnettools.csharp 68 - # ms-dotnettools.vscode-dotnet-runtime 69 - # 70 - # # Python 71 - # ms-python.python 72 - # ms-python.vscode-pylance 73 - # wholroyd.jinja 74 - # 75 - # # XML 76 - # redhat.vscode-xml 77 - # 78 - # # Spelling / Grammar 79 - # yzhang.dictionary-completion 80 - # tekumara.typos-vscode 81 - # 82 - # # GitHub 83 - # github.vscode-pull-request-github 84 - # github.vscode-github-actions 85 - # 86 - # # Misc. 87 - # skellock.just 88 - # thenuprojectcontributors.vscode-nushell-lang 89 - # fill-labs.dependi 90 - # zhwu95.riscv 91 - # redhat.vscode-yaml 92 - # ms-vsliveshare.vsliveshare 93 - # leonardssh.vscord 94 - # ]; 95 - # 96 - # userSettings = { 97 - # "window.zoomLevel" = 2; 98 - # "telemetry.telemetryLevel" = "off"; 99 - # "update.mode" = "manual"; 100 - # "update.showReleaseNotes" = false; 101 - # "editor.fontFamily" = "Monospace, FiraCode Nerd Font Mono"; 102 - # "terminal.integrated.fontFamily" = "Monospace, FiraCode Nerd Font Mono"; 103 - # "editor.fontLigatures" = true; 104 - # "editor.detectIndentation" = true; 105 - # "editor.multiCursorModifier" = "ctrlCmd"; 106 - # "editor.minimap.enabled" = false; 107 - # "editor.fontSize" = 16; 108 - # "terminal.integrated.fontSize" = 16; 109 - # "workbench.colorTheme" = "Catppuccin Mocha"; 110 - # "workbench.iconTheme" = "catppuccin-mocha"; 111 - # "workbench.startupEditor" = "none"; 112 - # "workbench.welcomePage.walkthroughs.openOnInstall" = false; 113 - # "terminal.integrated.smoothScrolling" = true; 114 - # "explorer.compactFolders" = false; 115 - # "explorer.confirmDelete" = false; 116 - # "explorer.confirmDragAndDrop" = false; 117 - # "git.openRepositoryInParentFolders" = "never"; 118 - # "extensions.autoUpdate" = false; 119 - # "extensions.ignoreRecommendations" = true; 120 - # "javascript.updateImportsOnFileMove.enabled" = "always"; 121 - # "typescript.updateImportsOnFileMove.enabled" = "always"; 122 - # "githubPullRequests.pullBranch" = "never"; 123 - # "vscord.app.name" = "Visual Studio Code"; 124 - # "vscord.status.idle.disconnectOnIdle" = true; 125 - # "vscord.behaviour.suppressNotifications" = true; 126 - # "material-icon-theme.folders.color" = "#546E7B"; 127 - # "redhat.telemetry.enabled" = false; 128 - # "rust-analyzer.server.path" = "${pkgs.rust-analyzer}/bin/rust-analyzer"; 129 - # "prettier.prettierPath" = "${pkgs.nodePackages.prettier}/lib/node_modules/prettier"; 130 - # "rust-analyzer.cargo.allTargets" = false; 131 - # "rust-analyzer.hover.actions.references.enable" = true; 132 - # "dotnetAcquisitionExtension.enableTelemetry" = false; 133 - # 134 - # "[json][yaml][javascript][typescript][javascriptreact][typescriptreact][css][scss][less][tailwindcss][html][astro]" = { 135 - # "editor.defaultFormatter" = "esbenp.prettier-vscode"; 136 - # }; 137 - # 138 - # "[python]" = { 139 - # "editor.defaultFormatter" = "ms-python.black-formatter"; 140 - # }; 141 - # 142 - # "[rust]" = { 143 - # "editor.defaultFormatter" = "rust-lang.rust-analyzer"; 144 - # }; 145 - # 146 - # "[nix]" = { 147 - # "editor.defaultFormatter" = "kamadorueda.alejandra"; 148 - # }; 149 - # 150 - # "[markdown]" = { 151 - # "editor.defaultFormatter" = "DavidAnson.vscode-markdownlint"; 152 - # }; 153 - # }; 154 - # }; 155 - # }; 156 - }
-6
oldNixosModules/dev+graphics/misc.nix
··· 1 - {pkgs, ...}: { 2 - environment.systemPackages = with pkgs; [ 3 - google-lighthouse 4 - (cutter.withPlugins (p: with p; [rz-ghidra])) 5 - ]; 6 - }
-27
oldNixosModules/dev+graphics/nvim.nix
··· 1 - {pkgs, ...}: { 2 - environment.systemPackages = with pkgs; [ 3 - neovide 4 - ]; 5 - 6 - home-manager.users.bean = { 7 - wayland.windowManager.hyprland.settings.bind = [ 8 - "SUPER,D,exec,neovide" 9 - ]; 10 - programs = { 11 - nixvim = { 12 - clipboard.providers.wl-copy.enable = true; 13 - }; 14 - neovide = { 15 - enable = true; 16 - settings = { 17 - fork = true; 18 - font = { 19 - normal = [{family = "monospace";}]; 20 - size = 18.0; 21 - }; 22 - title-hidden = false; 23 - }; 24 - }; 25 - }; 26 - }; 27 - }
-4
oldNixosModules/dev/android.nix
··· 1 - {...}: { 2 - users.users.bean.extraGroups = ["kvm" "adbusers"]; 3 - programs.adb.enable = true; 4 - }
-8
oldNixosModules/dev/dotnet.nix
··· 1 - {pkgs, ...}: { 2 - environment.systemPackages = with pkgs; [ 3 - dotnet-sdk 4 - dotnet-runtime 5 - dotnetPackages.Nuget 6 - # mono 7 - ]; 8 - }
-22
oldNixosModules/dev/git.nix
··· 1 - {pkgs, ...}: { 2 - environment.systemPackages = with pkgs; [ 3 - gh 4 - ]; 5 - 6 - programs.git = { 7 - enable = true; 8 - config = { 9 - init.defaultBranch = "main"; 10 - commit.gpgSign = true; 11 - user = { 12 - email = "bwc9876@gmail.com"; 13 - name = "Ben C"; 14 - signingKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKsVzdJra+x5aEuwTjL1FBOiMh9bftvs8QwsM1xyEbdd"; 15 - }; 16 - advice = { 17 - addIgnoredFile = false; 18 - }; 19 - gpg.format = "ssh"; 20 - }; 21 - }; 22 - }
-10
oldNixosModules/dev/haskell.nix
··· 1 - {pkgs, ...}: { 2 - environment.systemPackages = with pkgs; [ 3 - haskell.compiler.ghc912 4 - ]; 5 - 6 - home-manager.users.bean.xdg.configFile."ghc/ghci.conf".text = '' 7 - :set prompt "\ESC[1;35m\x03BB> \ESC[m" 8 - :set prompt-cont "\ESC[1;35m > \ESC[m" 9 - ''; 10 - }
-16
oldNixosModules/dev/js.nix
··· 1 - {pkgs, ...}: { 2 - home-manager.users.bean.xdg.configFile."astro/config.json".text = builtins.toJSON { 3 - telemetry = { 4 - enabled = false; 5 - anonymousId = ""; 6 - notifiedAt = "0"; 7 - }; 8 - }; 9 - 10 - environment.systemPackages = with pkgs; [ 11 - nodejs_latest 12 - nodePackages.pnpm 13 - yarn 14 - deno 15 - ]; 16 - }
-59
oldNixosModules/dev/misc.nix
··· 1 - { 2 - pkgs, 3 - inputs', 4 - ... 5 - }: { 6 - environment.systemPackages = with pkgs; [ 7 - # Build Tools 8 - pkg-config 9 - gnumake 10 - 11 - # Java 12 - jdk 13 - 14 - # Math 15 - libqalculate 16 - 17 - # Misc Misc 18 - binutils 19 - usbutils 20 - qrencode 21 - nmap 22 - file 23 - procfd 24 - ldapvi 25 - dust 26 - zip 27 - p7zip 28 - wol 29 - 30 - # C/C++ 31 - gcc 32 - gdb 33 - 34 - # Windows 35 - wine-wayland 36 - 37 - # Android 38 - android-tools 39 - 40 - # Debug 41 - wev 42 - poop 43 - inputs'.gh-grader-preview.packages.default 44 - ]; 45 - 46 - users.users.bean.extraGroups = ["wireshark"]; 47 - programs.wireshark = { 48 - enable = true; 49 - package = pkgs.wireshark; 50 - }; 51 - 52 - # home-manager.users.bean.programs.direnv = { 53 - # enable = true; 54 - # enableBashIntegration = true; 55 - # enableNushellIntegration = true; 56 - # nix-direnv.enable = true; 57 - # silent = true; 58 - # }; 59 - }
-5
oldNixosModules/dev/nix.nix
··· 1 - {pkgs, ...}: { 2 - environment.systemPackages = with pkgs; [ 3 - alejandra 4 - ]; 5 - }
-906
oldNixosModules/dev/nvim.nix
··· 1 - { 2 - pkgs, 3 - inputs, 4 - config, 5 - lib, 6 - ... 7 - }: { 8 - environment.systemPackages = with pkgs; [ 9 - ripgrep 10 - fd 11 - ]; 12 - 13 - home-manager.users.bean = { 14 - imports = [inputs.nixvim.homeModules.nixvim]; 15 - 16 - programs.nixvim = { 17 - enable = true; 18 - enableMan = false; 19 - defaultEditor = true; 20 - viAlias = true; 21 - vimAlias = true; 22 - 23 - nixpkgs.pkgs = pkgs; 24 - 25 - globals.mapleader = " "; 26 - 27 - colorschemes.catppuccin = { 28 - enable = true; 29 - settings = { 30 - inherit (config.catppuccin) flavor; 31 - no_underline = false; 32 - no_bold = false; 33 - no_italics = false; 34 - term_colors = true; 35 - # transparent_background = true; 36 - integrations = { 37 - alpha = true; 38 - dropbar.enabled = true; 39 - fidget = true; 40 - markdown = true; 41 - dap = true; 42 - ufo = true; 43 - rainbow_delimiters = true; 44 - lsp_trouble = true; 45 - which_key = true; 46 - telescope.enabled = true; 47 - treesitter = true; 48 - lsp_saga = true; 49 - illuminate = { 50 - enabled = true; 51 - lsp = true; 52 - }; 53 - gitsigns = true; 54 - neotree = true; 55 - native_lsp = { 56 - enabled = true; 57 - inlay_hints = { 58 - background = true; 59 - }; 60 - virtual_text = { 61 - errors = ["italic"]; 62 - hints = ["italic"]; 63 - information = ["italic"]; 64 - warnings = ["italic"]; 65 - ok = ["italic"]; 66 - }; 67 - underlines = { 68 - errors = ["underline"]; 69 - hints = ["underline"]; 70 - information = ["underline"]; 71 - warnings = ["underline"]; 72 - }; 73 - }; 74 - }; 75 - }; 76 - }; 77 - 78 - extraConfigLua = '' 79 - vim.diagnostic.config({ 80 - signs = { 81 - text = { 82 - [vim.diagnostic.severity.ERROR] = "", 83 - [vim.diagnostic.severity.WARN] = "", 84 - }, 85 - }, 86 - }) 87 - vim.g.neovide_cursor_vfx_mode = "pixiedust" 88 - 89 - -- require("satellite").setup({}) 90 - ''; 91 - 92 - autoGroups = { 93 - restore_cursor = {}; 94 - open_neotree = {}; 95 - }; 96 - 97 - filetype.extension.mdx = "mdx"; 98 - 99 - opts = { 100 - number = true; 101 - relativenumber = true; 102 - smartindent = true; 103 - cursorline = true; 104 - showtabline = 2; 105 - breakindent = true; 106 - fillchars.__raw = ''[[eob: ,fold: ,foldopen:,foldsep: ,foldclose:]]''; 107 - foldcolumn = "1"; 108 - foldlevel = 10; 109 - foldlevelstart = 10; 110 - foldenable = true; 111 - mouse = ""; 112 - }; 113 - 114 - autoCmd = [ 115 - { 116 - group = "restore_cursor"; 117 - event = ["BufReadPost"]; 118 - pattern = "*"; 119 - callback.__raw = '' 120 - function() 121 - if 122 - vim.fn.line "'\"" > 1 123 - and vim.fn.line "'\"" <= vim.fn.line "$" 124 - and vim.bo.filetype ~= "commit" 125 - and vim.fn.index({ "xxd", "gitrebase" }, vim.bo.filetype) == -1 126 - then 127 - vim.cmd "normal! g`\"" 128 - end 129 - end 130 - ''; 131 - } 132 - { 133 - group = "open_neotree"; 134 - event = ["BufRead"]; 135 - pattern = "*"; 136 - once = true; 137 - callback.__raw = '' 138 - function() 139 - if 140 - vim.bo.filetype ~= "alpha" 141 - and (not vim.g.neotree_opened) 142 - then 143 - vim.cmd "Neotree show" 144 - vim.g.neotree_opened = true 145 - end 146 - end 147 - ''; 148 - } 149 - ]; 150 - 151 - performance = { 152 - byteCompileLua = { 153 - enable = true; 154 - nvimRuntime = true; 155 - plugins = true; 156 - }; 157 - combinePlugins = { 158 - enable = true; 159 - }; 160 - }; 161 - 162 - keymaps = let 163 - prefixMap = pre: maps: 164 - builtins.map (k: { 165 - action = "<cmd>${k.action}<cr>"; 166 - key = "${pre}${k.key}"; 167 - options = k.options; 168 - }) 169 - maps; 170 - in 171 - lib.lists.flatten ( 172 - builtins.map (g: 173 - if builtins.hasAttr "group" g 174 - then prefixMap g.prefix g.keys 175 - else g) [ 176 - { 177 - action = ''"+p''; 178 - key = "<C-S-V>"; 179 - options.desc = "Paste from system clipboard"; 180 - } 181 - { 182 - action = ''"+y''; 183 - key = "<C-S-C>"; 184 - options.desc = "Copy to system clipboard"; 185 - } 186 - { 187 - action = ''"+x''; 188 - key = "<C-S-X>"; 189 - options.desc = "Cut to system clipboard"; 190 - } 191 - { 192 - action = ''<cmd>Format<cr>''; 193 - key = "<C-S-I>"; 194 - options.desc = "Format Buffer"; 195 - } 196 - { 197 - group = "Tab Navigation"; 198 - prefix = "<Tab>"; 199 - keys = [ 200 - { 201 - action = "BufferLineCycleNext"; 202 - key = "e"; 203 - options.desc = "Next Tab"; 204 - } 205 - { 206 - action = "BufferLineCyclePrev"; 207 - key = "q"; 208 - options.desc = "Previous Tab"; 209 - } 210 - { 211 - action = "BufferLinePick"; 212 - key = "<Tab>"; 213 - options.desc = "Pick Tab and Switch"; 214 - } 215 - { 216 - action = "Neotree toggle"; 217 - key = "t"; 218 - options.desc = "Toggle Neotree"; 219 - } 220 - ]; 221 - } 222 - { 223 - group = "Tab Closing"; 224 - prefix = "<S-Tab>"; 225 - keys = [ 226 - { 227 - action = "BufferLineCloseLeft"; 228 - key = "q"; 229 - options.desc = "Close Tab Left"; 230 - } 231 - { 232 - action = "BufferLineCloseRight"; 233 - key = "e"; 234 - options.desc = "Close Tab Right"; 235 - } 236 - { 237 - action = "BufferLinePickClose"; 238 - key = "<Tab>"; 239 - options.desc = "Pick Tab and Close"; 240 - } 241 - { 242 - action = "BufferLineCloseOthers"; 243 - key = "w"; 244 - options.desc = "Close Other Tabs"; 245 - } 246 - ]; 247 - } 248 - { 249 - action = "<cmd>Bdelete<cr>"; 250 - key = "<C-q>"; 251 - options.desc = "Close Current Buffer"; 252 - } 253 - { 254 - group = "LSP Actions"; 255 - prefix = "<C-.>"; 256 - keys = [ 257 - { 258 - action = "Lspsaga code_action code_action"; 259 - key = "a"; 260 - options.desc = "Code Actions"; 261 - } 262 - { 263 - action = "Lspsaga rename"; 264 - key = "r"; 265 - options.desc = "LSP Rename"; 266 - } 267 - { 268 - action = "Lspsaga diagnostic_jump_next"; 269 - key = "e"; 270 - options.desc = "Next Diagnostic"; 271 - } 272 - { 273 - action = "Lspsaga diagnostic_jump_previous"; 274 - key = "E"; 275 - options.desc = "Previous Diagnostic"; 276 - } 277 - { 278 - action = "Lspsaga goto_definition"; 279 - key = "d"; 280 - options.desc = "Jump to Definition"; 281 - } 282 - { 283 - action = "Lspsaga peek_definition"; 284 - key = "D"; 285 - options.desc = "Peek Definition"; 286 - } 287 - { 288 - action = "Lspsaga finder ref"; 289 - key = "fr"; 290 - options.desc = "Find References"; 291 - } 292 - { 293 - action = "Lspsaga finder imp"; 294 - key = "fi"; 295 - options.desc = "Find Implementations"; 296 - } 297 - { 298 - action = "Lspsaga finder def"; 299 - key = "fd"; 300 - options.desc = "Find Definitions"; 301 - } 302 - { 303 - action = "Lspsaga finder"; 304 - key = "ff"; 305 - options.desc = "Finder"; 306 - } 307 - { 308 - action = "Lspsaga hover_doc"; 309 - key = "h"; 310 - options.desc = "Hover Doc"; 311 - } 312 - ]; 313 - } 314 - { 315 - action = "<cmd>Telescope<cr>"; 316 - key = "<leader><leader>"; 317 - options.desc = "Telescope Launch"; 318 - } 319 - { 320 - action.__raw = "[[<C-\\><C-n><C-w>]]"; 321 - mode = ["t"]; 322 - key = "<C-w>"; 323 - } 324 - { 325 - action.__raw = "[[<C-\\><C-n>]]"; 326 - mode = ["t"]; 327 - key = "<esc>"; 328 - } 329 - { 330 - action = "<cmd>WhichKey<cr>"; 331 - key = "<C-/>"; 332 - } 333 - ] 334 - ); 335 - 336 - extraPlugins = with pkgs.vimPlugins; [ 337 - {plugin = pkgs.nvim-mdx;} 338 - {plugin = satellite-nvim;} 339 - {plugin = flatten-nvim;} 340 - {plugin = tiny-devicons-auto-colors-nvim;} 341 - ]; 342 - 343 - plugins = { 344 - telescope = { 345 - enable = true; 346 - settings.defaults = { 347 - layout_config.prompt_position = "top"; 348 - }; 349 - extensions = { 350 - file-browser.enable = true; 351 - ui-select.enable = true; 352 - undo.enable = true; 353 - }; 354 - keymaps = lib.fix (self: { 355 - "<leader>u" = { 356 - action = "undo"; 357 - options.desc = "Undo Tree"; 358 - }; 359 - "<leader>c" = { 360 - action = "commands"; 361 - options.desc = "Browse Commands"; 362 - }; 363 - "<leader>w" = { 364 - action = "spell_suggest"; 365 - options.desc = "Spell Suggest"; 366 - }; 367 - "<leader>s" = { 368 - action = "lsp_document_symbols"; 369 - options.desc = "LSP Symbols"; 370 - }; 371 - "<leader>t" = { 372 - action = "treesitter"; 373 - options.desc = "Treesitter Symbols"; 374 - }; 375 - "<leader>f" = { 376 - action = "find_files"; 377 - options.desc = "Files"; 378 - }; 379 - "<leader>gs" = { 380 - action = "git_status"; 381 - options.desc = "Git Status"; 382 - }; 383 - "<leader>gb" = { 384 - action = "git_branches"; 385 - options.desc = "Git Branches"; 386 - }; 387 - "<leader>gc" = { 388 - action = "git_commits"; 389 - options.desc = "Git Commits"; 390 - }; 391 - "<leader>r" = { 392 - action = "oldfiles"; 393 - options.desc = "Recent Files"; 394 - }; 395 - "<leader>l" = self."<C-S-F>"; 396 - "<C-S-F>" = { 397 - action = "live_grep"; 398 - options.desc = "Live Grep"; 399 - }; 400 - }); 401 - }; 402 - 403 - alpha = { 404 - enable = true; 405 - opts = { 406 - position = "center"; 407 - }; 408 - layout = let 409 - o = { 410 - position = "center"; 411 - }; 412 - txt = s: { 413 - type = "text"; 414 - val = s; 415 - opts = 416 - { 417 - hl = "Keyword"; 418 - } 419 - // o; 420 - }; 421 - grp = g: { 422 - type = "group"; 423 - val = g; 424 - opts.spacing = 1; 425 - }; 426 - btn = { 427 - val, 428 - onClick, 429 - ... 430 - }: { 431 - type = "button"; 432 - inherit val; 433 - opts = o; 434 - on_press.__raw = "function() vim.cmd[[${onClick}]] end"; 435 - }; 436 - cmd = { 437 - command, 438 - width, 439 - height, 440 - }: { 441 - type = "terminal"; 442 - inherit command width height; 443 - opts = o; 444 - }; 445 - pad = { 446 - type = "padding"; 447 - val = 2; 448 - }; 449 - in 450 - [ 451 - pad 452 - pad 453 - ] 454 - ++ (lib.intersperse pad [ 455 - (cmd { 456 - command = '' 457 - ${pkgs.toilet}/bin/toilet " NIXVIM " -f mono12 -F border | ${pkgs.lolcat}/bin/lolcat -f 458 - ''; 459 - # Hardcoding to prevent IFD 460 - width = 83; # (builtins.stringLength (lib.trim (builtins.elemAt (lib.splitString "\n" bannerText) 1))) - 3; 461 - height = 12; # (builtins.length (lib.splitString "\n" bannerText)) - 1; 462 - }) 463 - (grp [ 464 - (btn { 465 - val = " Terminal"; 466 - onClick = "ToggleTerm"; 467 - }) 468 - (btn { 469 - val = "󰅙 Quit"; 470 - onClick = "q"; 471 - }) 472 - ]) 473 - (grp [ 474 - (txt " Neovim Version ${pkgs.neovim.version}") 475 - (txt " NixVim Rev ${builtins.substring 0 5 inputs.nixvim.rev}") 476 - ]) 477 - ]) 478 - ++ [pad]; 479 - }; 480 - 481 - trouble = { 482 - enable = true; 483 - }; 484 - 485 - toggleterm = { 486 - enable = true; 487 - luaConfig.post = '' 488 - local flatten = require('flatten') 489 - 490 - ---@type Terminal? 491 - local saved_terminal 492 - 493 - flatten.setup({ 494 - hooks = { 495 - should_block = function(argv) 496 - return vim.tbl_contains(argv, "-b") 497 - end, 498 - pre_open = function() 499 - local term = require("toggleterm.terminal") 500 - local termid = term.get_focused_id() 501 - saved_terminal = term.get(termid) 502 - end, 503 - post_open = function(opts) 504 - if saved_terminal then 505 - saved_terminal:close() 506 - else 507 - vim.api.nvim_set_current_win(opts.winnr) 508 - end 509 - 510 - if opts.filetype == "gitcommit" or opts.filetype == "gitrebase" then 511 - vim.api.nvim_create_autocmd("BufWritePost", { 512 - buffer = opts.bufnr, 513 - once = true, 514 - callback = vim.schedule_wrap(function() 515 - require('bufdelete').bufdelete(opts.bufnr, true) 516 - end), 517 - }) 518 - end 519 - end, 520 - block_end = function() 521 - vim.schedule(function() 522 - if saved_terminal then 523 - saved_terminal:open() 524 - saved_terminal = nil 525 - end 526 - end) 527 - end, 528 - }, 529 - window = { 530 - open = "alternate", 531 - }, 532 - }) 533 - ''; 534 - settings = { 535 - size = 20; 536 - open_mapping = "[[<C-x>]]"; 537 - direction = "horizontal"; 538 - start_in_insert = true; 539 - insert_mappings = true; 540 - terminal_mappings = true; 541 - }; 542 - }; 543 - 544 - treesitter = { 545 - enable = true; 546 - luaConfig.post = '' 547 - require('mdx').setup() 548 - ''; 549 - settings = { 550 - highlight.enable = true; 551 - }; 552 - }; 553 - 554 - illuminate.enable = true; 555 - cursorline.enable = true; 556 - 557 - neocord = { 558 - enable = true; 559 - settings.logo = "https://raw.githubusercontent.com/IogaMaster/neovim/main/.github/assets/nixvim-dark.webp"; 560 - }; 561 - 562 - bufdelete.enable = true; 563 - 564 - bufferline = { 565 - enable = true; 566 - settings.highlights.__raw = '' 567 - require("catppuccin.special.bufferline").get_theme() 568 - ''; 569 - settings.options = { 570 - indicator.style = "none"; 571 - show_buffer_close_icons = false; 572 - show_close_icon = false; 573 - offsets = [ 574 - { 575 - filetype = "neo-tree"; 576 - highlight = "String"; 577 - text = " Neovim"; 578 - text_align = "center"; 579 - # separator = true; 580 - } 581 - ]; 582 - separator_style = "slant"; 583 - close_command.__raw = ''require('bufdelete').bufdelete''; 584 - hover = { 585 - enabled = true; 586 - delay = 150; 587 - reveal = ["close"]; 588 - }; 589 - sort_by = "insert_at_end"; 590 - diagnostics = "nvim_lsp"; 591 - diagnostics_indicator.__raw = '' 592 - function(count, level, diagnostics_dict, context) 593 - local icon = level:match("error") and " " or " " 594 - return " " .. icon .. count 595 - end 596 - ''; 597 - }; 598 - }; 599 - 600 - statuscol = { 601 - enable = true; 602 - settings.segments = let 603 - dispCond = { 604 - __raw = '' 605 - function(ln) 606 - return vim.bo.filetype ~= "neo-tree" 607 - end 608 - ''; 609 - }; 610 - in [ 611 - { 612 - click = "v:lua.ScSa"; 613 - condition = [ 614 - dispCond 615 - ]; 616 - text = [ 617 - "%s" 618 - ]; 619 - } 620 - { 621 - click = "v:lua.ScLa"; 622 - condition = [dispCond]; 623 - text = [ 624 - { 625 - __raw = "require('statuscol.builtin').lnumfunc"; 626 - } 627 - ]; 628 - } 629 - { 630 - click = "v:lua.ScFa"; 631 - condition = [ 632 - dispCond 633 - { 634 - __raw = "require('statuscol.builtin').not_empty"; 635 - } 636 - ]; 637 - text = [ 638 - { 639 - __raw = "require('statuscol.builtin').foldfunc"; 640 - } 641 - " " 642 - ]; 643 - } 644 - ]; 645 - }; 646 - 647 - dropbar = { 648 - enable = true; 649 - settings = { 650 - bar.padding.right = 5; 651 - bar.padding.left = 1; 652 - }; 653 - }; 654 - 655 - nvim-ufo = { 656 - enable = true; 657 - }; 658 - gitsigns.enable = true; 659 - 660 - lualine = { 661 - enable = true; 662 - settings = { 663 - extensions = [ 664 - "trouble" 665 - "toggleterm" 666 - ]; 667 - 668 - options = { 669 - theme = "catppuccin"; 670 - disabled_filetypes = ["neo-tree"]; 671 - ignore_focus = ["neo-tree"]; 672 - }; 673 - }; 674 - }; 675 - 676 - nix-develop = { 677 - enable = true; 678 - package = pkgs.vimPlugins.nix-develop-nvim.overrideAttrs ( 679 - prev: next: { 680 - src = pkgs.fetchFromGitHub { 681 - owner = "Bwc9876"; 682 - repo = "nix-develop.nvim"; 683 - rev = "089cd52191ccbb3726594e21cd96567af6088dd5"; 684 - sha256 = "sha256-EIEJk8/IAuG+UICUJ2F8QakgRpFrQ1ezDSJ79NAVuD8="; 685 - }; 686 - } 687 - ); 688 - }; 689 - 690 - neo-tree = { 691 - enable = true; 692 - settings = { 693 - hide_root_node = false; 694 - add_blank_line_at_top = true; 695 - default_component_configs = { 696 - container.right_padding = 2; 697 - name.trailing_slash = true; 698 - indent = { 699 - indent_size = 2; 700 - with_expanders = true; 701 - }; 702 - }; 703 - window.width = 40; 704 - auto_clean_after_session_restore = true; 705 - close_if_last_window = true; 706 - filesystem.components.name.__raw = '' 707 - function(config, node, state) 708 - local components = require('neo-tree.sources.common.components') 709 - local name = components.name(config, node, state) 710 - if node:get_depth() == 1 then 711 - name.text = vim.fs.basename(vim.loop.cwd() or "") .. "/" 712 - end 713 - return name 714 - end 715 - ''; 716 - }; 717 - }; 718 - 719 - image = { 720 - luaConfig = { 721 - pre = "if not vim.g.neovide then"; 722 - post = "end"; 723 - }; 724 - enable = true; 725 - }; 726 - web-devicons.enable = true; 727 - 728 - guess-indent.enable = true; 729 - intellitab.enable = true; 730 - 731 - which-key = { 732 - enable = true; 733 - settings = { 734 - show_help = true; 735 - preset = "modern"; 736 - win.wo.winblend = 8; 737 - }; 738 - }; 739 - 740 - fidget = { 741 - enable = true; 742 - settings.notification = { 743 - override_vim_notify = true; 744 - window = { 745 - y_padding = 2; 746 - x_padding = 2; 747 - zindex = 50; 748 - align = "top"; 749 - winblend = 0; 750 - }; 751 - }; 752 - }; 753 - 754 - # none-ls = { 755 - # enable = true; 756 - # sources.formatting = { 757 - # prettier = { 758 - # enable = true; 759 - # disableTsServerFormatter = true; 760 - # }; 761 - # yamlfmt.enable = true; 762 - # typstyle.enable = true; 763 - # markdownlint.enable = true; 764 - # }; 765 - # sources.diagnostics = { 766 - # markdownlint.enable = true; 767 - # }; 768 - # }; 769 - 770 - cmp = { 771 - enable = true; 772 - settings = { 773 - sources = map (name: {inherit name;}) [ 774 - "nvim_lsp" 775 - "nvim_lsp_signature_help" 776 - "path" 777 - "buffer" 778 - ]; 779 - mapping = { 780 - "<Esc>" = "cmp.mapping.abort()"; 781 - "<Tab>" = "cmp.mapping.confirm({ select = true })"; 782 - "<Up>" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})"; 783 - "<Down>" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})"; 784 - }; 785 - }; 786 - }; 787 - 788 - cmp-nvim-lsp.enable = true; 789 - cmp-nvim-lsp-document-symbol.enable = true; 790 - cmp-spell.enable = true; 791 - 792 - rainbow-delimiters.enable = true; 793 - preview.enable = true; 794 - 795 - # jupytext.enable = true; 796 - 797 - # Broken 798 - # hex = { 799 - # enable = true; 800 - # settings = { 801 - # assemble_cmd = "xxd -r"; 802 - # dump_cmd = "xxd -g 1 -u"; 803 - # }; 804 - # }; 805 - 806 - conform-nvim = { 807 - enable = true; 808 - settings.default_format_opts = { 809 - lsp_format = "prefer"; 810 - }; 811 - # Taken from https://github.com/stevearc/conform.nvim/blob/master/doc/recipes.md#format-command 812 - luaConfig.post = '' 813 - vim.api.nvim_create_user_command("Format", function(args) 814 - local range = nil 815 - if args.count ~= -1 then 816 - local end_line = vim.api.nvim_buf_get_lines(0, args.line2 - 1, args.line2, true)[1] 817 - range = { 818 - start = { args.line1, 0 }, 819 - ["end"] = { args.line2, end_line:len() }, 820 - } 821 - end 822 - require("conform").format({ async = true, lsp_format = "fallback", range = range }) 823 - end, { range = true }) 824 - ''; 825 - }; 826 - 827 - lspconfig.enable = true; 828 - 829 - lspsaga = { 830 - enable = true; 831 - settings = { 832 - symbol_in_winbar.enable = false; 833 - implement.enable = false; 834 - lightbulb.enable = false; 835 - ui = { 836 - code_action = "󰛨"; 837 - actionfix = "󰖷"; 838 - }; 839 - hover = { 840 - openCmd = "!xdg-open"; 841 - openLink = "<leader>o"; 842 - maxWidth = 0.5; 843 - maxHeight = 0.4; 844 - }; 845 - rename.autoSave = true; 846 - finder = { 847 - keys.close = "<ESC>"; 848 - }; 849 - codeAction.keys.quit = "<ESC>"; 850 - }; 851 - }; 852 - 853 - crates.enable = true; 854 - 855 - numbertoggle.enable = true; 856 - 857 - # rustaceanvim.enable = true; 858 - vim-css-color.enable = true; 859 - }; 860 - 861 - lsp = { 862 - inlayHints.enable = true; 863 - 864 - servers = { 865 - clangd.enable = true; 866 - astro.enable = true; 867 - hls = { 868 - enable = true; 869 - # ghcPackage = pkgs.haskell.compiler.ghc912; 870 - package = pkgs.haskell.packages.ghc912.haskell-language-server; 871 - }; 872 - sqls.enable = true; 873 - mdx_analyzer = { 874 - enable = true; 875 - package = pkgs.mdx-language-server; 876 - }; 877 - # denols.enable = true; 878 - ts_ls.enable = true; 879 - html.enable = true; 880 - marksman.enable = true; 881 - cssls.enable = true; 882 - tailwindcss.enable = true; # Disabled until it doesn't build nodejs from source, bad tailwind 883 - jsonls.enable = true; 884 - yamlls.enable = true; 885 - ruff.enable = true; 886 - csharp_ls.enable = true; 887 - svelte.enable = true; 888 - nil_ls.enable = true; 889 - bashls.enable = true; 890 - nushell.enable = true; 891 - taplo.enable = true; 892 - typos_lsp.enable = true; 893 - rust_analyzer = { 894 - enable = true; 895 - package = pkgs.rust-analyzer-nightly; 896 - packageFallback = true; 897 - }; 898 - lemminx.enable = true; 899 - eslint.enable = true; 900 - tinymist.enable = true; 901 - just.enable = true; 902 - }; 903 - }; 904 - }; 905 - }; 906 - }
-9
oldNixosModules/dev/python.nix
··· 1 - {pkgs, ...}: { 2 - environment.systemPackages = with pkgs; [ 3 - python3 4 - poetry 5 - pipenv 6 - uv 7 - black 8 - ]; 9 - }
-23
oldNixosModules/dev/rust.nix
··· 1 - { 2 - pkgs, 3 - inputs, 4 - ... 5 - }: { 6 - nixpkgs.overlays = [ 7 - inputs.fenix.overlays.default 8 - ]; 9 - 10 - environment.systemPackages = with pkgs; [ 11 - (pkgs.fenix.complete.withComponents [ 12 - "cargo" 13 - "clippy" 14 - "rust-src" 15 - "rustc" 16 - "rustfmt" 17 - ]) 18 - rust-analyzer-nightly 19 - cargo-tauri 20 - mprocs 21 - evcxr 22 - ]; 23 - }
-5
oldNixosModules/flatpak.nix
··· 1 - {pkgs, ...}: { 2 - services.flatpak.enable = true; 3 - xdg.portal.enable = true; 4 - environment.systemPackages = with pkgs; [flatpak-builder]; 5 - }
-12
oldNixosModules/fun+graphics.nix
··· 1 - {pkgs, ...}: { 2 - environment.systemPackages = with pkgs; [ 3 - xcowsay 4 - tuxpaint 5 - ]; 6 - 7 - home-manager.users.bean.home.file."tuxpaintrc".text = '' 8 - fullscreen=native 9 - startblank=yes 10 - autosave=yes 11 - ''; 12 - }
-36
oldNixosModules/fun.nix
··· 1 - {pkgs, ...}: { 2 - environment.systemPackages = with pkgs; [ 3 - hyfetch 4 - fastfetch 5 - lolcat 6 - cowsay 7 - kittysay 8 - toilet 9 - gay 10 - pipes-rs 11 - ]; 12 - 13 - home-manager.users.bean.programs.nushell.shellAliases = { 14 - screensaver = "pipes-rs -k curved -p 10 --fps 30"; 15 - neofetch = "hyfetch"; 16 - }; 17 - 18 - home-manager.users.bean.programs.hyfetch = { 19 - enable = true; 20 - settings = { 21 - backend = "fastfetch"; 22 - color_align = { 23 - custom_colors = []; 24 - fore_back = null; 25 - mode = "horizontal"; 26 - }; 27 - distro = null; 28 - light_dark = "dark"; 29 - lightness = 0.65; 30 - mode = "rgb"; 31 - preset = "interprogress"; 32 - pride_month_disable = false; 33 - pride_month_shown = []; 34 - }; 35 - }; 36 - }
-18
oldNixosModules/games+graphics.nix
··· 1 - {pkgs, ...}: { 2 - programs.steam = { 3 - enable = true; 4 - remotePlay.openFirewall = true; 5 - dedicatedServer.openFirewall = true; 6 - localNetworkGameTransfers.openFirewall = true; 7 - extest.enable = true; 8 - }; 9 - 10 - programs.gamescope.enable = true; 11 - 12 - environment.systemPackages = with pkgs; [ 13 - prismlauncher 14 - owmods-gui 15 - owmods-cli 16 - # cemu 17 - ]; 18 - }
-168
oldNixosModules/graphics/apps.nix
··· 1 - {pkgs, ...}: { 2 - # Desktop entry to launch htop 3 - home-manager.users.bean.xdg.dataFile."applications/htop.desktop".text = '' 4 - [Desktop Entry] 5 - Type=Application 6 - Name=Htop 7 - Exec=wezterm start --class="htop" htop 8 - Icon=htop 9 - ''; 10 - 11 - environment.wordlist.enable = true; 12 - 13 - home-manager.users.bean.xdg.configFile = { 14 - # "Nickvision Cavalier/cava_config".text = '' 15 - # [general] 16 - # framerate = 144 17 - # bars = 100 18 - # autosens = 1 19 - # sensitivity = 100 20 - # [input] 21 - # method = pulse 22 - # [output] 23 - # method = raw 24 - # raw_target = /dev/stdout 25 - # bit_format = 16bit 26 - # channels = stereo 27 - # [smoothing] 28 - # monstercat = 1 29 - # noise_reduction = 77 30 - # ''; 31 - # 32 - # "Nickvision Cavalier/config.json".text = 33 - # builtins.toJSON 34 - # { 35 - # ActiveProfile = 0; 36 - # AreaMargin = 40; 37 - # AreaOffsetX = 0; 38 - # AreaOffsetY = 0; 39 - # AutohideHeader = false; 40 - # Autosens = true; 41 - # BarPairs = 50; 42 - # BgImageAlpha = 1; 43 - # BgImageIndex = -1; 44 - # BgImageScale = 1; 45 - # Borderless = true; 46 - # ColorProfiles = [ 47 - # { 48 - # BgColors = ["#ff000000"]; 49 - # FgColors = ["#ffa51d2d" "#ffff7800" "#fff8e45c" "#ff2ec27e" "#ff1c71d8" "#ffdc8add"]; 50 - # Name = "Default"; 51 - # Theme = 1; 52 - # } 53 - # ]; 54 - # Direction = 1; 55 - # FgImageAlpha = 1; 56 - # FgImageIndex = -1; 57 - # FgImageScale = 1; 58 - # Filling = true; 59 - # Framerate = 144; 60 - # InnerRadius = 0.5; 61 - # ItemsOffset = 0.1; 62 - # ItemsRoundness = 0.5; 63 - # LinesThickness = 5; 64 - # Mirror = 0; 65 - # Mode = 3; 66 - # Monstercat = true; 67 - # NoiseReduction = 0.77; 68 - # ReverseMirror = false; 69 - # ReverseOrder = true; 70 - # Rotation = 0; 71 - # Sensitivity = 10; 72 - # SharpCorners = true; 73 - # ShowControls = true; 74 - # Stereo = true; 75 - # WindowHeight = 300; 76 - # WindowMaximized = true; 77 - # WindowWidth = 500; 78 - # }; 79 - 80 - "htop/htoprc".text = '' 81 - htop_version=3.3.0 82 - config_reader_min_version=3 83 - fields=0 3 2 18 46 47 39 1 84 - hide_kernel_threads=1 85 - hide_userland_threads=0 86 - hide_running_in_container=0 87 - shadow_other_users=0 88 - show_thread_names=1 89 - show_program_path=0 90 - highlight_base_name=1 91 - highlight_deleted_exe=0 92 - shadow_distribution_path_prefix=0 93 - highlight_megabytes=1 94 - highlight_threads=1 95 - highlight_changes=0 96 - highlight_changes_delay_secs=5 97 - find_comm_in_cmdline=1 98 - strip_exe_from_cmdline=1 99 - show_merged_command=0 100 - header_margin=1 101 - screen_tabs=1 102 - detailed_cpu_time=0 103 - cpu_count_from_one=1 104 - show_cpu_usage=1 105 - show_cpu_frequency=0 106 - show_cpu_temperature=1 107 - degree_fahrenheit=0 108 - update_process_names=0 109 - account_guest_in_cpu_meter=1 110 - color_scheme=0 111 - enable_mouse=1 112 - delay=15 113 - hide_function_bar=0 114 - header_layout=two_67_33 115 - column_meters_0=System Hostname Date Clock Uptime Tasks CPU AllCPUs4 MemorySwap 116 - column_meter_modes_0=2 2 2 2 2 2 2 1 1 117 - column_meters_1=DiskIO DiskIO Blank NetworkIO NetworkIO 118 - column_meter_modes_1=2 3 2 2 3 119 - tree_view=0 120 - sort_key=46 121 - tree_sort_key=0 122 - sort_direction=-1 123 - tree_sort_direction=1 124 - tree_view_always_by_pid=0 125 - all_branches_collapsed=0 126 - screen:Main=PID PPID STATE NICE PERCENT_CPU PERCENT_MEM M_RESIDENT Command 127 - .sort_key=PERCENT_CPU 128 - .tree_sort_key=PID 129 - .tree_view_always_by_pid=0 130 - .tree_view=0 131 - .sort_direction=-1 132 - .tree_sort_direction=1 133 - .all_branches_collapsed=0 134 - screen:Tree=PID PPID PGRP PROCESSOR TTY USER SESSION Command 135 - .sort_key=PID 136 - .tree_sort_key=PID 137 - .tree_view_always_by_pid=0 138 - .tree_view=1 139 - .sort_direction=1 140 - .tree_sort_direction=1 141 - .all_branches_collapsed=0 142 - screen:I/O=PID PPID IO_READ_RATE IO_WRITE_RATE Command 143 - .sort_key=IO_RATE 144 - .tree_sort_key=PID 145 - .tree_view_always_by_pid=0 146 - .tree_view=0 147 - .sort_direction=-1 148 - .tree_sort_direction=1 149 - .all_branches_collapsed=0 150 - ''; 151 - }; 152 - 153 - environment.systemPackages = with pkgs; [ 154 - # Office 155 - libreoffice-qt6 156 - 157 - ## Media 158 - obs-studio 159 - loupe 160 - inkscape 161 - lorien 162 - cavalier 163 - zoom-us 164 - 165 - ## 3D 166 - # prusa-slicer 167 - ]; 168 - }
-40
oldNixosModules/graphics/audio.nix
··· 1 - {pkgs, ...}: { 2 - # When you squint and don't think about it, audio is graphics (I don't wanna make another role bc why would I do that) 3 - services.pulseaudio.enable = false; 4 - 5 - security.rtkit.enable = true; # Allows pipewire and friends to run realtime 6 - 7 - environment.systemPackages = with pkgs; [ 8 - playerctl 9 - ]; 10 - 11 - services.playerctld.enable = true; 12 - 13 - # Used for SDR control, I don't need it rn 14 - # hardware.rtl-sdr.enable = true; 15 - # users.users.bean.extraGroups = ["plugdev"]; 16 - 17 - home-manager.users.bean.wayland.windowManager.hyprland.settings = { 18 - bindl = [ 19 - ",XF86AudioPlay,exec,playerctl play-pause" 20 - ",XF86AudioPause,exec,playerctl pause" 21 - ",XF86AudioStop,exec,playerctl stop" 22 - ",XF86AudioNext,exec,playerctl next" 23 - ",XF86AudioPrev,exec,playerctl previous" 24 - ]; 25 - bindel = [ 26 - ",XF86AudioRaiseVolume,exec,uwsm app -- swayosd-client --output-volume raise" 27 - ",XF86AudioLowerVolume,exec,uwsm app -- swayosd-client --output-volume lower" 28 - ",XF86AudioMute,exec,uwsm app -- swayosd-client --output-volume mute-toggle" 29 - ]; 30 - }; 31 - 32 - services.pipewire = { 33 - enable = true; 34 - pulse.enable = true; 35 - alsa = { 36 - enable = true; 37 - support32Bit = true; 38 - }; 39 - }; 40 - }
-366
oldNixosModules/graphics/firefox.nix
··· 1 - { 2 - lib, 3 - pkgs, 4 - ... 5 - }: let 6 - package = pkgs.firefox-devedition; 7 - in { 8 - environment.systemPackages = [ 9 - package 10 - ]; 11 - 12 - services.searx = { 13 - enable = true; 14 - redisCreateLocally = true; 15 - settings = { 16 - ui = { 17 - query_in_title = true; 18 - infinite_scroll = true; 19 - theme_args.simple_style = "black"; 20 - }; 21 - 22 - search = { 23 - autocomplete = "duckduckgo"; 24 - favicon_resolver = "duckduckgo"; 25 - }; 26 - 27 - server = { 28 - base_address = "http://localhost:6009"; 29 - bind_address = "127.0.0.1"; 30 - port = "6009"; 31 - method = "GET"; 32 - secret_key = "idontreallythinkineedtokeepthisasecrettbh"; 33 - }; 34 - 35 - plugins = lib.mapAttrs' (k: v: lib.nameValuePair "searx.plugins.${k}.SXNGPlugin" v) { 36 - calculator.active = true; 37 - hash_plugin.active = true; 38 - self_info.active = true; 39 - tracker_url_remover.active = true; 40 - unit_converter.active = true; 41 - ahmia_filter.active = false; 42 - oa_doi_rewrite.active = true; 43 - }; 44 - }; 45 - 46 - faviconsSettings.favicons = { 47 - cfg_schema = 1; 48 - cache = { 49 - db_url = "/var/cache/searx/faviconcache.db"; 50 - HOLD_TIME = 5184000; 51 - LIMIT_TOTAL_BYTES = 1073741824; 52 - BLOB_MAX_BYTES = 40960; 53 - MAINTENANCE_MODE = "auto"; 54 - MAINTENANCE_PERIOD = 600; 55 - }; 56 - }; 57 - }; 58 - 59 - home-manager.users.bean = { 60 - programs.firefox = { 61 - inherit package; 62 - enable = true; 63 - 64 - policies = { 65 - DisableTelemetry = true; 66 - DisableFirefoxStudies = true; 67 - DisableSetDesktopBackground = true; 68 - DontCheckDefaultBrowser = true; 69 - AppAutoUpdate = false; 70 - DNSOverHTTPS.Enabled = true; 71 - ShowHomeButton = true; 72 - DisplayBookmarksToolbar = "always"; 73 - DisableProfileImport = true; 74 - DisablePocket = true; 75 - DisableFirefoxAccounts = true; 76 - OfferToSaveLoginsDefault = false; 77 - OverrideFirstRunPage = ""; 78 - NoDefaultBookmarks = true; 79 - PasswordManagerEnabled = false; 80 - SearchBar = "unified"; 81 - EncryptedMediaExtensions = true; 82 - 83 - EnableTrackingProtection = { 84 - Value = true; 85 - Locked = true; 86 - Cryptomining = true; 87 - Fingerprinting = true; 88 - EmailTracking = true; 89 - }; 90 - 91 - Preferences = let 92 - lock = val: { 93 - Value = val; 94 - Status = "locked"; 95 - }; 96 - in { 97 - # General 98 - "browser.aboutConfig.showWarning" = lock false; 99 - "media.eme.enabled" = lock true; # Encrypted Media Extensions (DRM) 100 - "layout.css.prefers-color-scheme.content-override" = lock 0; 101 - "browser.startup.page" = 3; # Restore previous session 102 - "toolkit.telemetry.server" = lock ""; 103 - 104 - # New Tab 105 - "browser.newtabpage.activity-stream.showSponsored" = lock false; 106 - "browser.newtabpage.activity-stream.system.showSponsored" = lock false; 107 - "browser.newtabpage.activity-stream.feeds.section.topstories" = lock false; 108 - "browser.newtabpage.activity-stream.feeds.topsites" = lock false; 109 - "browser.newtabpage.activity-stream.showSponsoredTopSites" = lock false; 110 - "browser.newtabpage.activity-stream.showWeather" = lock false; 111 - "browser.newtabpage.activity-stream.system.showWeather" = lock false; 112 - "browser.newtabpage.activity-stream.feeds.weatherfeed" = lock false; 113 - "browser.newtabpage.activity-stream.feeds.telemetry" = lock false; 114 - "browser.newtabpage.activity-stream.telemetry" = lock false; 115 - "browser.newtabpage.activity-stream.telemetry.structuredIngestion.endpoint" = lock ""; 116 - "browser.newtabpage.pinned" = lock []; 117 - "browser.newtabpage.activity-stream.improvesearch.topSiteSearchShortcuts.havePinned" = lock ""; 118 - "browser.urlbar.suggest.weather" = lock false; 119 - "browser.urlbar.quicksuggest.scenario" = lock "offline"; 120 - "browser.urlbar.suggest.quicksuggest.nonsponsored" = lock false; 121 - "browser.urlbar.suggest.quicksuggest.sponsored" = lock false; 122 - 123 - # Devtools 124 - "devtools.theme" = lock "dark"; 125 - "devtools.dom.enabled" = lock true; 126 - "devtools.command-button-rulers.enabled" = lock true; 127 - "devtools.command-button-measure.enabled" = lock true; 128 - "devtools.command-button-screenshot.enabled" = lock true; 129 - "devtools.toolbox.host" = lock "right"; 130 - "devtools.webconsole.persistlog" = lock true; 131 - "devtools.webconsole.timestampMessages" = lock true; 132 - 133 - # Privacy 134 - "dom.private-attribution.submission.enabled" = lock false; 135 - "privacy.globalprivacycontrol.enabled" = lock true; 136 - 137 - # ML 138 - "browser.ml.enable" = lock false; 139 - "browser.ml.linkPreview.enabled" = lock false; 140 - "browser.ml.pageAssist.enabled" = lock false; 141 - "browser.ml.chat.enabled" = lock false; 142 - "browser.ml.chat.menu" = lock false; 143 - "browser.ml.chat.page" = lock false; 144 - "browser.ml.chat.shortcuts" = lock false; 145 - "browser.ml.chat.sidebar" = lock false; 146 - }; 147 - 148 - Extensions.Install = 149 - map (x: "https://addons.mozilla.org/firefox/downloads/latest/${x}/latest.xpi") 150 - [ 151 - # Appearance 152 - "firefox-color" 153 - "material-icons-for-github" 154 - 155 - # Security / Privacy 156 - "facebook-container" 157 - 158 - ## Ads / Youtube 159 - "ublock-origin" 160 - "consent-o-matic" 161 - "sponsorblock" 162 - 163 - # Information 164 - "flagfox" 165 - "awesome-rss" 166 - "identfavicon-quantum" 167 - 168 - # Devtools 169 - "react-devtools" 170 - "open-graph-preview-and-debug" 171 - "wave-accessibility-tool" 172 - "styl-us" 173 - 174 - # Misc 175 - "keepassxc-browser" # integration with KeepassXC 176 - ]; 177 - 178 - ExtensionSettings."*" = { 179 - default_area = "menupanel"; 180 - }; 181 - }; 182 - profiles.dev-edition-default = { 183 - extensions = { 184 - force = true; 185 - settings = { 186 - "sponsorBlocker@ajay.app".settings.alreadyInstalled = true; 187 - "uBlock0@raymondhill.net".settings.selectedFilterLists = [ 188 - "ublock-filters" 189 - "ublock-badware" 190 - "ublock-privacy" 191 - "ublock-unbreak" 192 - "ublock-quick-fixes" 193 - ]; 194 - # Stylus 195 - "{7a7a4a92-a2a0-41d1-9fd7-1e92480d612d}".settings = { 196 - dbInChromeStorage = true; # required se DB is stored in state.js 197 - updateOnlyEnabled = true; 198 - patchCsp = true; 199 - instantInject = true; 200 - }; 201 - }; 202 - }; 203 - search = { 204 - force = true; 205 - default = "SearXNG"; 206 - privateDefault = "SearXNG"; 207 - engines = let 208 - mkEngineForceFavicon = aliases: queryUrl: iconUrl: { 209 - definedAliases = aliases; 210 - icon = iconUrl; 211 - urls = [{template = queryUrl;}]; 212 - }; 213 - mkEngine = aliases: queryUrl: iconExt: (mkEngineForceFavicon aliases queryUrl ( 214 - let 215 - noPath = lib.strings.concatStrings ( 216 - lib.strings.intersperse "/" (lib.lists.take 3 (lib.strings.splitString "/" queryUrl)) 217 - ); 218 - in "${noPath}/favicon.${iconExt}" 219 - )); 220 - in { 221 - # Meta 222 - "SearXNG" = mkEngine ["@sx" "@@"] "http://localhost:6009/search?q={searchTerms}" "ico"; 223 - 224 - # Dev 225 - "GitHub Repos" = 226 - mkEngineForceFavicon ["@gh" "@github"] 227 - "https://github.com/search?type=repositories&q={searchTerms}" 228 - "https://github.githubassets.com/favicons/favicon-dark.svg"; 229 - "SourceGraph" = mkEngine [ 230 - "@sg" 231 - "@sourcegraph" 232 - ] "https://sourcegraph.com/search?q={searchTerms}" "png"; 233 - 234 - ## Web 235 - "MDN Web Docs" = mkEngine [ 236 - "@mdn" 237 - ] "https://developer.mozilla.org/en-US/search?q={searchTerms}" "ico"; 238 - "Web.Dev" = 239 - mkEngineForceFavicon ["@webdev" "@lighthouse"] "https://web.dev/s/results?q={searchTerms}" 240 - "https://www.gstatic.com/devrel-devsite/prod/vc7080045e84cd2ce1faf7f7a3876037748d52d088e5100df2e949d051a784791/web/images/favicon.png"; 241 - "Can I Use" = mkEngineForceFavicon [ 242 - "@ciu" 243 - "@baseline" 244 - ] "https://caniuse.com/?search={searchTerms}" "https://caniuse.com/img/favicon-128.png"; 245 - "NPM" = 246 - mkEngineForceFavicon ["@npm"] "https://www.npmjs.com/search?q={searchTerms}" 247 - "https://static-production.npmjs.com/3dc95981de4241b35cd55fe126ab6b2c.png"; 248 - "Iconify" = mkEngine [ 249 - "@iconify" 250 - "@icons" 251 - ] "https://icon-sets.iconify.design/?query={searchTerms}" "ico"; 252 - "Astro" = mkEngineForceFavicon [ 253 - "@astro" 254 - ] "https://a.stro.cc/{searchTerms}" "https://docs.astro.build/favicon.svg"; 255 - "Porkbun" = mkEngine ["@porkbun"] "https://porkbun.com/checkout/search?q={searchTerms}" "ico"; 256 - "Http.Cat" = mkEngine ["@cat" "@hcat" "@httpcat"] "https://http.cat/{searchTerms}" "ico"; 257 - 258 - ## Rust 259 - "Crates.io" = mkEngine [ 260 - "@crates" 261 - "@cratesio" 262 - "@cargo" 263 - ] "https://crates.io/search?q={searchTerms}" "ico"; 264 - "Rust Docs" = 265 - mkEngineForceFavicon ["@rust" "@rustdocs" "@ruststd"] 266 - "https://doc.rust-lang.org/std/index.html?search={searchTerms}" 267 - "https://doc.rust-lang.org/static.files/favicon-2c020d218678b618.svg"; 268 - "Docsrs" = mkEngine ["@docsrs"] "https://docs.rs/releases/search?query={searchTerms}" "ico"; 269 - 270 - ## Python 271 - "PyPI" = mkEngineForceFavicon [ 272 - "@pypi" 273 - "@pip" 274 - ] "https://pypi.org/search/?q={searchTerms}" "https://pypi.org/static/images/favicon.35549fe8.ico"; 275 - 276 - ## .NET 277 - "NuGet" = mkEngine ["@nuget"] "https://www.nuget.org/packages?q={searchTerms}" "ico"; 278 - 279 - ## Linux Stuff 280 - "Kernel Docs" = mkEngine [ 281 - "@lnx" 282 - "@linux" 283 - "@kernel" 284 - ] "https://www.kernel.org/doc/html/latest/search.html?q={searchTerms}" "ico"; 285 - "Arch Wiki" = mkEngine [ 286 - "@aw" 287 - "@arch" 288 - ] "https://wiki.archlinux.org/index.php?title=Special%3ASearch&search={searchTerms}" "ico"; 289 - "Nerd Fonts" = 290 - mkEngineForceFavicon ["@nf" "@nerdfonts"] "https://www.nerdfonts.com/cheat-sheet?q={searchTerms}" 291 - "https://www.nerdfonts.com/assets/img/favicon.ico"; 292 - 293 - ### Haskell 294 - "Hoogle Base" = mkEngine [ 295 - "@h" 296 - "@hoogle" 297 - ] "https://hoogle.haskell.org/?scope=package%3Abase&hoogle={searchTerms}" "png"; 298 - "Hoogle All" = mkEngine [ 299 - "@ha" 300 - "@hoogall" 301 - ] "https://hoogle.haskell.org/?hoogle={searchTerms}" "png"; 302 - 303 - ### Nix 304 - "Nix Packages" = mkEngine [ 305 - "@nixpkgs" 306 - ] "https://search.nixos.org/packages?channel=unstable&size=500&query={searchTerms}" "png"; 307 - "NixOS Options" = mkEngine [ 308 - "@nixos" 309 - ] "https://search.nixos.org/options?channel=unstable&size=500&query={searchTerms}" "png"; 310 - "NixOS Wiki" = mkEngine ["@nixwiki"] "https://nixos.wiki/index.php?search={searchTerms}" "png"; 311 - "Home Manager Options" = 312 - mkEngineForceFavicon ["@hm"] 313 - "https://home-manager-options.extranix.com/?release=master&query={searchTerms}" 314 - "https://home-manager-options.extranix.com/images/favicon.png"; 315 - "Noogle" = mkEngine [ 316 - "@noogle" 317 - "@nixlib" 318 - ] "https://noogle.dev/q?limit=100&term={searchTerms}" "png"; 319 - "SourceGraph Nix" = 320 - mkEngine ["@sgn" "@yoink"] 321 - "https://sourcegraph.com/search?q=lang:Nix+-repo:NixOS/*+-repo:nix-community/*+{searchTerms}" 322 - "png"; 323 - "Nixpkgs Issues" = 324 - mkEngineForceFavicon ["@nixissues"] 325 - "https://github.com/NixOS/nixpkgs/issues?q=sort%3Aupdated-desc+is%3Aissue+is%3Aopen+{searchTerms}" 326 - "https://github.githubassets.com/favicons/favicon-dark.svg"; 327 - "NixVim Options" = 328 - mkEngineForceFavicon ["@nixvim"] 329 - "https://nix-community.github.io/nixvim/search/?option_scope=0&query={searchTerms}" 330 - "https://nix-community.github.io/nixvim/search/favicon.ico"; 331 - 332 - # Media 333 - "youtube" = mkEngine ["@yt"] "https://www.youtube.com/results?search_query={searchTerms}" "ico"; 334 - "Spotify" = 335 - mkEngineForceFavicon ["@sp" "@spotify"] "https://open.spotify.com/search/{searchTerms}" 336 - "https://open.spotifycdn.com/cdn/images/favicon16.1c487bff.png"; 337 - "Netflix" = mkEngine ["@nfx"] "https://www.netflix.com/search?q={searchTerms}" "ico"; 338 - "IMDb" = mkEngine ["@imdb"] "https://www.imdb.com/find?q={searchTerms}" "ico"; 339 - 340 - # Misc 341 - "Firefox Add-ons" = mkEngine [ 342 - "@addons" 343 - ] "https://addons.mozilla.org/en-US/firefox/search/?q={searchTerms}" "ico"; 344 - "Urban Dictionary" = mkEngine [ 345 - "@ud" 346 - "@urban" 347 - ] "https://www.urbandictionary.com/define.php?term={searchTerms}" "ico"; 348 - "Google Translate" = mkEngine [ 349 - "@translate" 350 - ] "https://translate.google.com/?sl=auto&tl=en&text={searchTerms}&op=translate" "ico"; 351 - 352 - # Overrides 353 - "History".metaData.alias = "@h"; 354 - "Bookmarks".metaData.alias = "@b"; 355 - "Tabs".metaData.alias = "@t"; 356 - "bing".metaData.hidden = true; 357 - "amazondotcom-us".metaData.alias = "@amz"; 358 - "google".metaData.alias = "@g"; 359 - "wikipedia".metaData.alias = "@w"; 360 - "ddg".metaData.alias = "@ddg"; 361 - }; 362 - }; 363 - }; 364 - }; 365 - }; 366 - }
-32
oldNixosModules/graphics/fonts.nix
··· 1 - {pkgs, ...}: { 2 - fonts = { 3 - packages = with pkgs; [ 4 - fira-code 5 - fira-go 6 - nerd-fonts.symbols-only 7 - noto-fonts-color-emoji 8 - unifont 9 - liberation_ttf 10 - ]; 11 - fontconfig = { 12 - enable = true; 13 - defaultFonts = let 14 - mainFonts = [ 15 - "FiraGO" 16 - "Symbols Nerd Font" 17 - ]; 18 - in { 19 - serif = mainFonts; 20 - sansSerif = mainFonts; 21 - monospace = [ 22 - "Fira Code" 23 - "Symbols Nerd Font" 24 - ]; 25 - emoji = [ 26 - "Noto Color Emoji" 27 - "Symbols Nerd Font" 28 - ]; 29 - }; 30 - }; 31 - }; 32 - }
-22
oldNixosModules/graphics/greeter.nix
··· 1 - { 2 - pkgs, 3 - config, 4 - lib, 5 - ... 6 - }: { 7 - services.greetd = { 8 - enable = true; 9 - settings = { 10 - default_session = let 11 - greeting = ''--greeting "Authenticate into ${lib.toUpper config.networking.hostName}"''; 12 - deCmd = pkgs.writeScript "start-session.sh" '' 13 - #!/usr/bin/env sh 14 - exec uwsm start ${pkgs.hyprland}/share/wayland-sessions/hyprland.desktop 15 - ''; 16 - cmd = ''--cmd "systemd-inhibit --what=handle-power-key:handle-lid-switch ${deCmd}"''; 17 - in { 18 - command = "${pkgs.tuigreet}/bin/tuigreet --remember --time ${greeting} ${cmd}"; 19 - }; 20 - }; 21 - }; 22 - }
-29
oldNixosModules/graphics/hypr.nix
··· 1 - {pkgs, ...}: { 2 - environment = { 3 - systemPackages = with pkgs; [ 4 - hyprpicker 5 - uwsm 6 - ]; 7 - variables = { 8 - NIXOS_OZONE_WL = "1"; 9 - _JAVA_AWT_WM_NONEREPARENTING = "1"; 10 - GDK_BACKEND = "wayland,x11"; 11 - ANKI_WAYLAND = "1"; 12 - MOZ_ENABLE_WAYLAND = "1"; 13 - XDG_SESSION_TYPE = "wayland"; 14 - SDL_VIDEODRIVER = "wayland"; 15 - CLUTTER_BACKEND = "wayland"; 16 - }; 17 - }; 18 - 19 - xdg.portal.extraPortals = with pkgs; [xdg-desktop-portal-gtk]; 20 - 21 - programs.hyprland = { 22 - enable = true; 23 - withUWSM = true; 24 - }; 25 - 26 - home-manager.users.bean = { 27 - wayland.systemd.target = "wayland-session@hyprland.desktop.target"; 28 - }; 29 - }
-115
oldNixosModules/graphics/lock.nix
··· 1 - {pkgs, ...}: { 2 - home-manager.users.bean = { 3 - catppuccin.hyprlock.useDefaultConfig = false; 4 - wayland.windowManager.hyprland.settings = { 5 - bind = [ 6 - "SUPER,L,exec,pidof hyprlock || hyprlock --immediate" 7 - ]; 8 - }; 9 - 10 - programs.hyprlock = { 11 - enable = true; 12 - 13 - settings = { 14 - background = { 15 - monitor = ""; 16 - path = "${../../res/pictures/background.png}"; 17 - blur_passes = 1; 18 - }; 19 - shape = [ 20 - { 21 - monitor = ""; 22 - color = "$crust"; 23 - position = "0, 30"; 24 - rounding = 10; 25 - border_size = 2; 26 - border_color = "$mauve"; 27 - size = "500, 500"; 28 - shadow_passes = 1; 29 - shadow_size = 2; 30 - } 31 - { 32 - monitor = ""; 33 - color = "$crust"; 34 - position = "0, -30"; 35 - rounding = 10; 36 - border_size = 2; 37 - border_color = "$mauve"; 38 - size = "600, 50"; 39 - valign = "top"; 40 - shadow_passes = 1; 41 - shadow_size = 2; 42 - } 43 - ]; 44 - image = { 45 - monitor = ""; 46 - path = "${../../res/pictures/cow.png}"; 47 - size = 150; 48 - rounding = -1; 49 - border_size = 4; 50 - border_color = "$mauve"; 51 - rotate = 0; 52 - position = "0, 120"; 53 - halign = "center"; 54 - valign = "center"; 55 - }; 56 - "input-field" = { 57 - monitor = ""; 58 - size = "250, 50"; 59 - outline_thickness = 2; 60 - dots_size = 0.25; # Scale of input-field height, 0.2 - 0.8 61 - dots_spacing = 0.15; # Scale of dots' absolute size, 0.0 - 1.0 62 - dots_center = false; 63 - dots_rounding = -1; # -1 default circle, -2 follow input-field rounding 64 - outer_color = "$surface0"; 65 - inner_color = "$base"; 66 - font_color = "$text"; 67 - fade_on_empty = false; 68 - fade_timeout = 1000; # Milliseconds before fade_on_empty is triggered. 69 - placeholder_text = ''<span foreground="##cdd6f4" style="italic">Password</span>''; 70 - hide_input = false; 71 - rounding = -1; # -1 means complete rounding (circle/oval) 72 - check_color = "$peach"; 73 - fail_color = "$red"; # if authentication failed, changes outer_color and fail message color 74 - fail_text = "<i>$FAIL <b>($ATTEMPTS)</b></i>"; 75 - fail_transition = 300; # transition time in ms between normal outer_color and fail_color 76 - capslock_color = -1; 77 - numlock_color = -1; 78 - bothlock_color = -1; # when both locks are active. -1 means don't change outer color (same for above) 79 - invert_numlock = false; # change color if numlock is off 80 - swap_font_color = false; # see below 81 - 82 - position = "0, -80"; 83 - halign = "center"; 84 - valign = "center"; 85 - }; 86 - label = [ 87 - { 88 - monitor = ""; 89 - text = "$DESC"; 90 - color = "$text"; 91 - font_size = 25; 92 - font_family = "sans-serif"; 93 - rotate = 0; # degrees, counter-clockwise 94 - 95 - position = "0, 0"; 96 - halign = "center"; 97 - valign = "center"; 98 - } 99 - { 100 - monitor = ""; 101 - text = ''cmd[update:30000] echo " $(date +"%A, %B %-d | %I:%M %p") | $(${pkgs.nushell}/bin/nu ${../../res/bat_display.nu}) "''; 102 - color = "$text"; 103 - font_size = 20; 104 - font_family = "sans-serif"; 105 - rotate = 0; # degrees, counter-clockwise 106 - 107 - position = "0, -40"; 108 - halign = "center"; 109 - valign = "top"; 110 - } 111 - ]; 112 - }; 113 - }; 114 - }; 115 - }
-357
oldNixosModules/graphics/news.nix
··· 1 - {pkgs, ...}: let 2 - yt-feed = id: { 3 - url = "https://www.youtube.com/feeds/videos.xml?channel_id=" + id; 4 - tags = [ 5 - "!" 6 - "youtube" 7 - ]; 8 - }; 9 - yt-subs = [ 10 - "UCa8W2_uf81Ew6gYuw0VPSeA" # Juxtaposed 11 - "UCMiyV_Ib77XLpzHPQH_q0qQ" # Veronica Explains 12 - "UC7_YxT-KID8kRbqZo7MyscQ" # Markiplier 13 - "UCUMwY9iS8oMyWDYIe6_RmoA" # No Boilerplate 14 - "UCRC6cNamj9tYAO6h_RXd5xA" # RTGame 15 - "UCYIwBA7mwDWnrckXs7gt76Q" # Snapcube 16 - "UCCHruaQlOKPHTl8iOPGDjFg" # Snapcube 2 (VODs) 17 - "UCL7DDQWP6x7wy0O6L5ZIgxg" # 2ndJerma 18 - "UC9z7EZAbkphEMg0SP7rw44A" # carykh 19 - "UCpmvp5czsIrQHsbqya4-6Jw" # Chad Chad 20 - "UC0e3QhIYukixgh5VVpKHH9Q" # Code Bullet 21 - "UCfPUcG3oCmXEYgdFuwlFh8w" # Dingo Doodles 22 - "UCsBjURrPoezykLs9EqgamOA" # Fireship 23 - "UCGwu0nbY2wSkW8N-cghnLpA" # Jaiden Animations 24 - "UClBNmmlREy6BD8PSTFBDyQg" # Kan Gao 25 - "UCm8EsftbfNzSiRHzc7I59KQ" # Kevin Faang 26 - "UCtHaxi4GTYDpJgMSGy7AeSw" # Michael Reeves 27 - "UCXq2nALoSbxLMehAvYTxt_A" # The Grumps 28 - "UCBa659QWEk1AI4Tg--mrJ2A" # Tom Scott 29 - "UCFLwN7vRu8M057qJF8TsBaA" # UpIsNotJump 30 - "UCPsSoOCRNIj-eo2UbXfcdAw" # xen 42 31 - "UCYBbrJH2H6tmQZ7VHyA_esA" # Saltydkdan 32 - "UCBZb-2BHvUtZ-WzrEj16lug" # Raicuparta 33 - "UCPDXXXJj9nax0fr0Wfc048g" # Dropout 34 - "UC8EYr_ArKMKaxfgRq-iCKzA" # WindowsG Electronics 35 - "UCJXa3_WNNmIpewOtCHf3B0g" # LaurieWired 36 - ]; 37 - in { 38 - environment.systemPackages = with pkgs; [ 39 - w3m 40 - rdrview 41 - ]; 42 - 43 - home-manager.users.bean = { 44 - xdg.dataFile."applications/newsboat.desktop".text = '' 45 - [Desktop Entry] 46 - Type=Application 47 - Name=newsboat 48 - Icon=newsboat 49 - ''; 50 - 51 - programs.newsboat = { 52 - enable = true; 53 - browser = ''"${../../res/news-open.nu} %u"''; 54 - 55 - # notify-program ${../res/news-notify.nu} 56 - 57 - extraConfig = '' 58 - confirm-mark-feed-read no 59 - confirm-mark-all-feeds-read no 60 - wrap-scroll yes 61 - text-width 90 62 - 63 - color listnormal color8 default 64 - color listnormal_unread default default 65 - color listfocus black green 66 - color listfocus_unread black green bold 67 - ''; 68 - 69 - queries = { 70 - "Youtube" = "tags # \"youtube\""; 71 - }; 72 - 73 - urls = 74 - [ 75 - { 76 - title = "Outer Wilds Mods"; 77 - url = "https://outerwildsmods.com/feed.xml"; 78 - tags = [ 79 - "dev" 80 - "outer-wilds" 81 - ]; 82 - } 83 - # { 84 - # title = "Philly Voice"; 85 - # url = "https://www.phillyvoice.com/feed/section/news/"; 86 - # tags = ["local"]; 87 - # } 88 - # { 89 - # title = "ChesCo"; 90 - # url = "https://www.mychesco.com/feed"; 91 - # tags = ["local"]; 92 - # } 93 - { 94 - title = "Mobius Digital"; 95 - url = "https://www.mobiusdigitalgames.com/news/feed"; 96 - tags = ["outer-wilds"]; 97 - } 98 - { 99 - title = "NixOS Blog"; 100 - url = "https://nixos.org/blog/feed.xml"; 101 - tags = [ 102 - "dev" 103 - "linux" 104 - "nixos" 105 - ]; 106 - } 107 - { 108 - title = "Linux Kernel Releases"; 109 - url = "https://www.kernel.org/feeds/kdist.xml"; 110 - tags = [ 111 - "dev" 112 - "linux" 113 - ]; 114 - } 115 - { 116 - title = "Linux Weekly News"; 117 - url = "https://lwn.net/headlines/newrss"; 118 - tags = [ 119 - "dev" 120 - "linux" 121 - ]; 122 - } 123 - { 124 - title = "Linux Kernel Planet"; 125 - url = "https://planet.kernel.org/rss20.xml"; 126 - tags = [ 127 - "dev" 128 - "linux" 129 - ]; 130 - } 131 - { 132 - title = "Free Desktop Planet"; 133 - url = "https://planet.freedesktop.org/atom.xml"; 134 - tags = [ 135 - "dev" 136 - "linux" 137 - ]; 138 - } 139 - { 140 - title = "KDE Blog"; 141 - url = "https://blogs.kde.org/index.xml"; 142 - tags = [ 143 - "dev" 144 - "linux" 145 - ]; 146 - } 147 - { 148 - title = "Cloudflare Blog"; 149 - url = "https://blog.cloudflare.com/rss"; 150 - tags = [ 151 - "dev" 152 - "security" 153 - ]; 154 - } 155 - { 156 - title = "Rust Blog"; 157 - url = "https://blog.rust-lang.org/feed.xml"; 158 - tags = [ 159 - "dev" 160 - "rust" 161 - ]; 162 - } 163 - { 164 - title = "Tauri Blog"; 165 - url = "https://tauri.app/blog/rss.xml"; 166 - tags = [ 167 - "dev" 168 - "rust" 169 - ]; 170 - } 171 - { 172 - title = "Node.js Blog"; 173 - url = "https://nodejs.org/en/feed/blog.xml"; 174 - tags = [ 175 - "dev" 176 - "web" 177 - ]; 178 - } 179 - { 180 - title = "V8 Blog"; 181 - url = "https://v8.dev/blog.atom"; 182 - tags = [ 183 - "dev" 184 - "web" 185 - ]; 186 - } 187 - { 188 - title = "Vite Blog"; 189 - url = "https://vitejs.dev/blog.rss"; 190 - tags = [ 191 - "dev" 192 - "web" 193 - ]; 194 - } 195 - { 196 - title = "React Blog"; 197 - url = "https://react.dev/rss.xml"; 198 - tags = [ 199 - "dev" 200 - "web" 201 - ]; 202 - } 203 - { 204 - title = "Astro JS"; 205 - url = "https://astro.build/rss.xml"; 206 - tags = [ 207 - "dev" 208 - "web" 209 - ]; 210 - } 211 - { 212 - title = "W3C Blog"; 213 - url = "https://www.w3.org/blog/feed/"; 214 - tags = [ 215 - "dev" 216 - "web" 217 - ]; 218 - } 219 - { 220 - title = "Mozilla Blog"; 221 - url = "https://blog.mozilla.org/en/feed/"; 222 - tags = [ 223 - "dev" 224 - "web" 225 - ]; 226 - } 227 - { 228 - title = "Mozilla Nightly Blog"; 229 - url = "https://blog.nightly.mozilla.org/feed/"; 230 - tags = [ 231 - "dev" 232 - "web" 233 - ]; 234 - } 235 - { 236 - title = "Mozilla Developer Network"; 237 - url = "https://developer.mozilla.org/en-US/blog/rss.xml"; 238 - tags = [ 239 - "dev" 240 - "web" 241 - ]; 242 - } 243 - { 244 - title = "Chrome Dev Blog"; 245 - url = "https://developer.chrome.com/static/blog/feed.xml"; 246 - tags = [ 247 - "dev" 248 - "web" 249 - ]; 250 - } 251 - { 252 - title = "Webkit Blog"; 253 - url = "https://webkit.org/feed/"; 254 - tags = [ 255 - "dev" 256 - "web" 257 - ]; 258 - } 259 - { 260 - title = "GitHub Blog"; 261 - url = "https://github.blog/feed/"; 262 - tags = [ 263 - "dev" 264 - "github" 265 - ]; 266 - } 267 - { 268 - title = "GitHub Status"; 269 - url = "https://www.githubstatus.com/history.rss"; 270 - tags = [ 271 - "dev" 272 - "github" 273 - ]; 274 - } 275 - { 276 - title = "Veronica Explains"; 277 - url = "https://vkc.sh/feed/"; 278 - tags = [ 279 - "linux" 280 - "personal-blog" 281 - ]; 282 - } 283 - { 284 - title = "Tom Scott Newsletter"; 285 - url = "https://www.tomscott.com/updates.xml"; 286 - tags = ["personal-blog"]; 287 - } 288 - { 289 - title = "Dave Eddy"; 290 - url = "https://blog.daveeddy.com/rss.xml"; 291 - tags = ["personal-blog"]; 292 - } 293 - { 294 - title = "Dylan Beattie"; 295 - url = "https://dylanbeattie.net/feed.xml"; 296 - tags = ["personal-blog"]; 297 - } 298 - { 299 - title = "Xe Iaso"; 300 - url = "https://xeiaso.net/blog.rss"; 301 - tags = ["personal-blog"]; 302 - } 303 - { 304 - title = "Anil Dash"; 305 - url = "https://www.anildash.com/feed.xml"; 306 - tags = ["personal-blog"]; 307 - } 308 - { 309 - title = "Ben Romer"; 310 - url = "https://www.cyborgcentral.net/feed"; 311 - tags = ["personal-blog"]; 312 - } 313 - { 314 - title = "HiDeoo"; 315 - url = "https://hideoo.dev/notes/rss.xml"; 316 - tags = ["personal-blog"]; 317 - } 318 - { 319 - title = "Kerkour"; 320 - url = "https://kerkour.com/feed.xml"; 321 - tags = ["personal-blog"]; 322 - } 323 - { 324 - title = "Avis"; 325 - url = "https://avris.it/blog.atom"; 326 - tags = ["personal-blog"]; 327 - } 328 - { 329 - title = "Scripting News"; 330 - url = "http://scripting.com/rss.xml"; 331 - tags = ["personal-blog"]; 332 - } 333 - { 334 - title = "XKCD"; 335 - url = "https://xkcd.com/rss.xml"; 336 - tags = ["personal-blog"]; 337 - } 338 - { 339 - title = "Framework Laptop"; 340 - url = "https://frame.work/blog.rss"; 341 - tags = ["hardware"]; 342 - } 343 - { 344 - title = "Ars Technica"; 345 - url = "https://arstechnica.com/feed/"; 346 - tags = ["tech"]; 347 - } 348 - { 349 - title = "Lobste"; 350 - url = "https://lobste.rs/rss"; 351 - tags = ["tech"]; 352 - } 353 - ] 354 - ++ (map yt-feed yt-subs); 355 - }; 356 - }; 357 - }
-25
oldNixosModules/graphics/printing.nix
··· 1 - {...}: { 2 - services.printing = { 3 - enable = true; 4 - stateless = true; 5 - }; 6 - 7 - users.users.bean.extraGroups = ["lpadmin"]; 8 - 9 - hardware.printers = { 10 - ensurePrinters = [ 11 - { 12 - name = "RamPrint"; 13 - description = "WCU RamPrint"; 14 - deviceUri = "https://wcuprintp01.wcupa.net:9164/printers/RamPrint"; 15 - model = "drv:///sample.drv/generic.ppd"; 16 - } 17 - { 18 - name = "FHG_IMC_Color"; 19 - description = "FHG IMC Color"; 20 - deviceUri = "https://wcuprintp01.wcupa.net:9164/printers/FHG_IMC_Color"; 21 - model = "drv:///sample.drv/generic.ppd"; 22 - } 23 - ]; 24 - }; 25 - }
-374
oldNixosModules/graphics/qmplay2.nix
··· 1 - { 2 - pkgs, 3 - lib, 4 - ... 5 - }: let 6 - mkQMPlayFile = lib.generators.toINI {}; 7 - mkConfigDir = files: 8 - lib.mapAttrs' ( 9 - name: value: lib.nameValuePair ("QMPlay2/" + name + ".ini") {text = mkQMPlayFile value;} 10 - ) 11 - files; 12 - in { 13 - environment.systemPackages = with pkgs; [ 14 - qmplay2 15 - ]; 16 - 17 - home-manager.users.bean.xdg.configFile = mkConfigDir { 18 - ALSA.General = { 19 - AutoFindMultichnDev = true; 20 - Delay = 0.1; 21 - OutputDevice = "default"; 22 - WriterEnabled = true; 23 - }; 24 - AudioCD.AudioCD = { 25 - CDDB = true; 26 - CDTEXT = true; 27 - }; 28 - AudioFilters = { 29 - General = { 30 - AVAudioFilter = false; 31 - BS2B = false; 32 - Compressor = false; 33 - Echo = false; 34 - Equalizer = false; 35 - PhaseReverse = false; 36 - SwapStereo = false; 37 - VoiceRemoval = false; 38 - }; 39 - 40 - AVAudioFilter.Filters = "@ByteArray()"; 41 - 42 - BS2B = { 43 - Fcut = 700; 44 - Feed = 4.5; 45 - }; 46 - 47 - Compressor = { 48 - FastGainCompressionRatio = 0.9; 49 - OverallCompressionRatio = 0.6; 50 - PeakPercent = 90; 51 - ReleaseTime = 0.2; 52 - }; 53 - 54 - Echo = { 55 - Delay = 500; 56 - Feedback = 50; 57 - Surround = false; 58 - Volume = 50; 59 - }; 60 - 61 - Equalizer = { 62 - "-1" = 50; 63 - "0" = 50; 64 - "1" = 50; 65 - "2" = 50; 66 - "3" = 50; 67 - "4" = 50; 68 - "5" = 50; 69 - "6" = 50; 70 - "7" = 50; 71 - count = 8; 72 - maxFreq = 18000; 73 - minFreq = 200; 74 - nbits = 10; 75 - }; 76 - 77 - PhaseReverse = { 78 - ReverseRight = false; 79 - }; 80 - }; 81 - CUVID.General = { 82 - DecodeMPEG4 = true; 83 - DeintMethod = 2; 84 - Enabled = true; 85 - }; 86 - Chiptune.General = { 87 - DefaultLength = 180; 88 - GME = true; 89 - SIDPlay = true; 90 - }; 91 - Extensions = { 92 - LastFM = { 93 - AllowBigCovers = true; 94 - DownloadCovers = true; 95 - Login = null; 96 - Password = null; 97 - UpdateNowPlayingAndScrobble = false; 98 - }; 99 - 100 - MPRIS2.Enabled = true; 101 - 102 - YouTube = { 103 - ShowUserName = false; 104 - SortBy = 0; 105 - Subtitles = true; 106 - }; 107 - }; 108 - FFmpeg.General = { 109 - AllowExperimental = true; 110 - DecoderEnabled = true; 111 - DecoderVAAPIEnabled = true; 112 - DecoderVkVideoEnabled = true; 113 - DemuxerEnabled = true; 114 - ForceSkipFrames = false; 115 - HurryUP = true; 116 - LowresValue = 0; 117 - ReconnectNetwork = true; 118 - SkipFrames = true; 119 - TeletextPage = 0; 120 - TeletextTransparent = false; 121 - ThreadTypeSlice = false; 122 - Threads = 0; 123 - VAAPIDeintMethod = 1; 124 - }; 125 - Modplug.General = { 126 - ModplugEnabled = true; 127 - ModplugResamplingMethod = 3; 128 - }; 129 - Notify.General = { 130 - CustomBody = null; 131 - CustomMsg = false; 132 - CustomSummary = null; 133 - Enabled = false; 134 - ShowPlayState = true; 135 - ShowTitle = true; 136 - ShowVolume = true; 137 - Timeout = 5000; 138 - }; 139 - Playlists.General = { 140 - M3U_enabled = true; 141 - XSPF_enabled = true; 142 - }; 143 - PulseAudio.General = { 144 - Delay = 0.1; 145 - WriterEnabled = true; 146 - }; 147 - QMPlay2 = { 148 - General = { 149 - AVBufferLocal = 100; 150 - AVBufferTimeNetwork = 500; 151 - AVBufferTimeNetworkLive = 5; 152 - AccurateSeek = 2; 153 - AllowOnlyOneInstance = false; 154 - AudioLanguage = null; 155 - AutoDelNonGroupEntries = false; 156 - AutoOpenVideoWindow = true; 157 - AutoRestoreMainWindowOnVideo = true; 158 - AutoUpdates = false; 159 - BackwardBuffer = 1; 160 - BlurCovers = true; 161 - Channels = 2; 162 - DisableSubtitlesAtStartup = false; 163 - DisplayOnlyFileName = false; 164 - EnlargeCovers = false; 165 - FallbackSubtitlesEncoding = "@ByteArray(UTF-8)"; 166 - ForceChannels = 0; 167 - ForceSamplerate = false; 168 - HideArtistMetadata = false; 169 - IconsFromTheme = true; 170 - IgnorePlaybackError = false; 171 - KeepARatio = false; 172 - KeepSpeed = false; 173 - KeepSubtitlesDelay = false; 174 - KeepSubtitlesScale = false; 175 - KeepVideoDelay = false; 176 - KeepZoom = false; 177 - LastQMPlay2Path = "${pkgs.qmplay2}/bin"; 178 - LeftMouseTogglePlay = 0; 179 - LongSeek = 30; 180 - MaxVol = 100; 181 - MiddleMouseToggleFullscreen = false; 182 - Mute = false; 183 - NoCoversCache = false; 184 - OutputFilePath = "/home/bean/Downloads"; 185 - PlayIfBuffered = 1.75; 186 - Renderer = "opengl"; 187 - RepeatMode = 0; 188 - ResamplerFirst = true; 189 - RestoreAVSState = false; 190 - RestoreRepeatMode = false; 191 - RestoreVideoEqualizer = false; 192 - Samplerate = 48000; 193 - SavePos = false; 194 - ShortSeek = 5; 195 - ShowBufferedTimeOnSlider = true; 196 - ShowCovers = true; 197 - ShowDirCovers = true; 198 - Silence = true; 199 - SkipPlaylistsWithinFiles = true; 200 - SkipYtDlpUpdate = false; 201 - StillImages = false; 202 - StoreARatioAndZoom = false; 203 - StoreUrlPos = true; 204 - Style = "kvantum"; 205 - SubtitlesLanguage = null; 206 - SyncVtoA = true; 207 - TrayNotifiesDefault = false; 208 - TrayVisible = true; 209 - UnpauseWhenSeeking = false; 210 - UpdateVersion = pkgs.qmplay2.version; 211 - Version = "@ByteArray(${pkgs.qmplay2.version})"; 212 - VideoFilters = "0FPS Doubler"; 213 - VolumeL = 100; 214 - VolumeR = 100; 215 - WheelAction = true; 216 - WheelSeek = true; 217 - screenshotFormat = ".png"; 218 - screenshotPth = "/home/bean/Pictures/Screenshots"; 219 - }; 220 - 221 - ApplyToASS = { 222 - ApplyToASS = false; 223 - ColorsAndBorders = true; 224 - FontsAndSpacing = false; 225 - MarginsAndAlignment = false; 226 - }; 227 - 228 - Deinterlace = { 229 - Auto = true; 230 - AutoParity = true; 231 - Doubler = true; 232 - ON = true; 233 - SoftwareMethod = ''Yadif 2x''; 234 - TFF = false; 235 - }; 236 - 237 - MainWidget = { 238 - AlwaysOnTop = false; 239 - CompactViewDockWidgetState = ''@ByteArray()''; 240 - DockWidgetState = ''@ByteArray()''; 241 - FullScreenDockWidgetState = ''@ByteArray()''; 242 - Geometry = ''@Rect(226 151 1805 1203)''; 243 - IsCompactView = false; 244 - KeepDocksSize = false; 245 - TabPositionNorth = false; 246 - WidgetsLocked = true; 247 - isMaximized = true; 248 - isVisible = true; 249 - }; 250 - 251 - OSD = { 252 - Alignment = 4; 253 - Background = false; 254 - BackgroundColor = ''@Variant(\0\0\0\x43\x1\x88\x88\0\0\0\0\0\0\0\0)''; 255 - Bold = false; 256 - Enabled = true; 257 - FontName = "Sans Serif"; 258 - FontSize = 32; 259 - LeftMargin = 0; 260 - Outline = 1.5; 261 - OutlineColor = ''@Variant(\0\0\0\x43\x1\xff\xff\0\0\0\0\0\0\0\0)''; 262 - RightMargin = 0; 263 - Shadow = 1.5; 264 - ShadowColor = ''@Variant(\0\0\0\x43\x1\xff\xff\0\0\0\0\0\0\0\0)''; 265 - Spacing = 0; 266 - TextColor = ''@Variant(\0\0\0\x43\x1\xff\xff\xaa\xaa\xff\xffUU\0\0)''; 267 - VMargin = 0; 268 - }; 269 - 270 - OpenGL = { 271 - BypassCompositor = false; 272 - OnWindow = false; 273 - VSync = true; 274 - }; 275 - 276 - Proxy = { 277 - Host = null; 278 - Login = false; 279 - Password = ''@ByteArray()''; 280 - Port = 80; 281 - Use = false; 282 - User = null; 283 - }; 284 - 285 - ReplayGain = { 286 - Album = false; 287 - Enabled = false; 288 - Preamp = 0; 289 - PreventClipping = true; 290 - }; 291 - 292 - SettingsWidget.Geometry = ''@Rect(395 263 2212 1308)''; 293 - 294 - Subtitles = { 295 - Alignment = 7; 296 - Background = true; 297 - BackgroundColor = ''@Variant(\0\0\0\x43\x1\x88\x88\0\0\0\0\0\0\0\0)''; 298 - Bold = false; 299 - FontName = "Fira Code"; 300 - FontSize = 24; 301 - LeftMargin = 15; 302 - Outline = 1; 303 - OutlineColor = ''@Variant(\0\0\0\x43\x1\xff\xff\0\0\0\0\0\0\0\0)''; 304 - RightMargin = 15; 305 - Shadow = 0.5; 306 - ShadowColor = ''@Variant(\0\0\0\x43\x1\xff\xff\0\0\0\0\0\0\0\0)''; 307 - Spacing = 2; 308 - TextColor = ''@Variant(\0\0\0\x43\x1\xff\xff\xff\xff\xff\xff\xff\xff\0\0)''; 309 - VMargin = 15; 310 - }; 311 - 312 - VideoAdjustment = { 313 - Brightness = 0; 314 - Contrast = 0; 315 - Hue = 0; 316 - Negative = 0; 317 - Saturation = 0; 318 - Sharpness = 0; 319 - }; 320 - 321 - Vulkan = { 322 - AlwaysGPUDeint = true; 323 - BypassCompositor = true; 324 - Device = "@ByteArray()"; 325 - ForceVulkanYadif = false; 326 - HDR = false; 327 - HQScaleDown = false; 328 - HQScaleUp = false; 329 - VSync = 1; 330 - YadifSpatialCheck = true; 331 - }; 332 - 333 - YtDl = { 334 - CookiesFromBrowser = null; 335 - CookiesFromBrowserEnabled = false; 336 - CustomPath = "${pkgs.yt-dlp}/bin/yt-dlp"; 337 - CustomPathEnabled = true; 338 - DefaultQuality = null; 339 - DefaultQualityEnabled = false; 340 - DontAutoUpdate = true; 341 - }; 342 - }; 343 - QPainterSW.General.Enabled = true; 344 - Subtitles.General = { 345 - Classic_enabled = true; 346 - SRT_enabled = true; 347 - Sub_max_s = 5; 348 - Use_mDVD_FPS = true; 349 - }; 350 - VideoFilters.FPSDoubler = { 351 - MaxFPS = 29.99; 352 - MinFPS = 21; 353 - OnlyFullScreen = true; 354 - }; 355 - Visualizations = { 356 - General = { 357 - RefreshTime = 17; 358 - }; 359 - 360 - FFTSpectrum = { 361 - LimitFreq = 20000; 362 - Size = 8; 363 - }; 364 - 365 - SimpleVis = { 366 - SoundLength = 17; 367 - }; 368 - }; 369 - XVideo.General = { 370 - Enabled = false; 371 - UseSHM = false; 372 - }; 373 - }; 374 - }
-338
oldNixosModules/graphics/shell.nix
··· 1 - { 2 - pkgs, 3 - config, 4 - lib, 5 - inputs', 6 - ... 7 - }: { 8 - users.users.bean.extraGroups = ["video"]; 9 - 10 - nixpkgs.overlays = [ 11 - (next: prev: { 12 - wl-clipboard = prev.wl-clipboard.overrideAttrs { 13 - src = pkgs.fetchFromGitHub { 14 - owner = "bugaevc"; 15 - repo = "wl-clipboard"; 16 - rev = "424517085c45849edfeff72a4e3cc0724f54404a"; 17 - sha256 = "sha256-SueQw+/fR9B7Vbw4SvkaBN8Ifu1dMp3ymDr3a0lTdSs="; 18 - }; 19 - }; 20 - }) 21 - ]; 22 - 23 - environment.systemPackages = with pkgs; [ 24 - # Shell Components 25 - hyprlock 26 - hyprland-qtutils 27 - 28 - ## Waybar 29 - qt6.qttools # For component 30 - 31 - pavucontrol 32 - 33 - wf-recorder 34 - slurp 35 - grim 36 - xdg-utils 37 - grimblast 38 - tesseract 39 - swappy 40 - libnotify 41 - swaynotificationcenter 42 - wl-clipboard 43 - 44 - keepassxc 45 - 46 - hunspell 47 - hunspellDicts.en_US 48 - hunspellDicts.en_US-large 49 - ]; 50 - 51 - services.udisks2.enable = true; 52 - 53 - # Needed to open the firewall, actual service is managed in HM 54 - programs.kdeconnect.enable = true; 55 - 56 - xdg.configFile = { 57 - "swappy/config".text = '' 58 - [Default] 59 - save_dir=$HOME/Pictures/Screenshots 60 - save_filename_format=%Y-%m-%dT%H:%M:%S-edited.png 61 - show_panel=true 62 - line_size=5 63 - text_size=20 64 - text_font=monospace 65 - paint_mode=brush 66 - early_exit=false 67 - fill_shape=false 68 - ''; 69 - "kdeconnect/config".text = '' 70 - [General] 71 - name=${lib.toUpper config.networking.hostName} 72 - ''; 73 - }; 74 - 75 - # Doing our own thing for rofi 76 - catppuccin.rofi.enable = false; 77 - 78 - systemd.user.services = let 79 - target = config.home-manager.users.bean.wayland.systemd.target; 80 - mkShellService = { 81 - desc, 82 - service, 83 - }: { 84 - Install = { 85 - WantedBy = [target]; 86 - }; 87 - 88 - Unit = { 89 - ConditionEnvironment = "WAYLAND_DISPLAY"; 90 - Description = desc; 91 - After = [target]; 92 - PartOf = [target]; 93 - }; 94 - 95 - Service = service; 96 - }; 97 - in { 98 - battery-notif = mkShellService { 99 - desc = "Battery Notification Service"; 100 - 101 - service = { 102 - ExecStart = "${pkgs.nushell}/bin/nu ${../../res/battery_notif.nu}"; 103 - Restart = "on-failure"; 104 - RestartSec = "10"; 105 - }; 106 - }; 107 - 108 - kdeconnect.Service.Environment = lib.mkForce []; 109 - 110 - mpris-idle-inhibit = mkShellService { 111 - desc = "MPRIS Idle Inhibitor"; 112 - 113 - service = { 114 - ExecStart = ''${inputs'.wayland-mpris-idle-inhibit.packages.default}/bin/wayland-mpris-idle-inhibit --ignore "kdeconnect" --ignore "playerctld"''; 115 - Restart = "on-failure"; 116 - RestartSec = "10"; 117 - }; 118 - }; 119 - }; 120 - 121 - services = { 122 - hyprpolkitagent.enable = true; 123 - kdeconnect.enable = true; 124 - hypridle = { 125 - enable = true; 126 - settings = { 127 - general = { 128 - lock_cmd = "pidof hyprlock || hyprlock --grace 5"; 129 - unlock_cmd = "pkill hyprlock --signal SIGUSR1"; 130 - before_sleep_cmd = "loginctl lock-session"; 131 - after_sleep_cmd = screenOnCmd; 132 - }; 133 - 134 - listener = let 135 - lockTimeout = 120; 136 - in [ 137 - { 138 - timeout = lockTimeout; # Lock the screen after 2 minutes of inactivity 139 - on-timeout = "loginctl lock-session"; 140 - } 141 - { 142 - timeout = lockTimeout + 120; # Turn off the screen 2 minutes after locking 143 - on-timeout = screenOffCmd; 144 - on-resume = screenOnCmd; 145 - } 146 - { 147 - timeout = lockTimeout + 600; # Suspend 10 minutes after locking 148 - on-timeout = "systemctl suspend"; 149 - } 150 - ]; 151 - }; 152 - }; 153 - cliphist = { 154 - enable = true; 155 - systemdTargets = lib.mkForce [ 156 - config.home-manager.users.bean.wayland.systemd.target 157 - ]; 158 - }; 159 - udiskie = { 160 - enable = true; 161 - automount = false; 162 - tray = "never"; 163 - }; 164 - playerctld.enable = true; 165 - wlsunset = { 166 - enable = true; 167 - sunrise = "6:00"; 168 - sunset = "22:00"; 169 - }; 170 - swayosd = { 171 - enable = true; 172 - stylePath = pkgs.writeText "swayosd-style.css" '' 173 - window#osd { 174 - border-radius: 5rem; 175 - } 176 - 177 - #container { 178 - padding: 5px 10px; 179 - } 180 - ''; 181 - }; 182 - }; 183 - 184 - programs = { 185 - rofi = { 186 - enable = true; 187 - package = pkgs.rofi.override { 188 - plugins = with pkgs; [ 189 - rofi-emoji 190 - rofi-power-menu 191 - rofi-bluetooth 192 - rofi-calc 193 - rofi-pulse-select 194 - ]; 195 - }; 196 - theme = let 197 - inherit (config.home-manager.users.bean.lib.formats.rasi) mkLiteral; 198 - in { 199 - "@import" = "${config.catppuccin.sources.rofi}/themes/catppuccin-${config.home-manager.users.bean.catppuccin.rofi.flavor}.rasi"; 200 - "*" = 201 - (builtins.mapAttrs (name: value: mkLiteral "@${value}") { 202 - "bg0" = "base"; 203 - "bg1" = "mantle"; 204 - "bg2" = "crust"; 205 - "bg3" = config.catppuccin.accent; 206 - "fg0" = "subtext1"; 207 - "fg1" = "text"; 208 - "fg2" = "subtext0"; 209 - "fg3" = "overlay0"; 210 - "fg4" = "surface0"; 211 - }) 212 - // { 213 - font = mkLiteral ''"Roboto 14"''; 214 - background-color = mkLiteral ''transparent''; 215 - text-color = mkLiteral ''@fg0''; 216 - margin = mkLiteral ''0px''; 217 - padding = mkLiteral ''0px''; 218 - spacing = mkLiteral ''0px''; 219 - }; 220 - "window" = { 221 - location = mkLiteral ''north''; 222 - y-offset = mkLiteral ''calc(50% - 176px)''; 223 - width = mkLiteral ''600''; 224 - border-radius = mkLiteral ''24px''; 225 - background-color = mkLiteral ''@bg0''; 226 - }; 227 - "mainbox" = { 228 - padding = mkLiteral ''12px''; 229 - }; 230 - "inputbar" = { 231 - background-color = mkLiteral ''@bg1''; 232 - border-color = mkLiteral ''@bg3''; 233 - border = mkLiteral ''2px''; 234 - border-radius = mkLiteral ''16px''; 235 - padding = mkLiteral ''8px 16px''; 236 - spacing = mkLiteral ''8px''; 237 - children = mkLiteral ''[ prompt, entry ]''; 238 - }; 239 - "prompt" = { 240 - text-color = mkLiteral ''@fg2''; 241 - }; 242 - "entry" = { 243 - placeholder = mkLiteral ''"Search"''; 244 - placeholder-color = mkLiteral ''@fg3''; 245 - }; 246 - "message" = { 247 - margin = mkLiteral ''12px 0 0''; 248 - border-radius = mkLiteral ''16px''; 249 - border-color = mkLiteral ''@bg2''; 250 - background-color = mkLiteral ''@bg2''; 251 - }; 252 - "textbox" = { 253 - padding = mkLiteral ''8px 24px''; 254 - }; 255 - "listview" = { 256 - background-color = mkLiteral ''transparent''; 257 - margin = mkLiteral ''12px 0 0''; 258 - lines = mkLiteral ''8''; 259 - columns = mkLiteral ''2''; 260 - fixed-height = mkLiteral ''false''; 261 - }; 262 - "element" = { 263 - padding = mkLiteral ''8px 16px''; 264 - spacing = mkLiteral ''8px''; 265 - border-radius = mkLiteral ''16px''; 266 - }; 267 - "element normal active" = { 268 - text-color = mkLiteral ''@bg3''; 269 - }; 270 - "element alternate active" = { 271 - text-color = mkLiteral ''@bg3''; 272 - }; 273 - "element selected normal, element selected active" = { 274 - text-color = mkLiteral ''@fg4''; 275 - background-color = mkLiteral ''@bg3''; 276 - }; 277 - "element-icon" = { 278 - size = mkLiteral ''1em''; 279 - vertical-align = mkLiteral ''0.5''; 280 - }; 281 - "element-text" = { 282 - text-color = mkLiteral ''inherit''; 283 - }; 284 - }; 285 - location = "center"; 286 - }; 287 - nushell.extraConfig = '' 288 - plugin add ${pkgs.nu_plugin_dbus}/bin/nu_plugin_dbus 289 - ''; 290 - }; 291 - 292 - wayland.windowManager.hyprland.settings = { 293 - env = [ 294 - "GRIMBLAST_EDITOR,swappy -f " 295 - ]; 296 - 297 - exec-once = [ 298 - "uwsm app -- keepassxc /home/bean/Documents/Keepass/DB/Database.kdbx" 299 - ]; 300 - 301 - bind = let 302 - powerMenu = "rofi -modi 'p:${pkgs.rofi-power-menu}/bin/rofi-power-menu' -show p --symbols-font \"FiraMono Nerd Font Mono\""; 303 - screenshot = "${pkgs.nushell}/bin/nu ${../res/screenshot.nu}"; 304 - in [ 305 - "SUPER,S,exec,uwsm app -- rofi -show drun -icon-theme \"candy-icons\" -show-icons" 306 - "SUPER SHIFT,E,exec,uwsm app -- rofi -modi emoji -show emoji" 307 - "SUPER SHIFT,D,exec,swaync-client -d" 308 - "SUPER,Delete,exec,uwsm app -- ${powerMenu}" 309 - ",XF86PowerOff,exec,uwsm app -- ${powerMenu}" 310 - "SUPER ALT,C,exec,uwsm app -- rofi -show calc -modi calc -no-show-match -no-sort -calc-command \"echo -n '{result}' | wl-copy\"" 311 - "SUPER,B,exec,uwsm app -- ${pkgs.rofi-bluetooth}/bin/rofi-bluetooth" 312 - "SUPER,Tab,exec,uwsm app -- rofi -show window -show-icons" 313 - "SUPER,E,exec,uwsm app -- yazi.desktop" 314 - "SUPER,N,exec,uwsm app -- ${pkgs.swaynotificationcenter}/bin/swaync-client -t -sw" 315 - "SUPER,A,exec,uwsm app -- pavucontrol --tab 5" 316 - ''SUPER,V,exec,cliphist list | sed -r 's/\[\[ binary data (.* .iB) (.*) (.*) \]\]/ 󰋩 \2 Image (\3, \1)/g' | rofi -dmenu -display-columns 2 -p Clipboard | cliphist decode | wl-copy'' 317 - "SUPER ALT,V,exec,echo -e \"Yes\\nNo\" | [[ $(rofi -dmenu -mesg \"Clear Clipboard History?\" -p Clear) == \"Yes\" ]] && cliphist wipe" 318 - ",Print,exec,uwsm app -- ${screenshot}" 319 - "SUPER SHIFT,S,exec,uwsm app -- ${screenshot}" 320 - "SUPER SHIFT,T,exec,${pkgs.nushell}/bin/nu ${../../res/ocr.nu}" 321 - "SUPER SHIFT,C,exec,uwsm app -- ${pkgs.hyprpicker}/bin/hyprpicker -a" 322 - ]; 323 - bindr = [ 324 - "SUPER SHIFT,R,exec,pkill wf-recorder --signal SIGINT || uwsm app -- ${pkgs.nushell}/bin/nu ${../../res/screenrec.nu}" 325 - "CAPS,Caps_Lock,exec,uwsm app -- swayosd-client --caps-lock" 326 - ",Scroll_Lock,exec,uwsm app -- swayosd-client --scroll-lock" 327 - ",Num_Lock,exec,uwsm app -- swayosd-client --num-lock" 328 - ]; 329 - bindl = [ 330 - ",switch:on:Lid Switch,exec,${screenOffCmd}" 331 - ",switch:off:Lid Switch,exec,${screenOnCmd}" 332 - ]; 333 - bindel = [ 334 - ",XF86MonBrightnessUp,exec,uwsm app -- swayosd-client --brightness raise" 335 - ",XF86MonBrightnessDown,exec,uwsm app -- swayosd-client --brightness lower" 336 - ]; 337 - }; 338 - }
-64
oldNixosModules/graphics/swaync.nix
··· 1 - {pkgs, ...}: { 2 - environment.systemPackages = with pkgs; [ 3 - alsa-utils 4 - ]; 5 - 6 - nixpkgs.overlays = [ 7 - (new: old: { 8 - swaynotificationcenter = old.swaynotificationcenter.overrideAttrs { 9 - postFixup = '' 10 - rm -r $out/share/systemd 11 - rm -r $out/lib/systemd 12 - ''; 13 - }; 14 - }) 15 - ]; 16 - 17 - home-manager.users.bean.services.swaync = { 18 - enable = true; 19 - settings = { 20 - control-center-exclusive-zone = false; 21 - control-center-height = 1000; 22 - control-center-margin-bottom = 10; 23 - control-center-margin-left = 10; 24 - control-center-margin-right = 10; 25 - control-center-margin-top = 0; 26 - control-center-width = 800; 27 - fit-to-screen = false; 28 - hide-on-action = true; 29 - hide-on-clear = false; 30 - image-visibility = "when-available"; 31 - keyboard-shortcuts = true; 32 - notification-body-image-height = 100; 33 - notification-body-image-width = 200; 34 - notification-icon-size = 64; 35 - notification-window-width = 500; 36 - positionX = "center"; 37 - positionY = "top"; 38 - script-fail-notify = true; 39 - scripts = { 40 - all = { 41 - exec = "${pkgs.nushell}/bin/nu ${../../res/notification.nu} ${../../res/notif-sounds}"; 42 - urgency = ".*"; 43 - }; 44 - }; 45 - timeout = 10; 46 - timeout-critical = 0; 47 - timeout-low = 5; 48 - transition-time = 200; 49 - widget-config = { 50 - dnd = {text = "Do Not Disturb";}; 51 - label = { 52 - max-lines = 1; 53 - text = "Notification Center"; 54 - }; 55 - title = { 56 - button-text = "Clear All"; 57 - clear-all-button = true; 58 - text = "Notification Center"; 59 - }; 60 - }; 61 - widgets = ["title" "dnd" "notifications"]; 62 - }; 63 - }; 64 - }
-77
oldNixosModules/graphics/theming.nix
··· 1 - { 2 - pkgs, 3 - lib, 4 - ... 5 - }: let 6 - iconTheme = { 7 - name = "Tela-green"; 8 - package = pkgs.tela-icon-theme; 9 - }; 10 - cursorTheme = { 11 - name = "catppuccin-mocha-dark-cursors"; 12 - package = pkgs.catppuccin-cursors.mochaDark; 13 - size = 24; 14 - }; 15 - hyprThemeName = "${cursorTheme.name}-hypr"; 16 - hyprCursorTheme = let 17 - utils = "${pkgs.hyprcursor}/bin/hyprcursor-util"; 18 - in 19 - pkgs.runCommand hyprThemeName {} '' 20 - export PATH="$PATH:${pkgs.xcur2png}/bin" 21 - ${utils} -x ${cursorTheme.package}/share/icons/${cursorTheme.name} --output . 22 - mkdir -p $out/share/icons 23 - ${utils} -c ./extracted_${cursorTheme.name} --output . 24 - cp -r "./theme_Extracted Theme" $out/share/icons/${hyprThemeName} 25 - ''; 26 - in { 27 - environment.systemPackages = [ 28 - hyprCursorTheme 29 - cursorTheme.package 30 - iconTheme.package 31 - ]; 32 - 33 - qt = { 34 - enable = true; 35 - style = "kvantum"; 36 - }; 37 - 38 - home-manager.users.bean = { 39 - qt = { 40 - enable = true; 41 - platformTheme.name = "kvantum"; 42 - style.name = "kvantum"; 43 - }; 44 - 45 - home.pointerCursor = { 46 - inherit (cursorTheme) name package size; 47 - enable = true; 48 - gtk.enable = true; 49 - x11.enable = true; 50 - }; 51 - 52 - wayland.windowManager.hyprland.settings.env = [ 53 - "HYPRCURSOR_THEME,${hyprThemeName}" 54 - "HYPRCURSOR_SIZE,${builtins.toJSON cursorTheme.size}" 55 - ]; 56 - 57 - gtk = { 58 - enable = true; 59 - iconTheme = lib.mkForce iconTheme; 60 - gtk2.extraConfig = "gtk-application-prefer-dark-theme=true"; 61 - gtk3.extraConfig.gtk-application-prefer-dark-theme = true; 62 - gtk4.extraConfig.gtk-application-prefer-dark-theme = true; 63 - }; 64 - 65 - dconf.settings."org/gnome/desktop/interface".color-scheme = "prefer-dark"; 66 - 67 - services.hyprpaper = { 68 - enable = true; 69 - settings = { 70 - ipc = "on"; 71 - splash = false; 72 - preload = ["${../../res/pictures/background.png}"]; 73 - wallpaper = [",${../../res/pictures/background.png}"]; 74 - }; 75 - }; 76 - }; 77 - }
-533
oldNixosModules/graphics/waybar.nix
··· 1 - {pkgs, ...}: let 2 - catppuccinCss = pkgs.fetchurl { 3 - url = "https://github.com/catppuccin/waybar/raw/refs/heads/main/themes/mocha.css"; 4 - hash = "sha256-puMFl8zIKOiYhE6wzqnffXOHn/VnKmpVDzrMJMk+3Rc="; 5 - }; 6 - in { 7 - home-manager.users.bean = { 8 - wayland.windowManager.hyprland.settings.bind = [ 9 - "SUPER,W,exec,systemctl restart --user waybar" 10 - "SUPER SHIFT,W,exec,systemctl stop --user waybar" 11 - ]; 12 - programs.waybar = { 13 - enable = true; 14 - systemd.enable = true; 15 - style = '' 16 - @import "${catppuccinCss}"; 17 - 18 - * { 19 - font-family: sans-serif; 20 - } 21 - 22 - window#waybar { 23 - background: rgba(49, 50, 68, 0.65); 24 - color: @text; 25 - } 26 - 27 - .modules-left > * > *, 28 - .modules-right > * > * { 29 - font-size: 1.5rem; 30 - background: @crust; 31 - border: 2px solid @base; 32 - border-radius: 5rem; 33 - padding: 5px 15px; 34 - margin: 5px 2px; 35 - } 36 - 37 - #bluetooth.disabled { 38 - border-color: @red; 39 - } 40 - 41 - #waybar .modules-left > *:first-child > * { 42 - margin-left: 25px; 43 - } 44 - 45 - #waybar .modules-right > *:last-child > * { 46 - margin-right: 25px; 47 - } 48 - 49 - #waybar .modules-left, 50 - #waybar .modules-right { 51 - margin-top: 10px; 52 - margin-bottom: 5px; 53 - } 54 - 55 - #waybar .modules-center { 56 - margin-top: 5px; 57 - margin-bottom: 5px; 58 - } 59 - 60 - #battery.warning { 61 - border-color: @yellow; 62 - } 63 - 64 - #battery.critical { 65 - border-color: @red; 66 - } 67 - 68 - * > #battery.charging { 69 - border-color: @green; 70 - } 71 - 72 - #taskbar, 73 - #workspaces { 74 - padding: 10px; 75 - border-radius: 5rem; 76 - border: none; 77 - background: none; 78 - } 79 - 80 - #taskbar button, 81 - #workspaces button { 82 - color: @text; 83 - border-radius: 5rem; 84 - padding: 5px 15px; 85 - margin: 0 5px; 86 - background: @crust; 87 - border: 2px solid @base; 88 - } 89 - 90 - #taskbar button:hover, #workspaces button:hover { 91 - background: @mantle; 92 - } 93 - 94 - #workspaces button { 95 - font-size: 1.5rem; 96 - } 97 - 98 - #cpu, 99 - #memory, 100 - #temperature { 101 - font-size: 1.5rem; 102 - padding: 10px 25px; 103 - } 104 - 105 - #cpu.warning, 106 - #memory.warning { 107 - border-color: @yellow; 108 - } 109 - 110 - #cpu.critical, 111 - #memory.critical, 112 - #temperature.critical { 113 - border-color: @red; 114 - } 115 - 116 - #workspaces button.active { 117 - border: 2px solid @sapphire; 118 - } 119 - 120 - #taskbar button.active { 121 - border: 2px solid @sapphire; 122 - } 123 - 124 - #idle_inhibitor.activated { 125 - border-color: @mauve; 126 - } 127 - 128 - #custom-notification.notification { 129 - border-color: @sapphire; 130 - } 131 - 132 - #custom-notification.dnd-none, 133 - #custom-notification.dnd-notification, 134 - #custom-notification.dnd-inhibited-none, 135 - #custom-notification.dnd-inhibited-notification { 136 - border-color: @red; 137 - } 138 - 139 - #custom-notification.inhibited-none, 140 - #custom-notification.inhibited-notification { 141 - border-color: @mauve; 142 - } 143 - 144 - #network.disconnected { 145 - border-color: @red; 146 - } 147 - 148 - #privacy { 149 - background: none; 150 - border: none; 151 - margin: 0; 152 - padding: 0; 153 - } 154 - 155 - #privacy-item { 156 - font-size: 1.5rem; 157 - border-radius: 5rem; 158 - padding: 5px 15px; 159 - margin: 5px 2px; 160 - border: 2px solid @red; 161 - background-color: @crust; 162 - } 163 - 164 - #custom-weather.VeryCloudy, 165 - #custom-weather.Cloudy, 166 - #custom-weather.Fog { 167 - border-color: @overlay0; 168 - } 169 - 170 - #custom-weather.HeavyRain, 171 - #custom-weather.ThunderyHeavyRain, 172 - #custom-weather.ThunderyRain, 173 - #custom-weather.ThunderyShowers, 174 - #custom-weather.HeavyShowers, 175 - #custom-weather.LightRain, 176 - #custom-weather.LightShowers { 177 - border-color: @blue; 178 - } 179 - 180 - #custom-weather.HeavySnow, 181 - #custom-weather.LightSnow, 182 - #custom-weather.Sleet, 183 - #custom-weather.Snow, 184 - #custom-weather.LightSnowShowers, 185 - #custom-weather.LightSleetShowers { 186 - border-color: @text; 187 - } 188 - 189 - #custom-weather.Clear, 190 - #custom-weather.Sunny { 191 - border-color: @yellow; 192 - } 193 - 194 - #custom-weather.PartlyCloudy { 195 - border-color: @flamingo; 196 - } 197 - 198 - #custom-weather.PartlyCloudy.night { 199 - border-color: @lavender; 200 - } 201 - 202 - #custom-weather.Clear.night, 203 - #custom-weather.Sunny.night { 204 - border-color: @mauve; 205 - } 206 - 207 - #custom-news.utd { 208 - font-size: 1.5rem; 209 - } 210 - 211 - #custom-news.unread { 212 - border-color: @sapphire; 213 - } 214 - 215 - #mpris { 216 - opacity: 0; 217 - } 218 - 219 - #mpris.paused { 220 - opacity: 1; 221 - } 222 - 223 - #mpris.playing { 224 - opacity: 1; 225 - border-color: @sapphire; 226 - } 227 - 228 - #mpris.playing.spotify { 229 - border-color: #33B980; 230 - } 231 - 232 - #mpris.paused.kdeconnect { 233 - opacity: 0; 234 - } 235 - ''; 236 - settings = [ 237 - { 238 - battery = { 239 - format = "{icon} {capacity}󰏰"; 240 - format-charging = "{icon} {capacity}󰏰"; 241 - format-icons = { 242 - charging = [ 243 - "󰢜" 244 - "󰂆" 245 - "󰂇" 246 - "󰂈" 247 - "󰢝" 248 - "󰂉" 249 - "󰢞" 250 - "󰂊" 251 - "󰂋" 252 - "󰂅" 253 - ]; 254 - default = [ 255 - "󰁺" 256 - "󰁻" 257 - "󰁼" 258 - "󰁽" 259 - "󰁾" 260 - "󰁿" 261 - "󰂀" 262 - "󰂁" 263 - "󰂂" 264 - "󰁹" 265 - ]; 266 - }; 267 - states = { 268 - critical = 15; 269 - warning = 30; 270 - }; 271 - }; 272 - bluetooth = { 273 - format = "󰂯"; 274 - format-connected = "󰂱"; 275 - format-connected-battery = "󰂱 {device_battery_percentage}󰏰"; 276 - format-disabled = "󰂲"; 277 - format-off = "󰂲"; 278 - on-click = "rofi-bluetooth"; 279 - on-click-right = "rfkill toggle bluetooth"; 280 - tooltip-format = "{controller_alias}\t{controller_address}\n\n{num_connections} connected"; 281 - tooltip-format-connected = "{controller_alias}\t{controller_address}\n\n{num_connections} connected\n\n{device_enumerate}"; 282 - tooltip-format-enumerate-connected = "{device_alias}\t{device_address}"; 283 - tooltip-format-enumerate-connected-battery = "{device_alias}\t{device_address}\t{device_battery_percentage}%"; 284 - }; 285 - "clock#1" = { 286 - actions = { 287 - on-click = "shift_up"; 288 - on-click-middle = "mode"; 289 - on-click-right = "shift_down"; 290 - }; 291 - calendar = { 292 - format = { 293 - days = "<span color='#ecc6d9'><b>{}</b></span>"; 294 - months = "<span color='#ffead3'><b>{}</b></span>"; 295 - today = "<span color='#ff6699'><b><u>{}</u></b></span>"; 296 - weekdays = "<span color='#ffcc66'><b>{}</b></span>"; 297 - weeks = "<span color='#99ffdd'><b>W{}</b></span>"; 298 - }; 299 - mode = "month"; 300 - mode-mon-col = 3; 301 - on-scroll = 1; 302 - weeks-pos = "right"; 303 - }; 304 - format = "󰃭 {:%A, %B %Od}"; 305 - tooltip-format = "<tt><small>{calendar}</small></tt>"; 306 - }; 307 - "clock#2" = { 308 - format = "󰥔 {:%I:%M %p}"; 309 - tooltip-format = "{:%F at %T in %Z (UTC%Ez)}"; 310 - }; 311 - "custom/kde-connect" = { 312 - exec = "${pkgs.nushell}/bin/nu ${../../res/custom_waybar_modules/kdeconnect.nu}"; 313 - format = "{}"; 314 - interval = 30; 315 - on-click = "kdeconnect-settings"; 316 - return-type = "json"; 317 - }; 318 - "custom/news" = { 319 - exec = "${pkgs.nushell}/bin/nu ${../../res/custom_waybar_modules/newsboat.nu}"; 320 - exec-on-event = true; 321 - format = "{}"; 322 - on-click-right = "pkill waybar -SIGRTMIN+6"; 323 - restart-interval = 1800; 324 - return-type = "json"; 325 - signal = 6; 326 - }; 327 - "custom/notification" = { 328 - escape = true; 329 - exec = "swaync-client -swb"; 330 - exec-if = "which swaync-client"; 331 - format = "{icon}"; 332 - format-icons = { 333 - dnd-inhibited-none = "󰂛"; 334 - dnd-inhibited-notification = "󰂛<sup></sup>"; 335 - dnd-none = "󰂛"; 336 - dnd-notification = "󰂛<sup></sup>"; 337 - inhibited-none = "󰂠"; 338 - inhibited-notification = "󰂠<sup></sup>"; 339 - none = "󰂚"; 340 - notification = "󱅫"; 341 - }; 342 - max-length = 3; 343 - on-click = "sleep 0.2 && swaync-client -t -sw"; 344 - on-click-middle = "sleep 0.2 && swaync-client -C -sw"; 345 - on-click-right = "sleep 0.2 && swaync-client -d -sw"; 346 - return-type = "json"; 347 - tooltip = false; 348 - }; 349 - "custom/weather" = { 350 - exec = "${pkgs.nushell}/bin/nu ${../../res/custom_waybar_modules/weather.nu}"; 351 - format = "{}"; 352 - interval = 600; 353 - on-click = "xdg-open https://duckduckgo.com/?q=weather"; 354 - return-type = "json"; 355 - }; 356 - idle_inhibitor = { 357 - format = "{icon}"; 358 - format-icons = { 359 - activated = "󰒳"; 360 - deactivated = "󰒲"; 361 - }; 362 - }; 363 - layer = "top"; 364 - modules-center = []; 365 - modules-left = [ 366 - "user" 367 - "clock#1" 368 - "clock#2" 369 - "custom/news" 370 - "custom/weather" 371 - "mpris" 372 - ]; 373 - modules-right = [ 374 - "network" 375 - "battery" 376 - "bluetooth" 377 - "pulseaudio" 378 - "custom/kde-connect" 379 - "idle_inhibitor" 380 - "custom/notification" 381 - "privacy" 382 - "tray" 383 - ]; 384 - mpris = { 385 - album-len = 20; 386 - artist-len = 25; 387 - interval = 1; 388 - dynamic-importance-order = [ 389 - "title" 390 - "position" 391 - "length" 392 - "artist" 393 - "album" 394 - ]; 395 - dynamic-len = 50; 396 - dynamic-order = [ 397 - "title" 398 - "artist" 399 - "album" 400 - "position" 401 - "length" 402 - ]; 403 - format = "{player_icon} {dynamic}"; 404 - format-paused = "{status_icon} {dynamic}"; 405 - player-icons = { 406 - QMPlay2 = "󰐌"; 407 - default = "󰎆"; 408 - firefox = ""; 409 - firefox-devedition = ""; 410 - chromium = "󰖟"; 411 - kdeconnect = ""; 412 - spotify = "󰓇"; 413 - }; 414 - status-icons = { 415 - paused = "󰏤"; 416 - stopped = "󰓛"; 417 - }; 418 - title-len = 35; 419 - }; 420 - network = { 421 - format = "{ifname}"; 422 - format-disconnected = "󰪎"; 423 - format-ethernet = "󱎔 {ifname}"; 424 - format-icons = [ 425 - "󰤟" 426 - "󰤢" 427 - "󰤥" 428 - "󰤨" 429 - ]; 430 - format-linked = "󰌷 {ifname}"; 431 - format-wifi = "{icon} {essid}"; 432 - tooltip-disconnected = "Disconnected"; 433 - tooltip-format = "{ifname} via {gwaddr}"; 434 - tooltip-format-ethernet = "󱎔 {ifname}"; 435 - tooltip-format-wifi = "Connected to {essid} ({signalStrength}󰏰 Strength) over {ifname} via {gwaddr}"; 436 - }; 437 - position = "top"; 438 - privacy = { 439 - icon-size = 20; 440 - icon-spacing = 4; 441 - modules = [ 442 - { 443 - tooltip = true; 444 - tooltip-icon-size = 24; 445 - type = "screenshare"; 446 - } 447 - { 448 - tooltip = true; 449 - tooltip-icon-size = 24; 450 - type = "audio-in"; 451 - } 452 - ]; 453 - transition-duration = 200; 454 - }; 455 - pulseaudio = { 456 - format = "{icon} {volume:2}󰏰"; 457 - format-bluetooth = "{icon} {volume}󰏰"; 458 - format-icons = { 459 - car = ""; 460 - default = [ 461 - "󰖀" 462 - "󰕾" 463 - ]; 464 - hands-free = "󰋋"; 465 - headphone = "󰋋"; 466 - headset = "󰋋"; 467 - phone = ""; 468 - portable = ""; 469 - }; 470 - format-muted = "󰝟"; 471 - on-click = "pamixer -t"; 472 - on-click-right = "pavucontrol"; 473 - scroll-step = 5; 474 - }; 475 - tray = { 476 - icon-size = 25; 477 - show-passive-items = true; 478 - spacing = 5; 479 - }; 480 - user = { 481 - format = " {user}"; 482 - icon = true; 483 - }; 484 - } 485 - { 486 - cpu = { 487 - format = "󰍛 {usage}󰏰"; 488 - states = { 489 - critical = 95; 490 - warning = 80; 491 - }; 492 - }; 493 - "hyprland/workspaces" = { 494 - disable-scroll = true; 495 - format = "{name}"; 496 - }; 497 - layer = "top"; 498 - memory = { 499 - format = " {}󰏰 ({used:0.1f}/{total:0.1f} GiB)"; 500 - states = { 501 - critical = 90; 502 - warning = 70; 503 - }; 504 - }; 505 - modules-center = ["wlr/taskbar"]; 506 - modules-left = ["hyprland/workspaces"]; 507 - modules-right = [ 508 - "temperature" 509 - "cpu" 510 - "memory" 511 - ]; 512 - position = "bottom"; 513 - temperature = { 514 - critical-threshold = 80; 515 - format = "{icon} {temperatureC} °C"; 516 - format-critical = "{icon}! {temperatureC} °C"; 517 - format-icons = [ 518 - "󱃃" 519 - "󰔏" 520 - "󱃂" 521 - ]; 522 - thermal-zone = 1; 523 - }; 524 - "wlr/taskbar" = { 525 - format = "{icon}"; 526 - icon-size = 35; 527 - on-click = "activate"; 528 - }; 529 - } 530 - ]; 531 - }; 532 - }; 533 - }
-19
oldNixosModules/graphics/wezterm.nix
··· 1 - {...}: { 2 - home-manager.users.bean.programs.wezterm = { 3 - enable = true; 4 - extraConfig = '' 5 - return { 6 - font = wezterm.font("monospace"), 7 - font_size = 18.0, 8 - color_scheme = "Catppuccin Mocha", 9 - enable_tab_bar = false, 10 - window_background_opacity = 0.92, 11 - default_cursor_style = "SteadyBar", 12 - cursor_thickness = 2, 13 - keys = { 14 - {key="o", mods="CTRL|SHIFT", action="OpenLinkAtMouseCursor"} 15 - } 16 - } 17 - ''; 18 - }; 19 - }
-31
oldNixosModules/graphics/xdg.nix
··· 1 - {config, ...}: { 2 - xdg.mime = { 3 - removedAssociations = { 4 - "inode/directory" = ["QMPlay2.desktop" "QMPlay2_enqueue.desktop"]; 5 - }; 6 - defaultApplications = { 7 - "application/pdf" = "firefox-devedition.desktop"; 8 - "image/*" = ["org.gnome.Loupe.desktop" "firefox-devedition.desktop" "chromium-browser.desktop"]; 9 - "text/*" = "neovide.desktop"; 10 - "inode/directory" = "yazi.desktop"; 11 - }; 12 - }; 13 - 14 - home-manager.users.bean.xdg = { 15 - enable = true; 16 - userDirs = let 17 - inherit (config.home-manager.users.bean.home) homeDirectory; 18 - in { 19 - enable = true; 20 - createDirectories = true; 21 - desktop = "${homeDirectory}/Desktop"; 22 - documents = "${homeDirectory}/Documents"; 23 - pictures = "${homeDirectory}/Pictures"; 24 - videos = "${homeDirectory}/Videos"; 25 - music = "${homeDirectory}/Music"; 26 - extraConfig = { 27 - "XDG_SCREENSHOTS_DIR" = "${homeDirectory}/Pictures/Screenshots"; 28 - }; 29 - }; 30 - }; 31 - }
-21
oldNixosModules/hypervisor+graphics.nix
··· 1 - {pkgs, ...}: { 2 - virtualisation.libvirtd = { 3 - enable = true; 4 - qemu.swtpm.enable = true; # Win 11 needs TPM 5 - # qemu.ovmf.packages = [ 6 - # (pkgs.OVMF.override { 7 - # # I have to build UEFI firmware from source, fun times 8 - # secureBoot = true; # Win 11 needs secure boot 9 - # tpmSupport = true; # Win 11 needs TPM 10 - # }) 11 - # .fd 12 - # ]; 13 - }; 14 - 15 - # GUI For Managing Machines 16 - programs.virt-manager.enable = true; 17 - 18 - environment.systemPackages = with pkgs; [ 19 - libtpms # For win 11 20 - ]; 21 - }
-13
oldNixosModules/hypervisor.nix
··· 1 - { 2 - pkgs, 3 - inputs, 4 - ... 5 - }: { 6 - users.users.bean.extraGroups = ["libvirtd"]; 7 - 8 - virtualisation.libvirtd = { 9 - enable = true; 10 - qemu.swtpm.enable = true; # Win 11 needs TPM 11 - onBoot = "ignore"; # I don't want VMs to start again on reboot 12 - }; 13 - }
-3
oldNixosModules/imperm+secureboot.nix
··· 1 - {...}: { 2 - boot.lanzaboote.pkiBundle = "/nix/persist/secure/secureboot"; 3 - }
-125
oldNixosModules/imperm.nix
··· 1 - { 2 - config, 3 - inputs, 4 - ... 5 - }: let 6 - persistRoot = "/nix/persist"; # Anything important we want backed up 7 - secureRoot = "${persistRoot}/secure"; # Files and directories we want only root to access 8 - cacheRoot = "/nix/perist-cache"; # Anything not as important that we can stand losing 9 - preWith = pre: builtins.map (p: "${pre}/${p}"); 10 - preShare = preWith ".local/share"; 11 - preConf = preWith ".config"; 12 - in { 13 - imports = [inputs.imperm.nixosModules.default]; 14 - 15 - environment.etc."machine-id".text = builtins.hashString "md5" config.networking.hostName; 16 - 17 - users.mutableUsers = false; 18 - users.users = { 19 - bean.hashedPasswordFile = "${secureRoot}/hashed-passwd"; 20 - root.hashedPasswordFile = "${secureRoot}/hashed-passwd"; 21 - }; 22 - 23 - environment.persistence.${cacheRoot} = { 24 - enable = true; 25 - hideMounts = true; 26 - directories = 27 - (preWith "/var" ( 28 - [ 29 - "log" 30 - ] 31 - ++ preWith "lib" ( 32 - [ 33 - "bluetooth" 34 - "nixos" 35 - "libvirt" 36 - "iwd" 37 - ] 38 - ++ preWith "systemd" [ 39 - "coredump" 40 - "timers" 41 - "backlight" 42 - "rfkill" 43 - ] 44 - ) 45 - )) 46 - ++ [ 47 - { 48 - directory = "/var/lib/colord"; 49 - user = "colord"; 50 - group = "colord"; 51 - mode = "u=rwx,g=rx,o="; 52 - } 53 - ]; 54 - users.bean.directories = 55 - [ 56 - ".cache" 57 - ".cargo" 58 - ".npm" 59 - ".pnpm" 60 - ".local/state/wireplumber" 61 - ] 62 - ++ (preShare [ 63 - "Steam" 64 - "Trash" 65 - ]) 66 - ++ (preConf [ 67 - "kdeconnect" 68 - "keepassxc" 69 - "syncthing" 70 - ]); 71 - }; 72 - 73 - environment.persistence.${persistRoot} = { 74 - enable = true; 75 - hideMounts = true; 76 - directories = [ 77 - "/var/lib/fprint" 78 - "/etc/NetworkManager/system-connections" 79 - ]; 80 - users.bean = { 81 - directories = 82 - [ 83 - "Downloads" 84 - "Music" 85 - "Videos" 86 - "Pictures" 87 - "Documents" 88 - ".mozilla" 89 - { 90 - directory = ".gnupg"; 91 - mode = "0700"; 92 - } 93 - { 94 - directory = ".ssh"; 95 - mode = "0700"; 96 - } 97 - { 98 - directory = ".nixops"; 99 - mode = "0700"; 100 - } 101 - { 102 - directory = ".local/share/keyrings"; 103 - mode = "0700"; 104 - } 105 - ] 106 - ++ (preConf [ 107 - "Cemu" 108 - ]) 109 - ++ (preShare [ 110 - # "direnv" 111 - "ow-mod-man" 112 - "OuterWildsModManager" 113 - "PrismLauncher" 114 - "newsboat" 115 - "zoxide" 116 - "nvim" 117 - "Cemu" 118 - "mpd" 119 - ]); 120 - files = preConf [ 121 - "nushell/history.txt" 122 - ]; 123 - }; 124 - }; 125 - }
-16
oldNixosModules/latest-linux.nix
··· 1 - { 2 - pkgs, 3 - lib, 4 - ... 5 - }: { 6 - boot = { 7 - initrd.systemd = { 8 - enable = lib.mkDefault true; 9 - }; 10 - 11 - # Use latest kernel with sysrqs and lockdown enabled 12 - kernelPackages = lib.mkDefault pkgs.linuxPackages_latest; 13 - kernelParams = lib.mkDefault ["lockdown=confidentiality"]; 14 - kernel.sysctl."kernel.sysrq" = lib.mkDefault 1; 15 - }; 16 - }
-13
oldNixosModules/mc-server.nix
··· 1 - {pkgs, ...}: { 2 - environment.systemPackages = with pkgs; [ 3 - jdk 4 - ]; 5 - 6 - networking.firewall.allowedTCPPorts = [ 7 - 25565 8 - ]; 9 - 10 - networking.firewall.allowedUDPPorts = [ 11 - 19132 12 - ]; 13 - }
-359
oldNixosModules/music.nix
··· 1 - { 2 - config, 3 - inputs', 4 - ... 5 - }: let 6 - cat = 7 - (builtins.fromJSON (builtins.readFile "${inputs'.catppuccin.packages.palette}/palette.json")) 8 - .${config.catppuccin.flavor}.colors; 9 - accent = cat.${config.catppuccin.accent}; 10 - themeFile = '' 11 - #![enable(implicit_some)] 12 - #![enable(unwrap_newtypes)] 13 - #![enable(unwrap_variant_newtypes)] 14 - ( 15 - default_album_art_path: None, 16 - draw_borders: true, 17 - show_song_table_header: true, 18 - symbols: (song: "", dir: "", playlist: "󰲸", marker: "\u{e0b0}"), 19 - layout: Split( 20 - direction: Vertical, 21 - panes: [ 22 - ( 23 - size: "3", 24 - pane: Pane(Tabs), 25 - ), 26 - ( 27 - size: "4", 28 - pane: Split( 29 - direction: Horizontal, 30 - panes: [ 31 - ( 32 - size: "100%", 33 - pane: Split( 34 - direction: Vertical, 35 - panes: [ 36 - ( 37 - size: "4", 38 - borders: "ALL", 39 - pane: Pane(Header), 40 - ), 41 - ] 42 - ) 43 - ), 44 - ] 45 - ), 46 - ), 47 - ( 48 - size: "100%", 49 - pane: Split( 50 - direction: Horizontal, 51 - panes: [ 52 - ( 53 - size: "100%", 54 - borders: "ALL", 55 - pane: Pane(TabContent), 56 - ), 57 - ] 58 - ), 59 - ), 60 - ( 61 - size: "3", 62 - borders: "ALL", 63 - pane: Pane(ProgressBar), 64 - ), 65 - ], 66 - ), 67 - progress_bar: ( 68 - symbols: ["[", "=", ">", "-", "]"], 69 - track_style: (bg: "${cat.mantle.hex}"), 70 - elapsed_style: (fg: "${accent.hex}", bg: "${cat.mantle.hex}"), 71 - thumb_style: (fg: "${accent.hex}", bg: "${cat.mantle.hex}"), 72 - ), 73 - scrollbar: ( 74 - symbols: ["│", "█", "▲", "▼"], 75 - track_style: (), 76 - ends_style: (), 77 - thumb_style: (fg: "${cat.teal.hex}"), 78 - ), 79 - browser_column_widths: [20, 38, 42], 80 - text_color: "${cat.text.hex}", 81 - background_color: "${cat.base.hex}", 82 - header_background_color: "${cat.mantle.hex}", 83 - modal_background_color: None, 84 - modal_backdrop: true, 85 - tab_bar: (active_style: (fg: "black", bg: "${accent.hex}", modifiers: "Bold"), inactive_style: ()), 86 - borders_style: (fg: "${cat.overlay0.hex}"), 87 - highlighted_item_style: (fg: "${accent.hex}", modifiers: "Bold"), 88 - current_item_style: (fg: "black", bg: "${cat.teal.hex}", modifiers: "Bold"), 89 - highlight_border_style: (fg: "${cat.teal.hex}"), 90 - cava: ( 91 - bar_symbols: ['▁', '▂', '▃', '▄', '▅', '▆', '▇', '█'], 92 - inverted_bar_symbols: ['▔', '🮂', '🮃', '▀', '🮄', '🮅', '🮆', '█'], 93 - bar_width: 1, 94 - bar_spacing: 1, 95 - orientation: Bottom, 96 - bar_color: Gradient({ 97 - 0: "${cat.lavender.hex}", 98 - 10: "${cat.blue.hex}", 99 - 20: "${cat.sapphire.hex}", 100 - 30: "${cat.teal.hex}", 101 - 40: "${cat.green.hex}", 102 - 50: "${cat.yellow.hex}", 103 - 60: "${cat.maroon.hex}", 104 - 70: "${cat.red.hex}", 105 - 80: "${cat.mauve.hex}", 106 - 90: "${cat.pink.hex}", 107 - 100: "${cat.flamingo.hex}", 108 - }), 109 - ), 110 - song_table_format: [ 111 - ( 112 - prop: (kind: Property(Artist), style: (fg: "${cat.teal.hex}"), default: (kind: Text("Unknown"))), 113 - width: "50%", 114 - alignment: Right, 115 - ), 116 - ( 117 - prop: (kind: Text("-"), style: (fg: "${cat.teal.hex}"), default: (kind: Text("Unknown"))), 118 - width: "1", 119 - alignment: Center, 120 - ), 121 - ( 122 - prop: (kind: Property(Title), style: (fg: "${accent.hex}"), default: (kind: Text("Unknown"))), 123 - width: "50%", 124 - ), 125 - ], 126 - header: ( 127 - rows: [ 128 - ( 129 - left: [ 130 - (kind: Text("["), style: (fg: "${cat.teal.hex}", modifiers: "Bold")), 131 - (kind: Property(Status(State)), style: (fg: "${cat.teal.hex}", modifiers: "Bold")), 132 - (kind: Text("]"), style: (fg: "${cat.teal.hex}", modifiers: "Bold")) 133 - ], 134 - center: [ 135 - (kind: Property(Song(Artist)), style: (fg: "${cat.yellow.hex}", modifiers: "Bold"), 136 - default: (kind: Text("Unknown"), style: (fg: "${cat.yellow.hex}", modifiers: "Bold")) 137 - ), 138 - (kind: Text(" - ")), 139 - (kind: Property(Song(Title)), style: (fg: "${accent.hex}", modifiers: "Bold"), 140 - default: (kind: Text("No Song"), style: (fg: "${accent.hex}", modifiers: "Bold")) 141 - ) 142 - ], 143 - right: [ 144 - (kind: Text("Vol: "), style: (fg: "${cat.teal.hex}", modifiers: "Bold")), 145 - (kind: Property(Status(Volume)), style: (fg: "${cat.teal.hex}", modifiers: "Bold")), 146 - (kind: Text("% "), style: (fg: "${cat.teal.hex}", modifiers: "Bold")) 147 - ] 148 - ) 149 - ], 150 - ), 151 - ) 152 - ''; 153 - configFile = '' 154 - #![enable(implicit_some)] 155 - #![enable(unwrap_newtypes)] 156 - #![enable(unwrap_variant_newtypes)] 157 - ( 158 - address: "127.0.0.1:6600", 159 - password: None, 160 - theme: Some("catppuccin"), 161 - cache_dir: None, 162 - lyrics_dir: "${config.home-manager.users.bean.services.mpd.musicDirectory}", 163 - on_song_change: None, 164 - volume_step: 5, 165 - max_fps: 30, 166 - scrolloff: 0, 167 - wrap_navigation: true, 168 - enable_mouse: true, 169 - enable_config_hot_reload: true, 170 - status_update_interval_ms: 1000, 171 - rewind_to_start_sec: None, 172 - reflect_changes_to_playlist: false, 173 - select_current_song_on_change: false, 174 - browser_song_sort: [Disc, Track, Artist, Title], 175 - directories_sort: SortFormat(group_by_type: true, reverse: false), 176 - album_art: ( 177 - method: Auto, 178 - max_size_px: (width: 1200, height: 1200), 179 - disabled_protocols: ["http://", "https://"], 180 - vertical_align: Center, 181 - horizontal_align: Center, 182 - ), 183 - cava: ( 184 - framerate: 60, // default 60 185 - autosens: true, // default true 186 - sensitivity: 100, // default 100 187 - lower_cutoff_freq: 50, // not passed to cava if not provided 188 - higher_cutoff_freq: 10000, // not passed to cava if not provided 189 - input: ( 190 - method: Fifo, 191 - source: "/tmp/mpd.fifo", 192 - sample_rate: 44100, 193 - channels: 2, 194 - sample_bits: 16, 195 - ), 196 - smoothing: ( 197 - noise_reduction: 77, // default 77 198 - monstercat: false, // default false 199 - waves: false, // default false 200 - ), 201 - eq: [] 202 - ), 203 - keybinds: ( 204 - global: { 205 - ":": CommandMode, 206 - ",": VolumeDown, 207 - "s": Stop, 208 - ".": VolumeUp, 209 - "<Tab>": NextTab, 210 - "<S-Tab>": PreviousTab, 211 - "1": SwitchToTab("Queue"), 212 - "2": SwitchToTab("Directories"), 213 - "3": SwitchToTab("Search"), 214 - "q": Quit, 215 - ">": NextTrack, 216 - "p": TogglePause, 217 - "<": PreviousTrack, 218 - "f": SeekForward, 219 - "z": ToggleRepeat, 220 - "x": ToggleRandom, 221 - "c": ToggleConsume, 222 - "v": ToggleSingle, 223 - "b": SeekBack, 224 - "~": ShowHelp, 225 - "u": Update, 226 - "U": Rescan, 227 - "I": ShowCurrentSongInfo, 228 - "O": ShowOutputs, 229 - "P": ShowDecoders, 230 - "R": AddRandom, 231 - }, 232 - navigation: { 233 - "k": Up, 234 - "j": Down, 235 - "h": Left, 236 - "l": Right, 237 - "<Up>": Up, 238 - "<Down>": Down, 239 - "<Left>": Left, 240 - "<Right>": Right, 241 - "<C-k>": PaneUp, 242 - "<C-j>": PaneDown, 243 - "<C-h>": PaneLeft, 244 - "<C-l>": PaneRight, 245 - "<C-u>": UpHalf, 246 - "N": PreviousResult, 247 - "a": Add, 248 - "A": AddAll, 249 - "r": Rename, 250 - "n": NextResult, 251 - "g": Top, 252 - "<Space>": Select, 253 - "<C-Space>": InvertSelection, 254 - "G": Bottom, 255 - "<CR>": Confirm, 256 - "i": FocusInput, 257 - "J": MoveDown, 258 - "<C-d>": DownHalf, 259 - "/": EnterSearch, 260 - "<C-c>": Close, 261 - "<Esc>": Close, 262 - "K": MoveUp, 263 - "D": Delete, 264 - "B": ShowInfo, 265 - }, 266 - queue: { 267 - "D": DeleteAll, 268 - "<CR>": Play, 269 - "<C-s>": Save, 270 - "a": AddToPlaylist, 271 - "d": Delete, 272 - "C": JumpToCurrent, 273 - "X": Shuffle, 274 - }, 275 - ), 276 - search: ( 277 - case_sensitive: false, 278 - mode: Contains, 279 - tags: [ 280 - (value: "any", label: "Any Tag"), 281 - (value: "artist", label: "Artist"), 282 - (value: "album", label: "Album"), 283 - (value: "albumartist", label: "Album Artist"), 284 - (value: "title", label: "Title"), 285 - (value: "filename", label: "Filename"), 286 - (value: "genre", label: "Genre"), 287 - ], 288 - ), 289 - artists: ( 290 - album_display_mode: SplitByDate, 291 - album_sort_by: Date, 292 - ), 293 - tabs: [ 294 - ( 295 - name: "Queue", 296 - pane: Split( 297 - direction: Horizontal, 298 - panes: [ 299 - (size: "60%", pane: Split( 300 - direction: Vertical, 301 - panes: [ 302 - (size: "50%", pane: Pane(Queue)), 303 - (size: "50%", borders: "TOP", pane: Pane(Cava)), 304 - ], 305 - )), 306 - (size: "40%", borders: "LEFT", pane: Split( 307 - direction: Vertical, 308 - panes: [ 309 - (size: "70%", pane: Pane(AlbumArt)), 310 - (size: "30%", borders: "TOP", pane: Pane(Lyrics)), 311 - ], 312 - )), 313 - ], 314 - ), 315 - ), 316 - ( 317 - name: "Directories", 318 - pane: Pane(Directories), 319 - ), 320 - ( 321 - name: "Search", 322 - pane: Pane(Search), 323 - ), 324 - ], 325 - ) 326 - ''; 327 - in { 328 - home-manager.users.bean = { 329 - programs.cava = { 330 - enable = true; 331 - }; 332 - 333 - xdg.configFile."rmpc/themes/catppuccin.ron".text = themeFile; 334 - 335 - programs.rmpc = { 336 - enable = true; 337 - config = configFile; 338 - }; 339 - 340 - services = { 341 - mpd = { 342 - enable = true; 343 - extraConfig = '' 344 - audio_output { 345 - type "fifo" 346 - name "mpd_fifo" 347 - path "/tmp/mpd.fifo" 348 - format "44100:16:2" 349 - } 350 - audio_output { 351 - type "pipewire" 352 - name "Pipewire" 353 - } 354 - ''; 355 - }; 356 - mpdris2.enable = true; 357 - }; 358 - }; 359 - }
-43
oldNixosModules/networking.nix
··· 1 - {pkgs, ...}: { 2 - hardware.bluetooth = { 3 - enable = true; 4 - settings = { 5 - General = { 6 - Experimental = true; 7 - }; 8 - }; 9 - }; 10 - 11 - networking.wireless.iwd.enable = true; 12 - environment.systemPackages = with pkgs; [iw]; 13 - 14 - networking.useNetworkd = true; 15 - networking.useDHCP = true; 16 - 17 - systemd.network = { 18 - enable = true; 19 - wait-online = { 20 - anyInterface = true; 21 - enable = false; 22 - }; 23 - }; 24 - services.resolved = { 25 - enable = true; 26 - llmnr = "false"; 27 - fallbackDns = [ 28 - "2606:4700:4700::1111" 29 - "2606:4700:4700::1001" 30 - "1.1.1.1" 31 - "1.0.0.1" 32 - ]; 33 - }; 34 - services.timesyncd.servers = map (x: "time-${x}-g.nist.gov") [ 35 - "a" 36 - "b" 37 - "c" 38 - "d" 39 - "e" 40 - "f" 41 - "g" 42 - ]; 43 - }
-3
oldNixosModules/normalboot.nix
··· 1 - {...}: { 2 - boot.loader.systemd-boot.enable = true; 3 - }
-3
oldNixosModules/podman.nix
··· 1 - {...}: { 2 - virtualisation.podman.enable = true; 3 - }
-17
oldNixosModules/secureboot.nix
··· 1 - { 2 - inputs, 3 - lib, 4 - ... 5 - }: { 6 - imports = [inputs.lanzaboote.nixosModules.lanzaboote]; 7 - 8 - boot = { 9 - loader.systemd-boot.enable = lib.mkForce false; 10 - bootspec.enable = true; 11 - 12 - lanzaboote = { 13 - enable = true; 14 - pkiBundle = lib.mkDefault "/etc/secureboot"; 15 - }; 16 - }; 17 - }
-34
oldNixosModules/ssh.nix
··· 1 - { 2 - lib, 3 - config, 4 - ... 5 - }: let 6 - beanPubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKb2qxNUbvdBTAntmUyPIaOXwFd1nhZO/SS00SNss0nU"; 7 - in { 8 - users.users."bean".openssh.authorizedKeys.keys = [ 9 - beanPubkey 10 - ]; 11 - 12 - environment.enableAllTerminfo = true; 13 - 14 - services.openssh = { 15 - enable = true; 16 - openFirewall = true; 17 - banner = '' 18 - -=≡ ${lib.toUpper config.networking.hostName} ≡=- 19 - 20 - ''; 21 - listenAddresses = [ 22 - { 23 - addr = "0.0.0.0"; 24 - } 25 - ]; 26 - ports = [8069]; 27 - settings.GSSAPIAuthentication = false; 28 - settings.PasswordAuthentication = false; 29 - settings.UseDns = false; 30 - # settings.LogLevel = "DEBUG1"; 31 - settings.PermitRootLogin = "no"; 32 - settings.KbdInteractiveAuthentication = false; 33 - }; 34 - }
-14
oldNixosModules/sync.nix
··· 1 - {...}: { 2 - services.syncthing = { 3 - enable = true; 4 - user = "bean"; 5 - group = "users"; 6 - openDefaultPorts = true; 7 - 8 - dataDir = "/home/bean"; 9 - overrideFolders = false; 10 - overrideDevices = false; 11 - 12 - settings.options.urAccepted = -1; 13 - }; 14 - }
-4
oldNixosModules/vm.nix
··· 1 - {modulesPath, ...}: { 2 - imports = ["${modulesPath}/virtualisation/qemu-vm.nix"]; 3 - services.qemuGuest.enable = true; 4 - }
-78
oldSystemConfigs/aperture.nix
··· 1 - { 2 - inputs, 3 - outputs, 4 - ... 5 - }: { 6 - system = "x86_64-linux"; 7 - 8 - modules = [ 9 - (outputs.lib.applyRoles ["base" "latest-linux" "dev" "graphics" "games" "fun" "social" "imperm" "secureboot" "networking" "hypervisor" "podman" "sync" "music"]) 10 - inputs.nixos-hardware.nixosModules.framework-13th-gen-intel 11 - 12 - ( 13 - { 14 - config, 15 - lib, 16 - pkgs, 17 - modulesPath, 18 - inputs, 19 - outputs, 20 - ... 21 - }: { 22 - system.stateVersion = "25.05"; 23 - networking.hostName = "aperture"; 24 - 25 - services.fprintd.enable = true; 26 - 27 - boot.initrd.availableKernelModules = ["xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod"]; 28 - boot.initrd.kernelModules = []; 29 - boot.kernelModules = ["kvm-intel"]; 30 - boot.extraModulePackages = []; 31 - boot.binfmt.emulatedSystems = ["aarch64-linux"]; 32 - 33 - hardware.framework.enableKmod = false; 34 - 35 - fileSystems."/" = { 36 - fsType = "tmpfs"; 37 - options = ["size=512M" "mode=755"]; 38 - neededForBoot = true; 39 - }; 40 - 41 - fileSystems."/home" = { 42 - fsType = "tmpfs"; 43 - options = ["size=2G"]; 44 - neededForBoot = true; 45 - }; 46 - 47 - fileSystems."/boot" = { 48 - device = "/dev/disk/by-uuid/88E4-A64F"; 49 - fsType = "vfat"; 50 - options = ["fmask=0022" "dmask=0022" "nosuid" "nodev" "noexec" "noatime"]; 51 - }; 52 - 53 - fileSystems."/nix" = { 54 - device = "/dev/disk/by-uuid/fd9f484a-a5ef-4378-b054-d292b0204afb"; 55 - fsType = "ext4"; 56 - options = ["lazytime" "nodev" "nosuid"]; 57 - neededForBoot = true; 58 - }; 59 - 60 - boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/330c8e83-23cd-46bf-99b3-75a7f5d7c5dc"; 61 - boot.initrd.luks.devices."cryptswap".device = "/dev/disk/by-uuid/c599ad48-750b-458d-8361-601bee3eb066"; 62 - 63 - swapDevices = [ 64 - {device = "/dev/disk/by-uuid/834d0d23-6a06-416f-853f-36c6ce81f355";} 65 - ]; 66 - 67 - networking.useDHCP = lib.mkDefault true; 68 - 69 - services.fwupd.enable = true; 70 - 71 - powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; 72 - hardware.enableRedistributableFirmware = lib.mkDefault true; 73 - hardware.cpu.intel.updateMicrocode = 74 - lib.mkDefault config.hardware.enableRedistributableFirmware; 75 - } 76 - ) 77 - ]; 78 - }
-144
oldSystemConfigs/black-mesa.nix
··· 1 - { 2 - outputs, 3 - inputs, 4 - ... 5 - }: { 6 - system = "x86_64-linux"; 7 - specialArgs.inputs = inputs // inputs.spoon.inputs // {inherit (inputs) self;}; 8 - 9 - modules = [ 10 - inputs.spoon.nixosModules.black-mesa 11 - (outputs.lib.applyRoles [ 12 - "base" 13 - "latest-linux" 14 - "networking" 15 - "ssh" 16 - "graphics" 17 - "games" 18 - "sync" 19 - "fun" 20 - "dev" 21 - "normalboot" 22 - "mc-server" 23 - ]) 24 - { 25 - systemd.network.links."79-eth-wol" = { 26 - matchConfig = { 27 - Type = "ether"; 28 - Driver = "!veth"; 29 - Virtualization = "false"; 30 - }; 31 - linkConfig = { 32 - WakeOnLan = "magic"; 33 - NamePolicy = "keep kernel database onboard slot path"; 34 - AlternativeNamesPolicy = "database onboard slot path mac"; 35 - MACAddressPolicy = "persistent"; 36 - }; 37 - }; 38 - } 39 - { 40 - imports = [inputs.bingus.nixosModules.default]; 41 - nixpkgs.overlays = [inputs.bingus.overlays.default]; 42 - 43 - services.bingus-bot = { 44 - enable = true; 45 - replyChannels = [ 46 - 1295447496948191262 47 - 1295245646542143489 48 - ]; 49 - }; 50 - } 51 - ( 52 - { 53 - modulesPath, 54 - lib, 55 - config, 56 - pkgs, 57 - ... 58 - }: { 59 - imports = [(modulesPath + "/installer/scan/not-detected.nix")]; 60 - networking.hostName = "black-mesa"; 61 - system.stateVersion = "25.05"; 62 - 63 - boot.initrd.availableKernelModules = [ 64 - "nvme" 65 - "xhci_pci" 66 - "ahci" 67 - "usbhid" 68 - "usb_storage" 69 - "sd_mod" 70 - ]; 71 - boot.kernelModules = ["kvm-amd"]; 72 - boot.extraModulePackages = []; 73 - 74 - services.pulseaudio.enable = false; 75 - 76 - security.rtkit.enable = true; # Allows pipewire and friends to run realtime 77 - 78 - services.pipewire = { 79 - enable = true; 80 - pulse.enable = true; 81 - alsa = { 82 - enable = true; 83 - support32Bit = true; 84 - }; 85 - }; 86 - 87 - programs.steam = { 88 - enable = true; 89 - remotePlay.openFirewall = true; 90 - dedicatedServer.openFirewall = true; 91 - localNetworkGameTransfers.openFirewall = true; 92 - }; 93 - 94 - programs.gamescope = { 95 - enable = true; 96 - # package = pkgs.gamescope.overrideAttrs (new: old: { 97 - # src = pkgs.fetchFromGitHub { 98 - # owner = "ValveSoftware"; 99 - # repo = "gamescope"; 100 - # rev = "186f3a3ed0ce8eb5f3a956d3916a3331ea4e3ab2"; 101 - # fetchSubmodules = true; 102 - # hash = "sha256-zAzIi3syJYtbKjydp19d1OxZvMjXb+eO+mXT/mJPEuA="; 103 - # }; 104 - # }); 105 - capSysNice = true; 106 - }; 107 - 108 - fileSystems."/" = { 109 - device = "/dev/nvme0n1p2"; 110 - fsType = "ext4"; 111 - }; 112 - 113 - fileSystems."/boot" = { 114 - device = "/dev/nvme0n1p1"; 115 - fsType = "vfat"; 116 - }; 117 - 118 - fileSystems."/mnt/storage" = { 119 - device = "/dev/sda1"; 120 - fsType = "btrfs"; 121 - }; 122 - 123 - swapDevices = []; 124 - 125 - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; 126 - 127 - hardware.graphics = { 128 - enable = true; 129 - enable32Bit = true; 130 - }; 131 - hardware.amdgpu = { 132 - initrd.enable = true; 133 - }; 134 - services.xserver.videoDrivers = ["modesetting"]; 135 - 136 - # services.nix-serve = { 137 - # enable = true; 138 - # secretKeyFile = "/etc/nix-serve-key"; 139 - # openFirewall = true; 140 - # }; 141 - } 142 - ) 143 - ]; 144 - }
-65
oldSystemConfigs/installer.nix
··· 1 - {outputs, ...}: { 2 - system = "x86_64-linux"; 3 - modules = [ 4 - (outputs.lib.applyRoles [ 5 - "base" 6 - "latest-linux" 7 - "dev" 8 - "networking" 9 - "fun" 10 - ]) 11 - ( 12 - { 13 - pkgs, 14 - lib, 15 - inputs, 16 - edition, 17 - config, 18 - modulesPath, 19 - ... 20 - }: { 21 - system.stateVersion = "25.05"; 22 - networking.hostName = "nixos-installer-bwc9876"; 23 - networking.networkmanager.enable = lib.mkForce false; 24 - 25 - imports = [ 26 - "${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix" 27 - ]; 28 - 29 - services.kmscon = { 30 - enable = true; 31 - autologinUser = "bean"; 32 - fonts = [ 33 - { 34 - name = "FiraMono Nerd Font Mono"; 35 - package = pkgs.nerd-fonts.fira-mono; 36 - } 37 - ]; 38 - }; 39 - 40 - boot = let 41 - supportedFilesystems = { 42 - btrfs = true; 43 - reiserfs = lib.mkForce false; 44 - vfat = true; 45 - f2fs = true; 46 - xfs = true; 47 - ntfs = true; 48 - cifs = true; 49 - zfs = lib.mkForce false; 50 - }; 51 - in { 52 - initrd.systemd.enable = false; 53 - inherit supportedFilesystems; 54 - initrd = { 55 - inherit supportedFilesystems; 56 - }; 57 - }; 58 - 59 - environment.systemPackages = with pkgs; [ 60 - gptfdisk 61 - ]; 62 - } 63 - ) 64 - ]; 65 - }
-25
oldSystemConfigs/mann-co.nix
··· 1 - { 2 - inputs, 3 - outputs, 4 - ... 5 - }: { 6 - system = "aarch64-linux"; 7 - 8 - modules = [ 9 - (outputs.lib.applyRoles ["base" "ssh"]) 10 - ({pkgs, ...}: { 11 - boot.kernelPackages = pkgs.linuxPackages_rpi4; 12 - system.stateVersion = "25.05"; 13 - networking.hostName = "mann-co"; 14 - nixpkgs.overlays = [ 15 - (final: super: { 16 - makeModulesClosure = x: 17 - super.makeModulesClosure (x // {allowMissing = true;}); 18 - }) 19 - ]; 20 - }) 21 - "${inputs.nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix" 22 - {disabledModules = ["${inputs.nixpkgs}/nixos/modules/profiles/base.nix"];} 23 - inputs.nixos-hardware.nixosModules.raspberry-pi-4 24 - ]; 25 - }
-10
oldSystemConfigs/test.nix
··· 1 - {outputs, ...}: { 2 - system = "x86_64-linux"; 3 - modules = [ 4 - { 5 - system.stateVersion = "25.05"; 6 - networking.hostName = "test"; 7 - } 8 - (outputs.lib.applyRoles ["base" "latest-linux" "normalboot" "vm"]) 9 - ]; 10 - }