Compare commits
28 Commits
574e91135f
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 32dba1cfaa | |||
| 27da4a1f07 | |||
| bc575ee116 | |||
|
|
787e1020c0
|
||
| 91756e662e | |||
| 392392f937 | |||
| d425db9f19 | |||
| 075557a871 | |||
| 242ee062de | |||
| 7d0974ea92 | |||
| 0e8a37c000 | |||
| 0240531a02 | |||
| 7fbc6f180e | |||
| c23e6d9621 | |||
|
a13add9b81
|
|||
| 0b0dd1a1ba | |||
| 6651d3e417 | |||
| 71b6c1638b | |||
| 3570ff6b5d | |||
| 2675e4077e | |||
| 65ab024e29 | |||
| dd81c4f902 | |||
|
3b73704165
|
|||
|
d6b6751ebd
|
|||
|
fc166785ee
|
|||
|
cf289c8c48
|
|||
|
5e6abe53f2
|
|||
|
0df3b7ebde
|
264
flake-old.nix
264
flake-old.nix
@@ -1,264 +0,0 @@
|
|||||||
{
|
|
||||||
description = "Nixos config flake";
|
|
||||||
|
|
||||||
inputs = {
|
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
|
|
||||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
||||||
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
|
||||||
home-manager = {
|
|
||||||
url = "github:nix-community/home-manager/release-25.11";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
sops-nix = {
|
|
||||||
url = "github:Mic92/sops-nix";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
disko.url = "github:nix-community/disko";
|
|
||||||
disko.inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
plasma-manager = {
|
|
||||||
url = "github:pjones/plasma-manager";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
inputs.home-manager.follows = "home-manager";
|
|
||||||
};
|
|
||||||
firefox-addons = {
|
|
||||||
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
hyprland = {
|
|
||||||
url = "github:hyprwm/Hyprland";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
hyprland-plugins = {
|
|
||||||
url = "github:hyprwm/hyprland-plugins";
|
|
||||||
inputs.hyprland.follows = "hyprland";
|
|
||||||
};
|
|
||||||
nixos-cosmic = {
|
|
||||||
url = "github:lilyinstarlight/nixos-cosmic";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
dzgui-nix = {
|
|
||||||
url = "github:lelgenio/dzgui-nix";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
audio = {
|
|
||||||
url = "github:polygon/audio.nix";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
nix-minecraft.url = "github:Infinidoge/nix-minecraft";
|
|
||||||
nix-minecraft.inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
outputs = {
|
|
||||||
self,
|
|
||||||
nixpkgs,
|
|
||||||
nixpkgs-unstable,
|
|
||||||
nixos-hardware,
|
|
||||||
home-manager,
|
|
||||||
nixos-cosmic,
|
|
||||||
audio,
|
|
||||||
...
|
|
||||||
} @ inputs: let
|
|
||||||
system = "x86_64-linux";
|
|
||||||
overlay-unstable = final: prev: {
|
|
||||||
unstable = import nixpkgs-unstable {
|
|
||||||
system = prev.system;
|
|
||||||
config.allowUnfree = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
in {
|
|
||||||
nixosConfigurations = {
|
|
||||||
comfy-station = nixpkgs.lib.nixosSystem {
|
|
||||||
inherit system;
|
|
||||||
specialArgs = {
|
|
||||||
inherit inputs;
|
|
||||||
isHM = false;
|
|
||||||
};
|
|
||||||
modules = [
|
|
||||||
({...}: {nixpkgs.overlays = [overlay-unstable self.overlays.default audio.overlays.default];})
|
|
||||||
({...}: {nixpkgs.config.allowUnfree = true;})
|
|
||||||
nixos-hardware.nixosModules.msi-b550-a-pro
|
|
||||||
inputs.sops-nix.nixosModules.sops
|
|
||||||
inputs.nix-minecraft.overlay
|
|
||||||
inputs.nix-minecraft.nixosModules.minecraft-servers
|
|
||||||
./modules
|
|
||||||
./hosts/comfy-station/configuration.nix
|
|
||||||
];
|
|
||||||
};
|
|
||||||
monolith = nixpkgs.lib.nixosSystem {
|
|
||||||
inherit system;
|
|
||||||
specialArgs = {
|
|
||||||
inherit inputs;
|
|
||||||
isHM = false;
|
|
||||||
};
|
|
||||||
modules = [
|
|
||||||
({...}: {
|
|
||||||
nixpkgs.overlays = [
|
|
||||||
overlay-unstable
|
|
||||||
self.overlays.default
|
|
||||||
audio.overlays.default
|
|
||||||
inputs.nix-minecraft.overlay
|
|
||||||
];
|
|
||||||
})
|
|
||||||
({...}: {
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
nixpkgs.config.nvidia.acceptLicense = true;
|
|
||||||
})
|
|
||||||
{
|
|
||||||
nix.settings = {
|
|
||||||
substituters = ["https://cosmic.cachix.org/"];
|
|
||||||
trusted-public-keys = ["cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE="];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
nixos-hardware.nixosModules.lenovo-thinkpad-t14-amd-gen1
|
|
||||||
inputs.sops-nix.nixosModules.sops
|
|
||||||
nixos-cosmic.nixosModules.default
|
|
||||||
inputs.nix-minecraft.nixosModules.minecraft-servers
|
|
||||||
./fixes/plasma-fix.nix
|
|
||||||
./modules
|
|
||||||
./hosts/monolith/configuration.nix
|
|
||||||
];
|
|
||||||
};
|
|
||||||
harbor = nixpkgs.lib.nixosSystem {
|
|
||||||
inherit system;
|
|
||||||
specialArgs = {
|
|
||||||
inherit inputs;
|
|
||||||
isHM = false;
|
|
||||||
};
|
|
||||||
modules = [
|
|
||||||
({...}: {
|
|
||||||
nixpkgs.overlays = [
|
|
||||||
overlay-unstable
|
|
||||||
self.overlays.default
|
|
||||||
audio.overlays.default
|
|
||||||
inputs.nix-minecraft.overlay
|
|
||||||
];
|
|
||||||
})
|
|
||||||
({...}: {nixpkgs.config.allowUnfree = true;})
|
|
||||||
inputs.sops-nix.nixosModules.sops
|
|
||||||
inputs.disko.nixosModules.disko
|
|
||||||
inputs.nix-minecraft.nixosModules.minecraft-servers
|
|
||||||
./modules
|
|
||||||
./hosts/harbor/configuration.nix
|
|
||||||
];
|
|
||||||
};
|
|
||||||
vm = nixpkgs.lib.nixosSystem {
|
|
||||||
inherit system;
|
|
||||||
specialArgs = {
|
|
||||||
inherit inputs;
|
|
||||||
};
|
|
||||||
modules = [
|
|
||||||
./hosts/vm/configuration.nix
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
homeConfigurations."jonas@comfy-station" = home-manager.lib.homeManagerConfiguration {
|
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
|
||||||
|
|
||||||
# Specify your home configuration modules here, for example,
|
|
||||||
# the path to your home.nix.
|
|
||||||
modules = [
|
|
||||||
({...}: {nixpkgs.overlays = [overlay-unstable self.overlays.default audio.overlays.default];})
|
|
||||||
({...}: {nixpkgs.config.allowUnfree = true;})
|
|
||||||
inputs.plasma-manager.homeManagerModules.plasma-manager
|
|
||||||
inputs.sops-nix.homeManagerModules.sops
|
|
||||||
./modules
|
|
||||||
(./home + "/jonas@comfy-station.nix")
|
|
||||||
];
|
|
||||||
|
|
||||||
# Optionally use extraSpecialArgs
|
|
||||||
# to pass through arguments to home.nix
|
|
||||||
extraSpecialArgs = {
|
|
||||||
inherit inputs;
|
|
||||||
isHM = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
homeConfigurations."jonas@harbor" = home-manager.lib.homeManagerConfiguration {
|
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
|
||||||
|
|
||||||
# Specify your home configuration modules here, for example,
|
|
||||||
# the path to your home.nix.
|
|
||||||
modules = [
|
|
||||||
({...}: {nixpkgs.overlays = [overlay-unstable self.overlays.default audio.overlays.default];})
|
|
||||||
({...}: {nixpkgs.config.allowUnfree = true;})
|
|
||||||
inputs.plasma-manager.homeManagerModules.plasma-manager
|
|
||||||
inputs.sops-nix.homeManagerModules.sops
|
|
||||||
./modules
|
|
||||||
(./home + "/jonas@harbor.nix")
|
|
||||||
];
|
|
||||||
|
|
||||||
# Optionally use extraSpecialArgs
|
|
||||||
# to pass through arguments to home.nix
|
|
||||||
extraSpecialArgs = {
|
|
||||||
inherit inputs;
|
|
||||||
isHM = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
homeConfigurations."jonas@monolith" = home-manager.lib.homeManagerConfiguration {
|
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
|
||||||
|
|
||||||
# Specify your home configuration modules here, for example,
|
|
||||||
# the path to your home.nix.
|
|
||||||
modules = [
|
|
||||||
({...}: {nixpkgs.overlays = [overlay-unstable self.overlays.default audio.overlays.default];})
|
|
||||||
({...}: {nixpkgs.config.allowUnfree = true;})
|
|
||||||
inputs.plasma-manager.homeManagerModules.plasma-manager
|
|
||||||
inputs.sops-nix.homeManagerModules.sops
|
|
||||||
./modules
|
|
||||||
(./home + "/jonas@monolith.nix")
|
|
||||||
];
|
|
||||||
|
|
||||||
# Optionally use extraSpecialArgs
|
|
||||||
# to pass through arguments to home.nix
|
|
||||||
extraSpecialArgs = {
|
|
||||||
inherit inputs;
|
|
||||||
isHM = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
homeConfigurations."admin-jroeger" = home-manager.lib.homeManagerConfiguration {
|
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
|
||||||
|
|
||||||
# Specify your home configuration modules here, for example,
|
|
||||||
# the path to your home.nix.
|
|
||||||
modules = [
|
|
||||||
({...}: {nixpkgs.overlays = [overlay-unstable self.overlays.default audio.overlays.default];})
|
|
||||||
({...}: {nixpkgs.config.allowUnfree = true;})
|
|
||||||
inputs.plasma-manager.homeManagerModules.plasma-manager
|
|
||||||
inputs.sops-nix.homeManagerModules.sops
|
|
||||||
./modules
|
|
||||||
./home/admin-jroeger.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
# Optionally use extraSpecialArgs
|
|
||||||
# to pass through arguments to home.nix
|
|
||||||
extraSpecialArgs = {
|
|
||||||
inherit inputs;
|
|
||||||
isHM = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
devShells.${system} = {
|
|
||||||
bulk-transcode = (import ./pkgs/bulk-transcode/shell.nix) {pkgs = nixpkgs.legacyPackages.${system};};
|
|
||||||
spotify-shortcuts = (import ./pkgs/spotify-shortcuts/shell.nix) {pkgs = nixpkgs.legacyPackages.${system};};
|
|
||||||
};
|
|
||||||
|
|
||||||
overlays.default = import ./pkgs;
|
|
||||||
|
|
||||||
templates = {
|
|
||||||
rust = {
|
|
||||||
path = ./templates/rust;
|
|
||||||
description = "A simple rust binary template";
|
|
||||||
welcomeText = ''
|
|
||||||
# Rust template
|
|
||||||
This is a simple rust binary template.
|
|
||||||
To build the project run `cargo build`.
|
|
||||||
To run the project run `cargo run`.
|
|
||||||
Before running nix build, make sure to run `cargo generate-lockfile` first.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
cmake-c = {
|
|
||||||
path = ./templates/cmake-c;
|
|
||||||
description = "A simple cmake c project.";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
214
flake.lock
generated
214
flake.lock
generated
@@ -1,27 +1,5 @@
|
|||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"audio": {
|
|
||||||
"inputs": {
|
|
||||||
"mucap": "mucap",
|
|
||||||
"nix-buildproxy": "nix-buildproxy",
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1773237019,
|
|
||||||
"narHash": "sha256-86wsDo6d4+pyETbjHTwTQ9w7YYGAuq7SVaN7BzH992w=",
|
|
||||||
"owner": "polygon",
|
|
||||||
"repo": "audio.nix",
|
|
||||||
"rev": "0c1b594b941dd46b29da107f03dfc91b34d820dd",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "polygon",
|
|
||||||
"repo": "audio.nix",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"disko": {
|
"disko": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
@@ -29,11 +7,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1773889306,
|
"lastModified": 1776613567,
|
||||||
"narHash": "sha256-PAqwnsBSI9SVC2QugvQ3xeYCB0otOwCacB1ueQj2tgw=",
|
"narHash": "sha256-gC9Cp5ibBmGD5awCA9z7xy6MW6iJufhazTYJOiGlCUI=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "disko",
|
"repo": "disko",
|
||||||
"rev": "5ad85c82cc52264f4beddc934ba57f3789f28347",
|
"rev": "32f4236bfc141ae930b5ba2fb604f561fed5219d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -62,30 +40,6 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"fenix": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"audio",
|
|
||||||
"mucap",
|
|
||||||
"naersk",
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"rust-analyzer-src": "rust-analyzer-src"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1752475459,
|
|
||||||
"narHash": "sha256-z6QEu4ZFuHiqdOPbYss4/Q8B0BFhacR8ts6jO/F/aOU=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "fenix",
|
|
||||||
"rev": "bf0d6f70f4c9a9cf8845f992105652173f4b617f",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "fenix",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"firefox-addons": {
|
"firefox-addons": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
@@ -94,11 +48,11 @@
|
|||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"dir": "pkgs/firefox-addons",
|
"dir": "pkgs/firefox-addons",
|
||||||
"lastModified": 1773892995,
|
"lastModified": 1777176175,
|
||||||
"narHash": "sha256-kRGAztxZcaErtp4FoXnKgOX0OebUdkAIoSXRU1fybKA=",
|
"narHash": "sha256-l/0TJCLEarrsyHIKNhAjI4+7lkyGsFqojyx1X1h64Ks=",
|
||||||
"owner": "rycee",
|
"owner": "rycee",
|
||||||
"repo": "nur-expressions",
|
"repo": "nur-expressions",
|
||||||
"rev": "394a8d49da42d2a63e8845c7262c636051f0f823",
|
"rev": "515c8c1296021efe49ba1b1318ff27a43e93442b",
|
||||||
"type": "gitlab"
|
"type": "gitlab"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -129,11 +83,11 @@
|
|||||||
"nixpkgs-lib": "nixpkgs-lib"
|
"nixpkgs-lib": "nixpkgs-lib"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1772408722,
|
"lastModified": 1775087534,
|
||||||
"narHash": "sha256-rHuJtdcOjK7rAHpHphUb1iCvgkU3GpfvicLMwwnfMT0=",
|
"narHash": "sha256-91qqW8lhL7TLwgQWijoGBbiD4t7/q75KTi8NxjVmSmA=",
|
||||||
"owner": "hercules-ci",
|
"owner": "hercules-ci",
|
||||||
"repo": "flake-parts",
|
"repo": "flake-parts",
|
||||||
"rev": "f20dc5d9b8027381c474144ecabc9034d6a839a3",
|
"rev": "3107b77cd68437b9a76194f0f7f9c55f2329ca5b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -149,11 +103,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1773681845,
|
"lastModified": 1775425411,
|
||||||
"narHash": "sha256-o8hrZrigP0JYcwnglCp8Zi8jQafWsxbDtRRPzuVwFxY=",
|
"narHash": "sha256-KY6HsebJHEe5nHOWP7ur09mb0drGxYSzE3rQxy62rJo=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "0759e0e137305bc9d0c52c204c6d8dffe6f601a6",
|
"rev": "0d02ec1d0a05f88ef9e74b516842900c41f0f2fe",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -178,74 +132,6 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"mucap": {
|
|
||||||
"inputs": {
|
|
||||||
"naersk": "naersk",
|
|
||||||
"nixpkgs": [
|
|
||||||
"audio",
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"rust-overlay": "rust-overlay"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1765670987,
|
|
||||||
"narHash": "sha256-LqcywUPXsQMrcl4zakVYHotLGfq2rzASMYuHrQp3KaY=",
|
|
||||||
"owner": "polygon",
|
|
||||||
"repo": "mucap",
|
|
||||||
"rev": "f798f8c4757e0dc80de5c1ddcb8be14aac916b99",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "polygon",
|
|
||||||
"repo": "mucap",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"naersk": {
|
|
||||||
"inputs": {
|
|
||||||
"fenix": "fenix",
|
|
||||||
"nixpkgs": [
|
|
||||||
"audio",
|
|
||||||
"mucap",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1763384566,
|
|
||||||
"narHash": "sha256-r+wgI+WvNaSdxQmqaM58lVNvJYJ16zoq+tKN20cLst4=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "naersk",
|
|
||||||
"rev": "d4155d6ebb70fbe2314959842f744aa7cabbbf6a",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "naersk",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nix-buildproxy": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"audio",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1708455753,
|
|
||||||
"narHash": "sha256-qP79WfPiTl92KrZkmvacba9Xas4WwSFln5DjkP2Q/Lg=",
|
|
||||||
"owner": "polygon",
|
|
||||||
"repo": "nix-buildproxy",
|
|
||||||
"rev": "77d486cb4b0458cb4c4a296c3140f7a6c36ab3e6",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "polygon",
|
|
||||||
"ref": "v0.1.0",
|
|
||||||
"repo": "nix-buildproxy",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nix-minecraft": {
|
"nix-minecraft": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat",
|
"flake-compat": "flake-compat",
|
||||||
@@ -255,11 +141,11 @@
|
|||||||
"systems": "systems"
|
"systems": "systems"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1774407052,
|
"lastModified": 1777001712,
|
||||||
"narHash": "sha256-rUkn7Bo3PAlpcZl8+0FDsTwFyDwvS4xwMT9+RJ+XJoE=",
|
"narHash": "sha256-9JX9msZU1NvHzjKM24PRorP76Ge8GBy6LAkJKA21mlY=",
|
||||||
"owner": "Infinidoge",
|
"owner": "Infinidoge",
|
||||||
"repo": "nix-minecraft",
|
"repo": "nix-minecraft",
|
||||||
"rev": "70daf1f48885f0b4a70797076cd2ff5d9139b46e",
|
"rev": "394d3bfd943458baf29e4798bc9b256d824a3bb9",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -270,11 +156,11 @@
|
|||||||
},
|
},
|
||||||
"nixos-hardware": {
|
"nixos-hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1773533765,
|
"lastModified": 1776983936,
|
||||||
"narHash": "sha256-qonGfS2lzCgCl59Zl63jF6dIRRpvW3AJooBGMaXjHiY=",
|
"narHash": "sha256-ZOQyNqSvJ8UdrrqU1p7vaFcdL53idK+LOM8oRWEWh6o=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixos-hardware",
|
"repo": "nixos-hardware",
|
||||||
"rev": "f8e82243fd601afb9f59ad230958bd073795cbfe",
|
"rev": "2096f3f411ce46e88a79ae4eafcfc9df8ed41c61",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -286,11 +172,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1773814637,
|
"lastModified": 1776734388,
|
||||||
"narHash": "sha256-GNU+ooRmrHLfjlMsKdn0prEKVa0faVanm0jrgu1J/gY=",
|
"narHash": "sha256-vl3dkhlE5gzsItuHoEMVe+DlonsK+0836LIRDnm6MXQ=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "fea3b367d61c1a6592bc47c72f40a9f3e6a53e96",
|
"rev": "10e7ad5bbcb421fe07e3a4ad53a634b0cd57ffac",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -302,11 +188,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-lib": {
|
"nixpkgs-lib": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1772328832,
|
"lastModified": 1774748309,
|
||||||
"narHash": "sha256-e+/T/pmEkLP6BHhYjx6GmwP5ivonQQn0bJdH9YrRB+Q=",
|
"narHash": "sha256-+U7gF3qxzwD5TZuANzZPeJTZRHS29OFQgkQ2kiTJBIQ=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixpkgs.lib",
|
"repo": "nixpkgs.lib",
|
||||||
"rev": "c185c7a5e5dd8f9add5b2f8ebeff00888b070742",
|
"rev": "333c4e0545a6da976206c74db8773a1645b5870a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -317,11 +203,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-unstable": {
|
"nixpkgs-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1773821835,
|
"lastModified": 1776877367,
|
||||||
"narHash": "sha256-TJ3lSQtW0E2JrznGVm8hOQGVpXjJyXY2guAxku2O9A4=",
|
"narHash": "sha256-EHq1/OX139R1RvBzOJ0aMRT3xnWyqtHBRUBuO1gFzjI=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "b40629efe5d6ec48dd1efba650c797ddbd39ace0",
|
"rev": "0726a0ecb6d4e08f6adced58726b95db924cef57",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -333,7 +219,6 @@
|
|||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"audio": "audio",
|
|
||||||
"disko": "disko",
|
"disko": "disko",
|
||||||
"dzgui-nix": "dzgui-nix",
|
"dzgui-nix": "dzgui-nix",
|
||||||
"firefox-addons": "firefox-addons",
|
"firefox-addons": "firefox-addons",
|
||||||
@@ -347,45 +232,6 @@
|
|||||||
"sops-nix": "sops-nix"
|
"sops-nix": "sops-nix"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"rust-analyzer-src": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1752428706,
|
|
||||||
"narHash": "sha256-EJcdxw3aXfP8Ex1Nm3s0awyH9egQvB2Gu+QEnJn2Sfg=",
|
|
||||||
"owner": "rust-lang",
|
|
||||||
"repo": "rust-analyzer",
|
|
||||||
"rev": "591e3b7624be97e4443ea7b5542c191311aa141d",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "rust-lang",
|
|
||||||
"ref": "nightly",
|
|
||||||
"repo": "rust-analyzer",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"rust-overlay": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"audio",
|
|
||||||
"mucap",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1762655942,
|
|
||||||
"narHash": "sha256-hOM12KcQNQALrhB9w6KJmV5hPpm3GA763HRe9o7JUiI=",
|
|
||||||
"owner": "oxalica",
|
|
||||||
"repo": "rust-overlay",
|
|
||||||
"rev": "6ac961b02d4235572692241e333d0470637f5492",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "oxalica",
|
|
||||||
"repo": "rust-overlay",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sops-nix": {
|
"sops-nix": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
@@ -393,11 +239,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1773889674,
|
"lastModified": 1776771786,
|
||||||
"narHash": "sha256-+ycaiVAk3MEshJTg35cBTUa0MizGiS+bgpYw/f8ohkg=",
|
"narHash": "sha256-DRFGPfFV6hbrfO9a1PH1FkCi7qR5FgjSqsQGGvk1rdI=",
|
||||||
"owner": "Mic92",
|
"owner": "Mic92",
|
||||||
"repo": "sops-nix",
|
"repo": "sops-nix",
|
||||||
"rev": "29b6519f3e0780452bca0ac0be4584f04ac16cc5",
|
"rev": "bef289e2248991f7afeb95965c82fbcd8ff72598",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
10
flake.nix
10
flake.nix
@@ -25,10 +25,6 @@
|
|||||||
url = "github:lelgenio/dzgui-nix";
|
url = "github:lelgenio/dzgui-nix";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
audio = {
|
|
||||||
url = "github:polygon/audio.nix";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
nix-minecraft.url = "github:Infinidoge/nix-minecraft";
|
nix-minecraft.url = "github:Infinidoge/nix-minecraft";
|
||||||
nix-minecraft.inputs.nixpkgs.follows = "nixpkgs";
|
nix-minecraft.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
@@ -43,8 +39,14 @@
|
|||||||
imports = [
|
imports = [
|
||||||
inputs.home-manager.flakeModules.home-manager
|
inputs.home-manager.flakeModules.home-manager
|
||||||
./hosts/comfy-station
|
./hosts/comfy-station
|
||||||
|
./hosts/monolith
|
||||||
|
./hosts/harbor
|
||||||
(./home + "/jonas@comfy-station")
|
(./home + "/jonas@comfy-station")
|
||||||
|
(./home + "/jonas@monolith")
|
||||||
|
(./home + "/jonas@harbor")
|
||||||
|
(./home + "/admin-jroeger")
|
||||||
(import-tree ./modules)
|
(import-tree ./modules)
|
||||||
|
(import-tree ./templates)
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,12 +5,7 @@
|
|||||||
home.homeDirectory = "/home/admin-jroeger";
|
home.homeDirectory = "/home/admin-jroeger";
|
||||||
|
|
||||||
# hive modules
|
# hive modules
|
||||||
hive.kitty.enable = true;
|
|
||||||
hive.ranger.enable = true;
|
|
||||||
hive.yubikey.enable = true;
|
|
||||||
hive.yubikey.pinentry = "gnome3";
|
hive.yubikey.pinentry = "gnome3";
|
||||||
hive.nix-scripts.enable = true;
|
|
||||||
hive.zsh.enable = true;
|
|
||||||
hive.doom.enable = true;
|
hive.doom.enable = true;
|
||||||
hive.doom.asDefaultEditor = true;
|
hive.doom.asDefaultEditor = true;
|
||||||
hive.doom.enableCopilot = true;
|
hive.doom.enableCopilot = true;
|
||||||
@@ -18,7 +13,6 @@
|
|||||||
hive.doom.withShellPkgs = true;
|
hive.doom.withShellPkgs = true;
|
||||||
hive.doom.withCXXPkgs = true;
|
hive.doom.withCXXPkgs = true;
|
||||||
hive.doom.withPythonPkgs = true;
|
hive.doom.withPythonPkgs = true;
|
||||||
hive.jj.enable = true;
|
|
||||||
|
|
||||||
# This value determines the Home Manager release that your configuration is
|
# This value determines the Home Manager release that your configuration is
|
||||||
# compatible with. This helps avoid breakage when a new Home Manager release
|
# compatible with. This helps avoid breakage when a new Home Manager release
|
||||||
21
home/admin-jroeger/default.nix
Normal file
21
home/admin-jroeger/default.nix
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
self,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
flake.homeConfigurations."admin-jroeger" = inputs.home-manager.lib.homeManagerConfiguration {
|
||||||
|
pkgs = import inputs.nixpkgs {system = "x86_64-linux";};
|
||||||
|
modules = [
|
||||||
|
({...}: {nixpkgs.config.allowUnfree = true;})
|
||||||
|
|
||||||
|
./configuration.nix
|
||||||
|
|
||||||
|
self.homeModules.ranger
|
||||||
|
self.homeModules.yubikey
|
||||||
|
self.homeModules.zsh
|
||||||
|
self.homeModules.nix-scripts
|
||||||
|
self.homeModules.doom
|
||||||
|
self.homeModules.jj
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -22,13 +22,12 @@
|
|||||||
keys = ["borg" "passgit"];
|
keys = ["borg" "passgit"];
|
||||||
};
|
};
|
||||||
hive.yubikey.withCCID = false;
|
hive.yubikey.withCCID = false;
|
||||||
#hive.doom.enable = true;
|
hive.doom.enable = true;
|
||||||
#hive.doom.asDefaultEditor = true;
|
hive.doom.asDefaultEditor = true;
|
||||||
#hive.doom.enableCopilot = true;
|
hive.doom.enableCopilot = true;
|
||||||
#hive.doom.withNixPkgs = true;
|
hive.doom.withNixPkgs = true;
|
||||||
#hive.doom.withShellPkgs = true;
|
hive.doom.withShellPkgs = true;
|
||||||
#hive.doom.withPythonPkgs = true;
|
hive.doom.withPythonPkgs = true;
|
||||||
#hive.jj.enable = true;
|
|
||||||
|
|
||||||
# Make session variables available in systemd units
|
# Make session variables available in systemd units
|
||||||
# SEE: https://github.com/nix-community/home-manager/pull/5543
|
# SEE: https://github.com/nix-community/home-manager/pull/5543
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
flake.homeConfigurations."jonas@comfy-station" = inputs.home-manager.lib.homeManagerConfiguration {
|
flake.homeConfigurations."jonas@comfy-station" = inputs.home-manager.lib.homeManagerConfiguration {
|
||||||
pkgs = import inputs.nixpkgs {system = "x86_64-linux";};
|
pkgs = import inputs.nixpkgs {system = "x86_64-linux";};
|
||||||
modules = [
|
modules = [
|
||||||
({...}: {nixpkgs.overlays = [self.overlays.unstable inputs.audio.overlays.default];})
|
({...}: {nixpkgs.overlays = [self.overlays.unstable];})
|
||||||
({...}: {nixpkgs.config.allowUnfree = true;})
|
({...}: {nixpkgs.config.allowUnfree = true;})
|
||||||
|
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
@@ -27,6 +27,8 @@
|
|||||||
self.homeModules.yubikey
|
self.homeModules.yubikey
|
||||||
self.homeModules.zsh
|
self.homeModules.zsh
|
||||||
self.homeModules.nix-scripts
|
self.homeModules.nix-scripts
|
||||||
|
self.homeModules.doom
|
||||||
|
self.homeModules.jj
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
home.homeDirectory = "/home/jonas";
|
home.homeDirectory = "/home/jonas";
|
||||||
|
|
||||||
# hive modules
|
# hive modules
|
||||||
hive.zsh.enable = true;
|
|
||||||
hive.nix-scripts.enable = true;
|
|
||||||
hive.ranger.enable = true;
|
|
||||||
hive.doom.enable = true;
|
hive.doom.enable = true;
|
||||||
hive.doom.asDefaultEditor = true;
|
hive.doom.asDefaultEditor = true;
|
||||||
hive.doom.withNixPkgs = true;
|
hive.doom.withNixPkgs = true;
|
||||||
21
home/jonas@harbor/default.nix
Normal file
21
home/jonas@harbor/default.nix
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
self,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
flake.homeConfigurations."jonas@harbor" = inputs.home-manager.lib.homeManagerConfiguration {
|
||||||
|
pkgs = import inputs.nixpkgs {system = "x86_64-linux";};
|
||||||
|
modules = [
|
||||||
|
({...}: {nixpkgs.config.allowUnfree = true;})
|
||||||
|
|
||||||
|
./configuration.nix
|
||||||
|
|
||||||
|
inputs.sops-nix.homeManagerModules.sops
|
||||||
|
self.homeModules.ranger
|
||||||
|
self.homeModules.zsh
|
||||||
|
self.homeModules.nix-scripts
|
||||||
|
self.homeModules.doom
|
||||||
|
self.homeModules.jj
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -12,11 +12,11 @@
|
|||||||
age.keyFile = "${home.homeDirectory}/.config/sops/age/keys.txt";
|
age.keyFile = "${home.homeDirectory}/.config/sops/age/keys.txt";
|
||||||
};
|
};
|
||||||
sops.secrets.gotifyDaemonToken = {
|
sops.secrets.gotifyDaemonToken = {
|
||||||
sopsFile = ../secrets/jonas/gotify.yaml;
|
sopsFile = ../../secrets/jonas/gotify.yaml;
|
||||||
key = "monolithDesktopToken";
|
key = "monolithDesktopToken";
|
||||||
};
|
};
|
||||||
sops.secrets.gotifyCLIToken = {
|
sops.secrets.gotifyCLIToken = {
|
||||||
sopsFile = ../secrets/jonas/gotify.yaml;
|
sopsFile = ../../secrets/jonas/gotify.yaml;
|
||||||
key = "cliToken";
|
key = "cliToken";
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -28,22 +28,7 @@
|
|||||||
hive.doom.withNixPkgs = true;
|
hive.doom.withNixPkgs = true;
|
||||||
hive.doom.withShellPkgs = true;
|
hive.doom.withShellPkgs = true;
|
||||||
hive.doom.withPythonPkgs = true;
|
hive.doom.withPythonPkgs = true;
|
||||||
hive.firefox = {
|
|
||||||
enable = true;
|
|
||||||
plasmaIntegration = false;
|
|
||||||
passFF = true;
|
|
||||||
};
|
|
||||||
hive.kdeconnect.enable = false;
|
|
||||||
hive.kdeconnect.indicatorOnly = false;
|
|
||||||
hive.nextcloud.enable = false; # kwallet bug
|
|
||||||
hive.nix-scripts.enable = true;
|
|
||||||
hive.ranger.enable = true;
|
|
||||||
hive.themes.layan.enable = true;
|
|
||||||
hive.yubikey.enable = true;
|
|
||||||
hive.zsh.enable = true;
|
|
||||||
hive.jj.enable = true;
|
|
||||||
hive.gotify = {
|
hive.gotify = {
|
||||||
cli.enable = true;
|
|
||||||
daemon.enable = true;
|
daemon.enable = true;
|
||||||
cli.tokenSopsKey = config.sops.secrets.gotifyCLIToken.name;
|
cli.tokenSopsKey = config.sops.secrets.gotifyCLIToken.name;
|
||||||
daemon.tokenSopsKey = config.sops.secrets.gotifyDaemonToken.name;
|
daemon.tokenSopsKey = config.sops.secrets.gotifyDaemonToken.name;
|
||||||
27
home/jonas@monolith/default.nix
Normal file
27
home/jonas@monolith/default.nix
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
self,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
flake.homeConfigurations."jonas@monolith" = inputs.home-manager.lib.homeManagerConfiguration {
|
||||||
|
pkgs = import inputs.nixpkgs {system = "x86_64-linux";};
|
||||||
|
modules = [
|
||||||
|
({...}: {nixpkgs.config.allowUnfree = true;})
|
||||||
|
|
||||||
|
./configuration.nix
|
||||||
|
|
||||||
|
inputs.sops-nix.homeManagerModules.sops
|
||||||
|
self.homeModules.layan
|
||||||
|
self.homeModules.nextcloud-client
|
||||||
|
self.homeModules.firefox
|
||||||
|
self.homeModules.kdeconnect
|
||||||
|
self.homeModules.ranger
|
||||||
|
self.homeModules.yubikey
|
||||||
|
self.homeModules.zsh
|
||||||
|
self.homeModules.nix-scripts
|
||||||
|
self.homeModules.doom
|
||||||
|
self.homeModules.jj
|
||||||
|
self.homeModules.gotify
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -28,6 +28,9 @@
|
|||||||
programs.zsh.enable = true;
|
programs.zsh.enable = true;
|
||||||
|
|
||||||
# hive modules
|
# hive modules
|
||||||
|
hive.hyprland.enable = true;
|
||||||
|
hive.hyprland.autologin = "jonas";
|
||||||
|
hive.kwallet.enable = true;
|
||||||
hive.kwallet.forUsers = ["jonas"];
|
hive.kwallet.forUsers = ["jonas"];
|
||||||
hive.virt-manager.enable = true;
|
hive.virt-manager.enable = true;
|
||||||
hive.virt-manager.forUsers = ["jonas"];
|
hive.virt-manager.forUsers = ["jonas"];
|
||||||
@@ -108,8 +111,6 @@
|
|||||||
trusted-users = [
|
trusted-users = [
|
||||||
"@wheel"
|
"@wheel"
|
||||||
];
|
];
|
||||||
max-jobs = 2;
|
|
||||||
cores = 8;
|
|
||||||
};
|
};
|
||||||
gc = {
|
gc = {
|
||||||
automatic = true;
|
automatic = true;
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
self.nixosModules.openhantek
|
self.nixosModules.openhantek
|
||||||
self.nixosModules.firefox
|
self.nixosModules.firefox
|
||||||
self.nixosModules.kdeconnect
|
self.nixosModules.kdeconnect
|
||||||
|
self.nixosModules.ntsync
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,7 +78,6 @@
|
|||||||
hive.nextcloud-instance.adminPasswordFile = config.sops.secrets.nextcloud-admin-pass.path;
|
hive.nextcloud-instance.adminPasswordFile = config.sops.secrets.nextcloud-admin-pass.path;
|
||||||
hive.nextcloud-instance.instanceFQDN = "nextcloud.jroeger.de";
|
hive.nextcloud-instance.instanceFQDN = "nextcloud.jroeger.de";
|
||||||
hive.minecraft-server.enable = true;
|
hive.minecraft-server.enable = true;
|
||||||
hive.nix-scripts.enable = true;
|
|
||||||
hive.borg-server.enable = true;
|
hive.borg-server.enable = true;
|
||||||
hive.borg-server.repositories.comfy-station.ssh_public_key = builtins.readFile (../../static/keys + "/borg-jonas@comfy-station.pub");
|
hive.borg-server.repositories.comfy-station.ssh_public_key = builtins.readFile (../../static/keys + "/borg-jonas@comfy-station.pub");
|
||||||
hive.wg.server.enable = true;
|
hive.wg.server.enable = true;
|
||||||
25
hosts/harbor/default.nix
Normal file
25
hosts/harbor/default.nix
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
inputs,
|
||||||
|
self,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
flake.nixosConfigurations.harbor = inputs.nixpkgs.lib.nixosSystem {
|
||||||
|
modules = [
|
||||||
|
({...}: {
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
})
|
||||||
|
|
||||||
|
./configuration.nix
|
||||||
|
|
||||||
|
inputs.sops-nix.nixosModules.sops
|
||||||
|
inputs.disko.nixosModules.disko
|
||||||
|
self.nixosModules.nix-scripts
|
||||||
|
self.nixosModules.gitea-instance
|
||||||
|
self.nixosModules.gotify-instance
|
||||||
|
self.nixosModules.nextcloud-instance
|
||||||
|
self.nixosModules.minecraft-server
|
||||||
|
self.nixosModules.borg-server
|
||||||
|
self.nixosModules.wireguard-server
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -49,45 +49,34 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
# hive modules
|
# hive modules
|
||||||
hive.nix-scripts.enable = true;
|
|
||||||
hive.displayManager.name = "sddm";
|
|
||||||
hive.themes.layan.enable = true;
|
|
||||||
hive.plasma.enable = true;
|
hive.plasma.enable = true;
|
||||||
|
hive.plasma.autologin = "jonas";
|
||||||
hive.kwallet.enable = true;
|
hive.kwallet.enable = true;
|
||||||
hive.kwallet.forUsers = ["jonas"];
|
hive.kwallet.forUsers = ["jonas"];
|
||||||
hive.virt-manager.enable = true;
|
hive.virt-manager.enable = true;
|
||||||
hive.virt-manager.forUsers = ["jonas"];
|
hive.virt-manager.forUsers = ["jonas"];
|
||||||
hive.bluetooth.enable = true;
|
|
||||||
hive.sound.enable = true;
|
|
||||||
hive.sound.noisetorch = true;
|
hive.sound.noisetorch = true;
|
||||||
hive.yubikey.enable = true;
|
|
||||||
hive.services.kdeconnect.enable = true;
|
|
||||||
hive.wg.client.enable = true;
|
|
||||||
hive.wg.client.privateKeyFile = config.sops.secrets.wg-priv.path;
|
hive.wg.client.privateKeyFile = config.sops.secrets.wg-priv.path;
|
||||||
hive.wg.client.peer = "monolith";
|
hive.wg.client.peer = "monolith";
|
||||||
hive.programs.games.enable = true;
|
|
||||||
hive.programs.games.dayz = true;
|
hive.programs.games.dayz = true;
|
||||||
hive.programs.games.lutris = true;
|
hive.programs.games.lutris = true;
|
||||||
hive.programs.games.steam = true;
|
hive.programs.games.steam = true;
|
||||||
hive.programs.games.wine = true;
|
hive.programs.games.wine = true;
|
||||||
hive.programs.creative = {
|
hive.programs.creative = {
|
||||||
enable = true;
|
|
||||||
image-management = true;
|
image-management = true;
|
||||||
image-editing = true;
|
image-editing = true;
|
||||||
image-raw-processing = true;
|
image-raw-processing = true;
|
||||||
video-editing-light = true;
|
video-editing-light = true;
|
||||||
video-editing-heavy = true;
|
video-editing-heavy = true;
|
||||||
daws = true;
|
|
||||||
};
|
|
||||||
hive.programs.utils = {
|
|
||||||
enable = true;
|
|
||||||
camera = true;
|
|
||||||
};
|
};
|
||||||
hive.programs.spotify-shortcuts = {
|
hive.programs.spotify-shortcuts = {
|
||||||
enable = true;
|
enable = true;
|
||||||
clientIdSopsKey = config.sops.secrets.spotifyShortcutsClientId.name;
|
clientIdSopsKey = config.sops.secrets.spotifyShortcutsClientId.name;
|
||||||
clientSecretSopsKey = config.sops.secrets.spotifyShortcutsClientSecret.name;
|
clientSecretSopsKey = config.sops.secrets.spotifyShortcutsClientSecret.name;
|
||||||
};
|
};
|
||||||
|
hive.ntsync.enable = true;
|
||||||
|
|
||||||
|
services.flatpak.enable = true;
|
||||||
|
|
||||||
# system packages
|
# system packages
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
@@ -114,7 +103,6 @@
|
|||||||
nix-index
|
nix-index
|
||||||
nix-output-monitor
|
nix-output-monitor
|
||||||
obsidian
|
obsidian
|
||||||
openhantek6022
|
|
||||||
qalculate-qt
|
qalculate-qt
|
||||||
qdirstat
|
qdirstat
|
||||||
qtpass
|
qtpass
|
||||||
@@ -131,23 +119,8 @@
|
|||||||
nixpkgs.config.permittedInsecurePackages = [
|
nixpkgs.config.permittedInsecurePackages = [
|
||||||
"electron-25.9.0" # required by obsidian
|
"electron-25.9.0" # required by obsidian
|
||||||
];
|
];
|
||||||
services.udev.packages = [pkgs.openhantek6022];
|
|
||||||
virtualisation.docker.enable = true;
|
virtualisation.docker.enable = true;
|
||||||
|
|
||||||
# Corsair drivers
|
|
||||||
hardware.ckb-next = {
|
|
||||||
enable = true;
|
|
||||||
# Workarount until https://github.com/NixOS/nixpkgs/issues/444209
|
|
||||||
# is fixed
|
|
||||||
package = pkgs.ckb-next.overrideAttrs (prev: {
|
|
||||||
cmakeFlags =
|
|
||||||
(prev.cmakeFlags or [])
|
|
||||||
++ [
|
|
||||||
"-DUSE_DBUS_MENU=0"
|
|
||||||
];
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
# dpi correction
|
# dpi correction
|
||||||
services.xserver.dpi = 91;
|
services.xserver.dpi = 91;
|
||||||
environment.variables = {
|
environment.variables = {
|
||||||
@@ -169,46 +142,6 @@
|
|||||||
"QT_AUTO_SCREEN_SCALE_FACTOR"
|
"QT_AUTO_SCREEN_SCALE_FACTOR"
|
||||||
];
|
];
|
||||||
|
|
||||||
# Enable OpenGL
|
|
||||||
hardware.graphics = {
|
|
||||||
enable = true;
|
|
||||||
enable32Bit = true;
|
|
||||||
extraPackages = [pkgs.rocmPackages.clr];
|
|
||||||
};
|
|
||||||
|
|
||||||
# Load nvidia driver for Xorg and Wayland
|
|
||||||
services.xserver.videoDrivers = ["nvidia"];
|
|
||||||
|
|
||||||
hardware.nvidia = {
|
|
||||||
# Modesetting is required.
|
|
||||||
modesetting.enable = true;
|
|
||||||
|
|
||||||
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
|
|
||||||
# Enable this if you have graphical corruption issues or application crashes after waking
|
|
||||||
# up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
|
|
||||||
# of just the bare essentials.
|
|
||||||
powerManagement.enable = false;
|
|
||||||
|
|
||||||
# Fine-grained power management. Turns off GPU when not in use.
|
|
||||||
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
|
|
||||||
powerManagement.finegrained = false;
|
|
||||||
|
|
||||||
# Use the NVidia open source kernel module (not to be confused with the
|
|
||||||
# independent third-party "nouveau" open source driver).
|
|
||||||
# Support is limited to the Turing and later architectures. Full list of
|
|
||||||
# supported GPUs is at:
|
|
||||||
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
|
|
||||||
# Only available from driver 515.43.04+
|
|
||||||
open = false;
|
|
||||||
|
|
||||||
# Enable the Nvidia settings menu,
|
|
||||||
# accessible via `nvidia-settings`.
|
|
||||||
nvidiaSettings = true;
|
|
||||||
|
|
||||||
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
|
||||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
|
||||||
};
|
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
# This value determines the NixOS release from which the default
|
||||||
# settings for stateful data, like file locations and database versions
|
# settings for stateful data, like file locations and database versions
|
||||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||||
@@ -241,6 +174,7 @@
|
|||||||
boot.plymouth.enable = true;
|
boot.plymouth.enable = true;
|
||||||
boot.initrd.systemd.enable = true;
|
boot.initrd.systemd.enable = true;
|
||||||
boot.supportedFilesystems = ["ntfs"];
|
boot.supportedFilesystems = ["ntfs"];
|
||||||
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
|
||||||
# Configure console keymap
|
# Configure console keymap
|
||||||
console.keyMap = "de";
|
console.keyMap = "de";
|
||||||
38
hosts/monolith/default.nix
Normal file
38
hosts/monolith/default.nix
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
inputs,
|
||||||
|
self,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
flake.nixosConfigurations.monolith = inputs.nixpkgs.lib.nixosSystem {
|
||||||
|
modules = [
|
||||||
|
({...}: {
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
nixpkgs.config.nvidia.acceptLicense = true;
|
||||||
|
})
|
||||||
|
|
||||||
|
./configuration.nix
|
||||||
|
|
||||||
|
inputs.nixos-hardware.nixosModules.msi-b550-a-pro
|
||||||
|
inputs.sops-nix.nixosModules.sops
|
||||||
|
self.nixosModules.nvidia
|
||||||
|
self.nixosModules.ckb-next
|
||||||
|
self.nixosModules.plasma
|
||||||
|
self.nixosModules.plasma-fix
|
||||||
|
self.nixosModules.layan
|
||||||
|
self.nixosModules.nix-scripts
|
||||||
|
self.nixosModules.kwallet
|
||||||
|
self.nixosModules.virt-manager
|
||||||
|
self.nixosModules.bluetooth
|
||||||
|
self.nixosModules.sound
|
||||||
|
self.nixosModules.yubikey
|
||||||
|
self.nixosModules.wireguard-client
|
||||||
|
self.nixosModules.games
|
||||||
|
self.nixosModules.creative
|
||||||
|
self.nixosModules.openhantek
|
||||||
|
self.nixosModules.firefox
|
||||||
|
self.nixosModules.kdeconnect
|
||||||
|
self.nixosModules.spotify-shortcuts
|
||||||
|
self.nixosModules.ntsync
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -5,31 +5,34 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
cfg = config.hive.displayManager;
|
cfg = config.hive.hyprland;
|
||||||
in {
|
in {
|
||||||
options.hive.displayManager = with lib; {
|
options.hive.hyprland = with lib; {
|
||||||
|
enable = mkEnableOption "Enable Hyprland Wayland compositor";
|
||||||
autologin = mkOption {
|
autologin = mkOption {
|
||||||
type = types.nullOr types.str;
|
type = types.nullOr types.str;
|
||||||
default = null;
|
default = null;
|
||||||
description = "The autologin username or null for no autologin.";
|
description = "The autologin username or null for no autologin.";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
config = {
|
config = lib.mkIf cfg.enable {
|
||||||
services.xserver.enable = true;
|
services.displayManager = {
|
||||||
services.xserver = {
|
autoLogin.enable = cfg.autologin != null;
|
||||||
xkb.layout = "de";
|
autoLogin.user = cfg.autologin;
|
||||||
xkb.variant = "";
|
sddm = {
|
||||||
xkb.options = "caps:ctrl_modifier";
|
|
||||||
};
|
|
||||||
services.displayManager.autoLogin.enable = cfg.autologin != null;
|
|
||||||
services.displayManager.autoLogin.user = cfg.autologin;
|
|
||||||
|
|
||||||
services.libinput.enable = true;
|
|
||||||
services.dbus.enable = true;
|
|
||||||
services.displayManager.sddm = {
|
|
||||||
enable = true;
|
enable = true;
|
||||||
wayland.enable = true;
|
wayland.enable = true;
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.hyprland = {
|
||||||
|
enable = true;
|
||||||
|
withUWSM = true;
|
||||||
|
xwayland.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.libinput.enable = true;
|
||||||
|
services.dbus.enable = true;
|
||||||
|
|
||||||
xdg.portal = {
|
xdg.portal = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -41,14 +44,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [spaceFM];
|
environment.systemPackages = with pkgs; [spaceFM];
|
||||||
|
|
||||||
services.udisks2.enable = true;
|
services.udisks2.enable = true;
|
||||||
|
|
||||||
programs.hyprland = {
|
|
||||||
enable = true;
|
|
||||||
withUWSM = true;
|
|
||||||
xwayland.enable = true;
|
|
||||||
};
|
|
||||||
programs.hyprlock.enable = true;
|
programs.hyprlock.enable = true;
|
||||||
security.pam.services.hyprlock = {};
|
security.pam.services.hyprlock = {};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
cfg = config.hive.kwallet;
|
cfg = config.hive.kwallet;
|
||||||
in {
|
in {
|
||||||
options.hive.kwallet = {
|
options.hive.kwallet = {
|
||||||
|
enable = lib.mkEnableOption "Enable kwallet integration with pam.";
|
||||||
forUsers = lib.mkOption {
|
forUsers = lib.mkOption {
|
||||||
type = lib.types.listOf lib.types.str;
|
type = lib.types.listOf lib.types.str;
|
||||||
default = [];
|
default = [];
|
||||||
@@ -17,7 +18,7 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = lib.mkIf cfg.enable {
|
||||||
environment.systemPackages = with pkgs.kdePackages; [
|
environment.systemPackages = with pkgs.kdePackages; [
|
||||||
kwallet
|
kwallet
|
||||||
kwalletmanager
|
kwalletmanager
|
||||||
|
|||||||
58
modules/desktop/plasma-fix.nix
Normal file
58
modules/desktop/plasma-fix.nix
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
{
|
||||||
|
# https://github.com/NixOS/nixpkgs/issues/126590#issuecomment-3194531220
|
||||||
|
flake.nixosModules.plasma-fix = {
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
nixpkgs.overlays = lib.singleton (final: prev: {
|
||||||
|
kdePackages =
|
||||||
|
prev.kdePackages
|
||||||
|
// {
|
||||||
|
plasma-workspace = let
|
||||||
|
# the package we want to override
|
||||||
|
basePkg = prev.kdePackages.plasma-workspace;
|
||||||
|
|
||||||
|
# a helper package that merges all the XDG_DATA_DIRS into a single directory
|
||||||
|
xdgdataPkg = pkgs.stdenv.mkDerivation {
|
||||||
|
name = "${basePkg.name}-xdgdata";
|
||||||
|
buildInputs = [basePkg];
|
||||||
|
dontUnpack = true;
|
||||||
|
dontFixup = true;
|
||||||
|
dontWrapQtApps = true;
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/share
|
||||||
|
( IFS=:
|
||||||
|
for DIR in $XDG_DATA_DIRS; do
|
||||||
|
if [[ -d "$DIR" ]]; then
|
||||||
|
cp -r $DIR/. $out/share/
|
||||||
|
chmod -R u+w $out/share
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
)
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
# undo the XDG_DATA_DIRS injection that is usually done in the qt wrapper
|
||||||
|
# script and instead inject the path of the above helper package
|
||||||
|
derivedPkg = basePkg.overrideAttrs {
|
||||||
|
preFixup = ''
|
||||||
|
for index in "''${!qtWrapperArgs[@]}"; do
|
||||||
|
if [[ ''${qtWrapperArgs[$((index+0))]} == "--prefix" ]] && [[ ''${qtWrapperArgs[$((index+1))]} == "XDG_DATA_DIRS" ]]; then
|
||||||
|
unset -v "qtWrapperArgs[$((index+0))]"
|
||||||
|
unset -v "qtWrapperArgs[$((index+1))]"
|
||||||
|
unset -v "qtWrapperArgs[$((index+2))]"
|
||||||
|
unset -v "qtWrapperArgs[$((index+3))]"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
qtWrapperArgs=("''${qtWrapperArgs[@]}")
|
||||||
|
qtWrapperArgs+=(--prefix XDG_DATA_DIRS : "${xdgdataPkg}/share")
|
||||||
|
qtWrapperArgs+=(--prefix XDG_DATA_DIRS : "$out/share")
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
in
|
||||||
|
derivedPkg;
|
||||||
|
};
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
||||||
38
modules/desktop/plasma.nix
Normal file
38
modules/desktop/plasma.nix
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
flake.nixosModules.plasma = {
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.hive.plasma;
|
||||||
|
in {
|
||||||
|
options.hive.plasma = {
|
||||||
|
enable = lib.mkEnableOption "Enable Plasma 6 desktop environment";
|
||||||
|
autologin = lib.mkOption {
|
||||||
|
type = lib.types.nullOr lib.types.str;
|
||||||
|
default = null;
|
||||||
|
description = "The autologin username or null for no autologin.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
services.displayManager = {
|
||||||
|
autoLogin.enable = cfg.autologin != null;
|
||||||
|
autoLogin.user = cfg.autologin;
|
||||||
|
sddm = {
|
||||||
|
enable = true;
|
||||||
|
wayland.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
services.desktopManager.plasma6.enable = true;
|
||||||
|
xdg.portal = {
|
||||||
|
enable = true;
|
||||||
|
extraPortals = with pkgs; [
|
||||||
|
kdePackages.xdg-desktop-portal-kde
|
||||||
|
xdg-desktop-portal-gtk
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,4 +1,18 @@
|
|||||||
{self, ...}: {
|
{self, ...}: {
|
||||||
|
flake.nixosModules.layan = {pkgs, ...}: {
|
||||||
|
imports = [
|
||||||
|
self.nixosModules.unstable-overlay
|
||||||
|
self.nixosModules.layan-qt6-overlay
|
||||||
|
];
|
||||||
|
environment.systemPackages = [
|
||||||
|
pkgs.layan-qt6
|
||||||
|
pkgs.kdePackages.qtstyleplugin-kvantum
|
||||||
|
pkgs.unstable.layan-cursors
|
||||||
|
pkgs.layan-gtk-theme
|
||||||
|
pkgs.tela-circle-icon-theme
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
flake.homeModules.layan = {
|
flake.homeModules.layan = {
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
32
modules/docs.nix
Normal file
32
modules/docs.nix
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
self,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
perSystem = {
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
system,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
packages.docs = let
|
||||||
|
nixos = inputs.nixpkgs.lib.nixosSystem {
|
||||||
|
inherit system;
|
||||||
|
modules =
|
||||||
|
[
|
||||||
|
inputs.sops-nix.nixosModules.sops
|
||||||
|
]
|
||||||
|
++ lib.attrValues self.nixosModules;
|
||||||
|
};
|
||||||
|
doc = pkgs.nixosOptionsDoc {options.hive = nixos.options.hive;};
|
||||||
|
in
|
||||||
|
pkgs.stdenvNoCC.mkDerivation {
|
||||||
|
name = ".hive-docs";
|
||||||
|
buildCommand = ''
|
||||||
|
mkdir -p $out
|
||||||
|
cp ${doc.optionsCommonMark} $out/docs.md
|
||||||
|
${pkgs.pandoc}/bin/pandoc -o $out/docs.html $out/docs.md
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
295
modules/doom/doom.nix
Normal file
295
modules/doom/doom.nix
Normal file
@@ -0,0 +1,295 @@
|
|||||||
|
{self, ...}: {
|
||||||
|
flake.homeModules.doom = {
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.hive.doom;
|
||||||
|
doom-pkgs = with pkgs; [
|
||||||
|
cmake
|
||||||
|
emacs-all-the-icons-fonts
|
||||||
|
fira
|
||||||
|
fira-code-symbols
|
||||||
|
fontconfig
|
||||||
|
gcc
|
||||||
|
nerd-fonts.fira-code
|
||||||
|
];
|
||||||
|
default-core-pkgs = with pkgs; [
|
||||||
|
(ripgrep.override {withPCRE2 = true;})
|
||||||
|
(aspellWithDicts (d: [d.en d.de d.en-computers d.en-science]))
|
||||||
|
binutils
|
||||||
|
editorconfig-core-c
|
||||||
|
fd
|
||||||
|
git
|
||||||
|
gnumake
|
||||||
|
gnutls
|
||||||
|
ispell
|
||||||
|
libtool
|
||||||
|
vscode-langservers-extracted
|
||||||
|
(pkgs.stdenvNoCC.mkDerivation {
|
||||||
|
name = "epdfinfo";
|
||||||
|
phases = "installPhase";
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
ln -s $(${pkgs.findutils}/bin/find ${pkgs.emacsPackages.pdf-tools}/ -name epdfinfo) $out/bin/
|
||||||
|
'';
|
||||||
|
})
|
||||||
|
];
|
||||||
|
default-shell-pkgs = with pkgs; [
|
||||||
|
bash-language-server
|
||||||
|
];
|
||||||
|
default-nix-pkgs = with pkgs; [
|
||||||
|
alejandra
|
||||||
|
nixd
|
||||||
|
];
|
||||||
|
default-latex-pkgs = with pkgs; [
|
||||||
|
pandoc
|
||||||
|
poppler
|
||||||
|
texlab
|
||||||
|
texlive.combined.scheme-medium
|
||||||
|
];
|
||||||
|
default-cxx-pkgs = with pkgs; [
|
||||||
|
clang
|
||||||
|
clang-tools
|
||||||
|
cmake
|
||||||
|
cppcheck
|
||||||
|
doxygen
|
||||||
|
gdb
|
||||||
|
ninja
|
||||||
|
];
|
||||||
|
default-python-pkgs = with pkgs; [
|
||||||
|
python312
|
||||||
|
python312Packages.black
|
||||||
|
pyright
|
||||||
|
];
|
||||||
|
doom-path-pkgs =
|
||||||
|
lib.optionals cfg.withLatexPkgs (cfg.overrideLatexPkgs default-latex-pkgs)
|
||||||
|
++ lib.optionals cfg.withShellPkgs (cfg.overrideShellPkgs default-shell-pkgs)
|
||||||
|
++ lib.optionals cfg.withNixPkgs (cfg.overrideNixPkgs default-nix-pkgs)
|
||||||
|
++ lib.optionals cfg.withCXXPkgs (cfg.overrideCXXPkgs default-cxx-pkgs)
|
||||||
|
++ lib.optionals cfg.withPythonPkgs (cfg.overridePythonPkgs default-python-pkgs)
|
||||||
|
++ lib.optional cfg.enableCopilot pkgs.unstable.copilot-language-server
|
||||||
|
++ default-core-pkgs;
|
||||||
|
doom-socket-name = "main";
|
||||||
|
wrapped-emacs = pkgs.symlinkJoin {
|
||||||
|
name = "wrapped-emacs";
|
||||||
|
paths = [pkgs.emacs30];
|
||||||
|
nativeBuildInputs = [pkgs.makeBinaryWrapper];
|
||||||
|
postBuild = ''
|
||||||
|
wrapProgram $out/bin/emacs \
|
||||||
|
--prefix PATH : ${lib.makeBinPath doom-path-pkgs} \
|
||||||
|
--add-flags "--init-directory=${config.xdg.configHome}/doom-emacs" \
|
||||||
|
--set DOOMDIR "${config.home.sessionVariables.DOOMDIR}" \
|
||||||
|
--set DOOMLOCALDIR "${config.home.sessionVariables.DOOMLOCALDIR}"
|
||||||
|
|
||||||
|
wrapProgram $out/bin/emacsclient \
|
||||||
|
--prefix PATH : ${lib.makeBinPath doom-path-pkgs} \
|
||||||
|
--set DOOMDIR "${config.home.sessionVariables.DOOMDIR}" \
|
||||||
|
--set DOOMLOCALDIR "${config.home.sessionVariables.DOOMLOCALDIR}"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
doom-setup = pkgs.writeShellScript "doom-setup" ''
|
||||||
|
export PATH="${lib.makeBinPath doom-path-pkgs}:$PATH"
|
||||||
|
export EMACS="${wrapped-emacs}/bin/emacs"
|
||||||
|
export DOOMDIR="${config.home.sessionVariables.DOOMDIR}"
|
||||||
|
export DOOMLOCALDIR="${config.home.sessionVariables.DOOMLOCALDIR}"
|
||||||
|
if [ ! -d "$DOOMLOCALDIR" ]; then
|
||||||
|
${config.xdg.configHome}/doom-emacs/bin/doom install --force --no-env
|
||||||
|
else
|
||||||
|
${config.xdg.configHome}/doom-emacs/bin/doom "$@"
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
doom-open = pkgs.writeShellScriptBin "doom-open" ''
|
||||||
|
export EMACS_SOCKET_NAME="$XDG_RUNTIME_DIR/emacs/${doom-socket-name}"
|
||||||
|
if [ -t 0 ]; then
|
||||||
|
exec ${wrapped-emacs}/bin/emacsclient -t "$@"
|
||||||
|
else
|
||||||
|
exec ${wrapped-emacs}/bin/emacsclient -c "$@"
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
in {
|
||||||
|
options.hive.doom = {
|
||||||
|
enable = lib.mkEnableOption "Enable Doom Emacs";
|
||||||
|
asDefaultEditor = lib.mkEnableOption "set the EDITOR variable to use the current emacs server (graphical/non-graphical)";
|
||||||
|
enableCopilot = lib.mkEnableOption "Enable Copilot in Doom Emacs";
|
||||||
|
enableTidal = lib.mkEnableOption "Enable TidalCycles";
|
||||||
|
withLatexPkgs = lib.mkEnableOption "Enable LaTeX packages in doom path";
|
||||||
|
withShellPkgs = lib.mkEnableOption "Enable shell packages in doom path";
|
||||||
|
withNixPkgs = lib.mkEnableOption "Enable LaTeX packages in doom path";
|
||||||
|
withCXXPkgs = lib.mkEnableOption "Enable CXX packages in doom path";
|
||||||
|
withPythonPkgs = lib.mkEnableOption "Enable python packages in doom path";
|
||||||
|
overrideLatexPkgs = lib.mkOption {
|
||||||
|
type = lib.types.functionTo (lib.types.listOf lib.types.package);
|
||||||
|
default = pkgs: pkgs;
|
||||||
|
example = ''
|
||||||
|
prev: with pkgs; [
|
||||||
|
texlive.combined.scheme-full
|
||||||
|
]
|
||||||
|
'';
|
||||||
|
description = "Override the default LaTeX packages in the doom path.";
|
||||||
|
};
|
||||||
|
overrideShellPkgs = lib.mkOption {
|
||||||
|
type = lib.types.functionTo (lib.types.listOf lib.types.package);
|
||||||
|
default = pkgs: pkgs;
|
||||||
|
example = ''
|
||||||
|
prev: with pkgs; [
|
||||||
|
shellcheck
|
||||||
|
]
|
||||||
|
'';
|
||||||
|
description = "Override the default shell packages in the doom path.";
|
||||||
|
};
|
||||||
|
overrideNixPkgs = lib.mkOption {
|
||||||
|
type = lib.types.functionTo (lib.types.listOf lib.types.package);
|
||||||
|
default = pkgs: pkgs;
|
||||||
|
example = ''
|
||||||
|
prev: with pkgs; [
|
||||||
|
nixpkgs-fmt
|
||||||
|
]
|
||||||
|
'';
|
||||||
|
description = "Override the default Nix packages in the doom path.";
|
||||||
|
};
|
||||||
|
overrideCXXPkgs = lib.mkOption {
|
||||||
|
type = lib.types.functionTo (lib.types.listOf lib.types.package);
|
||||||
|
default = pkgs: pkgs;
|
||||||
|
example = ''
|
||||||
|
prev: with pkgs; [
|
||||||
|
openmp
|
||||||
|
]
|
||||||
|
'';
|
||||||
|
description = "Override the default C++ packages in the doom path.";
|
||||||
|
};
|
||||||
|
overridePythonPkgs = lib.mkOption {
|
||||||
|
type = lib.types.functionTo (lib.types.listOf lib.types.package);
|
||||||
|
default = pkgs: pkgs;
|
||||||
|
example = ''
|
||||||
|
prev: with pkgs; [
|
||||||
|
pythonPackages.black
|
||||||
|
]
|
||||||
|
'';
|
||||||
|
description = "Override the default Python packages in the doom path.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
# for copilot ls
|
||||||
|
self.homeModules.unstable-overlay
|
||||||
|
];
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
fonts.fontconfig.enable = true;
|
||||||
|
|
||||||
|
programs.emacs = {
|
||||||
|
enable = true;
|
||||||
|
package = wrapped-emacs;
|
||||||
|
};
|
||||||
|
|
||||||
|
home = {
|
||||||
|
sessionPath = ["${config.xdg.configHome}/doom-emacs/bin"];
|
||||||
|
sessionVariables =
|
||||||
|
{
|
||||||
|
DOOMDIR = "${config.xdg.configHome}/doom-config";
|
||||||
|
DOOMLOCALDIR = "${config.xdg.configHome}/doom-local";
|
||||||
|
}
|
||||||
|
// lib.optionalAttrs cfg.asDefaultEditor {
|
||||||
|
EDITOR = "${doom-open.name}";
|
||||||
|
};
|
||||||
|
packages = doom-pkgs ++ lib.optional cfg.asDefaultEditor doom-open;
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.user.services.doom-emacs-server = {
|
||||||
|
Unit = {
|
||||||
|
Description = "Doom Emacs Server";
|
||||||
|
};
|
||||||
|
Service = {
|
||||||
|
ExecStart = "${wrapped-emacs}/bin/emacs --fg-daemon=${doom-socket-name}";
|
||||||
|
SuccessExitStatus = 15;
|
||||||
|
};
|
||||||
|
Install = {
|
||||||
|
WantedBy = []; # Lazy start by socket
|
||||||
|
};
|
||||||
|
};
|
||||||
|
systemd.user.sockets.doom-emacs-server = {
|
||||||
|
Socket = {
|
||||||
|
ListenStream = "/run/user/%U/emacs/${doom-socket-name}";
|
||||||
|
DirectoryMode = "0700";
|
||||||
|
};
|
||||||
|
Install = {
|
||||||
|
WantedBy = ["sockets.target"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
xdg = {
|
||||||
|
enable = true;
|
||||||
|
configFile = {
|
||||||
|
"doom-config/splash.png" = {
|
||||||
|
source = ./static/splash.png;
|
||||||
|
};
|
||||||
|
"doom-config/config.el" = {
|
||||||
|
source = ./static/config.el;
|
||||||
|
};
|
||||||
|
"doom-config/config.d/copilot.el" = {
|
||||||
|
enable = cfg.enableCopilot;
|
||||||
|
source = ./static/config.d/copilot.el;
|
||||||
|
};
|
||||||
|
"doom-config/packages/treesit-docgen.el" = {
|
||||||
|
source = ./static/packages/treesit-docgen.el;
|
||||||
|
};
|
||||||
|
"doom-config/init.el" = {
|
||||||
|
source = ./static/init.el;
|
||||||
|
onChange = "${doom-setup} sync --force -e";
|
||||||
|
};
|
||||||
|
"doom-config/packages.el" = {
|
||||||
|
source = ./static/packages.el;
|
||||||
|
onChange = "${doom-setup} sync --force -u -e";
|
||||||
|
};
|
||||||
|
"doom-config/packages.d/copilot.el" = {
|
||||||
|
enable = cfg.enableCopilot;
|
||||||
|
source = ./static/packages.d/copilot.el;
|
||||||
|
onChange = "${doom-setup} sync --force -u -e";
|
||||||
|
};
|
||||||
|
"doom-config/packages.d/tidal.el" = {
|
||||||
|
enable = cfg.enableTidal;
|
||||||
|
source = ./static/packages.d/tidal.el;
|
||||||
|
onChange = "${doom-setup} sync --force -u -e";
|
||||||
|
};
|
||||||
|
"doom-emacs" = {
|
||||||
|
source = builtins.fetchGit {
|
||||||
|
url = "https://github.com/doomemacs/doomemacs";
|
||||||
|
rev = "a0d6aac43fc94def29c98826e2f0088bcb703d13";
|
||||||
|
};
|
||||||
|
onChange = "${doom-setup} --force sync -u -e";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
desktopEntries = {
|
||||||
|
emacs = {
|
||||||
|
name = "Doom Emacs";
|
||||||
|
genericName = "Text Editor";
|
||||||
|
icon = ./static/icon.png;
|
||||||
|
exec = "${wrapped-emacs}/bin/emacs %F";
|
||||||
|
terminal = false;
|
||||||
|
categories = ["Application" "Development" "TextEditor"];
|
||||||
|
mimeType = ["text/*"];
|
||||||
|
settings = {
|
||||||
|
StartupWMClass = "Doom Emacs";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
emacsclient = {
|
||||||
|
name = "Doom Emacs (Client)";
|
||||||
|
genericName = "Text Editor";
|
||||||
|
icon = ./static/icon.png;
|
||||||
|
exec = ''
|
||||||
|
sh -c "if [ -n \\"\\$*\\" ]; then exec ${wrapped-emacs}/bin/emacsclient --alternate-editor= --display=\\"\\$DISPLAY\\" \\"\\$@\\"; else exec emacsclient --alternate-editor= --create-frame; fi" sh %F
|
||||||
|
'';
|
||||||
|
terminal = false;
|
||||||
|
categories = ["Application" "Development" "TextEditor"];
|
||||||
|
mimeType = ["text/*"];
|
||||||
|
settings = {
|
||||||
|
StartupWMClass = "Doom Emacs";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
Before Width: | Height: | Size: 126 KiB After Width: | Height: | Size: 126 KiB |
@@ -92,7 +92,7 @@
|
|||||||
;;collab ; buffers with friends
|
;;collab ; buffers with friends
|
||||||
(debugger +realgud +lsp) ; FIXME stepping through code, to help you add bugs
|
(debugger +realgud +lsp) ; FIXME stepping through code, to help you add bugs
|
||||||
;;direnv
|
;;direnv
|
||||||
;;docker
|
docker
|
||||||
;;editorconfig ; let someone else argue about tabs vs spaces
|
;;editorconfig ; let someone else argue about tabs vs spaces
|
||||||
ein ; tame Jupyter notebooks with emacs
|
ein ; tame Jupyter notebooks with emacs
|
||||||
(eval +overlay) ; run code, run (also, repls)
|
(eval +overlay) ; run code, run (also, repls)
|
||||||
|
Before Width: | Height: | Size: 165 KiB After Width: | Height: | Size: 165 KiB |
17
modules/hardware/ckb-next.nix
Normal file
17
modules/hardware/ckb-next.nix
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
flake.nixosModules.ckb-next = {pkgs, ...}: {
|
||||||
|
# Corsair drivers
|
||||||
|
hardware.ckb-next = {
|
||||||
|
enable = true;
|
||||||
|
# Workarount until https://github.com/NixOS/nixpkgs/issues/444209
|
||||||
|
# is fixed
|
||||||
|
package = pkgs.ckb-next.overrideAttrs (prev: {
|
||||||
|
cmakeFlags =
|
||||||
|
(prev.cmakeFlags or [])
|
||||||
|
++ [
|
||||||
|
"-DUSE_DBUS_MENU=0"
|
||||||
|
];
|
||||||
|
});
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
47
modules/hardware/nvidia.nix
Normal file
47
modules/hardware/nvidia.nix
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
{
|
||||||
|
flake.nixosModules.nvidia = {
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
# Enable OpenGL
|
||||||
|
hardware.graphics = {
|
||||||
|
enable = true;
|
||||||
|
enable32Bit = true;
|
||||||
|
extraPackages = [pkgs.rocmPackages.clr];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Load nvidia driver for Xorg and Wayland
|
||||||
|
services.xserver.videoDrivers = ["nvidia"];
|
||||||
|
|
||||||
|
hardware.nvidia = {
|
||||||
|
# Modesetting is required.
|
||||||
|
modesetting.enable = true;
|
||||||
|
|
||||||
|
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
|
||||||
|
# Enable this if you have graphical corruption issues or application crashes after waking
|
||||||
|
# up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
|
||||||
|
# of just the bare essentials.
|
||||||
|
powerManagement.enable = false;
|
||||||
|
|
||||||
|
# Fine-grained power management. Turns off GPU when not in use.
|
||||||
|
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
|
||||||
|
powerManagement.finegrained = false;
|
||||||
|
|
||||||
|
# Use the NVidia open source kernel module (not to be confused with the
|
||||||
|
# independent third-party "nouveau" open source driver).
|
||||||
|
# Support is limited to the Turing and later architectures. Full list of
|
||||||
|
# supported GPUs is at:
|
||||||
|
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
|
||||||
|
# Only available from driver 515.43.04+
|
||||||
|
open = false;
|
||||||
|
|
||||||
|
# Enable the Nvidia settings menu,
|
||||||
|
# accessible via `nvidia-settings`.
|
||||||
|
nvidiaSettings = true;
|
||||||
|
|
||||||
|
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
||||||
|
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -6,9 +6,10 @@
|
|||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
cfg = config.hive.wg.server;
|
cfg = config.hive.wg.server;
|
||||||
peers = import ./peers.nix {inherit lib;};
|
peers = import ./_peers.nix {inherit lib;};
|
||||||
in {
|
in {
|
||||||
options.hive.wg.server = {
|
options.hive.wg.server = {
|
||||||
|
enable = lib.mkEnableOption "Enable WireGuard server";
|
||||||
port = lib.mkOption {
|
port = lib.mkOption {
|
||||||
type = lib.types.port;
|
type = lib.types.port;
|
||||||
default = 51820;
|
default = 51820;
|
||||||
@@ -20,7 +21,7 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = lib.mkIf cfg.enable {
|
||||||
# Firewall rule
|
# Firewall rule
|
||||||
networking.firewall.allowedUDPPorts = [cfg.port];
|
networking.firewall.allowedUDPPorts = [cfg.port];
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
flake.overlays.spotify-shortcuts = final: prev: {
|
|
||||||
bulk-transcode = final.callPackage ./_derivation.nix {};
|
|
||||||
};
|
|
||||||
perSystem = {pkgs, ...}: {
|
|
||||||
packages.spotify-shortcuts = pkgs.callPackage ./_derivation.nix {};
|
|
||||||
devShells.spotify-shortcuts = import ./_shell.nix {inherit pkgs;};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
{
|
{self, ...}: {
|
||||||
flake.nixosModules.creative = {
|
flake.nixosModules.creative = {
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
@@ -52,15 +52,13 @@
|
|||||||
Enable heavy video editing tools.
|
Enable heavy video editing tools.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
daws = lib.mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
default = false;
|
|
||||||
description = ''
|
|
||||||
Enable DAWs (currently bitwig beta)
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
self.nixosModules.bulk-transcode-overlay
|
||||||
|
self.nixosModules.unstable-overlay
|
||||||
|
];
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
environment.systemPackages = with pkgs;
|
environment.systemPackages = with pkgs;
|
||||||
lib.optionals cfg.image-editing [gimp krita drawio]
|
lib.optionals cfg.image-editing [gimp krita drawio]
|
||||||
@@ -83,8 +81,7 @@
|
|||||||
davinci-resolve
|
davinci-resolve
|
||||||
kdePackages.kdenlive
|
kdePackages.kdenlive
|
||||||
obs-studio
|
obs-studio
|
||||||
]
|
];
|
||||||
++ lib.optional cfg.daws bitwig-studio-latest;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
{
|
{
|
||||||
|
self,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
flake.nixosModules.games = {
|
flake.nixosModules.games = {
|
||||||
config,
|
config,
|
||||||
inputs,
|
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
@@ -46,6 +49,10 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
self.nixosModules.crossover-overlay
|
||||||
|
];
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
environment.systemPackages =
|
environment.systemPackages =
|
||||||
lib.optional cfg.lutris
|
lib.optional cfg.lutris
|
||||||
@@ -57,7 +64,7 @@
|
|||||||
})
|
})
|
||||||
++ lib.optional cfg.r2modman pkgs.r2modman
|
++ lib.optional cfg.r2modman pkgs.r2modman
|
||||||
++ lib.optionals cfg.dayz [
|
++ lib.optionals cfg.dayz [
|
||||||
pkgs.hive.crossover
|
pkgs.crossover
|
||||||
inputs.dzgui-nix.packages.${pkgs.stdenv.system}.default
|
inputs.dzgui-nix.packages.${pkgs.stdenv.system}.default
|
||||||
]
|
]
|
||||||
++ lib.optionals cfg.wine [
|
++ lib.optionals cfg.wine [
|
||||||
|
|||||||
155
modules/programs/gotify.nix
Normal file
155
modules/programs/gotify.nix
Normal file
@@ -0,0 +1,155 @@
|
|||||||
|
{
|
||||||
|
flake.homeModules.gotify = {
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.hive.gotify;
|
||||||
|
cli-config = {
|
||||||
|
token = config.sops.placeholder.${cfg.cli.tokenSopsKey};
|
||||||
|
inherit (cfg.cli) url defaultPriority;
|
||||||
|
};
|
||||||
|
daemon-config = {
|
||||||
|
gotify =
|
||||||
|
{
|
||||||
|
inherit (cfg.daemon) url;
|
||||||
|
token = config.sops.placeholder.${cfg.daemon.tokenSopsKey};
|
||||||
|
auto_delete = cfg.daemon.autoDelete;
|
||||||
|
min_priority = cfg.daemon.minPriority;
|
||||||
|
}
|
||||||
|
// lib.optionalAttrs (cfg.daemon.onMsgCommand != null) {
|
||||||
|
on_msg_command = cfg.daemon.onMsgCommand;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
valueToString = val:
|
||||||
|
if (builtins.typeOf val == "string")
|
||||||
|
then "\"${val}\""
|
||||||
|
else
|
||||||
|
(
|
||||||
|
if (builtins.typeOf val == "int")
|
||||||
|
then "${toString val}"
|
||||||
|
else
|
||||||
|
(
|
||||||
|
if (builtins.typeOf val == "bool")
|
||||||
|
then
|
||||||
|
(
|
||||||
|
if val
|
||||||
|
then "true"
|
||||||
|
else "false"
|
||||||
|
)
|
||||||
|
else (abort "Expected string int or bool, got ${builtins.typeOf val} with value ${toString val}")
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
toTOML = attrs:
|
||||||
|
lib.concatStrings (
|
||||||
|
lib.attrValues (
|
||||||
|
lib.mapAttrs (
|
||||||
|
name: config: ''
|
||||||
|
[${name}]
|
||||||
|
${lib.concatStringsSep "\n" (lib.attrValues (lib.mapAttrs (k: v: "${k} = ${valueToString v}") config))}
|
||||||
|
''
|
||||||
|
)
|
||||||
|
attrs
|
||||||
|
)
|
||||||
|
);
|
||||||
|
in {
|
||||||
|
options.hive.gotify = {
|
||||||
|
cli = {
|
||||||
|
enable = lib.mkEnableOption "Enable Gotify cli tool";
|
||||||
|
url = lib.mkOption {
|
||||||
|
type = lib.types.singleLineStr;
|
||||||
|
default = "https://${cfg.host}:${toString cfg.port}";
|
||||||
|
example = "http://gotify.example.com";
|
||||||
|
description = "The http url of the gotify server (for the cli tool)";
|
||||||
|
};
|
||||||
|
tokenSopsKey = lib.mkOption {
|
||||||
|
type = lib.types.singleLineStr;
|
||||||
|
description = "The sops key of the token secret";
|
||||||
|
};
|
||||||
|
defaultPriority = lib.mkOption {
|
||||||
|
type = lib.types.int;
|
||||||
|
default = 0;
|
||||||
|
example = 3;
|
||||||
|
description = "The default priority of the dispatched messages";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
daemon = {
|
||||||
|
enable = lib.mkEnableOption "Enable the Gotify desktop notification daemon";
|
||||||
|
url = lib.mkOption {
|
||||||
|
type = lib.types.singleLineStr;
|
||||||
|
default = "wss://${cfg.host}:${toString cfg.port}";
|
||||||
|
example = "ws://gotify.example.com";
|
||||||
|
description = "The websocket url of the gotify server (for the desktop tool)";
|
||||||
|
};
|
||||||
|
tokenSopsKey = lib.mkOption {
|
||||||
|
type = lib.types.singleLineStr;
|
||||||
|
description = "The sops key of the token secret";
|
||||||
|
};
|
||||||
|
autoDelete = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
description = "Delete messages that have been handled";
|
||||||
|
};
|
||||||
|
minPriority = lib.mkOption {
|
||||||
|
type = lib.types.int;
|
||||||
|
default = 0;
|
||||||
|
example = 1;
|
||||||
|
description = "Ignore messages with priority lower than given value";
|
||||||
|
};
|
||||||
|
onMsgCommand = lib.mkOption {
|
||||||
|
type = lib.types.nullOr lib.types.singleLineStr;
|
||||||
|
default = null;
|
||||||
|
example = "/usr/bin/beep";
|
||||||
|
description = '' A command to tun for each message with env vars
|
||||||
|
GOTIFY_MSG_PRIORITY, GOTIFY_MSG_TITLE and GOTIFY_MSG_TEXTs
|
||||||
|
If unset use the standard desktop notification passing
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
host = lib.mkOption {
|
||||||
|
type = lib.types.singleLineStr;
|
||||||
|
example = "example.com";
|
||||||
|
description = "The hostname of the gotify server";
|
||||||
|
};
|
||||||
|
port = lib.mkOption {
|
||||||
|
type = lib.types.int;
|
||||||
|
default = 443;
|
||||||
|
example = 443;
|
||||||
|
description = "The port of the gotify server";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = let
|
||||||
|
cli = lib.mkIf cfg.cli.enable {
|
||||||
|
home.packages = [pkgs.gotify-cli];
|
||||||
|
sops.templates."gotify-cli-json" = {
|
||||||
|
content = lib.generators.toJSON {} cli-config;
|
||||||
|
path = "${config.xdg.configHome}/gotify/cli.json";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
daemon = lib.mkIf cfg.daemon.enable {
|
||||||
|
systemd.user.services.gotify-desktop = {
|
||||||
|
Unit = {
|
||||||
|
Description = "Gotify Desktop notification service";
|
||||||
|
After = ["sops-nix.service"]; # After the secrets have been rendered
|
||||||
|
};
|
||||||
|
Service = {
|
||||||
|
ExecStart = "${pkgs.gotify-desktop}/bin/gotify-desktop";
|
||||||
|
};
|
||||||
|
Install = {
|
||||||
|
WantedBy = ["multi-user.target"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
sops.templates."gotify-daemon-toml" = {
|
||||||
|
content = toTOML daemon-config;
|
||||||
|
path = "${config.xdg.configHome}/gotify-desktop/config.toml";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
lib.mkMerge [cli daemon];
|
||||||
|
};
|
||||||
|
}
|
||||||
64
modules/services/borg-server.nix
Normal file
64
modules/services/borg-server.nix
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
{
|
||||||
|
flake.nixosModules.borg-server = {
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.hive.borg-server;
|
||||||
|
in {
|
||||||
|
options.hive.borg-server = {
|
||||||
|
enable = lib.mkEnableOption "Enable the borg server";
|
||||||
|
package = lib.mkOption {
|
||||||
|
type = lib.types.package;
|
||||||
|
default = pkgs.borgbackup;
|
||||||
|
example = "pkgs.borgbackup";
|
||||||
|
description = "The borg package to use";
|
||||||
|
};
|
||||||
|
borg_user = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
example = "borg";
|
||||||
|
default = "borg";
|
||||||
|
description = "The user for the borg repository home.";
|
||||||
|
};
|
||||||
|
repositories_path = lib.mkOption {
|
||||||
|
type = lib.types.path;
|
||||||
|
example = "/var/lib/borg-repositories";
|
||||||
|
default = "/var/lib/borg-repositories";
|
||||||
|
description = "The user for the borg repository home.";
|
||||||
|
};
|
||||||
|
repositories = lib.mkOption {
|
||||||
|
description = "The borg repositories to serve";
|
||||||
|
type = lib.types.attrsOf (lib.types.submodule {
|
||||||
|
options = {
|
||||||
|
name = lib.mkOption {
|
||||||
|
type = lib.types.nullOr (lib.types.strMatching "^[a-zA-Z0-9._-]+$");
|
||||||
|
default = null;
|
||||||
|
example = "borg-repo";
|
||||||
|
description = "The name of the borg repository. If null, use key of attrset";
|
||||||
|
};
|
||||||
|
ssh_public_key = lib.mkOption {
|
||||||
|
type = lib.types.singleLineStr;
|
||||||
|
example = "ssh-rsa AAAA...";
|
||||||
|
description = "The path to the public key for the borg repository.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
});
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
users.users.${cfg.borg_user} = {
|
||||||
|
isNormalUser = true;
|
||||||
|
description = "Borg user";
|
||||||
|
home = cfg.repositories_path;
|
||||||
|
createHome = true;
|
||||||
|
extraGroups = ["borg"];
|
||||||
|
openssh.authorizedKeys.keys =
|
||||||
|
lib.attrsets.mapAttrsToList
|
||||||
|
(key: repo: "command=\"${cfg.package}/bin/borg serve --restrict-to-path=${cfg.repositories_path}/${lib.defaultTo key repo.name}\",restrict ${repo.ssh_public_key}")
|
||||||
|
cfg.repositories;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
125
modules/services/gitea-instance.nix
Normal file
125
modules/services/gitea-instance.nix
Normal file
@@ -0,0 +1,125 @@
|
|||||||
|
{
|
||||||
|
flake.nixosModules.gitea-instance = {
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.hive.gitea-instance;
|
||||||
|
in {
|
||||||
|
options.hive.gitea-instance = {
|
||||||
|
enable = lib.mkEnableOption "Enable the Gitea instance";
|
||||||
|
|
||||||
|
instanceFQDN = lib.mkOption {
|
||||||
|
type = lib.types.singleLineStr;
|
||||||
|
example = "git.example.com";
|
||||||
|
description = "Fully qualified domain name of the Gitea instance";
|
||||||
|
};
|
||||||
|
|
||||||
|
databasePasswordFile = lib.mkOption {
|
||||||
|
type = lib.types.path;
|
||||||
|
example = "/etc/gitea-db-pass.txt";
|
||||||
|
description = "Path to the file containing the Gitea database password";
|
||||||
|
};
|
||||||
|
nativeRunner = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
description = "Install a gitea act_runner using the native nix store";
|
||||||
|
default = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
# Gitea instance
|
||||||
|
services.gitea = {
|
||||||
|
enable = true;
|
||||||
|
lfs.enable = true;
|
||||||
|
appName = "Git yourself some Tea!";
|
||||||
|
database = {
|
||||||
|
name = "gitea";
|
||||||
|
type = "postgres";
|
||||||
|
passwordFile = cfg.databasePasswordFile;
|
||||||
|
};
|
||||||
|
settings = {
|
||||||
|
server.PROTOCOL = "http+unix";
|
||||||
|
server.ROOT_URL = "https://${cfg.instanceFQDN}/";
|
||||||
|
server.DOMAIN = cfg.instanceFQDN;
|
||||||
|
service.DISABLE_REGISTRATION = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Fallback server with only 403
|
||||||
|
services.nginx.virtualHosts.${config.networking.domain} = lib.mkDefault {
|
||||||
|
default = true;
|
||||||
|
locations."/".return = 403;
|
||||||
|
forceSSL = true;
|
||||||
|
enableACME = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Virtual host for gitea
|
||||||
|
services.nginx.virtualHosts."${cfg.instanceFQDN}" = {
|
||||||
|
forceSSL = true;
|
||||||
|
enableACME = true;
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://unix:/run/gitea/gitea.sock";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Database setup
|
||||||
|
services.postgresql = {
|
||||||
|
enable = true;
|
||||||
|
ensureDatabases = [config.services.gitea.user];
|
||||||
|
ensureUsers = [
|
||||||
|
{
|
||||||
|
name = config.services.gitea.database.user;
|
||||||
|
ensureDBOwnership = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# act_runner
|
||||||
|
services.gitea-actions-runner = lib.mkIf cfg.nativeRunner {
|
||||||
|
instances.nixos-host = {
|
||||||
|
enable = true;
|
||||||
|
name = "nixos-host-runner";
|
||||||
|
url = "https://${cfg.instanceFQDN}";
|
||||||
|
tokenFile = "/var/lib/gitea-registration/nixos-host";
|
||||||
|
|
||||||
|
labels = ["nixos:host"];
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
runner = {
|
||||||
|
capacity = 1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
systemd.services.gitea-runner-nixos-host = lib.mkIf cfg.nativeRunner {
|
||||||
|
after = ["gitea-runner-gen-token.service"];
|
||||||
|
requires = ["gitea-runner-gen-token.service"];
|
||||||
|
serviceConfig.Environment = ''
|
||||||
|
PATH=/run/current-system/sw/bin:/usr/bin:/bin
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
systemd.services.gitea-runner-gen-token = lib.mkIf cfg.nativeRunner {
|
||||||
|
wantedBy = ["multi-user.target"];
|
||||||
|
after = ["gitea.service"];
|
||||||
|
environment = {
|
||||||
|
GITEA_CUSTOM = "/var/lib/gitea/custom";
|
||||||
|
GITEA_WORK_DIR = "/var/lib/gitea";
|
||||||
|
};
|
||||||
|
script = ''
|
||||||
|
set -euo pipefail
|
||||||
|
token=$(${config.services.gitea.package}/bin/gitea actions generate-runner-token)
|
||||||
|
echo "TOKEN=$token" > /var/lib/gitea-registration/nixos-host
|
||||||
|
'';
|
||||||
|
unitConfig.ConditionPathExists = ["!/var/lib/gitea-registration/nixos-host"];
|
||||||
|
serviceConfig = {
|
||||||
|
User = "gitea";
|
||||||
|
Group = "gitea";
|
||||||
|
StateDirectory = "gitea-registration";
|
||||||
|
Type = "oneshot";
|
||||||
|
RemainAfterExit = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
133
modules/services/gotify-instance.nix
Normal file
133
modules/services/gotify-instance.nix
Normal file
@@ -0,0 +1,133 @@
|
|||||||
|
{
|
||||||
|
flake.nixosModules.gotify-instance = {
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.hive.gotify-instance;
|
||||||
|
server-config = {
|
||||||
|
server = {
|
||||||
|
listenaddr = "localhost";
|
||||||
|
port = 54545;
|
||||||
|
ssl.enabled = false;
|
||||||
|
ssl.redirecttohttps = false;
|
||||||
|
cors.alloworigins = ["${cfg.instanceFQDN}"];
|
||||||
|
stream.allowedorigins = ["${cfg.instanceFQDN}"];
|
||||||
|
};
|
||||||
|
database = {
|
||||||
|
dialect = "postgres";
|
||||||
|
connection = "host=/run/postgresql dbname=${cfg.user} user=${cfg.user}";
|
||||||
|
};
|
||||||
|
defaultuser = {
|
||||||
|
name = "admin";
|
||||||
|
pass = config.sops.placeholder.${cfg.adminPasswordSopsKey};
|
||||||
|
};
|
||||||
|
registration = false;
|
||||||
|
};
|
||||||
|
server-config-yaml = lib.generators.toYAML {} server-config;
|
||||||
|
in {
|
||||||
|
options.hive.gotify-instance = {
|
||||||
|
enable = lib.mkEnableOption "Enable the Gotify instance";
|
||||||
|
instanceFQDN = lib.mkOption {
|
||||||
|
type = lib.types.singleLineStr;
|
||||||
|
example = "gotify.example.com";
|
||||||
|
description = "Fully qualified domain name of the Gotify instance";
|
||||||
|
};
|
||||||
|
user = lib.mkOption {
|
||||||
|
type = lib.types.singleLineStr;
|
||||||
|
default = "gotify";
|
||||||
|
description = "The user to run the service as";
|
||||||
|
};
|
||||||
|
group = lib.mkOption {
|
||||||
|
type = lib.types.singleLineStr;
|
||||||
|
default = "gotify";
|
||||||
|
description = "The group to run the service as";
|
||||||
|
};
|
||||||
|
adminPasswordSopsKey = lib.mkOption {
|
||||||
|
type = lib.types.singleLineStr;
|
||||||
|
description = "The SOPS key for the default admin user";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
services.gotify.enable = true;
|
||||||
|
|
||||||
|
# Config setup
|
||||||
|
sops.templates."gotify-server-config.yml" = {
|
||||||
|
owner = cfg.user;
|
||||||
|
content = server-config-yaml;
|
||||||
|
};
|
||||||
|
environment.etc."gotify/config.yml".source = config.sops.templates."gotify-server-config.yml".path;
|
||||||
|
|
||||||
|
# User setup
|
||||||
|
users.users = lib.mkIf (cfg.user == "gotify") {
|
||||||
|
gotify = {
|
||||||
|
description = "Gotify service";
|
||||||
|
useDefaultShell = true;
|
||||||
|
group = cfg.group;
|
||||||
|
isSystemUser = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
users.groups = lib.mkIf (cfg.group == "gotify") {
|
||||||
|
gotify = {};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Configure gotify to run as the specified user (for postgres authentication)
|
||||||
|
systemd.services.gotify-server = {
|
||||||
|
serviceConfig = {
|
||||||
|
DynamicUser = lib.mkForce false;
|
||||||
|
User = cfg.user;
|
||||||
|
RuntimeDirectory = "gotify";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Fallback server with only 403
|
||||||
|
services.nginx.virtualHosts.${config.networking.domain} = lib.mkDefault {
|
||||||
|
default = true;
|
||||||
|
locations."/".return = 403;
|
||||||
|
forceSSL = true;
|
||||||
|
enableACME = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Virtual host for gotify
|
||||||
|
services.nginx.virtualHosts."${cfg.instanceFQDN}" = {
|
||||||
|
forceSSL = true;
|
||||||
|
enableACME = true;
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://${server-config.server.listenaddr}:${toString server-config.server.port}";
|
||||||
|
extraConfig = ''
|
||||||
|
# Ensuring it can use websockets
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "upgrade";
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto http;
|
||||||
|
proxy_redirect http:// $scheme://;
|
||||||
|
|
||||||
|
# The proxy must preserve the host because gotify verifies the host with the origin
|
||||||
|
# for WebSocket connections
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
|
||||||
|
# These sets the timeout so that the websocket can stay alive
|
||||||
|
proxy_connect_timeout 1m;
|
||||||
|
proxy_send_timeout 1m;
|
||||||
|
proxy_read_timeout 1m;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Database setup
|
||||||
|
services.postgresql = {
|
||||||
|
enable = true;
|
||||||
|
ensureDatabases = [cfg.user];
|
||||||
|
ensureUsers = [
|
||||||
|
{
|
||||||
|
name = cfg.user;
|
||||||
|
ensureDBOwnership = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
53
modules/services/minecraft-server/minecraft-server.nix
Normal file
53
modules/services/minecraft-server/minecraft-server.nix
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
{inputs, ...}: {
|
||||||
|
flake.nixosModules.minecraft-server = {
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.hive.minecraft-server;
|
||||||
|
|
||||||
|
modpack = pkgs.callPackage ./_loadCurseForge.nix {
|
||||||
|
url = "https://mediafilez.forgecdn.net/files/7765/203/BMC3_Server_Pack_v44.zip";
|
||||||
|
hash = "sha256-doqPzo9fhYM9ng/3RO6OPqhKA2ibfoaKx3Es7M0lpuU=";
|
||||||
|
};
|
||||||
|
|
||||||
|
mcVersion = modpack.variables.MINECRAFT_VERSION;
|
||||||
|
loader = lib.toLower modpack.variables.MODLOADER;
|
||||||
|
loaderVersion = modpack.variables.MODLOADER_VERSION;
|
||||||
|
serverVersion = lib.replaceStrings ["."] ["_"] "${loader}-${mcVersion}";
|
||||||
|
in {
|
||||||
|
options.hive.minecraft-server = {
|
||||||
|
enable = lib.mkEnableOption "Enable BMC3 server";
|
||||||
|
};
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
inputs.nix-minecraft.nixosModules.minecraft-servers
|
||||||
|
];
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
inputs.nix-minecraft.overlay
|
||||||
|
];
|
||||||
|
services.minecraft-servers = {
|
||||||
|
enable = true;
|
||||||
|
eula = true;
|
||||||
|
openFirewall = true;
|
||||||
|
|
||||||
|
servers.bmc3 = lib.optionalAttrs cfg.enable {
|
||||||
|
enable = true;
|
||||||
|
autoStart = true;
|
||||||
|
package = pkgs."${loader}Servers".${serverVersion}.override {inherit loaderVersion;};
|
||||||
|
jvmOpts = modpack.variables.JAVA_ARGS;
|
||||||
|
symlinks = {
|
||||||
|
"mods" = "${modpack.root}/mods";
|
||||||
|
};
|
||||||
|
serverProperties = {
|
||||||
|
motd = "Woher kommt der Stein?";
|
||||||
|
white-list = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
136
modules/services/nextcloud-instance.nix
Normal file
136
modules/services/nextcloud-instance.nix
Normal file
@@ -0,0 +1,136 @@
|
|||||||
|
{
|
||||||
|
flake.nixosModules.nextcloud-instance = {
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.hive.nextcloud-instance;
|
||||||
|
in {
|
||||||
|
options.hive.nextcloud-instance = {
|
||||||
|
enable = lib.mkEnableOption "Enable the Nextcloud instance";
|
||||||
|
|
||||||
|
instanceFQDN = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
example = "nextcloud.example.com";
|
||||||
|
description = "Fully qualified domain name of the Nextcloud instance";
|
||||||
|
};
|
||||||
|
|
||||||
|
ssl = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = true;
|
||||||
|
description = "Use SSL and auto-update certificates";
|
||||||
|
};
|
||||||
|
|
||||||
|
adminPasswordFile = lib.mkOption {
|
||||||
|
type = lib.types.path;
|
||||||
|
example = "/etc/nc-admin-pass.txt";
|
||||||
|
description = "Path to the file containing the Nextcloud admin password";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
services.nextcloud = {
|
||||||
|
# Instance
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.nextcloud33;
|
||||||
|
hostName = cfg.instanceFQDN;
|
||||||
|
https = cfg.ssl;
|
||||||
|
configureRedis = true;
|
||||||
|
|
||||||
|
# DB
|
||||||
|
config.dbtype = "pgsql";
|
||||||
|
config.dbhost = "/run/postgresql";
|
||||||
|
config.adminpassFile = cfg.adminPasswordFile;
|
||||||
|
|
||||||
|
#Mail
|
||||||
|
settings = {
|
||||||
|
mail_smtpmode = "sendmail";
|
||||||
|
mail_sendmailmode = "pipe";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Apps
|
||||||
|
extraAppsEnable = true;
|
||||||
|
extraApps = {
|
||||||
|
inherit
|
||||||
|
(config.services.nextcloud.package.packages.apps)
|
||||||
|
calendar
|
||||||
|
contacts
|
||||||
|
tasks
|
||||||
|
;
|
||||||
|
drop_account = pkgs.fetchNextcloudApp {
|
||||||
|
sha256 = "sha256-J+bZVNIb/MokuTYQu8RBKdnZFakh180pa1pW5KHlC80=";
|
||||||
|
url = "https://packages.framasoft.org/projects/nextcloud-apps/drop-account/drop_account-3.0.0.tar.gz";
|
||||||
|
license = "agpl3Only";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Raise Upload limit
|
||||||
|
maxUploadSize = "20G";
|
||||||
|
|
||||||
|
# Preview settings (video may be a security risk)
|
||||||
|
settings = {
|
||||||
|
enable_previews = true;
|
||||||
|
enabledPreviewProviders = [
|
||||||
|
"OC\\Preview\\BMP"
|
||||||
|
"OC\\Preview\\GIF"
|
||||||
|
"OC\\Preview\\JPEG"
|
||||||
|
"OC\\Preview\\Krita"
|
||||||
|
"OC\\Preview\\MarkDown"
|
||||||
|
"OC\\Preview\\MP3"
|
||||||
|
"OC\\Preview\\OpenDocument"
|
||||||
|
"OC\\Preview\\PNG"
|
||||||
|
"OC\\Preview\\TXT"
|
||||||
|
"OC\\Preview\\XBitmap"
|
||||||
|
"OC\\Preview\\Movie"
|
||||||
|
"OC\\Preview\\MP4"
|
||||||
|
"OC\\Preview\\AVI"
|
||||||
|
"OC\\Preview\\MKV"
|
||||||
|
];
|
||||||
|
preview_ffmpeg_path = "${pkgs.ffmpeg}/bin/ffmpeg";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Fallback server with only 403
|
||||||
|
services.nginx.virtualHosts.${config.networking.domain} = lib.mkDefault {
|
||||||
|
default = true;
|
||||||
|
locations."/".return = 403;
|
||||||
|
forceSSL = cfg.ssl;
|
||||||
|
enableACME = cfg.ssl;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Webserver setup with optional SSL
|
||||||
|
services.nginx.virtualHosts.${cfg.instanceFQDN} =
|
||||||
|
if cfg.ssl
|
||||||
|
then {
|
||||||
|
forceSSL = true;
|
||||||
|
enableACME = true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
listen = [
|
||||||
|
{
|
||||||
|
addr = "0.0.0.0";
|
||||||
|
port = 80;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
security.acme = lib.mkIf cfg.ssl {
|
||||||
|
acceptTerms = true;
|
||||||
|
defaults.email = "jonas.roeger+acme@gmail.com";
|
||||||
|
};
|
||||||
|
networking.firewall.allowedTCPPorts = [80] ++ lib.optional cfg.ssl 443;
|
||||||
|
|
||||||
|
# DB setup
|
||||||
|
services.postgresql = {
|
||||||
|
enable = true;
|
||||||
|
ensureDatabases = ["nextcloud"];
|
||||||
|
ensureUsers = [
|
||||||
|
{
|
||||||
|
name = "nextcloud";
|
||||||
|
ensureDBOwnership = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
31
modules/system/ntsync.nix
Normal file
31
modules/system/ntsync.nix
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
{
|
||||||
|
flake.nixosModules.ntsync = {
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.hive.ntsync;
|
||||||
|
in {
|
||||||
|
options.hive.ntsync.enable = lib.mkEnableOption "Enable the nt-sync kernel driver.";
|
||||||
|
options.hive.ntsync.proton = lib.mkOption {
|
||||||
|
description = "Make proton use ntsync";
|
||||||
|
default = true;
|
||||||
|
type = lib.types.bool;
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
assertions = [
|
||||||
|
{
|
||||||
|
assertion = lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.14";
|
||||||
|
message = "ntsync requires at least linux 6.14";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.kernelModules = ["ntsync"];
|
||||||
|
|
||||||
|
environment.variables = lib.optionalAttrs cfg.proton {
|
||||||
|
PROTON_USE_NTSYNC = 1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,7 +1,10 @@
|
|||||||
{
|
{self, ...}: {
|
||||||
flake.overlays.crossover = final: prev: {
|
flake.overlays.crossover = final: prev: {
|
||||||
crossover = final.callPackage ./_derivation.nix {};
|
crossover = final.callPackage ./_derivation.nix {};
|
||||||
};
|
};
|
||||||
|
flake.nixosModules.crossover-overlay = {
|
||||||
|
nixpkgs.overlays = [self.overlays.crossover];
|
||||||
|
};
|
||||||
perSystem = {pkgs, ...}: {
|
perSystem = {pkgs, ...}: {
|
||||||
packages.crossover = pkgs.callPackage ./_derivation.nix {};
|
packages.crossover = pkgs.callPackage ./_derivation.nix {};
|
||||||
};
|
};
|
||||||
37
modules/tools/jj.nix
Normal file
37
modules/tools/jj.nix
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
{
|
||||||
|
flake.homeModules.jj = {
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.hive.jj;
|
||||||
|
in {
|
||||||
|
options.hive.jj = {
|
||||||
|
followGit = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = true;
|
||||||
|
description = "Follow the current git configuration";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
jujutsu
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.jujutsu = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
user = lib.optionalAttrs cfg.followGit {
|
||||||
|
name = config.programs.git.settings.user.name;
|
||||||
|
email = config.programs.git.settings.user.email;
|
||||||
|
};
|
||||||
|
ui = lib.optionalAttrs (cfg.followGit && config.programs.difftastic.enable) {
|
||||||
|
diff-formatter = ["${pkgs.difftastic}/bin/difft" "--color=always" "$left" "$right"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
56
modules/tools/spotify-shortcuts/default.nix
Normal file
56
modules/tools/spotify-shortcuts/default.nix
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
{self, ...}: {
|
||||||
|
flake.overlays.spotify-shortcuts = final: prev: {
|
||||||
|
spotify-shortcuts = final.callPackage ./_derivation.nix {};
|
||||||
|
};
|
||||||
|
perSystem = {pkgs, ...}: {
|
||||||
|
packages.spotify-shortcuts = pkgs.callPackage ./_derivation.nix {};
|
||||||
|
devShells.spotify-shortcuts = import ./_shell.nix {inherit pkgs;};
|
||||||
|
};
|
||||||
|
|
||||||
|
flake.nixosModules.spotify-shortcuts-overlay = {
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
self.overlays.spotify-shortcuts
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
flake.nixosModules.spotify-shortcuts = {
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.hive.programs.spotify-shortcuts;
|
||||||
|
in {
|
||||||
|
options.hive.programs.spotify-shortcuts = {
|
||||||
|
enable = lib.mkEnableOption "Enable Spotify Shortcuts";
|
||||||
|
clientIdSopsKey = lib.mkOption {
|
||||||
|
type = lib.types.singleLineStr;
|
||||||
|
description = "Spotify API Client ID sops secret name";
|
||||||
|
};
|
||||||
|
clientSecretSopsKey = lib.mkOption {
|
||||||
|
type = lib.types.singleLineStr;
|
||||||
|
description = "Spotify API Client Secret Path sops secret name";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
self.nixosModules.spotify-shortcuts-overlay
|
||||||
|
];
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
environment.systemPackages = [pkgs.spotify-shortcuts];
|
||||||
|
environment.variables = {
|
||||||
|
SPOTIFY_SHORTCUTS_CONFIG = config.sops.templates."spotify-shortcuts-client.json".path;
|
||||||
|
};
|
||||||
|
sops.templates."spotify-shortcuts-client.json" = {
|
||||||
|
mode = "444";
|
||||||
|
content = ''
|
||||||
|
{
|
||||||
|
"clientId": "${config.sops.placeholder.${cfg.clientIdSopsKey}}",
|
||||||
|
"clientSecret": "${config.sops.placeholder.${cfg.clientSecretSopsKey}}"
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
# https://github.com/NixOS/nixpkgs/issues/126590#issuecomment-3194531220
|
|
||||||
{
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
nixpkgs.overlays = lib.singleton (final: prev: {
|
|
||||||
kdePackages =
|
|
||||||
prev.kdePackages
|
|
||||||
// {
|
|
||||||
plasma-workspace = let
|
|
||||||
# the package we want to override
|
|
||||||
basePkg = prev.kdePackages.plasma-workspace;
|
|
||||||
|
|
||||||
# a helper package that merges all the XDG_DATA_DIRS into a single directory
|
|
||||||
xdgdataPkg = pkgs.stdenv.mkDerivation {
|
|
||||||
name = "${basePkg.name}-xdgdata";
|
|
||||||
buildInputs = [basePkg];
|
|
||||||
dontUnpack = true;
|
|
||||||
dontFixup = true;
|
|
||||||
dontWrapQtApps = true;
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out/share
|
|
||||||
( IFS=:
|
|
||||||
for DIR in $XDG_DATA_DIRS; do
|
|
||||||
if [[ -d "$DIR" ]]; then
|
|
||||||
cp -r $DIR/. $out/share/
|
|
||||||
chmod -R u+w $out/share
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
)
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
# undo the XDG_DATA_DIRS injection that is usually done in the qt wrapper
|
|
||||||
# script and instead inject the path of the above helper package
|
|
||||||
derivedPkg = basePkg.overrideAttrs {
|
|
||||||
preFixup = ''
|
|
||||||
for index in "''${!qtWrapperArgs[@]}"; do
|
|
||||||
if [[ ''${qtWrapperArgs[$((index+0))]} == "--prefix" ]] && [[ ''${qtWrapperArgs[$((index+1))]} == "XDG_DATA_DIRS" ]]; then
|
|
||||||
unset -v "qtWrapperArgs[$((index+0))]"
|
|
||||||
unset -v "qtWrapperArgs[$((index+1))]"
|
|
||||||
unset -v "qtWrapperArgs[$((index+2))]"
|
|
||||||
unset -v "qtWrapperArgs[$((index+3))]"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
qtWrapperArgs=("''${qtWrapperArgs[@]}")
|
|
||||||
qtWrapperArgs+=(--prefix XDG_DATA_DIRS : "${xdgdataPkg}/share")
|
|
||||||
qtWrapperArgs+=(--prefix XDG_DATA_DIRS : "$out/share")
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
in
|
|
||||||
derivedPkg;
|
|
||||||
};
|
|
||||||
});
|
|
||||||
}
|
|
||||||
@@ -1,105 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
imports = [
|
|
||||||
(./. + "/jonas@comfy-station/" + /borg.nix)
|
|
||||||
];
|
|
||||||
|
|
||||||
# Home Manager needs a bit of information about you and the paths it should
|
|
||||||
# manage.
|
|
||||||
home.username = "jonas";
|
|
||||||
home.homeDirectory = "/home/jonas";
|
|
||||||
|
|
||||||
sops = {
|
|
||||||
age.keyFile = "${config.home.homeDirectory}/.config/sops/age/keys.txt";
|
|
||||||
};
|
|
||||||
|
|
||||||
# hive modules
|
|
||||||
hive.themes.layan.enable = true;
|
|
||||||
hive.themes.layan.pkgsInHome = true;
|
|
||||||
hive.hyprland.enable = true;
|
|
||||||
hive.swaync.enable = true;
|
|
||||||
hive.waybar.enable = true;
|
|
||||||
hive.wlogout.enable = true;
|
|
||||||
hive.wofi.enable = true;
|
|
||||||
hive.kitty.enable = true;
|
|
||||||
hive.nextcloud.enable = true;
|
|
||||||
hive.firefox = {
|
|
||||||
enable = true;
|
|
||||||
plasmaIntegration = true;
|
|
||||||
passFF = true;
|
|
||||||
};
|
|
||||||
hive.kdeconnect.enable = true;
|
|
||||||
hive.ranger.enable = true;
|
|
||||||
hive.ssh = {
|
|
||||||
enable = true;
|
|
||||||
sopsFile = ../secrets/jonas/ssh.yaml;
|
|
||||||
keys = ["borg" "passgit"];
|
|
||||||
};
|
|
||||||
hive.yubikey.enable = true;
|
|
||||||
hive.yubikey.withCCID = false;
|
|
||||||
hive.zsh.enable = true;
|
|
||||||
hive.nix-scripts.enable = true;
|
|
||||||
hive.doom.enable = true;
|
|
||||||
hive.doom.asDefaultEditor = true;
|
|
||||||
hive.doom.enableCopilot = true;
|
|
||||||
hive.doom.withNixPkgs = true;
|
|
||||||
hive.doom.withShellPkgs = true;
|
|
||||||
hive.doom.withPythonPkgs = true;
|
|
||||||
hive.jj.enable = true;
|
|
||||||
|
|
||||||
# Make session variables available in systemd units
|
|
||||||
# SEE: https://github.com/nix-community/home-manager/pull/5543
|
|
||||||
# systemd.user.settings.Manager.DefaultEnvironment =
|
|
||||||
# lib.mapAttrs (_: lib.mkDefault) config.home.sessionVariables;
|
|
||||||
|
|
||||||
xdg.mimeApps = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
defaultApplications = {
|
|
||||||
"text/html" = "firefox.desktop";
|
|
||||||
"x-scheme-handler/http" = "firefox.desktop";
|
|
||||||
"x-scheme-handler/https" = "firefox.desktop";
|
|
||||||
"x-scheme-handler/about" = "firefox.desktop";
|
|
||||||
"x-scheme-handler/unknown" = "firefox.desktop";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
xdg.userDirs.enable = true;
|
|
||||||
xdg.userDirs.createDirectories = true;
|
|
||||||
xdg.userDirs.extraConfig = {
|
|
||||||
XDG_WORKSPACES_DIR = "${config.home.homeDirectory}/Workspaces";
|
|
||||||
XDG_NEXTCLOUD_DIR = "${config.home.homeDirectory}/Nextcloud";
|
|
||||||
XDG_NOTES_DIR = "${config.home.homeDirectory}/Notes";
|
|
||||||
};
|
|
||||||
|
|
||||||
# This value determines the Home Manager release that your configuration is
|
|
||||||
# compatible with. This helps avoid breakage when a new Home Manager release
|
|
||||||
# introduces backwards incompatible changes.
|
|
||||||
#
|
|
||||||
# You should not change this value, even if you update Home Manager. If you do
|
|
||||||
# want to update the value, then make sure to first check the Home Manager
|
|
||||||
# release notes.
|
|
||||||
home.stateVersion = "24.11"; # Please read the comment before changing.
|
|
||||||
|
|
||||||
home.sessionVariables = {
|
|
||||||
EDITOR = lib.mkDefault "vim";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Let Home Manager install and manage itself.
|
|
||||||
programs.home-manager.enable = true;
|
|
||||||
|
|
||||||
# Git
|
|
||||||
programs.difftastic.enable = true;
|
|
||||||
programs.difftastic.git.enable = true;
|
|
||||||
programs.git = {
|
|
||||||
enable = true;
|
|
||||||
settings.user.name = "Jonas Röger";
|
|
||||||
settings.user.email = "jonas.roeger@tu-dortmund.de";
|
|
||||||
signing = {
|
|
||||||
signByDefault = true;
|
|
||||||
key = "4000EB35E1AE0F07";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,131 +0,0 @@
|
|||||||
{config, ...}: let
|
|
||||||
defaultChecks = [
|
|
||||||
{
|
|
||||||
name = "repository";
|
|
||||||
frequency = "2 weeks";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "archives";
|
|
||||||
frequency = "4 weeks";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "data";
|
|
||||||
frequency = "6 weeks";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "extract";
|
|
||||||
frequency = "6 weeks";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
passwordFile = "${config.home.homeDirectory}/.config/borg/password";
|
|
||||||
encCmd = ''cat ${passwordFile}'';
|
|
||||||
repo = "ssh://borg.jroeger.de/./comfy-station";
|
|
||||||
in {
|
|
||||||
sops.secrets = {
|
|
||||||
"borg/password" = {
|
|
||||||
sopsFile = ../../secrets/jonas/borg.yaml;
|
|
||||||
key = "password";
|
|
||||||
path = passwordFile;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services.borgmatic.enable = true;
|
|
||||||
services.borgmatic.frequency = "hourly";
|
|
||||||
|
|
||||||
programs.borgmatic.enable = true;
|
|
||||||
programs.borgmatic.backups = {
|
|
||||||
workspaces = {
|
|
||||||
location = {
|
|
||||||
sourceDirectories = ["${config.xdg.userDirs.extraConfig.XDG_WORKSPACES_DIR}"];
|
|
||||||
repositories = [repo];
|
|
||||||
excludeHomeManagerSymlinks = true;
|
|
||||||
extraConfig = {
|
|
||||||
archive_name_format = "{hostname}-workspaces-{now}";
|
|
||||||
exclude_patterns = [
|
|
||||||
"*/.venv"
|
|
||||||
"__pycache__"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
retention = {
|
|
||||||
keepDaily = 7;
|
|
||||||
keepHourly = 12;
|
|
||||||
keepWeekly = 4;
|
|
||||||
keepMonthly = 6;
|
|
||||||
};
|
|
||||||
storage = {
|
|
||||||
encryptionPasscommand = encCmd;
|
|
||||||
};
|
|
||||||
consistency.checks = defaultChecks;
|
|
||||||
};
|
|
||||||
media = {
|
|
||||||
location = {
|
|
||||||
sourceDirectories = [
|
|
||||||
"${config.xdg.userDirs.documents}"
|
|
||||||
"${config.xdg.userDirs.music}"
|
|
||||||
"${config.home.homeDirectory}/org"
|
|
||||||
"${config.home.homeDirectory}/Obsidian"
|
|
||||||
"${config.home.homeDirectory}/Zotero"
|
|
||||||
];
|
|
||||||
repositories = [repo];
|
|
||||||
excludeHomeManagerSymlinks = true;
|
|
||||||
extraConfig = {
|
|
||||||
archive_name_format = "{hostname}-media-{now}";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
retention = {
|
|
||||||
keepDaily = 7;
|
|
||||||
keepWeekly = 2;
|
|
||||||
keepMonthly = 6;
|
|
||||||
};
|
|
||||||
storage = {
|
|
||||||
encryptionPasscommand = encCmd;
|
|
||||||
};
|
|
||||||
consistency.checks = defaultChecks;
|
|
||||||
};
|
|
||||||
sec = {
|
|
||||||
location = {
|
|
||||||
sourceDirectories = [
|
|
||||||
"${config.xdg.configHome}/sops"
|
|
||||||
"${config.home.homeDirectory}/Stuff/sec"
|
|
||||||
"${config.home.homeDirectory}/.password-store"
|
|
||||||
];
|
|
||||||
repositories = [repo];
|
|
||||||
excludeHomeManagerSymlinks = true;
|
|
||||||
extraConfig = {
|
|
||||||
archive_name_format = "{hostname}-sec-{now}";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
retention = {
|
|
||||||
keepDaily = 7;
|
|
||||||
keepWeekly = 2;
|
|
||||||
keepMonthly = 6;
|
|
||||||
};
|
|
||||||
storage = {
|
|
||||||
encryptionPasscommand = encCmd;
|
|
||||||
};
|
|
||||||
consistency.checks = defaultChecks;
|
|
||||||
};
|
|
||||||
var = {
|
|
||||||
location = {
|
|
||||||
sourceDirectories = [
|
|
||||||
"${config.xdg.userDirs.desktop}"
|
|
||||||
];
|
|
||||||
repositories = [repo];
|
|
||||||
excludeHomeManagerSymlinks = true;
|
|
||||||
extraConfig = {
|
|
||||||
archive_name_format = "{hostname}-var-{now}";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
retention = {
|
|
||||||
keepDaily = 7;
|
|
||||||
keepWeekly = 2;
|
|
||||||
keepMonthly = 6;
|
|
||||||
};
|
|
||||||
storage = {
|
|
||||||
encryptionPasscommand = encCmd;
|
|
||||||
};
|
|
||||||
consistency.checks = defaultChecks;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,177 +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’).
|
|
||||||
{
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
imports = [
|
|
||||||
# Include the results of the hardware scan.
|
|
||||||
./hardware-configuration.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
# Secret management
|
|
||||||
sops.age.keyFile = "/var/lib/sops-nix/key.txt";
|
|
||||||
sops.secrets.wg-priv = {
|
|
||||||
sopsFile = ../../secrets/comfy-station/wg.yaml;
|
|
||||||
key = "privateKey";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Users
|
|
||||||
users.users.jonas = {
|
|
||||||
isNormalUser = true;
|
|
||||||
description = "Jonas";
|
|
||||||
extraGroups = ["networkmanager" "wheel" "docker" "dialout"];
|
|
||||||
};
|
|
||||||
users.defaultUserShell = pkgs.zsh;
|
|
||||||
programs.zsh.enable = true;
|
|
||||||
|
|
||||||
# hive modules
|
|
||||||
hive.nix-scripts.enable = true;
|
|
||||||
hive.displayManager.name = "sddm";
|
|
||||||
hive.hyprland.enable = true;
|
|
||||||
hive.kwallet.enable = true;
|
|
||||||
hive.kwallet.forUsers = ["jonas"];
|
|
||||||
hive.virt-manager.enable = true;
|
|
||||||
hive.virt-manager.forUsers = ["jonas"];
|
|
||||||
hive.bluetooth.enable = true;
|
|
||||||
hive.sound.enable = true;
|
|
||||||
hive.yubikey.enable = true;
|
|
||||||
hive.wg.client.enable = true;
|
|
||||||
hive.wg.client.privateKeyFile = config.sops.secrets.wg-priv.path;
|
|
||||||
hive.wg.client.peer = "comfy-station";
|
|
||||||
hive.programs.games.enable = true;
|
|
||||||
hive.programs.games.steam = true;
|
|
||||||
hive.programs.creative = {
|
|
||||||
enable = true;
|
|
||||||
image-management = true;
|
|
||||||
image-raw-processing = true;
|
|
||||||
video-editing-light = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
# system packages
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
age
|
|
||||||
alejandra
|
|
||||||
arduino
|
|
||||||
borgbackup
|
|
||||||
borgmatic
|
|
||||||
chromium
|
|
||||||
digikam
|
|
||||||
discord
|
|
||||||
docker
|
|
||||||
docker-compose
|
|
||||||
drawio
|
|
||||||
feh
|
|
||||||
ffmpeg
|
|
||||||
firefox
|
|
||||||
gimp
|
|
||||||
git
|
|
||||||
(gnome-network-displays.overrideAttrs (final: prev: {buildInputs = prev.buildInputs ++ [glib-networking];}))
|
|
||||||
insomnia
|
|
||||||
krita
|
|
||||||
libreoffice
|
|
||||||
mosquitto
|
|
||||||
mpv
|
|
||||||
mupdf
|
|
||||||
nh
|
|
||||||
nix-index
|
|
||||||
nix-output-monitor
|
|
||||||
obsidian
|
|
||||||
openhantek6022
|
|
||||||
qalculate-qt
|
|
||||||
qtpass
|
|
||||||
ranger
|
|
||||||
sops
|
|
||||||
spotify
|
|
||||||
vim
|
|
||||||
vlc
|
|
||||||
vscode
|
|
||||||
wget
|
|
||||||
zoom
|
|
||||||
zotero
|
|
||||||
];
|
|
||||||
nixpkgs.config.permittedInsecurePackages = [
|
|
||||||
"electron-25.9.0" # required by obsidian
|
|
||||||
];
|
|
||||||
services.avahi.enable = true;
|
|
||||||
services.udev.packages = [pkgs.openhantek6022];
|
|
||||||
virtualisation.docker.enable = true;
|
|
||||||
|
|
||||||
# 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.11"; # Did you read the comment?
|
|
||||||
|
|
||||||
# gc settings and binary caches
|
|
||||||
nix = {
|
|
||||||
settings = {
|
|
||||||
substituters = [
|
|
||||||
"https://aseipp-nix-cache.freetls.fastly.net"
|
|
||||||
"https://nix-community.cachix.org"
|
|
||||||
"https://cache.nixos.org/"
|
|
||||||
];
|
|
||||||
experimental-features = ["nix-command" "flakes"];
|
|
||||||
auto-optimise-store = true;
|
|
||||||
trusted-users = [
|
|
||||||
"@wheel"
|
|
||||||
];
|
|
||||||
max-jobs = 2;
|
|
||||||
cores = 8;
|
|
||||||
};
|
|
||||||
gc = {
|
|
||||||
automatic = true;
|
|
||||||
dates = "weekly";
|
|
||||||
options = "--delete-older-than 30d";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# boot
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
|
||||||
boot.plymouth.enable = true;
|
|
||||||
boot.initrd.systemd.enable = true;
|
|
||||||
boot.supportedFilesystems = ["ntfs"];
|
|
||||||
|
|
||||||
# Configure console keymap
|
|
||||||
console.keyMap = "de";
|
|
||||||
|
|
||||||
# Set your time zone.
|
|
||||||
time.timeZone = "Europe/Berlin";
|
|
||||||
|
|
||||||
# Select internationalisation properties.
|
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
|
||||||
i18n.extraLocaleSettings = {
|
|
||||||
LC_ADDRESS = "de_DE.UTF-8";
|
|
||||||
LC_IDENTIFICATION = "de_DE.UTF-8";
|
|
||||||
LC_MEASUREMENT = "de_DE.UTF-8";
|
|
||||||
LC_MONETARY = "de_DE.UTF-8";
|
|
||||||
LC_NAME = "de_DE.UTF-8";
|
|
||||||
LC_NUMERIC = "de_DE.UTF-8";
|
|
||||||
LC_PAPER = "de_DE.UTF-8";
|
|
||||||
LC_TELEPHONE = "de_DE.UTF-8";
|
|
||||||
LC_TIME = "de_DE.UTF-8";
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.hostName = "comfy-station"; # Define your hostname.
|
|
||||||
|
|
||||||
# Enable networking
|
|
||||||
networking.networkmanager.enable = true;
|
|
||||||
|
|
||||||
# printing
|
|
||||||
services.printing.enable = true;
|
|
||||||
|
|
||||||
# touchpad
|
|
||||||
services.libinput.touchpad.naturalScrolling = true;
|
|
||||||
|
|
||||||
# ld-fix
|
|
||||||
programs.nix-ld.enable = true;
|
|
||||||
programs.nix-ld.libraries = [
|
|
||||||
# Add any missing dynamic libraries for unpackaged programs
|
|
||||||
# here, NOT in environment.systemPackages
|
|
||||||
];
|
|
||||||
}
|
|
||||||
@@ -1,47 +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,
|
|
||||||
pkgs,
|
|
||||||
modulesPath,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
imports = [
|
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
|
||||||
];
|
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = ["nvme" "ehci_pci" "xhci_pci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"];
|
|
||||||
boot.initrd.kernelModules = ["dm-snapshot"];
|
|
||||||
boot.kernelModules = ["kvm-amd"];
|
|
||||||
boot.extraModulePackages = [];
|
|
||||||
|
|
||||||
boot.initrd.luks.devices."lvm-root".device = "/dev/disk/by-uuid/0b55681d-5c7b-4045-b895-d1eb7e306ffb";
|
|
||||||
|
|
||||||
fileSystems."/" = {
|
|
||||||
device = "/dev/disk/by-uuid/88f53721-1c3f-43fd-8875-59e597aacb10";
|
|
||||||
fsType = "ext4";
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/boot" = {
|
|
||||||
device = "/dev/disk/by-uuid/583D-114B";
|
|
||||||
fsType = "vfat";
|
|
||||||
};
|
|
||||||
|
|
||||||
swapDevices = [
|
|
||||||
{device = "/dev/disk/by-uuid/f81521e7-4c09-4e91-8914-3dcd9febdfff";}
|
|
||||||
];
|
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
|
||||||
# still possible to use this option, but it's recommended to use it in conjunction
|
|
||||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
|
||||||
networking.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.enp2s0f0.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.enp5s0.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;
|
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
||||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
}
|
|
||||||
@@ -1,113 +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’).
|
|
||||||
{
|
|
||||||
pkgs,
|
|
||||||
inputs,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
imports = [
|
|
||||||
# Include the results of the hardware scan.
|
|
||||||
./hardware-configuration.nix
|
|
||||||
inputs.home-manager.nixosModules.home-manager
|
|
||||||
../../modules/hardware/bluetooth.nix
|
|
||||||
../../modules/hardware/printing.nix
|
|
||||||
../../modules/hardware/sound.nix
|
|
||||||
../../modules/services/docker.nix
|
|
||||||
../../modules/desktop/dm
|
|
||||||
../../modules/desktop/de
|
|
||||||
];
|
|
||||||
|
|
||||||
desktop.dm.name = "sddm";
|
|
||||||
desktop.dm.autologin = "jonas";
|
|
||||||
desktop.de.plasma.enable = true;
|
|
||||||
|
|
||||||
# Enable touchpad support (enabled default in most desktopManager).
|
|
||||||
# services.xserver.libinput.enable = true;
|
|
||||||
|
|
||||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
|
||||||
users.users.jonas = {
|
|
||||||
isNormalUser = true;
|
|
||||||
description = "Jonas";
|
|
||||||
extraGroups = ["networkmanager" "wheel" "docker"];
|
|
||||||
packages = with pkgs; [];
|
|
||||||
};
|
|
||||||
users.defaultUserShell = pkgs.zsh;
|
|
||||||
|
|
||||||
programs.zsh.enable = true;
|
|
||||||
|
|
||||||
# Allow unfree packages
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
|
|
||||||
# List packages installed in system profile. To search, run:
|
|
||||||
# $ nix search wget
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
docker
|
|
||||||
git
|
|
||||||
ranger
|
|
||||||
vim
|
|
||||||
wget
|
|
||||||
];
|
|
||||||
|
|
||||||
# Some programs need SUID wrappers, can be configured further or are
|
|
||||||
# started in user sessions.
|
|
||||||
# programs.mtr.enable = true;
|
|
||||||
# programs.gnupg.agent = {
|
|
||||||
# enable = true;
|
|
||||||
# enableSSHSupport = true;
|
|
||||||
# };
|
|
||||||
|
|
||||||
# List services that you want to enable:
|
|
||||||
|
|
||||||
# Enable the OpenSSH daemon.
|
|
||||||
# services.openssh.enable = true;
|
|
||||||
|
|
||||||
# Open ports in the firewall.
|
|
||||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
|
||||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
|
||||||
# Or disable the firewall altogether.
|
|
||||||
# networking.firewall.enable = false;
|
|
||||||
|
|
||||||
# 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.11"; # Did you read the comment?
|
|
||||||
|
|
||||||
# boot
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
|
||||||
|
|
||||||
# Configure console keymap
|
|
||||||
console.keyMap = "de";
|
|
||||||
|
|
||||||
# Set your time zone.
|
|
||||||
time.timeZone = "Europe/Berlin";
|
|
||||||
|
|
||||||
# Select internationalisation properties.
|
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
|
||||||
|
|
||||||
i18n.extraLocaleSettings = {
|
|
||||||
LC_ADDRESS = "de_DE.UTF-8";
|
|
||||||
LC_IDENTIFICATION = "de_DE.UTF-8";
|
|
||||||
LC_MEASUREMENT = "de_DE.UTF-8";
|
|
||||||
LC_MONETARY = "de_DE.UTF-8";
|
|
||||||
LC_NAME = "de_DE.UTF-8";
|
|
||||||
LC_NUMERIC = "de_DE.UTF-8";
|
|
||||||
LC_PAPER = "de_DE.UTF-8";
|
|
||||||
LC_TELEPHONE = "de_DE.UTF-8";
|
|
||||||
LC_TIME = "de_DE.UTF-8";
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.hostName = "vm"; # Define your hostname.
|
|
||||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
|
||||||
|
|
||||||
# Configure network proxy if necessary
|
|
||||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
|
||||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
|
||||||
|
|
||||||
# Enable networking
|
|
||||||
networking.networkmanager.enable = true;
|
|
||||||
}
|
|
||||||
@@ -1,39 +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,
|
|
||||||
pkgs,
|
|
||||||
modulesPath,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
imports = [];
|
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = ["ata_piix" "ohci_pci" "ehci_pci" "ahci" "sd_mod" "sr_mod"];
|
|
||||||
boot.initrd.kernelModules = [];
|
|
||||||
boot.kernelModules = [];
|
|
||||||
boot.extraModulePackages = [];
|
|
||||||
|
|
||||||
fileSystems."/" = {
|
|
||||||
device = "/dev/disk/by-uuid/a28cd2c0-67f3-4492-9cd9-996fdbe2b8ef";
|
|
||||||
fsType = "ext4";
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/boot" = {
|
|
||||||
device = "/dev/disk/by-uuid/0134-2DF5";
|
|
||||||
fsType = "vfat";
|
|
||||||
};
|
|
||||||
|
|
||||||
swapDevices = [];
|
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
|
||||||
# still possible to use this option, but it's recommended to use it in conjunction
|
|
||||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
|
||||||
networking.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.enp0s3.useDHCP = lib.mkDefault true;
|
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
||||||
virtualisation.virtualbox.guest.enable = true;
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{}: {}
|
|
||||||
@@ -1,118 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
isHM,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
cfg = config.hive.nix-scripts;
|
|
||||||
home-rebuild =
|
|
||||||
pkgs.writeShellScriptBin ".home-rebuild"
|
|
||||||
''
|
|
||||||
set -e
|
|
||||||
pushd ~/.hive/
|
|
||||||
${pkgs.alejandra}/bin/alejandra . &>/dev/null
|
|
||||||
${pkgs.git}/bin/git diff -U0
|
|
||||||
echo "NixOS Rebuilding..."
|
|
||||||
home-manager switch --flake ~/.hive -b backup --log-format internal-json |& ${pkgs.nix-output-monitor}/bin/nom --json
|
|
||||||
gen=$(home-manager generations | head -n1 | ${pkgs.gawk}/bin/awk '{print "Gen" $5 " @ " $1 "-" $2}')
|
|
||||||
by="$(${pkgs.coreutils-full}/bin/whoami)@$(${pkgs.nettools}/bin/hostname)"
|
|
||||||
${pkgs.git}/bin/git commit --no-gpg-sign -am "Home $gen by $by"
|
|
||||||
popd
|
|
||||||
'';
|
|
||||||
rebuild =
|
|
||||||
pkgs.writeShellScriptBin ".nixos-rebuild"
|
|
||||||
''
|
|
||||||
set -e
|
|
||||||
pushd ~/.hive/
|
|
||||||
${pkgs.alejandra}/bin/alejandra . &>/dev/null
|
|
||||||
${pkgs.git}/bin/git diff -U0
|
|
||||||
echo "NixOS Rebuilding..."
|
|
||||||
${pkgs.nh}/bin/nh os switch ~/.hive
|
|
||||||
gen=$(sudo nix-env --list-generations --profile /nix/var/nix/profiles/system | ${pkgs.gnugrep}/bin/grep current | ${pkgs.gawk}/bin/awk '{print "Gen" $1 " @ " $2 "-" $3}')
|
|
||||||
by="$(${pkgs.coreutils-full}/bin/whoami)@$(${pkgs.nettools}/bin/hostname)"
|
|
||||||
${pkgs.git}/bin/git commit --no-gpg-sign -am "System $gen by $by"
|
|
||||||
popd
|
|
||||||
'';
|
|
||||||
upgrade =
|
|
||||||
pkgs.writeShellScriptBin ".nixos-upgrade"
|
|
||||||
''
|
|
||||||
set -e
|
|
||||||
pushd ~/.hive/
|
|
||||||
if [ -n "$(${pkgs.git}/bin/git status --porcelain)" ]; then
|
|
||||||
echo ".hive is unclean!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
branch_staging="staging-update"
|
|
||||||
|
|
||||||
if ${pkgs.git}/bin/git rev-parse --verify "$branch_staging" >/dev/null 2>&1; then
|
|
||||||
echo "Using staging update branch."
|
|
||||||
else
|
|
||||||
echo "No staging update branch found."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
${pkgs.git}/bin/git checkout "$branch_staging" flake.lock
|
|
||||||
echo "Updating nix-flake..."
|
|
||||||
nix flake update --flake .
|
|
||||||
echo "NixOS Rebuilding..."
|
|
||||||
${pkgs.nh}/bin/nh os switch ~/.hive
|
|
||||||
gen=$(sudo nix-env --list-generations --profile /nix/var/nix/profiles/system | ${pkgs.gnugrep}/bin/grep current | ${pkgs.gawk}/bin/awk '{print "Gen" $1 " @ " $2 "-" $3}')
|
|
||||||
by="$(${pkgs.coreutils-full}/bin/whoami)@$(${pkgs.nettools}/bin/hostname)"
|
|
||||||
${pkgs.git}/bin/git commit --no-gpg-sign -am "Upgrade $gen by $by"
|
|
||||||
${pkgs.git}/bin/git branch -D "$branch_staging"
|
|
||||||
popd
|
|
||||||
'';
|
|
||||||
update =
|
|
||||||
pkgs.writeShellScriptBin ".nixos-update"
|
|
||||||
''
|
|
||||||
set -e
|
|
||||||
pushd ~/.hive/
|
|
||||||
if [ -n "$(${pkgs.git}/bin/git status --porcelain)" ]; then
|
|
||||||
echo ".hive is unclean!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
branch_staging="staging-update"
|
|
||||||
branch_current="$(${pkgs.git}/bin/git branch --show-current)"
|
|
||||||
|
|
||||||
if ${pkgs.git}/bin/git rev-parse --verify "$branch_staging" >/dev/null 2>&1; then
|
|
||||||
echo "There is already a staging update branch."
|
|
||||||
else
|
|
||||||
echo "Creating a new staging update branch."
|
|
||||||
${pkgs.git}/bin/git switch -c "$branch_staging"
|
|
||||||
nix flake update --verbose --flake .
|
|
||||||
${pkgs.git}/bin/git add flake.lock
|
|
||||||
${pkgs.git}/bin/git commit --no-gpg-sign -m "staging update"
|
|
||||||
${pkgs.git}/bin/git switch "$branch_current"
|
|
||||||
fi
|
|
||||||
|
|
||||||
nix store --log-format internal-json -v diff-closures \
|
|
||||||
'.?ref='"$branch_current"'#nixosConfigurations.'"$(${pkgs.hostname}/bin/hostname)"'.config.system.build.toplevel' \
|
|
||||||
'.?ref='"$branch_staging"'#nixosConfigurations.'"$(${pkgs.hostname}/bin/hostname)"'.config.system.build.toplevel' \
|
|
||||||
|& ${pkgs.nix-output-monitor}/bin/nom --json
|
|
||||||
|
|
||||||
popd
|
|
||||||
'';
|
|
||||||
in {
|
|
||||||
options = {
|
|
||||||
hive.nix-scripts.enable = lib.mkEnableOption "Enable the nix build/update scripts";
|
|
||||||
};
|
|
||||||
|
|
||||||
config =
|
|
||||||
lib.mkIf cfg.enable
|
|
||||||
(
|
|
||||||
if isHM
|
|
||||||
then {
|
|
||||||
home.packages = [
|
|
||||||
home-rebuild
|
|
||||||
];
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
environment.systemPackages = [
|
|
||||||
rebuild
|
|
||||||
upgrade
|
|
||||||
update
|
|
||||||
];
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
{
|
|
||||||
isHM ? null,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
assertions = [
|
|
||||||
{
|
|
||||||
assertion = isHM != null;
|
|
||||||
message = "The \"home-manager\" flag isHM is required.";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
imports =
|
|
||||||
[
|
|
||||||
# modules containing both system and home-manager configs
|
|
||||||
./bin/nix-scripts.nix
|
|
||||||
]
|
|
||||||
++ lib.optionals (! isHM) [
|
|
||||||
# pure system modules
|
|
||||||
./desktop/de
|
|
||||||
./desktop/dm
|
|
||||||
./desktop/themes
|
|
||||||
./hardware/bluetooth.nix
|
|
||||||
./hardware/sound.nix
|
|
||||||
./hardware/yubikey.nix
|
|
||||||
./networking/wireguard
|
|
||||||
./programs/creative.nix
|
|
||||||
./programs/games.nix
|
|
||||||
./programs/spotify-shortcuts.nix
|
|
||||||
./programs/utils.nix
|
|
||||||
./services/borg-server.nix
|
|
||||||
./services/gitea-instance.nix
|
|
||||||
./services/gotify-instance.nix
|
|
||||||
./services/kdeconnect.nix
|
|
||||||
./services/minecraft-server
|
|
||||||
./services/nextcloud-instance.nix
|
|
||||||
./services/virt-manager.nix
|
|
||||||
]
|
|
||||||
++ lib.optionals isHM [
|
|
||||||
# pure home-manager modules
|
|
||||||
./home/doom
|
|
||||||
./home/firefox.nix
|
|
||||||
./home/flameshot.nix
|
|
||||||
./home/gotify.nix
|
|
||||||
./home/hyprland
|
|
||||||
./home/jj.nix
|
|
||||||
./home/kdeconnect.nix
|
|
||||||
./home/kitty
|
|
||||||
./home/nextcloud
|
|
||||||
./home/plasma.nix
|
|
||||||
./home/ranger
|
|
||||||
./home/ssh.nix
|
|
||||||
./home/swaync
|
|
||||||
./home/themes/layan.nix
|
|
||||||
./home/waybar
|
|
||||||
./home/wlogout
|
|
||||||
./home/wofi
|
|
||||||
./home/yubikey.nix
|
|
||||||
./home/zsh
|
|
||||||
];
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
{...}: {
|
|
||||||
imports = [
|
|
||||||
./hyprland.nix
|
|
||||||
./kwallet.nix
|
|
||||||
./plasma.nix
|
|
||||||
];
|
|
||||||
}
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
{
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
cfg = config.hive.hyprland;
|
|
||||||
in {
|
|
||||||
options.hive.hyprland = {
|
|
||||||
enable = lib.mkEnableOption "enable hyprland desktop environment";
|
|
||||||
};
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
services = {
|
|
||||||
libinput.enable = true;
|
|
||||||
dbus.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
xdg.portal = {
|
|
||||||
enable = true;
|
|
||||||
extraPortals = with pkgs; [
|
|
||||||
xdg-desktop-portal-wlr
|
|
||||||
xdg-desktop-portal-hyprland
|
|
||||||
kdePackages.xdg-desktop-portal-kde
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [spaceFM];
|
|
||||||
|
|
||||||
services.udisks2.enable = true;
|
|
||||||
|
|
||||||
programs.hyprland = {
|
|
||||||
enable = true;
|
|
||||||
withUWSM = true;
|
|
||||||
xwayland.enable = true;
|
|
||||||
};
|
|
||||||
programs.hyprlock.enable = true;
|
|
||||||
security.pam.services.hyprlock = {};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
cfg = config.hive.plasma;
|
|
||||||
in {
|
|
||||||
options.hive.plasma = {
|
|
||||||
enable = lib.mkEnableOption "Enable Plasma desktop environment with sddm";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
services.desktopManager.plasma6.enable = true;
|
|
||||||
|
|
||||||
xdg.portal = {
|
|
||||||
enable = true;
|
|
||||||
extraPortals = with pkgs; [
|
|
||||||
kdePackages.xdg-desktop-portal-kde
|
|
||||||
xdg-desktop-portal-gtk
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
cfg = config.hive.displayManager;
|
|
||||||
in {
|
|
||||||
options.hive.displayManager = with lib; {
|
|
||||||
name = mkOption {
|
|
||||||
type = types.enum ["sddm" "gdm" "cosmic"];
|
|
||||||
default = "sddm";
|
|
||||||
description = "The display manager to use.";
|
|
||||||
};
|
|
||||||
autologin = mkOption {
|
|
||||||
type = types.nullOr types.str;
|
|
||||||
default = null;
|
|
||||||
description = "The autologin username or null for no autologin.";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
imports = [
|
|
||||||
./gdm.nix
|
|
||||||
./sddm.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
config = {
|
|
||||||
services.xserver.enable = true;
|
|
||||||
services.xserver = {
|
|
||||||
xkb.layout = "de";
|
|
||||||
xkb.variant = "";
|
|
||||||
xkb.options = "caps:ctrl_modifier";
|
|
||||||
};
|
|
||||||
services.displayManager.autoLogin.enable = cfg.autologin != null;
|
|
||||||
services.displayManager.autoLogin.user = cfg.autologin;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
{
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
cfg = config.hive.displayManager;
|
|
||||||
in {
|
|
||||||
config = lib.mkIf (cfg.name == "gdm") {
|
|
||||||
services.xserver.displayManager.gdm = {
|
|
||||||
enable = true;
|
|
||||||
wayland = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
{
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
cfg = config.hive.displayManager;
|
|
||||||
in {
|
|
||||||
config = lib.mkIf (cfg.name == "sddm") {
|
|
||||||
services.displayManager.sddm = {
|
|
||||||
enable = true;
|
|
||||||
wayland.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
{...}: {
|
|
||||||
imports = [
|
|
||||||
./layan.nix
|
|
||||||
];
|
|
||||||
}
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
{
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
cfg = config.hive.themes.layan;
|
|
||||||
in {
|
|
||||||
options.hive.themes.layan = {
|
|
||||||
enable = lib.mkEnableOption "Layan theme configuration";
|
|
||||||
};
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
environment.systemPackages = [
|
|
||||||
pkgs.hive.layan-qt6
|
|
||||||
pkgs.kdePackages.qtstyleplugin-kvantum
|
|
||||||
pkgs.unstable.layan-cursors
|
|
||||||
pkgs.layan-gtk-theme
|
|
||||||
pkgs.tela-circle-icon-theme
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
{...}: {
|
|
||||||
imports = [
|
|
||||||
./doom.nix
|
|
||||||
];
|
|
||||||
}
|
|
||||||
@@ -1,288 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
cfg = config.hive.doom;
|
|
||||||
doom-pkgs = with pkgs; [
|
|
||||||
cmake
|
|
||||||
emacs-all-the-icons-fonts
|
|
||||||
fira
|
|
||||||
fira-code-symbols
|
|
||||||
fontconfig
|
|
||||||
gcc
|
|
||||||
nerd-fonts.fira-code
|
|
||||||
];
|
|
||||||
default-core-pkgs = with pkgs; [
|
|
||||||
(ripgrep.override {withPCRE2 = true;})
|
|
||||||
(aspellWithDicts (d: [d.en d.de d.en-computers d.en-science]))
|
|
||||||
binutils
|
|
||||||
editorconfig-core-c
|
|
||||||
fd
|
|
||||||
git
|
|
||||||
gnumake
|
|
||||||
gnutls
|
|
||||||
ispell
|
|
||||||
libtool
|
|
||||||
vscode-langservers-extracted
|
|
||||||
(pkgs.stdenvNoCC.mkDerivation {
|
|
||||||
name = "epdfinfo";
|
|
||||||
phases = "installPhase";
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out/bin
|
|
||||||
ln -s $(${pkgs.findutils}/bin/find ${pkgs.emacsPackages.pdf-tools}/ -name epdfinfo) $out/bin/
|
|
||||||
'';
|
|
||||||
})
|
|
||||||
];
|
|
||||||
default-shell-pkgs = with pkgs; [
|
|
||||||
bash-language-server
|
|
||||||
];
|
|
||||||
default-nix-pkgs = with pkgs; [
|
|
||||||
alejandra
|
|
||||||
nixd
|
|
||||||
];
|
|
||||||
default-latex-pkgs = with pkgs; [
|
|
||||||
pandoc
|
|
||||||
poppler
|
|
||||||
texlab
|
|
||||||
texlive.combined.scheme-medium
|
|
||||||
];
|
|
||||||
default-cxx-pkgs = with pkgs; [
|
|
||||||
clang
|
|
||||||
clang-tools
|
|
||||||
cmake
|
|
||||||
cppcheck
|
|
||||||
doxygen
|
|
||||||
gdb
|
|
||||||
ninja
|
|
||||||
];
|
|
||||||
default-python-pkgs = with pkgs; [
|
|
||||||
python312
|
|
||||||
python312Packages.black
|
|
||||||
pyright
|
|
||||||
];
|
|
||||||
doom-path-pkgs =
|
|
||||||
lib.optionals cfg.withLatexPkgs (cfg.overrideLatexPkgs default-latex-pkgs)
|
|
||||||
++ lib.optionals cfg.withShellPkgs (cfg.overrideShellPkgs default-shell-pkgs)
|
|
||||||
++ lib.optionals cfg.withNixPkgs (cfg.overrideNixPkgs default-nix-pkgs)
|
|
||||||
++ lib.optionals cfg.withCXXPkgs (cfg.overrideCXXPkgs default-cxx-pkgs)
|
|
||||||
++ lib.optionals cfg.withPythonPkgs (cfg.overridePythonPkgs default-python-pkgs)
|
|
||||||
++ lib.optional cfg.enableCopilot pkgs.unstable.copilot-language-server
|
|
||||||
++ default-core-pkgs;
|
|
||||||
doom-socket-name = "main";
|
|
||||||
wrapped-emacs = pkgs.symlinkJoin {
|
|
||||||
name = "wrapped-emacs";
|
|
||||||
paths = [pkgs.emacs30];
|
|
||||||
nativeBuildInputs = [pkgs.makeBinaryWrapper];
|
|
||||||
postBuild = ''
|
|
||||||
wrapProgram $out/bin/emacs \
|
|
||||||
--prefix PATH : ${lib.makeBinPath doom-path-pkgs} \
|
|
||||||
--add-flags "--init-directory=${config.xdg.configHome}/doom-emacs" \
|
|
||||||
--set DOOMDIR "${config.home.sessionVariables.DOOMDIR}" \
|
|
||||||
--set DOOMLOCALDIR "${config.home.sessionVariables.DOOMLOCALDIR}"
|
|
||||||
|
|
||||||
wrapProgram $out/bin/emacsclient \
|
|
||||||
--prefix PATH : ${lib.makeBinPath doom-path-pkgs} \
|
|
||||||
--set DOOMDIR "${config.home.sessionVariables.DOOMDIR}" \
|
|
||||||
--set DOOMLOCALDIR "${config.home.sessionVariables.DOOMLOCALDIR}"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
doom-setup = pkgs.writeShellScript "doom-setup" ''
|
|
||||||
export PATH="${lib.makeBinPath doom-path-pkgs}:$PATH"
|
|
||||||
export EMACS="${wrapped-emacs}/bin/emacs"
|
|
||||||
export DOOMDIR="${config.home.sessionVariables.DOOMDIR}"
|
|
||||||
export DOOMLOCALDIR="${config.home.sessionVariables.DOOMLOCALDIR}"
|
|
||||||
if [ ! -d "$DOOMLOCALDIR" ]; then
|
|
||||||
${config.xdg.configHome}/doom-emacs/bin/doom install --force --no-env
|
|
||||||
else
|
|
||||||
${config.xdg.configHome}/doom-emacs/bin/doom "$@"
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
doom-open = pkgs.writeShellScriptBin "doom-open" ''
|
|
||||||
export EMACS_SOCKET_NAME="$XDG_RUNTIME_DIR/emacs/${doom-socket-name}"
|
|
||||||
if [ -t 0 ]; then
|
|
||||||
exec ${wrapped-emacs}/bin/emacsclient -t "$@"
|
|
||||||
else
|
|
||||||
exec ${wrapped-emacs}/bin/emacsclient -c "$@"
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
in {
|
|
||||||
options.hive.doom = {
|
|
||||||
enable = lib.mkEnableOption "Enable Doom Emacs";
|
|
||||||
asDefaultEditor = lib.mkEnableOption "set the EDITOR variable to use the current emacs server (graphical/non-graphical)";
|
|
||||||
enableCopilot = lib.mkEnableOption "Enable Copilot in Doom Emacs";
|
|
||||||
enableTidal = lib.mkEnableOption "Enable TidalCycles";
|
|
||||||
withLatexPkgs = lib.mkEnableOption "Enable LaTeX packages in doom path";
|
|
||||||
withShellPkgs = lib.mkEnableOption "Enable shell packages in doom path";
|
|
||||||
withNixPkgs = lib.mkEnableOption "Enable LaTeX packages in doom path";
|
|
||||||
withCXXPkgs = lib.mkEnableOption "Enable CXX packages in doom path";
|
|
||||||
withPythonPkgs = lib.mkEnableOption "Enable python packages in doom path";
|
|
||||||
overrideLatexPkgs = lib.mkOption {
|
|
||||||
type = lib.types.functionTo (lib.types.listOf lib.types.package);
|
|
||||||
default = pkgs: pkgs;
|
|
||||||
example = ''
|
|
||||||
prev: with pkgs; [
|
|
||||||
texlive.combined.scheme-full
|
|
||||||
]
|
|
||||||
'';
|
|
||||||
description = "Override the default LaTeX packages in the doom path.";
|
|
||||||
};
|
|
||||||
overrideShellPkgs = lib.mkOption {
|
|
||||||
type = lib.types.functionTo (lib.types.listOf lib.types.package);
|
|
||||||
default = pkgs: pkgs;
|
|
||||||
example = ''
|
|
||||||
prev: with pkgs; [
|
|
||||||
shellcheck
|
|
||||||
]
|
|
||||||
'';
|
|
||||||
description = "Override the default shell packages in the doom path.";
|
|
||||||
};
|
|
||||||
overrideNixPkgs = lib.mkOption {
|
|
||||||
type = lib.types.functionTo (lib.types.listOf lib.types.package);
|
|
||||||
default = pkgs: pkgs;
|
|
||||||
example = ''
|
|
||||||
prev: with pkgs; [
|
|
||||||
nixpkgs-fmt
|
|
||||||
]
|
|
||||||
'';
|
|
||||||
description = "Override the default Nix packages in the doom path.";
|
|
||||||
};
|
|
||||||
overrideCXXPkgs = lib.mkOption {
|
|
||||||
type = lib.types.functionTo (lib.types.listOf lib.types.package);
|
|
||||||
default = pkgs: pkgs;
|
|
||||||
example = ''
|
|
||||||
prev: with pkgs; [
|
|
||||||
openmp
|
|
||||||
]
|
|
||||||
'';
|
|
||||||
description = "Override the default C++ packages in the doom path.";
|
|
||||||
};
|
|
||||||
overridePythonPkgs = lib.mkOption {
|
|
||||||
type = lib.types.functionTo (lib.types.listOf lib.types.package);
|
|
||||||
default = pkgs: pkgs;
|
|
||||||
example = ''
|
|
||||||
prev: with pkgs; [
|
|
||||||
pythonPackages.black
|
|
||||||
]
|
|
||||||
'';
|
|
||||||
description = "Override the default Python packages in the doom path.";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
fonts.fontconfig.enable = true;
|
|
||||||
|
|
||||||
programs.emacs = {
|
|
||||||
enable = true;
|
|
||||||
package = wrapped-emacs;
|
|
||||||
};
|
|
||||||
|
|
||||||
home = {
|
|
||||||
sessionPath = ["${config.xdg.configHome}/doom-emacs/bin"];
|
|
||||||
sessionVariables =
|
|
||||||
{
|
|
||||||
DOOMDIR = "${config.xdg.configHome}/doom-config";
|
|
||||||
DOOMLOCALDIR = "${config.xdg.configHome}/doom-local";
|
|
||||||
}
|
|
||||||
// lib.optionalAttrs cfg.asDefaultEditor {
|
|
||||||
EDITOR = "${doom-open.name}";
|
|
||||||
};
|
|
||||||
packages = doom-pkgs ++ lib.optional cfg.asDefaultEditor doom-open;
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.user.services.doom-emacs-server = {
|
|
||||||
Unit = {
|
|
||||||
Description = "Doom Emacs Server";
|
|
||||||
};
|
|
||||||
Service = {
|
|
||||||
ExecStart = "${wrapped-emacs}/bin/emacs --fg-daemon=${doom-socket-name}";
|
|
||||||
SuccessExitStatus = 15;
|
|
||||||
};
|
|
||||||
Install = {
|
|
||||||
WantedBy = []; # Lazy start by socket
|
|
||||||
};
|
|
||||||
};
|
|
||||||
systemd.user.sockets.doom-emacs-server = {
|
|
||||||
Socket = {
|
|
||||||
ListenStream = "/run/user/%U/emacs/${doom-socket-name}";
|
|
||||||
DirectoryMode = "0700";
|
|
||||||
};
|
|
||||||
Install = {
|
|
||||||
WantedBy = ["sockets.target"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
xdg = {
|
|
||||||
enable = true;
|
|
||||||
configFile = {
|
|
||||||
"doom-config/splash.png" = {
|
|
||||||
source = ./static/splash.png;
|
|
||||||
};
|
|
||||||
"doom-config/config.el" = {
|
|
||||||
source = ./static/config.el;
|
|
||||||
};
|
|
||||||
"doom-config/config.d/copilot.el" = {
|
|
||||||
enable = cfg.enableCopilot;
|
|
||||||
source = ./static/config.d/copilot.el;
|
|
||||||
};
|
|
||||||
"doom-config/packages/treesit-docgen.el" = {
|
|
||||||
source = ./static/packages/treesit-docgen.el;
|
|
||||||
};
|
|
||||||
"doom-config/init.el" = {
|
|
||||||
source = ./static/init.el;
|
|
||||||
onChange = "${doom-setup} sync --force -e";
|
|
||||||
};
|
|
||||||
"doom-config/packages.el" = {
|
|
||||||
source = ./static/packages.el;
|
|
||||||
onChange = "${doom-setup} sync --force -u -e";
|
|
||||||
};
|
|
||||||
"doom-config/packages.d/copilot.el" = {
|
|
||||||
enable = cfg.enableCopilot;
|
|
||||||
source = ./static/packages.d/copilot.el;
|
|
||||||
onChange = "${doom-setup} sync --force -u -e";
|
|
||||||
};
|
|
||||||
"doom-config/packages.d/tidal.el" = {
|
|
||||||
enable = cfg.enableTidal;
|
|
||||||
source = ./static/packages.d/tidal.el;
|
|
||||||
onChange = "${doom-setup} sync --force -u -e";
|
|
||||||
};
|
|
||||||
"doom-emacs" = {
|
|
||||||
source = builtins.fetchGit {
|
|
||||||
url = "https://github.com/doomemacs/doomemacs";
|
|
||||||
rev = "a0d6aac43fc94def29c98826e2f0088bcb703d13";
|
|
||||||
};
|
|
||||||
onChange = "${doom-setup} --force sync -u -e";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
desktopEntries = {
|
|
||||||
emacs = {
|
|
||||||
name = "Doom Emacs";
|
|
||||||
genericName = "Text Editor";
|
|
||||||
icon = ./static/icon.png;
|
|
||||||
exec = "${wrapped-emacs}/bin/emacs %F";
|
|
||||||
terminal = false;
|
|
||||||
categories = ["Application" "Development" "TextEditor"];
|
|
||||||
mimeType = ["text/*"];
|
|
||||||
settings = {
|
|
||||||
StartupWMClass = "Doom Emacs";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
emacsclient = {
|
|
||||||
name = "Doom Emacs (Client)";
|
|
||||||
genericName = "Text Editor";
|
|
||||||
icon = ./static/icon.png;
|
|
||||||
exec = ''
|
|
||||||
sh -c "if [ -n \\"\\$*\\" ]; then exec ${wrapped-emacs}/bin/emacsclient --alternate-editor= --display=\\"\\$DISPLAY\\" \\"\\$@\\"; else exec emacsclient --alternate-editor= --create-frame; fi" sh %F
|
|
||||||
'';
|
|
||||||
terminal = false;
|
|
||||||
categories = ["Application" "Development" "TextEditor"];
|
|
||||||
mimeType = ["text/*"];
|
|
||||||
settings = {
|
|
||||||
StartupWMClass = "Doom Emacs";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,96 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
inputs,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
cfg = config.hive.firefox;
|
|
||||||
in {
|
|
||||||
options.hive.firefox = {
|
|
||||||
enable = lib.mkEnableOption "Enable Firefox";
|
|
||||||
plasmaIntegration = lib.mkEnableOption "Enable Plasma Integration";
|
|
||||||
passFF = lib.mkEnableOption "Enable PassFF";
|
|
||||||
};
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
programs.firefox = {
|
|
||||||
enable = true;
|
|
||||||
nativeMessagingHosts = lib.optional cfg.passFF pkgs.passff-host;
|
|
||||||
|
|
||||||
# Default profile
|
|
||||||
profiles.jonas = {
|
|
||||||
name = "Jonas";
|
|
||||||
id = 0;
|
|
||||||
isDefault = true;
|
|
||||||
|
|
||||||
# Search
|
|
||||||
search = {
|
|
||||||
default = "ddg";
|
|
||||||
order = ["ddg" "google"];
|
|
||||||
force = true;
|
|
||||||
engines = {
|
|
||||||
"Nix Packages" = {
|
|
||||||
urls = [
|
|
||||||
{
|
|
||||||
template = "https://search.nixos.org/packages";
|
|
||||||
params = [
|
|
||||||
{
|
|
||||||
name = "type";
|
|
||||||
value = "packages";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "query";
|
|
||||||
value = "{searchTerms}";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
"Noogle" = {
|
|
||||||
urls = [
|
|
||||||
{
|
|
||||||
template = "https://noogle.dev/q";
|
|
||||||
params = [
|
|
||||||
{
|
|
||||||
name = "term";
|
|
||||||
value = "{searchTerms}";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
"cppreference" = {
|
|
||||||
urls = [
|
|
||||||
{
|
|
||||||
template = "https://en.cppreference.com/mwiki/index.php";
|
|
||||||
params = [
|
|
||||||
{
|
|
||||||
name = "title";
|
|
||||||
value = "Special%3ASearch";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "search";
|
|
||||||
value = "{searchTerms}";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "Go";
|
|
||||||
value = "go";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Extensions
|
|
||||||
extensions.packages = with inputs.firefox-addons.packages."x86_64-linux"; ([
|
|
||||||
ublock-origin
|
|
||||||
violentmonkey
|
|
||||||
]
|
|
||||||
++ lib.optional cfg.plasmaIntegration plasma-integration
|
|
||||||
++ lib.optional cfg.passFF passff);
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
cfg = config.hive.flameshot;
|
|
||||||
in {
|
|
||||||
options.hive.flameshot.enable = lib.mkEnableOption "Flameshot service.";
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
services.flameshot.enable = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user