Compare commits
No commits in common. "b53969c87a4051040d80737169f1d0d636c01770" and "ab46247efa4c23f0879963ffafe981d934590b78" have entirely different histories.
b53969c87a
...
ab46247efa
55
Readme.md
55
Readme.md
|
@ -1,55 +0,0 @@
|
|||
# Voronind NixOS configuration.
|
||||
|
||||
## Screenshot.
|
||||
|
||||
![Screenshot](https://i.imgur.com/aGmmVJa.png)
|
||||
|
||||
[Wallpaper from the Screenshot](https://git.voronind.com/voronind/nixos/src/commit/97559710c57f81e42a32b11139d6d4c3dff20ab3/part/Wallpaper.nix#L2)
|
||||
|
||||
[My current wallpaper](https://git.voronind.com/voronind/nixos/src/branch/main/part/Wallpaper.nix#L2)
|
||||
|
||||
## What is NixOS?
|
||||
|
||||
NixOS allows you to manage your systems declaratively. Which means that nothing happens outside the centralized config. System handles all the mutations when your config changes - even without reboot!
|
||||
|
||||
The core of the system is a thing called Nixpkgs. Nix is not your regular package manager. Smart people simplified all the complicated installation and configuration to a single generalized way of writing configuration.
|
||||
|
||||
This repository uses flakes for configuration. I really recomend you to start with flakes and skip channels entirely. Flakes give you one killer feature called version locking. This means that unless you update your .lock file, you'll have all the same binary versions across all the hosts. This makes thing very consistent across all your hosts. And it allows for easy rollback just by dropping .lock file update commit.
|
||||
|
||||
NixOS also scales well. You can have a single configuration file just for your host locally. Or, like me, you can have an online repository for any amount of hosts. All my hosts pull changes every hour from this repo. They are *not* all running the same configuration, which is a very common misconception. Here I have a bunch of "modules" like Bash, Gnome, Sway, Gaming etc. For example, I want to do heavy gaming on my desktop, so I enable Gnome+Gaming. But my laptop has *smol (kitten sized)* RAM and I go with just Sway and no Gaming :sad:.
|
||||
|
||||
For power users it has a heck load of goodies! For example, if you have a home server or just a powerful machine, you can use it as a cache and/or a build server. In my setup it works like this: when any of my hosts updates, builds any development shell or temporarily loads any package - it caches everything on my home lab. This means that after each flake lock update (package versions) I download everything over the Internet only once - other local hosts pull from my homelab over the fast local connection. Also if I need to build a heavy development environment i.e. for Android project - it will be built once, cached the result on homelab and then other hosts will pull the prebuild environment. You can also create Live ISO installations from your config, run in impermanence mode and so much more!
|
||||
|
||||
Outside of NixOS you also get things like Dev Shells. They allow you to create reproducible environments per project. This means you can run `nix develop` on any host with Nix package manager (not limited to NixOS) and have *exact* environment. By only typing two words. This creates a consistent environment, which practically destroys *"it works on my machine!"* arguments. This said, you may actually start in softcore mode: by utilizing Nix package manager and Home Manager. They do not require NixOS and can help you get aquainted with Nix ecosystem. But if it's just so happens that you distrohop now - spin it up! Learning the Nix language may be daunting, but in the long run it will save you so much time - in shipping updates,
|
||||
|
||||
The project started way back in 2003 and is rock solid by now.
|
||||
And no, this is by far *not* the same thing as Ansible and Docker.
|
||||
|
||||
## NixOS learning roadmap.
|
||||
|
||||
0. [Nix Pills](https://nixos.org/guides/nix-pills/). This is a bit controversial one. Try it, but if it's hard to read for you - just skip it for now.
|
||||
|
||||
??? Where to look for stuff.
|
||||
??? Nix language.
|
||||
??? Nix package manager.
|
||||
??? Nixpkgs.
|
||||
??? Home manager.
|
||||
|
||||
??? (Optional) Remote builders.
|
||||
??? (Optional) Live ISO.
|
||||
??? (Optional) Dev Shells.
|
||||
??? (Optional) Impermanence.
|
||||
|
||||
## Discovering my configuration.
|
||||
|
||||
Even tho I've tried to document everything I can in a dum-dum way, I still highly recommend you to learn the very basics of Nix language. If you can give a basic answer to these questions, you may continue:
|
||||
|
||||
1. What a set is?
|
||||
2. How to define a function?
|
||||
3. *???*
|
||||
|
||||
Start from the [Flake](flake.nix) file and follow the comments. If you have any questions, get in touch using [Telegram](https://t.me/voronind_com) or [Email](mailto:hi@voronind.com).
|
||||
|
||||
## Configuration highlights.
|
||||
|
||||
* [Keyd](module/common/Keyd.nix) allows you to have QMK-like keyboard remaps. Killer-feature is the ability to have remaps per-application. I have pretty common remaps like CapsLock to Ctrl/Esc combo, Right Shift to Backspace, Backspace to Delete and overlays for System/Windows/Media/Application controls as well as Macros.
|
146
flake.nix
146
flake.nix
|
@ -1,40 +1,21 @@
|
|||
# This is a configuration entry-point called "Flake".
|
||||
# Here you define your inputs (dependencies) and outputs (hosts).
|
||||
{
|
||||
# Those are external dependencies.
|
||||
inputs = {
|
||||
# Core system.
|
||||
# Homepage: https://github.com/NixOS/nixpkgs
|
||||
# Manual: https://nixos.org/manual/nixos/stable
|
||||
# Search: https://search.nixos.org/packages and https://search.nixos.org/options
|
||||
# System.
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
|
||||
# This thing manages user's /home directroies. Because NixOS only manages system itself.
|
||||
# Homepage: https://github.com/nix-community/home-manager
|
||||
# Manual: https://nix-community.github.io/home-manager
|
||||
# Search: https://home-manager-options.extranix.com
|
||||
stylix.url = "github:danth/stylix";
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
|
||||
# This means that home-manager and our Flake both depend on the same nixpkgs version.
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# This allows automatic styling based on active Wallpaper.
|
||||
# Homepage: https://github.com/danth/stylix
|
||||
# Manual: https://danth.github.io/stylix
|
||||
stylix.url = "github:danth/stylix";
|
||||
|
||||
# Nix on Android (inside Termux). It has no NixOS modules, but still allows the use of Nixpkgs arm packages with Home-Manager configurations.
|
||||
# Homepage: https://github.com/nix-community/nix-on-droid
|
||||
# Manual: https://github.com/nix-community/nix-on-droid/blob/master/README.md
|
||||
# Android.
|
||||
nix-on-droid = {
|
||||
url = "github:t184256/nix-on-droid/release-23.05";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.home-manager.follows = "home-manager";
|
||||
};
|
||||
|
||||
# Those are Nvim plugins. I do not use package managers like Packer or Lazy, instead I use Nix to download them and later configure in [Neovim module](module/common/Nvim.nix).
|
||||
# Nvim plugins.
|
||||
nvimAlign = {
|
||||
url = "github:echasnovski/mini.align";
|
||||
flake = false;
|
||||
|
@ -117,10 +98,6 @@
|
|||
};
|
||||
};
|
||||
|
||||
# Those are outputs (hosts, configurations) that can be produced by this whole config.
|
||||
# Here you see a set of inputs we defined above, like nixpkgs, home-manager and so on.
|
||||
# `...` at the end of a set means "ignore other arguments provided to this function".
|
||||
# @inputs means aliasing all the inputs to the `inputs` name, so we can pass them all at once later.
|
||||
outputs = { self, nixpkgs, nix-on-droid, home-manager, stylix, ... } @inputs: {
|
||||
# Constant values.
|
||||
const = {
|
||||
|
@ -130,79 +107,51 @@
|
|||
url = "https://git.voronind.com/voronind/nixos.git";
|
||||
};
|
||||
|
||||
# Common modules used across all the hosts.
|
||||
# Common modules used across all hosts.
|
||||
nixosModules.common = let
|
||||
# This function allows me to get the list of all the files from the directories I need.
|
||||
# It differs from the util.ls function because it also filters out all the directories.
|
||||
lsFiles = path: map (f: "${path}/${f}") (
|
||||
builtins.filter (i: builtins.readFileType "${path}/${i}" == "regular") (
|
||||
builtins.attrNames (builtins.readDir path)
|
||||
)
|
||||
);
|
||||
in {
|
||||
# Here I import everything from those directories.
|
||||
imports = (lsFiles ./module/common) ++ (lsFiles ./overlay) ++ [ ./user/Root.nix ];
|
||||
};
|
||||
|
||||
# Function to create a host. It does basic setup, like adding common modules.
|
||||
# Function to create a host.
|
||||
mkHost = { system, hostname, modules } @args: nixpkgs.lib.nixosSystem {
|
||||
# `Inherit` is just an alias for `system = system;`, which means that
|
||||
# keep the `system` argument as a property in a resulting set.
|
||||
inherit system;
|
||||
|
||||
# List of modules to use by defualt for all the hosts.
|
||||
modules = [
|
||||
# There I put host-specific configurations.
|
||||
./host/${hostname}
|
||||
|
||||
# Make a device hostname match the one from this config.
|
||||
./host/${hostname}/Configuration.nix
|
||||
{ networking.hostName = hostname; }
|
||||
|
||||
# Specify current release version.
|
||||
{ system.stateVersion = self.const.stateVersion; }
|
||||
|
||||
# Add common modules.
|
||||
inputs.self.nixosModules.common
|
||||
|
||||
# Add Home Manager module.
|
||||
home-manager.nixosModules.home-manager
|
||||
|
||||
# Add Stylix module.
|
||||
stylix.nixosModules.stylix
|
||||
]
|
||||
# Also add host-specific modules from mkHost args.
|
||||
++ modules;
|
||||
] ++ modules;
|
||||
|
||||
# SpecialArgs allows you to pass objects down to other NixOS modules.
|
||||
specialArgs = let
|
||||
pkgs = nixpkgs.legacyPackages.${system}.pkgs;
|
||||
lib = nixpkgs.lib;
|
||||
config = self.nixosConfigurations.${hostname}.config;
|
||||
in {
|
||||
const = self.const; # Constant values.
|
||||
flake = self; # This Flake itself.
|
||||
inputs = inputs; # Our dependencies.
|
||||
key = import ./part/Key.nix {}; # Keyboard keys config.
|
||||
secret = import ./part/Secret.nix {}; # Secrets (public keys).
|
||||
setting = import ./part/Setting.nix {}; # My own global settings.
|
||||
style = import ./part/Style.nix { inherit config; }; # Style abstraction.
|
||||
util = import ./part/Util.nix { inherit pkgs lib; }; # Util functions.
|
||||
wallpaper = import ./part/Wallpaper.nix { inherit pkgs; }; # Wallpaper.
|
||||
const = self.const;
|
||||
flake = self;
|
||||
inputs = inputs;
|
||||
key = import ./part/Key.nix {};
|
||||
secret = import ./part/Secret.nix {};
|
||||
setting = import ./part/Setting.nix {};
|
||||
style = import ./part/Style.nix { config = config; };
|
||||
util = import ./part/Util.nix { pkgs = pkgs; };
|
||||
wallpaper = import ./part/Wallpaper.nix { pkgs = pkgs; };
|
||||
};
|
||||
};
|
||||
|
||||
# Bellow is the list of all the hosts I currently use.
|
||||
# They call the `mkHost` function that I defined above
|
||||
# with their specific parameters.
|
||||
# You might be interested in `live` and `nixOnDroidConfiguration`
|
||||
# for Live ISO and Android configurations respectively.
|
||||
# List of all hosts bellow.
|
||||
nixosConfigurations.basic = self.mkHost {
|
||||
hostname = "basic"; # Hostname to use.
|
||||
system = "x86_64-linux"; # System architecture.
|
||||
|
||||
# Host-specific modules.
|
||||
hostname = "basic";
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
# Force LTS kernel.
|
||||
({ pkgs, ... }: { boot.kernelPackages = nixpkgs.lib.mkForce pkgs.linuxPackages; })
|
||||
];
|
||||
};
|
||||
|
@ -212,14 +161,11 @@
|
|||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./module/AmdGpu.nix
|
||||
./module/CapsToggle.nix
|
||||
./module/Gnome.nix
|
||||
./module/IntelCpu.nix
|
||||
./module/PowersaveIntel.nix
|
||||
./module/Print.nix
|
||||
./module/RemoteBuild.nix
|
||||
./module/StrongSwan.nix
|
||||
./module/Tablet.nix
|
||||
./user/Dasha.nix
|
||||
];
|
||||
};
|
||||
|
@ -231,7 +177,7 @@
|
|||
./module/AmdCompute.nix
|
||||
./module/AmdCpu.nix
|
||||
./module/AmdGpu.nix
|
||||
# ./module/Ollama.nix # ISSUE: Currently broken.
|
||||
# ./module/Ollama.nix
|
||||
./module/PowersaveAmd.nix
|
||||
./module/Print.nix
|
||||
./module/RemoteBuild.nix
|
||||
|
@ -269,42 +215,26 @@
|
|||
modules = [
|
||||
./module/AmdCpu.nix
|
||||
./module/AmdGpu.nix
|
||||
./module/CapsToggle.nix
|
||||
./module/Gnome.nix
|
||||
./module/PowersaveAmd.nix
|
||||
./module/Print.nix
|
||||
./module/RemoteBuild.nix
|
||||
./module/StrongSwan.nix
|
||||
./module/Tablet.nix
|
||||
./user/Dasha.nix
|
||||
./user/Voronind.nix
|
||||
];
|
||||
};
|
||||
|
||||
# Live ISO configuration.
|
||||
nixosConfigurations.live = self.mkHost {
|
||||
hostname = "live";
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
# Those are basic modules for Live ISO image.
|
||||
# You can discover other possible base images here:
|
||||
# https://github.com/NixOS/nixpkgs/tree/master/nixos/modules/installer/cd-dvd
|
||||
"${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix"
|
||||
"${nixpkgs}/nixos/modules/installer/cd-dvd/channel.nix"
|
||||
|
||||
# This is required for Live ISO in my case because I use NetworkManager,
|
||||
# but base Live images require this.
|
||||
{ networking.wireless.enable = nixpkgs.lib.mkForce false; }
|
||||
|
||||
# Override my settings to allow SSH logins using root password.
|
||||
{ networking.wireless.enable = nixpkgs.lib.mkForce false; }
|
||||
{ services.openssh.settings.PasswordAuthentication = nixpkgs.lib.mkForce true; }
|
||||
{ services.openssh.settings.PermitRootLogin = nixpkgs.lib.mkForce "yes"; }
|
||||
|
||||
# Disable auto-updates as they are not possible for Live ISO.
|
||||
{ systemd.services.autoupdate.enable = nixpkgs.lib.mkForce false; }
|
||||
|
||||
# Base Live images also require the LTS kernel.
|
||||
({ pkgs, ... }: { boot.kernelPackages = nixpkgs.lib.mkForce pkgs.linuxPackages; })
|
||||
{ system.autoUpgrade.enable = nixpkgs.lib.mkForce false; }
|
||||
({ pkgs, ... }: { boot.kernelPackages = nixpkgs.lib.mkForce pkgs.linuxPackages; })
|
||||
];
|
||||
};
|
||||
|
||||
|
@ -313,7 +243,8 @@
|
|||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./module/IntelCpu.nix
|
||||
./module/PowerlimitThinkpad.nix
|
||||
# ./module/Ollama.nix
|
||||
./module/Powerlimit.nix
|
||||
./module/PowersaveIntel.nix
|
||||
./module/Print.nix
|
||||
./module/RemoteBuild.nix
|
||||
|
@ -325,29 +256,22 @@
|
|||
# Android.
|
||||
nixOnDroidConfigurations.default = nix-on-droid.lib.nixOnDroidConfiguration {
|
||||
modules = [
|
||||
# Android release version.
|
||||
{ system.stateVersion = inputs.self.const.droidStateVersion; }
|
||||
|
||||
# I put all my Android configuration there.
|
||||
./module/android
|
||||
./module/NixOnDroid.nix
|
||||
];
|
||||
|
||||
# SpecialArgs allows you to pass objects down to other configuration.
|
||||
extraSpecialArgs = let
|
||||
# We want arm64 packages for Android.
|
||||
pkgs = nixpkgs.legacyPackages."aarch64-linux".pkgs;
|
||||
lib = nixpkgs.lib;
|
||||
in {
|
||||
const = self.const; # Constant values.
|
||||
flake = self; # This Flake itself.
|
||||
inputs = inputs; # Our dependencies.
|
||||
key = import ./part/Key.nix {}; # Keyboard keys config.
|
||||
secret = import ./part/Secret.nix {}; # Secrets (public keys).
|
||||
setting = import ./part/Setting.nix {}; # My own global settings.
|
||||
style = import ./part/Style.nix { config = import ./part/style/Gruvbox.nix {}; }; # Style abstraction. Stylix is not available for Android so I provide static Gruvbox style.
|
||||
util = import ./part/Util.nix { inherit pkgs lib; }; # Util functions.
|
||||
const = self.const;
|
||||
flake = self;
|
||||
inputs = inputs;
|
||||
key = import ./part/Key.nix {};
|
||||
secret = import ./part/Secret.nix {};
|
||||
setting = import ./part/Setting.nix {};
|
||||
style = import ./part/Style.nix { config = import ./part/style/Gruvbox.nix {}; };
|
||||
util = import ./part/Util.nix { pkgs = pkgs; };
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
# That's it!
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
# Basic host is a dummy and has no specific configuration.
|
||||
# I don't really need it, this is just a failsafe that I can definitely install and run.
|
||||
{ ... }: {
|
||||
imports = [ ];
|
||||
}
|
|
@ -1,6 +1,8 @@
|
|||
{ lib, ... }: {
|
||||
imports = [
|
||||
./Filesystem.nix
|
||||
./Tablet.nix
|
||||
./Vpn.nix
|
||||
];
|
||||
|
||||
# Disable keyd.
|
|
@ -1,5 +1,4 @@
|
|||
{ lib, ... }: {
|
||||
# This host is running inside BIOS VM so it needs the Grub.
|
||||
boot.loader.systemd-boot.enable = lib.mkForce false;
|
||||
boot.loader.efi.canTouchEfiVariables = lib.mkForce false;
|
||||
boot.loader.grub.enable = true;
|
||||
|
|
|
@ -1,8 +1,3 @@
|
|||
{ lib, ... }: {
|
||||
# Force specific PW for this host.
|
||||
users.users.root.hashedPassword = lib.mkForce "$y$j9T$d4HfwutZr.eNHuLJYRuro/$7swZfgCNS6jEXHFCxsW5um/68jX9BRiiZD1BYcm/gD/";
|
||||
|
||||
# Allow login with PW for others.
|
||||
# services.openssh.settings.PasswordAuthentication = lib.mkForce true;
|
||||
# services.openssh.settings.PermitRootLogin = lib.mkForce "yes";
|
||||
}
|
||||
|
|
|
@ -33,17 +33,17 @@
|
|||
# Save media list.
|
||||
find ''${path_media} -type d > ''${path_backup}/cold/ColdMedia.txt || report "Backup : Failed to save media list!"
|
||||
cd ''${path_backup}/cold/
|
||||
archive ColdMedia.txt && rm ColdMedia.txt || report "Backup : Failed to archive media list!"
|
||||
archive_fast ColdMedia.txt && rm ColdMedia.txt || report "Backup : Failed to archive media list!"
|
||||
cd -
|
||||
|
||||
# Backup docker.
|
||||
docker=$(archive docker/)
|
||||
docker=$(archive_fast docker/)
|
||||
bupsize=$(tdu ''${docker} | awk '{print $1}')
|
||||
mv ''${docker} ''${path_docker}/ || report "Backup : Failed to save docker!"
|
||||
|
||||
# Backup some media.
|
||||
cd ''${path_src}/media/
|
||||
paper=$(archive paper/)
|
||||
paper=$(archive_fast paper/)
|
||||
mv ''${paper} ''${path_backup}/paper/ || report "Backup : Failed to save paper!"
|
||||
cd -
|
||||
|
||||
|
@ -74,7 +74,7 @@
|
|||
echo "Backup : Complete ''${bupsize}."
|
||||
'';
|
||||
in {
|
||||
systemd.services.backup = util.mkStaticSystemdService {
|
||||
systemd.services.backup = {
|
||||
enable = true;
|
||||
description = "Home system backup.";
|
||||
serviceConfig = {
|
||||
|
@ -83,11 +83,10 @@ in {
|
|||
path = with pkgs; [
|
||||
bashInteractive
|
||||
curl
|
||||
gawk
|
||||
gnutar
|
||||
procps
|
||||
gzip
|
||||
gawk
|
||||
pv
|
||||
xz
|
||||
];
|
||||
script = ''
|
||||
${pkgs.bashInteractive}/bin/bash ${script}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
docker exec -u 33 cloud php -f /var/www/html/cron.php || notify 'Nextcloud : Failed to run cron.'
|
||||
'';
|
||||
in {
|
||||
systemd.services.nextcloud = util.mkStaticSystemdService {
|
||||
systemd.services.nextcloud = {
|
||||
enable = true;
|
||||
description = "Nextcloud worker.";
|
||||
serviceConfig = {
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
{ pkgs, util, ... }: let
|
||||
{ pkgs, ... }: let
|
||||
script = ''
|
||||
in="/storage/hot/docker/cloud/data/data/cakee/files/media/photo/"
|
||||
out="/storage/cold_1/backup/tmp/photo/"
|
||||
docker run --rm -v "''${in}":/in -v "''${out}":/out voronind.com/photoprocess:latest
|
||||
'';
|
||||
in {
|
||||
systemd.services.photos_process = util.mkStaticSystemdService {
|
||||
systemd.services.photos_process = {
|
||||
enable = true;
|
||||
description = "Process uploaded photos.";
|
||||
serviceConfig = {
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
{ pkgs, util, ... }: let
|
||||
{ pkgs, ... }: let
|
||||
script = ''
|
||||
music="/storage/hot/media/music/"
|
||||
docker run --rm -v "''${music}":/music voronind.com/yamusic:latest
|
||||
'';
|
||||
in {
|
||||
systemd.services.yandex_music = util.mkStaticSystemdService {
|
||||
systemd.services.yandex_music = {
|
||||
enable = true;
|
||||
description = "Sync music from Yandex.Music.";
|
||||
serviceConfig = {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{ lib, ... }: {
|
||||
imports = [
|
||||
./Filesystem.nix
|
||||
../dasha/Tablet.nix
|
||||
];
|
||||
|
||||
# Disable keyd.
|
3
host/live/Configuration.nix
Normal file
3
host/live/Configuration.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{ ... }: {
|
||||
imports = [ ];
|
||||
}
|
5
host/work/Configuration.nix
Normal file
5
host/work/Configuration.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{ ... }: {
|
||||
imports = [
|
||||
./Fprint.nix
|
||||
];
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
{ ... }: {
|
||||
imports = [
|
||||
./Fprint.nix
|
||||
];
|
||||
|
||||
# Keyd Print to Macro remap.
|
||||
services.keyd.keyboards.default.settings.main.print = "layer(layer_macro)";
|
||||
}
|
|
@ -1,4 +1,3 @@
|
|||
# AMD Rocm support (for Blender).
|
||||
{ nixpkgs, pkgs, ... }: {
|
||||
nixpkgs.config.rocmSupport = true;
|
||||
systemd.tmpfiles.rules = [
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
# AMD CPU specific configuration.
|
||||
{ lib, config, ... }: {
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
# AMD GPU specific configuration.
|
||||
# No, I do not own any Nvidia/Intel GPUs, so I have no configuration for them.
|
||||
{ nixpkgs, pkgs, ... }: {
|
||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||
services.xserver.videoDrivers = [ "amdgpu" ];
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
# Toggle language with CapsLock. My wife prefers this.
|
||||
{ lib, ... }: {
|
||||
services.xserver.xkb = {
|
||||
options = lib.mkForce "grp:caps_toggle";
|
||||
};
|
||||
}
|
19
module/Flatpak.nix
Normal file
19
module/Flatpak.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{ pkgs, lib, ... }: let
|
||||
list = "~/.config/linux/Flatpak.txt";
|
||||
in {
|
||||
# Enable Flatpaks.
|
||||
services.flatpak.enable = true;
|
||||
|
||||
# Bootstrap apps on boot.
|
||||
systemd.services.flatpakinstall = {
|
||||
description = "Install Flatpak apps.";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
wants = [ "dotfiles.service" ];
|
||||
after = [ "dotfiles.service" ];
|
||||
serviceConfig.Type = "oneshot";
|
||||
script = ''
|
||||
${lib.getExe pkgs.flatpak} remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
|
||||
[[ -f ${list} ]] && cat ${list} | cut -f2 | ${lib.getExe pkgs.parallel} -j1 -- ${lib.getExe pkgs.flatpak} install -y --system {}
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -4,15 +4,17 @@
|
|||
./desktop/Dconf.nix
|
||||
./desktop/DisplayManager.nix
|
||||
./desktop/Sound.nix
|
||||
./desktop/Wayland.nix
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
gnome.gnome-tweaks # Gnome "hidden" settings.
|
||||
openssl # It was needed for something, can't remember.
|
||||
adwsteamgtk
|
||||
gnome.gnome-remote-desktop
|
||||
gnome.gnome-tweaks
|
||||
gradience
|
||||
openssl
|
||||
wl-clipboard
|
||||
];
|
||||
|
||||
# Disable some Gnome apps.
|
||||
services.gnome.gnome-keyring.enable = lib.mkForce false;
|
||||
environment.gnome.excludePackages = with pkgs.gnome; [
|
||||
# baobab # Disk usage analyzer.
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
# Intel CPU specific configuration.
|
||||
{ ... }: {
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
}
|
||||
|
|
120
module/NixOnDroid.nix
Normal file
120
module/NixOnDroid.nix
Normal file
|
@ -0,0 +1,120 @@
|
|||
{ pkgs, inputs, const, style, util, key, setting, secret, ... } @args: let
|
||||
homePath = "/data/data/com.termux.nix/files/home";
|
||||
tmux = import ./common/tmux args;
|
||||
bash = import ./common/bash args;
|
||||
nvim = import ./common/nvim args;
|
||||
ssh = import ./common/ssh args;
|
||||
font = pkgs.runCommandNoCC "font" {} ''
|
||||
cp ${pkgs.nerdfonts.override { fonts = [ "Terminus" ]; }}/share/fonts/truetype/NerdFonts/TerminessNerdFontMono-Regular.ttf $out
|
||||
'';
|
||||
colors = ''
|
||||
background=#${style.color.bg.dark}
|
||||
foreground=#${style.color.fg.light}
|
||||
'';
|
||||
in {
|
||||
time.timeZone = const.timeZone;
|
||||
nix.extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
|
||||
home-manager.config = {
|
||||
home = {
|
||||
stateVersion = const.droidStateVersion;
|
||||
file = {
|
||||
".dotfiles".source = inputs.self;
|
||||
".ssh/config".text = ssh.config;
|
||||
".termux/_font.ttf".source = font;
|
||||
".termux/_colors.properties".text = colors;
|
||||
};
|
||||
sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
MANPAGER = "nvim +Man!";
|
||||
NIXPKGS_ALLOW_UNFREE = "1";
|
||||
NIX_CURRENT_SYSTEM = "${pkgs.stdenv.system}";
|
||||
TERM = "xterm-256color";
|
||||
};
|
||||
};
|
||||
|
||||
programs = {
|
||||
bash = {
|
||||
enable = true;
|
||||
bashrcExtra = bash.config + ''
|
||||
[[ -f ~/.termux/font.ttf ]] || {
|
||||
cp ~/.termux/_font.ttf ~/.termux/font.ttf
|
||||
cp ~/.termux/_colors.properties ~/.termux/colors.properties
|
||||
_warn "Termux config installed, please restart."
|
||||
};
|
||||
'';
|
||||
};
|
||||
|
||||
tmux = {
|
||||
enable = true;
|
||||
extraConfig = tmux.config;
|
||||
};
|
||||
|
||||
git = {
|
||||
enable = true;
|
||||
extraConfig = {
|
||||
credential.helper = "store";
|
||||
init.defaultBranch = "main";
|
||||
pull.rebase = true;
|
||||
push.autoSetupRemote = true;
|
||||
rebase.autoStash = true;
|
||||
user.signingkey = builtins.readFile secret.crypto.sign.key;
|
||||
gpg.ssh.allowedSignersFile = toString(secret.crypto.sign.allowed);
|
||||
gpg.format = secret.crypto.sign.format;
|
||||
};
|
||||
};
|
||||
|
||||
neovim = {
|
||||
enable = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
extraConfig = nvim.config;
|
||||
};
|
||||
|
||||
gpg = {
|
||||
enable = true;
|
||||
publicKeys = secret.crypto.publicKeys;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
environment.packages = with pkgs; [
|
||||
android-tools
|
||||
binwalk
|
||||
coreutils
|
||||
curl
|
||||
diffutils
|
||||
ffmpeg
|
||||
file
|
||||
findutils
|
||||
gawk
|
||||
gcc
|
||||
gdu
|
||||
git
|
||||
gnugrep
|
||||
gnumake
|
||||
gnused
|
||||
gnutar
|
||||
gzip xz
|
||||
hostname
|
||||
imagemagick
|
||||
jq
|
||||
lsof
|
||||
man
|
||||
nmap
|
||||
openssh
|
||||
parallel
|
||||
pv
|
||||
ripgrep
|
||||
rsync
|
||||
sqlite
|
||||
pkgs.tmux
|
||||
tree
|
||||
utillinux
|
||||
wget
|
||||
yt-dlp
|
||||
zip unzip
|
||||
];
|
||||
}
|
|
@ -1,8 +1,5 @@
|
|||
{ pkgs, lib, ... }: {
|
||||
# Add Ollama CLI app.
|
||||
environment.systemPackages = with pkgs; [ ollama ];
|
||||
|
||||
# Enable Ollama server.
|
||||
systemd.services.ollama = {
|
||||
description = "Ollama LLM server.";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
@ -13,8 +10,6 @@
|
|||
HOME=/root ${lib.getExe pkgs.ollama} serve
|
||||
'';
|
||||
};
|
||||
|
||||
# Download Ollama models.
|
||||
systemd.services.ollamamodel = {
|
||||
description = "Ollama LLM model.";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
|
59
module/Powerlimit.nix
Normal file
59
module/Powerlimit.nix
Normal file
|
@ -0,0 +1,59 @@
|
|||
{ pkgs, lib, ... }: let
|
||||
controlFileMin = "/sys/class/power_supply/BAT0/charge_control_start_threshold";
|
||||
controlFileMax = "/sys/class/power_supply/BAT0/charge_control_end_threshold";
|
||||
|
||||
onMin = "40";
|
||||
onMax = "80";
|
||||
offMin = "90";
|
||||
offMax = "95";
|
||||
|
||||
script = pkgs.writeShellScriptBin "powerlimit" ''
|
||||
function toggle() {
|
||||
if status; then
|
||||
echo ${offMax} > ${controlFileMax}
|
||||
echo ${offMin} > ${controlFileMin}
|
||||
else
|
||||
echo ${onMin} > ${controlFileMin}
|
||||
echo ${onMax} > ${controlFileMax}
|
||||
fi
|
||||
|
||||
true
|
||||
}
|
||||
|
||||
function waybar() {
|
||||
status || echo -n ""
|
||||
}
|
||||
|
||||
function status() {
|
||||
local current=$(cat ${controlFileMax})
|
||||
local enabled="${onMax}"
|
||||
|
||||
[[ "''${current}" = "''${enabled}" ]]
|
||||
}
|
||||
|
||||
''${@}
|
||||
'';
|
||||
in {
|
||||
systemd = {
|
||||
services.powerlimit = {
|
||||
description = "Limit battery charge.";
|
||||
enable = true;
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
RemainAfterExit = "yes";
|
||||
ExecStart = "${lib.getExe pkgs.bash} -c 'echo 40 > ${controlFileMin}; echo 80 > ${controlFileMax};'";
|
||||
ExecStop = "${lib.getExe pkgs.bash} -c 'echo 95 > ${controlFileMax}; echo 90 > ${controlFileMin};'";
|
||||
};
|
||||
};
|
||||
|
||||
# HACK: Allow user access.
|
||||
tmpfiles.rules = [
|
||||
"z ${controlFileMax} 0777 - - - -"
|
||||
"z ${controlFileMin} 0777 - - - -"
|
||||
];
|
||||
};
|
||||
|
||||
systemd.services.keyd.path = [ script ];
|
||||
environment.systemPackages = [ script ];
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
# ThinkPad charge limits.
|
||||
{ pkgs, lib, ... } @args: let
|
||||
controlFileMin = "/sys/class/power_supply/BAT0/charge_control_start_threshold";
|
||||
controlFileMax = "/sys/class/power_supply/BAT0/charge_control_end_threshold";
|
||||
|
||||
onMin = "40";
|
||||
onMax = "80";
|
||||
offMin = "90";
|
||||
offMax = "95";
|
||||
|
||||
script = pkgs.writeShellScriptBin "powerlimit" (import ./powerlimit/Script.nix {
|
||||
inherit controlFileMax controlFileMin onMin onMax offMin offMax;
|
||||
}).script;
|
||||
in {
|
||||
imports = [
|
||||
(import ./powerlimit ({
|
||||
inherit controlFileMax controlFileMin onMin onMax offMin offMax;
|
||||
} // args))
|
||||
];
|
||||
|
||||
environment.systemPackages = [ script ];
|
||||
}
|
|
@ -1,11 +1,12 @@
|
|||
# AMD CPU boost control.
|
||||
{ pkgs, ... } @args: let
|
||||
controlFile = "/sys/devices/system/cpu/cpufreq/boost";
|
||||
enable = "0";
|
||||
disable = "1";
|
||||
|
||||
script = pkgs.writeShellScriptBin "powersave" (import ./powersave/Script.nix {
|
||||
inherit controlFile enable disable;
|
||||
inherit controlFile;
|
||||
inherit enable;
|
||||
inherit disable;
|
||||
}).script;
|
||||
in {
|
||||
# Requirements:
|
||||
|
@ -13,9 +14,12 @@ in {
|
|||
# PSS (Cool and Quiet) - Enabled.
|
||||
imports = [
|
||||
(import ./powersave ({
|
||||
inherit controlFile enable disable;
|
||||
inherit controlFile;
|
||||
inherit enable;
|
||||
inherit disable;
|
||||
} // args))
|
||||
];
|
||||
|
||||
systemd.services.keyd.path = [ script ];
|
||||
environment.systemPackages = [ script ];
|
||||
}
|
||||
|
|
|
@ -1,18 +1,22 @@
|
|||
# Intel CPU boost control.
|
||||
{ pkgs, ... } @args: let
|
||||
controlFile = "/sys/devices/system/cpu/intel_pstate/no_turbo";
|
||||
enable = "1";
|
||||
disable = "0";
|
||||
|
||||
script = pkgs.writeShellScriptBin "powersave" (import ./powersave/Script.nix {
|
||||
inherit controlFile enable disable;
|
||||
inherit controlFile;
|
||||
inherit enable;
|
||||
inherit disable;
|
||||
}).script;
|
||||
in {
|
||||
imports = [
|
||||
(import ./powersave ({
|
||||
inherit controlFile enable disable;
|
||||
inherit controlFile;
|
||||
inherit enable;
|
||||
inherit disable;
|
||||
} // args))
|
||||
];
|
||||
|
||||
systemd.services.keyd.path = [ script ];
|
||||
environment.systemPackages = [ script ];
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
# Module that enables remote builds. This is a client configuration.
|
||||
{ config, pkgs, ... }: {
|
||||
# NOTE: Requires host private key to be present in secret.ssh.builderKeys.
|
||||
# NOTE: Requires key to be present in secret.ssh.builderKeys.
|
||||
nix.buildMachines = [{
|
||||
hostName = "nixbuilder";
|
||||
protocol = "ssh-ng";
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
# Module that enables remote builds. This is a server configuration.
|
||||
{ pkgs, secret, lib, ... }: let
|
||||
keyPath = "/root/.nixbuilder";
|
||||
in {
|
||||
# Service that generates new key on boot if not present.
|
||||
# Don't forget to add new key to secret.ssh.builderKeys.
|
||||
systemd.services.generate-nix-cache-key = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig.Type = "oneshot";
|
||||
|
@ -16,7 +13,6 @@ in {
|
|||
'';
|
||||
};
|
||||
|
||||
# Add `nixbuilder` restricted user.
|
||||
users.groups.nixbuilder = {};
|
||||
users.users.nixbuilder = {
|
||||
openssh.authorizedKeys.keys = secret.ssh.builderKeys;
|
||||
|
@ -28,8 +24,7 @@ in {
|
|||
group = "nixbuilder";
|
||||
};
|
||||
|
||||
# Sign store automatically.
|
||||
# Sign existing store with: nix store sign --all -k /path/to/secret-key-file
|
||||
# To apply: nix store sign --all -k /path/to/secret-key-file
|
||||
nix.extraOptions = ''
|
||||
trusted-users = nixbuilder
|
||||
secret-key-files = ${keyPath}/private-key
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{ pkgs, lib, wallpaper, style, ... } @args: let
|
||||
sway = import ./desktop/sway args;
|
||||
sway = import ./sway args;
|
||||
config = pkgs.writeText "swayConfig" sway.config;
|
||||
script = pkgs.writeShellScriptBin "swayscript" sway.script;
|
||||
in {
|
||||
|
@ -8,20 +8,23 @@ in {
|
|||
./desktop/Bluetooth.nix
|
||||
./desktop/Brightness.nix
|
||||
./desktop/Dconf.nix
|
||||
./desktop/GnomeApps.nix
|
||||
./desktop/Portal.nix
|
||||
./desktop/Realtime.nix
|
||||
./desktop/Sound.nix
|
||||
./desktop/Waybar.nix
|
||||
./desktop/Wayland.nix
|
||||
];
|
||||
|
||||
services.gnome.gnome-keyring.enable = lib.mkForce false;
|
||||
systemd.services.keyd.path = [ script ];
|
||||
environment.systemPackages = with pkgs; [
|
||||
gnome.adwaita-icon-theme # GTK icons.
|
||||
grim slurp # Screenshot.
|
||||
mako # Notification system.
|
||||
networkmanagerapplet # Internet configuration.
|
||||
pamixer pavucontrol pulseaudio # Audio.
|
||||
playerctl # Multimedia controls.
|
||||
wl-clipboard # Clipboard.
|
||||
script
|
||||
];
|
||||
|
||||
|
|
|
@ -8,4 +8,5 @@
|
|||
# glib
|
||||
gnome3.adwaita-icon-theme # default gnome cursors,
|
||||
];
|
||||
###
|
||||
}
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
{ pkgs, ... }: {
|
||||
variables = {
|
||||
EDITOR = "nvim";
|
||||
MANPAGER = "nvim +Man!";
|
||||
NIXPKGS_ALLOW_UNFREE = "1";
|
||||
NIX_CURRENT_SYSTEM = "${pkgs.stdenv.system}";
|
||||
TERM = "xterm-256color";
|
||||
};
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
{ secret, ... }: {
|
||||
config = {
|
||||
credential.helper = "store";
|
||||
gpg.format = secret.crypto.sign.gih.format;
|
||||
gpg.ssh.allowedSignersFile = toString(secret.crypto.sign.git.allowed);
|
||||
init.defaultBranch = "main";
|
||||
pull.rebase = true;
|
||||
push.autoSetupRemote = true;
|
||||
rebase.autoStash = true;
|
||||
user.signingkey = builtins.readFile secret.crypto.sign.git.key;
|
||||
};
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
{ ... }: {
|
||||
extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
{ pkgs, ... }: {
|
||||
list = with pkgs; [
|
||||
android-tools
|
||||
binwalk
|
||||
coreutils diffutils findutils utillinux
|
||||
curl
|
||||
ffmpeg
|
||||
file
|
||||
gawk gnused gnugrep gnumake ripgrep
|
||||
gcc
|
||||
gdu
|
||||
git
|
||||
gnutar gzip xz
|
||||
hostname
|
||||
imagemagick
|
||||
jq
|
||||
lsof
|
||||
man
|
||||
nmap
|
||||
openssh
|
||||
parallel
|
||||
pv
|
||||
rsync
|
||||
sqlite
|
||||
pkgs.tmux
|
||||
tree
|
||||
wget
|
||||
yt-dlp
|
||||
zip unzip
|
||||
];
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
{ pkgs, style, util, ... }: {
|
||||
font = pkgs.runCommandNoCC "font" {} ''
|
||||
cp ${pkgs.nerdfonts.override { fonts = [ "Terminus" ]; }}/share/fonts/truetype/NerdFonts/TerminessNerdFontMono-Regular.ttf $out
|
||||
'';
|
||||
|
||||
colors = util.trimTabs ''
|
||||
background=#${style.color.bg.dark}
|
||||
foreground=#${style.color.fg.light}
|
||||
'';
|
||||
|
||||
initScript = util.trimTabs ''
|
||||
[[ -f ~/.termux/font.ttf ]] || {
|
||||
cp ~/.termux/_font.ttf ~/.termux/font.ttf
|
||||
cp ~/.termux/_colors.properties ~/.termux/colors.properties
|
||||
_warn "Termux config installed, please restart."
|
||||
};
|
||||
'';
|
||||
}
|
|
@ -1,62 +0,0 @@
|
|||
{ pkgs, inputs, const, style, util, key, setting, secret, ... } @args: let
|
||||
# Path where Termux stores user data.
|
||||
homePath = "/data/data/com.termux.nix/files/home";
|
||||
|
||||
# Android modules.
|
||||
environment = import ./Environment.nix args;
|
||||
git = import ./Git.nix args;
|
||||
nix = import ./Nix.nix args;
|
||||
package = import ./Package.nix args;
|
||||
termux = import ./Termux.nix args;
|
||||
|
||||
# External modules.
|
||||
bash = import ../common/bash args;
|
||||
nvim = import ../common/nvim args;
|
||||
ssh = import ../common/ssh args;
|
||||
tmux = import ../common/tmux args;
|
||||
in {
|
||||
time.timeZone = const.timeZone;
|
||||
nix.extraOptions = nix.extraOptions;
|
||||
|
||||
environment.packages = package.list;
|
||||
|
||||
home-manager.config = {
|
||||
home = {
|
||||
stateVersion = const.droidStateVersion;
|
||||
sessionVariables = environment.variables;
|
||||
file = {
|
||||
".dotfiles".source = inputs.self;
|
||||
".ssh/config".text = ssh.config;
|
||||
".termux/_font.ttf".source = termux.font;
|
||||
".termux/_colors.properties".text = termux.colors;
|
||||
};
|
||||
};
|
||||
|
||||
programs = {
|
||||
bash = {
|
||||
enable = true;
|
||||
bashrcExtra = bash.config + termux.initScript;
|
||||
};
|
||||
|
||||
tmux = {
|
||||
enable = true;
|
||||
extraConfig = tmux.config;
|
||||
};
|
||||
|
||||
git = {
|
||||
enable = true;
|
||||
extraConfig = git.config;
|
||||
};
|
||||
|
||||
neovim = {
|
||||
enable = true;
|
||||
extraConfig = nvim.config;
|
||||
};
|
||||
|
||||
gpg = {
|
||||
enable = true;
|
||||
publicKeys = secret.crypto.publicKeys;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,12 +1,11 @@
|
|||
# System automatic updates.
|
||||
# This is a systemd service that pulls updates every hour.
|
||||
# Unlike system.autoUpgrade, this script also verifies my git signature
|
||||
# to prevent unathorized changes to hosts.
|
||||
{ const, pkgs, lib, secret, util, ... }: {
|
||||
systemd.services.autoupdate = util.mkStaticSystemdService {
|
||||
enable = true;
|
||||
description = "Signed system auto-update.";
|
||||
{ const, pkgs, lib, secret, ... }: {
|
||||
systemd.services.autoupdate = {
|
||||
enable = true;
|
||||
description = "Signed system auto-update.";
|
||||
restartIfChanged = false;
|
||||
serviceConfig.Type = "oneshot";
|
||||
stopIfChanged = false;
|
||||
unitConfig.X-StopOnRemoval = false;
|
||||
path = with pkgs; [
|
||||
bash
|
||||
git
|
||||
|
|
|
@ -1,14 +1,9 @@
|
|||
{ lib, style, util, pkgs, ... } @args: let
|
||||
bash = import ./bash args;
|
||||
in {
|
||||
# Add my bash configuration to all *interactive* shells.
|
||||
programs.bash.interactiveShellInit = bash.config;
|
||||
|
||||
# Remove default aliases for `l`, `ll` etc as they break my function definitions.
|
||||
environment.shellAliases = lib.mkForce {};
|
||||
|
||||
environment.variables = {
|
||||
# Specify terminal mode.
|
||||
TERM = "xterm-256color";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -7,24 +7,17 @@
|
|||
loader = {
|
||||
efi.canTouchEfiVariables = true;
|
||||
|
||||
# Use systemd to boot.
|
||||
systemd-boot = {
|
||||
enable = true;
|
||||
|
||||
# Limit the amound of generations availabe for rollback.
|
||||
# This helps to save storage space.
|
||||
configurationLimit = 10;
|
||||
};
|
||||
};
|
||||
|
||||
# Mount /tmp on tmpfs.
|
||||
tmp.useTmpfs = true;
|
||||
|
||||
initrd = {
|
||||
# Don't really know if I need it. Kept from hardware-configuration.
|
||||
kernelModules = [ "dm-snapshot" ];
|
||||
kernelModules = [
|
||||
"dm-snapshot"
|
||||
];
|
||||
|
||||
# Kernel modules available for all the hosts.
|
||||
availableKernelModules = [
|
||||
"ahci"
|
||||
"ata_piix"
|
||||
|
|
|
@ -12,16 +12,16 @@
|
|||
services.pcscd.enable = true;
|
||||
|
||||
# Yubikey touch notification.
|
||||
# ISSUE: Not working on Sway with Mako for some reason.
|
||||
# programs.yubikey-touch-detector.enable = true;
|
||||
|
||||
# Extra packages.
|
||||
environment.systemPackages = with pkgs; [
|
||||
yubikey-manager
|
||||
yubikey-manager # Yubikey Manager.
|
||||
# yubioath-desktop # OTP.
|
||||
];
|
||||
|
||||
# Store GPG data on tmpfs.
|
||||
# environment.variables = {
|
||||
# GNUPGHOME = "$(mktemp -d -t gnupg-$(date +%Y-%m-%d)-XXXXXXXXXX)";
|
||||
# };
|
||||
environment.variables = {
|
||||
# GNUPGHOME = "$(mktemp -d -t gnupg-$(date +%Y-%m-%d)-XXXXXXXXXX)";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,8 +1,13 @@
|
|||
{ pkgs, ... }: {
|
||||
# Distrobox works best with Podman, so enable it here.
|
||||
imports = [ ./Podman.nix ];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
distrobox
|
||||
];
|
||||
|
||||
virtualisation = {
|
||||
podman = {
|
||||
enable = true;
|
||||
defaultNetwork.settings.dns_enabled = false;
|
||||
dockerCompat = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ inputs, ... }: {
|
||||
# Add a link for the active configuration to /etc/dotfiles.
|
||||
# Easy to find copy just in case.
|
||||
environment.etc.dotfiles.source = inputs.self;
|
||||
}
|
||||
|
|
|
@ -1,12 +1,9 @@
|
|||
# I use the same layout on all hosts with GPT labels.
|
||||
# This way I can configure system's FS in one place here.
|
||||
{ ... }: {
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-partlabel/NIXROOT";
|
||||
fsType = "ext4";
|
||||
options = [ "noatime" ];
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-partlabel/NIXBOOT";
|
||||
fsType = "vfat";
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
{ ... }: {
|
||||
# Disable firewall as I configure firewall on my router.
|
||||
networking.firewall.enable = false;
|
||||
}
|
||||
|
|
|
@ -1,12 +1,7 @@
|
|||
{ pkgs, ... }: {
|
||||
fonts.packages = with pkgs; [
|
||||
# Use Apple fonts for system and text.
|
||||
(pkgs.callPackage ./applefont {})
|
||||
|
||||
# Use Nerd version of Terminus for monospaced fonts.
|
||||
(nerdfonts.override { fonts = [ "Terminus" ]; })
|
||||
|
||||
# I don't use FA, but add it for compatibility.
|
||||
font-awesome
|
||||
];
|
||||
}
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
pull.rebase = true;
|
||||
push.autoSetupRemote = true;
|
||||
rebase.autoStash = true;
|
||||
user.signingkey = builtins.readFile secret.crypto.sign.git.key;
|
||||
gpg.ssh.allowedSignersFile = toString(secret.crypto.sign.git.allowed);
|
||||
gpg.format = secret.crypto.sign.git.format;
|
||||
user.signingkey = builtins.readFile secret.crypto.sign.key;
|
||||
gpg.ssh.allowedSignersFile = toString(secret.crypto.sign.allowed);
|
||||
gpg.format = secret.crypto.sign.format;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
# Use latest kernel.
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
# Sysctl.
|
||||
boot.kernel.sysctl = {
|
||||
# Spoof protection.
|
||||
"net.ipv4.conf.default.rp_filter" = 1;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
{ pkgs, lib, key, ... }: {
|
||||
{ pkgs, lib, ... }: {
|
||||
environment.systemPackages = with pkgs; [ keyd ];
|
||||
|
||||
services.keyd = {
|
||||
enable = true;
|
||||
keyboards.default = {
|
||||
|
@ -10,13 +9,14 @@
|
|||
backspace = "delete"; # Delete key on backspace.
|
||||
capslock = "overload(control, esc)"; # Ctrl/esc combo.
|
||||
compose = "layer(layer_macro)"; # Input macros.
|
||||
esc = "${key.sysctrl}"; # System controls.
|
||||
esc = "layer(layer_system)"; # System controls.
|
||||
leftcontrol = "overload(layer_alternative, leftcontrol)"; # Alternative layer for home, end etc.
|
||||
print = "layer(layer_macro)"; # ThinkPad remap to compose.
|
||||
rightalt = "capslock"; # Language toggle.
|
||||
rightcontrol = "layer(layer_control)"; # Media and other controls.
|
||||
rightshift = "backspace"; # Backspace.
|
||||
};
|
||||
|
||||
# Alternative navigation.
|
||||
layer_alternative = {
|
||||
w = "pageup";
|
||||
a = "home";
|
||||
|
@ -29,10 +29,9 @@
|
|||
j = "down";
|
||||
k = "up";
|
||||
l = "right";
|
||||
# space = "macro2(1, 100, macro(space))"; # NOTE: Possible bhop example. Use in per-application, not here.
|
||||
# space = "macro2(1, 100, macro(space))"; # NOTE: Possible bhop example.
|
||||
};
|
||||
|
||||
# Media controls.
|
||||
layer_control = {
|
||||
space = "playpause";
|
||||
w = "volumeup";
|
||||
|
@ -45,6 +44,16 @@
|
|||
z = "stopcd";
|
||||
};
|
||||
|
||||
layer_system = {
|
||||
c = "command(loginctl kill-user voronind)";
|
||||
l = "command(powerlimit toggle)";
|
||||
# m = "command(swayscript montoggle)";
|
||||
p = "command(powersave toggle)";
|
||||
# v = "command(swayscript vrrtoggle)";
|
||||
x = "command(systemctl poweroff -i)";
|
||||
z = "command(systemctl suspend -i)";
|
||||
};
|
||||
|
||||
layer_macro = {};
|
||||
};
|
||||
};
|
||||
|
@ -54,6 +63,8 @@
|
|||
users.groups.keyd = {};
|
||||
systemd.services.keyd.serviceConfig.CapabilityBoundingSet = [ "CAP_SETGID" ];
|
||||
|
||||
# Debug toggle just in case I need it again.
|
||||
# HACK: Workaround for powersave/powerlimit/swayscript scripts.
|
||||
systemd.services.keyd.serviceConfig.ProtectKernelTunables = lib.mkForce false;
|
||||
systemd.services.keyd.serviceConfig.ProtectHome = lib.mkForce false;
|
||||
# systemd.services.keyd.environment.KEYD_DEBUG = "1";
|
||||
}
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
{ pkgs, ... }: {
|
||||
# This thing allow you to run ELF (binary) files just like in other distros.
|
||||
# The only difference is that we need to specify their linking dependencies
|
||||
# bellow in `libraries` section.
|
||||
programs.nix-ld = {
|
||||
enable = true;
|
||||
package = pkgs.nix-ld;
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
{ const, ... }: {
|
||||
time.timeZone = const.timeZone;
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
# You can customize your Locale in detail like that.
|
||||
# i18n.extraLocaleSettings = {
|
||||
# LC_ADDRESS = "ru_RU.UTF-8";
|
||||
# LC_IDENTIFICATION = "ru_RU.UTF-8";
|
||||
|
|
|
@ -1,23 +1,10 @@
|
|||
{ pkgs, ... }: {
|
||||
environment.variables = {
|
||||
# Allow running of proprietary software.
|
||||
NIXPKGS_ALLOW_UNFREE = "1";
|
||||
|
||||
# I use this env variable to get currently running architecture.
|
||||
NIX_CURRENT_SYSTEM = "${pkgs.stdenv.system}";
|
||||
NIX_CURRENT_SYSTEM = "${pkgs.stdenv.system}";
|
||||
};
|
||||
|
||||
# Allow installation of proprietary software.
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# Deduplicate store automatically. Slows down switches a bit, but saves space.
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nix.settings.auto-optimise-store = true;
|
||||
|
||||
# Extra configuration line-by-line:
|
||||
# 1. Allow use of flakes.
|
||||
# 2. When running GC, keep .drv files.
|
||||
# 3. When running GC, keep build dependencies.
|
||||
# 4. Run GC automatically when there's a 50 GB or less free space.
|
||||
nix.extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
keep-derivations = true
|
||||
|
@ -25,11 +12,7 @@
|
|||
min-free = ${toString(50 * 1000 * 1000 * 1000)}
|
||||
'';
|
||||
|
||||
# NOTE: Currently I run GC completely, but this setting (put above near min-free)
|
||||
# can stop GC when you hit 101 GB of free space available.
|
||||
# max-free = ${toString(101 * 1024 * 1024 * 1024)}
|
||||
|
||||
# NOTE: Enable this if you want to run GC on schedule. I instead use `min-free`.
|
||||
# max-free = ${toString(10 * 1024 * 1024 * 1024)}
|
||||
# nix.gc = {
|
||||
# automatic = true;
|
||||
# dates = "weekly";
|
||||
|
|
|
@ -3,16 +3,19 @@
|
|||
in {
|
||||
environment = {
|
||||
variables = {
|
||||
EDITOR = "nvim"; # Use Nvim as a default editor.
|
||||
MANPAGER = "nvim +Man!"; # Use Nvim to read man pages.
|
||||
EDITOR = "nvim";
|
||||
MANPAGER = "nvim +Man!";
|
||||
};
|
||||
systemPackages = with pkgs; [
|
||||
gcc # Required for Treesitter parsers.
|
||||
gcc
|
||||
];
|
||||
};
|
||||
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
configure.customRC = nvim.config;
|
||||
enable = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
configure = {
|
||||
customRC = nvim.config;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,40 +1,41 @@
|
|||
{ pkgs, ... }: {
|
||||
# List of common packages I use.
|
||||
environment.systemPackages = with pkgs; [
|
||||
binwalk # Can analyze files for other files inside them.
|
||||
btop htop # System monitors.
|
||||
coreutils usbutils # Common utilities.
|
||||
cryptsetup # Filesystem encryption (LUKS).
|
||||
curl # CLI http client.
|
||||
ddrescue testdisk # Apps to recover data from drives.
|
||||
fastfetch # Systeminfo summary.
|
||||
ffmpeg # Video/audio converter.
|
||||
file # Get general info about a file.
|
||||
gcc # C compiler.
|
||||
gdu # TUI storage analyzer.
|
||||
gnumake gnused # GNU utils.
|
||||
gparted parted # GUI/CLI disk partition tool.
|
||||
imagemagick # Image converter and transformation tool.
|
||||
jdk # Java.
|
||||
jq # Json parser.
|
||||
lm_sensors # Hardware sensors, like temperature and fan speeds.
|
||||
lshw # Detailed hardware info tool.
|
||||
lsof # Find current file users.
|
||||
ltex-ls # Latex LSP for neovim spellcheck.
|
||||
nixd # Nix LSP.
|
||||
nmap # Network analyzer.
|
||||
parallel # Run programs in parallel.
|
||||
pv # IO progress bar.
|
||||
ripgrep # Grep for file search.
|
||||
scanmem # Memory edit tool.
|
||||
smartmontools # S.M.A.R.T. tools.
|
||||
sqlite # Serverless file-based database engine.
|
||||
tree # Show directory stricture as a tree.
|
||||
ventoy # Boot multiple ISO/images from a single USB stick.
|
||||
wget # CLI http download tool.
|
||||
zip unzip # Zip archive/unarchive tools.
|
||||
|
||||
universal-android-debloater # Debloat Android devices.
|
||||
binwalk
|
||||
btop htop
|
||||
coreutils
|
||||
cryptsetup
|
||||
curl
|
||||
ddrescue testdisk
|
||||
ffmpeg
|
||||
file
|
||||
gcc
|
||||
gdu
|
||||
gnumake
|
||||
gnused
|
||||
gparted
|
||||
imagemagick
|
||||
jdk jdk11 jdk19 jdk20
|
||||
jq
|
||||
lm_sensors
|
||||
lshw
|
||||
lsof
|
||||
ltex-ls
|
||||
neofetch
|
||||
nixd
|
||||
nmap
|
||||
parallel
|
||||
parted
|
||||
pv
|
||||
ripgrep
|
||||
scanmem
|
||||
smartmontools
|
||||
sqlite
|
||||
tree
|
||||
universal-android-debloater
|
||||
usbutils
|
||||
ventoy
|
||||
wget
|
||||
zip unzip
|
||||
];
|
||||
|
||||
# Special packages.
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
{ ... }: {
|
||||
virtualisation = {
|
||||
podman = {
|
||||
enable = true;
|
||||
|
||||
# Free the 53 port ffs.
|
||||
defaultNetwork.settings.dns_enabled = false;
|
||||
|
||||
# Do not interfere with Docker so we can have both installed at the same time.
|
||||
# Podman can't replace Docker anyway.
|
||||
dockerCompat = false;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,8 +1,6 @@
|
|||
{ pkgs, util, ... } @args: let
|
||||
ssh = import ./ssh args;
|
||||
in {
|
||||
programs.ssh.extraConfig = ssh.config;
|
||||
|
||||
# Add SSHFS to mount remote filesystems over SSH.
|
||||
environment.systemPackages = with pkgs; [ sshfs ];
|
||||
programs.ssh.extraConfig = ssh.config;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
{ secret, ... }: {
|
||||
users.users.root.openssh.authorizedKeys.keys = secret.ssh.trustedKeys;
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
allowSFTP = true;
|
||||
|
|
|
@ -1,11 +1,7 @@
|
|||
{ pkgs, config, wallpaper, ... }: let
|
||||
# Sometimes stylix does not generate enough contrast for text.
|
||||
# This setting forces white text to ensure contrast on dark backgrounds.
|
||||
forceWhiteText = false;
|
||||
in {
|
||||
# Add a permanent link for the wallpaper to /etc/wallpaper.
|
||||
environment.etc.wallpaper.source = wallpaper.path;
|
||||
|
||||
stylix = {
|
||||
image = wallpaper.path;
|
||||
autoEnable = true;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{ ... }: {
|
||||
zramSwap.enable = true;
|
||||
swapDevices = [ ];
|
||||
}
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
{ ... }: {
|
||||
# Default UMASK.
|
||||
security.loginDefs.settings.UMASK = "077";
|
||||
|
||||
# Disallow users modification outside of this config.
|
||||
users.mutableUsers = false;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
{ pkgs, ... }: {
|
||||
# Instead of overlaying and rebuilding YtDlp I download the release from
|
||||
# GitHub and patch it for Nix.
|
||||
environment.systemPackages = with pkgs; [
|
||||
(pkgs.callPackage ./ytdlp {})
|
||||
];
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
# Apple San Francisco and New York fonts.
|
||||
# They are not available in Nixpkgs repo, so this script
|
||||
# downloads the fonts from Apple website and adds them to Nix store.
|
||||
{ lib, stdenv, fetchurl, p7zip }: let
|
||||
pro = fetchurl {
|
||||
url = "https://devimages-cdn.apple.com/design/resources/download/SF-Pro.dmg";
|
||||
|
|
|
@ -4,7 +4,12 @@
|
|||
in {
|
||||
inherit modules;
|
||||
|
||||
config = modules + util.trimTabs (''
|
||||
config = util.trimTabs (''
|
||||
# If not running interactively, don't do anything.
|
||||
# [[ "$-" != *i* ]] && return
|
||||
|
||||
'') + modules + util.trimTabs (''
|
||||
|
||||
# Find all functions.
|
||||
function find_function() {
|
||||
/usr/bin/env cat ${modulesFile} | /usr/bin/env grep "^function.*()" | /usr/bin/env sed -e "s/^function //" -e "s/().*//"
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
{ ... }: {
|
||||
text = ''
|
||||
# Open a sound control panel.
|
||||
function sound() {
|
||||
pavucontrol
|
||||
}
|
||||
|
||||
# Cycle output devices.
|
||||
function sound_output_cycle() {
|
||||
local IFS=$'\n'
|
||||
local current=$(pactl get-default-sink)
|
|
@ -1,19 +1,17 @@
|
|||
{ inputs, pkgs, util, key, ... } @args: let
|
||||
# Create Neovim configuration.
|
||||
nvimRc = { runtimes, configs }: let
|
||||
# Plugin paths to install.
|
||||
runtimeRc = util.trimTabs (builtins.foldl' (acc: r:
|
||||
nvimRc = { runtimes, cfgs }: let
|
||||
runtimeRc = builtins.foldl' (acc: r:
|
||||
acc + "set runtimepath+=${r}\n"
|
||||
) "" runtimes);
|
||||
) "" runtimes;
|
||||
|
||||
# My configuration files combined into one big file.
|
||||
config = pkgs.writeText "nvimRc" (util.catText configs args);
|
||||
config = pkgs.writeText "nvimRc" (builtins.foldl' (acc: cfg:
|
||||
acc + (import cfg args).text
|
||||
) "" cfgs);
|
||||
|
||||
# Tell Neovim to load this file.
|
||||
configRc = "lua dofile(\"${config}\")";
|
||||
in runtimeRc + configRc;
|
||||
cfgRc = "lua dofile(\"${config}\")";
|
||||
in runtimeRc + cfgRc;
|
||||
in {
|
||||
config = nvimRc {
|
||||
config = util.trimTabs (nvimRc {
|
||||
runtimes = [
|
||||
"~/.cache/nvim"
|
||||
"~/.cache/nvim/treesitter"
|
||||
|
@ -38,8 +36,7 @@ in {
|
|||
"${inputs.nvimTrouble}"
|
||||
"${inputs.nvimWhichKey}"
|
||||
];
|
||||
|
||||
configs = [
|
||||
cfgs = [
|
||||
./module/key/Rekey.nix
|
||||
./module/key/Leader.nix
|
||||
./module/config/Autoread.nix
|
||||
|
@ -82,5 +79,5 @@ in {
|
|||
./module/key/Trouble.nix
|
||||
./module/key/Whichkey.nix
|
||||
];
|
||||
};
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
# SSH client configuration.
|
||||
{ util, ... }: {
|
||||
config = util.trimTabs ''
|
||||
Host dasha
|
||||
|
|
18
module/common/stylix/Gruvbox.yaml
Normal file
18
module/common/stylix/Gruvbox.yaml
Normal file
|
@ -0,0 +1,18 @@
|
|||
scheme: "Gruvbox"
|
||||
author: "voronind"
|
||||
base00: "121212" # Background.
|
||||
base01: "212526" # Line cursor.
|
||||
base02: "38403f" # Statusline.
|
||||
base03: "47433e" # Line numbers.
|
||||
base04: "6e78a1" # Selected line number.
|
||||
base05: "b3afaf" # Foreground.
|
||||
base06: "d8a9a9" # Function.
|
||||
base07: "fcf4de" # Bright yellow.
|
||||
base08: "a74049" # Cyan.
|
||||
base09: "d35f5a" # Blue.
|
||||
base0A: "ac5d5d" # Yellow.
|
||||
base0B: "9f7b7b" # String green.
|
||||
base0C: "3a877e" # Comment green.
|
||||
base0D: "686995" # Purple.
|
||||
base0E: "84abab" # Orange.
|
||||
base0F: "9e446f" # Gray.
|
|
@ -2,7 +2,6 @@
|
|||
mod = key.tmux.mod;
|
||||
in {
|
||||
text = ''
|
||||
unbind-key C-b
|
||||
bind -n ${mod}-${key.tmux.reload} source-file /etc/tmux.conf
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -30,28 +30,21 @@ in {
|
|||
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
adwsteamgtk # Steam GTK theme. Need to run the app to apply.
|
||||
appimage-run # Tool to run .AppImage files in NixOS.
|
||||
aseprite # Pixel Art draw app. WARNING: Always builds from source.
|
||||
blender-hip # Blender with HiP support.
|
||||
calibre # Book library manager.
|
||||
evince # Document viewer.
|
||||
gimp # Image manipulation program.
|
||||
gnome.adwaita-icon-theme # GTK icons.
|
||||
gnome.gnome-calculator # Calculator.
|
||||
gnome.gnome-font-viewer # Font viewer.
|
||||
gnome.nautilus # File manager.
|
||||
godot_4 # Game development engine.
|
||||
jellyfin-media-player # Jellyfin client (self-hosted Netflix).
|
||||
loupe # Image viewer.
|
||||
obs-studio # Streaming/recording app.
|
||||
onlyoffice-bin # Office documents app suite.
|
||||
steam-run # Run native apps in Steam environment, like Minecraft. For Windows games use Bottles.
|
||||
tor-browser # Privacy browser.
|
||||
|
||||
android-studio jetbrains.idea-community # JetBrans IDEs.
|
||||
bottles dxvk gamescope pkgs.mangohud vkd3d wine64 # Gaming!
|
||||
(mpv.override {scripts = [mpvScripts.mpris];}) # Media player.
|
||||
android-studio jetbrains.idea-community
|
||||
appimage-run
|
||||
aseprite
|
||||
blender-hip
|
||||
bottles dxvk gamescope pkgs.mangohud vkd3d wine64
|
||||
calibre
|
||||
gimp
|
||||
godot_4
|
||||
jellyfin-media-player
|
||||
(mpv.override {scripts = [mpvScripts.mpris];})
|
||||
obs-studio
|
||||
onlyoffice-bin
|
||||
scanmem
|
||||
steam-run
|
||||
tor-browser
|
||||
];
|
||||
|
||||
variables = {
|
||||
|
@ -65,12 +58,6 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
# File manager file previews.
|
||||
services.gnome.sushi.enable = true;
|
||||
|
||||
# File manager network features.
|
||||
services.gvfs.enable = true;
|
||||
|
||||
# Special packages.
|
||||
programs.steam.enable = true;
|
||||
}
|
||||
|
|
|
@ -1,10 +1,335 @@
|
|||
{ util, ... } @args: let
|
||||
settings = util.catSet (util.ls ./dconf) args;
|
||||
{ lib, key, ... }: let
|
||||
mod = key.gnome.mod;
|
||||
in {
|
||||
# Gnome DE and GTK apps configuration.
|
||||
programs.dconf.enable = true;
|
||||
programs.dconf.profiles.user = {
|
||||
enableUserDb = true; # Delete `~/.config/dconf/user` to reset user settings.
|
||||
databases = [{ inherit settings; }];
|
||||
databases = [{
|
||||
settings = with lib.gvariant; {
|
||||
"org/gnome/desktop/a11y" = {
|
||||
always-show-universal-access-status = true;
|
||||
};
|
||||
|
||||
# "org/gnome/desktop/background" = {
|
||||
# color-shading-type = "solid";
|
||||
# picture-options = "none";
|
||||
# primary-color = "#000000000000";
|
||||
# secondary-color = "#000000000000";
|
||||
# };
|
||||
|
||||
"org/gnome/desktop/input-sources" = {
|
||||
current = mkUint32 0;
|
||||
mru-sources = [ (mkTuple [ "xkb" "us" ]) (mkTuple [ "xkb" "ru" ]) ];
|
||||
per-window = false;
|
||||
show-all-sources = true;
|
||||
sources = [ (mkTuple [ "xkb" "us" ]) (mkTuple [ "xkb" "ru" ]) ];
|
||||
xkb-options = [ "grp:caps_toggle" ];
|
||||
};
|
||||
|
||||
"org/gnome/desktop/interface" = {
|
||||
clock-show-date = true;
|
||||
clock-show-weekday = true;
|
||||
color-scheme = "prefer-dark";
|
||||
# cursor-blink = false;
|
||||
# cursor-size = "24";
|
||||
# cursor-theme = "Adwaita";
|
||||
# document-font-name = "SF Pro Text 11";
|
||||
enable-animations = false;
|
||||
enable-hot-corners = false;
|
||||
# font-antialiasing = "rgba";
|
||||
# font-hinting = "full";
|
||||
# font-name = "SF Pro Display 10";
|
||||
gtk-enable-primary-paste = false;
|
||||
# gtk-theme = "Adwaita";
|
||||
# icon-theme = "Adwaita";
|
||||
# monospace-font-name = "Terminess Nerd Font Mono Medium 12";
|
||||
show-battery-percentage = false;
|
||||
# toolbar-style = "text";
|
||||
# toolkit-accessibility = false;
|
||||
};
|
||||
|
||||
"org/gnome/desktop/media-handling" = {
|
||||
automount = false;
|
||||
automount-open = false;
|
||||
autorun-never = true;
|
||||
};
|
||||
|
||||
"org/gnome/desktop/peripherals/mouse" = {
|
||||
accel-profile = "flat";
|
||||
natural-scroll = true;
|
||||
speed = "0.0";
|
||||
};
|
||||
|
||||
"org/gnome/desktop/peripherals/touchpad" = {
|
||||
tap-to-click = true;
|
||||
two-finger-scrolling-enabled = true;
|
||||
};
|
||||
|
||||
"org/gnome/desktop/privacy" = {
|
||||
disable-camera = false;
|
||||
disable-microphone = false;
|
||||
old-files-age = mkUint32 30;
|
||||
recent-files-max-age = mkUint32 30;
|
||||
remove-old-temp-files = true;
|
||||
remove-old-trash-files = true;
|
||||
report-technical-problems = true;
|
||||
};
|
||||
|
||||
# "org/gnome/desktop/remote-desktop/rdp" = {
|
||||
# enable = false;
|
||||
# tls-cert = "/home/voronind/.local/share/gnome-remote-desktop/tls.crt";
|
||||
# tls-key = "/home/voronind/.local/share/gnome-remote-desktop/tls.key";
|
||||
# view-only = true;
|
||||
# };
|
||||
|
||||
# "org/gnome/desktop/screensaver" = {
|
||||
# color-shading-type = "solid";
|
||||
# idle-activation-enabled = false;
|
||||
# lock-delay = mkUint32 0;
|
||||
# picture-options = "zoom";
|
||||
# picture-uri = "file:///etc/wallpaper/Forest.jpg";
|
||||
# primary-color = "#000000000000";
|
||||
# secondary-color = "#000000000000";
|
||||
# };
|
||||
|
||||
"org/gnome/desktop/sound" = {
|
||||
allow-volume-above-100-percent = false;
|
||||
event-sounds = false;
|
||||
# theme-name = "freedesktop";
|
||||
};
|
||||
|
||||
"org/gnome/desktop/wm/keybindings" = {
|
||||
activate-window-menu = [ "" ];
|
||||
begin-move = [ "" ];
|
||||
begin-resize = [ "${mod}${key.action.resize.begin}" ];
|
||||
close = [ "${mod}${key.action.close}" ];
|
||||
cycle-group = [ "" ];
|
||||
cycle-group-backward = [ "" ];
|
||||
cycle-panels = [ "" ];
|
||||
cycle-panels-backward = [ "" ];
|
||||
cycle-windows = [ "" ];
|
||||
cycle-windows-backward = [ "" ];
|
||||
maximize = [ "" ];
|
||||
maximize-horizontally = [ "" ];
|
||||
minimize = [ "${mod}${key.navigation.go.down}" ];
|
||||
move-to-monitor-down = [ "" ];
|
||||
move-to-monitor-left = [ "" ];
|
||||
move-to-monitor-right = [ "" ];
|
||||
move-to-monitor-up = [ "" ];
|
||||
move-to-workspace-1 = [ "" ];
|
||||
move-to-workspace-2 = [ "" ];
|
||||
move-to-workspace-3 = [ "" ];
|
||||
move-to-workspace-4 = [ "" ];
|
||||
move-to-workspace-last = [ "" ];
|
||||
move-to-workspace-left = [ "<Shift>${mod}${key.navigation.move.prev}" ];
|
||||
move-to-workspace-right = [ "<Shift>${mod}${key.navigation.move.next}" ];
|
||||
panel-run-dialog = [ "${mod}${key.action.launch}" ];
|
||||
show-desktop = [ "${mod}${key.action.hide}" ];
|
||||
switch-applications = [ "${mod}${key.gnome.window.switch}" ];
|
||||
switch-applications-backward = [ "<Shift>${mod}${key.gnome.window.switch}" ];
|
||||
switch-group = [ "<Alt>${key.gnome.window.switch}" ];
|
||||
switch-group-backward = [ "<Shift><Alt>${key.gnome.window.switch}" ];
|
||||
switch-input-source = [ "" ];
|
||||
switch-input-source-backward = [ "" ];
|
||||
switch-panels = [ "" ];
|
||||
switch-panels-backward = [ "" ];
|
||||
switch-to-workspace-1 = [ "" ];
|
||||
switch-to-workspace-2 = [ "" ];
|
||||
switch-to-workspace-3 = [ "" ];
|
||||
switch-to-workspace-4 = [ "" ];
|
||||
switch-to-workspace-last = [ "" ];
|
||||
switch-to-workspace-left = [ "${mod}${key.navigation.go.prev}" ];
|
||||
switch-to-workspace-right = [ "${mod}${key.navigation.go.next}" ];
|
||||
switch-windows = [ "" ];
|
||||
switch-windows-backward = [ "" ];
|
||||
toggle-fullscreen = [ "${mod}${key.gnome.window.fullscreen}" ];
|
||||
toggle-maximized = [ "${mod}${key.navigation.go.up}" ];
|
||||
unmaximize = [ "" ];
|
||||
};
|
||||
|
||||
"org/gnome/desktop/wm/preferences" = {
|
||||
action-middle-click-titlebar = "minimize";
|
||||
action-right-click-titlebar = "menu";
|
||||
focus-mode = "click"; # `click` or `sloppy`.
|
||||
button-layout = "appmenu:close";
|
||||
# titlebar-font = "SF Pro Display 11";
|
||||
};
|
||||
|
||||
"org/gnome/desktop/session" = {
|
||||
idle-delay = mkUint32 0;
|
||||
};
|
||||
|
||||
"org/gnome/mutter" = {
|
||||
attach-modal-dialogs = true;
|
||||
center-new-windows = true;
|
||||
dynamic-workspaces = true;
|
||||
edge-tiling = true;
|
||||
workspaces-only-on-primary = true;
|
||||
};
|
||||
|
||||
"org/gnome/mutter/keybindings" = {
|
||||
toggle-tiled-left = [ "${mod}${key.navigation.go.left}" ];
|
||||
toggle-tiled-right = [ "${mod}${key.navigation.go.right}" ];
|
||||
};
|
||||
|
||||
"org/gnome/mutter/wayland/keybindings" = {
|
||||
restore-shortcuts = [ "" ];
|
||||
};
|
||||
|
||||
"org/gnome/nautilus/icon-view" = {
|
||||
default-zoom-level = "larger";
|
||||
};
|
||||
|
||||
"org/gnome/nautilus/list-view" = {
|
||||
default-zoom-level = "small";
|
||||
use-tree-view = false;
|
||||
};
|
||||
|
||||
"org/gnome/nautilus/preferences" = {
|
||||
click-policy = "single";
|
||||
default-folder-viewer = "list-view";
|
||||
default-sort-in-reverse-order = false;
|
||||
default-sort-order = "name";
|
||||
migrated-gtk-settings = true;
|
||||
search-filter-time-type = "last_modified";
|
||||
search-view = "list-view";
|
||||
show-image-thumbnails = "local-only";
|
||||
};
|
||||
|
||||
"org/gnome/settings-daemon/plugins/color" = {
|
||||
night-light-enabled = false;
|
||||
night-light-schedule-automatic = false;
|
||||
night-light-schedule-from = "0.0";
|
||||
night-light-schedule-to = "0.0";
|
||||
night-light-temperature = mkUint32 3700;
|
||||
};
|
||||
|
||||
"org/gnome/settings-daemon/plugins/media-keys" = {
|
||||
custom-keybindings = [
|
||||
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/"
|
||||
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/"
|
||||
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/"
|
||||
];
|
||||
magnifier = [ "" ];
|
||||
magnifier-zoom-in = [ "" ];
|
||||
magnifier-zoom-out = [ "" ];
|
||||
screenreader = [ "" ];
|
||||
screensaver = [ "${mod}${key.action.wait}" ];
|
||||
};
|
||||
|
||||
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = {
|
||||
binding = "${mod}${key.gnome.launch.terminal}";
|
||||
command = "kgx -e bash -c 'tmux new-session -A -s main; bash'";
|
||||
name = "gnome-terminal";
|
||||
};
|
||||
|
||||
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1" = {
|
||||
binding = "<Shift>${mod}${key.action.exit}";
|
||||
command = "gnome-session-quit --power-off";
|
||||
name = "gnome-poweroff";
|
||||
};
|
||||
|
||||
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2" = {
|
||||
binding = "<Primary>${key.gnome.launch.terminal}";
|
||||
command = "kgx -- btop";
|
||||
name = "System Monitor";
|
||||
};
|
||||
|
||||
"org/gnome/settings-daemon/plugins/power" = {
|
||||
ambient-enabled = false;
|
||||
idle-dim = false;
|
||||
power-button-action = "nothing";
|
||||
sleep-inactive-ac-timeout = "0";
|
||||
sleep-inactive-ac-type = "nothing";
|
||||
sleep-inactive-battery-type = "nothing";
|
||||
};
|
||||
|
||||
"org/gnome/shell" = {
|
||||
disable-extension-version-validation = true;
|
||||
disable-user-extensions = false;
|
||||
favorite-apps = [ "" ];
|
||||
had-bluetooth-devices-setup = true;
|
||||
last-selected-power-profile = "power-saver";
|
||||
remember-mount-password = false;
|
||||
};
|
||||
|
||||
"org/gnome/shell/app-switcher" = {
|
||||
current-workspace-only = true;
|
||||
};
|
||||
|
||||
"org/gnome/shell/keybindings" = {
|
||||
focus-active-notification = [ "" ];
|
||||
open-application-menu = [ "" ];
|
||||
show-screenshot-ui = [ "${mod}${key.gnome.screenshot}" ];
|
||||
switch-to-application-1 = [ "" ];
|
||||
switch-to-application-2 = [ "" ];
|
||||
switch-to-application-3 = [ "" ];
|
||||
switch-to-application-4 = [ "" ];
|
||||
switch-to-application-5 = [ "" ];
|
||||
switch-to-application-6 = [ "" ];
|
||||
switch-to-application-7 = [ "" ];
|
||||
switch-to-application-8 = [ "" ];
|
||||
switch-to-application-9 = [ "" ];
|
||||
toggle-application-view = [ "" ];
|
||||
toggle-message-tray = [ "" ];
|
||||
toggle-overview = [ "" ];
|
||||
toggle-quick-settings = [ "" ];
|
||||
};
|
||||
|
||||
"org/gnome/shell/overrides" = {
|
||||
edge-tiling = false;
|
||||
};
|
||||
|
||||
"org/gnome/software" = {
|
||||
download-updates = false;
|
||||
download-updates-notify = false;
|
||||
first-run = false;
|
||||
show-nonfree-prompt = false;
|
||||
};
|
||||
|
||||
"org/gnome/system/location" = {
|
||||
enabled = false;
|
||||
};
|
||||
|
||||
"org/gtk/gtk4/settings/file-chooser" = {
|
||||
date-format = "regular";
|
||||
location-mode = "path-bar";
|
||||
show-hidden = false;
|
||||
show-size-column = true;
|
||||
show-type-column = true;
|
||||
sidebar-width = "166";
|
||||
sort-column = "modified";
|
||||
sort-directories-first = true;
|
||||
sort-order = "descending";
|
||||
type-format = "category";
|
||||
view-type = "list";
|
||||
};
|
||||
|
||||
"org/gtk/settings/file-chooser" = {
|
||||
date-format = "regular";
|
||||
location-mode = "path-bar";
|
||||
show-hidden = false;
|
||||
show-size-column = true;
|
||||
show-type-column = true;
|
||||
sort-column = "modified";
|
||||
sort-directories-first = true;
|
||||
sort-order = "descending";
|
||||
type-format = "category";
|
||||
};
|
||||
|
||||
"system/locale" = {
|
||||
region = "ru_RU.UTF-8";
|
||||
};
|
||||
|
||||
"system/proxy" = {
|
||||
mode = "none";
|
||||
};
|
||||
|
||||
"org/virt-manager/virt-manager/connections" = {
|
||||
autoconnect = ["qemu:///system"];
|
||||
uris = ["qemu:///system"];
|
||||
};
|
||||
};
|
||||
}];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{ setting, ... }: {
|
||||
{ ... }: {
|
||||
services.xserver.enable = true;
|
||||
services.xserver.displayManager.gdm.enable = true;
|
||||
services.xserver.desktopManager.gnome.enable = true;
|
||||
services.xserver.xkb = {
|
||||
layout = setting.keyboard.layouts;
|
||||
options = setting.keyboard.options;
|
||||
layout = "us,ru";
|
||||
options = "grp:caps_toggle,lv3:ralt_switch";
|
||||
};
|
||||
}
|
||||
|
|
18
module/desktop/GnomeApps.nix
Normal file
18
module/desktop/GnomeApps.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ pkgs, ... }: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
adwsteamgtk
|
||||
evince
|
||||
gnome.adwaita-icon-theme
|
||||
gnome.gnome-calculator
|
||||
gnome.nautilus
|
||||
loupe
|
||||
gnome.gnome-font-viewer
|
||||
# gnome.gnome-keyring
|
||||
];
|
||||
|
||||
# Nautilus previews.
|
||||
services.gnome.sushi.enable = true;
|
||||
|
||||
# Nautilus network.
|
||||
services.gvfs.enable = true;
|
||||
}
|
|
@ -1,4 +1,3 @@
|
|||
# Polkit agent is used by apps to ask for Root password with a popup.
|
||||
{ pkgs, lib, ... }: {
|
||||
security.polkit.enable = true;
|
||||
systemd = {
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
# Portals are needed for Wayland apps to select files, screen shares etc.
|
||||
{ pkgs, ... }: {
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
# Improve DE performance.
|
||||
{ ... }: {
|
||||
security.pam.loginLimits = [
|
||||
{ domain = "@users"; item = "rtprio"; type = "-"; value = 1; }
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{ ... }: {
|
||||
# Systemd custom target for Sway.
|
||||
systemd.user.targets.gui-session = {
|
||||
after = [ "graphical-session-pre.target" ];
|
||||
bindsTo = [ "graphical-session.target" ];
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
waybar = import ./waybar args;
|
||||
in {
|
||||
programs.waybar.enable = true;
|
||||
|
||||
environment.variables = {
|
||||
WAYBAR_CONFIG = pkgs.writeText "waybarConfig" waybar.config;
|
||||
WAYBAR_STYLE = pkgs.writeText "waybarStyle" waybar.style;
|
||||
};
|
||||
environment.variables.WAYBAR_CONFIG = pkgs.writeText "waybarConfig" waybar.config;
|
||||
environment.variables.WAYBAR_STYLE = pkgs.writeText "waybarStyle" waybar.style;
|
||||
}
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
{ pkgs, ... }: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
wl-clipboard
|
||||
];
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
{ ... }: {
|
||||
"org/gnome/desktop/a11y" = {
|
||||
always-show-universal-access-status = true;
|
||||
};
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
{ ... }: {
|
||||
"org/gtk/gtk4/settings/file-chooser" = {
|
||||
date-format = "regular";
|
||||
location-mode = "path-bar";
|
||||
show-hidden = false;
|
||||
show-size-column = true;
|
||||
show-type-column = true;
|
||||
sidebar-width = "166";
|
||||
sort-column = "modified";
|
||||
sort-directories-first = true;
|
||||
sort-order = "descending";
|
||||
type-format = "category";
|
||||
view-type = "list";
|
||||
};
|
||||
|
||||
"org/gtk/settings/file-chooser" = {
|
||||
date-format = "regular";
|
||||
location-mode = "path-bar";
|
||||
show-hidden = false;
|
||||
show-size-column = true;
|
||||
show-type-column = true;
|
||||
sort-column = "modified";
|
||||
sort-directories-first = true;
|
||||
sort-order = "descending";
|
||||
type-format = "category";
|
||||
};
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
{ lib, setting, ... }: {
|
||||
"org/gnome/desktop/input-sources" = with lib.gvariant; {
|
||||
current = mkUint32 0;
|
||||
mru-sources = [ (mkTuple [ "xkb" "us" ]) (mkTuple [ "xkb" "ru" ]) ];
|
||||
per-window = false;
|
||||
show-all-sources = true;
|
||||
sources = [ (mkTuple [ "xkb" "us" ]) (mkTuple [ "xkb" "ru" ]) ];
|
||||
xkb-options = [ setting.keyboard.options ];
|
||||
};
|
||||
|
||||
"org/gnome/desktop/peripherals/mouse" = {
|
||||
accel-profile = "flat";
|
||||
natural-scroll = true;
|
||||
speed = "0.0";
|
||||
};
|
||||
|
||||
"org/gnome/desktop/peripherals/touchpad" = {
|
||||
tap-to-click = true;
|
||||
two-finger-scrolling-enabled = true;
|
||||
};
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
{ ... }: {
|
||||
"org/gnome/desktop/interface" = {
|
||||
clock-show-date = true;
|
||||
clock-show-weekday = true;
|
||||
color-scheme = "prefer-dark";
|
||||
enable-animations = false;
|
||||
enable-hot-corners = false;
|
||||
gtk-enable-primary-paste = false;
|
||||
show-battery-percentage = false;
|
||||
};
|
||||
}
|
|
@ -1,111 +0,0 @@
|
|||
{ key, ... }: let
|
||||
mod = key.gnome.mod;
|
||||
in {
|
||||
"org/gnome/desktop/wm/keybindings" = {
|
||||
activate-window-menu = [ "" ];
|
||||
begin-move = [ "" ];
|
||||
begin-resize = [ "${mod}${key.action.resize.begin}" ];
|
||||
close = [ "${mod}${key.action.close}" ];
|
||||
cycle-group = [ "" ];
|
||||
cycle-group-backward = [ "" ];
|
||||
cycle-panels = [ "" ];
|
||||
cycle-panels-backward = [ "" ];
|
||||
cycle-windows = [ "" ];
|
||||
cycle-windows-backward = [ "" ];
|
||||
maximize = [ "" ];
|
||||
maximize-horizontally = [ "" ];
|
||||
minimize = [ "${mod}${key.navigation.go.down}" ];
|
||||
move-to-monitor-down = [ "" ];
|
||||
move-to-monitor-left = [ "" ];
|
||||
move-to-monitor-right = [ "" ];
|
||||
move-to-monitor-up = [ "" ];
|
||||
move-to-workspace-1 = [ "" ];
|
||||
move-to-workspace-2 = [ "" ];
|
||||
move-to-workspace-3 = [ "" ];
|
||||
move-to-workspace-4 = [ "" ];
|
||||
move-to-workspace-last = [ "" ];
|
||||
move-to-workspace-left = [ "<Shift>${mod}${key.navigation.move.prev}" ];
|
||||
move-to-workspace-right = [ "<Shift>${mod}${key.navigation.move.next}" ];
|
||||
panel-run-dialog = [ "${mod}${key.action.launch}" ];
|
||||
show-desktop = [ "${mod}${key.action.hide}" ];
|
||||
switch-applications = [ "${mod}${key.gnome.window.switch}" ];
|
||||
switch-applications-backward = [ "<Shift>${mod}${key.gnome.window.switch}" ];
|
||||
switch-group = [ "<Alt>${key.gnome.window.switch}" ];
|
||||
switch-group-backward = [ "<Shift><Alt>${key.gnome.window.switch}" ];
|
||||
switch-input-source = [ "" ];
|
||||
switch-input-source-backward = [ "" ];
|
||||
switch-panels = [ "" ];
|
||||
switch-panels-backward = [ "" ];
|
||||
switch-to-workspace-1 = [ "" ];
|
||||
switch-to-workspace-2 = [ "" ];
|
||||
switch-to-workspace-3 = [ "" ];
|
||||
switch-to-workspace-4 = [ "" ];
|
||||
switch-to-workspace-last = [ "" ];
|
||||
switch-to-workspace-left = [ "${mod}${key.navigation.go.prev}" ];
|
||||
switch-to-workspace-right = [ "${mod}${key.navigation.go.next}" ];
|
||||
switch-windows = [ "" ];
|
||||
switch-windows-backward = [ "" ];
|
||||
toggle-fullscreen = [ "${mod}${key.gnome.window.fullscreen}" ];
|
||||
toggle-maximized = [ "${mod}${key.navigation.go.up}" ];
|
||||
unmaximize = [ "" ];
|
||||
};
|
||||
|
||||
"org/gnome/mutter/keybindings" = {
|
||||
toggle-tiled-left = [ "${mod}${key.navigation.go.left}" ];
|
||||
toggle-tiled-right = [ "${mod}${key.navigation.go.right}" ];
|
||||
};
|
||||
|
||||
"org/gnome/mutter/wayland/keybindings" = {
|
||||
restore-shortcuts = [ "" ];
|
||||
};
|
||||
|
||||
"org/gnome/settings-daemon/plugins/media-keys" = {
|
||||
custom-keybindings = [
|
||||
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/"
|
||||
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/"
|
||||
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/"
|
||||
];
|
||||
magnifier = [ "" ];
|
||||
magnifier-zoom-in = [ "" ];
|
||||
magnifier-zoom-out = [ "" ];
|
||||
screenreader = [ "" ];
|
||||
screensaver = [ "${mod}${key.action.wait}" ];
|
||||
};
|
||||
|
||||
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = {
|
||||
binding = "${mod}${key.gnome.launch.terminal}";
|
||||
command = "kgx -e bash -c 'tmux new-session -A -s main; bash'";
|
||||
name = "gnome-terminal";
|
||||
};
|
||||
|
||||
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1" = {
|
||||
binding = "<Shift>${mod}${key.action.exit}";
|
||||
command = "gnome-session-quit --power-off";
|
||||
name = "gnome-poweroff";
|
||||
};
|
||||
|
||||
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2" = {
|
||||
binding = "<Primary>${key.gnome.launch.terminal}";
|
||||
command = "kgx -- btop";
|
||||
name = "System Monitor";
|
||||
};
|
||||
|
||||
"org/gnome/shell/keybindings" = {
|
||||
focus-active-notification = [ "" ];
|
||||
open-application-menu = [ "" ];
|
||||
show-screenshot-ui = [ "${mod}${key.gnome.screenshot}" ];
|
||||
switch-to-application-1 = [ "" ];
|
||||
switch-to-application-2 = [ "" ];
|
||||
switch-to-application-3 = [ "" ];
|
||||
switch-to-application-4 = [ "" ];
|
||||
switch-to-application-5 = [ "" ];
|
||||
switch-to-application-6 = [ "" ];
|
||||
switch-to-application-7 = [ "" ];
|
||||
switch-to-application-8 = [ "" ];
|
||||
switch-to-application-9 = [ "" ];
|
||||
toggle-application-view = [ "" ];
|
||||
toggle-message-tray = [ "" ];
|
||||
toggle-overview = [ "" ];
|
||||
toggle-quick-settings = [ "" ];
|
||||
};
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{ ... }: {
|
||||
"org/gnome/desktop/media-handling" = {
|
||||
automount = false;
|
||||
automount-open = false;
|
||||
autorun-never = true;
|
||||
};
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
{ ... }: {
|
||||
"org/gnome/nautilus/icon-view" = {
|
||||
default-zoom-level = "larger";
|
||||
};
|
||||
|
||||
"org/gnome/nautilus/list-view" = {
|
||||
default-zoom-level = "small";
|
||||
use-tree-view = false;
|
||||
};
|
||||
|
||||
"org/gnome/nautilus/preferences" = {
|
||||
click-policy = "single";
|
||||
default-folder-viewer = "list-view";
|
||||
default-sort-in-reverse-order = false;
|
||||
default-sort-order = "name";
|
||||
migrated-gtk-settings = true;
|
||||
search-filter-time-type = "last_modified";
|
||||
search-view = "list-view";
|
||||
show-image-thumbnails = "local-only";
|
||||
};
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{ ... }: {
|
||||
"org/gnome/settings-daemon/plugins/power" = {
|
||||
ambient-enabled = false;
|
||||
idle-dim = false;
|
||||
power-button-action = "nothing";
|
||||
sleep-inactive-ac-timeout = "0";
|
||||
sleep-inactive-ac-type = "nothing";
|
||||
sleep-inactive-battery-type = "nothing";
|
||||
};
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
{ lib, ... }: {
|
||||
"org/gnome/desktop/privacy" = with lib.gvariant; {
|
||||
disable-camera = false;
|
||||
disable-microphone = false;
|
||||
old-files-age = mkUint32 30;
|
||||
recent-files-max-age = mkUint32 30;
|
||||
remove-old-temp-files = true;
|
||||
remove-old-trash-files = true;
|
||||
report-technical-problems = true;
|
||||
};
|
||||
|
||||
"org/gnome/system/location" = {
|
||||
enabled = false;
|
||||
};
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
{ lib, ... }: {
|
||||
"org/gnome/desktop/session" = with lib.gvariant; {
|
||||
idle-delay = mkUint32 0;
|
||||
};
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
{ ... }: {
|
||||
"org/gnome/shell" = {
|
||||
disable-extension-version-validation = true;
|
||||
disable-user-extensions = false;
|
||||
favorite-apps = [ "" ];
|
||||
had-bluetooth-devices-setup = true;
|
||||
last-selected-power-profile = "power-saver";
|
||||
remember-mount-password = false;
|
||||
};
|
||||
|
||||
"system/proxy" = {
|
||||
mode = "none";
|
||||
};
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
{ ... }: {
|
||||
"org/gnome/software" = {
|
||||
download-updates = false;
|
||||
download-updates-notify = false;
|
||||
first-run = false;
|
||||
show-nonfree-prompt = false;
|
||||
};
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{ ... }: {
|
||||
"org/gnome/desktop/sound" = {
|
||||
allow-volume-above-100-percent = false;
|
||||
event-sounds = false;
|
||||
theme-name = "freedesktop";
|
||||
};
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
{ lib, ... }: {
|
||||
"org/gnome/desktop/wm/preferences" = {
|
||||
action-middle-click-titlebar = "minimize";
|
||||
action-right-click-titlebar = "menu";
|
||||
focus-mode = "click"; # `click` or `sloppy`.
|
||||
button-layout = "appmenu:close";
|
||||
};
|
||||
|
||||
"org/gnome/mutter" = {
|
||||
attach-modal-dialogs = true;
|
||||
center-new-windows = true;
|
||||
dynamic-workspaces = true;
|
||||
edge-tiling = true;
|
||||
workspaces-only-on-primary = true;
|
||||
};
|
||||
|
||||
"org/gnome/settings-daemon/plugins/color" = with lib.gvariant; {
|
||||
night-light-enabled = false;
|
||||
night-light-schedule-automatic = false;
|
||||
night-light-schedule-from = "0.0";
|
||||
night-light-schedule-to = "0.0";
|
||||
night-light-temperature = mkUint32 3700;
|
||||
};
|
||||
|
||||
"org/gnome/shell/app-switcher" = {
|
||||
current-workspace-only = true;
|
||||
};
|
||||
|
||||
"org/gnome/shell/overrides" = {
|
||||
edge-tiling = false;
|
||||
};
|
||||
}
|
|
@ -6,7 +6,7 @@
|
|||
install_url = url;
|
||||
};
|
||||
|
||||
mkBookmark = name: url: { inherit name url; };
|
||||
mkBookmark = name: url: { inherit name; inherit url; };
|
||||
in {
|
||||
# Disable profile switching on rebuild.
|
||||
environment.variables = {
|
||||
|
@ -35,7 +35,6 @@ in {
|
|||
];
|
||||
ExtensionUpdate = true;
|
||||
ExtensionSettings = {
|
||||
# Block extension installation outside of this config.
|
||||
"*" = {
|
||||
install_sources = [ "*" ];
|
||||
installation_mode = "blocked";
|
||||
|
@ -46,11 +45,9 @@ in {
|
|||
"{446900e4-71c2-419f-a6a7-df9c091e268b}" = mkExtension "https://addons.mozilla.org/firefox/downloads/latest/bitwarden-password-manager/latest.xpi";
|
||||
"{d7742d87-e61d-4b78-b8a1-b469842139fa}" = mkExtension "https://addons.mozilla.org/firefox/downloads/latest/vimium-ff/latest.xpi";
|
||||
"{e7625f06-e252-479d-ac7a-db68aeaff2cb}" = mkExtension "https://addons.mozilla.org/firefox/downloads/latest/togglefonts/latest.xpi";
|
||||
# NOTE: This extension is helpful to find the required parameters for this config.
|
||||
# Or find them yourself inside the `about:support`.
|
||||
# "queryamoid@kaply.com" = mkExtension "https://github.com/mkaply/queryamoid/releases/download/v0.1/query_amo_addon_id-0.1-fx.xpi";
|
||||
# "{08d5243b-4236-4a27-984b-1ded22ce01c3}" = mkExtension "https://addons.mozilla.org/firefox/downloads/latest/gruvboxgruvboxgruvboxgruvboxgr/latest.xpi";
|
||||
};
|
||||
# NOTE: `firefox-esr` edition is required to change default search engine.
|
||||
SearchEngines = {
|
||||
Default = "Whoogle";
|
||||
Add = [
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
{ key, ... }: let
|
||||
mod = key.sysctrl;
|
||||
in {
|
||||
text = ''
|
||||
bindsym ${mod}+c exec 'swaymsg exit'
|
||||
bindsym ${mod}+f exec 'swayscript montoggle'
|
||||
bindsym ${mod}+l exec 'powerlimit toggle'
|
||||
bindsym ${mod}+m exec 'swayscript montoggle'
|
||||
bindsym ${mod}+p exec 'powersave toggle'
|
||||
bindsym ${mod}+v exec 'swayscript vrrtoggle'
|
||||
bindsym ${mod}+x exec 'systemctl poweroff -i'
|
||||
bindsym ${mod}+z exec 'systemctl suspend -i'
|
||||
'';
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue