diff options
author | Azat Bahawi <azat@bahawi.net> | 2024-03-19 10:51:20 +0300 |
---|---|---|
committer | Azat Bahawi <azat@bahawi.net> | 2024-03-19 10:51:20 +0300 |
commit | 80bdf22e9f97bdbb6d5a720dcc705fb55f3bc299 (patch) | |
tree | 92c18febe273f94d488a17d9bfdeeade4f3aaaef | |
parent | 2024-03-17 (diff) |
2024-03-19
-rw-r--r-- | modules/common/common/stylix.nix | 5 | ||||
-rw-r--r-- | modules/common/emacs/default.nix | 4 | ||||
-rw-r--r-- | modules/common/vscode.nix | 327 | ||||
-rw-r--r-- | modules/nixos/common/stylix.nix | 9 | ||||
-rw-r--r-- | modules/nixos/kde.nix | 5 |
5 files changed, 176 insertions, 174 deletions
diff --git a/modules/common/common/stylix.nix b/modules/common/common/stylix.nix index 621fd4d..2380096 100644 --- a/modules/common/common/stylix.nix +++ b/modules/common/common/stylix.nix @@ -22,6 +22,7 @@ with lib; { source-han-mono source-han-sans source-han-serif + twitter-color-emoji ]; readOnly = true; }; @@ -49,8 +50,8 @@ with lib; { }; monospace = { - package = pkgs.iosevka-bin.override {variant = "SS15";}; - name = "Iosevka SS15"; + package = pkgs.iosevka-bin; + name = "Iosevka"; }; sizes = { diff --git a/modules/common/emacs/default.nix b/modules/common/emacs/default.nix index 6c5ee1e..17183fc 100644 --- a/modules/common/emacs/default.nix +++ b/modules/common/emacs/default.nix @@ -172,9 +172,7 @@ in { (appendq! auth-sources '(("${config.secrets.authinfo.path}"))) - (setq doom-font (font-spec - :family "${config.stylix.fonts.monospace.name}" - :size 16) + (setq doom-font (font-spec :size 16) doom-unicode-font doom-font) ;; :input japanese diff --git a/modules/common/vscode.nix b/modules/common/vscode.nix index 0780b0b..8901113 100644 --- a/modules/common/vscode.nix +++ b/modules/common/vscode.nix @@ -26,198 +26,203 @@ in { }; config = mkIf cfg.enable { - hm.programs.vscode = with config.nixfiles; - with modules; - with profiles; { - enable = true; - - inherit (cfg) package; - - extensions = with pkgs.open-vsx; - [ - editorconfig.editorconfig - efoerster.texlab - github.vscode-pull-request-github - gitlab.gitlab-workflow - golang.go - graphql.vscode-graphql - graphql.vscode-graphql-execution - graphql.vscode-graphql-syntax - hashicorp.hcl - hashicorp.terraform - haskell.haskell - jnoortheen.nix-ide - kahole.magit - mads-hartmann.bash-ide-vscode - mkhl.direnv - ms-kubernetes-tools.vscode-kubernetes-tools - ms-python.python - redhat.ansible - redhat.vscode-xml - redhat.vscode-yaml - rust-lang.rust - signageos.signageos-vscode-sops - skellock.just - streetsidesoftware.code-spell-checker - streetsidesoftware.code-spell-checker-british-english - streetsidesoftware.code-spell-checker-russian - streetsidesoftware.code-spell-checker-scientific-terms - tamasfe.even-better-toml - task.vscode-task - vscode-org-mode.org-mode - ziglang.vscode-zig - ] - ++ optional cfg.vim.enable vscodevim.vim; - - userSettings = { - editor = { - codeLens = false; - cursorStyle = "block"; - detectIndentation = true; - minimap.enabled = false; - renderWhitespace = "trailing"; - rulers = [80 120]; - smoothScrolling = false; - tabCompletion = "on"; - cursorSurroundingLines = 10; - scrollBeyondLastColumn = 10; - }; + hm = { + stylix.targets.vscode.enable = false; + + programs.vscode = with config.nixfiles; + with modules; + with profiles; { + enable = true; + + inherit (cfg) package; + + extensions = with pkgs.open-vsx; + [ + editorconfig.editorconfig + efoerster.texlab + github.vscode-pull-request-github + gitlab.gitlab-workflow + golang.go + graphql.vscode-graphql + graphql.vscode-graphql-execution + graphql.vscode-graphql-syntax + hashicorp.hcl + hashicorp.terraform + haskell.haskell + jnoortheen.nix-ide + kahole.magit + mads-hartmann.bash-ide-vscode + mkhl.direnv + ms-kubernetes-tools.vscode-kubernetes-tools + ms-python.python + redhat.ansible + redhat.vscode-xml + redhat.vscode-yaml + rust-lang.rust + signageos.signageos-vscode-sops + skellock.just + streetsidesoftware.code-spell-checker + streetsidesoftware.code-spell-checker-british-english + streetsidesoftware.code-spell-checker-russian + streetsidesoftware.code-spell-checker-scientific-terms + tamasfe.even-better-toml + task.vscode-task + vscode-org-mode.org-mode + ziglang.vscode-zig + ] + ++ optional cfg.vim.enable vscodevim.vim; + + userSettings = { + editor = { + codeLens = false; + cursorStyle = "block"; + detectIndentation = true; + minimap.enabled = false; + renderWhitespace = "trailing"; + rulers = [80 120]; + smoothScrolling = false; + tabCompletion = "on"; + cursorSurroundingLines = 10; + scrollBeyondLastColumn = 10; + }; - keyboard.dispatch = "keyCode"; + keyboard.dispatch = "keyCode"; - diffEditor.codeLens = false; + diffEditor.codeLens = false; - files = { - autoSave = "off"; - enableTrash = false; - }; + files = { + autoSave = "off"; + enableTrash = false; + }; - workbench = { - activityBar.location = "hidden"; - editor.highlightModifiedTabs = true; - enableExperiments = false; - settings.enableNaturalLanguageSearch = false; - startupEditor = "none"; - tips.enabled = false; - tree.indent = 4; - welcomePage = { - walkthroughs.openOnInstall = false; - preferReducedMotion = true; + workbench = { + activityBar.location = "hidden"; + colorTheme = "Default Light Modern"; + editor.highlightModifiedTabs = true; + enableExperiments = false; + settings.enableNaturalLanguageSearch = false; + startupEditor = "none"; + tips.enabled = false; + tree.indent = 4; + welcomePage = { + walkthroughs.openOnInstall = false; + preferReducedMotion = true; + }; }; - }; - extensions = { - autoCheckUpdates = false; - autoUpdate = false; - ignoreRecommendations = true; - }; + extensions = { + autoCheckUpdates = false; + autoUpdate = false; + ignoreRecommendations = true; + }; - terminal.integrated = { - enableBell = true; - }; + terminal.integrated = { + enableBell = true; + }; - update = { - mode = "none"; - showReleaseNotes = false; - }; + update = { + mode = "none"; + showReleaseNotes = false; + }; - telemetry = { - enableCrashReporter = false; - enableTelemetry = false; - }; + telemetry = { + enableCrashReporter = false; + enableTelemetry = false; + }; - security.workspace.trust.enabled = false; + security.workspace.trust.enabled = false; - # Extensions. + # Extensions. - ansible = { ansible = { - useFullyQualifiedCollectionNames = true; - reuseTerminal = true; + ansible = { + useFullyQualifiedCollectionNames = true; + reuseTerminal = true; + }; + validation.lint.path = getExe' pkgs.ansible-lint "ansible-lint"; }; - validation.lint.path = getExe' pkgs.ansible-lint "ansible-lint"; - }; - bashIde.shellcheckPath = getExe' pkgs.shellcheck "shellcheck"; + bashIde.shellcheckPath = getExe' pkgs.shellcheck "shellcheck"; - cSpell.language = "en-GB,en,ru"; + cSpell.language = "en-GB,en,ru"; - direnv = { - restart.automatic = true; - }; + direnv = { + restart.automatic = true; + }; - magit = { - forge-enabled = true; - git-path = getExe config.hm.programs.git.package; - }; + magit = { + forge-enabled = true; + git-path = getExe config.hm.programs.git.package; + }; - git.openRepositoryInParentFolders = "always"; + git.openRepositoryInParentFolders = "always"; - github = { - branchProtection = true; - gitProtocol = "ssh"; - }; + github = { + branchProtection = true; + gitProtocol = "ssh"; + }; - terraform = { - languageServer.path = getExe' pkgs.terraform-ls "terraform-ls"; - languageServer.terraform.path = getExe pkgs.opentofu; - }; + terraform = { + languageServer.path = getExe' pkgs.terraform-ls "terraform-ls"; + languageServer.terraform.path = getExe pkgs.opentofu; + }; - haskell = { - formattingProvider = "ormolu"; - serverExecutablePath = getExe' pkgs.haskell-language-server "haskell-language-server"; - }; + haskell = { + formattingProvider = "ormolu"; + serverExecutablePath = getExe' pkgs.haskell-language-server "haskell-language-server"; + }; - nix = { - enableLanguageServer = true; - serverPath = getExe pkgs.nil; - }; + nix = { + enableLanguageServer = true; + serverPath = getExe pkgs.nil; + }; - python = with pkgs.python311Packages; { - experiments.optOutFrom = ["All"]; - pipenvPath = getExe' pkgs.pipenv "pipenv"; - poetryPath = getExe' pkgs.poetry "poetry"; - formatting = { - provider = "black"; - autopep8Path = getExe' autopep8 "autopep8"; - blackPath = getExe' black "black"; - yapfPath = getExe' yapf "yapf"; - }; - linting = { - enabled = true; - banditPath = getExe' bandit "bandit"; - flake8Path = getExe' flake8 "flake8"; - mypyPath = getExe' mypy "mypy"; - pycodestylePath = getExe' pycodestyle "pycodestyle"; - pydocstylePath = getExe' pydocstyle "pydocstyle"; - pylamaPath = getExe' pylama "pylama"; - pylintPath = getExe' pylint "pylint"; - }; - testing = { - pytestPath = getExe' pytest "pytest"; + python = with pkgs.python311Packages; { + experiments.optOutFrom = ["All"]; + pipenvPath = getExe' pkgs.pipenv "pipenv"; + poetryPath = getExe' pkgs.poetry "poetry"; + formatting = { + provider = "black"; + autopep8Path = getExe' autopep8 "autopep8"; + blackPath = getExe' black "black"; + yapfPath = getExe' yapf "yapf"; + }; + linting = { + enabled = true; + banditPath = getExe' bandit "bandit"; + flake8Path = getExe' flake8 "flake8"; + mypyPath = getExe' mypy "mypy"; + pycodestylePath = getExe' pycodestyle "pycodestyle"; + pydocstylePath = getExe' pydocstyle "pydocstyle"; + pylamaPath = getExe' pylama "pylama"; + pylintPath = getExe' pylint "pylint"; + }; + testing = { + pytestPath = getExe' pytest "pytest"; + }; }; - }; - rust-client = { - disableRustup = true; - rustupPath = getExe' pkgs.rustup "rustup"; - rustfmt_path = getExe pkgs.rustfmt; - }; + rust-client = { + disableRustup = true; + rustupPath = getExe' pkgs.rustup "rustup"; + rustfmt_path = getExe pkgs.rustfmt; + }; - vim = mkIf cfg.vim.enable { - easymotion = true; + vim = mkIf cfg.vim.enable { + easymotion = true; - leader = " "; + leader = " "; - useSystemClipboard = true; - }; + useSystemClipboard = true; + }; - zig.zls = { - checkForUpdate = false; - path = getExe' pkgs.zls "zls"; - }; + zig.zls = { + checkForUpdate = false; + path = getExe' pkgs.zls "zls"; + }; - redhat.telemetry.enabled = false; + redhat.telemetry.enabled = false; + }; }; }; diff --git a/modules/nixos/common/stylix.nix b/modules/nixos/common/stylix.nix index 7ac7fa7..5ca5571 100644 --- a/modules/nixos/common/stylix.nix +++ b/modules/nixos/common/stylix.nix @@ -17,26 +17,27 @@ with lib; { fonts = { packages = mkAfter config.nixfiles.modules.common.stylix.fonts.extraPackages; - fontconfig.defaultFonts = { + fontconfig.defaultFonts = with config.stylix.fonts; { serif = mkForce [ - "Iosevka Etoile" + serif.name "Sarasa Gothic" "Source Han Serif" "Noto Serif" ]; sansSerif = mkForce [ - "Iosevka Aile" + sansSerif.name "Sarasa Gothic" "Source Han Sans" "Noto Sans" ]; monospace = mkForce [ - "Iosevka SS15" + monospace.name "Sarasa Mono" "Source Han Mono" "Noto Sans Mono" ]; emoji = mkForce [ + "Twitter Color Emoji" "Noto Color Emoji" ]; }; diff --git a/modules/nixos/kde.nix b/modules/nixos/kde.nix index 0bdf6f9..2f6aa92 100644 --- a/modules/nixos/kde.nix +++ b/modules/nixos/kde.nix @@ -45,10 +45,7 @@ in { services = { desktopManager.plasma6.enable = true; - xserver.displayManager.sddm = { - enable = true; - wayland.enable = true; - }; + xserver.displayManager.sddm.enable = true; }; environment.plasma6.excludePackages = with pkgs.kdePackages; [ |