Compare commits
77 Commits
9116e44dfe
...
kodi-updat
| Author | SHA1 | Date | |
|---|---|---|---|
| ecaa6dcb83 | |||
| 7729ff7434 | |||
| 52c110a505 | |||
| d5997575df | |||
| 57bc35101e | |||
| 6b09b1b0bc | |||
| 1851743a21 | |||
| c6d787f9f5 | |||
| f4a8f9d614 | |||
| 1e01d44f2f | |||
| 39dbe6644c | |||
| 870e1073dc | |||
| c1f132026a | |||
| 5650125d7e | |||
| 6536213bd0 | |||
| a0ce3b810e | |||
| abbcfebc97 | |||
| 495aba3fef | |||
| f9bcec74d3 | |||
| 97c4d7035c | |||
| 8abd331619 | |||
| aca0afa0dc | |||
| 1d0b3a0367 | |||
| 50f9defdd5 | |||
| 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 |
22
.goosehints
Normal file
22
.goosehints
Normal file
@@ -0,0 +1,22 @@
|
||||
NixOS Configurations Repository
|
||||
================================
|
||||
|
||||
Overview:
|
||||
---------
|
||||
This repository hosts modular and reproducible NixOS configurations managed via Nix flakes. It is structured to separate concerns across machine-specific setups, common roles, and custom packages.
|
||||
|
||||
Directory Structure:
|
||||
----------------------
|
||||
• secrets/ - Confidential data (passwords, keys, etc.) required for system configuration.
|
||||
• packages/ - Custom Nix packages leveraged across various configurations.
|
||||
• roles/ - Role-based configurations (e.g., kodi, bluetooth) each with its own module (default.nix) for inclusion in machine setups.
|
||||
• machines/ - Machine-specific configurations (e.g., nix-book, z790prors, boxy, wixos) including configuration.nix and hardware-configuration.nix tailored for each hardware.
|
||||
• home/ - Home-manager configurations for personal environments and application settings (e.g., home-nix-book.nix, home-z790prors.nix).
|
||||
|
||||
Design Principles:
|
||||
------------------
|
||||
• Modularity: Clear separation between roles, machines, and packages allows for flexible and reusable configurations.
|
||||
• Declarative & Reproducible: Using Nix flakes guarantees a fully declarative setup that can be effortlessly reproduced across systems.
|
||||
• Scalability: The structure is designed to accommodate adding new roles or machines with minimal disruption to existing configurations.
|
||||
|
||||
This file serves as a concise guide for navigating and understanding the repository from an advanced Nix perspective. Further documentation can be found within the respective directories or individual README files where applicable.
|
||||
197
flake.lock
generated
197
flake.lock
generated
@@ -1,5 +1,80 @@
|
||||
{
|
||||
"nodes": {
|
||||
"doomemacs": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1742013576,
|
||||
"narHash": "sha256-wgzv3IFBxJkAYfLG0vCp1jbajHKrrpFzKZ2BssWVSlo=",
|
||||
"owner": "doomemacs",
|
||||
"repo": "doomemacs",
|
||||
"rev": "466490c252d06f42a9c165f361de74a6e6abad8d",
|
||||
"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": 1742113225,
|
||||
"narHash": "sha256-tUor57FbLwwy+duUbjq8Ff0TyayK1i50rUbXBfdgfuM=",
|
||||
"owner": "nix-community",
|
||||
"repo": "emacs-overlay",
|
||||
"rev": "7e13aa507d714371e6ff70a91d76dcb339311773",
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"google-cookie-retrieval": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1739823862,
|
||||
"narHash": "sha256-h08hlS0ImlONZfeemVMzo29PUC3/abdSb9muYO9E048=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "675f98b0145f908897c4d899836bcb3dad9da79a",
|
||||
"revCount": 9,
|
||||
"type": "git",
|
||||
"url": "https://git.johnogle.info/johno/google-cookie-retrieval.git"
|
||||
},
|
||||
"original": {
|
||||
"type": "git",
|
||||
"url": "https://git.johnogle.info/johno/google-cookie-retrieval.git"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@@ -7,11 +82,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1730633670,
|
||||
"narHash": "sha256-ZFJqIXpvVKvzOVFKWNRDyIyAo+GYdmEPaYi1bZB6uf0=",
|
||||
"lastModified": 1741955947,
|
||||
"narHash": "sha256-2lbURKclgKqBNm7hVRtWh0A7NrdsibD0EaWhahUVhhY=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "8f6ca7855d409aeebe2a582c6fd6b6a8d0bf5661",
|
||||
"rev": "4e12151c9e014e2449e0beca2c0e9534b96a26b4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -20,13 +95,72 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-doom-emacs-unstraightened": {
|
||||
"inputs": {
|
||||
"doomemacs": "doomemacs",
|
||||
"emacs-overlay": "emacs-overlay",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1742122199,
|
||||
"narHash": "sha256-vEdsZd9MmjRYXutcSVnOoR15ikI9yU8Oc9f1UCNvUwI=",
|
||||
"owner": "marienz",
|
||||
"repo": "nix-doom-emacs-unstraightened",
|
||||
"rev": "366d3b516d4878e1f93158708015be3dac09a72f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "marienz",
|
||||
"repo": "nix-doom-emacs-unstraightened",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixos-wsl": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1741870048,
|
||||
"narHash": "sha256-odXRdNZGdXg1LmwlAeWL85kgy/FVHsgKlDwrvbR2BsU=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NixOS-WSL",
|
||||
"rev": "5d76001e33ee19644a598ad80e7318ab0957b122",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "main",
|
||||
"repo": "NixOS-WSL",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1730531603,
|
||||
"narHash": "sha256-Dqg6si5CqIzm87sp57j5nTaeBbWhHFaVyG7V6L8k3lY=",
|
||||
"lastModified": 1740865531,
|
||||
"narHash": "sha256-h00vGIh/jxcGl8aWdfnVRD74KuLpyY3mZgMFMy7iKIc=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "5ef6c425980847c78a80d759abc476e941a9bf42",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-24.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1742069588,
|
||||
"narHash": "sha256-C7jVfohcGzdZRF6DO+ybyG/sqpo1h6bZi9T56sxLy+k=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "7ffd9ae656aec493492b44d0ddfb28e79a1ea25d",
|
||||
"rev": "c80f6a7e10b39afcc1894e02ef785b1ad0b0d7e5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -36,22 +170,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1730602179,
|
||||
"narHash": "sha256-efgLzQAWSzJuCLiCaQUCDu4NudNlHdg2NzGLX5GYaEY=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "3c2f1c4ca372622cb2f9de8016c9a0b1cbd0f37c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "release-24.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"plasma-manager": {
|
||||
"inputs": {
|
||||
"home-manager": [
|
||||
@@ -62,11 +180,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1730635861,
|
||||
"narHash": "sha256-Npp3pl9aeAiq+wZPDbw2ZxybNuZWyuN7AY6fik56DCo=",
|
||||
"lastModified": 1740569341,
|
||||
"narHash": "sha256-WV8nY2IOfWdzBF5syVgCcgOchg/qQtpYh6LECYS9XkY=",
|
||||
"owner": "nix-community",
|
||||
"repo": "plasma-manager",
|
||||
"rev": "293668587937daae1df085ee36d2b2d0792b7a0f",
|
||||
"rev": "5eeb0172fb74392053b66a8149e61b5e191b2845",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -77,8 +195,11 @@
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"google-cookie-retrieval": "google-cookie-retrieval",
|
||||
"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"
|
||||
}
|
||||
@@ -87,15 +208,14 @@
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"nixpkgs-stable": "nixpkgs-stable"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1730605784,
|
||||
"narHash": "sha256-1NveNAMLHbxOg0BpBMSVuZ2yW2PpDnZLbZ25wV50PMc=",
|
||||
"lastModified": 1741861888,
|
||||
"narHash": "sha256-ynOgXAyToeE1UdLNfrUn/hL7MN0OpIS2BtNdLjpjPf0=",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "e9b5eef9b51cdf966c76143e13a9476725b2f760",
|
||||
"rev": "d016ce0365b87d848a57c12ffcfdc71da7a2b55f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -103,6 +223,21 @@
|
||||
"repo": "sops-nix",
|
||||
"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",
|
||||
|
||||
68
flake.nix
68
flake.nix
@@ -3,6 +3,7 @@
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
nixos-wsl.url = "github:nix-community/NixOS-WSL/main";
|
||||
|
||||
sops-nix = {
|
||||
url = "github:Mic92/sops-nix";
|
||||
@@ -19,9 +20,19 @@
|
||||
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";
|
||||
};
|
||||
|
||||
google-cookie-retrieval = {
|
||||
url = "git+https://git.johnogle.info/johno/google-cookie-retrieval.git";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, ... } @ inputs: let
|
||||
outputs = { self, nixpkgs, nixos-wsl, ... } @ inputs: let
|
||||
baseModules = [
|
||||
./roles
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
@@ -29,31 +40,23 @@
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.sharedModules = [ inputs.plasma-manager.homeManagerModules.plasma-manager ];
|
||||
home-manager.sharedModules = [
|
||||
inputs.plasma-manager.homeManagerModules.plasma-manager
|
||||
inputs.nix-doom-emacs-unstraightened.hmModule
|
||||
];
|
||||
home-manager.extraSpecialArgs = {
|
||||
globalInputs = inputs;
|
||||
};
|
||||
}
|
||||
];
|
||||
in {
|
||||
nixosConfigurations.z790prors-nix = nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = baseModules ++ [
|
||||
./machines/z790prors/configuration.nix
|
||||
{
|
||||
home-manager.users.johno = import ./home/home-z790prors.nix;
|
||||
home-manager.extraSpecialArgs.customPkgs =
|
||||
nixpkgs.legacyPackages."${system}".callPackage ./packages {};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
nixosConfigurations.nix-book = nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
modules = baseModules ++ [
|
||||
./machines/nix-book/configuration.nix
|
||||
{
|
||||
home-manager.users.johno = import ./home/home-nix-book.nix;
|
||||
home-manager.extraSpecialArgs.customPkgs =
|
||||
nixpkgs.legacyPackages."${system}".callPackage ./packages {};
|
||||
home-manager.extraSpecialArgs = { inherit system; };
|
||||
}
|
||||
];
|
||||
};
|
||||
@@ -64,11 +67,36 @@
|
||||
./machines/boxy/configuration.nix
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.users.johno = import ./home/home-default.nix;
|
||||
home-manager.extraSpecialArgs.customPkgs =
|
||||
nixpkgs.legacyPackages."${system}".callPackage ./packages {};
|
||||
home-manager.users.johno = import ./home/home.nix;
|
||||
home-manager.extraSpecialArgs = { inherit system; };
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
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.nix;
|
||||
home-manager.extraSpecialArgs = { inherit system; };
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
homeConfigurations."johno" = inputs.home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = inputs.nixpkgs.legacyPackages."x86_64-linux";
|
||||
modules = [
|
||||
inputs.plasma-manager.homeManagerModules.plasma-manager
|
||||
inputs.nix-doom-emacs-unstraightened.hmModule
|
||||
./home/home.nix
|
||||
];
|
||||
extraSpecialArgs = {
|
||||
system = "x86_64-linux";
|
||||
globalInputs = inputs;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
|
||||
{
|
||||
imports = [
|
||||
./home-default.nix
|
||||
./modules/hyprland/nix-book.nix
|
||||
./home.nix
|
||||
];
|
||||
|
||||
home.i3_sway.extraSwayConfig = {
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./home-default.nix
|
||||
./modules/hyprland/z790prors.nix
|
||||
];
|
||||
}
|
||||
@@ -1,5 +1,8 @@
|
||||
{ pkgs, customPkgs, ... }:
|
||||
{ pkgs, customPkgs, globalInputs, system, ... }:
|
||||
|
||||
let
|
||||
customPkgs = pkgs.callPackage ../packages {};
|
||||
in
|
||||
{
|
||||
# Home Manager needs a bit of information about you and the paths it should
|
||||
# manage.
|
||||
@@ -40,6 +43,7 @@
|
||||
pkgs.element-desktop
|
||||
pkgs.fd
|
||||
#pkgs.fluffychat # security vulnerability in current version
|
||||
pkgs.goose-cli
|
||||
pkgs.gzip
|
||||
pkgs.htop
|
||||
pkgs.jellyfin-media-player
|
||||
@@ -49,8 +53,9 @@
|
||||
pkgs.less
|
||||
pkgs.moonlight-qt
|
||||
pkgs.ncdu
|
||||
pkgs.nextcloud-talk-desktop
|
||||
pkgs.pandoc
|
||||
pkgs.pinentry-qt
|
||||
#pkgs.pinentry-qt
|
||||
#pkgs.pytest
|
||||
pkgs.shellcheck
|
||||
pkgs.solaar # Logitech management software
|
||||
@@ -59,7 +64,7 @@
|
||||
pkgs.wofi
|
||||
pkgs.vlc
|
||||
|
||||
customPkgs.nextcloudTalkDesktop
|
||||
globalInputs.google-cookie-retrieval.packages.${system}.default
|
||||
];
|
||||
|
||||
# Home Manager is pretty good at managing dotfiles. The primary way to manage
|
||||
@@ -75,9 +80,10 @@
|
||||
# org.gradle.console=verbose
|
||||
# org.gradle.daemon.idletimeout=3600000
|
||||
# '';
|
||||
|
||||
};
|
||||
|
||||
targets.genericLinux.enable = true;
|
||||
|
||||
# Home Manager can also manage your environment variables through
|
||||
# 'home.sessionVariables'. These will be explicitly sourced when using a
|
||||
# shell provided by Home Manager. If you don't want to manage your shell
|
||||
@@ -100,23 +106,15 @@
|
||||
home.sessionPath = [
|
||||
];
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
imports = [
|
||||
./modules/emacs
|
||||
./modules/i3+sway
|
||||
./modules/lutris
|
||||
./modules/plasma-manager
|
||||
./modules/tmux
|
||||
];
|
||||
|
||||
programs.bash.enable = true;
|
||||
|
||||
nix = {
|
||||
gc = {
|
||||
automatic = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
@@ -135,15 +133,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
programs.gpg.enable = true;
|
||||
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
enableSshSupport = true;
|
||||
defaultCacheTtl = 1800;
|
||||
pinentryPackage = pkgs.pinentry-qt;
|
||||
};
|
||||
|
||||
programs.jq.enable = true;
|
||||
|
||||
programs.k9s.enable = true;
|
||||
@@ -176,17 +165,16 @@
|
||||
};
|
||||
};
|
||||
|
||||
services.home-manager.autoUpgrade = {
|
||||
enable = true;
|
||||
frequency = "weekly";
|
||||
};
|
||||
|
||||
services.kdeconnect = {
|
||||
enable = true;
|
||||
indicator = true;
|
||||
package = pkgs.kdePackages.kdeconnect-kde;
|
||||
};
|
||||
|
||||
services.gnome-keyring = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
tray = {
|
||||
@@ -2,21 +2,15 @@
|
||||
|
||||
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 = {
|
||||
home.packages = [
|
||||
pkgs.emacs-all-the-icons-fonts
|
||||
pkgs.fontconfig
|
||||
pkgs.graphviz
|
||||
pkgs.isort
|
||||
pkgs.nerdfonts
|
||||
pkgs.nerd-fonts.fira-code
|
||||
pkgs.nerd-fonts.droid-sans-mono
|
||||
pkgs.nil # nix lsp language server
|
||||
pkgs.nixfmt-rfc-style
|
||||
(pkgs.ripgrep.override {withPCRE2 = true;})
|
||||
@@ -25,43 +19,15 @@ in {
|
||||
pkgs.python3
|
||||
];
|
||||
|
||||
programs.doom-emacs = {
|
||||
enable = true;
|
||||
doomDir = ./doom;
|
||||
};
|
||||
|
||||
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 = "f425f2ff3da584cfe2676f6b9cf1d81a690a75e5";
|
||||
};
|
||||
# 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 = {
|
||||
DOOMLOCALDIR = "${config.xdg.dataHome}/doom";
|
||||
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
|
||||
;; refresh your font settings. If Emacs still can't find your font, it likely
|
||||
;; 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
|
||||
;; available. You can either set `doom-theme' or manually load a theme with the
|
||||
@@ -43,7 +44,11 @@
|
||||
(setq org-directory "~/org/")
|
||||
(after! org
|
||||
(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-agenda-custom-commands '(("n" "Agenda"
|
||||
((agenda "")
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = [
|
||||
pkgs.gamescope
|
||||
pkgs.lutris
|
||||
pkgs.mangohud
|
||||
];
|
||||
}
|
||||
@@ -120,6 +120,8 @@
|
||||
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
|
||||
];
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
# 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`).
|
||||
|
||||
{ lib, ... }:
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
@@ -14,9 +14,17 @@ with lib;
|
||||
|
||||
roles = {
|
||||
audio.enable = true;
|
||||
bluetooth.enable = true;
|
||||
desktop = {
|
||||
enable = true;
|
||||
gaming = true;
|
||||
kde = true;
|
||||
sddm = true;
|
||||
wayland = true;
|
||||
};
|
||||
kodi = {
|
||||
enable = true;
|
||||
autologin = true;
|
||||
autologin = false;
|
||||
wayland = true;
|
||||
};
|
||||
users.enable = true;
|
||||
@@ -28,9 +36,15 @@ with lib;
|
||||
|
||||
networking.hostName = "boxy"; # Define your hostname.
|
||||
|
||||
services.xserver.videoDrivers = [ "amdgpu" ];
|
||||
hardware.graphics.enable = true;
|
||||
|
||||
services.displayManager.enable = mkForce false;
|
||||
hardware.graphics.enable32Bit = true;
|
||||
hardware.graphics.extraPackages = with pkgs; [
|
||||
amdvlk
|
||||
];
|
||||
hardware.graphics.extraPackages32 = with pkgs; [
|
||||
driversi686Linux.amdvlk
|
||||
];
|
||||
|
||||
# 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.
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "thunderbolt" "usb_storage" "usbhid" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
|
||||
@@ -12,7 +12,13 @@
|
||||
roles = {
|
||||
audio.enable = true;
|
||||
bluetooth.enable = true;
|
||||
desktop.enable = true;
|
||||
desktop = {
|
||||
enable = true;
|
||||
wayland = true;
|
||||
gaming = true;
|
||||
kde = true;
|
||||
sddm = true;
|
||||
};
|
||||
nfs-mounts.enable = true;
|
||||
printing.enable = true;
|
||||
spotifyd.enable = true;
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
swapDevices =
|
||||
[ { 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
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
|
||||
61
machines/wixos/configuration.nix
Normal file
61
machines/wixos/configuration.nix
Normal file
@@ -0,0 +1,61 @@
|
||||
# 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 = {
|
||||
audio.enable = true;
|
||||
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,72 +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.kernelParams = [
|
||||
"nvidia_drm.fbdev=1"
|
||||
"nvidia_drm.modeset=1"
|
||||
];
|
||||
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;
|
||||
#package = config.boot.kernelPackages.nvidiaPackages.mkDriver {
|
||||
#version = "555.58";
|
||||
|
||||
#sha256_64bit = "sha256-bXvcXkg2kQZuCNKRZM5QoTaTjF4l2TtrsKUvyicj5ew=";
|
||||
#sha256_aarch64 = lib.fakeSha256;
|
||||
#openSha256 = lib.fakeSha256;
|
||||
#settingsSha256 = "sha256-vWnrXlBCb3K5uVkDFmJDVq51wrCoqgPF03lSjZOuU8M=";
|
||||
#persistencedSha256 = lib.fakeSha256;
|
||||
#};
|
||||
};
|
||||
environment.sessionVariables = {
|
||||
KWIN_DRM_ALLOW_NVIDIA_COLORSPACE = "1";
|
||||
};
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/8d996d13-6d55-4524-83a2-6f6fb47a09ea";
|
||||
fsType = "btrfs";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/7445-C336";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
services.beesd.filesystems = {
|
||||
root = {
|
||||
spec = "LABEL=nixos";
|
||||
hashTableSizeMB = 4096;
|
||||
verbosity = "crit";
|
||||
};
|
||||
};
|
||||
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
{ 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,19 @@ in
|
||||
enable = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
hardware.pulseaudio.package = pkgs.pulseaudioFull;
|
||||
hardware.pulseaudio.extraConfig = "
|
||||
load-module module-combine-sink
|
||||
load-module module-switch-on-connect
|
||||
";
|
||||
|
||||
services.pulseaudio = {
|
||||
package = pkgs.pulseaudioFull;
|
||||
extraConfig = ''
|
||||
load-module module-combine-sink
|
||||
load-module module-switch-on-connect
|
||||
'';
|
||||
};
|
||||
|
||||
services.squeezelite = {
|
||||
#enable = true;
|
||||
pulseAudio = true;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -31,6 +31,12 @@ with lib;
|
||||
};
|
||||
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
|
||||
@@ -43,29 +49,30 @@ with lib;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
git
|
||||
glances
|
||||
pciutils
|
||||
vim
|
||||
tree
|
||||
usbutils
|
||||
vim
|
||||
];
|
||||
|
||||
nix = {
|
||||
package = pkgs.nix;
|
||||
distributedBuilds = true;
|
||||
buildMachines = [{
|
||||
hostName = "z790prors.oglehome";
|
||||
system = "x86_64-linux";
|
||||
protocol = "ssh-ng";
|
||||
sshUser = "johno";
|
||||
sshKey = "/root/.ssh/id_ed25519";
|
||||
maxJobs = 3;
|
||||
speedFactor = 2;
|
||||
}];
|
||||
# distributedBuilds = true;
|
||||
# buildMachines = [{
|
||||
# hostName = "z790prors.oglehome";
|
||||
# system = "x86_64-linux";
|
||||
# protocol = "ssh-ng";
|
||||
# sshUser = "johno";
|
||||
# sshKey = "/root/.ssh/id_ed25519";
|
||||
# maxJobs = 3;
|
||||
# speedFactor = 2;
|
||||
# }];
|
||||
settings = {
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
max-jobs = "auto";
|
||||
trusted-users = [ "johno" ];
|
||||
substituters = [
|
||||
"https://hyprland.cachix.org"
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
@@ -2,132 +2,23 @@
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.roles.desktop;
|
||||
|
||||
basePackages = with pkgs; [
|
||||
brightnessctl
|
||||
mangohud # Should probably get refactored with steam/gamescope out to a gaming role
|
||||
];
|
||||
|
||||
x11BasePackages = with pkgs; [
|
||||
|
||||
];
|
||||
|
||||
x11OnlyPackages = with pkgs; [
|
||||
emacs
|
||||
];
|
||||
|
||||
waylandBasePackages = with pkgs; [
|
||||
grim
|
||||
slurp
|
||||
wl-clipboard
|
||||
mako
|
||||
];
|
||||
|
||||
waylandOnlyPackages = with pkgs; [
|
||||
emacs-gtk
|
||||
];
|
||||
in
|
||||
{
|
||||
options.roles.desktop = {
|
||||
enable = mkEnableOption "Enable the desktop role";
|
||||
x11Only = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
};
|
||||
enable = mkEnableOption "Enable the desktop role.";
|
||||
|
||||
x11 = mkOption { type = types.bool; default = false; description = "Enable X11 support."; };
|
||||
wayland = mkOption { type = types.bool; default = false; description = "Enable Wayland support."; };
|
||||
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 = mkIf cfg.enable
|
||||
{
|
||||
services.xserver.xkb = {
|
||||
layout = "us";
|
||||
variant = "";
|
||||
options = "caps:escape";
|
||||
};
|
||||
services.xserver.enable = true;
|
||||
|
||||
services.displayManager.sddm = {
|
||||
enable = true;
|
||||
wayland.enable = !cfg.x11Only;
|
||||
};
|
||||
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.gamemode = {
|
||||
enable = true;
|
||||
|
||||
};
|
||||
programs.gamescope = {
|
||||
enable = true;
|
||||
#capSysNice = true;
|
||||
args = [
|
||||
#"--adaptive-sync"
|
||||
#"--nested-refresh 165"
|
||||
#"--backend wayland"
|
||||
"--hdr-enabled"
|
||||
"--hdr-itm-enable"
|
||||
"--hdr-debug-force-output"
|
||||
"--mangoapp"
|
||||
"--rt"
|
||||
"--steam"
|
||||
#"--xwayland-count 2"
|
||||
];
|
||||
env = {
|
||||
#PROTON_DISABLE_NVAPI = "1";
|
||||
MANGOHUD = "1";
|
||||
#MANGOHUD_CONFIG = "cpu_temp gpu_temp ram vram";
|
||||
};
|
||||
};
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true;
|
||||
localNetworkGameTransfers.openFirewall = true;
|
||||
gamescopeSession = {
|
||||
enable = 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)
|
||||
];
|
||||
};
|
||||
|
||||
imports = [
|
||||
./x11.nix
|
||||
./wayland.nix
|
||||
./gaming.nix
|
||||
./kde.nix
|
||||
./programs.nix
|
||||
./sddm.nix
|
||||
];
|
||||
}
|
||||
|
||||
18
roles/desktop/gaming.nix
Normal file
18
roles/desktop/gaming.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{ lib, config, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.roles.desktop;
|
||||
in
|
||||
{
|
||||
config = mkIf (cfg.enable && cfg.gaming) {
|
||||
environment.systemPackages = with pkgs; [
|
||||
steam
|
||||
lutris
|
||||
moonlight
|
||||
];
|
||||
|
||||
# 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;
|
||||
};
|
||||
}
|
||||
20
roles/desktop/programs.nix
Normal file
20
roles/desktop/programs.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{ lib, config, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.roles.desktop;
|
||||
in
|
||||
{
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
brightnessctl
|
||||
emacs-nox
|
||||
moonlight-qt
|
||||
];
|
||||
|
||||
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 ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -27,45 +27,28 @@ in
|
||||
]);
|
||||
in mkIf cfg.enable
|
||||
{
|
||||
users.extraUsers.kodi.isNormalUser = true;
|
||||
users.extraUsers.kodi = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" "networkmanager" "audio" "video" ];
|
||||
};
|
||||
|
||||
networking.firewall = {
|
||||
allowedTCPPorts = [ 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;
|
||||
};
|
||||
})
|
||||
environment.systemPackages = with pkgs; [
|
||||
kodiPkg
|
||||
wget
|
||||
];
|
||||
|
||||
(mkIf (!cfg.wayland) {
|
||||
xserver = {
|
||||
enable = true;
|
||||
desktopManager.kodi = {
|
||||
enable = true;
|
||||
package = kodiPkg;
|
||||
};
|
||||
displayManager.lightdm = {
|
||||
enable = true;
|
||||
greeter.enable = false;
|
||||
};
|
||||
};
|
||||
services = if cfg.autologin then {
|
||||
displayManager = {
|
||||
autoLogin.enable = true;
|
||||
autoLogin.user = "kodi";
|
||||
defaultSession = "kodi";
|
||||
sessionData.autologinSession = "kodi";
|
||||
sessionData.autologinSession = "plasma";
|
||||
};
|
||||
})
|
||||
] else {};
|
||||
} else {};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ in
|
||||
users.users.johno = {
|
||||
isNormalUser = true;
|
||||
description = "John Ogle";
|
||||
extraGroups = [ "wheel" "networkmanager" "audio" ] ++ cfg.extraGroups;
|
||||
extraGroups = [ "wheel" "networkmanager" "audio" "video" ] ++ cfg.extraGroups;
|
||||
};
|
||||
|
||||
users.users.eli = mkIf cfg.kids {
|
||||
|
||||
@@ -14,5 +14,7 @@ in
|
||||
{
|
||||
virtualisation.libvirtd.enable = true;
|
||||
programs.virt-manager.enable = true;
|
||||
virtualisation.docker.enable = true;
|
||||
users.extraGroups.docker.members = [ "johno" ];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user