Compare commits
14 Commits
aa20bae49c
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 507b4fcefd | |||
| f08d778a56 | |||
| aa1807e17c | |||
| 84ac992e26 | |||
| 45a0c0ccf5 | |||
| 362d9e744a | |||
| f6f505cc03 | |||
| 3b039c93ac | |||
| ce5062db24 | |||
| a8a45d3b02 | |||
| f9e2b676a5 | |||
| 29469b9c13 | |||
| 0dfc94e3d7 | |||
| a36df6e6a9 |
@@ -17,5 +17,8 @@ Some commits will require impure evaluation, although I will keep this to a mini
|
||||
Comments have been placed outside of filming to explain what parts of the code do,
|
||||
as this is a mostly "for reference" repo.
|
||||
|
||||
This repo also depends on [this hyprland config](https://git.voidarc.co.uk/adumh00man/hyprland-dendritic),
|
||||
which is self contained, but contains some more useful wrapper examples.
|
||||
|
||||
Any issues or typos or whatever can be reported via [email](mailto://admin@voidarc.co.uk)
|
||||
or [matrix](https://matrix.to/#/@admin:voidarc.co.uk). Lots of love <3
|
||||
|
||||
3
age.txt
Normal file
3
age.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
# created: 2026-11-14T16:38:56Z
|
||||
# public key: age1xxeh8ju80rcct7k349jx338ylav04a44cnmp924plxnhkjvhmfcqmas62n
|
||||
AGE-SECRET-KEY-1WTP26ZUF85T79Q9VEQTP7U5L83M7QQHWFTUPXPPLY2YP6QYF8S2QCQ6XYU
|
||||
45
flake.lock
generated
45
flake.lock
generated
@@ -18,6 +18,29 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hyprland": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"wrappers": [
|
||||
"wrappers"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1794672526,
|
||||
"narHash": "sha256-r6vKRLhiij+fNQdDY2XhmYH+KtqXDWTGEjUR28FFQ1c=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "24e78099cc14da3ee732719a6d5fdab150fa52c5",
|
||||
"revCount": 7,
|
||||
"type": "git",
|
||||
"url": "https://git.voidarc.co.uk/adumh00man/hyprland-dendritic"
|
||||
},
|
||||
"original": {
|
||||
"type": "git",
|
||||
"url": "https://git.voidarc.co.uk/adumh00man/hyprland-dendritic"
|
||||
}
|
||||
},
|
||||
"import-tree": {
|
||||
"locked": {
|
||||
"lastModified": 1788467110,
|
||||
@@ -150,13 +173,35 @@
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"hyprland": "hyprland",
|
||||
"import-tree": "import-tree",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||
"nvim": "nvim",
|
||||
"sops-nix": "sops-nix",
|
||||
"wrappers": "wrappers_2"
|
||||
}
|
||||
},
|
||||
"sops-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1794624949,
|
||||
"narHash": "sha256-3q/hxp/flW1PnV3Dx+H3p8kHGEHJ7251BqVMNsAAB9E=",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "11e5885d241743ff0193465d533b20e754bc3ce0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"wrappers": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_3"
|
||||
|
||||
14
flake.nix
14
flake.nix
@@ -15,6 +15,20 @@
|
||||
# My Nvim config
|
||||
nvim.url = "git+https://git.voidarc.co.uk/voidarc/nvim";
|
||||
|
||||
sops-nix = {
|
||||
url = "github:Mic92/sops-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# Hyprland Configuration
|
||||
hyprland = {
|
||||
url = "git+https://git.voidarc.co.uk/adumh00man/hyprland-dendritic";
|
||||
inputs = {
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
wrappers.follows = "wrappers";
|
||||
};
|
||||
};
|
||||
|
||||
# Nix Wrapper Modules
|
||||
wrappers.url = "github:nix-community/nix-wrapper-modules";
|
||||
};
|
||||
|
||||
27
modules/attrs/desktop/default.nix
Normal file
27
modules/attrs/desktop/default.nix
Normal file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
moduleWithSystem,
|
||||
self,
|
||||
...
|
||||
}: {
|
||||
# Desktop Attribute, brings together all things you would need for a desktop
|
||||
|
||||
# Segmenting like this makes it easier to have different types of machines
|
||||
# Using the same config, like having a "laptop" attribute if you need different
|
||||
# packages there, etc.
|
||||
flake.nixosModules.desktop = moduleWithSystem ({pkgs, ...}: let
|
||||
modules = with self.nixosModules; [
|
||||
core
|
||||
networking
|
||||
hyprland
|
||||
theming
|
||||
sops
|
||||
];
|
||||
in {
|
||||
imports = modules;
|
||||
|
||||
# Add lazygit to every desktop
|
||||
environment.systemPackages = with pkgs; [
|
||||
lazygit
|
||||
];
|
||||
});
|
||||
}
|
||||
28
modules/features/foot/default.nix
Normal file
28
modules/features/foot/default.nix
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
moduleWithSystem,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
flake.nixosModules.foot = moduleWithSystem ({self', ...}: {
|
||||
environment.systemPackages = with self'.packages; [
|
||||
foot
|
||||
];
|
||||
});
|
||||
# PerSystem, gives access to self' and inputs', as well as some helper functions
|
||||
perSystem = {pkgs, ...}: {
|
||||
# Simple wrapper for foot, sets background color to bright red
|
||||
packages.foot = let
|
||||
fira-mono = pkgs.nerd-fonts.fira-mono;
|
||||
font-config = pkgs.makeFontsConf {
|
||||
fontDirectories = [fira-mono];
|
||||
};
|
||||
in
|
||||
inputs.wrappers.wrappers.foot.wrap {
|
||||
inherit pkgs;
|
||||
env."FONTCONFIG_FILE" = "${font-config}";
|
||||
settings = {
|
||||
main.font = "FiraMono Nerd Font:size=18";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
24
modules/features/hyprland/default.nix
Normal file
24
modules/features/hyprland/default.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{moduleWithSystem, ...}: {
|
||||
# moduleWithSystem for Hyprland
|
||||
flake.nixosModules.hyprland = moduleWithSystem ({self', ...}: {
|
||||
# Native wrapper for hyprland instead of environment.systemPackages
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
package = self'.packages.hyprland;
|
||||
};
|
||||
});
|
||||
perSystem = {
|
||||
inputs',
|
||||
pkgs,
|
||||
self',
|
||||
...
|
||||
}: {
|
||||
# Override input pacakge (using inputs' for right version)
|
||||
packages.hyprland = inputs'.hyprland.packages.default.override {
|
||||
# Change runtimePkgs to add custom foot version
|
||||
runtimePkgs = {
|
||||
foot = self'.packages.foot;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
22
modules/features/sops/default.nix
Normal file
22
modules/features/sops/default.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{inputs, ...}: {
|
||||
flake.nixosModules.sops = {
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
imports = [inputs.sops-nix.nixosModules.default];
|
||||
|
||||
sops = {
|
||||
age.keyFile = "/home/user01/Projects/dendritic-tutorial/age.txt";
|
||||
defaultSopsFile = ./secrets.yaml;
|
||||
|
||||
secrets = {
|
||||
secret = {};
|
||||
something = {};
|
||||
};
|
||||
templates = {
|
||||
"secret-value.env".content = "${config.sops.placeholder.something}";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
17
modules/features/sops/secrets.yaml
Normal file
17
modules/features/sops/secrets.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
secret: ENC[AES256_GCM,data:2W9fC2QMVuctXc7kkX6a++ee,iv:igaTggUUKodYheKF4oxBwzfVjKJMAp/XNt+idd4xfek=,tag:Avv1hkngS7OAFAfMrbrD6A==,type:str]
|
||||
something: ENC[AES256_GCM,data:rNfYkLtWVEgvU9Xrfg==,iv:v6q7846C+fWKz0gOo2xWcb0SGkha+dJMTZ2/4+uud10=,tag:FZhiU7NuReIk4BLlnquMhA==,type:str]
|
||||
sops:
|
||||
age:
|
||||
- enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBUa0orV3o0Qm82MUo3NlNG
|
||||
YitrcGNUUWZQUkszc096VlI5SWxrTkxNdVZRCjZLelZaV1p2MzNDRjVNS3lNMnVw
|
||||
SWl5NkVHSWNrOHVaa3YySWVzZVhNcFEKLS0tIEdVU0RYY2ZDcUorK0cvT1lYTjhw
|
||||
ekE0QjBkSnVWYWE1LzN1VHphZWtWMHcKc83T1EyVzmQHtGA2Mdt4uRsYx89AbNkg
|
||||
Ng3b82VcxZQzR9HadM55MFy2BKGqpjOed+iBwesliU2JPcbkQb75dg==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
recipient: age1xxeh8ju80rcct7k349jx338ylav04a44cnmp924plxnhkjvhmfcqmas62n
|
||||
lastmodified: "2026-11-14T16:43:47Z"
|
||||
mac: ENC[AES256_GCM,data:+RcPJKJrejXkEw17qmYDFSb62Cc4QxsQdZ1j7UkMaPenoebzgQl6kQIbPAlK14rDldmRnSGm0A3YOrB8Y6S0URu+H4R2e+PdXEo4xJKnIHfWufCmJj+k++d8Sueh3030JJuDJvjKGm6/l4/CkUDXELnVQGKlaF3Rux31ORHDvtI=,iv:1gEnVSC8r10qEMUATcoukvd0GuqxIYtXlJi+yirAl5k=,tag:Q3sOasF4i9wEySR02L4U1g==,type:str]
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.13.3
|
||||
@@ -81,6 +81,7 @@
|
||||
v = lib.getExe inputs'.nvim.packages.default;
|
||||
ff = lib.getExe pkgs.fastfetch;
|
||||
cat = lib.getExe pkgs.bat;
|
||||
secret = "cat /run/secrets/secret-value";
|
||||
};
|
||||
# Can also be zshrc.path, and path will take precedence over content.
|
||||
zshrc.content = ''
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
# Define modules to import
|
||||
modules = with self.nixosModules; [
|
||||
hostConfiguration
|
||||
system
|
||||
desktop
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
# Define modules to import
|
||||
modules = with self.nixosModules; [
|
||||
newHostConfiguration
|
||||
system
|
||||
desktop
|
||||
zsh
|
||||
|
||||
# Change config options in this object
|
||||
25
modules/system/core/default.nix
Normal file
25
modules/system/core/default.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{self, ...}: {
|
||||
# This module acts as a collection of other modules, for ease
|
||||
# of use. Adding another module to this list will import it
|
||||
# for all other modules that import this one.
|
||||
|
||||
# Keep in mind that you cannot import this module alongside
|
||||
# any of its children. For example, importing this module and
|
||||
# the user module in the same block is the same as importing
|
||||
# the user module twice, leading to an error due to trying
|
||||
# to define the same user twice.
|
||||
|
||||
# Collections should be used for static lists of modules, like
|
||||
# those that would make up a basic system, as seen here.
|
||||
|
||||
# Define flake part nixosModule "core"
|
||||
flake.nixosModules.core = {...}: let
|
||||
modules = with self.nixosModules; [
|
||||
user
|
||||
bootloader
|
||||
imports
|
||||
];
|
||||
in {
|
||||
imports = modules;
|
||||
};
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
{self, ...}: {
|
||||
# This module acts as a collection of other modules, for ease
|
||||
# of use. Adding another module to this list will import it
|
||||
# for all other modules that import this one.
|
||||
|
||||
# Keep in mind that you cannot import this module alongside
|
||||
# any of its children. For example, importing this module and
|
||||
# the user module in the same block is the same as importing
|
||||
# the user module twice, leading to an error due to trying
|
||||
# to define the same user twice.
|
||||
|
||||
# Collections should be used for static lists of modules, like
|
||||
# those that would make up a basic system, as seen here.
|
||||
|
||||
# Define flake part nixosModule "system"
|
||||
flake.nixosModules.system = {...}: let
|
||||
modules = with self.nixosModules; [
|
||||
user
|
||||
networking
|
||||
bootloader
|
||||
imports
|
||||
];
|
||||
in {
|
||||
imports = modules;
|
||||
};
|
||||
}
|
||||
42
modules/system/theming/default.nix
Normal file
42
modules/system/theming/default.nix
Normal file
@@ -0,0 +1,42 @@
|
||||
{moduleWithSystem, ...}: {
|
||||
flake.nixosModules.theming = moduleWithSystem ({pkgs, ...}: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
(catppuccin-gtk.override {
|
||||
accents = ["mauve"];
|
||||
size = "compact";
|
||||
tweaks = ["rimless"];
|
||||
variant = "mocha";
|
||||
})
|
||||
(catppuccin-papirus-folders.override {
|
||||
accent = "mauve";
|
||||
})
|
||||
bibata-cursors
|
||||
nwg-look
|
||||
];
|
||||
|
||||
environment.variables = {
|
||||
XCURSOR_THEME = "Bibata-Modern-Ice";
|
||||
XCURSOR_SIZE = "20";
|
||||
};
|
||||
|
||||
programs = {
|
||||
xfconf.enable = true;
|
||||
dconf = {
|
||||
enable = true;
|
||||
profiles.user.databases = [
|
||||
{
|
||||
lockAll = false;
|
||||
settings = {
|
||||
"org/gnome/desktop/interface" = {
|
||||
gtk-theme = "catppuccin-mocha-mauve-compact+rimless";
|
||||
icon-theme = "Papirus";
|
||||
color-scheme = "prefer-dark";
|
||||
cursor-name = "Bibata-Modern-Ice";
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user