Compare commits

...

19 Commits

Author SHA1 Message Date
32dba1cfaa Upgrade Gen153 @ 2026-04-26-14:09:07 by jonas@monolith 2026-04-28 02:27:33 +02:00
27da4a1f07 System Gen152 @ 2026-04-25-02:40:46 by jonas@monolith 2026-04-28 02:27:33 +02:00
bc575ee116 System Gen232 @ 2026-04-20-15:02:18 by jonas@comfy-station 2026-04-20 15:02:19 +02:00
Jonas Röger
787e1020c0 Home Gen23 @ 2026-04-15-16:12 by admin-jroeger@T14-OE130-7-ubuntu 2026-04-16 16:22:31 +02:00
91756e662e System Gen151 @ 2026-04-09-18:24:51 by jonas@monolith 2026-04-09 18:24:51 +02:00
392392f937 System Gen150 @ 2026-04-09-18:14:21 by jonas@monolith 2026-04-09 18:14:22 +02:00
d425db9f19 System Gen149 @ 2026-04-09-18:02:02 by jonas@monolith 2026-04-09 18:02:03 +02:00
075557a871 Upgrade Gen148 @ 2026-04-09-17:43:03 by jonas@monolith 2026-04-09 17:43:03 +02:00
242ee062de System Gen231 @ 2026-04-02-18:38:00 by jonas@comfy-station 2026-04-02 18:38:01 +02:00
7d0974ea92 System Gen230 @ 2026-04-02-13:08:57 by jonas@comfy-station 2026-04-02 13:08:57 +02:00
0e8a37c000 Home Gen552 @ 2026-04-02-11:58 by jonas@comfy-station 2026-04-02 12:00:09 +02:00
0240531a02 System Gen147 @ 2026-03-29-18:04:00 by jonas@monolith 2026-03-29 18:04:00 +02:00
7fbc6f180e System Gen229 @ 2026-03-29-17:54:43 by jonas@comfy-station 2026-03-29 17:54:43 +02:00
c23e6d9621 System Gen228 @ 2026-03-29-17:27:44 by jonas@comfy-station 2026-03-29 17:27:45 +02:00
a13add9b81 refactor modules 2026-03-29 17:10:57 +02:00
0b0dd1a1ba Upgrade Gen146 @ 2026-03-28-17:58:31 by jonas@monolith 2026-03-28 17:58:32 +01:00
6651d3e417 move admin-jroeger 2026-03-28 17:34:12 +01:00
71b6c1638b System Gen10 @ 2026-03-28-17:23:54 by jonas@harbor 2026-03-28 17:23:57 +01:00
3570ff6b5d System Gen9 @ 2026-03-28-17:19:27 by jonas@harbor 2026-03-28 17:19:29 +01:00
86 changed files with 199 additions and 2410 deletions

View File

@@ -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
View File

@@ -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": {

View File

@@ -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";
}; };
@@ -48,6 +44,7 @@
(./home + "/jonas@comfy-station") (./home + "/jonas@comfy-station")
(./home + "/jonas@monolith") (./home + "/jonas@monolith")
(./home + "/jonas@harbor") (./home + "/jonas@harbor")
(./home + "/admin-jroeger")
(import-tree ./modules) (import-tree ./modules)
(import-tree ./templates) (import-tree ./templates)
]; ];

View File

@@ -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

View 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
];
};
}

View File

@@ -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

View File

@@ -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;

View File

@@ -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
]; ];
}; };
} }

View File

@@ -66,8 +66,6 @@
}; };
# hive modules # hive modules
hive.virt-manager.enable = true;
hive.virt-manager.forUsers = ["jonas"];
hive.gitea-instance.enable = true; hive.gitea-instance.enable = true;
hive.gitea-instance.nativeRunner = true; hive.gitea-instance.nativeRunner = true;
hive.gitea-instance.instanceFQDN = "git.jroeger.de"; hive.gitea-instance.instanceFQDN = "git.jroeger.de";

View File

@@ -49,6 +49,9 @@
]; ];
# hive modules # hive modules
hive.plasma.enable = true;
hive.plasma.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"];
@@ -71,6 +74,9 @@
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; [
@@ -168,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";

View File

@@ -32,6 +32,7 @@
self.nixosModules.firefox self.nixosModules.firefox
self.nixosModules.kdeconnect self.nixosModules.kdeconnect
self.nixosModules.spotify-shortcuts self.nixosModules.spotify-shortcuts
self.nixosModules.ntsync
]; ];
}; };
} }

View File

@@ -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"; enable = true;
wayland.enable = true;
};
};
programs.hyprland = {
enable = true;
withUWSM = true;
xwayland.enable = true;
}; };
services.displayManager.autoLogin.enable = cfg.autologin != null;
services.displayManager.autoLogin.user = cfg.autologin;
services.libinput.enable = true; services.libinput.enable = true;
services.dbus.enable = true; services.dbus.enable = true;
services.displayManager.sddm = {
enable = true;
wayland.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 = {};
}; };

View File

@@ -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

View File

