Compare commits
83 Commits
fix-kodi-w
...
d71d7a1ffb
| Author | SHA1 | Date | |
|---|---|---|---|
| d71d7a1ffb | |||
| ee511f6ab8 | |||
| e3dd0bdb30 | |||
| 10300ed10b | |||
| 8e72ef71d2 | |||
| d6e031efd0 | |||
| 16fa4a641c | |||
| 7a5ec23cc5 | |||
| ff1124fbe6 | |||
| 53088f9536 | |||
| 68c04b43fd | |||
| efbfffbb61 | |||
| 0e1a67b980 | |||
| 7d6e294340 | |||
| 8690a0289d | |||
| e95f56e240 | |||
| 2dffbb0a98 | |||
| 2ceaf78825 | |||
| e164097f36 | |||
| d1605e386d | |||
| 4a41533ba8 | |||
| 9d45449fce | |||
| 877bc2c739 | |||
| cd6e028142 | |||
| 421b27f76f | |||
| 1f4a72d28c | |||
| a8f19af989 | |||
| d4b0fe5b9e | |||
| 09cff42222 | |||
| 0183e7c823 | |||
| 29cdd1e239 | |||
| 7ced8f11ba | |||
| 244b7c0888 | |||
| 80744bcbf1 | |||
| 56d03f4228 | |||
| 32d0c7fa5a | |||
| 1c2aae93b7 | |||
| 0ab6562694 | |||
| 986ee06a46 | |||
| 34abaeeec9 | |||
| 11638cfa1b | |||
| 1ce431b0e5 | |||
| 98ef9b1443 | |||
| 4c779663df | |||
| e2bb87fcf1 | |||
| ef47c5dc9a | |||
| 7da089daa3 | |||
| 8134d7cb33 | |||
| 24f1a64f3c | |||
| 19531074ca | |||
| a30c130f21 | |||
| e088ee2dc8 | |||
| 366a7e2ea3 | |||
| 9116e44dfe | |||
| e3ef710bdb | |||
| e1a804cfed | |||
| ec59936012 | |||
| 844d17a855 | |||
| b19dc65c6d | |||
| 6db2c78e0b | |||
| 475aafa33e | |||
| 09562f0af9 | |||
| ae543d9628 | |||
| c7716d2bca | |||
| 54cf339d52 | |||
| b9097e91d5 | |||
| abf8fe9ad2 | |||
| 926b47f07f | |||
| 749ef988f1 | |||
| dfa91d327f | |||
| 37c455d75e | |||
| c0d7d934f3 | |||
| cb91f69c49 | |||
| bc6378cb22 | |||
| a13676311a | |||
| ec57592715 | |||
| 051c223eb7 | |||
| 6030f6ea42 | |||
| df77fd5c74 | |||
| 458bcb4cdf | |||
| 40e10bab34 | |||
| 3477a3480f | |||
| d2ae7f8e11 |
21
.goosehints
Normal file
21
.goosehints
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
This repository contains NixOS configurations for different machines and roles. Here's a brief overview based on the files present:
|
||||||
|
|
||||||
|
- **Secrets:**
|
||||||
|
- `secrets/secrets.yaml`: Contains secret configurations, possibly encrypted or sensitive data.
|
||||||
|
|
||||||
|
- **Packages:**
|
||||||
|
- `packages/`: Nix package definitions.
|
||||||
|
|
||||||
|
- **Flake:**
|
||||||
|
- `flake.nix` and `flake.lock`: Nix Flake configuration files for managing the Nix environment dependencies.
|
||||||
|
|
||||||
|
- **Roles:**
|
||||||
|
- Various directories like `roles/kodi/`, `roles/bluetooth/`, etc., each containing `default.nix` files which possibly define role-specific configurations and modules.
|
||||||
|
|
||||||
|
- **Machines:**
|
||||||
|
- `machines/`: Machine-specific configurations for different machines like `nix-book`, `z790prors`, `boxy`, and `wixos`.
|
||||||
|
- Each machine has `configuration.nix` and `hardware-configuration.nix`, detailing the machine's system and hardware configuration.
|
||||||
|
|
||||||
|
- **Home:**
|
||||||
|
- `home/`: Pertains to user-specific configurations with different modules and home environment setups. Contains files like `home-nix-book.nix`, `home-z790prors.nix`, etc.
|
||||||
|
- Includes specific modules for software like Emacs, tmux, i3+sway, etc.
|
||||||
180
flake.lock
generated
180
flake.lock
generated
@@ -1,5 +1,60 @@
|
|||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
|
"doomemacs": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1736881038,
|
||||||
|
"narHash": "sha256-i0GVHWoIqDcFB9JmEdd9T+qxrEx3ckBlPfTD/yLoNyg=",
|
||||||
|
"owner": "doomemacs",
|
||||||
|
"repo": "doomemacs",
|
||||||
|
"rev": "2bc052425ca45a41532be0648ebd976d1bd2e6c1",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "doomemacs",
|
||||||
|
"repo": "doomemacs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"emacs-overlay": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nix-doom-emacs-unstraightened"
|
||||||
|
],
|
||||||
|
"nixpkgs-stable": [
|
||||||
|
"nix-doom-emacs-unstraightened"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1739673654,
|
||||||
|
"narHash": "sha256-J4+OtlyTMcZfVPXkn1ef/hew80KqoOuorp1iUwJqiso=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "emacs-overlay",
|
||||||
|
"rev": "9ab982da8f82359a7619f25718fb6bd838ca34ce",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "emacs-overlay",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-compat": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1733328505,
|
||||||
|
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"home-manager": {
|
"home-manager": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
@@ -7,11 +62,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1728041527,
|
"lastModified": 1739724290,
|
||||||
"narHash": "sha256-03liqiJtk9UP7YQHW4r8MduKCK242FQzud8iWvvlK+o=",
|
"narHash": "sha256-dvByZPuVmBgOBLq8GohBy9hEd0/JXj5goXK2OY1Pvgk=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "509dbf8d45606b618e9ec3bbe4e936b7c5bc6c1e",
|
"rev": "ec130e700959ee10b63eedbc87758d20264a9588",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -20,13 +75,72 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nix-doom-emacs-unstraightened": {
|
||||||
|
"inputs": {
|
||||||
|
"doomemacs": "doomemacs",
|
||||||
|
"emacs-overlay": "emacs-overlay",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"systems": "systems"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1739694785,
|
||||||
|
"narHash": "sha256-Ks7hzuFsxAAseVpUQssvbMvDCOrH4evVVU45Vx6wE3E=",
|
||||||
|
"owner": "marienz",
|
||||||
|
"repo": "nix-doom-emacs-unstraightened",
|
||||||
|
"rev": "b8e20ff378f107c03d65d2b1dd849ebfe58fefd5",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "marienz",
|
||||||
|
"repo": "nix-doom-emacs-unstraightened",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixos-wsl": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-compat": "flake-compat",
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1739718817,
|
||||||
|
"narHash": "sha256-J3tgc57E41sEVHQtQeCPNAh62NDnZrJCkSlaAj2gYs8=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "NixOS-WSL",
|
||||||
|
"rev": "c084e05fff6b2601de351e1bbee00485bf003f35",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"ref": "main",
|
||||||
|
"repo": "NixOS-WSL",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1727802920,
|
"lastModified": 1739357830,
|
||||||
"narHash": "sha256-HP89HZOT0ReIbI7IJZJQoJgxvB2Tn28V6XS3MNKnfLs=",
|
"narHash": "sha256-9xim3nJJUFbVbJCz48UP4fGRStVW5nv4VdbimbKxJ3I=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "0ff09db9d034a04acd4e8908820ba0b410d7a33a",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-24.11",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1739580444,
|
||||||
|
"narHash": "sha256-+/bSz4EAVbqz8/HsIGLroF8aNaO8bLRL7WfACN+24g4=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "27e30d177e57d912d614c88c622dcfdb2e6e6515",
|
"rev": "8bb37161a0488b89830168b81c48aed11569cb93",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -36,26 +150,36 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-stable": {
|
"plasma-manager": {
|
||||||
|
"inputs": {
|
||||||
|
"home-manager": [
|
||||||
|
"home-manager"
|
||||||
|
],
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1725762081,
|
"lastModified": 1739557722,
|
||||||
"narHash": "sha256-vNv+aJUW5/YurRy1ocfvs4q/48yVESwlC/yHzjkZSP8=",
|
"narHash": "sha256-XikzLpPUDYiNyJ4w2SfRShdbSkIgE3btYdxCGInmtc4=",
|
||||||
"owner": "NixOS",
|
"owner": "nix-community",
|
||||||
"repo": "nixpkgs",
|
"repo": "plasma-manager",
|
||||||
"rev": "dc454045f5b5d814e5862a6d057e7bb5c29edc05",
|
"rev": "1f3e1f38dedbbb8aad77e184fb54ec518e2d9522",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "nix-community",
|
||||||
"ref": "release-24.05",
|
"repo": "plasma-manager",
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"nixpkgs": "nixpkgs",
|
"nix-doom-emacs-unstraightened": "nix-doom-emacs-unstraightened",
|
||||||
|
"nixos-wsl": "nixos-wsl",
|
||||||
|
"nixpkgs": "nixpkgs_2",
|
||||||
|
"plasma-manager": "plasma-manager",
|
||||||
"sops-nix": "sops-nix"
|
"sops-nix": "sops-nix"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -63,15 +187,14 @@
|
|||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
],
|
]
|
||||||
"nixpkgs-stable": "nixpkgs-stable"
|
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1727423009,
|
"lastModified": 1739262228,
|
||||||
"narHash": "sha256-+4B/dQm2EnORIk0k2wV3aHGaE0WXTBjColXjj7qWh10=",
|
"narHash": "sha256-7JAGezJ0Dn5qIyA2+T4Dt/xQgAbhCglh6lzCekTVMeU=",
|
||||||
"owner": "Mic92",
|
"owner": "Mic92",
|
||||||
"repo": "sops-nix",
|
"repo": "sops-nix",
|
||||||
"rev": "127a96f49ddc377be6ba76964411bab11ae27803",
|
"rev": "07af005bb7d60c7f118d9d9f5530485da5d1e975",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -79,6 +202,21 @@
|
|||||||
"repo": "sops-nix",
|
"repo": "sops-nix",
|
||||||
"type": "github"
|
"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"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
|||||||
45
flake.nix
45
flake.nix
@@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
nixos-wsl.url = "github:nix-community/NixOS-WSL/main";
|
||||||
|
|
||||||
sops-nix = {
|
sops-nix = {
|
||||||
url = "github:Mic92/sops-nix";
|
url = "github:Mic92/sops-nix";
|
||||||
@@ -13,9 +14,20 @@
|
|||||||
url = "github:nix-community/home-manager";
|
url = "github:nix-community/home-manager";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
plasma-manager = {
|
||||||
|
url = "github:nix-community/plasma-manager";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
inputs.home-manager.follows = "home-manager";
|
||||||
|
};
|
||||||
|
|
||||||
|
nix-doom-emacs-unstraightened = {
|
||||||
|
url = "github:marienz/nix-doom-emacs-unstraightened";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, ... } @ inputs: let
|
outputs = { self, nixpkgs, nixos-wsl, ... } @ inputs: let
|
||||||
baseModules = [
|
baseModules = [
|
||||||
./roles
|
./roles
|
||||||
inputs.sops-nix.nixosModules.sops
|
inputs.sops-nix.nixosModules.sops
|
||||||
@@ -23,6 +35,10 @@
|
|||||||
{
|
{
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
home-manager.useUserPackages = true;
|
home-manager.useUserPackages = true;
|
||||||
|
home-manager.sharedModules = [
|
||||||
|
inputs.plasma-manager.homeManagerModules.plasma-manager
|
||||||
|
inputs.nix-doom-emacs-unstraightened.hmModule
|
||||||
|
];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
in {
|
in {
|
||||||
@@ -33,8 +49,6 @@
|
|||||||
./machines/z790prors/configuration.nix
|
./machines/z790prors/configuration.nix
|
||||||
{
|
{
|
||||||
home-manager.users.johno = import ./home/home-z790prors.nix;
|
home-manager.users.johno = import ./home/home-z790prors.nix;
|
||||||
home-manager.extraSpecialArgs.customPkgs =
|
|
||||||
nixpkgs.legacyPackages."${system}".callPackage ./packages {};
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
@@ -45,8 +59,6 @@
|
|||||||
./machines/nix-book/configuration.nix
|
./machines/nix-book/configuration.nix
|
||||||
{
|
{
|
||||||
home-manager.users.johno = import ./home/home-nix-book.nix;
|
home-manager.users.johno = import ./home/home-nix-book.nix;
|
||||||
home-manager.extraSpecialArgs.customPkgs =
|
|
||||||
nixpkgs.legacyPackages."${system}".callPackage ./packages {};
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
@@ -55,13 +67,22 @@
|
|||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = baseModules ++ [
|
modules = baseModules ++ [
|
||||||
./machines/boxy/configuration.nix
|
./machines/boxy/configuration.nix
|
||||||
# inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
# {
|
{
|
||||||
# home-manager.users.johno = import ./home/home-default.nix;
|
home-manager.users.johno = import ./home/home-default.nix;
|
||||||
# home-manager.extraSpecialArgs.customPkgs =
|
}
|
||||||
# nixpkgs.legacyPackages."${system}".callPackage ./packages {};
|
];
|
||||||
# customPkgs = nixpkgs.legacyPackages."${system}".callPackage ./packages {};
|
};
|
||||||
# }
|
|
||||||
|
nixosConfigurations.wixos = nixpkgs.lib.nixosSystem rec {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
modules = baseModules ++ [
|
||||||
|
nixos-wsl.nixosModules.default
|
||||||
|
./machines/wixos/configuration.nix
|
||||||
|
inputs.home-manager.nixosModules.home-manager
|
||||||
|
{
|
||||||
|
home-manager.users.johno = import ./home/home-default.nix;
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
{ pkgs, customPkgs, ... }:
|
{ pkgs, customPkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
customPkgs = pkgs.callPackage ../packages {};
|
||||||
|
in
|
||||||
{
|
{
|
||||||
# Home Manager needs a bit of information about you and the paths it should
|
# Home Manager needs a bit of information about you and the paths it should
|
||||||
# manage.
|
# manage.
|
||||||
@@ -40,6 +43,7 @@
|
|||||||
pkgs.element-desktop
|
pkgs.element-desktop
|
||||||
pkgs.fd
|
pkgs.fd
|
||||||
#pkgs.fluffychat # security vulnerability in current version
|
#pkgs.fluffychat # security vulnerability in current version
|
||||||
|
pkgs.goose-cli
|
||||||
pkgs.gzip
|
pkgs.gzip
|
||||||
pkgs.htop
|
pkgs.htop
|
||||||
pkgs.jellyfin-media-player
|
pkgs.jellyfin-media-player
|
||||||
@@ -49,6 +53,7 @@
|
|||||||
pkgs.less
|
pkgs.less
|
||||||
pkgs.moonlight-qt
|
pkgs.moonlight-qt
|
||||||
pkgs.ncdu
|
pkgs.ncdu
|
||||||
|
pkgs.nextcloud-talk-desktop
|
||||||
pkgs.pandoc
|
pkgs.pandoc
|
||||||
pkgs.pinentry-qt
|
pkgs.pinentry-qt
|
||||||
#pkgs.pytest
|
#pkgs.pytest
|
||||||
@@ -58,8 +63,6 @@
|
|||||||
pkgs.waybar
|
pkgs.waybar
|
||||||
pkgs.wofi
|
pkgs.wofi
|
||||||
pkgs.vlc
|
pkgs.vlc
|
||||||
|
|
||||||
customPkgs.nextcloudTalkDesktop
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# Home Manager is pretty good at managing dotfiles. The primary way to manage
|
# Home Manager is pretty good at managing dotfiles. The primary way to manage
|
||||||
@@ -100,22 +103,15 @@
|
|||||||
home.sessionPath = [
|
home.sessionPath = [
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
./modules/emacs
|
./modules/emacs
|
||||||
./modules/lutris
|
|
||||||
./modules/i3+sway
|
./modules/i3+sway
|
||||||
|
./modules/plasma-manager
|
||||||
|
./modules/tmux
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.bash.enable = true;
|
programs.bash.enable = true;
|
||||||
|
|
||||||
nix = {
|
|
||||||
gc = {
|
|
||||||
automatic = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Let Home Manager install and manage itself.
|
# Let Home Manager install and manage itself.
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./home-default.nix
|
./home-default.nix
|
||||||
./modules/hyprland/nix-book.nix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
home.i3_sway.extraSwayConfig = {
|
home.i3_sway.extraSwayConfig = {
|
||||||
|
|||||||
@@ -3,6 +3,5 @@
|
|||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./home-default.nix
|
./home-default.nix
|
||||||
./modules/hyprland/z790prors.nix
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,21 +2,15 @@
|
|||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let
|
{
|
||||||
doomSync = (let
|
|
||||||
git = pkgs.git;
|
|
||||||
in ''
|
|
||||||
export PATH=${pkgs.emacs}/bin:${git}/bin:$PATH
|
|
||||||
${config.xdg.configHome}/emacs/bin/doom sync -u -j $((`nproc`/4*3))
|
|
||||||
'');
|
|
||||||
in {
|
|
||||||
config = {
|
config = {
|
||||||
home.packages = [
|
home.packages = [
|
||||||
pkgs.emacs-all-the-icons-fonts
|
pkgs.emacs-all-the-icons-fonts
|
||||||
pkgs.fontconfig
|
pkgs.fontconfig
|
||||||
pkgs.graphviz
|
pkgs.graphviz
|
||||||
pkgs.isort
|
pkgs.isort
|
||||||
pkgs.nerdfonts
|
pkgs.nerd-fonts.fira-code
|
||||||
|
pkgs.nerd-fonts.droid-sans-mono
|
||||||
pkgs.nil # nix lsp language server
|
pkgs.nil # nix lsp language server
|
||||||
pkgs.nixfmt-rfc-style
|
pkgs.nixfmt-rfc-style
|
||||||
(pkgs.ripgrep.override {withPCRE2 = true;})
|
(pkgs.ripgrep.override {withPCRE2 = true;})
|
||||||
@@ -25,43 +19,15 @@ in {
|
|||||||
pkgs.python3
|
pkgs.python3
|
||||||
];
|
];
|
||||||
|
|
||||||
|
programs.doom-emacs = {
|
||||||
|
#enable = true;
|
||||||
|
doomDir = ./doom;
|
||||||
|
};
|
||||||
|
|
||||||
fonts.fontconfig.enable = true;
|
fonts.fontconfig.enable = true;
|
||||||
|
|
||||||
home.file = {
|
|
||||||
".config/emacs" = {
|
|
||||||
source = fetchGit {
|
|
||||||
url = "https://github.com/doomemacs/doomemacs.git";
|
|
||||||
# When updating me, remember to run `doom sync`
|
|
||||||
rev = "5ad99220b86ae1bf421861dfad24492d768ac4d9";
|
|
||||||
};
|
|
||||||
# We need to use recursive mode here or else doom fails to sync for
|
|
||||||
# some reason related to the permissions on the synced path. I'm not
|
|
||||||
# quite sure of everything that's going on here.
|
|
||||||
recursive = true;
|
|
||||||
|
|
||||||
# Because `recursive = true` will cause this to sync every single
|
|
||||||
# activation, we turn this off here.
|
|
||||||
#
|
|
||||||
# There's probably a way we could do better detection of this within
|
|
||||||
# our onChange shell?
|
|
||||||
#
|
|
||||||
# onChange = doomSync;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
DOOMLOCALDIR = "${config.xdg.dataHome}/doom";
|
|
||||||
EDITOR = "emacs -nw";
|
EDITOR = "emacs -nw";
|
||||||
};
|
};
|
||||||
|
|
||||||
home.sessionPath = [
|
|
||||||
"${config.xdg.configHome}/emacs/bin"
|
|
||||||
];
|
|
||||||
|
|
||||||
xdg.configFile."doom" = {
|
|
||||||
source = ./doom;
|
|
||||||
# Sync doom if we updated the config
|
|
||||||
onChange = doomSync;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,6 +28,7 @@
|
|||||||
;; up, `M-x eval-region' to execute elisp code, and 'M-x doom/reload-font' to
|
;; up, `M-x eval-region' to execute elisp code, and 'M-x doom/reload-font' to
|
||||||
;; refresh your font settings. If Emacs still can't find your font, it likely
|
;; refresh your font settings. If Emacs still can't find your font, it likely
|
||||||
;; wasn't installed correctly. Font issues are rarely Doom issues!
|
;; wasn't installed correctly. Font issues are rarely Doom issues!
|
||||||
|
(setq doom-font (font-spec :family "Fira Code"))
|
||||||
|
|
||||||
;; There are two ways to load a theme. Both assume the theme is installed and
|
;; There are two ways to load a theme. Both assume the theme is installed and
|
||||||
;; available. You can either set `doom-theme' or manually load a theme with the
|
;; available. You can either set `doom-theme' or manually load a theme with the
|
||||||
@@ -43,7 +44,11 @@
|
|||||||
(setq org-directory "~/org/")
|
(setq org-directory "~/org/")
|
||||||
(after! org
|
(after! org
|
||||||
(setq org-agenda-span 'week
|
(setq org-agenda-span 'week
|
||||||
org-agenda-files `(,org-directory ,(concat org-directory "roam/"))
|
my-agenda-dirs '("projects" "roam")
|
||||||
|
org-agenda-files (cons org-directory (mapcan (lambda (x) (directory-files-recursively
|
||||||
|
(expand-file-name x org-directory)
|
||||||
|
"\.org$"))
|
||||||
|
my-agenda-dirs))
|
||||||
org-log-done 'time
|
org-log-done 'time
|
||||||
org-agenda-custom-commands '(("n" "Agenda"
|
org-agenda-custom-commands '(("n" "Agenda"
|
||||||
((agenda "")
|
((agenda "")
|
||||||
|
|||||||
@@ -149,7 +149,7 @@
|
|||||||
;;lua ; one-based indices? one-based indices
|
;;lua ; one-based indices? one-based indices
|
||||||
markdown ; writing docs for people to ignore
|
markdown ; writing docs for people to ignore
|
||||||
;;nim ; python + lisp at the speed of c
|
;;nim ; python + lisp at the speed of c
|
||||||
(nix +tree-sitter +lsp) ; I hereby declare "nix geht mehr!"
|
(nix +tree-sitter) ; I hereby declare "nix geht mehr!"
|
||||||
;;ocaml ; an objective camel
|
;;ocaml ; an objective camel
|
||||||
(org +roam2) ; organize your plain life in plain text
|
(org +roam2) ; organize your plain life in plain text
|
||||||
;;php ; perl's insecure younger brother
|
;;php ; perl's insecure younger brother
|
||||||
|
|||||||
@@ -1,94 +0,0 @@
|
|||||||
{ inputs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./hyprpaper.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
wayland.windowManager.hyprland = {
|
|
||||||
enable = true;
|
|
||||||
plugins = [ inputs.hy3.packages.x86_64-linux.hy3 ];
|
|
||||||
settings = {
|
|
||||||
"$mod" = "SUPER";
|
|
||||||
"$terminal" = "kitty";
|
|
||||||
"$fileManager" = "dolphin";
|
|
||||||
"$menu" = "wofi --show drun";
|
|
||||||
|
|
||||||
exec-once = [
|
|
||||||
"waybar"
|
|
||||||
"dunst"
|
|
||||||
];
|
|
||||||
|
|
||||||
xwayland = {
|
|
||||||
force_zero_scaling = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
input = {
|
|
||||||
kb_layout = "us";
|
|
||||||
kb_options = "caps:escape";
|
|
||||||
follow_mouse = 1;
|
|
||||||
touchpad.natural_scroll = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
windowrulev2 = [
|
|
||||||
# I can guess, but I should figure out what this actually does
|
|
||||||
"suppressevent maximize, class:.*"
|
|
||||||
];
|
|
||||||
|
|
||||||
general.layout = "hy3";
|
|
||||||
|
|
||||||
bind =
|
|
||||||
[
|
|
||||||
"SHIFT_$mod, Q, killactive"
|
|
||||||
"SHIFT_$mod, M, exit"
|
|
||||||
|
|
||||||
"$mod, D, exec, $menu"
|
|
||||||
"$mod, Return, exec, $terminal"
|
|
||||||
|
|
||||||
"$mod, H, hy3:movefocus, l"
|
|
||||||
"$mod, L, hy3:movefocus, r"
|
|
||||||
"$mod, K, hy3:movefocus, u"
|
|
||||||
"$mod, J, hy3:movefocus, d"
|
|
||||||
|
|
||||||
"SHIFT_$mod, H, hy3:movewindow, l"
|
|
||||||
"SHIFT_$mod, L, hy3:movewindow, r"
|
|
||||||
"SHIFT_$mod, K, hy3:movewindow, u"
|
|
||||||
"SHIFT_$mod, J, hy3:movewindow, d"
|
|
||||||
|
|
||||||
"$mod, V, hy3:makegroup, opposite"
|
|
||||||
"$mod, W, hy3:changegroup, toggletab"
|
|
||||||
|
|
||||||
"$mod, A, hy3:changefocus, raise"
|
|
||||||
"SHIFT_$mod, A, hy3:changefocus, lower"
|
|
||||||
|
|
||||||
"$mod, M, fullscreen, 0"
|
|
||||||
"$mod, E, hy3:expand, expand"
|
|
||||||
"SHIFT_$mod, E, hy3:expand, base"
|
|
||||||
|
|
||||||
"$mod, Q, hy3:warpcursor"
|
|
||||||
]
|
|
||||||
++ (
|
|
||||||
# workspaces
|
|
||||||
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
|
|
||||||
builtins.concatLists (builtins.genList (
|
|
||||||
x: let
|
|
||||||
ws = let
|
|
||||||
c = (x + 1) / 10;
|
|
||||||
in
|
|
||||||
builtins.toString (x + 1 - (c * 10));
|
|
||||||
in [
|
|
||||||
"$mod, ${ws}, workspace, ${toString (x + 1)}"
|
|
||||||
"$mod SHIFT, ${ws}, hy3:movetoworkspace, ${toString (x + 1)}"
|
|
||||||
]
|
|
||||||
)
|
|
||||||
10)
|
|
||||||
);
|
|
||||||
|
|
||||||
bindm =
|
|
||||||
[
|
|
||||||
"$mod, mouse:272, movewindow"
|
|
||||||
"$mod, mouse:273, resizewindow"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
services.hyprpaper = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
ipc = "on";
|
|
||||||
splash = false;
|
|
||||||
preload = [
|
|
||||||
"${config.xdg.dataHome}/wallpaper.jpg"
|
|
||||||
];
|
|
||||||
wallpaper = [
|
|
||||||
",${config.xdg.dataHome}/wallpaper.jpg"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
xdg.dataFile."wallpaper.jpg" = {
|
|
||||||
source = ./wallpaper.jpg;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
wayland.windowManager.hyprland.settings.monitor = ",preferred,2880x1800@90.00Hz,1.33333";
|
|
||||||
}
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 842 KiB |
@@ -1,16 +0,0 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
wayland.windowManager.hyprland.settings.monitor = "DP-1,3440x1440@164.90,0x0,1.33333,vrr,1";
|
|
||||||
wayland.windowManager.hyprland.settings.env = [
|
|
||||||
"LIBVA_DRIVER_NAME,nvidia"
|
|
||||||
"XDG_SESSION_TYPE,wayland"
|
|
||||||
"GBM_BACKEND,nvidia-drm"
|
|
||||||
"__GLX_VENDOR_LIBRARY_NAME,nvidia"
|
|
||||||
"NVD_BACKEND,direct"
|
|
||||||
"ELECTRON_OZONE_PLATFORM_HINT,auto"
|
|
||||||
"NIXOS_OZONE_WL,1"
|
|
||||||
];
|
|
||||||
|
|
||||||
wayland.windowManager.hyprland.settings.cursor.no_hardware_cursors = true;
|
|
||||||
}
|
|
||||||
@@ -6,13 +6,13 @@ let
|
|||||||
cfg = config.home.i3_sway;
|
cfg = config.home.i3_sway;
|
||||||
i3_cfg = config.xsession.windowManager.i3.config;
|
i3_cfg = config.xsession.windowManager.i3.config;
|
||||||
|
|
||||||
shared_config = recursiveUpdate {
|
shared_config = recursiveUpdate rec {
|
||||||
modifier = "Mod4";
|
modifier = "Mod4";
|
||||||
terminal = "kitty";
|
terminal = "kitty";
|
||||||
defaultWorkspace = "workspace number 1";
|
defaultWorkspace = "workspace number 1";
|
||||||
|
|
||||||
keybindings = {
|
keybindings = {
|
||||||
"${shared_config.modifier}+Return" = "exec ${i3_cfg.terminal}";
|
"${shared_config.modifier}+Return" = "exec ${terminal}";
|
||||||
"${shared_config.modifier}+Shift+q" = "kill";
|
"${shared_config.modifier}+Shift+q" = "kill";
|
||||||
"${shared_config.modifier}+d" = "exec ${i3_cfg.menu}";
|
"${shared_config.modifier}+d" = "exec ${i3_cfg.menu}";
|
||||||
|
|
||||||
@@ -129,6 +129,13 @@ in {
|
|||||||
"type:keyboard" = {
|
"type:keyboard" = {
|
||||||
xkb_options = "caps:escape";
|
xkb_options = "caps:escape";
|
||||||
};
|
};
|
||||||
|
"type:touchpad" = {
|
||||||
|
tap = "enabled";
|
||||||
|
tap_button_map = "lrm";
|
||||||
|
drag = "enabled";
|
||||||
|
natural_scroll = "disabled";
|
||||||
|
dwt = "enabled";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
home.packages = [
|
|
||||||
pkgs.gamescope
|
|
||||||
pkgs.lutris
|
|
||||||
pkgs.mangohud
|
|
||||||
];
|
|
||||||
}
|
|
||||||
127
home/modules/plasma-manager/default.nix
Normal file
127
home/modules/plasma-manager/default.nix
Normal file
@@ -0,0 +1,127 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
|
||||||
|
# The current KDE config can be output with the command:
|
||||||
|
# nix run github:nix-community/plasma-manager
|
||||||
|
#
|
||||||
|
# Plasma-manager options documentation
|
||||||
|
# https://nix-community.github.io/plasma-manager/options.xhtml
|
||||||
|
#
|
||||||
|
# TODO: (ambitious) Add Kmail support to plasma-manager
|
||||||
|
{
|
||||||
|
programs.plasma = {
|
||||||
|
enable = true;
|
||||||
|
overrideConfig = true;
|
||||||
|
|
||||||
|
hotkeys.commands."launch-konsole" = {
|
||||||
|
name = "Launch Konsole";
|
||||||
|
key = "Meta+Return";
|
||||||
|
command = "konsole";
|
||||||
|
};
|
||||||
|
|
||||||
|
shortcuts = {
|
||||||
|
kmix = {
|
||||||
|
"decrease_microphone_volume" = "Microphone Volume Down";
|
||||||
|
"decrease_volume" = "Volume Down";
|
||||||
|
"decrease_volume_small" = "Shift+Volume Down";
|
||||||
|
"increase_microphone_volume" = "Microphone Volume Up";
|
||||||
|
"increase_volume" = "Volume Up";
|
||||||
|
"increase_volume_small" = "Shift+Volume Up";
|
||||||
|
"mic_mute" = ["Microphone Mute" "Meta+Volume Mute,Microphone Mute" "Meta+Volume Mute,Mute Microphone"];
|
||||||
|
"mute" = "Volume Mute";
|
||||||
|
};
|
||||||
|
|
||||||
|
mediacontrol = {
|
||||||
|
"mediavolumedown" = "none,,Media volume down";
|
||||||
|
"mediavolumeup" = "none,,Media volume up";
|
||||||
|
"nextmedia" = "Media Next";
|
||||||
|
"pausemedia" = "Media Pause";
|
||||||
|
"playmedia" = "none,,Play media playback";
|
||||||
|
"playpausemedia" = "Media Play";
|
||||||
|
"previousmedia" = "Media Previous";
|
||||||
|
"stopmedia" = "Media Stop";
|
||||||
|
};
|
||||||
|
|
||||||
|
ksmserver = {
|
||||||
|
"Lock Session" = ["Meta+Ctrl+Q" "Screensaver" "Screensaver,Lock Session"];
|
||||||
|
};
|
||||||
|
|
||||||
|
kwin = {
|
||||||
|
"Window Close" = "Meta+Shift+Q";
|
||||||
|
"Kill Window" = "Meta+Ctrl+Esc";
|
||||||
|
"Window Operations Menu" = "Alt+F3";
|
||||||
|
"Window Resize" = "Meta+R,,Resize Window";
|
||||||
|
|
||||||
|
"Overview" = "Meta+W";
|
||||||
|
"Grid View" = "Meta+G";
|
||||||
|
"Edit Tiles" = "Meta+T";
|
||||||
|
|
||||||
|
"Activate Window Demanding Attention" = "Meta+Ctrl+A";
|
||||||
|
|
||||||
|
"Show Desktop" = "Meta+D";
|
||||||
|
|
||||||
|
"Walk Through Windows" = "Alt+Tab";
|
||||||
|
"Walk Through Windows (Reverse)" = "Alt+Shift+Tab";
|
||||||
|
"Walk Through Windows of Current Application" = "Alt+`";
|
||||||
|
"Walk Through Windows of Current Application (Reverse)" = "Alt+~";
|
||||||
|
"Window Fullscreen" = "Meta+Shift+F,,Make Window Fullscreen";
|
||||||
|
|
||||||
|
"Window Quick Tile Bottom" = "Meta+Down";
|
||||||
|
"Window Quick Tile Left" = "Meta+Left";
|
||||||
|
"Window Quick Tile Right" = "Meta+Right";
|
||||||
|
"Window Quick Tile Top" = "Meta+Up";
|
||||||
|
|
||||||
|
"view_actual_size" = "Meta+0";
|
||||||
|
"view_zoom_in" = ["Meta++" "Meta+=,Meta++" "Meta+=,Zoom In"];
|
||||||
|
"view_zoom_out" = "Meta+-";
|
||||||
|
};
|
||||||
|
"org_kde_powerdevil"."Decrease Keyboard Brightness" = "Keyboard Brightness Down";
|
||||||
|
"org_kde_powerdevil"."Decrease Screen Brightness" = "Monitor Brightness Down";
|
||||||
|
"org_kde_powerdevil"."Decrease Screen Brightness Small" = "Shift+Monitor Brightness Down";
|
||||||
|
"org_kde_powerdevil"."Hibernate" = "Hibernate";
|
||||||
|
"org_kde_powerdevil"."Increase Keyboard Brightness" = "Keyboard Brightness Up";
|
||||||
|
"org_kde_powerdevil"."Increase Screen Brightness" = "Monitor Brightness Up";
|
||||||
|
"org_kde_powerdevil"."Increase Screen Brightness Small" = "Shift+Monitor Brightness Up";
|
||||||
|
"org_kde_powerdevil"."PowerDown" = "Power Down";
|
||||||
|
"org_kde_powerdevil"."PowerOff" = "Power Off";
|
||||||
|
"org_kde_powerdevil"."Sleep" = "Sleep";
|
||||||
|
"org_kde_powerdevil"."Toggle Keyboard Backlight" = "Keyboard Light On/Off";
|
||||||
|
"org_kde_powerdevil"."Turn Off Screen" = [ ];
|
||||||
|
"org_kde_powerdevil"."powerProfile" = ["Battery" "Meta+B,Battery" "Meta+B,Switch Power Profile"];
|
||||||
|
|
||||||
|
plasmashell = {
|
||||||
|
"activate application launcher" = ["Meta" "Alt+F1,Meta" "Alt+F1,Activate Application Launcher"];
|
||||||
|
"activate task manager entry 1" = "none,,";
|
||||||
|
"activate task manager entry 2" = "none,,";
|
||||||
|
"activate task manager entry 3" = "none,,";
|
||||||
|
"activate task manager entry 4" = "none,,";
|
||||||
|
"activate task manager entry 5" = "none,,";
|
||||||
|
"activate task manager entry 6" = "none,,";
|
||||||
|
"activate task manager entry 7" = "none,,";
|
||||||
|
"activate task manager entry 8" = "none,,";
|
||||||
|
"activate task manager entry 9" = "none,,";
|
||||||
|
"activate task manager entry 10" = "none,,";
|
||||||
|
"show activity switcher" = "none,,";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
configFile = {
|
||||||
|
kwinrc.Desktops.Number = {
|
||||||
|
value = 10;
|
||||||
|
immutable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
kcminputrc.Libinput = {
|
||||||
|
AccelerationProfile = "adaptive";
|
||||||
|
PointerAcceleration = 0.5;
|
||||||
|
};
|
||||||
|
|
||||||
|
kcminputrc.Mouse = {
|
||||||
|
X11LibInputXAccelProfileFlat = false;
|
||||||
|
XLbInptAccelProfileFlat = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
kdeglobals.KDE.LookAndFeelPackage = "org.kde.breezedark.desktop";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
52
home/modules/tmux/default.nix
Normal file
52
home/modules/tmux/default.nix
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
tokyo-night = pkgs.tmuxPlugins.mkTmuxPlugin {
|
||||||
|
pluginName = "tokyo-night";
|
||||||
|
rtpFilePath = "tokyo-night.tmux";
|
||||||
|
version = "1.6.1";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "janoamaral";
|
||||||
|
repo = "tokyo-night-tmux";
|
||||||
|
rev = "d610ced20d5f602a7995854931440e4a1e0ab780";
|
||||||
|
sha256 = "sha256-17vEgkL7C51p/l5gpT9dkOy0bY9n8l0/LV51mR1k+V8=";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
programs.tmux.enable = true;
|
||||||
|
programs.tmux.terminal = "tmux-direct";
|
||||||
|
programs.tmux.keyMode = "vi";
|
||||||
|
programs.tmux.escapeTime = 0;
|
||||||
|
programs.tmux.mouse = true;
|
||||||
|
programs.tmux.newSession = true;
|
||||||
|
programs.tmux.historyLimit = 50000;
|
||||||
|
programs.tmux.clock24 = true;
|
||||||
|
programs.tmux.baseIndex = 1;
|
||||||
|
programs.tmux.prefix = "M-\\\\";
|
||||||
|
|
||||||
|
programs.tmux.plugins = with pkgs; [
|
||||||
|
tmuxPlugins.cpu
|
||||||
|
tmuxPlugins.battery
|
||||||
|
tmuxPlugins.better-mouse-mode
|
||||||
|
tmuxPlugins.net-speed
|
||||||
|
tmuxPlugins.online-status
|
||||||
|
tmuxPlugins.pain-control
|
||||||
|
tmuxPlugins.tilish
|
||||||
|
tmuxPlugins.yank
|
||||||
|
|
||||||
|
{
|
||||||
|
plugin = tmuxPlugins.resurrect;
|
||||||
|
extraConfig = "set -g @resurrect-strategy-nvim 'session'";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
plugin = tmuxPlugins.continuum;
|
||||||
|
extraConfig = ''
|
||||||
|
set -g @continuum-restore 'on'
|
||||||
|
set -g @continuum-save-interval '15' # minutes
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
|
||||||
|
tokyo-night
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -17,8 +17,9 @@ with lib;
|
|||||||
kodi = {
|
kodi = {
|
||||||
enable = true;
|
enable = true;
|
||||||
autologin = true;
|
autologin = true;
|
||||||
wayland = false;
|
wayland = true;
|
||||||
};
|
};
|
||||||
|
users.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Use the systemd-boot EFI boot loader.
|
# Use the systemd-boot EFI boot loader.
|
||||||
@@ -29,7 +30,7 @@ with lib;
|
|||||||
|
|
||||||
hardware.graphics.enable = true;
|
hardware.graphics.enable = true;
|
||||||
|
|
||||||
#services.displayManager.enable = mkForce false;
|
services.displayManager.enable = mkForce false;
|
||||||
|
|
||||||
# This option defines the first version of NixOS you have installed on this particular machine,
|
# This option defines the first version of NixOS you have installed on this particular machine,
|
||||||
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
|
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
|
||||||
|
|||||||
@@ -12,9 +12,16 @@
|
|||||||
roles = {
|
roles = {
|
||||||
audio.enable = true;
|
audio.enable = true;
|
||||||
bluetooth.enable = true;
|
bluetooth.enable = true;
|
||||||
desktop.enable = true;
|
desktop = {
|
||||||
|
enable = true;
|
||||||
|
wayland = true;
|
||||||
|
gaming = true;
|
||||||
|
kde = true;
|
||||||
|
sddm = true;
|
||||||
|
};
|
||||||
nfs-mounts.enable = true;
|
nfs-mounts.enable = true;
|
||||||
printing.enable = true;
|
printing.enable = true;
|
||||||
|
spotifyd.enable = true;
|
||||||
users = {
|
users = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraGroups = [ "video" ];
|
extraGroups = [ "video" ];
|
||||||
|
|||||||
@@ -29,6 +29,7 @@
|
|||||||
swapDevices =
|
swapDevices =
|
||||||
[ { device = "/dev/disk/by-uuid/ec1f70ea-27b6-4646-ad3b-eac41bd83e3e"; }
|
[ { device = "/dev/disk/by-uuid/ec1f70ea-27b6-4646-ad3b-eac41bd83e3e"; }
|
||||||
];
|
];
|
||||||
|
zramSwap.enable = true;
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# 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
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
|||||||
60
machines/wixos/configuration.nix
Normal file
60
machines/wixos/configuration.nix
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
# Edit this configuration file to define what should be installed on
|
||||||
|
# your system. Help is available in the configuration.nix(5) man page, on
|
||||||
|
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
||||||
|
|
||||||
|
# NixOS-WSL specific options are documented on the NixOS-WSL repository:
|
||||||
|
# https://github.com/nix-community/NixOS-WSL
|
||||||
|
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
];
|
||||||
|
|
||||||
|
roles = {
|
||||||
|
desktop = {
|
||||||
|
enable = true;
|
||||||
|
wayland = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.hostName = "wixos";
|
||||||
|
|
||||||
|
wsl.enable = true;
|
||||||
|
wsl.defaultUser = "johno";
|
||||||
|
wsl.startMenuLaunchers = true;
|
||||||
|
wsl.useWindowsDriver = true;
|
||||||
|
wsl.wslConf.network.hostname = "wixos";
|
||||||
|
wsl.wslConf.user.default = "johno";
|
||||||
|
|
||||||
|
services.xserver.videoDrivers = [ "nvidia" ];
|
||||||
|
hardware.graphics = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
mesa.drivers
|
||||||
|
libvdpau-va-gl
|
||||||
|
vaapiVdpau
|
||||||
|
];
|
||||||
|
};
|
||||||
|
environment.sessionVariables = {
|
||||||
|
LD_LIBRARY_PATH = [
|
||||||
|
"/usr/lib/wsl/lib"
|
||||||
|
"/run/opengl-driver/lib"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
hardware.nvidia = {
|
||||||
|
modesetting.enable = true;
|
||||||
|
nvidiaSettings = true;
|
||||||
|
open = true;
|
||||||
|
package = config.boot.kernelPackages.nvidiaPackages.latest;
|
||||||
|
};
|
||||||
|
|
||||||
|
# This value determines the NixOS release from which the default
|
||||||
|
# settings for stateful data, like file locations and database versions
|
||||||
|
# on your system were taken. It's perfectly fine and recommended to leave
|
||||||
|
# this value at the release version of the first install of this system.
|
||||||
|
# Before changing this value read the documentation for this option
|
||||||
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||||
|
system.stateVersion = "24.05"; # Did you read the comment?
|
||||||
|
}
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
# Edit this configuration file to define what should be installed on
|
|
||||||
# your system. 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
|
|
||||||
];
|
|
||||||
|
|
||||||
roles = {
|
|
||||||
audio.enable = true;
|
|
||||||
desktop = {
|
|
||||||
enable = true;
|
|
||||||
x11Only = true;
|
|
||||||
};
|
|
||||||
kodi.enable = true;
|
|
||||||
nfs-mounts.enable = true;
|
|
||||||
printing.enable = true;
|
|
||||||
spotifyd.enable = true;
|
|
||||||
users = {
|
|
||||||
enable = true;
|
|
||||||
extraGroups = [ "input" "libvirtd" ];
|
|
||||||
kids = true;
|
|
||||||
};
|
|
||||||
virtualisation.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Use the systemd-boot EFI boot loader.
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
|
||||||
boot.loader.grub.useOSProber = true;
|
|
||||||
|
|
||||||
networking = {
|
|
||||||
hostName = "z790prors-nix"; # Define your hostname.
|
|
||||||
domain = "oglehome";
|
|
||||||
defaultGateway = "10.0.0.1";
|
|
||||||
nameservers = [ "10.0.0.1" ];
|
|
||||||
|
|
||||||
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
|
|
||||||
# Per-interface useDHCP will be mandatory in the future, so this generated config
|
|
||||||
# replicates the default behaviour.
|
|
||||||
useDHCP = false;
|
|
||||||
|
|
||||||
interfaces.enp3s0.ipv4.addresses = [{
|
|
||||||
address = "10.0.0.37";
|
|
||||||
prefixLength = 24;
|
|
||||||
}];
|
|
||||||
};
|
|
||||||
|
|
||||||
# TODO: Figure out something with this
|
|
||||||
nix.settings.secret-key-files = /root/cache-priv-key.pem;
|
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
|
||||||
# settings for stateful data, like file locations and database versions
|
|
||||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
|
||||||
# this value at the release version of the first install of this system.
|
|
||||||
# Before changing this value read the documentation for this option
|
|
||||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
|
||||||
system.stateVersion = "21.11"; # Did you read the comment?
|
|
||||||
}
|
|
||||||
@@ -1,53 +0,0 @@
|
|||||||
# 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, modulesPath, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports =
|
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
|
||||||
];
|
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
|
||||||
boot.initrd.kernelModules = [
|
|
||||||
"nvidia"
|
|
||||||
"nvidia_modeset"
|
|
||||||
"nvidia_uvm"
|
|
||||||
"nvidia_drm"
|
|
||||||
];
|
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
|
||||||
boot.extraModulePackages = [ ];
|
|
||||||
|
|
||||||
hardware.graphics.enable = true;
|
|
||||||
services.xserver.videoDrivers = ["nvidia"];
|
|
||||||
services.xserver.screenSection = ''Option "metamodes" "3440x1440_165 +0+0"'';
|
|
||||||
services.xserver.enableTearFree = true;
|
|
||||||
hardware.nvidia = {
|
|
||||||
modesetting.enable = true;
|
|
||||||
powerManagement.enable = false;
|
|
||||||
powerManagement.finegrained = false;
|
|
||||||
open = false;
|
|
||||||
nvidiaSettings = true;
|
|
||||||
package = config.boot.kernelPackages.nvidiaPackages.production;
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/" =
|
|
||||||
{ device = "/dev/disk/by-uuid/8d996d13-6d55-4524-83a2-6f6fb47a09ea";
|
|
||||||
fsType = "btrfs";
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/boot" =
|
|
||||||
{ device = "/dev/disk/by-uuid/7445-C336";
|
|
||||||
fsType = "vfat";
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/arch" =
|
|
||||||
{ device = "/dev/disk/by-label/endeavouros";
|
|
||||||
fsType = "btrfs";
|
|
||||||
};
|
|
||||||
|
|
||||||
swapDevices = [ ];
|
|
||||||
|
|
||||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
|
||||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
}
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
nextcloudTalkDesktop = pkgs.callPackage ./nextcloud-talk-desktop {};
|
vulkanHDRLayer = pkgs.callPackage ./vulkan-hdr-layer {};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,79 +0,0 @@
|
|||||||
{ lib
|
|
||||||
, stdenv
|
|
||||||
, fetchzip
|
|
||||||
, autoPatchelfHook
|
|
||||||
|
|
||||||
, nss
|
|
||||||
, cairo
|
|
||||||
, xorg
|
|
||||||
, libxkbcommon
|
|
||||||
, alsa-lib
|
|
||||||
, at-spi2-core
|
|
||||||
, mesa
|
|
||||||
, pango
|
|
||||||
, libdrm
|
|
||||||
, vivaldi-ffmpeg-codecs
|
|
||||||
, gtk3
|
|
||||||
, libGL
|
|
||||||
, libglvnd
|
|
||||||
, systemd
|
|
||||||
}:
|
|
||||||
|
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
|
||||||
pname = "nextcloud-talk-desktop";
|
|
||||||
version = "0.29.0";
|
|
||||||
|
|
||||||
# Building from source would require building also building Server and Talk components
|
|
||||||
# See https://github.com/nextcloud/talk-desktop?tab=readme-ov-file#%EF%B8%8F-prerequisites
|
|
||||||
src = fetchzip {
|
|
||||||
url = "https://github.com/nextcloud-releases/talk-desktop/releases/download/v${finalAttrs.version}/Nextcloud.Talk-linux-x64-${finalAttrs.version}.zip";
|
|
||||||
hash = "sha256-fBIeNv8tfrVTFExLQDBPhIazvbsJ7a76+W9G0cuQDlw=";
|
|
||||||
stripRoot = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
nativeBuildInputs = [ autoPatchelfHook ];
|
|
||||||
|
|
||||||
buildInputs = [
|
|
||||||
nss
|
|
||||||
cairo
|
|
||||||
alsa-lib
|
|
||||||
at-spi2-core
|
|
||||||
pango
|
|
||||||
libdrm
|
|
||||||
libxkbcommon
|
|
||||||
gtk3
|
|
||||||
vivaldi-ffmpeg-codecs
|
|
||||||
mesa
|
|
||||||
libGL
|
|
||||||
libglvnd
|
|
||||||
] ++ (with xorg; [libX11 libXcomposite libXdamage libXrandr libXfixes libXcursor]);
|
|
||||||
|
|
||||||
# Required to launch the application and proceed past the zygote_linux fork() process
|
|
||||||
# Fixes `Zygote could not fork`
|
|
||||||
runtimeDependencies = [ systemd ];
|
|
||||||
|
|
||||||
preInstall = ''
|
|
||||||
mkdir -p $out/bin
|
|
||||||
mkdir -p $out/opt
|
|
||||||
|
|
||||||
cp -r $src/* $out/opt/
|
|
||||||
'';
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
runHook preInstall
|
|
||||||
|
|
||||||
# Link the application in $out/bin away from contents of `preInstall`
|
|
||||||
ln -s "$out/opt/Nextcloud Talk-linux-x64/Nextcloud Talk" $out/bin/${finalAttrs.pname}
|
|
||||||
|
|
||||||
runHook postInstall
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "Nextcloud Talk Desktop Client Preview";
|
|
||||||
homepage = "https://github.com/nextcloud/talk-desktop";
|
|
||||||
changelog = "https://github.com/nextcloud/talk-desktop/blob/${finalAttrs.version}/CHANGELOG.md";
|
|
||||||
license = licenses.agpl3Only;
|
|
||||||
maintainers = with maintainers; [ kashw2 ];
|
|
||||||
mainProgram = finalAttrs.pname;
|
|
||||||
};
|
|
||||||
})
|
|
||||||
34
packages/vulkan-hdr-layer/default.nix
Normal file
34
packages/vulkan-hdr-layer/default.nix
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
{ lib, stdenv, fetchFromGitHub, meson, pkg-config, vulkan-loader, ninja, writeText, vulkan-headers, vulkan-utility-libraries, jq, libX11, libXrandr, libxcb, wayland, wayland-scanner }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "vulkan-hdr-layer";
|
||||||
|
version = "63d2eec";
|
||||||
|
|
||||||
|
src = (fetchFromGitHub {
|
||||||
|
owner = "Zamundaaa";
|
||||||
|
repo = "VK_hdr_layer";
|
||||||
|
rev = "869199cd2746e7f69cf19955153080842b6dacfc";
|
||||||
|
fetchSubmodules = true;
|
||||||
|
hash = "sha256-xfVYI+Aajmnf3BTaY2Ysg5fyDO6SwDFGyU0L+F+E3is=";
|
||||||
|
}).overrideAttrs (_: {
|
||||||
|
GIT_CONFIG_COUNT = 1;
|
||||||
|
GIT_CONFIG_KEY_0 = "url.https://github.com/.insteadOf";
|
||||||
|
GIT_CONFIG_VALUE_0 = "git@github.com:";
|
||||||
|
});
|
||||||
|
|
||||||
|
nativeBuildInputs = [ vulkan-headers meson ninja pkg-config jq ];
|
||||||
|
|
||||||
|
buildInputs = [ vulkan-headers vulkan-loader vulkan-utility-libraries libX11 libXrandr libxcb wayland wayland-scanner ];
|
||||||
|
|
||||||
|
# Help vulkan-loader find the validation layers
|
||||||
|
setupHook = writeText "setup-hook" ''
|
||||||
|
addToSearchPath XDG_DATA_DIRS @out@/share
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Layers providing Vulkan HDR";
|
||||||
|
homepage = "https://github.com/Zamundaaa/VK_hdr_layer";
|
||||||
|
platforms = platforms.linux;
|
||||||
|
license = licenses.mit;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -22,11 +22,13 @@ in
|
|||||||
enable = true;
|
enable = true;
|
||||||
pulse.enable = true;
|
pulse.enable = true;
|
||||||
};
|
};
|
||||||
hardware.pulseaudio.package = pkgs.pulseaudioFull;
|
services.pulseaudio = {
|
||||||
hardware.pulseaudio.extraConfig = "
|
package = pkgs.pulseaudioFull;
|
||||||
load-module module-combine-sink
|
extraConfig = ''
|
||||||
load-module module-switch-on-connect
|
load-module module-combine-sink
|
||||||
";
|
load-module module-switch-on-connect
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let
|
|
||||||
cfg = config.roles;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./audio
|
./audio
|
||||||
@@ -19,10 +16,6 @@ in
|
|||||||
./virtualisation
|
./virtualisation
|
||||||
];
|
];
|
||||||
|
|
||||||
options.roles = {
|
|
||||||
enable = mkEnableOption "Enable roles";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
i18n.extraLocaleSettings = {
|
i18n.extraLocaleSettings = {
|
||||||
@@ -38,37 +31,56 @@ in
|
|||||||
};
|
};
|
||||||
time.timeZone = "America/Los_Angeles";
|
time.timeZone = "America/Los_Angeles";
|
||||||
|
|
||||||
|
services.xserver.xkb = {
|
||||||
|
layout = "us";
|
||||||
|
variant = "";
|
||||||
|
options = "caps:escape";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Don't go to emergency mode if we aren't able to mount filesystems.
|
||||||
|
# This is silly if you have multiple hard drives or partitions
|
||||||
|
# configured on a machine and then one goes away intentionally or
|
||||||
|
# unintentionally. If the system is already booting, let it continue
|
||||||
|
# to try and boot.
|
||||||
|
systemd.enableEmergencyMode = false;
|
||||||
|
|
||||||
# Enable the OpenSSH daemon.
|
# Enable the OpenSSH daemon.
|
||||||
services.openssh.enable = true;
|
services.openssh.enable = true;
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
|
||||||
git
|
git
|
||||||
|
glances
|
||||||
|
pciutils
|
||||||
|
tree
|
||||||
|
usbutils
|
||||||
|
vim
|
||||||
];
|
];
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
package = pkgs.nixFlakes;
|
package = pkgs.nix;
|
||||||
distributedBuilds = true;
|
# distributedBuilds = true;
|
||||||
buildMachines = [{
|
# buildMachines = [{
|
||||||
hostName = "z790prors.oglehome";
|
# hostName = "z790prors.oglehome";
|
||||||
system = "x86_64-linux";
|
# system = "x86_64-linux";
|
||||||
protocol = "ssh-ng";
|
# protocol = "ssh-ng";
|
||||||
sshUser = "johno";
|
# sshUser = "johno";
|
||||||
sshKey = "/root/.ssh/id_ed25519";
|
# sshKey = "/root/.ssh/id_ed25519";
|
||||||
maxJobs = 3;
|
# maxJobs = 3;
|
||||||
speedFactor = 2;
|
# speedFactor = 2;
|
||||||
}];
|
# }];
|
||||||
settings = {
|
settings = {
|
||||||
experimental-features = [ "nix-command" "flakes" ];
|
experimental-features = [ "nix-command" "flakes" ];
|
||||||
max-jobs = "auto";
|
max-jobs = "auto";
|
||||||
trusted-users = [ "johno" ];
|
trusted-users = [ "johno" ];
|
||||||
substituters = [
|
substituters = [
|
||||||
"https://hyprland.cachix.org"
|
|
||||||
];
|
|
||||||
trusted-public-keys = [
|
|
||||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
gc = {
|
||||||
|
automatic = true;
|
||||||
|
randomizedDelaySec = "14m";
|
||||||
|
options = "--delete-older-than 10d";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|||||||
@@ -4,101 +4,33 @@ with lib;
|
|||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.roles.desktop;
|
cfg = config.roles.desktop;
|
||||||
|
|
||||||
basePackages = with pkgs; [
|
|
||||||
brightnessctl
|
|
||||||
];
|
|
||||||
|
|
||||||
x11BasePackages = with pkgs; [
|
|
||||||
|
|
||||||
];
|
|
||||||
|
|
||||||
x11OnlyPackages = with pkgs; [
|
|
||||||
emacs
|
|
||||||
];
|
|
||||||
|
|
||||||
waylandBasePackages = with pkgs; [
|
|
||||||
grim
|
|
||||||
slurp
|
|
||||||
wl-clipboard
|
|
||||||
mako
|
|
||||||
];
|
|
||||||
|
|
||||||
waylandOnlyPackages = with pkgs; [
|
|
||||||
emacs-gtk
|
|
||||||
];
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.roles.desktop = {
|
options.roles.desktop = {
|
||||||
enable = mkEnableOption "Enable the desktop role";
|
enable = mkEnableOption "Enable the desktop role.";
|
||||||
x11Only = mkOption {
|
x11 = mkOption { type = types.bool; default = false; description = "Enable X11 support."; };
|
||||||
type = types.bool;
|
wayland = mkOption { type = types.bool; default = false; description = "Enable Wayland support."; };
|
||||||
default = false;
|
kde = mkOption { type = types.bool; default = false; description = "Enable KDE."; };
|
||||||
};
|
gaming = mkOption { type = types.bool; default = false; description = "Enable gaming support."; };
|
||||||
|
sddm = mkOption { type = types.bool; default = false; description = "Enable SDDM greeter."; };
|
||||||
};
|
};
|
||||||
|
|
||||||
config =
|
imports = [
|
||||||
{
|
./x11.nix
|
||||||
services.xserver.xkb = {
|
./wayland.nix
|
||||||
layout = "us";
|
./gaming.nix
|
||||||
variant = "";
|
./kde.nix
|
||||||
options = "caps:escape";
|
./sddm.nix
|
||||||
};
|
];
|
||||||
services.xserver.enable = true;
|
|
||||||
|
|
||||||
services.displayManager.sddm = {
|
config = mkIf cfg.enable {
|
||||||
enable = true;
|
environment.systemPackages = with pkgs; [
|
||||||
wayland.enable = !cfg.x11Only;
|
brightnessctl
|
||||||
};
|
emacs-nox
|
||||||
services.desktopManager.plasma6.enable = true;
|
];
|
||||||
|
|
||||||
services.xserver.windowManager.i3 = {
|
|
||||||
enable = true;
|
|
||||||
extraPackages = with pkgs; [
|
|
||||||
dmenu
|
|
||||||
i3status
|
|
||||||
i3lock
|
|
||||||
];
|
|
||||||
};
|
|
||||||
programs.dconf.enable = true;
|
|
||||||
services.gnome.gnome-keyring.enable = true;
|
|
||||||
|
|
||||||
programs.sway = mkIf (!cfg.x11Only) {
|
|
||||||
enable = true;
|
|
||||||
wrapperFeatures.gtk = true;
|
|
||||||
};
|
|
||||||
programs.light.enable = mkIf (!cfg.x11Only) true;
|
|
||||||
|
|
||||||
programs.kdeconnect.enable = true;
|
|
||||||
programs.java.enable = true;
|
|
||||||
programs.steam = {
|
|
||||||
enable = true;
|
|
||||||
remotePlay.openFirewall = true;
|
|
||||||
localNetworkGameTransfers.openFirewall = true;
|
|
||||||
#package = pkgs.steam.override {
|
|
||||||
#withJava = true;
|
|
||||||
#withPrimus = true;
|
|
||||||
#extraPkgs = pkgs: [ bumblebee glxinfo ];
|
|
||||||
#};
|
|
||||||
};
|
|
||||||
services.sunshine = {
|
|
||||||
enable = true;
|
|
||||||
autoStart = true;
|
|
||||||
capSysAdmin = true;
|
|
||||||
openFirewall = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
virtualisation.docker.enable = true;
|
|
||||||
users.extraGroups.docker.members = [ "johno" ];
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; mkMerge [
|
|
||||||
basePackages
|
|
||||||
x11BasePackages
|
|
||||||
(mkIf cfg.x11Only x11OnlyPackages)
|
|
||||||
# TODO: Do we need a "wayland only" mode?
|
|
||||||
(mkIf (!cfg.x11Only) waylandBasePackages)
|
|
||||||
(mkIf (!cfg.x11Only) waylandOnlyPackages)
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
|
programs.dconf.enable = true;
|
||||||
|
services.gnome.gnome-keyring.enable = true;
|
||||||
|
programs.kdeconnect.enable = true;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
17
roles/desktop/gaming.nix
Normal file
17
roles/desktop/gaming.nix
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{ lib, config, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.roles.desktop;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
config = mkIf (cfg.enable && cfg.gaming) {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
steam
|
||||||
|
lutris
|
||||||
|
];
|
||||||
|
|
||||||
|
# Possibly other gaming specific services or settings
|
||||||
|
};
|
||||||
|
}
|
||||||
12
roles/desktop/kde.nix
Normal file
12
roles/desktop/kde.nix
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.roles.desktop;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
config = mkIf (cfg.enable && cfg.kde) {
|
||||||
|
services.desktopManager.plasma6.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
16
roles/desktop/programs.nix
Normal file
16
roles/desktop/programs.nix
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{ lib, config, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
{
|
||||||
|
config = {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
brightnessctl
|
||||||
|
emacs-nox
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.dconf.enable = true;
|
||||||
|
services.gnome.gnome-keyring.enable = true;
|
||||||
|
programs.kdeconnect.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
15
roles/desktop/sddm.nix
Normal file
15
roles/desktop/sddm.nix
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
{ lib, config, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.roles.desktop;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
config = mkIf (cfg.enable && cfg.sddm) {
|
||||||
|
services.displayManager.sddm = {
|
||||||
|
enable = true;
|
||||||
|
wayland.enable = (!cfg.x11 && cfg.wayland);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
23
roles/desktop/wayland.nix
Normal file
23
roles/desktop/wayland.nix
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{ lib, config, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.roles.desktop;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
config = mkIf (cfg.enable && cfg.wayland) {
|
||||||
|
programs.sway = {
|
||||||
|
enable = true;
|
||||||
|
wrapperFeatures.gtk = true;
|
||||||
|
};
|
||||||
|
programs.light.enable = true;
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
grim
|
||||||
|
slurp
|
||||||
|
wl-clipboard
|
||||||
|
mako
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
19
roles/desktop/x11.nix
Normal file
19
roles/desktop/x11.nix
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
{ lib, config, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.roles.desktop;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
config = mkIf (cfg.enable && cfg.x11) {
|
||||||
|
services.xserver = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
windowManager.i3 = {
|
||||||
|
enable = true;
|
||||||
|
extraPackages = with pkgs; [ dmenu i3status i3lock ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -25,39 +25,47 @@ in
|
|||||||
steam-library
|
steam-library
|
||||||
youtube
|
youtube
|
||||||
]);
|
]);
|
||||||
in mkIf cfg.enable {
|
in mkIf cfg.enable
|
||||||
users.extraUsers.kodi.isNormalUser = true;
|
{
|
||||||
|
users.extraUsers.kodi.isNormalUser = true;
|
||||||
|
|
||||||
networking.firewall = {
|
networking.firewall = {
|
||||||
allowedTCPPorts = [ 8080 ];
|
allowedTCPPorts = [ 8080 ];
|
||||||
allowedUDPPorts = [ 8080 ];
|
allowedUDPPorts = [ 8080 ];
|
||||||
|
};
|
||||||
|
|
||||||
|
services = if cfg.autologin then mkMerge [
|
||||||
|
(mkIf cfg.wayland {
|
||||||
|
cage = mkIf cfg.wayland {
|
||||||
|
user = "kodi";
|
||||||
|
program = "${kodiPkg}/bin/kodi-standalone";
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
xserver = {
|
||||||
|
enable = false;
|
||||||
|
autorun = false;
|
||||||
|
};
|
||||||
|
})
|
||||||
|
|
||||||
|
(mkIf (!cfg.wayland) {
|
||||||
|
xserver = {
|
||||||
|
enable = true;
|
||||||
|
desktopManager.kodi = {
|
||||||
|
enable = true;
|
||||||
|
package = kodiPkg;
|
||||||
|
};
|
||||||
|
displayManager.lightdm = {
|
||||||
|
enable = true;
|
||||||
|
greeter.enable = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
displayManager = {
|
||||||
|
autoLogin.enable = true;
|
||||||
|
autoLogin.user = "kodi";
|
||||||
|
defaultSession = "kodi";
|
||||||
|
sessionData.autologinSession = "kodi";
|
||||||
|
};
|
||||||
|
})
|
||||||
|
] else {};
|
||||||
};
|
};
|
||||||
|
|
||||||
services = mkIf cfg.autologin {
|
|
||||||
cage = mkIf cfg.wayland {
|
|
||||||
user = "kodi";
|
|
||||||
program = "${kodiPkg}/bin/kodi-standalone";
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
xserver = mkIf (!cfg.wayland) {
|
|
||||||
enable = true;
|
|
||||||
desktopManager.kodi = {
|
|
||||||
enable = true;
|
|
||||||
package = kodiPkg;
|
|
||||||
};
|
|
||||||
displayManager.lightdm = {
|
|
||||||
enable = true;
|
|
||||||
greeter.enable = false;
|
|
||||||
};
|
|
||||||
displayManager.sddm.enable = mkForce false;
|
|
||||||
};
|
|
||||||
displayManager = mkIf (!cfg.wayland) {
|
|
||||||
autoLogin.enable = true;
|
|
||||||
autoLogin.user = "kodi";
|
|
||||||
defaultSession = "kodi";
|
|
||||||
sessionData.autologinSession = "kodi";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ in
|
|||||||
users.users.johno = {
|
users.users.johno = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "John Ogle";
|
description = "John Ogle";
|
||||||
extraGroups = [ "wheel" "networkmanager" "audio" ] ++ cfg.extraGroups;
|
extraGroups = [ "wheel" "networkmanager" "audio" "video" ] ++ cfg.extraGroups;
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.eli = mkIf cfg.kids {
|
users.users.eli = mkIf cfg.kids {
|
||||||
|
|||||||
@@ -14,5 +14,7 @@ in
|
|||||||
{
|
{
|
||||||
virtualisation.libvirtd.enable = true;
|
virtualisation.libvirtd.enable = true;
|
||||||
programs.virt-manager.enable = true;
|
programs.virt-manager.enable = true;
|
||||||
|
virtualisation.docker.enable = true;
|
||||||
|
users.extraGroups.docker.members = [ "johno" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user