Compare commits

..

10 Commits

221 changed files with 3521 additions and 1241 deletions

264
flake-old.nix Normal file
View File

@@ -0,0 +1,264 @@
{
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.";
};
};
};
}

608
flake.lock generated
View File

@@ -1,38 +1,5 @@
{ {
"nodes": { "nodes": {
"aquamarine": {
"inputs": {
"hyprutils": [
"hyprland",
"hyprutils"
],
"hyprwayland-scanner": [
"hyprland",
"hyprwayland-scanner"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1773436376,
"narHash": "sha256-OUPRrprbgN27BXHuWkMAPSCfLLQ/uwpWghEfKYN2iAg=",
"owner": "hyprwm",
"repo": "aquamarine",
"rev": "43f10d24391692bba3d762931ee35e7f17f8e8b8",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "aquamarine",
"type": "github"
}
},
"audio": { "audio": {
"inputs": { "inputs": {
"mucap": "mucap", "mucap": "mucap",
@@ -142,22 +109,6 @@
} }
}, },
"flake-compat": { "flake-compat": {
"flake": false,
"locked": {
"lastModified": 1767039857,
"narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=",
"owner": "NixOS",
"repo": "flake-compat",
"rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_2": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1747046372, "lastModified": 1747046372,
@@ -173,41 +124,21 @@
"type": "github" "type": "github"
} }
}, },
"flake-compat_3": { "flake-parts": {
"flake": false,
"locked": {
"lastModified": 1746162366,
"narHash": "sha256-5SSSZ/oQkwfcAz/o/6TlejlVGqeK08wyREBQ5qFFPhM=",
"owner": "nix-community",
"repo": "flake-compat",
"rev": "0f158086a2ecdbb138cd0429410e44994f1b7e4b",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "flake-compat",
"type": "github"
}
},
"gitignore": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs-lib": "nixpkgs-lib"
"hyprland",
"pre-commit-hooks",
"nixpkgs"
]
}, },
"locked": { "locked": {
"lastModified": 1709087332, "lastModified": 1772408722,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", "narHash": "sha256-rHuJtdcOjK7rAHpHphUb1iCvgkU3GpfvicLMwwnfMT0=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "gitignore.nix", "repo": "flake-parts",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394", "rev": "f20dc5d9b8027381c474144ecabc9034d6a839a3",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "gitignore.nix", "repo": "flake-parts",
"type": "github" "type": "github"
} }
}, },
@@ -232,354 +163,18 @@
"type": "github" "type": "github"
} }
}, },
"hyprcursor": { "import-tree": {
"inputs": {
"hyprlang": [
"hyprland",
"hyprlang"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": { "locked": {
"lastModified": 1772461003, "lastModified": 1773693634,
"narHash": "sha256-pVICsV7FtcEeVwg5y/LFh3XFUkVJninm/P1j/JHzEbM=", "narHash": "sha256-BtZ2dtkBdSUnFPPFc+n0kcMbgaTxzFNPv2iaO326Ffg=",
"owner": "hyprwm", "owner": "vic",
"repo": "hyprcursor", "repo": "import-tree",
"rev": "b62396457b9cfe2ebf24fe05404b09d2a40f8ed7", "rev": "c41e7d58045f9057880b0d85e1152d6a4430dbf1",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "hyprwm", "owner": "vic",
"repo": "hyprcursor", "repo": "import-tree",
"type": "github"
}
},
"hyprgraphics": {
"inputs": {
"hyprutils": [
"hyprland",
"hyprutils"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1772461523,
"narHash": "sha256-mI6A51do+hEUzeJKk9YSWfVHdI/SEEIBi2tp5Whq5mI=",
"owner": "hyprwm",
"repo": "hyprgraphics",
"rev": "7d63c04b4a2dd5e59ef943b4b143f46e713df804",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprgraphics",
"type": "github"
}
},
"hyprland": {
"inputs": {
"aquamarine": "aquamarine",
"hyprcursor": "hyprcursor",
"hyprgraphics": "hyprgraphics",
"hyprland-guiutils": "hyprland-guiutils",
"hyprland-protocols": "hyprland-protocols",
"hyprlang": "hyprlang",
"hyprutils": "hyprutils",
"hyprwayland-scanner": "hyprwayland-scanner",
"hyprwire": "hyprwire",
"nixpkgs": [
"nixpkgs"
],
"pre-commit-hooks": "pre-commit-hooks",
"systems": "systems",
"xdph": "xdph"
},
"locked": {
"lastModified": 1773926276,
"narHash": "sha256-dasCo1RATJvJWjPaVkbXPvjbWE+4f69bnRNGwtsh7Ao=",
"owner": "hyprwm",
"repo": "Hyprland",
"rev": "ad46ff635bcf7b4877b03e97d8e85468f025f4a1",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "Hyprland",
"type": "github"
}
},
"hyprland-guiutils": {
"inputs": {
"aquamarine": [
"hyprland",
"aquamarine"
],
"hyprgraphics": [
"hyprland",
"hyprgraphics"
],
"hyprlang": [
"hyprland",
"hyprlang"
],
"hyprtoolkit": "hyprtoolkit",
"hyprutils": [
"hyprland",
"hyprutils"
],
"hyprwayland-scanner": [
"hyprland",
"hyprwayland-scanner"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1772467975,
"narHash": "sha256-kipyuDBxrZq+beYpZqWzGvFWm4QbayW9agAvi94vDXY=",
"owner": "hyprwm",
"repo": "hyprland-guiutils",
"rev": "5e1c6b9025aaf4d578f3eff7c0eb1f0c197a9507",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprland-guiutils",
"type": "github"
}
},
"hyprland-plugins": {
"inputs": {
"hyprland": [
"hyprland"
],
"nixpkgs": [
"hyprland-plugins",
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland-plugins",
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1771865848,
"narHash": "sha256-xwNa+1D8WPsDnJtUofDrtyDCZKZotbUymzV/R5s+M0I=",
"owner": "hyprwm",
"repo": "hyprland-plugins",
"rev": "b85a56b9531013c79f2f3846fd6ee2ff014b8960",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprland-plugins",
"type": "github"
}
},
"hyprland-protocols": {
"inputs": {
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1772460177,
"narHash": "sha256-/6G/MsPvtn7bc4Y32pserBT/Z4SUUdBd4XYJpOEKVR4=",
"owner": "hyprwm",
"repo": "hyprland-protocols",
"rev": "1cb6db5fd6bb8aee419f4457402fa18293ace917",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprland-protocols",
"type": "github"
}
},
"hyprlang": {
"inputs": {
"hyprutils": [
"hyprland",
"hyprutils"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1772459629,
"narHash": "sha256-/iwvNUYShmmnwmz/czEUh6+0eF5vCMv0xtDW0STPIuM=",
"owner": "hyprwm",
"repo": "hyprlang",
"rev": "7615ee388de18239a4ab1400946f3d0e498a8186",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprlang",
"type": "github"
}
},
"hyprtoolkit": {
"inputs": {
"aquamarine": [
"hyprland",
"hyprland-guiutils",
"aquamarine"
],
"hyprgraphics": [
"hyprland",
"hyprland-guiutils",
"hyprgraphics"
],
"hyprlang": [
"hyprland",
"hyprland-guiutils",
"hyprlang"
],
"hyprutils": [
"hyprland",
"hyprland-guiutils",
"hyprutils"
],
"hyprwayland-scanner": [
"hyprland",
"hyprland-guiutils",
"hyprwayland-scanner"
],
"nixpkgs": [
"hyprland",
"hyprland-guiutils",
"nixpkgs"
],
"systems": [
"hyprland",
"hyprland-guiutils",
"systems"
]
},
"locked": {
"lastModified": 1772462885,
"narHash": "sha256-5pHXrQK9zasMnIo6yME6EOXmWGFMSnCITcfKshhKJ9I=",
"owner": "hyprwm",
"repo": "hyprtoolkit",
"rev": "9af245a69fa6b286b88ddfc340afd288e00a6998",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprtoolkit",
"type": "github"
}
},
"hyprutils": {
"inputs": {
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1773436263,
"narHash": "sha256-n+2xFJngUkBqUJD5FsbVnYEHBTyDFSqtBIwQIGPXWWo=",
"owner": "hyprwm",
"repo": "hyprutils",
"rev": "5e228db6821380a5875d5643176c5c46a47b8134",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprutils",
"type": "github"
}
},
"hyprwayland-scanner": {
"inputs": {
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1772459835,
"narHash": "sha256-978jRz/y/9TKmZb/qD4lEYHCQGHpEXGqy+8X2lFZsak=",
"owner": "hyprwm",
"repo": "hyprwayland-scanner",
"rev": "0a692d4a645165eebd65f109146b8861e3a925e7",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprwayland-scanner",
"type": "github"
}
},
"hyprwire": {
"inputs": {
"hyprutils": [
"hyprland",
"hyprutils"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1773074819,
"narHash": "sha256-qRqYnXiKoJLRTcfaRukn7EifmST2IVBUMZOeZMAc5UA=",
"owner": "hyprwm",
"repo": "hyprwire",
"rev": "f68afd0e73687598cc2774804fedad76693046f0",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprwire",
"type": "github" "type": "github"
} }
}, },
@@ -653,11 +248,11 @@
}, },
"nix-minecraft": { "nix-minecraft": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_2", "flake-compat": "flake-compat",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
"systems": "systems_2" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1774407052, "lastModified": 1774407052,
@@ -673,29 +268,6 @@
"type": "github" "type": "github"
} }
}, },
"nixos-cosmic": {
"inputs": {
"flake-compat": "flake-compat_3",
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable",
"rust-overlay": "rust-overlay_2"
},
"locked": {
"lastModified": 1751591814,
"narHash": "sha256-A4lgvuj4v+Pr8MniXz1FBG0DXOygi8tTECR+j53FMhM=",
"owner": "lilyinstarlight",
"repo": "nixos-cosmic",
"rev": "fef2d0c78c4e4d6c600a88795af193131ff51bdc",
"type": "github"
},
"original": {
"owner": "lilyinstarlight",
"repo": "nixos-cosmic",
"type": "github"
}
},
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1773533765, "lastModified": 1773533765,
@@ -728,19 +300,18 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-stable": { "nixpkgs-lib": {
"locked": { "locked": {
"lastModified": 1751048012, "lastModified": 1772328832,
"narHash": "sha256-MYbotu4UjWpTsq01wglhN5xDRfZYLFtNk7SBY0BcjkU=", "narHash": "sha256-e+/T/pmEkLP6BHhYjx6GmwP5ivonQQn0bJdH9YrRB+Q=",
"owner": "NixOS", "owner": "nix-community",
"repo": "nixpkgs", "repo": "nixpkgs.lib",
"rev": "a684c58d46ebbede49f280b653b9e56100aa3877", "rev": "c185c7a5e5dd8f9add5b2f8ebeff00888b070742",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "nix-community",
"ref": "nixos-24.11", "repo": "nixpkgs.lib",
"repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
@@ -760,67 +331,19 @@
"type": "github" "type": "github"
} }
}, },
"plasma-manager": {
"inputs": {
"home-manager": [
"home-manager"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1772361940,
"narHash": "sha256-B1Cz+ydL1iaOnGlwOFld/C8lBECPtzhiy/pP93/CuyY=",
"owner": "pjones",
"repo": "plasma-manager",
"rev": "a4b33606111c9c5dcd10009042bb710307174f51",
"type": "github"
},
"original": {
"owner": "pjones",
"repo": "plasma-manager",
"type": "github"
}
},
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat",
"gitignore": "gitignore",
"nixpkgs": [
"hyprland",
"nixpkgs"
]
},
"locked": {
"lastModified": 1772893680,
"narHash": "sha256-JDqZMgxUTCq85ObSaFw0HhE+lvdOre1lx9iI6vYyOEs=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "8baab586afc9c9b57645a734c820e4ac0a604af9",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "git-hooks.nix",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"audio": "audio", "audio": "audio",
"disko": "disko", "disko": "disko",
"dzgui-nix": "dzgui-nix", "dzgui-nix": "dzgui-nix",
"firefox-addons": "firefox-addons", "firefox-addons": "firefox-addons",
"flake-parts": "flake-parts",
"home-manager": "home-manager", "home-manager": "home-manager",
"hyprland": "hyprland", "import-tree": "import-tree",
"hyprland-plugins": "hyprland-plugins",
"nix-minecraft": "nix-minecraft", "nix-minecraft": "nix-minecraft",
"nixos-cosmic": "nixos-cosmic",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable", "nixpkgs-unstable": "nixpkgs-unstable",
"plasma-manager": "plasma-manager",
"sops-nix": "sops-nix" "sops-nix": "sops-nix"
} }
}, },
@@ -863,27 +386,6 @@
"type": "github" "type": "github"
} }
}, },
"rust-overlay_2": {
"inputs": {
"nixpkgs": [
"nixos-cosmic",
"nixpkgs"
]
},
"locked": {
"lastModified": 1751251399,
"narHash": "sha256-y+viCuy/eKKpkX1K2gDvXIJI/yzvy6zA3HObapz9XZ0=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "b22d5ee8c60ed1291521f2dde48784edd6bf695b",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"sops-nix": { "sops-nix": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@@ -905,21 +407,6 @@
} }
}, },
"systems": { "systems": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"type": "github"
}
},
"systems_2": {
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
@@ -933,47 +420,6 @@
"repo": "default", "repo": "default",
"type": "github" "type": "github"
} }
},
"xdph": {
"inputs": {
"hyprland-protocols": [
"hyprland",
"hyprland-protocols"
],
"hyprlang": [
"hyprland",
"hyprlang"
],
"hyprutils": [
"hyprland",
"hyprutils"
],
"hyprwayland-scanner": [
"hyprland",
"hyprwayland-scanner"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1772669058,
"narHash": "sha256-XhnY0aRuDo5LT8pmJVPofPOgO2hAR7T+XRoaQxtNPzQ=",
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"rev": "906d0ac159803a7df2dc1f948df9327670380f69",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

240
flake.nix
View File

@@ -4,6 +4,8 @@
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11"; nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
import-tree.url = "github:vic/import-tree";
nixos-hardware.url = "github:NixOS/nixos-hardware/master"; nixos-hardware.url = "github:NixOS/nixos-hardware/master";
home-manager = { home-manager = {
url = "github:nix-community/home-manager/release-25.11"; url = "github:nix-community/home-manager/release-25.11";
@@ -15,27 +17,10 @@
}; };
disko.url = "github:nix-community/disko"; disko.url = "github:nix-community/disko";
disko.inputs.nixpkgs.follows = "nixpkgs"; disko.inputs.nixpkgs.follows = "nixpkgs";
plasma-manager = {
url = "github:pjones/plasma-manager";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
firefox-addons = { firefox-addons = {
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons"; url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
inputs.nixpkgs.follows = "nixpkgs"; 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 = { dzgui-nix = {
url = "github:lelgenio/dzgui-nix"; url = "github:lelgenio/dzgui-nix";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@@ -48,217 +33,18 @@
nix-minecraft.inputs.nixpkgs.follows = "nixpkgs"; nix-minecraft.inputs.nixpkgs.follows = "nixpkgs";
}; };
outputs = { outputs = inputs @ {
self, flake-parts,
nixpkgs, import-tree,
nixpkgs-unstable,
nixos-hardware,
home-manager,
nixos-cosmic,
audio,
... ...
} @ inputs: let }:
system = "x86_64-linux"; flake-parts.lib.mkFlake {inherit inputs;} {
overlay-unstable = final: prev: { systems = ["x86_64-linux"];
unstable = import nixpkgs-unstable { imports = [
system = prev.system; inputs.home-manager.flakeModules.home-manager
config.allowUnfree = true; ./hosts/comfy-station
}; (./home + "/jonas@comfy-station")
}; (import-tree ./modules)
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.";
};
};
};
} }

View File

@@ -0,0 +1,96 @@
{
config,
lib,
...
}: {
imports = [
./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.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

@@ -0,0 +1,25 @@
{
self,
inputs,
...
}: {
flake.homeConfigurations."jonas@comfy-station" = inputs.home-manager.lib.homeManagerConfiguration {
pkgs = import inputs.nixpkgs {system = "x86_64-linux";};
modules = [
({...}: {nixpkgs.overlays = [self.overlays.unstable inputs.audio.overlays.default];})
({...}: {nixpkgs.config.allowUnfree = true;})
./configuration.nix
inputs.sops-nix.homeManagerModules.sops
self.homeModules.layan
self.homeModules.hyprland
self.homeModules.swaync
self.homeModules.waybar
self.homeModules.wlogout
self.homeModules.wofi
self.homeModules.kitty
self.homeModules.nextcloud-client
];
};
}

View File

@@ -28,23 +28,13 @@
programs.zsh.enable = true; programs.zsh.enable = true;
# hive modules # hive modules
hive.nix-scripts.enable = true;
hive.displayManager.name = "sddm";
hive.hyprland.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.yubikey.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 = "comfy-station"; hive.wg.client.peer = "comfy-station";
hive.programs.games.enable = true;
hive.programs.games.steam = true; hive.programs.games.steam = true;
hive.programs.creative = { hive.programs.creative = {
enable = true;
image-management = true; image-management = true;
image-raw-processing = true; image-raw-processing = true;
video-editing-light = true; video-editing-light = true;
@@ -79,7 +69,6 @@
nix-index nix-index
nix-output-monitor nix-output-monitor
obsidian obsidian
openhantek6022
qalculate-qt qalculate-qt
qtpass qtpass
ranger ranger
@@ -96,7 +85,6 @@
"electron-25.9.0" # required by obsidian "electron-25.9.0" # required by obsidian
]; ];
services.avahi.enable = true; services.avahi.enable = true;
services.udev.packages = [pkgs.openhantek6022];
virtualisation.docker.enable = true; virtualisation.docker.enable = true;
# This value determines the NixOS release from which the default # This value determines the NixOS release from which the default

View File

@@ -0,0 +1,31 @@
{
inputs,
self,
...
}: {
flake.nixosConfigurations.comfy-station = inputs.nixpkgs.lib.nixosSystem {
modules = [
({...}: {
nixpkgs.config.allowUnfree = true;
})
./configuration.nix
inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t14-amd-gen1
inputs.sops-nix.nixosModules.sops
self.nixosModules.nix-scripts
self.nixosModules.hyprland
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.unstable-overlay
self.nixosModules.bulk-transcode-overlay
];
};
}

View File

@@ -1,12 +1,5 @@
{ {...}: let
config, home-rebuild = pkgs:
lib,
pkgs,
isHM,
...
}: let
cfg = config.hive.nix-scripts;
home-rebuild =
pkgs.writeShellScriptBin ".home-rebuild" pkgs.writeShellScriptBin ".home-rebuild"
'' ''
set -e set -e
@@ -20,7 +13,7 @@
${pkgs.git}/bin/git commit --no-gpg-sign -am "Home $gen by $by" ${pkgs.git}/bin/git commit --no-gpg-sign -am "Home $gen by $by"
popd popd
''; '';
rebuild = rebuild = pkgs:
pkgs.writeShellScriptBin ".nixos-rebuild" pkgs.writeShellScriptBin ".nixos-rebuild"
'' ''
set -e set -e
@@ -34,7 +27,7 @@
${pkgs.git}/bin/git commit --no-gpg-sign -am "System $gen by $by" ${pkgs.git}/bin/git commit --no-gpg-sign -am "System $gen by $by"
popd popd
''; '';
upgrade = upgrade = pkgs:
pkgs.writeShellScriptBin ".nixos-upgrade" pkgs.writeShellScriptBin ".nixos-upgrade"
'' ''
set -e set -e
@@ -63,7 +56,7 @@
${pkgs.git}/bin/git branch -D "$branch_staging" ${pkgs.git}/bin/git branch -D "$branch_staging"
popd popd
''; '';
update = update = pkgs:
pkgs.writeShellScriptBin ".nixos-update" pkgs.writeShellScriptBin ".nixos-update"
'' ''
set -e set -e
@@ -94,25 +87,16 @@
popd popd
''; '';
in { in {
options = { flake.nixosModules.nix-scripts = {pkgs, ...}: {
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 = [ environment.systemPackages = [
rebuild (rebuild pkgs)
upgrade (upgrade pkgs)
update (update pkgs)
]; ];
} };
); flake.homeModules.nix-scripts = {pkgs, ...}: {
home.packages = [
(home-rebuild pkgs)
];
};
} }

View File

@@ -1,35 +0,0 @@
{
config,
lib,
pkgs,
...
}: let
cfg = config.hive.kwallet;
in {
options.hive.kwallet = {
enable = lib.mkEnableOption "Enable kwallet";
forUsers = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [];
description = ''
List of users that should unlock kwallet via pam.
'';
};
};
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs.kdePackages; [
kwallet
kwalletmanager
];
security.pam.services = builtins.listToAttrs (map (user: {
name = user;
value = {
kwallet.enable = true;
kwallet.forceRun = true;
kwallet.package = pkgs.kdePackages.kwallet-pam;
};
})
cfg.forUsers);
};
}

View File

@@ -0,0 +1,432 @@
{
flake.nixosModules.hyprland = {
config,
lib,
pkgs,
...
}: let
cfg = config.hive.displayManager;
in {
options.hive.displayManager = with lib; {
autologin = mkOption {
type = types.nullOr types.str;
default = null;
description = "The autologin username or null for no autologin.";
};
};
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;
services.libinput.enable = true;
services.dbus.enable = true;
services.displayManager.sddm = {
enable = true;
wayland.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 = {};
};
};
flake.homeModules.hyprland = {pkgs, ...}: let
screenshot = pkgs.writeShellScriptBin "screenshot" ''
region=0
clip=0
while [[ "$#" -gt 0 ]]; do
case $1 in
--region) region=1; ;;
--clip) clip=1; ;;
*) echo "Unknown parameter passed: $1"; exit 1 ;;
esac
shift
done
if [[ $region -eq 1 ]]; then
if [[ $clip -eq 1 ]]; then
${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp)" - | ${pkgs.wl-clipboard}/bin/wl-copy
else
${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp)" ~/Pictures/Screenshots/$(${pkgs.coreutils}/bin/date +'%Y-%m-%d_%H-%M-%S').png
fi
else
if [[ $clip -eq 1 ]]; then
${pkgs.grim}/bin/grim - | ${pkgs.wl-clipboard}/bin/wl-copy
else
${pkgs.grim}/bin/grim ~/Pictures/Screenshots/$(${pkgs.coreutils}/bin/date +'%Y-%m-%d_%H-%M-%S').png
fi
fi
'';
in {
wayland.windowManager.hyprland = {
enable = true;
systemd.enable = false;
systemd.variables = ["--all"];
xwayland.enable = true;
};
home.packages = with pkgs; [
wl-clipboard
];
services.wpaperd = {
enable = true;
settings = {
default = {
path = ../../static/wallpaper/stones.jpg;
};
};
};
services.hypridle.enable = true;
services.hypridle.settings = {
general = {
# lock_cmd = notify-send "lock!" # dbus/sysd lock command (loginctl lock-session)
# unlock_cmd = notify-send "unlock!" # same as above, but unlock
ignore_dbus_inhibit = "false"; # whether to ignore dbus-sent idle-inhibit requests (used by e.g. firefox or steam)
lock_cmd = "pidof hyprlock || hyprlock"; # avoid starting multiple hyprlock instances.
before_sleep_cmd = "loginctl lock-session"; # lock before suspend.
after_sleep_cmd = "hyprctl dispatch dpms on"; # to avoid having to press a key twice to turn on the display.
};
listener = [
# Screenlock
{
timeout = 180; # in seconds
on-timeout = "hyprlock"; # command to run when timeout has passed
# on-resume = notify-send "Welcome back to your desktop!" # command to run when activity is detected after timeout has fired.
}
# Suspend
{
timeout = 360; # in seconds
on-timeout = "systemctl suspend"; # command to run when timeout has passed
# on-resume = notify-send "Welcome back to your desktop!" # command to run when activity is detected after timeout has fired.
}
];
};
programs.hyprlock = {
enable = true;
settings = {
background = [
{
path = "screenshot"; # only png supported for now
# color = $color1
# all these options are taken from hyprland, see https://wiki.hyprland.org/Configuring/Variables/#blur for explanations
blur_size = 4;
blur_passes = 3; # 0 disables blurring
noise = 0.0117;
contrast = 1.3000; # Vibrant!!!
brightness = 0.8000;
vibrancy = 0.2100;
vibrancy_darkness = 0.0;
}
];
# Hours
label = [
{
text = ''cmd[update:1000] echo "<b><big> $(date +"%H") </big></b>"'';
#color = $color6
font_size = 112;
# font_family = Geist Mono 10
shadow_passes = 3;
shadow_size = 4;
position = "0, 220";
halign = "center";
valign = "center";
}
{
text = ''cmd[update:1000] echo "<b><big> $(date +"%M") </big></b>"'';
# color = $color6
font_size = 112;
# font_family = Geist Mono 10
shadow_passes = 3;
shadow_size = 4;
position = "0, 80";
halign = "center";
valign = "center";
}
{
text = ''cmd[update:18000000] echo "<b><big> "$(date +'%A')" </big></b>"'';
# color = $color7
font_size = 22;
# font_family = JetBrainsMono Nerd Font 10
position = "0, -10";
halign = "center";
valign = "center";
}
{
text = ''cmd[update:18000000] echo "<b> "$(${pkgs.coreutils-full}/bin/date +'%d %b')" </b>"'';
# color = $color7
font_size = 18;
#font_family = JetBrainsMono Nerd Font 10
position = "0, -40";
halign = "center";
valign = "center";
}
{
text = ''cmd[update:18000000] echo "<b>So ca. <big> $(${pkgs.curl}/bin/curl -s 'wttr.in?format=%t' | ${pkgs.coreutils-full}/bin/tr -d '+')</big> oder watt.</b>"'';
#color = $color7
font_size = 18;
# font_family = Geist Mono 10
position = "0, 40";
halign = "center";
valign = "bottom";
}
];
input-field = [
{
size = "250, 50";
outline_thickness = 3;
dots_size = 0.26; # Scale of input-field height, 0.2 - 0.8
dots_spacing = 0.64; # Scale of dots' absolute size, 0.0 - 1.0
dots_center = true;
dots_rouding = -1;
rounding = 22;
# outer_color = $color0
# inner_color = $color0
# font_color = $color6
fade_on_empty = true;
placeholder_text = ''<i>Password...</i>''; # Text rendered in the input box when it's empty.
position = "0, 120";
halign = "center";
valign = "bottom";
}
];
};
};
wayland.windowManager.hyprland = {
settings = {
exec-once = [
"${pkgs.wpaperd}/bin/wpaperd &"
];
"$mod" = "SUPER";
bind =
[
"$mod, RETURN, exec, ${pkgs.kitty}/bin/kitty"
"$mod, d, exec, ${pkgs.wofi}/bin/wofi --show drun"
"$mod, h, movefocus, l"
"$mod, j, movefocus, d"
"$mod, k, movefocus, u"
"$mod, l, movefocus, r"
"$mod, LEFT, movefocus, l"
"$mod, DOWN, movefocus, d"
"$mod, UP, movefocus, u"
"$mod, RIGHT, movefocus, r"
"$mod SHIFT, h, movewindow, l"
"$mod SHIFT, j, movewindow, d"
"$mod SHIFT, k, movewindow, u"
"$mod SHIFT, l, movewindow, r"
"$mod SHIFT, LEFT, movewindow, l"
"$mod SHIFT, DOWN, movewindow, d"
"$mod SHIFT, UP, movewindow, u"
"$mod CTRL SHIFT, LEFT, moveactive, -10 0"
"$mod CTRL SHIFT, DOWN, moveactive, 0 10"
"$mod CTRL SHIFT, UP, moveactive, 0 -10"
"$mod CTRL SHIFT, RIGHT, moveactive, 10 0"
"$mod CTRL SHIFT, h, moveactive, -10 0"
"$mod CTRL SHIFT, j, moveactive, 0 10"
"$mod CTRL SHIFT, k, moveactive, 0 -10"
"$mod CTRL SHIFT, l, moveactive, 10 0"
"$mod SHIFT, q, killactive"
"$mod CTRL, h, resizeactive, -5% 0%"
"$mod CTRL, l, resizeactive, 5% 0%"
"$mod CTRL, j, resizeactive, 0% -5%"
"$mod CTRL, k, resizeactive, 0% 5%"
"$mod, SPACE, togglefloating, active"
"$mod SHIFT, SPACE, centerwindow"
"$mod, f, fullscreen, 1"
"$mod SHIFT, f, fullscreen, 0"
"$mod CTRL, f, fullscreenstate, -1 2"
"$mod SHIFT, s, pin"
"$mod SHIFT, x, exec, ${pkgs.hyprland}/bin/hyprctl kill"
", XF86AudioRaiseVolume, exec, ${pkgs.pulsemixer}/bin/pulsemixer --change-volume +5"
", XF86AudioLowerVolume, exec, ${pkgs.pulsemixer}/bin/pulsemixer --change-volume -5"
", XF86AudioMute, exec, ${pkgs.pulsemixer}/bin/pulsemixer --toggle-mute"
", XF86AudioMicMute, exec, ${pkgs.pulsemixer}/bin/pulsemixer --toggle-mute --id 1"
", XF86MonBrightnessUp, exec, ${pkgs.brightnessctl}/bin/brightnessctl set +5%"
", XF86MonBrightnessDown, exec, ${pkgs.brightnessctl}/bin/brightnessctl set 5%-"
"$mod, 9, exec, ${pkgs.hyprlock}/bin/hyprlock"
"$mod, 0, exec, ${pkgs.wlogout}/bin/wlogout -b 5"
"$mod, n, exec, ${pkgs.swaynotificationcenter}/bin/swaync-client -t"
", Print, exec, ${screenshot}/bin/screenshot"
"CTRL, Print, exec, ${screenshot}/bin/screenshot --region"
"SHIFT, Print, exec, ${screenshot}/bin/screenshot --clip"
"CTRL SHIFT, Print, exec, ${screenshot}/bin/screenshot --region --clip"
]
++ (
# workspaces
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
builtins.concatLists (builtins.genList (
x: let
ws = builtins.toString (x + 1);
in [
"$mod, ${ws}, workspace, ${ws}"
"$mod SHIFT, ${ws}, movetoworkspace, ${ws}"
"$mod CTRL, ${ws}, movetoworkspacesilent, ${ws}"
]
)
8)
);
# See https://wiki.hyprland.org/Configuring/Monitors/
monitor = ",preferred,auto,1";
env = [
"GDK_SCALE,1"
"XCURSOR_SIZE,12"
];
xwayland = {
force_zero_scaling = true;
};
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
# Execute your favorite apps at launch
# exec-once = waybar & hyprpaper & firefox
# Source a file (multi-file configs)
# source = ~/.config/hypr/myColors.conf
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
input = {
kb_layout = "de";
kb_variant = "deadacute";
kb_model = "";
kb_options = "caps:ctrl_modifier";
kb_rules = "";
repeat_delay = 250;
repeat_rate = 30;
follow_mouse = 1;
touchpad = {
natural_scroll = "yes";
};
sensitivity = 0; # -1.0 - 1.0, 0 means no modification.
};
general = {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
gaps_in = 5;
gaps_out = 10;
border_size = 2;
"col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg";
"col.inactive_border" = "rgba(595959aa)";
layout = "dwindle";
# Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
allow_tearing = false;
};
layerrule = [
# blur for wlogout
"blur, logout_dialog"
# blur for swaync
"blur, swaync-control-center"
"blur, swaync-notification-window"
"ignorezero, swaync-control-center"
"ignorezero, swaync-notification-window"
"ignorealpha 0.5, swaync-control-center"
"ignorealpha 0.5, swaync-notification-window"
];
decoration = {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
rounding = 10;
blur = {
enabled = true;
size = 8;
passes = 1;
new_optimizations = true;
};
};
animations = {
enabled = "yes";
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
bezier = "myBezier, 0.05, 0.9, 0.1, 1.05";
animation = [
"windows, 1, 7, myBezier"
"windowsOut, 1, 7, default, popin 80%"
"border, 1, 10, default"
"borderangle, 1, 8, default"
"fade, 1, 7, default"
"workspaces, 1, 6, default"
];
};
dwindle = {
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
pseudotile = "yes"; # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
preserve_split = "yes"; # you probably want this
};
master = {
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
# new_is_master = true;
};
ecosystem = {
no_update_news = true;
};
misc = {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
force_default_wallpaper = 0; # Set to 0 to disable the anime mascot wallpapers
};
# Example per-device config
# See https://wiki.hyprland.org/Configuring/Keywords/#executing for more
# "device:epic-mouse-v1" = {
# sensitivity = -0.5;
# };
};
};
};
}

