commit 9d6a98748cb02535ff289357f25169741feb2377 Author: ficache Date: Mon Oct 14 18:43:31 2024 +0300 first commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..4aedc66 --- /dev/null +++ b/README.md @@ -0,0 +1,46 @@ +

❄️ Welcome to ficache's NixOS config! ❄️

+ +![preview](preview.png) + +--- +> ### 📝 +> NixOS is not like any other Linux distributive. Declarative, Reproducible, Immutable and Atomic - this OS is another whole world, world full of wonders. ✨ + +--- +## Information about config +* My main goal is made **easy to understand, no boiler-plate config**, so anyone can fork it and modify for own needs! +* I'm still new to NixOS so this config will change very much as I learn new efficient approaches to do it + +For now my config is over compicated. I'm looking for solutions that will reduce amount of changing stuff. +Probably will create a bash script or smth. + +## How to use it: +```bash +git clone https://this/repo +cd your/path/to/config +sudo nixos-rebuild switch --flake . +home-manager switch --flake . +``` + +## How to modify it: +
Cloned this repo: + + 1. Delete `.git/` folder from your config, so you can add files and build without warnings. + 2. Use your favourite code editor + +
+ + +
Forked this repo: + + 1. You ready to do any changes + 2. Use your favourite code editor + 3. Use git commands to commit changes to your repo + +
+ + +## Special thanks + +**To you** if you decided to give a try my config! + diff --git a/disco.nix b/disco.nix new file mode 100644 index 0000000..5414017 --- /dev/null +++ b/disco.nix @@ -0,0 +1,42 @@ +# I don't test this code yet. +{ + disko.devices = { + disk = { + my-disk = { + device = "/dev/nvme0n1"; + type = "disk"; + content = { + type = "gpt"; + partitions = { + ESP = { + type = "EF00"; + size = "512M"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + }; + }; + + swap = { + size = "8G"; + content = { + type = "swap"; + resumeDevice = true; + }; + }; + + root = { + size = "100%"; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/"; + }; + }; + }; + }; + }; + }; + }; +} \ No newline at end of file diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..0dea1f0 --- /dev/null +++ b/flake.lock @@ -0,0 +1,605 @@ +{ + "nodes": { + "base16": { + "inputs": { + "fromYaml": "fromYaml" + }, + "locked": { + "lastModified": 1708890466, + "narHash": "sha256-LlrC09LoPi8OPYOGPXegD72v+//VapgAqhbOFS3i8sc=", + "owner": "SenchoPens", + "repo": "base16.nix", + "rev": "665b3c6748534eb766c777298721cece9453fdae", + "type": "github" + }, + "original": { + "owner": "SenchoPens", + "repo": "base16.nix", + "type": "github" + } + }, + "base16-fish": { + "flake": false, + "locked": { + "lastModified": 1622559957, + "narHash": "sha256-PebymhVYbL8trDVVXxCvZgc0S5VxI7I1Hv4RMSquTpA=", + "owner": "tomyun", + "repo": "base16-fish", + "rev": "2f6dd973a9075dabccd26f1cded09508180bf5fe", + "type": "github" + }, + "original": { + "owner": "tomyun", + "repo": "base16-fish", + "type": "github" + } + }, + "base16-helix": { + "flake": false, + "locked": { + "lastModified": 1725860795, + "narHash": "sha256-Z2o8VBPW3I+KKTSfe25kskz0EUj7MpUh8u355Z1nVsU=", + "owner": "tinted-theming", + "repo": "base16-helix", + "rev": "7f795bf75d38e0eea9fed287264067ca187b88a9", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-helix", + "type": "github" + } + }, + "base16-vim": { + "flake": false, + "locked": { + "lastModified": 1716150083, + "narHash": "sha256-ZMhnNmw34ogE5rJZrjRv5MtG3WaqKd60ds2VXvT6hEc=", + "owner": "tinted-theming", + "repo": "base16-vim", + "rev": "6e955d704d046b0dc3e5c2d68a2a6eeffd2b5d3d", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-vim", + "type": "github" + } + }, + "devshell": { + "inputs": { + "nixpkgs": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1728330715, + "narHash": "sha256-xRJ2nPOXb//u1jaBnDP56M7v5ldavjbtR6lfGqSvcKg=", + "owner": "numtide", + "repo": "devshell", + "rev": "dd6b80932022cea34a019e2bb32f6fa9e494dfef", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "devshell", + "type": "github" + } + }, + "envycontrol": { + "inputs": { + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1724028178, + "narHash": "sha256-3FPpsd43xXXV6ErlMxdQabg9uMS2OW8nm2QklKKe600=", + "owner": "bayasdev", + "repo": "envycontrol", + "rev": "0b502c4027133694e82db9b56eaffbb34fc98642", + "type": "github" + }, + "original": { + "owner": "bayasdev", + "repo": "envycontrol", + "type": "github" + } + }, + "flake-compat": { + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "revCount": 57, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" + } + }, + "flake-compat_2": { + "flake": false, + "locked": { + "lastModified": 1673956053, + "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1727826117, + "narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1726560853, + "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { + "inputs": { + "systems": [ + "stylix", + "systems" + ] + }, + "locked": { + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "fromYaml": { + "flake": false, + "locked": { + "lastModified": 1689549921, + "narHash": "sha256-iX0pk/uB019TdBGlaJEWvBCfydT6sRq+eDcGPifVsCM=", + "owner": "SenchoPens", + "repo": "fromYaml", + "rev": "11fbbbfb32e3289d3c631e0134a23854e7865c84", + "type": "github" + }, + "original": { + "owner": "SenchoPens", + "repo": "fromYaml", + "type": "github" + } + }, + "git-hooks": { + "inputs": { + "flake-compat": [ + "nixvim", + "flake-compat" + ], + "gitignore": "gitignore", + "nixpkgs": [ + "nixvim", + "nixpkgs" + ], + "nixpkgs-stable": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1728092656, + "narHash": "sha256-eMeCTJZ5xBeQ0f9Os7K8DThNVSo9gy4umZLDfF5q6OM=", + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "1211305a5b237771e13fcca0c51e60ad47326a9a", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "git-hooks.nix", + "type": "github" + } + }, + "gitignore": { + "inputs": { + "nixpkgs": [ + "nixvim", + "git-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, + "gnome-shell": { + "flake": false, + "locked": { + "lastModified": 1713702291, + "narHash": "sha256-zYP1ehjtcV8fo+c+JFfkAqktZ384Y+y779fzmR9lQAU=", + "owner": "GNOME", + "repo": "gnome-shell", + "rev": "0d0aadf013f78a7f7f1dc984d0d812971864b934", + "type": "github" + }, + "original": { + "owner": "GNOME", + "ref": "46.1", + "repo": "gnome-shell", + "type": "github" + } + }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1728337164, + "narHash": "sha256-VdRTjJFyq4Q9U7Z/UoC2Q5jK8vSo6E86lHc2OanXtvc=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "038630363e7de57c36c417fd2f5d7c14773403e4", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "home-manager_2": { + "inputs": { + "nixpkgs": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1728337164, + "narHash": "sha256-VdRTjJFyq4Q9U7Z/UoC2Q5jK8vSo6E86lHc2OanXtvc=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "038630363e7de57c36c417fd2f5d7c14773403e4", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "home-manager_3": { + "inputs": { + "nixpkgs": [ + "stylix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1724435763, + "narHash": "sha256-UNky3lJNGQtUEXT2OY8gMxejakSWPTfWKvpFkpFlAfM=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "c2cd2a52e02f1dfa1c88f95abeb89298d46023be", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "nix-darwin": { + "inputs": { + "nixpkgs": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1728385805, + "narHash": "sha256-mUd38b0vhB7yzgAjNOaFz7VY9xIVzlbn3P2wjGBcVV0=", + "owner": "lnl7", + "repo": "nix-darwin", + "rev": "48b50b3b137be5cfb9f4d006835ce7c3fe558ccc", + "type": "github" + }, + "original": { + "owner": "lnl7", + "repo": "nix-darwin", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1728538411, + "narHash": "sha256-f0SBJz1eZ2yOuKUr5CA9BHULGXVSn6miBuUWdTyhUhU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "b69de56fac8c2b6f8fd27f2eca01dcda8e0a4221", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1728492678, + "narHash": "sha256-9UTxR8eukdg+XZeHgxW5hQA9fIKHsKCdOIUycTryeVw=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "5633bcff0c6162b9e4b5f1264264611e950c8ec7", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1725194671, + "narHash": "sha256-tLGCFEFTB5TaOKkpfw3iYT9dnk4awTP/q4w+ROpMfuw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "b833ff01a0d694b910daca6e2ff4a3f26dee478c", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixvim": { + "inputs": { + "devshell": "devshell", + "flake-compat": "flake-compat", + "flake-parts": "flake-parts", + "git-hooks": "git-hooks", + "home-manager": "home-manager_2", + "nix-darwin": "nix-darwin", + "nixpkgs": [ + "nixpkgs" + ], + "nuschtosSearch": "nuschtosSearch", + "treefmt-nix": "treefmt-nix" + }, + "locked": { + "lastModified": 1728485062, + "narHash": "sha256-+2e9hAM2GVDF3gywdQI/OA7s4f0Z9rvFuiVxePI41QM=", + "owner": "nix-community", + "repo": "nixvim", + "rev": "61ec39764fbe1e4f21cf801ea7b9209d527c8135", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixvim", + "type": "github" + } + }, + "nuschtosSearch": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1728423244, + "narHash": "sha256-+YwNsyIFj3dXyLVQd1ry4pCNmtOpbceKUrkNS8wp9Ho=", + "owner": "NuschtOS", + "repo": "search", + "rev": "f276cc3b391493ba3a8b30170776860f9520b7fa", + "type": "github" + }, + "original": { + "owner": "NuschtOS", + "repo": "search", + "type": "github" + } + }, + "root": { + "inputs": { + "envycontrol": "envycontrol", + "home-manager": "home-manager", + "nixpkgs": "nixpkgs_2", + "nixvim": "nixvim", + "stylix": "stylix" + } + }, + "stylix": { + "inputs": { + "base16": "base16", + "base16-fish": "base16-fish", + "base16-helix": "base16-helix", + "base16-vim": "base16-vim", + "flake-compat": "flake-compat_2", + "flake-utils": "flake-utils_2", + "gnome-shell": "gnome-shell", + "home-manager": "home-manager_3", + "nixpkgs": "nixpkgs_3", + "systems": "systems_2", + "tinted-foot": "tinted-foot", + "tinted-kitty": "tinted-kitty", + "tinted-tmux": "tinted-tmux" + }, + "locked": { + "lastModified": 1728487226, + "narHash": "sha256-gTOUdO94Y24QgnPVnHTQ/Kch0eM6pHEk/c1WoIxg+qE=", + "owner": "danth", + "repo": "stylix", + "rev": "5699ba97c60455ebafde0fd4e78ca0a2e5a58282", + "type": "github" + }, + "original": { + "owner": "danth", + "repo": "stylix", + "type": "github" + } + }, + "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": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "tinted-foot": { + "flake": false, + "locked": { + "lastModified": 1696725948, + "narHash": "sha256-65bz2bUL/yzZ1c8/GQASnoiGwaF8DczlxJtzik1c0AU=", + "owner": "tinted-theming", + "repo": "tinted-foot", + "rev": "eedbcfa30de0a4baa03e99f5e3ceb5535c2755ce", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "tinted-foot", + "type": "github" + } + }, + "tinted-kitty": { + "flake": false, + "locked": { + "lastModified": 1727867815, + "narHash": "sha256-cghdwzPyve13JFeW+Mpqy/sDswlJ4DTffY24R0R7r/U=", + "owner": "tinted-theming", + "repo": "tinted-kitty", + "rev": "81b15cb9eb696247af857808d37122188423f73b", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "tinted-kitty", + "type": "github" + } + }, + "tinted-tmux": { + "flake": false, + "locked": { + "lastModified": 1696725902, + "narHash": "sha256-wDPg5elZPcQpu7Df0lI5O8Jv4A3T6jUQIVg63KDU+3Q=", + "owner": "tinted-theming", + "repo": "tinted-tmux", + "rev": "c02050bebb60dbb20cb433cd4d8ce668ecc11ba7", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "tinted-tmux", + "type": "github" + } + }, + "treefmt-nix": { + "inputs": { + "nixpkgs": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1727984844, + "narHash": "sha256-xpRqITAoD8rHlXQafYZOLvUXCF6cnZkPfoq67ThN0Hc=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "4446c7a6fc0775df028c5a3f6727945ba8400e64", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..afa05e3 --- /dev/null +++ b/flake.nix @@ -0,0 +1,48 @@ +{ + description = "Ficache's system flake"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + envycontrol.url = "github:bayasdev/envycontrol"; + stylix.url = "github:danth/stylix"; + + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + nixvim = { + url = "github:nix-community/nixvim"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + outputs = { self, nixpkgs, home-manager, ... }@inputs: + + let + system = "x86_64-linux"; + in { + + # ficache-nixos - system hostname + nixosConfigurations.ficache-nixos = nixpkgs.lib.nixosSystem { + specialArgs = { + nixpkgs.config.allowUnfree = true; + inherit inputs system; + }; + modules = [ + ./nixos/configuration.nix + inputs.stylix.nixosModules.stylix + ]; + }; + + homeConfigurations.ficache = home-manager.lib.homeManagerConfiguration { + pkgs = nixpkgs.legacyPackages.${system}; + modules = [ + ./home-manager/home.nix + inputs.nixvim.homeManagerModules.nixvim + inputs.stylix.homeManagerModules.stylix + ]; + }; + }; + +} diff --git a/home-manager/home.nix b/home-manager/home.nix new file mode 100644 index 0000000..0ca0c48 --- /dev/null +++ b/home-manager/home.nix @@ -0,0 +1,23 @@ +{ + + imports = [ + ./modules/bundle.nix + ./package-groups/bundle.nix + # ./your-variables.nix + ./your-packages.nix + ]; + + home = { + + username = "ficache"; + homeDirectory = "/home/ficache"; + stateVersion = "24.05"; + + + keyboard = { + layout = "us, ru"; + options = "grp:win_space_toggle"; + variant = "qwerty"; + }; + }; +} diff --git a/home-manager/modules/bundle.nix b/home-manager/modules/bundle.nix new file mode 100644 index 0000000..5a15116 --- /dev/null +++ b/home-manager/modules/bundle.nix @@ -0,0 +1,14 @@ +{ + imports = [ + ./defaultGtk.nix + ./git.nix + # ./desktop-managers/hypr.nix + # ./desktop-managers/waybar.nix + # ./nixvim/nixvim.nix + ./stylix.nix + # ./gammastep.nix + ./vscode.nix + ./syncthing.nix + ./helix.nix + ]; +} diff --git a/home-manager/modules/defaultGtk.nix b/home-manager/modules/defaultGtk.nix new file mode 100644 index 0000000..18b50a7 --- /dev/null +++ b/home-manager/modules/defaultGtk.nix @@ -0,0 +1,13 @@ +{ pkgs, ... }: + +{ + home.packages = [ pkgs.dconf ]; + + gtk = { + enable = true; + iconTheme = { + name = "Adwaita"; + package = pkgs.adwaita-icon-theme; + }; + }; +} diff --git a/home-manager/modules/desktop-managers/hypr.nix b/home-manager/modules/desktop-managers/hypr.nix new file mode 100644 index 0000000..814cab5 --- /dev/null +++ b/home-manager/modules/desktop-managers/hypr.nix @@ -0,0 +1,184 @@ +{ pkgs, ... }: + +{ + xdg.portal = { + enable = true; + extraPortals = [ pkgs.xdg-desktop-portal-hyprland pkgs.xdg-desktop-portal-gtk]; + config.common.default = ["hyprland" "gtk"]; + }; + + home.packages = [ + pkgs.hyprpaper + pkgs.hyprland-protocols + ]; + + + wayland.windowManager.hyprland = { + enable = true; + systemd.enable = true; + + extraConfig = '' + + monitor=eDP-1,1920x1080@144,0x0,1 + + ################### + ### MY PROGRAMS ### + ################### + + # See https://wiki.hyprland.org/Configuring/Keywords/ + + # Set programs that you use + $terminal = alacritty + $fileManager = nautilus + $menu = wofi --show drun + + + ################# + ### AUTOSTART ### + ################# + + # Autostart necessary processes (like notifications daemons, status bars, etc.) + # Or execute your favorite apps at launch like this: + + # exec-once = $terminal + # exec-once = nm-applet & + + exec-once = waybar & hyprpaper & alacritty -e nvim + exec-once = lxqt-policykit-agent + + input { + kb_layout = us,ru + kb_variant =qwerty + kb_options =grp:win_space_toggle + sensitivity = -0.5 + accel_profile = flat + } + + ##################### + ### LOOK AND FEEL ### + ##################### + + # Refer to https://wiki.hyprland.org/Configuring/Variables/ + + # https://wiki.hyprland.org/Configuring/Variables/#general + general { + gaps_in = 5 + gaps_out = 20 + + border_size = 2 + + # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on + allow_tearing = true + + layout = dwindle + } + + # https://wiki.hyprland.org/Configuring/Variables/#decoration + decoration { + rounding = 10 + + + + # https://wiki.hyprland.org/Configuring/Variables/#blur + blur { + enabled = true + size = 3 + passes = 1 + + vibrancy = 0.1696 + } + } + + # https://wiki.hyprland.org/Configuring/Variables/#animations + animations { + enabled = true + + # Default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more + + bezier = myBezier, 0.05, 0.9, 0.1, 1.05 + + animation = windows, 1, 7, myBezier + animation = windowsOut, 1, 7, default, popin 80% + animation = border, 1, 10, default + animation = borderangle, 1, 8, default + animation = fade, 1, 7, default + animation = workspaces, 1, 6, default + } + + # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more + dwindle { + pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below + preserve_split = true # You probably want this + } + + # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more + master { + new_status = master + } + + #################### + ### KEYBINDINGSS ### + #################### + + # See https://wiki.hyprland.org/Configuring/Keywords/ + $mainMod = SUPER # Sets "Windows" key as main modifier + + # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more + bind = $mainMod, Q, exec, $terminal + bind = $mainMod, C, killactive, + bind = $mainMod, M, exit, + bind = $mainMod, E, exec, $fileManager + bind = $mainMod, V, togglefloating, + bind = $mainMod, R, exec, $menu + bind = $mainMod, P, pseudo, # dwindle + bind = $mainMod, J, togglesplit, # dwindle + + # Move focus with mainMod + arrow keys + bind = $mainMod, left, movefocus, l + bind = $mainMod, right, movefocus, r + bind = $mainMod, up, movefocus, u + bind = $mainMod, down, movefocus, d + + # Switch workspaces with mainMod + [0-9] + bind = $mainMod, 1, workspace, 1 + bind = $mainMod, 2, workspace, 2 + bind = $mainMod, 3, workspace, 3 + bind = $mainMod, 4, workspace, 4 + bind = $mainMod, 5, workspace, 5 + bind = $mainMod, 6, workspace, 6 + bind = $mainMod, 7, workspace, 7 + bind = $mainMod, 8, workspace, 8 + bind = $mainMod, 9, workspace, 9 + bind = $mainMod, 0, workspace, 10 + + # Move active window to a workspace with mainMod + SHIFT + [0-9] + bind = $mainMod SHIFT, 1, movetoworkspace, 1 + bind = $mainMod SHIFT, 2, movetoworkspace, 2 + bind = $mainMod SHIFT, 3, movetoworkspace, 3 + bind = $mainMod SHIFT, 4, movetoworkspace, 4 + bind = $mainMod SHIFT, 5, movetoworkspace, 5 + bind = $mainMod SHIFT, 6, movetoworkspace, 6 + bind = $mainMod SHIFT, 7, movetoworkspace, 7 + bind = $mainMod SHIFT, 8, movetoworkspace, 8 + bind = $mainMod SHIFT, 9, movetoworkspace, 9 + bind = $mainMod SHIFT, 0, movetoworkspace, 10 + + # Example special workspace (scratchpad) + bind = $mainMod, S, togglespecialworkspace, magic + bind = $mainMod SHIFT, S, movetoworkspace, special:magic + + # Scroll through existing workspaces with mainMod + scroll + bind = $mainMod, mouse_down, workspace, e+1 + bind = $mainMod, mouse_up, workspace, e-1 + + # Move/resize windows with mainMod + LMB/RMB and dragging + bindm = $mainMod, mouse:272, movewindow + bindm = $mainMod, mouse:273, resizewindow + + + bind = ,Print,exec,grimblast copysave area + + + ''; + }; +} diff --git a/home-manager/modules/desktop-managers/waybar.nix b/home-manager/modules/desktop-managers/waybar.nix new file mode 100644 index 0000000..78c0c21 --- /dev/null +++ b/home-manager/modules/desktop-managers/waybar.nix @@ -0,0 +1,191 @@ +{ lib, config, pkgs, ... }: + +{ + programs.waybar = { + enable = true; + settings = { + mainBar = { + layer = "top"; + position = "top"; + height = 10; + spacing = 5; + margin-left = 200; + margin-right = 200; + + modules-left = [ + "hyprland/workspaces" + ]; + + modules-center = [ + "clock#1" + "clock#2" + ]; + + "modules-right" = [ + "pulseaudio" + "network" + "cpu" + "battery" + "memory" + "tray" + ]; + + "hyprland/workspaces" = { + disable-scroll = true; + format = "{name}"; + }; + + "clock#1" = { + format = "{:%H:%M}"; + tooltip = false; + }; + + "clock#2" = { + format = "{:%a | %m-%d}"; + tooltip = false; + }; + + "pulseaudio" = { + format = "{icon} {volume:2}%"; + format-bluetooth = "{icon} {volume}%"; + format-muted = "MUTE"; + format-icons = { + headphones = ""; + default = [ + "" + "" + ]; + }; + scroll-step = 5; + on-click = "pamixer -t"; + on-click-right = "pavucontrol"; + }; + + "memory" = { + interval = 5; + format = "Mem {}%"; + }; + + "cpu" = { + interval = 5; + format = "CPU {usage:2}%"; + }; + + "battery" = { + states = { + good = 95; + warning = 30; + critical = 15; + }; + format = "{icon} {capacity}%"; + format-icons = [ + "" + "" + "" + "" + "" + ]; + }; + + "tray" = { + icon-size = 20; + }; + + "network" = { + interval = 5; + format-wifi = " {essid} ({signalStrength}%)"; + format-ethernet = " {ifname}: {ipaddr}/{cidr}"; + format-disconnected = "Disconnected"; + tooltip-format = "{ifname}: {ipaddr}"; + }; + }; + + }; + style = '' + @define-color main @base00; + @define-color mainc @base04; + + * { + border: none; + border-radius:0; + padding: 0px; + } + + window#waybar { + border: 2px solid @mainc; + background: alpha(@main, 0.7); + border-radius: 10px; + } + + #workspaces, + #clock.1, + #clock.2, + #clock.3, + #pulseaudio, + #memory, + #cpu, + #battery, + #disk, + #tray { + margin-right: 5px; + border-radius: 10px; + } + + #clock { + border-radius: 10px; + + } + + #workspaces { + padding: 4px; + border-radius: 10px; + } + + #workspaces button.active { + border-radius: 10px; + border: 2px solid @mainc; + } + + #workspaces button { + transition-property: background-color; + transition-duration: 0.5s; + + } + + #workspaces button:hover { + border-radius: 10px; + background: lighter(@main); + } + + #pulseaudio { + border-radius: 10px; + color: @base0D; + } + #memory { + border-radius: 10px; + color: @base0C; + } + #cpu { + border-radius: 10px; + color: @base0F; + } + #battery { + border-radius: 10px; + color: @base0B; + } + #disk { + border-radius: 10px; + color: @base09; + } + + #clock, + #pulseaudio, + #memory, + #cpu, + #battery, + #disk { + padding: 0 10px; + } + ''; + }; +} diff --git a/home-manager/modules/gammastep.nix b/home-manager/modules/gammastep.nix new file mode 100644 index 0000000..4e1dd72 --- /dev/null +++ b/home-manager/modules/gammastep.nix @@ -0,0 +1,8 @@ +{ + services.gammastep = { + enable = true; + latitude = 52.58; + longitude = 36.3; + + }; +} diff --git a/home-manager/modules/git.nix b/home-manager/modules/git.nix new file mode 100644 index 0000000..d46220c --- /dev/null +++ b/home-manager/modules/git.nix @@ -0,0 +1,23 @@ +{ pkgs, ... }: + +{ + programs.git = { + enable = true; + userEmail = "dixxe.mail@proton.me"; # Hello there :D. + userName = "ficache"; + extraConfig = { + credential.helper = [ + "cache --timeout 21600" + "oauth" + ]; + signing.signByDefault = true; + }; + }; + + home.packages = with pkgs; [ # Pretty wonky, but idk + git-credential-oauth # how to make it better + gnupg + pinentry-qt + meld + ]; +} diff --git a/home-manager/modules/helix.nix b/home-manager/modules/helix.nix new file mode 100644 index 0000000..8ee673a --- /dev/null +++ b/home-manager/modules/helix.nix @@ -0,0 +1,13 @@ +{ pkgs, ... }: + +{ + programs.helix = { + + enable = true; + extraPackages = [ + pkgs.marksman + pkgs.rust-analyzer + pkgs.nil + ]; + }; +} diff --git a/home-manager/modules/nixvim/nixvim.nix b/home-manager/modules/nixvim/nixvim.nix new file mode 100644 index 0000000..3979790 --- /dev/null +++ b/home-manager/modules/nixvim/nixvim.nix @@ -0,0 +1,13 @@ +{ + programs.nixvim = { + enable = true; + + defaultEditor = true; + # Color schemes managed by stylix! :D + + }; + + imports = [ + ./plugins-bundle.nix + ]; +} diff --git a/home-manager/modules/nixvim/plugins-bundle.nix b/home-manager/modules/nixvim/plugins-bundle.nix new file mode 100644 index 0000000..206a31a --- /dev/null +++ b/home-manager/modules/nixvim/plugins-bundle.nix @@ -0,0 +1,14 @@ +{ + imports = [ + ./plugins/cmp.nix + ./plugins/lsp.nix + ./plugins/lualine.nix + ./plugins/neotree.nix + ./plugins/presence.nix + ./plugins/autoclose.nix + ./plugins/dashboard.nix + ./plugins/telescope.nix + ./plugins/buffreline.nix + ./plugins/inted-a-matic.nix + ]; +} diff --git a/home-manager/modules/nixvim/plugins/autoclose.nix b/home-manager/modules/nixvim/plugins/autoclose.nix new file mode 100644 index 0000000..9ec3f68 --- /dev/null +++ b/home-manager/modules/nixvim/plugins/autoclose.nix @@ -0,0 +1,10 @@ +{ + programs.nixvim.plugins.autoclose = { + enable = true; + keys = { + "(" = { escape = false; close = true; pair = "()"; }; + "[" = { escape = false; close = true; pair = "[]"; }; + "{" = { escape = false; close = true; pair = "{}"; }; + }; + }; +} diff --git a/home-manager/modules/nixvim/plugins/buffreline.nix b/home-manager/modules/nixvim/plugins/buffreline.nix new file mode 100644 index 0000000..ece8bc6 --- /dev/null +++ b/home-manager/modules/nixvim/plugins/buffreline.nix @@ -0,0 +1,3 @@ +{ + programs.nixvim.plugins.bufferline.enable = true; +} diff --git a/home-manager/modules/nixvim/plugins/cmp.nix b/home-manager/modules/nixvim/plugins/cmp.nix new file mode 100644 index 0000000..9af8d70 --- /dev/null +++ b/home-manager/modules/nixvim/plugins/cmp.nix @@ -0,0 +1,26 @@ +{ + programs.nixvim.plugins.cmp-nvim-lsp.enable = true; + programs.nixvim.plugins.cmp-vsnip.enable = true; + + programs.nixvim.plugins.cmp = { + enable = true; + autoEnableSources = true; + + settings.sources = [ + {name = "nvim_lsp";} + {name= "vsnip";} + {name = "path";} + {name = "buffer";} + ]; + + settings.mapping = { + "" = "cmp.mapping.complete()"; + "" = "cmp.mapping.scroll_docs(-4)"; + "" = "cmp.mapping.close()"; + "" = "cmp.mapping.scroll_docs(4)"; + "" = "cmp.mapping.confirm({ select = true })"; + "" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})"; + "" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})"; + }; + }; +} diff --git a/home-manager/modules/nixvim/plugins/dashboard.nix b/home-manager/modules/nixvim/plugins/dashboard.nix new file mode 100644 index 0000000..2dbb25e --- /dev/null +++ b/home-manager/modules/nixvim/plugins/dashboard.nix @@ -0,0 +1,5 @@ +{ + programs.nixvim.plugins.dashboard = { + enable = true; + }; +} diff --git a/home-manager/modules/nixvim/plugins/inted-a-matic.nix b/home-manager/modules/nixvim/plugins/inted-a-matic.nix new file mode 100644 index 0000000..c85c326 --- /dev/null +++ b/home-manager/modules/nixvim/plugins/inted-a-matic.nix @@ -0,0 +1,3 @@ +{ + programs.nixvim.plugins.indent-o-matic.enable = true; +} diff --git a/home-manager/modules/nixvim/plugins/lsp.nix b/home-manager/modules/nixvim/plugins/lsp.nix new file mode 100644 index 0000000..d87487b --- /dev/null +++ b/home-manager/modules/nixvim/plugins/lsp.nix @@ -0,0 +1,11 @@ +{ + # programs.nixvim.plugins.lsp-lines.enable = true; + + programs.nixvim.plugins.lsp = { + enable = true; + servers = { + + nixd.enable = true; + }; + }; +} diff --git a/home-manager/modules/nixvim/plugins/lualine.nix b/home-manager/modules/nixvim/plugins/lualine.nix new file mode 100644 index 0000000..05158d7 --- /dev/null +++ b/home-manager/modules/nixvim/plugins/lualine.nix @@ -0,0 +1,3 @@ +{ + programs.nixvim.plugins.lualine.enable = true; +} diff --git a/home-manager/modules/nixvim/plugins/neotree.nix b/home-manager/modules/nixvim/plugins/neotree.nix new file mode 100644 index 0000000..e5035a5 --- /dev/null +++ b/home-manager/modules/nixvim/plugins/neotree.nix @@ -0,0 +1,7 @@ +{ + programs.nixvim.plugins.neo-tree = { + enable = true; + filesystem.followCurrentFile.enabled = true; + closeIfLastWindow = true; + }; +} diff --git a/home-manager/modules/nixvim/plugins/presence.nix b/home-manager/modules/nixvim/plugins/presence.nix new file mode 100644 index 0000000..d82a663 --- /dev/null +++ b/home-manager/modules/nixvim/plugins/presence.nix @@ -0,0 +1,10 @@ +{ + programs.nixvim.plugins.presence-nvim = { + enable = true; + buttons = + [ + {label = "Gitlab"; url = "https://gitlab.com/Dixxe";} + {label = "Github"; url = "https://github.com/Dixxe";} + ]; + }; +} diff --git a/home-manager/modules/nixvim/plugins/telescope.nix b/home-manager/modules/nixvim/plugins/telescope.nix new file mode 100644 index 0000000..d6cf92c --- /dev/null +++ b/home-manager/modules/nixvim/plugins/telescope.nix @@ -0,0 +1,28 @@ +{ + + programs.nixvim.plugins.telescope = { + enable = true; + + keymaps = { + "ff" = "find_files"; + "b" = "buffers"; + "fh" = "help_tags"; + "gf" = "git_files"; + "of" = "oldfiles"; + # "fg" = "live_grep"; + # "fd" = "diagnostics"; + }; + + settings.defaults = { + file_ignore_patterns = [ + "^.git/" + "^.mypy_cache/" + "^__pycache__/" + "^output/" + "^data/" + "%.ipynb" + ]; + set_env.COLORTERM = "truecolor"; + }; + }; +} diff --git a/home-manager/modules/stylix.nix b/home-manager/modules/stylix.nix new file mode 100644 index 0000000..b4fcc10 --- /dev/null +++ b/home-manager/modules/stylix.nix @@ -0,0 +1,25 @@ +{ pkgs, ... }: + +{ + home.packages = [ pkgs.dconf ]; + + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-soft.yaml"; + + image = ../../wallpaper3.png; + + cursor = { + package = pkgs.oreo-cursors-plus; + name = "oreo_white_cursors"; + size = 24; + }; + + opacity = { + desktop = 0.0; #waybars opacity + popups = 0.75; + terminal = 0.9; + }; + + }; +} diff --git a/home-manager/modules/syncthing.nix b/home-manager/modules/syncthing.nix new file mode 100644 index 0000000..f48bb7f --- /dev/null +++ b/home-manager/modules/syncthing.nix @@ -0,0 +1,7 @@ +{...}: +{ + services.syncthing = { + enable = true; + tray.enable = true; + }; +} \ No newline at end of file diff --git a/home-manager/modules/vscode.nix b/home-manager/modules/vscode.nix new file mode 100644 index 0000000..e3e38e9 --- /dev/null +++ b/home-manager/modules/vscode.nix @@ -0,0 +1,10 @@ +# For people that doesn't like neovim :) +{ pkgs, ... }: +{ + programs.vscode = { + enable = true; + package = pkgs.vscodium; + # I don't add extensions here, because nixpkgs doesn't contain + # extensions I need. Oops. + }; +} \ No newline at end of file diff --git a/home-manager/package-groups/bundle.nix b/home-manager/package-groups/bundle.nix new file mode 100644 index 0000000..e04f0c4 --- /dev/null +++ b/home-manager/package-groups/bundle.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ./video-processing.nix + ]; +} \ No newline at end of file diff --git a/home-manager/package-groups/video-processing.nix b/home-manager/package-groups/video-processing.nix new file mode 100644 index 0000000..dc2e18f --- /dev/null +++ b/home-manager/package-groups/video-processing.nix @@ -0,0 +1,19 @@ +{ pkgs, ... }: + +{ + programs.obs-studio = { + enable = true; + plugins = with pkgs.obs-studio-plugins; [ + wlrobs + obs-backgroundremoval + obs-pipewire-audio-capture + ]; + }; + + home.packages = [ + + pkgs.jellyfin-ffmpeg + pkgs.libsForQt5.kdenlive + + ]; +} diff --git a/home-manager/your-packages.nix b/home-manager/your-packages.nix new file mode 100644 index 0000000..d3e055d --- /dev/null +++ b/home-manager/your-packages.nix @@ -0,0 +1,35 @@ +{ lib, pkgs, ... }: + +{ + home.packages = with pkgs; [ + # Hyprland stuff + lxqt.lxqt-policykit + wofi + + obsidian + alacritty + grimblast + vlc + + # Personal love + nautilus + + # Social stuff + telegram-desktop + + firefox + qbittorrent + libreoffice + + # Minecraft stuff + prismlauncher + + #Random stuff + krita + + ]; + + nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ + "obsidian" + ]; +} diff --git a/home-manager/your-variables.nix b/home-manager/your-variables.nix new file mode 100644 index 0000000..81cd727 --- /dev/null +++ b/home-manager/your-variables.nix @@ -0,0 +1,5 @@ +{ + home.sessionVariables = { + EDITOR = "nano"; + }; +} diff --git a/nixos/configuration.nix b/nixos/configuration.nix new file mode 100644 index 0000000..04c3329 --- /dev/null +++ b/nixos/configuration.nix @@ -0,0 +1,32 @@ +# Help is available in the configuration.nix(5) man page +# and in the NixOS manual (accessible by running ‘nixos-help’). + +{ ... }: + +{ + imports = + [ # Include the results of the hardware scan. + ./hardware-configuration.nix + ./modules/minimal/bundle.nix # minimal bundle to run pc + ./modules/user_bundle.nix + + ./modules/hardware/nvidia.nix + ./modules/hardware/battery-threshold.nix + ./system-packages.nix + ./modules/desktop-enviroments/plasma6.nix + ]; + + disabledModules = [ + ./modules/xkb-settings.nix + ]; + + nix.settings.experimental-features = [ "nix-command" "flakes" ]; + + time.timeZone = "Europe/Moscow"; + + system.stateVersion = "24.05"; # Did you read the comment? + + services.gvfs.enable = true; + services.udisks2.enable = true; + +} diff --git a/nixos/hardware-configuration.nix b/nixos/hardware-configuration.nix new file mode 100644 index 0000000..34f51bb --- /dev/null +++ b/nixos/hardware-configuration.nix @@ -0,0 +1,40 @@ +# 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. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/d8209bc7-7fe6-4163-93b2-a7d352d8aba0"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/AE92-D68E"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/f35b0e76-0cd6-4410-acc3-d27024ef68a9"; } + ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/nixos/modules/auto-cpufreq.nix b/nixos/modules/auto-cpufreq.nix new file mode 100644 index 0000000..ed35e23 --- /dev/null +++ b/nixos/modules/auto-cpufreq.nix @@ -0,0 +1,13 @@ +{ + services.auto-cpufreq.enable = true; + services.auto-cpufreq.settings = { + battery = { + governor = "powersave"; + turbo = "never"; + }; + charger = { + governor = "balanced"; + turbo = "never"; + }; + }; +} diff --git a/nixos/modules/desktop-enviroments/cinnamon.nix b/nixos/modules/desktop-enviroments/cinnamon.nix new file mode 100644 index 0000000..f5336f6 --- /dev/null +++ b/nixos/modules/desktop-enviroments/cinnamon.nix @@ -0,0 +1,16 @@ +{ ... }: + +{ + services = { + libinput.enable = true; + displayManager.defaultSession = "cinnamon"; + }; + + services.xserver = { + enable = true; + displayManager.lightdm.enable = true; + desktopManager = { + cinnamon.enable = true; + }; + }; +} \ No newline at end of file diff --git a/nixos/modules/desktop-enviroments/gnome.nix b/nixos/modules/desktop-enviroments/gnome.nix new file mode 100644 index 0000000..fdad49a --- /dev/null +++ b/nixos/modules/desktop-enviroments/gnome.nix @@ -0,0 +1,16 @@ +{ ... }: + +{ + services = { + libinput.enable = true; + displayManager.defaultSession = "gnome"; + }; + + services.xserver = { + enable = true; + displayManager.gdm.enable = true; + desktopManager = { + gnome.enable = true; + }; + }; +} \ No newline at end of file diff --git a/nixos/modules/desktop-enviroments/plasma6.nix b/nixos/modules/desktop-enviroments/plasma6.nix new file mode 100644 index 0000000..cbe23e7 --- /dev/null +++ b/nixos/modules/desktop-enviroments/plasma6.nix @@ -0,0 +1,31 @@ +{ pkgs, ... }: + +{ + # Debloat. + environment.plasma6.excludePackages = with pkgs.kdePackages; [ + plasma-browser-integration + konsole + oxygen + kate + okular + elisa + ]; + + services = { + libinput.enable = true; + + displayManager = { + sddm.enable = true; + }; + + desktopManager = { + plasma6.enable = true; + }; + + power-profiles-daemon.enable = false; + }; + + services.xserver = { + enable = true; + }; +} \ No newline at end of file diff --git a/nixos/modules/docker.nix b/nixos/modules/docker.nix new file mode 100644 index 0000000..5da139b --- /dev/null +++ b/nixos/modules/docker.nix @@ -0,0 +1,3 @@ +{ + virtualisation.docker.enable = true; +} \ No newline at end of file diff --git a/nixos/modules/firewall.nix b/nixos/modules/firewall.nix new file mode 100644 index 0000000..79f8d80 --- /dev/null +++ b/nixos/modules/firewall.nix @@ -0,0 +1,6 @@ +{ + networking.firewall = { + allowedTCPPorts = [ 21614 ]; + allowedUDPPorts = [ 21614 ]; + }; +} diff --git a/nixos/modules/gaming-tweaks.nix b/nixos/modules/gaming-tweaks.nix new file mode 100644 index 0000000..598f6c6 --- /dev/null +++ b/nixos/modules/gaming-tweaks.nix @@ -0,0 +1,37 @@ +{ pkgs, ...}: + +{ + programs.steam = { + enable = true; + #extest.enable = true; + remotePlay.openFirewall = true; + dedicatedServer.openFirewall = true; + localNetworkGameTransfers.openFirewall = true; + package = pkgs.steam-small.override { + extraEnv = { + OBS_VKCAPTURE = true; + }; + }; + }; + + hardware.graphics = { + enable = true; + enable32Bit = true; + }; + + environment.systemPackages = [ + + pkgs.lutris + pkgs.wineWowPackages.waylandFull + pkgs.winetricks + + pkgs.dxvk + pkgs.mesa + pkgs.mangohud + pkgs.gamemode + pkgs.gamescope + pkgs.vulkan-loader + pkgs.vulkan-validation-layers + + ]; +} diff --git a/nixos/modules/hardware/amdgpu.nix b/nixos/modules/hardware/amdgpu.nix new file mode 100644 index 0000000..e487cf1 --- /dev/null +++ b/nixos/modules/hardware/amdgpu.nix @@ -0,0 +1,14 @@ +{ ... }: + +{ + services.xserver.videoDrivers = [ "amdgpu" ]; + + hardware = { + graphics.enable = true; + }; + + hardware.amdgpu.amdvlk = { + enable = true; + support32Bit.enable = true; + }; +} \ No newline at end of file diff --git a/nixos/modules/hardware/battery-threshold.nix b/nixos/modules/hardware/battery-threshold.nix new file mode 100644 index 0000000..60a6328 --- /dev/null +++ b/nixos/modules/hardware/battery-threshold.nix @@ -0,0 +1,21 @@ +{ ... }: + +{ + systemd.services.setBatteryChargeThreshold = { + description = "Set the battery charge threshold"; + after = [ "multi-user.target" ]; + + serviceConfig = { + Type = "oneshot"; + Restart = "on-failure"; + }; + + startLimitBurst = 0; + + script = '' + echo 60 > /sys/class/power_supply/BAT0/charge_control_end_threshold + ''; + + wantedBy = [ "multi-user.target" ]; + }; +} \ No newline at end of file diff --git a/nixos/modules/hardware/nvidia.nix b/nixos/modules/hardware/nvidia.nix new file mode 100644 index 0000000..dc7f8df --- /dev/null +++ b/nixos/modules/hardware/nvidia.nix @@ -0,0 +1,24 @@ +{ config, ...}: + +{ + services.xserver.videoDrivers = ["nvidia"]; + + hardware = { + graphics.enable = true; + }; + + hardware.nvidia = { + modesetting.enable = true; + open = true; + nvidiaSettings = true; + package = config.boot.kernelPackages.nvidiaPackages.stable; + }; + + + hardware.nvidia.prime = { + sync.enable = true; + + nvidiaBusId = "PCI:1:0:0"; + amdgpuBusId = "PCI:4:2:0"; + }; +} \ No newline at end of file diff --git a/nixos/modules/i2p/i2p.nix b/nixos/modules/i2p/i2p.nix new file mode 100644 index 0000000..5aa31cc --- /dev/null +++ b/nixos/modules/i2p/i2p.nix @@ -0,0 +1,19 @@ +{ + + imports = [ + ./outTunnels.nix + ./protocols.nix + ]; + + services.i2pd = { + enable = true; + + bandwidth = 912; # change to your ethernet speed. + port = 21614; # add your OWN port!! AND DONT SHARE IT!! + + upnp.enable = true; + upnp.name = "onion"; + + + }; +} diff --git a/nixos/modules/i2p/outTunnels.nix b/nixos/modules/i2p/outTunnels.nix new file mode 100644 index 0000000..34ef54f --- /dev/null +++ b/nixos/modules/i2p/outTunnels.nix @@ -0,0 +1,24 @@ +{ + + services.i2pd.outTunnels = { + + MinecraftServer = { + enable = true; + address = "127.0.0.1"; + port = 25565; + destination = "abnrfgqqsoy6d3dlc7dzq64c5uir5vd7hxy7s7weo6qvmzigf34a.b32.i2p"; + keys = "i2pcraft.dat"; + }; + + IRC = { + enable = true; + address = "127.0.0.1"; + port = 6669; + destination = "ckkpssingzjiaqtrfakkjybu2y4fxuo6chvraxg575lcrh3nvu4a.b32.i2p"; + destinationPort = 6667; + keys = "irc-client-key.dat"; + }; + + }; + +} diff --git a/nixos/modules/i2p/protocols.nix b/nixos/modules/i2p/protocols.nix new file mode 100644 index 0000000..adfc928 --- /dev/null +++ b/nixos/modules/i2p/protocols.nix @@ -0,0 +1,19 @@ +{ + + services.i2pd.proto = { + http = { + enable = true; + }; + httpProxy = { + enable = true; + outproxy = "purokishi.i2p"; + }; + socksProxy = { + enable = true; + }; + sam = { + enable = true; + }; + }; + +} diff --git a/nixos/modules/minimal/bootloader.nix b/nixos/modules/minimal/bootloader.nix new file mode 100644 index 0000000..fbbcafd --- /dev/null +++ b/nixos/modules/minimal/bootloader.nix @@ -0,0 +1,5 @@ +{ + # Bootloader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; +} \ No newline at end of file diff --git a/nixos/modules/minimal/bundle.nix b/nixos/modules/minimal/bundle.nix new file mode 100644 index 0000000..20e7b09 --- /dev/null +++ b/nixos/modules/minimal/bundle.nix @@ -0,0 +1,11 @@ +{ + imports = [ + ./fonts.nix + ./bootloader.nix + ./networking.nix + ./locales.nix + ./xkb-settings.nix + ./users.nix + ./garbage-collector.nix + ]; +} diff --git a/nixos/modules/minimal/fonts.nix b/nixos/modules/minimal/fonts.nix new file mode 100644 index 0000000..3450dea --- /dev/null +++ b/nixos/modules/minimal/fonts.nix @@ -0,0 +1,11 @@ +{ pkgs, ... }: + +{ + fonts.packages = with pkgs; [ + (nerdfonts.override { fonts = [ "Ubuntu" ]; }) + noto-fonts + noto-fonts-cjk + noto-fonts-extra + hack-font + ]; +} diff --git a/nixos/modules/minimal/garbage-collector.nix b/nixos/modules/minimal/garbage-collector.nix new file mode 100644 index 0000000..073069b --- /dev/null +++ b/nixos/modules/minimal/garbage-collector.nix @@ -0,0 +1,6 @@ +{ + nix.gc = { + automatic = true; + dates = "weekly"; + }; +} diff --git a/nixos/modules/minimal/locales.nix b/nixos/modules/minimal/locales.nix new file mode 100644 index 0000000..a4951c0 --- /dev/null +++ b/nixos/modules/minimal/locales.nix @@ -0,0 +1,15 @@ +{ + 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"; + }; +} \ No newline at end of file diff --git a/nixos/modules/minimal/networking.nix b/nixos/modules/minimal/networking.nix new file mode 100644 index 0000000..77347cd --- /dev/null +++ b/nixos/modules/minimal/networking.nix @@ -0,0 +1,5 @@ +{ + networking.hostName = "ficache-nixos"; # Define your hostname. + # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.\ + networking.networkmanager.enable = true; +} \ No newline at end of file diff --git a/nixos/modules/minimal/users.nix b/nixos/modules/minimal/users.nix new file mode 100644 index 0000000..aaf6107 --- /dev/null +++ b/nixos/modules/minimal/users.nix @@ -0,0 +1,8 @@ +{ + # Define a user account. Don't forget to set a password with ‘passwd’. + users.users.ficache = { + isNormalUser = true; + description = "ficache"; + extraGroups = [ "networkmanager" "wheel" "docker" "vboxusers" ]; + }; +} diff --git a/nixos/modules/minimal/xkb-settings.nix b/nixos/modules/minimal/xkb-settings.nix new file mode 100644 index 0000000..bb4b368 --- /dev/null +++ b/nixos/modules/minimal/xkb-settings.nix @@ -0,0 +1,8 @@ +{ + # Configure keymap in X11 + services.xserver.xkb = { + layout = "us,ru"; + variant = ""; + options = "grp:win_space_toggle"; + }; +} \ No newline at end of file diff --git a/nixos/modules/pipewire.nix b/nixos/modules/pipewire.nix new file mode 100644 index 0000000..6973aba --- /dev/null +++ b/nixos/modules/pipewire.nix @@ -0,0 +1,12 @@ +{ + hardware.pulseaudio.enable = false; + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + # If you want to use JACK applications, uncomment this + #jack.enable = true; + }; +} diff --git a/nixos/modules/privoxy.nix b/nixos/modules/privoxy.nix new file mode 100644 index 0000000..9f05b68 --- /dev/null +++ b/nixos/modules/privoxy.nix @@ -0,0 +1,8 @@ +{ + services.privoxy = { + enable = true; + settings = { + forward = [ ".i2p localhost:4444" ".i2p localhost:4445" "/ 35.185.196.38:3128" ]; + }; + }; +} diff --git a/nixos/modules/user_bundle.nix b/nixos/modules/user_bundle.nix new file mode 100644 index 0000000..703b29a --- /dev/null +++ b/nixos/modules/user_bundle.nix @@ -0,0 +1,13 @@ +{ + imports = [ + ./gaming-tweaks.nix + ./pipewire.nix + ./auto-cpufreq.nix + ./zerotierone.nix + # ./docker.nix + # ./zram.nix + # ./firewall.nix + ./privoxy.nix + # ./i2p/i2p.nix + ]; +} \ No newline at end of file diff --git a/nixos/modules/virtualbox.nix b/nixos/modules/virtualbox.nix new file mode 100644 index 0000000..a688f31 --- /dev/null +++ b/nixos/modules/virtualbox.nix @@ -0,0 +1,9 @@ +{ + virtualisation.virtualbox.host = { + enable = true; + enableExtensionPack = true; + }; + + services.gvfs.enable = true; + services.udisks2.enable = true; +} \ No newline at end of file diff --git a/nixos/modules/zerotierone.nix b/nixos/modules/zerotierone.nix new file mode 100644 index 0000000..fa60ae5 --- /dev/null +++ b/nixos/modules/zerotierone.nix @@ -0,0 +1,8 @@ +{ + services.zerotierone = { + enable = true; + joinNetworks = [ + "272f5eae16114dee" # it's private. + ]; + }; +} \ No newline at end of file diff --git a/nixos/modules/zram.nix b/nixos/modules/zram.nix new file mode 100644 index 0000000..145e99d --- /dev/null +++ b/nixos/modules/zram.nix @@ -0,0 +1,6 @@ +{ + zramSwap = { + enable = true; + algorithm = "lz4"; + }; +} diff --git a/nixos/system-packages.nix b/nixos/system-packages.nix new file mode 100644 index 0000000..6ed0f77 --- /dev/null +++ b/nixos/system-packages.nix @@ -0,0 +1,14 @@ +# Edit this configuration file to define what should be installed on +# your SYSTEM. For something simple use home-manager. +{ inputs, pkgs, ...}: { + + nixpkgs.config.allowUnfree = true; + + environment.systemPackages = with pkgs; [ + inputs.envycontrol.packages.x86_64-linux.default + pciutils + home-manager + nh + ]; + +} diff --git a/preview.png b/preview.png new file mode 100644 index 0000000..6ec8b8c Binary files /dev/null and b/preview.png differ diff --git a/wallpaper.png b/wallpaper.png new file mode 100644 index 0000000..da06f61 Binary files /dev/null and b/wallpaper.png differ diff --git a/wallpaper2.png b/wallpaper2.png new file mode 100644 index 0000000..481a9dc Binary files /dev/null and b/wallpaper2.png differ diff --git a/wallpaper3.png b/wallpaper3.png new file mode 100644 index 0000000..a04e524 Binary files /dev/null and b/wallpaper3.png differ