@@ -1,22 +1,38 @@
{ {
flake.nixosModules.plasma = {pkgs, ...}: { flake.nixosModules.plasma = {
services.xserver.enable = true; config,
services.xserver = { pkgs,
xkb.layout = "de"; lib,
xkb.variant = ""; ...
xkb.options = "caps:ctrl_modifier"; }: 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.";
};
}; };
services.displayManager.sddm = {
enable = true; config = lib.mkIf cfg.enable {
wayland.enable = true; services.displayManager = {
}; autoLogin.enable = cfg.autologin != null;
services.desktopManager.plasma6.enable = true; autoLogin.user = cfg.autologin;
xdg.portal = { sddm = {
enable = true; enable = true;
extraPortals = with pkgs; [ wayland.enable = true;
kdePackages.xdg-desktop-portal-kde };
xdg-desktop-portal-gtk };
]; services.desktopManager.plasma6.enable = true;
xdg.portal = {
enable = true;
extraPortals = with pkgs; [
kdePackages.xdg-desktop-portal-kde
xdg-desktop-portal-gtk
];
};
}; };
}; };
} }

32
modules/docs.nix Normal file
View 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
'';
};
};
}

View File

@@ -1,4 +1,4 @@
{ {self, ...}: {
flake.homeModules.doom = { flake.homeModules.doom = {
config, config,
pkgs, pkgs,
@@ -171,6 +171,11 @@
}; };
}; };
imports = [
# for copilot ls
self.homeModules.unstable-overlay
];
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
fonts.fontconfig.enable = true; fonts.fontconfig.enable = true;

View File

@@ -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)

View File

@@ -6,7 +6,7 @@
... ...
}: 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"; enable = lib.mkEnableOption "Enable WireGuard server";

View File

@@ -56,6 +56,7 @@
imports = [ imports = [
self.nixosModules.bulk-transcode-overlay self.nixosModules.bulk-transcode-overlay
self.nixosModules.unstable-overlay
]; ];
config = { config = {

View File

@@ -28,6 +28,7 @@
description = "The user for the borg repository home."; description = "The user for the borg repository home.";
}; };
repositories = lib.mkOption { repositories = lib.mkOption {
description = "The borg repositories to serve";
type = lib.types.attrsOf (lib.types.submodule { type = lib.types.attrsOf (lib.types.submodule {
options = { options = {
name = lib.mkOption { name = lib.mkOption {

View File

@@ -1,4 +1,4 @@
{ {inputs, ...}: {
flake.nixosModules.minecraft-server = { flake.nixosModules.minecraft-server = {
config, config,
pkgs, pkgs,
@@ -21,7 +21,14 @@
enable = lib.mkEnableOption "Enable BMC3 server"; enable = lib.mkEnableOption "Enable BMC3 server";
}; };
imports = [
inputs.nix-minecraft.nixosModules.minecraft-servers
];
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
nixpkgs.overlays = [
inputs.nix-minecraft.overlay
];
services.minecraft-servers = { services.minecraft-servers = {
enable = true; enable = true;
eula = true; eula = true;
@@ -29,7 +36,7 @@
servers.bmc3 = lib.optionalAttrs cfg.enable { servers.bmc3 = lib.optionalAttrs cfg.enable {
enable = true; enable = true;
autoStart = false; autoStart = true;
package = pkgs."${loader}Servers".${serverVersion}.override {inherit loaderVersion;}; package = pkgs."${loader}Servers".${serverVersion}.override {inherit loaderVersion;};
jvmOpts = modpack.variables.JAVA_ARGS; jvmOpts = modpack.variables.JAVA_ARGS;
symlinks = { symlinks = {

31
modules/system/ntsync.nix Normal file
View 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;
};
};
};
}

View File

@@ -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";
};
};
}

View File

@@ -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;
};
};
}

View File

@@ -1,44 +0,0 @@
{lib, ...}: {
# Home Manager needs a bit of information about you and the paths it should
# manage.
home.username = "jonas";
home.homeDirectory = "/home/jonas";
# hive modules
hive.zsh.enable = true;
hive.nix-scripts.enable = true;
hive.ranger.enable = true;
hive.doom.enable = true;
hive.doom.asDefaultEditor = true;
hive.doom.withNixPkgs = true;
hive.doom.withShellPkgs = true;
# 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";
};
};
}

View File

@@ -1,105 +0,0 @@
{
config,
lib,
...
}: rec {
# 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 = "${home.homeDirectory}/.config/sops/age/keys.txt";
};
sops.secrets.gotifyDaemonToken = {
sopsFile = ../secrets/jonas/gotify.yaml;
key = "monolithDesktopToken";
};
sops.secrets.gotifyCLIToken = {
sopsFile = ../secrets/jonas/gotify.yaml;
key = "cliToken";
};
# hive moduless
hive.doom.enable = true;
hive.doom.asDefaultEditor = true;
hive.doom.enableCopilot = false;
hive.doom.enableTidal = false;
hive.doom.withNixPkgs = true;
hive.doom.withShellPkgs = 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 = {
cli.enable = true;
daemon.enable = true;
cli.tokenSopsKey = config.sops.secrets.gotifyCLIToken.name;
daemon.tokenSopsKey = config.sops.secrets.gotifyDaemonToken.name;
host = "gotify.jroeger.de";
};
# 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";
};
};
}

View File

@@ -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. Its 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
];
}

View File

@@ -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;
}