19
modules/desktop/kitty.nix Normal file
View File

@@ -0,0 +1,19 @@
{
flake.homeModules.kitty = {pkgs, ...}: {
programs.kitty = {
enable = true;
shellIntegration.enableZshIntegration = true;
font = {
package = pkgs.nerd-fonts.fira-code;
name = "FiraCode Nerd Font";
size = 12;
};
themeFile = "Molokai";
settings = {
background_opacity = "0.6";
enable_audio_bell = false;
confirm_os_window_close = 0;
};
};
};
}

View File

@@ -0,0 +1,36 @@
{
flake.nixosModules.kwallet = {
config,
lib,
pkgs,
...
}: let
cfg = config.hive.kwallet;
in {
options.hive.kwallet = {
forUsers = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [];
description = ''
List of users that should unlock kwallet via pam.
'';
};
};
config = {
environment.systemPackages = with pkgs.kdePackages; [
kwallet
kwalletmanager
];
security.pam.services = builtins.listToAttrs (map (user: {
name = user;
value = {
kwallet.enable = true;
kwallet.forceRun = true;
kwallet.package = pkgs.kdePackages.kwallet-pam;
};
})
cfg.forUsers);
};
};
}

View File

@@ -0,0 +1,9 @@
{
flake.homeModules.nextcloud-client = {pkgs, ...}: {
services.nextcloud-client = {
enable = true;
startInBackground = true;
package = pkgs.nextcloud-client;
};
};
}

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 7.3 KiB

