From 77d7d27da611c2716b091b695fdc24077d18d13b Mon Sep 17 00:00:00 2001 From: andrei Date: Thu, 7 May 2026 19:42:20 +0700 Subject: [PATCH] start of config --- flake.lock | 199 +---------------- flake.nix | 15 -- modules/hosts/laptop/configuration.nix | 61 +++--- .../hosts/laptop/hardware-configuration.nix | 50 ++--- modules/programs/base.nix | 12 +- modules/programs/bash.nix | 6 +- modules/programs/gamedev.nix | 21 -- modules/programs/gaming.nix | 11 - modules/programs/kitty.nix | 2 +- modules/programs/nvf.nix | 148 ------------- modules/programs/vpn.nix | 10 - modules/programs/vscode.nix | 41 ++++ modules/programs/zen-browser.nix | 82 ------- modules/sessions/cinnamon/cinnamon-dconf.nix | 199 ----------------- modules/sessions/cinnamon/cinnamon.nix | 26 --- modules/sessions/cinnamon/dconf.nix.temp | 202 ------------------ modules/sessions/niri/config.kdl | 15 +- modules/sessions/niri/niri.nix | 33 +-- modules/sessions/niri/noctalia.nix | 4 +- modules/sessions/plasma.nix | 64 ------ modules/sessions/xfce-rdp.nix | 24 +++ modules/theme.nix | 2 +- 22 files changed, 156 insertions(+), 1071 deletions(-) delete mode 100644 modules/programs/gamedev.nix delete mode 100644 modules/programs/gaming.nix delete mode 100644 modules/programs/nvf.nix delete mode 100644 modules/programs/vpn.nix create mode 100644 modules/programs/vscode.nix delete mode 100644 modules/programs/zen-browser.nix delete mode 100644 modules/sessions/cinnamon/cinnamon-dconf.nix delete mode 100644 modules/sessions/cinnamon/cinnamon.nix delete mode 100644 modules/sessions/cinnamon/dconf.nix.temp delete mode 100644 modules/sessions/plasma.nix create mode 100644 modules/sessions/xfce-rdp.nix diff --git a/flake.lock b/flake.lock index d3b1e5d..21691c1 100644 --- a/flake.lock +++ b/flake.lock @@ -1,21 +1,5 @@ { "nodes": { - "flake-compat": { - "flake": false, - "locked": { - "lastModified": 1751685974, - "narHash": "sha256-NKw96t+BgHIYzHUjkTK95FqYRVKB8DHpVhefWSz/kTw=", - "ref": "refs/heads/main", - "rev": "549f2762aebeff29a2e5ece7a7dc0f955281a1d1", - "revCount": 92, - "type": "git", - "url": "https://git.lix.systems/lix-project/flake-compat.git" - }, - "original": { - "type": "git", - "url": "https://git.lix.systems/lix-project/flake-compat.git" - } - }, "flake-parts": { "inputs": { "nixpkgs-lib": "nixpkgs-lib" @@ -34,48 +18,6 @@ "type": "github" } }, - "flake-parts_2": { - "inputs": { - "nixpkgs-lib": [ - "nixvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1775087534, - "narHash": "sha256-91qqW8lhL7TLwgQWijoGBbiD4t7/q75KTi8NxjVmSmA=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "3107b77cd68437b9a76194f0f7f9c55f2329ca5b", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-parts_3": { - "inputs": { - "nixpkgs-lib": [ - "nvf", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1769996383, - "narHash": "sha256-AnYjnFWgS49RlqX7LrC4uA+sCCDBj0Ry/WOJ5XWAsa0=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "57928607ea566b5db3ad13af0e57e921e6b12381", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, "home-manager": { "inputs": { "nixpkgs": [ @@ -111,43 +53,6 @@ "type": "github" } }, - "mnw": { - "locked": { - "lastModified": 1770419553, - "narHash": "sha256-b1XqsH7AtVf2dXmq2iyRr2NC1yG7skY7Z6N2MpWHlK4=", - "owner": "Gerg-L", - "repo": "mnw", - "rev": "2aaffa8030d0b262176146adbb6b0e6374ce2957", - "type": "github" - }, - "original": { - "owner": "Gerg-L", - "repo": "mnw", - "type": "github" - } - }, - "ndg": { - "inputs": { - "nixpkgs": [ - "nvf", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1776882296, - "narHash": "sha256-DWZozXwMsgvUqfVlL1mQ8dOxW7GJ/8CdyaDN+1niZRg=", - "owner": "feel-co", - "repo": "ndg", - "rev": "ab7d78d4884b3a34968cf9fa3d16c0c1246d5c6e", - "type": "github" - }, - "original": { - "owner": "feel-co", - "ref": "refs/tags/v2.6.0", - "repo": "ndg", - "type": "github" - } - }, "niri-flake": { "inputs": { "niri-stable": "niri-stable", @@ -253,28 +158,6 @@ "type": "github" } }, - "nixvim": { - "inputs": { - "flake-parts": "flake-parts_2", - "nixpkgs": [ - "nixpkgs" - ], - "systems": "systems" - }, - "locked": { - "lastModified": 1777236345, - "narHash": "sha256-ALOqlq7bE30lsX4rA76hXeQ2aLLEpb44hS+D1+jWS88=", - "owner": "nix-community", - "repo": "nixvim", - "rev": "a67d9cd6ff725a763afe88727aac73208ded3bf4", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixvim", - "type": "github" - } - }, "noctalia": { "inputs": { "nixpkgs": [ @@ -302,7 +185,7 @@ "noctalia", "nixpkgs" ], - "systems": "systems_2", + "systems": "systems", "treefmt-nix": "treefmt-nix" }, "locked": { @@ -319,31 +202,6 @@ "type": "github" } }, - "nvf": { - "inputs": { - "flake-compat": "flake-compat", - "flake-parts": "flake-parts_3", - "mnw": "mnw", - "ndg": "ndg", - "nixpkgs": [ - "nixpkgs" - ], - "systems": "systems_3" - }, - "locked": { - "lastModified": 1777478067, - "narHash": "sha256-2vZnUuv8fg2sIE6pXgGxZQQ3ZhQW1XE7Sxieg8gK2p4=", - "owner": "NotAShelf", - "repo": "nvf", - "rev": "13c4ad4b4bb926c22945e2fb8862769fe51f27f1", - "type": "github" - }, - "original": { - "owner": "NotAShelf", - "repo": "nvf", - "type": "github" - } - }, "root": { "inputs": { "flake-parts": "flake-parts", @@ -351,28 +209,10 @@ "import-tree": "import-tree", "niri-flake": "niri-flake", "nixpkgs": "nixpkgs", - "nixvim": "nixvim", - "noctalia": "noctalia", - "nvf": "nvf", - "zen-browser": "zen-browser" + "noctalia": "noctalia" } }, "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_2": { "locked": { "lastModified": 1689347949, "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", @@ -387,21 +227,6 @@ "type": "github" } }, - "systems_3": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, "treefmt-nix": { "inputs": { "nixpkgs": [ @@ -456,26 +281,6 @@ "repo": "xwayland-satellite", "type": "github" } - }, - "zen-browser": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1777612697, - "narHash": "sha256-h+tXBNMDrsKbD1UnYw0IeSIT4RalHtIJ1GLOviib7/8=", - "owner": "youwen5", - "repo": "zen-browser-flake", - "rev": "f9f70d14f9a57c7962c5cfe589461c1391044448", - "type": "github" - }, - "original": { - "owner": "youwen5", - "repo": "zen-browser-flake", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 27db4a0..271ebb4 100644 --- a/flake.nix +++ b/flake.nix @@ -5,11 +5,6 @@ import-tree.url = "github:vic/import-tree"; # nix-wrapper-modules.url = "github:BirdeeHub/nix-wrapper-modules"; - nixvim = { - url = "github:nix-community/nixvim"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - niri-flake = { url = "github:sodiboo/niri-flake"; inputs.nixpkgs.follows = "nixpkgs"; @@ -23,16 +18,6 @@ url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; - - nvf = { - url = "github:NotAShelf/nvf"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - - zen-browser = { - url = "github:youwen5/zen-browser-flake"; - inputs.nixpkgs.follows = "nixpkgs"; - }; }; outputs = inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } (inputs.import-tree ./modules); diff --git a/modules/hosts/laptop/configuration.nix b/modules/hosts/laptop/configuration.nix index 63b5bbd..c01b9c1 100644 --- a/modules/hosts/laptop/configuration.nix +++ b/modules/hosts/laptop/configuration.nix @@ -1,7 +1,3 @@ -# Edit this configuration file to define what should be installed on -# your system. Help is available in the configuration.nix(5) man page, on -# https://search.nixos.org/options and in the NixOS manual (`nixos-help`). - { self, ... }: { flake.nixosModules.laptop = { pkgs, ... }: { @@ -11,21 +7,20 @@ self.nixosModules.laptopHardware self.nixosModules.base - self.nixosModules.gamedev - self.nixosModules.gaming - + self.nixosModules.fastfetch self.nixosModules.home-manager - # self.nixosModules.cinnamon + #self.nixosModules.cinnamon self.nixosModules.niri - # self.nixosModules.plasma + self.nixosModules.xfcerdp + self.nixosModules.vscode ]; # Use the systemd-boot EFI boot loader. - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - boot.loader.timeout = 1; +# boot.loader.systemd-boot.enable = true; + # boot.loader.efi.canTouchEfiVariables = true; + # boot.loader.timeout = 1; # Use the GRUB EFI boot loader. # boot.loader = { @@ -38,6 +33,11 @@ # efi.canTouchEfiVariables = true; # }; + boot.loader.grub.enable = true; + boot.loader.grub.device = "/dev/sda"; + boot.loader.grub.useOSProber = true; + + # Enable flakes. nix.settings.experimental-features = [ "nix-command" "flakes" ]; @@ -57,10 +57,7 @@ networking.networkmanager.enable = true; # Set your time zone. - time.timeZone = "Asia/Almaty"; - - # Select internationalisation properties. - i18n.defaultLocale = "en_US.UTF-8"; + time.timeZone = "Asia/Krasnoyarsk"; # Enable CUPS to print documents. services.printing.enable = true; @@ -74,6 +71,22 @@ pulse.enable = true; }; +# Локализация + i18n.defaultLocale = "en_US.UTF-8"; + i18n.extraLocaleSettings = { + LC_ADDRESS = "ru_RU.UTF-8"; + LC_IDENTIFICATION = "ru_RU.UTF-8"; + LC_MEASUREMENT = "ru_RU.UTF-8"; + LC_MONETARY = "ru_RU.UTF-8"; + LC_NAME = "ru_RU.UTF-8"; + LC_NUMERIC = "ru_RU.UTF-8"; + LC_PAPER = "ru_RU.UTF-8"; + LC_TELEPHONE = "ru_RU.UTF-8"; + LC_TIME = "ru_RU.UTF-8"; + }; + + + # Enable TLP. services.tlp = { enable = true; @@ -96,22 +109,6 @@ # Allow unfree packages. nixpkgs.config.allowUnfree = true; - fileSystems = { - "/".options = [ "compress=zstd" ]; - "/home".options = [ "compress=zstd" ]; - "/nix".options = [ "compress=zstd" "noatime" ]; - }; - - # Mount /dev/nvme0n1p5 data partition. - fileSystems."/mnt/data" = { - device = "/dev/disk/by-uuid/a7614c0a-f5ee-4eab-a431-853affce8a34"; - fsType = "btrfs"; - options = [ - "users" - "nofail" - "exec" - ]; - }; system.stateVersion = "25.11"; # Did you read the comment? }; diff --git a/modules/hosts/laptop/hardware-configuration.nix b/modules/hosts/laptop/hardware-configuration.nix index e3e04df..05ea2db 100644 --- a/modules/hosts/laptop/hardware-configuration.nix +++ b/modules/hosts/laptop/hardware-configuration.nix @@ -1,45 +1,31 @@ +{ self, ... }: { flake.nixosModules.laptopHardware = { config, lib, pkgs, modulesPath, ... }: { - # Do not modify this file! It was generated by ‘nixos-generate-config’ - # and may be overwritten by future invocations. Please make changes - # to /etc/nixos/configuration.nix instead. + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; - - boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.availableKernelModules = [ "ata_piix" "mptspi" "uhci_hcd" "ehci_pci" "ahci" "sd_mod" "sr_mod" ]; boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; + boot.kernelModules = [ ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { device = "/dev/disk/by-uuid/aabb49a2-7563-4851-9e07-5656cd3fe765"; - fsType = "btrfs"; - options = [ "subvol=root" ]; - }; + # --- ДОБАВЬ ЭТО --- + # Драйверы для VMware + services.xserver.videoDrivers = [ "vmware" ]; + virtualisation.vmware.guest.enable = true; - fileSystems."/home" = - { device = "/dev/disk/by-uuid/aabb49a2-7563-4851-9e07-5656cd3fe765"; - fsType = "btrfs"; - options = [ "subvol=home" ]; - }; + # Ускорение рендеринга + hardware.graphics.enable = true; + # ------------------ - fileSystems."/nix" = - { device = "/dev/disk/by-uuid/aabb49a2-7563-4851-9e07-5656cd3fe765"; - fsType = "btrfs"; - options = [ "subvol=nix" ]; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/d0270880-39ef-4ae8-8701-87606a0d4578"; + fsType = "ext4"; + }; - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/D1B6-016C"; - fsType = "vfat"; - options = [ "fmask=0022" "dmask=0022" ]; - }; - - swapDevices = [ ]; + swapDevices = [ + { device = "/dev/disk/by-uuid/b5ad4e1d-8495-4ebc-be6b-b8be539d0ac1"; } + ]; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; }; } diff --git a/modules/programs/base.nix b/modules/programs/base.nix index ff31340..32c132a 100644 --- a/modules/programs/base.nix +++ b/modules/programs/base.nix @@ -3,8 +3,7 @@ flake.nixosModules.base = { pkgs, ... }: { imports = [ self.nixosModules.kitty - self.nixosModules.vpn - self.nixosModules.zen-browser + self.nixosModules.git ]; # List packages installed in system profile. @@ -16,8 +15,13 @@ obsidian telegram-desktop vesktop + mc + btop + htop + firefox + ]; - + # List font packages installed in system profile. fonts.packages = with pkgs; [ ibm-plex @@ -26,6 +30,6 @@ }; flake = { - user = "matthew"; + user = "andrei"; }; } diff --git a/modules/programs/bash.nix b/modules/programs/bash.nix index 1b3988f..eb1592e 100644 --- a/modules/programs/bash.nix +++ b/modules/programs/bash.nix @@ -9,9 +9,9 @@ PS1='\n\[\033[1;36m\][\[\e]0;\u@\h: \w\a\]\u@\h:\w]\$\[\033[0m\] ' ''; shellAliases = { - nrb = "sudo nixos-rebuild boot --flake ~/.nixos"; - nrs = "sudo nixos-rebuild switch --flake ~/.nixos"; - nrt = "sudo nixos-rebuild test --flake ~/.nixos"; + nrb = "sudo nixos-rebuild boot --flake .#nixos"; + nrs = "sudo nixos-rebuild switch --flake .#nixos"; + nrt = "sudo nixos-rebuild test --flake .#nixos"; }; }; } diff --git a/modules/programs/gamedev.nix b/modules/programs/gamedev.nix deleted file mode 100644 index 8b35a80..0000000 --- a/modules/programs/gamedev.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ self, ... }: -{ - flake.nixosModules.gamedev = { pkgs, ... }: { - imports = [ - self.nixosModules.nvf - self.nixosModules.tmux - self.nixosModules.git - ]; - - environment.systemPackages = with pkgs; [ - # aseprite - # (pkgs.bottles.override {removeWarningPopup = true; }) - audacity - dotnet-sdk - godot-mono - handbrake - obs-studio - video-trimmer - ]; - }; -} diff --git a/modules/programs/gaming.nix b/modules/programs/gaming.nix deleted file mode 100644 index c43bc18..0000000 --- a/modules/programs/gaming.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ - flake.nixosModules.gaming = { pkgs, ... }: - { - environment.systemPackages = with pkgs; [ - prismlauncher - ]; - - programs.steam.enable = true; - programs.gamescope.enable = true; - }; -} diff --git a/modules/programs/kitty.nix b/modules/programs/kitty.nix index 79af97c..acbcbe0 100644 --- a/modules/programs/kitty.nix +++ b/modules/programs/kitty.nix @@ -25,7 +25,7 @@ }; extraConfig = lib.mkIf config.kitty.wal.enable '' include ~/.cache/wal/colors-kitty.conf - background_opacity 0.85 + background_opacity 0.8 ''; themeFile = lib.mkIf (!config.kitty.wal.enable) "Catppuccin-Mocha"; }; diff --git a/modules/programs/nvf.nix b/modules/programs/nvf.nix deleted file mode 100644 index 58e064c..0000000 --- a/modules/programs/nvf.nix +++ /dev/null @@ -1,148 +0,0 @@ -{ self, inputs, ... }: -{ - flake.nixosModules.nvf = { - home-manager.users.${self.user}.imports = [ - { - imports = [ inputs.nvf.homeManagerModules.default ]; - - home.sessionVariables = { - MANPAGER = "nvim +Man!"; - }; - - programs.neovim = { - enable = true; - defaultEditor = true; - }; - - programs.nvf = { - enable = true; - settings = { - vim = { - luaConfigPost = /* lua */ '' - vim.opt.shiftwidth = 2 - -- vim.opt.colorcolumn = "80" - ''; - treesitter.indent.enable = false; - - lsp = { - enable = true; - lspconfig.enable = true; - mappings.format = ""; - }; - - languages = { - enableFormat = true; - enableTreesitter = true; - - nix.enable = true; - markdown.enable = true; - bash.enable = true; - lua.enable = true; - css.enable = true; - - csharp = { - enable = true; - lsp = { - enable = true; - servers = [ "roslyn-ls" ]; - }; - treesitter.enable = true; - }; - }; - - visuals = { - nvim-cursorline.enable = true; - }; - - theme = { - enable = true; - name = "gruvbox"; - style = "dark"; - }; - - statusline = { - lualine.enable = true; - }; - - autopairs = { - nvim-autopairs.enable = true; - }; - - autocomplete = { - nvim-cmp.enable = true; - }; - - filetree = { - neo-tree.enable = true; - }; - - tabline = { - nvimBufferline = { - enable = true; - mappings = { - closeCurrent = "x"; - cycleNext = ""; - cyclePrevious = ""; - moveNext = "l"; - movePrevious = "h"; - }; - }; - }; - - telescope.enable = true; - - git = { - enable = true; - }; - - utility = { - ccc.enable = true; - }; - - notes = { - todo-comments.enable = true; - }; - - ui = { - fastaction.enable = true; # Not so sure about it. - }; - - keymaps = [ - { - mode = [ - "n" - "v" - "i" - ]; - key = ""; - action = "Neotree toggle left"; - } - - { - mode = "n"; - key = ""; - action = "h"; - } - { - mode = "n"; - key = ""; - action = "j"; - } - { - mode = "n"; - key = ""; - action = "k"; - } - { - mode = "n"; - key = ""; - action = "l"; - } - ]; - }; - }; - }; - } - ]; - }; -} diff --git a/modules/programs/vpn.nix b/modules/programs/vpn.nix deleted file mode 100644 index 7dd8765..0000000 --- a/modules/programs/vpn.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ - flake.nixosModules.vpn = { pkgs, ... }: - { - services.tailscale = { - enable = true; - useRoutingFeatures = "client"; - extraSetFlags = [ "--operator=matthew" ]; - }; - }; -} diff --git a/modules/programs/vscode.nix b/modules/programs/vscode.nix new file mode 100644 index 0000000..b42de55 --- /dev/null +++ b/modules/programs/vscode.nix @@ -0,0 +1,41 @@ +{ self, pkgs, ... }: +{ + flake.nixosModules.vscode = { pkgs, ... }: { + home-manager.users.${self.user} = { + programs.vscode = { + enable = true; + # Можно выбрать обычный vscode или vscodium (без телеметрии) + package = pkgs.vscode; + + profiles.default = { + # Твои расширения (ищи названия на search.nixos.org) + extensions = with pkgs.vscode-extensions; [ + bbenoist.nix # Подсветка Nix + jnoortheen.nix-ide # LSP для Nix + ms-ceintl.vscode-language-pack-ru # Русский язык + christian-kohler.path-intellisense + ]; + + # Твои настройки (settings.json) прямо здесь + userSettings = { + "editor.fontSize" = 14; + "editor.fontFamily" = "'JetBrainsMono Nerd Font', 'monospace'"; + "workbench.colorTheme" = "Gruvbox Dark Hard"; # Или какая тебе нравится + "editor.formatOnSave" = true; + "window.titleBarStyle" = "custom"; # Важно для Niri/Wayland + "nix.enableLanguageServer" = true; + "nix.serverPath" = "nixd"; # Или nil + }; + + # Твои горячие клавиши (keybindings.json) + keybindings = [ + { + key = "ctrl+s"; + command = "workbench.action.files.save"; + } + ]; + }; + }; + }; + }; +} diff --git a/modules/programs/zen-browser.nix b/modules/programs/zen-browser.nix deleted file mode 100644 index 630e4d6..0000000 --- a/modules/programs/zen-browser.nix +++ /dev/null @@ -1,82 +0,0 @@ -{ inputs, ... }: -{ - flake.nixosModules.zen-browser = { pkgs, lib, ... }: - { - environment.systemPackages = - let - extension = shortId: guid: { - name = guid; - value = { - install_url = "https://addons.mozilla.org/en-US/firefox/downloads/latest/${shortId}/latest.xpi"; - installation_mode = "normal_installed"; - }; - }; - - prefs = { - # Check these out at about:config - # ... - }; - - extensions = [ - # To add additional extensions, find it on addons.mozilla.org, find - # the short ID in the url (like https://addons.mozilla.org/en-US/firefox/addon/!SHORT_ID!/) - # Then go to https://addons.mozilla.org/api/v5/addons/addon/!SHORT_ID!/ to get the guid - (extension "ublock-origin" "uBlock0@raymondhill.net") - # ... - ]; - in - [ - (pkgs.wrapFirefox - inputs.zen-browser.packages.${pkgs.stdenv.hostPlatform.system}.zen-browser-unwrapped - { - extraPrefs = lib.concatLines ( - lib.mapAttrsToList ( - name: value: ''lockPref(${lib.strings.toJSON name}, ${lib.strings.toJSON value});'' - ) prefs - ); - - extraPolicies = { - DisableTelemetry = true; - ExtensionSettings = builtins.listToAttrs extensions; - - SearchEngines = { - Default = "ddg"; - Add = [ - { - Name = "nixpkgs packages"; - URLTemplate = "https://search.nixos.org/packages?query={searchTerms}"; - IconURL = "https://wiki.nixos.org/favicon.ico"; - Alias = "np"; - } - { - Name = "NixOS options"; - URLTemplate = "https://search.nixos.org/options?query={searchTerms}"; - IconURL = "https://wiki.nixos.org/favicon.ico"; - Alias = "no"; - } - { - Name = "NixOS Wiki"; - URLTemplate = "https://wiki.nixos.org/w/index.php?search={searchTerms}"; - IconURL = "https://wiki.nixos.org/favicon.ico"; - Alias = "nw"; - } - { - Name = "noogle"; - URLTemplate = "https://noogle.dev/q?term={searchTerms}"; - IconURL = "https://noogle.dev/favicon.ico"; - Alias = "ng"; - } - { - Name = "home-manager options"; - URLTemplate = "https://home-manager-options.extranix.com/?query={searchTerms}&release=master"; - IconURL = "https://wiki.nixos.org/favicon.ico"; - Alias = "ho"; - } - ]; - }; - }; - } - ) - ]; - }; -} diff --git a/modules/sessions/cinnamon/cinnamon-dconf.nix b/modules/sessions/cinnamon/cinnamon-dconf.nix deleted file mode 100644 index ca7ae0b..0000000 --- a/modules/sessions/cinnamon/cinnamon-dconf.nix +++ /dev/null @@ -1,199 +0,0 @@ -{ - flake.homeModules.cinnamon-dconf = { lib, ... }: with lib.hm.gvariant; { - # Generated via dconf2nix: https://github.com/gvolpe/dconf2nix - dconf.settings = { - "org/cinnamon" = { - alttab-switcher-delay = 100; - desklet-snap-interval = 25; - enabled-applets = [ "panel1:left:0:menu@cinnamon.org:0" "panel1:left:1:separator@cinnamon.org:1" "panel1:left:2:grouped-window-list@cinnamon.org:2" "panel1:right:2:systray@cinnamon.org:3" "panel1:right:3:xapp-status@cinnamon.org:4" "panel1:right:4:notifications@cinnamon.org:5" "panel1:right:5:printers@cinnamon.org:6" "panel1:right:6:removable-drives@cinnamon.org:7" "panel1:right:7:keyboard@cinnamon.org:8" "panel1:right:8:favorites@cinnamon.org:9" "panel1:right:9:network@cinnamon.org:10" "panel1:right:10:sound@cinnamon.org:11" "panel1:right:11:power@cinnamon.org:12" "panel1:right:12:calendar@cinnamon.org:13" "panel1:right:13:cornerbar@cinnamon.org:14" "panel1:right:1:weather@mockturtl:15" "panel1:center:0:workspace-switcher@cinnamon.org:16" ]; - enabled-desklets = []; - next-applet-id = 17; - panel-edit-mode = false; - panel-zone-symbolic-icon-sizes = "[{\"panelId\": 1, \"left\": 28, \"center\": 28, \"right\": 16}]"; - panels-height = [ "1:48" ]; - }; - - "org/cinnamon/desktop/a11y/applications" = { - screen-reader-enabled = false; - }; - - "org/cinnamon/desktop/a11y/mouse" = { - dwell-click-enabled = false; - dwell-threshold = 10; - dwell-time = 1.2; - secondary-click-enabled = false; - secondary-click-time = 1.2; - }; - - "org/cinnamon/desktop/applications/calculator" = { - exec = "gnome-calculator"; - }; - - "org/cinnamon/desktop/applications/terminal" = { - exec = "kitty"; - exec-arg = "--"; - }; - - "org/cinnamon/desktop/background" = { - picture-uri = "file:///home/matthew/Pictures/clem_calm.jpg"; - }; - - "org/cinnamon/desktop/background/slideshow" = { - delay = 15; - image-source = "directory:///home/matthew/Pictures"; - }; - - "org/cinnamon/desktop/input-sources" = { - sources = [ (mkTuple [ "xkb" "us" ]) (mkTuple [ "xkb" "ru" ]) ]; - xkb-options = [ "terminate:ctrl_alt_bksp" "grp:caps_toggle" ]; - }; - - "org/cinnamon/desktop/interface" = { - cursor-blink-time = 1200; - cursor-size = 24; - cursor-theme = "Bibata-Modern-Classic"; - gtk-theme = "Mint-Y-Dark"; - icon-theme = "Mint-Y"; - text-scaling-factor = 1.2; - toolkit-accessibility = false; - }; - - "org/cinnamon/desktop/keybindings" = { - custom-list = [ "custom0" "custom1" "custom2" ]; - }; - - "org/cinnamon/desktop/keybindings/custom-keybindings/custom0" = { - binding = [ "o" ]; - command = "obsidian"; - name = "Obsidian"; - }; - - "org/cinnamon/desktop/keybindings/custom-keybindings/custom1" = { - binding = [ "t" ]; - command = "Telegram"; - name = "Telegram"; - }; - - "org/cinnamon/desktop/keybindings/custom-keybindings/custom2" = { - binding = [ "g" ]; - command = "godot-mono"; - name = "Godot"; - }; - - "org/cinnamon/desktop/keybindings/media-keys" = { - terminal = [ "t" "c" ]; - www = [ "XF86WWW" "f" ]; - }; - - "org/cinnamon/desktop/keybindings/wm" = { - close = [ "F4" "c" ]; - minimize = [ "u" ]; - move-to-center = [ "c" ]; - move-to-monitor-down = [ "Down" "j" ]; - move-to-monitor-left = [ "Left" "h" ]; - move-to-monitor-right = [ "Right" "l" ]; - move-to-monitor-up = [ "Up" "k" ]; - move-to-workspace-1 = [ "exclam" ]; - move-to-workspace-10 = [ "parenright" ]; - move-to-workspace-2 = [ "at" ]; - move-to-workspace-3 = [ "numbersign" ]; - move-to-workspace-4 = [ "dollar" ]; - move-to-workspace-5 = [ "percent" ]; - move-to-workspace-6 = [ "asciicircum" ]; - move-to-workspace-7 = [ "ampersand" ]; - move-to-workspace-8 = [ "asterisk" ]; - move-to-workspace-9 = [ "parenleft" ]; - move-to-workspace-down = [ "Down" "j" ]; - move-to-workspace-left = [ "Left" "h" ]; - move-to-workspace-right = [ "Right" "l" ]; - move-to-workspace-up = [ "Up" "k" ]; - push-tile-down = [ "Down" "j" ]; - push-tile-left = [ "Left" "h" ]; - push-tile-right = [ "Right" "l" ]; - push-tile-up = [ "Up" "k" ]; - switch-input-source = [ "ISO_Next_Group" "XF86Keyboard" ]; - switch-to-workspace-1 = [ "1" ]; - switch-to-workspace-10 = [ "0" ]; - switch-to-workspace-2 = [ "2" ]; - switch-to-workspace-3 = [ "3" ]; - switch-to-workspace-4 = [ "4" ]; - switch-to-workspace-5 = [ "5" ]; - switch-to-workspace-6 = [ "6" ]; - switch-to-workspace-7 = [ "7" ]; - switch-to-workspace-8 = [ "8" ]; - switch-to-workspace-9 = [ "9" ]; - switch-to-workspace-down = [ "Down" "w" ]; - switch-to-workspace-left = [ "Left" "h" ]; - switch-to-workspace-right = [ "Right" "l" ]; - toggle-fullscreen = [ "f" "F11" ]; - toggle-maximized = [ "F10" "m" ]; - }; - - "org/cinnamon/desktop/media-handling" = { - autorun-never = false; - }; - - "org/cinnamon/desktop/peripherals/keyboard" = { - delay = mkUint32 228; - repeat-interval = mkUint32 30; - }; - - "org/cinnamon/desktop/peripherals/mouse" = { - accel-profile = "flat"; - double-click = 400; - drag-threshold = 8; - speed = 0.0; - }; - - "org/cinnamon/desktop/peripherals/touchpad" = { - speed = 0.0; - }; - - "org/cinnamon/desktop/screensaver" = { - layout-group = 0; - }; - - "org/cinnamon/desktop/sound" = { - event-sounds = false; - }; - - "org/cinnamon/desktop/wm/preferences" = { - min-window-opacity = 30; - mouse-button-modifier = ""; - }; - - "org/cinnamon/gestures" = { - enabled = true; - pinch-percent-threshold = mkUint32 40; - swipe-down-2 = "PUSH_TILE_DOWN::end"; - swipe-down-3 = "TOGGLE_OVERVIEW::::start"; - swipe-down-4 = "VOLUME_DOWN::end"; - swipe-left-2 = "PUSH_TILE_LEFT::end"; - swipe-left-3 = "WORKSPACE_NEXT::::start"; - swipe-left-4 = "WINDOW_WORKSPACE_PREVIOUS::end"; - swipe-percent-threshold = mkUint32 60; - swipe-right-2 = "PUSH_TILE_RIGHT::end"; - swipe-right-3 = "WORKSPACE_PREVIOUS::::start"; - swipe-right-4 = "WINDOW_WORKSPACE_NEXT::end"; - swipe-up-2 = "PUSH_TILE_UP::end"; - swipe-up-3 = "TOGGLE_EXPO::::start"; - swipe-up-4 = "VOLUME_UP::end"; - tap-3 = "MEDIA_PLAY_PAUSE::end"; - }; - - "org/cinnamon/muffin" = { - draggable-border-width = 10; - placement-mode = "center"; - tile-maximize = true; - }; - - "org/cinnamon/settings-daemon/plugins/color" = { - night-light-last-coordinates = mkTuple [ 43.25 76.95 ]; - }; - - "org/cinnamon/theme" = { - name = "Mint-Y-Dark"; - }; - }; - }; -} diff --git a/modules/sessions/cinnamon/cinnamon.nix b/modules/sessions/cinnamon/cinnamon.nix deleted file mode 100644 index 84d926e..0000000 --- a/modules/sessions/cinnamon/cinnamon.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ self, ... }: -{ - flake.nixosModules.cinnamon = { pkgs, ... }: - { - services.xserver.desktopManager.cinnamon.enable = true; - services.xserver.displayManager.lightdm.enable = true; - services.xserver.enable = true; - services.power-profiles-daemon.enable = false; - # services.gnome.gnome-online-accounts.enable = true; - - environment.systemPackages = with pkgs; [ - # Convert dconf configs to Nix-compatable format. - # To convert your current configuration, run the following command: - # `dconf dump /org/cinnamon/ | dconf2nix --root org/cinnamon > ~/.nixos/modules/sessions/cinnamon/dconf.nix.temp` - dconf2nix - ]; - - environment.sessionVariables = { - MOZ_USE_XINPUT2=1; # Fix Firefox-based browsers scroll on X11. - }; - - home-manager.users.${self.user}.imports = [ - self.homeModules.cinnamon-dconf # Define dconf options. - ]; - }; -} diff --git a/modules/sessions/cinnamon/dconf.nix.temp b/modules/sessions/cinnamon/dconf.nix.temp deleted file mode 100644 index 6bacf3c..0000000 --- a/modules/sessions/cinnamon/dconf.nix.temp +++ /dev/null @@ -1,202 +0,0 @@ -# Generated via dconf2nix: https://github.com/gvolpe/dconf2nix -{ lib, ... }: - -with lib.hm.gvariant; - -{ - dconf.settings = { - "org/cinnamon" = { - alttab-switcher-delay = 100; - desklet-snap-interval = 25; - enabled-applets = [ "panel1:left:0:menu@cinnamon.org:0" "panel1:left:1:separator@cinnamon.org:1" "panel1:left:2:grouped-window-list@cinnamon.org:2" "panel1:right:2:systray@cinnamon.org:3" "panel1:right:3:xapp-status@cinnamon.org:4" "panel1:right:4:notifications@cinnamon.org:5" "panel1:right:5:printers@cinnamon.org:6" "panel1:right:6:removable-drives@cinnamon.org:7" "panel1:right:7:keyboard@cinnamon.org:8" "panel1:right:8:favorites@cinnamon.org:9" "panel1:right:9:network@cinnamon.org:10" "panel1:right:10:sound@cinnamon.org:11" "panel1:right:11:power@cinnamon.org:12" "panel1:right:12:calendar@cinnamon.org:13" "panel1:right:13:cornerbar@cinnamon.org:14" "panel1:right:1:weather@mockturtl:15" "panel1:center:0:workspace-switcher@cinnamon.org:16" ]; - enabled-desklets = []; - next-applet-id = 17; - panel-edit-mode = false; - panel-zone-symbolic-icon-sizes = "[{\"panelId\": 1, \"left\": 28, \"center\": 28, \"right\": 16}]"; - panels-height = [ "1:48" ]; - }; - - "org/cinnamon/desktop/a11y/applications" = { - screen-reader-enabled = false; - }; - - "org/cinnamon/desktop/a11y/mouse" = { - dwell-click-enabled = false; - dwell-threshold = 10; - dwell-time = 1.2; - secondary-click-enabled = false; - secondary-click-time = 1.2; - }; - - "org/cinnamon/desktop/applications/calculator" = { - exec = "gnome-calculator"; - }; - - "org/cinnamon/desktop/applications/terminal" = { - exec = "kitty"; - exec-arg = "--"; - }; - - "org/cinnamon/desktop/background" = { - picture-uri = "file:///home/matthew/Pictures/clem_calm.jpg"; - }; - - "org/cinnamon/desktop/background/slideshow" = { - delay = 15; - image-source = "directory:///home/matthew/Pictures"; - }; - - "org/cinnamon/desktop/input-sources" = { - sources = [ (mkTuple [ "xkb" "us" ]) (mkTuple [ "xkb" "ru" ]) ]; - xkb-options = [ "terminate:ctrl_alt_bksp" "grp:caps_toggle" ]; - }; - - "org/cinnamon/desktop/interface" = { - cursor-blink-time = 1200; - cursor-size = 24; - cursor-theme = "Bibata-Modern-Classic"; - gtk-theme = "Mint-Y-Dark"; - icon-theme = "Mint-Y"; - text-scaling-factor = 1.2; - toolkit-accessibility = false; - }; - - "org/cinnamon/desktop/keybindings" = { - custom-list = [ "custom0" "custom1" "custom2" ]; - }; - - "org/cinnamon/desktop/keybindings/custom-keybindings/custom0" = { - binding = [ "o" ]; - command = "obsidian"; - name = "Obsidian"; - }; - - "org/cinnamon/desktop/keybindings/custom-keybindings/custom1" = { - binding = [ "t" ]; - command = "Telegram"; - name = "Telegram"; - }; - - "org/cinnamon/desktop/keybindings/custom-keybindings/custom2" = { - binding = [ "g" ]; - command = "godot-mono"; - name = "Godot"; - }; - - "org/cinnamon/desktop/keybindings/media-keys" = { - terminal = [ "t" "c" ]; - www = [ "XF86WWW" "f" ]; - }; - - "org/cinnamon/desktop/keybindings/wm" = { - close = [ "F4" "c" ]; - minimize = [ "u" ]; - move-to-center = [ "c" ]; - move-to-monitor-down = [ "Down" "j" ]; - move-to-monitor-left = [ "Left" "h" ]; - move-to-monitor-right = [ "Right" "l" ]; - move-to-monitor-up = [ "Up" "k" ]; - move-to-workspace-1 = [ "exclam" ]; - move-to-workspace-10 = [ "parenright" ]; - move-to-workspace-2 = [ "at" ]; - move-to-workspace-3 = [ "numbersign" ]; - move-to-workspace-4 = [ "dollar" ]; - move-to-workspace-5 = [ "percent" ]; - move-to-workspace-6 = [ "asciicircum" ]; - move-to-workspace-7 = [ "ampersand" ]; - move-to-workspace-8 = [ "asterisk" ]; - move-to-workspace-9 = [ "parenleft" ]; - move-to-workspace-down = [ "Down" "j" ]; - move-to-workspace-left = [ "Left" "h" ]; - move-to-workspace-right = [ "Right" "l" ]; - move-to-workspace-up = [ "Up" "k" ]; - push-tile-down = [ "Down" "j" ]; - push-tile-left = [ "Left" "h" ]; - push-tile-right = [ "Right" "l" ]; - push-tile-up = [ "Up" "k" ]; - switch-input-source = [ "ISO_Next_Group" "XF86Keyboard" ]; - switch-to-workspace-1 = [ "1" ]; - switch-to-workspace-10 = [ "0" ]; - switch-to-workspace-2 = [ "2" ]; - switch-to-workspace-3 = [ "3" ]; - switch-to-workspace-4 = [ "4" ]; - switch-to-workspace-5 = [ "5" ]; - switch-to-workspace-6 = [ "6" ]; - switch-to-workspace-7 = [ "7" ]; - switch-to-workspace-8 = [ "8" ]; - switch-to-workspace-9 = [ "9" ]; - switch-to-workspace-down = [ "Down" "w" ]; - switch-to-workspace-left = [ "Left" "h" ]; - switch-to-workspace-right = [ "Right" "l" ]; - toggle-fullscreen = [ "f" "F11" ]; - toggle-maximized = [ "F10" "m" ]; - }; - - "org/cinnamon/desktop/media-handling" = { - autorun-never = false; - }; - - "org/cinnamon/desktop/peripherals/keyboard" = { - delay = mkUint32 228; - repeat-interval = mkUint32 30; - }; - - "org/cinnamon/desktop/peripherals/mouse" = { - accel-profile = "flat"; - double-click = 400; - drag-threshold = 8; - speed = 0.0; - }; - - "org/cinnamon/desktop/peripherals/touchpad" = { - speed = 0.0; - }; - - "org/cinnamon/desktop/screensaver" = { - layout-group = 0; - }; - - "org/cinnamon/desktop/sound" = { - event-sounds = false; - }; - - "org/cinnamon/desktop/wm/preferences" = { - min-window-opacity = 30; - mouse-button-modifier = ""; - }; - - "org/cinnamon/gestures" = { - enabled = true; - pinch-percent-threshold = mkUint32 40; - swipe-down-2 = "PUSH_TILE_DOWN::end"; - swipe-down-3 = "TOGGLE_OVERVIEW::::start"; - swipe-down-4 = "VOLUME_DOWN::end"; - swipe-left-2 = "PUSH_TILE_LEFT::end"; - swipe-left-3 = "WORKSPACE_NEXT::::start"; - swipe-left-4 = "WINDOW_WORKSPACE_PREVIOUS::end"; - swipe-percent-threshold = mkUint32 60; - swipe-right-2 = "PUSH_TILE_RIGHT::end"; - swipe-right-3 = "WORKSPACE_PREVIOUS::::start"; - swipe-right-4 = "WINDOW_WORKSPACE_NEXT::end"; - swipe-up-2 = "PUSH_TILE_UP::end"; - swipe-up-3 = "TOGGLE_EXPO::::start"; - swipe-up-4 = "VOLUME_UP::end"; - tap-3 = "MEDIA_PLAY_PAUSE::end"; - }; - - "org/cinnamon/muffin" = { - draggable-border-width = 10; - placement-mode = "center"; - tile-maximize = true; - }; - - "org/cinnamon/settings-daemon/plugins/color" = { - night-light-last-coordinates = mkTuple [ 43.25 76.95 ]; - }; - - "org/cinnamon/theme" = { - name = "Mint-Y-Dark"; - }; - - }; -} diff --git a/modules/sessions/niri/config.kdl b/modules/sessions/niri/config.kdl index 452c91d..c55d471 100644 --- a/modules/sessions/niri/config.kdl +++ b/modules/sessions/niri/config.kdl @@ -3,8 +3,8 @@ // Check the wiki for a full description of the configuration: // https://yalter.github.io/niri/Configuration:-Introduction -include "./colors.kdl" -include "./config-nix.kdl" +//include "./colors.kdl" +//include "./config-nix.kdl" // Input device configuration. // Find the full list of options on the wiki: @@ -18,7 +18,8 @@ input { // For example: layout "us,ru" // options "grp:win_space_toggle,compose:ralt,ctrl:nocaps" - options "grp:caps_toggle" + options "grp:alt_shift_toggle" + // If this section is empty, niri will fetch xkb settings // from org.freedesktop.locale1. You can control these using @@ -29,20 +30,20 @@ input { repeat-rate 25 // Enable numlock on startup, omitting this setting disables it. - // numlock + numlock } // Next sections include libinput settings. // Omitting settings disables them, or leaves them at their default values. // All commented-out settings here are examples, not defaults. touchpad { - // off - tap + off + // tap // dwt // dwtp // drag false // drag-lock - natural-scroll + // natural-scroll // accel-speed 0.2 // accel-profile "flat" // scroll-method "two-finger" diff --git a/modules/sessions/niri/niri.nix b/modules/sessions/niri/niri.nix index 676d59f..775478f 100644 --- a/modules/sessions/niri/niri.nix +++ b/modules/sessions/niri/niri.nix @@ -12,21 +12,26 @@ programs.niri.enable = true; - services.displayManager.ly = - let - xsession-wrapper = pkgs.runCommand "xsession-wrapper-fixed" { - src = config.services.displayManager.sessionData.wrapper; - } '' - cp --preserve=mode $src $out - substituteInPlace $out --replace "X-NIXOS-SYSTEMD-AWARE" "X-NIXOS-SYSTEMD-AWARE|niri" - ''; - in { + #services.displayManager.ly = + #let + # xsession-wrapper = pkgs.runCommand "xsession-wrapper-fixed" { + # src = config.services.displayManager.sessionData.wrapper; + # } '' + # cp --preserve=mode $src $out + # substituteInPlace $out --replace "X-NIXOS-SYSTEMD-AWARE" "X-NIXOS-SYSTEMD-AWARE|niri" + # ''; + #in { + # enable = true; + # x11Support = false; + # settings = { + # setup_cmd = "${xsession-wrapper}"; + # session_log = ".ly-session.log"; + # }; + #}; + + services.displayManager.sddm = { enable = true; - x11Support = false; - settings = { - setup_cmd = "${xsession-wrapper}"; - session_log = ".ly-session.log"; - }; + wayland.enable = true; # Чтобы SDDM сам работал на вейленде }; services.udisks2.enable = true; # Removable media. diff --git a/modules/sessions/niri/noctalia.nix b/modules/sessions/niri/noctalia.nix index 7a18392..7c71650 100644 --- a/modules/sessions/niri/noctalia.nix +++ b/modules/sessions/niri/noctalia.nix @@ -200,7 +200,7 @@ screenOverrides = []; }; general = { - avatarImage = "/home/matthew/.face"; + avatarImage = "/home/andrei/.face"; dimmerOpacity = 0.2; showScreenCorners = false; forceBlackScreenCorners = false; @@ -314,7 +314,7 @@ wallpaper = { enabled = true; overviewEnabled = true; - directory = "/home/matthew/Pictures"; + directory = "/home/andrei/Pictures"; monitorDirectories = []; enableMultiMonitorDirectories = false; showHiddenFiles = false; diff --git a/modules/sessions/plasma.nix b/modules/sessions/plasma.nix deleted file mode 100644 index 96127a2..0000000 --- a/modules/sessions/plasma.nix +++ /dev/null @@ -1,64 +0,0 @@ -{ - flake.nixosModules.plasma = { pkgs, ... }: { - services.desktopManager.plasma6.enable = true; - services.displayManager.plasma-login-manager.enable = true; - services.power-profiles-daemon.enable = false; - services.xserver.enable = false; - - environment.systemPackages = with pkgs; [ - klassy - ]; - - nixpkgs.overlays = [ - (final: prev: { - kdePackages = prev.kdePackages.overrideScope ( - kdeFinal: kdePrev: { - # https://old.reddit.com/r/NixOS/comments/1pdtc3v/kde_plasma_is_slow_compared_to_any_other_distro/ - # https://github.com/NixOS/nixpkgs/issues/126590#issuecomment-3194531220 - plasma-workspace = - let - # the package we want to override - basePkg = kdePrev.plasma-workspace; - # a helper package that merges all the XDG_DATA_DIRS into a single directory - xdgdataPkg = final.stdenv.mkDerivation { - name = "${basePkg.name}-xdgdata"; - buildInputs = [ basePkg ]; - dontUnpack = true; - dontFixup = true; - dontWrapQtApps = true; - installPhase = '' - mkdir -p $out/share - ( IFS=: - for DIR in $XDG_DATA_DIRS; do - if [[ -d "$DIR" ]]; then - ${prev.lib.getExe prev.lndir} -silent "$DIR" $out - fi - done - ) - ''; - }; - # undo the XDG_DATA_DIRS injection that is usually done in the qt wrapper - # script and instead inject the path of the above helper package - derivedPkg = basePkg.overrideAttrs { - preFixup = '' - for index in "''${!qtWrapperArgs[@]}"; do - if [[ ''${qtWrapperArgs[$((index+0))]} == "--prefix" ]] && [[ ''${qtWrapperArgs[$((index+1))]} == "XDG_DATA_DIRS" ]]; then - unset -v "qtWrapperArgs[$((index+0))]" - unset -v "qtWrapperArgs[$((index+1))]" - unset -v "qtWrapperArgs[$((index+2))]" - unset -v "qtWrapperArgs[$((index+3))]" - fi - done - qtWrapperArgs=("''${qtWrapperArgs[@]}") - qtWrapperArgs+=(--prefix XDG_DATA_DIRS : "${xdgdataPkg}/share") - qtWrapperArgs+=(--prefix XDG_DATA_DIRS : "$out/share") - ''; - }; - in - derivedPkg; - } - ); - }) - ]; - }; -} diff --git a/modules/sessions/xfce-rdp.nix b/modules/sessions/xfce-rdp.nix new file mode 100644 index 0000000..99b8af7 --- /dev/null +++ b/modules/sessions/xfce-rdp.nix @@ -0,0 +1,24 @@ +{ self, ... }: +{ + flake.nixosModules.xfcerdp = { pkgs, lib, ... }: { + services.xserver = { + enable = true; + displayManager.sddm.enable = lib.mkDefault true; # Оставляем SDDM как вход + desktopManager.xfce.enable = true; + }; + + # Доп пакеты для Xfce, чтобы он не был совсем голым + environment.systemPackages = with pkgs; [ + xfce.xfce4-pulseaudio-plugin + xfce.xfce4-whiskermenu-plugin # Удобное меню "Пуск" + networkmanagerapplet # Иконка сети в трее + ]; + + services.xrdp = { + enable = true; + defaultWindowManager = "xfce4-session"; + openFirewall = true; + }; + + }; +} diff --git a/modules/theme.nix b/modules/theme.nix index 81583b5..444cc0d 100644 --- a/modules/theme.nix +++ b/modules/theme.nix @@ -1,6 +1,6 @@ { self, ... }: let - wallpaper = "/home/${self.user}/Pictures/nevzeo.jpg"; + wallpaper = "/home/${self.user}/Pictures/romashki.jpg"; font = { mono = "JetBrainsMonoNerdFontMono";