View File

@@ -1,151 +0,0 @@
{
config,
pkgs,
...
}: {
imports = [
./hardware-configuration.nix
./disko.nix
];
# Secret management
sops.age.keyFile = "/var/lib/sops-nix/key.txt";
sops.secrets."nextcloud-admin-pass" = {
sopsFile = ../../secrets/harbor/nextcloud.yaml;
owner = "nextcloud";
key = "admin-pass";
};
sops.secrets."wg-priv" = {
sopsFile = ../../secrets/harbor/wg.yaml;
key = "privateKey";
};
sops.secrets."gitea-db-pass" = {
sopsFile = ../../secrets/harbor/gitea.yaml;
owner = config.services.gitea.user;
key = "databasePassword";
};
sops.secrets."gotify-admin-pass" = {
sopsFile = ../../secrets/harbor/gotify.yaml;
owner = config.hive.gotify-instance.user;
key = "adminPassword";
};
# 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;
};
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 30d";
};
};
# user with ssh access
users.users.jonas = {
isNormalUser = true;
description = "Jonas";
extraGroups = ["wheel"];
openssh.authorizedKeys.keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCyCyYsMSiy7shcehlzJEbCyRiHk+cicFB35Bc2uc4PjjkCjswLh01fRAV2QcplrNkH/5F4GBTbOoZHHc7/AVLyUxgwDC9ffD2i7fevuGpfBFy9D30uz6jDekxXkmRmIlidXLdG1Fh4zwVejGlwdhUu/Zb7PonO/dktx3EFdf1SpnW+y75anN85zoGsld7KQk42wEd0zXtCgx4CKI6Vvt6heWCEiJ9wyw1sLpTJr4H8In236CUj1/r1qY9Gfa8n9NA0J9XCpcwSCEWGRKQNicoQIpnp5txrgzaUq4r6qBKHmImYXmSTVnDZ9dJLRYNu2lDvBtTXP4ztlR6Lpxs873fPg51qgaX9rRVMMo/gGjq8fOFWsDVaJZab9VY3hZYNCKIbWFqo4GKyCQs9Xfzr2AUACm09HWiYMTefwEypOzvUb4z+LF2B/0c5XmghLF/TOzLVgDXzAgWMH4mCnPh9EDLHTtoJaGNURler9VRV8yQyLH6oK9UpHZovCFs7HpFN+WPv2QVFfkK8aHg7tnklFsT78z154bjuspiEI/fFGmTxoQUGufmHlRy/9GQDusgNfe24ZEB2hHBVjKv29XdIfvFAhoPVpA6+O/N3feSlmVISaU+8QraVQEf/TuQjopDUWpJTmqSxKvQSTPwcyWDy6NtcJ85bGAu6jSUGC3ouH4Rb2Q== cardno:000609618602"
];
};
users.defaultUserShell = pkgs.zsh;
programs.zsh.enable = true;
services.openssh = {
enable = true;
settings.PasswordAuthentication = false;
settings.KbdInteractiveAuthentication = false;
};
# hive modules
hive.gitea-instance.enable = true;
hive.gitea-instance.nativeRunner = true;
hive.gitea-instance.instanceFQDN = "git.jroeger.de";
hive.gitea-instance.databasePasswordFile = config.sops.secrets.gitea-db-pass.path;
hive.gotify-instance.enable = true;
hive.gotify-instance.instanceFQDN = "gotify.jroeger.de";
hive.gotify-instance.adminPasswordSopsKey = config.sops.secrets.gotify-admin-pass.name;
hive.nextcloud-instance.enable = true;
hive.nextcloud-instance.ssl = true;
hive.nextcloud-instance.adminPasswordFile = config.sops.secrets.nextcloud-admin-pass.path;
hive.nextcloud-instance.instanceFQDN = "nextcloud.jroeger.de";
hive.minecraft-server.enable = true;
hive.nix-scripts.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.wg.server.enable = true;
hive.wg.server.privateKeyFile = config.sops.secrets.wg-priv.path;
# 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. Its 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 = "25.11"; # Did you read the comment?
# VPS compat
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/sda";
boot.loader.grub.version = 2;
boot.kernelParams = [
"net.ifnames=0" # ensure iface is called eth0
"ip=173.249.42.252::173.249.42.1:255.255.255.0:harbor:eth0:none:8.8.8.8"
];
networking.networkmanager.enable = true;
networking = {
# Static network configuration
hostName = "harbor";
domain = "jroeger.de";
defaultGateway = "173.249.42.1";
nameservers = ["8.8.8.8"];
interfaces.eth0.ipv4.addresses = [
{
address = "173.249.42.252";
prefixLength = 24;
}
];
};
# Temporary ssh server for disk unlock
boot.initrd = {
availableKernelModules = ["virtio_pci"];
network = {
enable = true;
ssh = {
enable = true;
port = 2222;
authorizedKeys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCyCyYsMSiy7shcehlzJEbCyRiHk+cicFB35Bc2uc4PjjkCjswLh01fRAV2QcplrNkH/5F4GBTbOoZHHc7/AVLyUxgwDC9ffD2i7fevuGpfBFy9D30uz6jDekxXkmRmIlidXLdG1Fh4zwVejGlwdhUu/Zb7PonO/dktx3EFdf1SpnW+y75anN85zoGsld7KQk42wEd0zXtCgx4CKI6Vvt6heWCEiJ9wyw1sLpTJr4H8In236CUj1/r1qY9Gfa8n9NA0J9XCpcwSCEWGRKQNicoQIpnp5txrgzaUq4r6qBKHmImYXmSTVnDZ9dJLRYNu2lDvBtTXP4ztlR6Lpxs873fPg51qgaX9rRVMMo/gGjq8fOFWsDVaJZab9VY3hZYNCKIbWFqo4GKyCQs9Xfzr2AUACm09HWiYMTefwEypOzvUb4z+LF2B/0c5XmghLF/TOzLVgDXzAgWMH4mCnPh9EDLHTtoJaGNURler9VRV8yQyLH6oK9UpHZovCFs7HpFN+WPv2QVFfkK8aHg7tnklFsT78z154bjuspiEI/fFGmTxoQUGufmHlRy/9GQDusgNfe24ZEB2hHBVjKv29XdIfvFAhoPVpA6+O/N3feSlmVISaU+8QraVQEf/TuQjopDUWpJTmqSxKvQSTPwcyWDy6NtcJ85bGAu6jSUGC3ouH4Rb2Q== cardno:000609618602"
];
hostKeys = ["/etc/secrets/initrd/ssh_host_rsa_key"];
shell = "/bin/cryptsetup-askpass";
};
};
};
# 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";
};
console.keyMap = "de";
}