View File

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 8.0 KiB

View File

Before

Width:  |  Height:  |  Size: 9.0 KiB

After

Width:  |  Height:  |  Size: 9.0 KiB

View File

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -0,0 +1,111 @@
{
flake.homeModules.swaync = {pkgs, ...}: {
xdg.enable = true;
xdg.configFile = {
"swaync/themes" = {
source = ./themes;
};
"swaync/icons" = {
source = ./icons;
recursive = true;
};
};
services.swaync.enable = true;
services.swaync.style = ''
@import 'themes/nova-dark/notifications.css';
@import 'themes/nova-dark/central_control.css';
'';
services.swaync.settings = {
positionX = "right";
positionY = "top";
cssPriority = "user";
control-center-width = 380;
control-center-height = 860;
control-center-margin-top = 2;
control-center-margin-bottom = 2;
control-center-margin-right = 1;
control-center-margin-left = 0;
notification-window-width = 400;
notification-icon-size = 48;
notification-body-image-height = 160;
notification-body-image-width = 200;
timeout = 4;
timeout-low = 2;
timeout-critical = 6;
fit-to-screen = false;
keyboard-shortcuts = true;
image-visibility = "when-available";
transition-time = 200;
hide-on-clear = false;
hide-on-action = false;
script-fail-notify = true;
scripts = {
example-script = {
exec = "echo 'Do something...'";
urgency = "Normal";
};
};
notification-visibility = {
example-name = {
state = "muted";
urgency = "Low";
app-name = "Spotify";
};
};
widgets = [
"label"
"buttons-grid"
"mpris"
"title"
"dnd"
"notifications"
];
widget-config = {
title = {
text = "Notifications";
clear-all-button = true;
button-text = " 󰎟 ";
};
dnd = {
text = "Do not disturb";
};
label = {
max-lines = 1;
text = " ";
};
mpris = {
image-size = 96;
image-radius = 12;
};
volume = {
label = "󰕾";
show-per-app = true;
};
buttons-grid = {
actions = [
{
label = " ";
command = "${pkgs.alsa-utils}/bin/amixer set Master toggle";
}
{
label = "";
command = "${pkgs.alsa-utils}/bin/amixer set Capture toggle";
}
{
label = " ";
command = "${pkgs.networkmanagerapplet}/bin/nm-connection-editor";
}
{
label = "󰂯";
command = "${pkgs.blueman}/bin/blueman-manager";
}
];
};
};
};
};
}

261
modules/desktop/waybar.nix Normal file
View File

@@ -0,0 +1,261 @@
{
flake.homeModules.waybar = {
config,
lib,
pkgs,
...
}: {
programs.waybar.enable = true;
programs.waybar.systemd.enable = true;
services.blueman-applet.enable = true;
services.network-manager-applet.enable = true;
services.pasystray.enable = true;
# is already fixed on latest home-manager rev
systemd.user.services = {
blueman-applet.Unit.After = lib.mkForce ["graphical-session.target"];
network-manager-applet.Unit.After = lib.mkForce ["graphical-session.target"];
pasystray.Unit.After = lib.mkForce ["graphical-session.target"];
waybar.Unit.After = lib.mkForce ["graphical-session.target"];
};
home.packages = with pkgs; [
pulsemixer
pavucontrol
networkmanagerapplet
];
programs.waybar = {
settings.mainBar = {
position = "top";
layer = "top";
height = 5;
margin-top = 0;
margin-bottom = 0;
margin-left = 0;
margin-right = 0;
modules-left = [
"custom/launcher"
"hyprland/workspaces"
];
modules-center = [
"hyprland/window"
];
modules-right = [
"clock"
"cpu"
"memory"
"disk"
"battery"
"network"
"tray"
];
clock = {
calendar = {
format = {today = "<span color='#b4befe'><b>{}</b></span>";};
};
format = " {:%H:%M}";
tooltip = "true";
tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
format-alt = " {:%d/%m}";
};
"hyprland/workspaces" = {
active-only = false;
disable-scroll = true;
format = "{icon}";
on-click = "activate";
format-icons = {
"1" = "1";
"2" = "2";
"3" = "3";
"4" = "4";
"5" = "5";
"6" = "6";
"7" = "7";
"8" = "8";
urgent = "";
default = "";
sort-by-number = true;
};
persistent-workspaces = {
"1" = [];
"2" = [];
"3" = [];
"4" = [];
"5" = [];
"6" = [];
"7" = [];
"8" = [];
};
};
memory = {
format = "󰟜 {}%";
format-alt = "󰟜 {used} GiB"; # 
interval = 2;
};
cpu = {
format = " {usage}%";
format-alt = " {avg_frequency} GHz";
interval = 2;
};
disk = {
# path = "/";
format = "󰋊 {percentage_used}%";
interval = 60;
};
network = {
format-wifi = " {signalStrength}%";
format-ethernet = "󰀂 ";
tooltip-format = "Connected to {essid} {ifname} via {gwaddr}";
format-linked = "{ifname} (No IP)";
format-disconnected = "󰖪 ";
};
tray = {
icon-size = 20;
spacing = 8;
};
pulseaudio = {
format = "{icon} {volume}%";
format-muted = "󰖁 {volume}%";
format-icons = {
default = [" "];
};
scroll-step = 5;
on-click = "pamixer -t";
};
battery = {
format = "{icon} {capacity}%";
format-icons = [" " " " " " " " " "];
format-charging = " {capacity}%";
format-full = " {capacity}%";
format-warning = " {capacity}%";
interval = 5;
states = {
warning = 20;
};
format-time = "{H}h{M}m";
tooltip = true;
tooltip-format = "{time}";
};
"custom/launcher" = {
format = "";
on-click = "${pkgs.wofi}/bin/wofi --show drun";
tooltip = "false";
};
};
style = ''
* {
border: none;
font-family: Font Awesome, Roboto, Arial, sans-serif;
font-size: 13px;
color: #ffffff;
border-radius: 15px;
}
window {
/*font-weight: bold;*/
}
window#waybar {
border-style: none;
border-width: 1px;
border-color: #33ccff;
background: rgba(0, 0, 0, 0);
}
/*-----module groups----*/
.modules-right {
background-color: rgba(0,43,51,0.85);
margin: 2px 10px 2px 0;
}
.modules-left {
margin: 2px 0 2px 5px;
background-color: rgba(0,119,179,0.6);
}
/*-----modules indv----*/
#workspaces button {
padding: 1px 5px;
background-color: transparent;
}
#workspaces button:hover {
box-shadow: inherit;
background-color: rgba(0,153,153,1);
}
#workspaces button.empty {
color: rgba(0 ,40, 40, 40);
}
#workspaces button.active {
background-color: rgba(0,43,51,0.85);
}
#window {
border-style: solid;
background-color: rgba(0,43,51,0.5);
margin: 2px 5px;
padding: 2px 5px;
border-width: 1px;
border-color: #33ccff;
}
#window.empty {
border-style: none;
background-color: transparent;
}
#custom-launcher {
background-color: rgba(0,119,179,0.6);
border-radius: 100px;
margin: 5px 5px;
}
#clock,
#battery,
#cpu,
#memory,
#temperature,
#network,
#pulseaudio,
#custom-media,
#tray,
#mode,
#custom-power,
#custom-menu,
#idle_inhibitor {
padding: 0 10px;
}
#mode {
color: #cc3436;
font-weight: bold;
}
#custom-power {
background-color: rgba(0,119,179,0.6);
border-radius: 100px;
margin: 5px 5px;
padding: 1px 1px 1px 6px;
}
/*-----Indicators----*/
#idle_inhibitor.activated {
color: #2dcc36;
}
#pulseaudio.muted {
color: #cc3436;
}
#battery.charging {
color: #2dcc36;
}
#battery.warning:not(.charging) {
color: #e6e600;
}
#battery.critical:not(.charging) {
color: #cc3436;
}
#temperature.critical {
color: #cc3436;
}
/*-----Colors----*/
/*
*rgba(0,85,102,1),#005566 --> Indigo(dye)
*rgba(0,43,51,1),#002B33 --> Dark Green
*RGBA(0,153,153,1),#009999 --> PERSIAN GREEN
*
*/
'';
};
};
}

View File

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

View File

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

View File

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

Before

Width:  |  Height:  |  Size: 9.9 KiB

After

Width:  |  Height:  |  Size: 9.9 KiB

View File

Before

Width:  |  Height:  |  Size: 9.9 KiB

After

Width:  |  Height:  |  Size: 9.9 KiB

View File

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

View File

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

View File

Before

Width:  |  Height:  |  Size: 9.8 KiB

After

Width:  |  Height:  |  Size: 9.8 KiB

View File

Before

Width:  |  Height:  |  Size: 9.8 KiB

After

Width:  |  Height:  |  Size: 9.8 KiB

View File

@@ -0,0 +1,71 @@
{
flake.homeModules.wlogout = {
programs.wlogout.enable = true;
programs.wlogout.layout = [
{
label = "shutdown";
action = "systemctl poweroff";
text = "Shutdown";
keybind = "s";
}
{
label = "reboot";
action = "systemctl reboot";
text = "Reboot";
keybind = "r";
}
{
label = "logout";
action = "loginctl kill-session $XDG_SESSION_ID";
text = "Logout";
keybind = "e";
}
{
label = "hibernate";
action = "hyprlock --immediate & (sleep 1; systemctl hibernate -i)";
text = "Hibernate";
keybind = "h";
}
{
label = "lock";
action = "hyprlock";
text = "Lock";
keybind = "l";
}
];
programs.wlogout.style = builtins.readFile ./style.css;
xdg.enable = true;
xdg.configFile = {
"wlogout/icons/hibernate.png" = {
source = ./icons/hibernate.png;
};
"wlogout/icons/lock.png" = {
source = ./icons/lock.png;
};
"wlogout/icons/logout.png" = {
source = ./icons/logout.png;
};
"wlogout/icons/power.png" = {
source = ./icons/power.png;
};
"wlogout/icons/restart.png" = {
source = ./icons/restart.png;
};
"wlogout/icons/hibernate-hover.png" = {
source = ./icons/hibernate-hover.png;
};
"wlogout/icons/lock-hover.png" = {
source = ./icons/lock-hover.png;
};
"wlogout/icons/logout-hover.png" = {
source = ./icons/logout-hover.png;
};
"wlogout/icons/power-hover.png" = {
source = ./icons/power-hover.png;
};
"wlogout/icons/restart-hover.png" = {
source = ./icons/restart-hover.png;
};
};
};
}

92
modules/desktop/wofi.nix Normal file
View File

@@ -0,0 +1,92 @@
{
flake.homeModules.wofi = {
programs.wofi.enable = true;
programs.wofi.settings = {
location = "center";
allow_images = true;
allow_markup = true;
key_expand = "Tab";
key_up = "Ctrl-k";
key_down = "Ctrl-j";
key_left = "Ctrl-h";
key_right = "Ctrl-l";
insensitive = true;
};
programs.wofi.style = ''
#window {
border-radius: 15px;
border-color: #33ccff;
border-width: 2px;
border-style: solid;
background-color: rgba(0, 0, 0, 0.6);
}
#input {
margin: 5px;
border-radius: 15px;
border-color: #33ccff;
border-width: 2px;
border-style: solid;
background: transparent;
color: white;
}
#input {
margin: 5px;
border-radius: 15px;
border-color: #33ccff;
border-width: 2px;
border-style: solid;
background: transparent;
color: white;
}
#img {
background-color: transparent;
}
#inner-box {
background-color: transparent;
}
#outer-box {
margin: 2px;
padding: 10px;
background: transparent;
}
#scroll {
margin: 5px;
}
#text {
padding: 4px;
color: white;
background: transparent;
border: none;
}
#entry {
background: transparent;
border: none;
}
#entry:selected {
border-radius: 15px;
border-color: #33ccff;
border-width: 2px;
border-style: solid;
background: transparent;
}
#expander {
border-radius: 15px;
border-color: #33ccff;
border-width: 2px;
border-style: solid;
background: transparent;
}
'';
};
}