View File

@@ -1,71 +0,0 @@
let
btrfsopt = [
"compress=zstd"
"noatime"
"ssd"
"space_cache=v2"
"user_subvol_rm_allowed"
];
in {
disko.devices = {
disk = {
main = {
type = "disk";
device = "/dev/sda";
content = {
type = "gpt";
partitions = {
boot = {
name = "boot";
size = "1M";
type = "ef02";
};
esp = {
name = "esp";
size = "500M";
type = "ef00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
luks = {
size = "100%";
content = {
type = "luks";
name = "nixos";
passwordFile = "/tmp/pass";
additionalKeyFiles = ["/nixos-enc.key"];
extraFormatArgs = [
"--type luks1"
"--iter-time 3000"
];
settings = {
allowDiscards = true;
};
content = {
type = "btrfs";
subvolumes = {
"@root" = {
mountpoint = "/";
mountOptions = btrfsopt;
};
"@home" = {
mountpoint = "/home";
mountOptions = btrfsopt;
};
"@nix" = {
mountpoint = "/nix";
mountOptions = btrfsopt;
};
};
};
};
};
};
};
};
};
};
}

View File

@@ -1,21 +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 + "/profiles/qemu-guest.nix")
];
boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod"];
boot.initrd.kernelModules = [];
boot.kernelModules = [];
boot.extraModulePackages = [];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}

View File

@@ -1,283 +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/monolith/wg.yaml;
key = "privateKey";
};
sops.secrets.spotifyShortcutsClientId = {
sopsFile = ../../secrets/spotify-shortcuts.yaml;
key = "clientId";
};
sops.secrets.spotifyShortcutsClientSecret = {
sopsFile = ../../secrets/spotify-shortcuts.yaml;
key = "clientSecret";
};
# Users
users.users.jonas = {
isNormalUser = true;
description = "Jonas";
hashedPassword = ""; # passwordless login (sudo is now unusable without specifying NOPASSWD)
extraGroups = ["networkmanager" "wheel" "docker" "dialout"];
};
security.sudo.wheelNeedsPassword = false;
users.groups.data = {
gid = 1001;
members = ["jonas"];
};
users.defaultUserShell = pkgs.zsh;
programs.zsh.enable = true;
# fonts
fonts.packages = with pkgs; [
fira
fira-code-symbols
nerd-fonts.fira-code
];
# hive modules
hive.nix-scripts.enable = true;
hive.displayManager.name = "sddm";
hive.themes.layan.enable = true;
hive.plasma.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.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.peer = "monolith";
hive.programs.games.enable = true;
hive.programs.games.dayz = true;
hive.programs.games.lutris = true;
hive.programs.games.steam = true;
hive.programs.games.wine = true;
hive.programs.creative = {
enable = true;
image-management = true;
image-editing = true;
image-raw-processing = true;
video-editing-light = true;
video-editing-heavy = true;
daws = true;
};
hive.programs.utils = {
enable = true;
camera = true;
};
hive.programs.spotify-shortcuts = {
enable = true;
clientIdSopsKey = config.sops.secrets.spotifyShortcutsClientId.name;
clientSecretSopsKey = config.sops.secrets.spotifyShortcutsClientSecret.name;
};
# system packages
environment.systemPackages = with pkgs; [
age
alejandra
arduino
borgbackup
borgmatic
chromium
discord
docker
docker-compose
feh
firefox
git
gramps
insomnia
libreoffice
mosquitto
mpv
mupdf
nextcloud-client
nh
nix-index
nix-output-monitor
obsidian
openhantek6022
qalculate-qt
qdirstat
qtpass
ranger
sops
spotify
vim
vlc
vscode
wget
zoom
zotero
];
nixpkgs.config.permittedInsecurePackages = [
"electron-25.9.0" # required by obsidian
];
services.udev.packages = [pkgs.openhantek6022];
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
services.xserver.dpi = 91;
environment.variables = {
## Used by GTK 3
# `GDK_SCALE` is limited to integer values
GDK_SCALE = "1";
# Inverse of GDK_SCALE
GDK_DPI_SCALE = "1";
# Used by Qt 5
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
_JAVA_OPTIONS = "-Dsun.java2d.uiScale=1";
};
# Expose variables to graphical systemd user services
services.xserver.displayManager.importedVariables = [
"GDK_SCALE"
"GDK_DPI_SCALE"
"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
# settings for stateful data, like file locations and database versions
# on your system were taken. Its 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;
};
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.firewall.enable = true;
networking.hostName = "monolith"; # Define your hostname.
networking.extraHosts = ''
127.0.0.1 monolith
'';
# Enable networking
networking.networkmanager.enable = true;
# printing
services.printing.enable = 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
];
}

View File

@@ -1,57 +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" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sr_mod"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [];
fileSystems."/" = {
device = "/dev/disk/by-uuid/11d59216-2e76-499f-853f-9801486e330a";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/0892-649B";
fsType = "vfat";
options = ["fmask=0022" "dmask=0022"];
};
fileSystems."/data1" = {
device = "/dev/disk/by-uuid/8426515e-2be1-4c51-8b5f-d1850aa17270";
fsType = "ext4";
};
fileSystems."/data2" = {
device = "/dev/disk/by-uuid/4f39ed6d-74ed-420b-b542-89d432459f79";
fsType = "ext4";
};
swapDevices = [
{
device = "/.swapfile";
size = 24 * 1024;
}
];
# 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.enp42s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View File

@@ -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. Its 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;
}

View File

@@ -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;
}

View File

@@ -1 +0,0 @@
{}: {}

View File

@@ -1 +0,0 @@
use flake ../../#bulk-transcode --show-trace

View File

@@ -1,96 +0,0 @@
#!/usr/bin/env bash
declare -rA presets=(
[davinci-resolve]="-c:v dnxhd -profile:v dnxhr_hq -pix_fmt yuv422p -c:a pcm_s16le"
[instagram]="-vf scale='if(gte(iw/ih,1),1920,-1)':'if(gte(iw/ih,1),-1,1920)':flags=lanczos -r 30 -c:v libx264 -profile:v high -level 4.1 -pix_fmt yuv420p -preset slow -crf 18 -bf 2 -g 15 -keyint_min 15 -x264-params \"open-gop=0:cabac=1:b-pyramid=none\" -movflags +faststart -c:a aac -b:a 96k"
[insta-4k]="-r 30 -c:v libx264 -profile:v high -level 4.1 -pix_fmt yuv420p -preset slow -crf 18 -bf 2 -g 15 -keyint_min 15 -x264-params \"open-gop=0:cabac=1:b-pyramid=none\" -movflags +faststart -c:a aac -b:a 96k"
[storage-hevc]="-c:v libx265 -preset slower -crf 18 -pix_fmt yuv420p10le -x265-params aq-mode=3:aq-strength=1.0:psy-rd=1.8:psy-rdoq=1.0 -c:a copy"
[storage-av1]="-c:v libsvtav1 -preset 6 -crf 28 -pix_fmt yuv420p -g 240 -svtav1-params tune=0:aq-mode=2 -c:a copy"
[storage-av1-1080p]="-vf scale='if(gte(iw/ih,1),1920,-1)':'if(gte(iw/ih,1),-1,1920)' -c:v libsvtav1 -preset 6 -crf 28 -pix_fmt yuv420p -g 240 -svtav1-params tune=0:aq-mode=2 -c:a copy"
[storage-av1-nvenc]="-c:v av1_nvenc -cq 28 -preset slow -pix_fmt yuv420p10le -c:a copy"
[network]="-c:v libx264 -preset slow -crf 22 -pix_fmt yuv420p -c:a aac -b:a 128k"
[network-1080p]="-vf scale='if(gte(iw/ih,1),1920,-1)':'if(gte(iw/ih,1),-1,1920)' -c:v libx264 -preset slow -crf 22 -pix_fmt yuv420p -c:a aac -b:a 128k"
[whatsapp]="-vf scale='if(gte(iw/ih,1),1920,-1)':'if(gte(iw/ih,1),-1,1920)' -c:v libx264 -preset slow -crf 30 -profile:v baseline -level 3.0 -pix_fmt yuv420p -r 25 -g 50 -c:a aac -b:a 160k -r:a 44100"
)
declare -rA containers=(
[davinci-resolve]="mov"
[instagram]="mp4"
[insta-4k]="mp4"
[storage-hevc]="mkv"
[storage-av1]="mkv"
[storage-av1-1080p]="mkv"
[storage-av1-nvenc]="mkv"
[network]="mp4"
[network-1080p]="mp4"
[whatsapp]="mp4"
)
where="${1:-.}"
dest="${2:-$where}"
selection=$(find "$where" -type f | fzf --multi --preview 'ffprobe -v error -show_format -show_streams {}' --preview-window=up:wrap)
preset=$(
printf '%s\n' "${!presets[@]}" | \
fzf --multi --prompt "Select a preset"
)
flags="${presets[$preset]}"
container="${containers[$preset]}"
output_dir=$(find "$dest" -type d ! -name '.*' ! -path '*/.*/*' | fzf --preview 'tree -C {}' --preview-window=up:wrap --prompt "Select output directory: ")
if gum confirm "Flatten the directory structure?";
then
flatten=true
else
flatten=false
fi
function transcode_job {
local ifile="$1"
local output_dir="$2"
local flatten="$3"
local where="$4"
local flags="$5"
local container="$6"
local fname=$(basename "$ifile")
local segment=$(realpath --relative-to="$where" "$ifile")
if [ "$flatten" = true ]; then
output_file="$output_dir/$fname.$container"
else
output_file="$output_dir/$segment.$container"
fi
tmp_file=$(mktemp)
echo "Running Command: ffmpeg -y -i $ifile $flags $output_file" >> "$tmp_file"
mkdir -p "$(dirname "$output_file")"
if ffmpeg -y -i "$ifile" $(echo -n "$flags") "$output_file" 2>> "$tmp_file";
then
rm -f "$tmp_file"
else
# gum log "Failed to transcode $ifile. Check ./error.log for details."
cat "$tmp_file" >> error.log
rm -f "$tmp_file"
fi
}
export -f transcode_job
mapfile -t files <<< "$selection"
len=${#files[@]}
i=1
for file in "${files[@]}"; do
if [[ -f "$file" ]]; then
gum spin --spinner dot --title "[$i/$len] Transcoding $file" -- bash -c "source <(declare -f transcode_job); transcode_job \"$file\" \"$output_dir\" \"$flatten\" \"$where\" \"$flags\" \"$container\""
else
echo "Skipping invalid file: $file" >&2
fi
((i++))
done

View File

@@ -1,35 +0,0 @@
{
bash,
coreutils,
ffmpeg,
findutils,
fzf,
gum,
lib,
makeWrapper,
stdenv,
tree,
...
}:
stdenv.mkDerivation (finalAttrs: {
name = "bulk-transcode";
src = ./.;
buildInputs = [
bash
coreutils
ffmpeg
findutils
fzf
gum
makeWrapper
tree
];
installPhase = ''
install -Dm755 bulk-transcode.sh $out/bin/bulk-transcode
wrapProgram $out/bin/bulk-transcode \
--set PATH "${lib.makeBinPath finalAttrs.buildInputs}"
'';
})

View File

@@ -1,7 +0,0 @@
{pkgs ? import <nixpkgs> {}}: let
bin = pkgs.callPackage ./default.nix {};
in
pkgs.mkShell {
name = "bulk-transcode";
inputsFrom = [bin];
}

View File

@@ -1,40 +0,0 @@
{
appimageTools,
fetchurl,
makeWrapper,
...
}: let
pname = "crossover";
version = "3.1.5";
src = fetchurl {
url = "https://github.com/lacymorrow/crossover/releases/download/v${version}/CrossOver-${version}-x86_64.AppImage";
sha256 = "sha256-64RPal8n1PJh1LB+CTyNFt04Pw1lVgcsyc63S8yQ/DA=";
};
appimageContents = appimageTools.extract {
inherit pname version src;
};
in
appimageTools.wrapType2 {
inherit pname version src;
nativeBuildInputs = [makeWrapper];
extraInstallCommands = ''
wrapProgram $out/bin/${pname} --add-flags "--no-sandbox"
# Create a minimal .desktop file manually
mkdir -p $out/share/applications
cat > $out/share/applications/${pname}.desktop <<EOF
[Desktop Entry]
Name=${pname}
Exec=${pname} %U
Icon=${pname}
Type=Application
Categories=Utility;
EOF
# Optionally extract icon from AppImage (if available)
# You can also manually install an icon here:
mkdir -p $out/share/icons/hicolor/0x0/apps
cp ${appimageContents}/usr/share/icons/hicolor/0x0/apps/${pname}.png $out/share/icons/hicolor/0x0/apps/${pname}.png || true
'';
}

View File

@@ -1,8 +0,0 @@
final: _: {
hive = {
crossover = final.callPackage ./crossover.nix {};
bulk-transcode = final.callPackage ./bulk-transcode {};
spotify-shortcuts = final.callPackage ./spotify-shortcuts/derivation.nix {};
layan-qt6 = final.kdePackages.callPackage ./layan-qt6.nix {};
};
}

View File

@@ -1,52 +0,0 @@
{
stdenv,
lib,
fetchFromGitHub,
gitUpdater,
kdeclarative,
libplasma,
plasma-workspace,
}:
stdenv.mkDerivation {
pname = "layan-kde-qt6";
version = "2025-02-13";
src = fetchFromGitHub {
owner = "vinceliuice";
repo = "Layan-kde";
rev = "ace0b1d93e5f08c650630c146b2d637e1e2e6cd1";
hash = "sha256-T69bGjfZeOsJLmOZKps9N2wMv5VKYeo1ipGEsLAS+Sg=";
};
# Propagate sddm theme dependencies to user env otherwise sddm does
# not find them. Putting them in buildInputs is not enough.
propagatedUserEnvPkgs = [
kdeclarative
libplasma
plasma-workspace
];
postPatch = ''
patchShebangs install.sh
substituteInPlace install.sh \
--replace '$HOME/.local' $out \
--replace '$HOME/.config' $out/share
'';
installPhase = ''
runHook preInstall
name= ./install.sh --dest $out/share/themes
runHook postInstall
'';
passthru.updateScript = gitUpdater {};
meta = with lib; {
description = "Flat Design theme for KDE Plasma desktop";
homepage = "https://github.com/vinceliuice/Layan-kde";
license = licenses.gpl3Only;
platforms = platforms.all;
};
}

View File

@@ -1 +0,0 @@
use flake ../../#spotify-shortcuts --show-trace

View File

@@ -1,2 +0,0 @@
{pkgs ? import <nixpkgs> {}}:
pkgs.callPackage ./derivation.nix {}

View File

@@ -1,9 +0,0 @@
{python3Packages}:
with python3Packages;
buildPythonApplication {
name = "spotify-shortcuts";
propagatedBuildInputs = [spotipy pyxdg desktop-notifier];
pyproject = true;
build-system = [setuptools];
src = ./.;
}

View File

@@ -1,16 +0,0 @@
#!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name="spotify_shortcuts",
version="1.0",
packages=find_packages(),
entry_points={
"console_scripts": [
"spotisc=spotify_shortcuts.run:main",
"spotify-like=spotify_shortcuts.spotify_like:main",
"spotify-pl-add=spotify_shortcuts.spotify_pl_add:main",
],
},
)

View File

@@ -1,15 +0,0 @@
{pkgs ? import <nixpkgs> {}}: let
drv = pkgs.callPackage ./derivation.nix {};
in
pkgs.mkShell {
packages = [
pkgs.pyright
pkgs.black
];
inputsFrom = [drv];
shellHook = ''
export PYTHONPATH="$PYTHONPATH:$(pwd)"
'';
}

View File

@@ -1,4 +0,0 @@
from spotify_shortcuts.run import main
if __name__ == "__main__":
main()

View File

@@ -1,74 +0,0 @@
from pathlib import Path
from dataclasses import dataclass
from argparse import ArgumentParser
from typing import List
from os import getenv
from sys import argv
from xdg.BaseDirectory import xdg_cache_home
from json import loads
@dataclass
class Config:
cache_file: Path = Path(xdg_cache_home) / Path("spotify-shortcuts.json")
client_id: str | None = None
client_secret: str | None = None
notifications: bool = True
@staticmethod
def from_file(path: Path):
if not path.exists():
raise FileNotFoundError(f"Configuration file {path} does not exist.")
with open(path, "r") as f:
data = loads(f.read())
return Config(
cache_file=Path(data.get("cacheFile", Config.cache_file)),
client_id=data.get("clientId", Config.client_id),
client_secret=data.get("clientSecret", Config.client_secret),
)
def load_config(args: List[str] = argv[1:]) -> Config:
parser = ArgumentParser(description="Spotify CLI Tool")
parser.add_argument(
"--cache-file",
type=Path,
default=Config.cache_file,
help="Path to the cache file for Spotify authentication",
)
parser.add_argument(
"--client-id",
type=str,
default=Config.client_id,
help="Spotify API Client ID",
)
parser.add_argument(
"--client-secret",
type=str,
default=Config.client_secret,
help="Spotify API Client Secret",
)
parser.add_argument(
"--config-file",
type=str,
help="Path to a json configuration file with keys clientId and clientSecret",
)
parser.add_argument(
"--no-notifications",
action="store_true",
help="Disable desktop notifications",
)
ns = parser.parse_args(args)
cfg = Config()
if (cfg_file := ns.config_file or getenv("SPOTIFY_SHORTCUTS_CONFIG", None)) != None:
cfg = Config.from_file(Path(cfg_file))
return Config(
cache_file=ns.cache_file or cfg.cache_file,
client_id=ns.client_id or cfg.client_id,
client_secret=ns.client_secret or cfg.client_secret,
notifications=not ns.no_notifications or cfg.notifications,
)

View File

@@ -1,7 +0,0 @@
from spotify_shortcuts.spotify_like import SpotifyLike
from spotify_shortcuts.spotify_pl_add import SpotifyPlAdd
SHORTCUT_REGISTRY = {
"like": SpotifyLike(),
"pl_add": SpotifyPlAdd(),
}

View File

@@ -1,47 +0,0 @@
from spotify_shortcuts.config import Config, load_config
from spotify_shortcuts.shortcut import Shortcut
from spotify_shortcuts.spotify_auth import authenticated_session
from itertools import chain
def all_scopes() -> list[str]:
from spotify_shortcuts.registry import SHORTCUT_REGISTRY
return list(
set(
chain.from_iterable(
shortcut.get_scopes() for shortcut in SHORTCUT_REGISTRY.values()
)
)
)
def run_shortcut(shortcut: Shortcut, config: Config):
client = authenticated_session(
config, scopes=all_scopes() # use all scopes to avoid re-authentication
)
shortcut.execute(client, config)
def main():
from spotify_shortcuts.registry import SHORTCUT_REGISTRY
import sys
if len(sys.argv) < 2:
print(f"Usage: {sys.argv[0]} <shortcut_name>")
sys.exit(1)
shortcut_name = sys.argv[1]
if shortcut_name not in SHORTCUT_REGISTRY:
print(f"Shortcut '{shortcut_name}' not found.")
sys.exit(1)
shortcut = SHORTCUT_REGISTRY[shortcut_name]
config = load_config(args=sys.argv[2:])
run_shortcut(shortcut, config)
if __name__ == "__main__":
main()

View File

@@ -1,21 +0,0 @@
from abc import ABC, abstractmethod
from spotify_shortcuts.config import Config
from spotipy import Spotify
class Shortcut(ABC):
@abstractmethod
def execute(self, client: Spotify, config: Config):
"""Execute the shortcut action."""
pass
@abstractmethod
def get_help(self) -> str:
"""Return a description of the shortcut."""
pass
@abstractmethod
def get_scopes(self) -> list[str]:
"""Return the spotify API scopes required for the shortcut."""
pass

View File

@@ -1,20 +0,0 @@
from spotipy.oauth2 import SpotifyOAuth
from spotipy import Spotify
from spotify_shortcuts.config import Config
CALLBACK_URI = "http://127.0.0.1:45632/callback"
def authenticated_session(cfg: Config, scopes: list[str]) -> Spotify:
assert cfg.client_id, "Spotify client ID is required"
assert cfg.client_secret, "Spotify client secret is required"
return Spotify(
auth_manager=SpotifyOAuth(
client_id=cfg.client_id,
client_secret=cfg.client_secret,
redirect_uri=CALLBACK_URI,
scope=" ".join(scopes),
cache_path=cfg.cache_file,
)
)

View File

@@ -1,46 +0,0 @@
from spotify_shortcuts.run import run_shortcut
from spotify_shortcuts.shortcut import Shortcut
from spotify_shortcuts.config import load_config
from desktop_notifier import DesktopNotifierSync
SCOPES = [
"user-library-read",
"user-library-modify",
"user-read-playback-state",
]
class SpotifyLike(Shortcut):
def execute(self, client, config):
if (playback := client.current_playback()) is None:
print("No current playback found.")
return
if (uri := playback.get("item", {}).get("uri", None)) is None:
print("No track URI found in current playback.")
return
client.current_user_saved_tracks_add(tracks=[uri])
if config.notifications:
dn = DesktopNotifierSync()
dn.send(
title="Track Liked",
message=f"Track \"{playback.get('item', {}).get('name', '<no-name>')}\" by \"{
", ".join(a.get('name', '<no-name>') for a in playback.get('item', {}).get('artists', []))
}\" has been liked.",
)
def get_help(self) -> str:
return "Like the currently playing track."
def get_scopes(self) -> list[str]:
return SCOPES
def main():
run_shortcut(SpotifyLike(), load_config())
if __name__ == "__main__":
main()

View File

@@ -1,57 +0,0 @@
from spotify_shortcuts.shortcut import Shortcut
from spotify_shortcuts.config import load_config
from desktop_notifier import DesktopNotifierSync
from spotify_shortcuts.run import run_shortcut
SCOPES = [
"playlist-modify-public",
"playlist-modify-private",
"user-read-playback-state",
]
class SpotifyPlAdd(Shortcut):
def execute(self, client, config):
if (playback := client.current_playback()) is None:
print("No current playback found.")
return
if (track_uri := playback.get("item", {}).get("uri", None)) is None:
print("No track URI found in current playback.")
return
if (context_uri := playback.get("context", {}).get("uri", None)) is None:
print("No context URI found in current playback.")
return
client.playlist_add_items(context_uri, items=[track_uri])
if config.notifications:
track_name = playback.get("item", {}).get("name", "<no-name>")
artists = ", ".join(
a.get("name", "<no-name>")
for a in playback.get("item", {}).get("artists", [])
)
playlist_name = (client.playlist(context_uri) or {}).get(
"name", "<no-name>"
)
dn = DesktopNotifierSync()
dn.send(
title="Track Added to Playlist",
message=f'Track "{track_name}" by "{artists}" has been added to {playlist_name}.',
)
def get_help(self) -> str:
return "Add the currently playing track to the current playlist."
def get_scopes(self) -> list[str]:
return SCOPES
def main():
run_shortcut(SpotifyPlAdd(), load_config())
if __name__ == "__main__":
main()