View File

@@ -1,20 +1,5 @@
{ {
config, flake.nixosModules.bluetooth = {
lib,
...
}: let
cfg = config.hive.bluetooth;
in {
options = {
hive.bluetooth.enable = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Enable Bluetooth";
};
};
config = lib.mkIf cfg.enable {
# Enable Bluetooth
hardware.bluetooth.enable = true; hardware.bluetooth.enable = true;
}; };
} }

View File

@@ -1,4 +1,5 @@
{ {
flake.nixosModules.sound = {
config, config,
lib, lib,
pkgs, pkgs,
@@ -8,11 +9,6 @@
in { in {
options = { options = {
hive.sound = { hive.sound = {
enable = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Enable sound with pipewire.";
};
noisetorch = lib.mkOption { noisetorch = lib.mkOption {
type = lib.types.bool; type = lib.types.bool;
default = false; default = false;
@@ -25,7 +21,7 @@ in {
}; };
}; };
}; };
config = lib.mkIf cfg.enable { config = {
# Enable sound with pipewire. # Enable sound with pipewire.
services.pulseaudio.enable = false; services.pulseaudio.enable = false;
security.rtkit.enable = true; security.rtkit.enable = true;
@@ -72,4 +68,5 @@ in {
wantedBy = ["default.target"]; wantedBy = ["default.target"];
}; };
}; };
};
} }

View File

@@ -1,20 +1,5 @@
{ {
config, flake.nixosModules.yubikey = {pkgs, ...}: {
lib,
pkgs,
...
}: let
cfg = config.hive.yubikey;
in {
options = {
hive.yubikey.enable = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Enable Yubikey support.";
};
};
config = lib.mkIf cfg.enable {
services.udev.packages = with pkgs; [ services.udev.packages = with pkgs; [
yubikey-personalization yubikey-personalization
]; ];

View File

@@ -1,13 +1,13 @@
{ {
flake.nixosModules.wireguard-client = {
config, config,
lib, lib,
... ...
}: let }: let
cfg = config.hive.wg.client; cfg = config.hive.wg.client;
peers = import ./peers.nix {inherit lib;}; peers = import ./_peers.nix {inherit lib;};
in { in {
options.hive.wg.client = { options.hive.wg.client = {
enable = lib.mkEnableOption "Enable WireGuard client";
autoConnect = lib.mkOption { autoConnect = lib.mkOption {
type = lib.types.bool; type = lib.types.bool;
default = false; default = false;
@@ -24,7 +24,7 @@ in {
}; };
}; };
config = lib.mkIf cfg.enable { config = {
networking.wg-quick.interfaces.wg0 = { networking.wg-quick.interfaces.wg0 = {
address = peers.clientAddress cfg.peer; address = peers.clientAddress cfg.peer;
inherit (cfg) privateKeyFile; inherit (cfg) privateKeyFile;
@@ -32,4 +32,5 @@ in {
peers = peers.forClient cfg.peer; peers = peers.forClient cfg.peer;
}; };
}; };
};
} }

View File

@@ -1,3 +0,0 @@
{...}: {
imports = [./client.nix ./server.nix];
}

View File

@@ -1,4 +1,5 @@
{ {
flake.nixosModules.wireguard-server = {
config, config,
lib, lib,
pkgs, pkgs,
@@ -8,7 +9,6 @@
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 +20,7 @@ in {
}; };
}; };
config = lib.mkIf cfg.enable { config = {
# Firewall rule # Firewall rule
networking.firewall.allowedUDPPorts = [cfg.port]; networking.firewall.allowedUDPPorts = [cfg.port];
@@ -43,4 +43,5 @@ in {
''; '';
}; };
}; };
};
} }

View File

@@ -0,0 +1,22 @@
{
inputs,
self,
...
}: {
flake.nixosModules.unstable-overlay = {
nixpkgs.overlays = [
self.overlays.unstable
];
};
flake.homeModules.unstable-overlay = {
nixpkgs.overlays = [
self.overlays.unstable
];
};
flake.overlays.unstable = final: prev: {
unstable = import inputs.nixpkgs-unstable {
system = prev.system;
config.allowUnfree = true;
};
};
}

View File

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

View File

@@ -0,0 +1,12 @@
{self, ...}: {
flake.overlays.bulk-transcode = final: prev: {
bulk-transcode = final.callPackage ./_derivation.nix {};
};
flake.nixosModules.bulk-transcode-overlay = {
nixpkgs.overlays = [self.overlays.bulk-transcode];
};
perSystem = {pkgs, ...}: {
packages.bulk-transcode = pkgs.callPackage ./_derivation.nix {};
devShells.bulk-transcode = import ./_shell.nix {inherit pkgs;};
};
}

View File

@@ -0,0 +1,8 @@
{
flake.overlays.crossover = final: prev: {
crossover = final.callPackage ./_derivation.nix {};
};
perSystem = {pkgs, ...}: {
packages.crossover = pkgs.callPackage ./_derivation.nix {};
};
}

View File

@@ -0,0 +1,9 @@
{
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;};
};
}

View File

@@ -1,4 +1,5 @@
{ {
flake.nixosModules.creative = {
config, config,
lib, lib,
pkgs, pkgs,
@@ -16,7 +17,6 @@
}); });
in { in {
options.hive.programs.creative = { options.hive.programs.creative = {
enable = lib.mkEnableOption "Enable creative programs (video/image editing, etc.)";
image-management = lib.mkOption { image-management = lib.mkOption {
type = lib.types.bool; type = lib.types.bool;
default = true; default = true;
@@ -61,7 +61,7 @@ in {
}; };
}; };
config = lib.mkIf cfg.enable { 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]
++ lib.optional cfg.image-management digikam ++ lib.optional cfg.image-management digikam
@@ -76,7 +76,7 @@ in {
++ lib.optionals cfg.video-editing-light [ ++ lib.optionals cfg.video-editing-light [
avidemux-wayland-fix avidemux-wayland-fix
ffmpeg ffmpeg
hive.bulk-transcode bulk-transcode
losslesscut-bin losslesscut-bin
] ]
++ lib.optionals cfg.video-editing-heavy [ ++ lib.optionals cfg.video-editing-heavy [
@@ -86,4 +86,5 @@ in {
] ]
++ lib.optional cfg.daws bitwig-studio-latest; ++ lib.optional cfg.daws bitwig-studio-latest;
}; };
};
} }

View File

@@ -1,4 +1,5 @@
{ {
flake.nixosModules.games = {
config, config,
inputs, inputs,
lib, lib,
@@ -8,7 +9,6 @@
cfg = config.hive.programs.games; cfg = config.hive.programs.games;
in { in {
options.hive.programs.games = { options.hive.programs.games = {
enable = lib.mkEnableOption "Enable the games module";
steam = lib.mkOption { steam = lib.mkOption {
type = lib.types.bool; type = lib.types.bool;
default = false; default = false;
@@ -46,7 +46,7 @@ in {
}; };
}; };
config = lib.mkIf cfg.enable { config = {
environment.systemPackages = environment.systemPackages =
lib.optional cfg.lutris lib.optional cfg.lutris
(pkgs.lutris.override { (pkgs.lutris.override {
@@ -70,4 +70,5 @@ in {
gamescopeSession.enable = true; gamescopeSession.enable = true;
}; };
}; };
};
} }

View File

@@ -0,0 +1,8 @@
{
flake.nixosModules.openhantek = {pkgs, ...}: {
environment.systemPackages = [
pkgs.openhantek6022
];
services.udev.packages = [pkgs.openhantek6022];
};
}

View File

@@ -1,4 +1,5 @@
{ {...}: {
flake.nixosModules.virt-manager = {
lib, lib,
config, config,
... ...
@@ -28,4 +29,5 @@ in {
virtualisation.libvirtd.enable = true; virtualisation.libvirtd.enable = true;
virtualisation.spiceUSBRedirection.enable = true; virtualisation.spiceUSBRedirection.enable = true;
}; };
};
} }

View File

@@ -0,0 +1,18 @@
{self, ...}: {
flake.homeModules.layan-qt6-overlay = {
nixpkgs.overlays = [
self.overlays.layan-qt6
];
};
flake.nixosModules.layan-qt6-overlay = {
nixpkgs.overlays = [
self.overlays.layan-qt6
];
};
flake.overlays.layan-qt6 = final: prev: {
layan-qt6 = final.kdePackages.callPackage ./_derivation.nix {};
};
perSystem = {pkgs, ...}: {
packages.layan-qt6 = pkgs.callPackage ./_derivation.nix {};
};
}

View File

@@ -0,0 +1,48 @@
{self, ...}: {
flake.homeModules.layan = {
lib,
pkgs,
...
}: {
imports = [
self.homeModules.layan-qt6-overlay
self.homeModules.unstable-overlay
];
home.packages = [
pkgs.layan-qt6
pkgs.kdePackages.qtstyleplugin-kvantum
pkgs.unstable.layan-cursors
pkgs.layan-gtk-theme
pkgs.tela-circle-icon-theme
];
qt.enable = false;
qt.style.name = "kvantum";
qt.style.package = pkgs.kdePackages.qtstyleplugin-kvantum;
qt.platformTheme.name = "gtk";
systemd.user.settings.Manager.DefaultEnvironment = lib.mapAttrs (_: lib.mkDefault) {
QT_STYLE_OVERRIDE = "kvantum";
QT_QPA_PLATFORMTHEME = "gtk";
};
xdg.configFile."Kvantum/kvantum.kvconfig".text = lib.generators.toINI {} {
General.theme = "LayanDark";
};
# add nord like gtk theme
gtk = {
enable = true;
cursorTheme = {
package = pkgs.unstable.layan-cursors;
name = "Layan-cursors";
};
theme = {
package = pkgs.layan-gtk-theme;
name = "Layan-Dark";
};
iconTheme = {
package = pkgs.tela-circle-icon-theme;
name = "Tela-circle-dark";
};
};
};
}

View File

@@ -0,0 +1,131 @@
{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

@@ -0,0 +1,177 @@
# 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

@@ -0,0 +1,47 @@
# 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

@@ -77,6 +77,7 @@
hive.nextcloud-instance.ssl = true; hive.nextcloud-instance.ssl = true;
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.nix-scripts.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");

Some files were not shown because too many files have changed in this diff Show More