Compare commits

..

2 Commits

Author SHA1 Message Date
80937bda99 added much needed music to dev attr 2026-07-11 16:11:24 +01:00
a810344b36 made otter look a bit nicer 2026-07-11 16:09:27 +01:00
26 changed files with 321 additions and 779 deletions

View File

@@ -1,74 +0,0 @@
# The Void
*An opinionated dendritic nix configuration*
## The Concept
I have been trying to get consistent, across device experiences from the second that I
started using linux. I tried my best with arch, but I foolishly believed that just remembering
what packages I installed would be enough. Then I started managing my dotfiles with GNU stow,
but that only allowed for a single host per repo. I moved over to doot, and simultaneously nixos.
I believed a dotfiles manager was my endgame. The final evolution, but it was far from ideal. I had to
manage a mess of dotfiles, submodules and nix packages that were completely uncoupled from the apps that
used them. Hyprland just assumed that I had all of my apps installed, assumed that otter-launcher's
config existed. Just by forgetting an app or a toml file, I had the potential to brick my entire setup.
This is no longer the case.
The solution is similar to that of safely typed languages, like rust. Rust, instead of having optional parameters
like typescript, requires that a variable be passed to a function, regardless of whether it contains anything.
This leads to what is essentially a fixed dependancy tree, where there are no points of failiure, only allowing
for logic errors and such. The same methodology can be applied to nix, using flake parts and wrapper scripts.
Instead of defining the packages beside the app, and its config, you can use the config to define the required binaries.
By wrapping a config that contains a nix variable, ie a binary, that binary is intrinsically linked to that config,
and will therefore always be installed. No more dependancy issues, and because the configs are defined within nix too, no
more potential for missing config files. Dotfile managers are no more, long live dotfile managers. Any app with a `--config`
flag can now be fully versioned and self contained within one repo, config and all, accessible on any machine with nix.
One command for a truly reproducible, fully contained, configured system. This is the endgame.
## Usage
Usage is similar to any other flake, with everything in the module directory being an output.
The folder structure is simply defined:
```
modules/
|- features/ - all available apps, every subfolder contains a seperate wrapped binary
|- attrs/ - attributes composed of other modules, no new features defined
|- system/ - basic system modules, no binaries. Should not be run standalone. (Think network and audio config)
|- hosts/ - available presets for machines. Output names match subfolder names, eg #HACKSTATION, and hostnames
```
### Nixos Configurations
Due to the host module referencing `/etc/nixos/hardware-configuration.nix`, so that it is seperated from the repo,
all rebuild commands will need `--impure`, unless you copy your configuration into the repo.
HACKSTATION is the heavier system, mobile02 is minimal and has no specialist hyprland config.
It is recommended to clone the repo beforehand, but the system can be built directly from remote
```bash
# Local Clone, . is the directory containing flake.nix
sudo nixos-rebuild switch --impure --flake .
# Build from remote
sudo nixos-rebuild switch --impure --flake "git+https://git.voidarc.co.uk/voidarc/nixos.git?ref=dendritic"
```
Both of these commands can be appended with a desired hostname in order to build that configuration.
```bash
# Example of building mobile02 from a local repo
sudo nixos-rebuild switch --impure --flake .#mobile02
```
There is no default output, so if the current hostname doesn't match a host, you will get an error.
Building this config should be non destructive to any existing dotfiles, but will remove all users (not home directories)
from the system other than `user01`, who's default password is `qwer`.
### Binaries
Any binary can be run with the same base command (will change when merged to main)
```bash
nix run "git+https://git.voidarc.co.uk/voidarc/nixos.git?ref=dendritic#appname"
```
`Appname` can be substituted for the name of any folder in the `modules/features` dir, ie `kitty` or `otter-launcher`

410
flake.lock generated
View File

@@ -24,11 +24,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1784368054, "lastModified": 1782073106,
"narHash": "sha256-zF1iJkBQSDWmRO4/LEeHR1SpKY0lqZaxkoQJpPS9K9U=", "narHash": "sha256-dnS5SaZlPqR1E0dPXaPc+lFkBwLUbAgbwsVMk7uA6dY=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "aquamarine", "repo": "aquamarine",
"rev": "9b5f14d9483445e766294eb8fbe0b8f370269ed0", "rev": "6d6e2384f381def4ea4ea81543cba4bbdac72457",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -194,7 +194,7 @@
}, },
"flake-utils_2": { "flake-utils_2": {
"inputs": { "inputs": {
"systems": "systems_7" "systems": "systems_8"
}, },
"locked": { "locked": {
"lastModified": 1731533236, "lastModified": 1731533236,
@@ -210,21 +210,26 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_3": { "gitignore": {
"inputs": { "inputs": {
"systems": "systems_9" "nixpkgs": [
"hyprland",
"hyprland",
"pre-commit-hooks",
"nixpkgs"
]
}, },
"locked": { "locked": {
"lastModified": 1731533236, "lastModified": 1709087332,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "numtide", "owner": "hercules-ci",
"repo": "flake-utils", "repo": "gitignore.nix",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", "rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "numtide", "owner": "hercules-ci",
"repo": "flake-utils", "repo": "gitignore.nix",
"type": "github" "type": "github"
} }
}, },
@@ -359,18 +364,20 @@
"hyprland": { "hyprland": {
"inputs": { "inputs": {
"hyprland": "hyprland_2", "hyprland": "hyprland_2",
"nixpkgs": "nixpkgs_3", "nixpkgs": [
"nixpkgs"
],
"otter-launcher": "otter-launcher", "otter-launcher": "otter-launcher",
"woomer": "woomer", "woomer": "woomer",
"wrappers": "wrappers", "wrappers": "wrappers",
"wshowkeys": "wshowkeys" "wshowkeys": "wshowkeys"
}, },
"locked": { "locked": {
"lastModified": 1786391152, "lastModified": 1783777857,
"narHash": "sha256-P+dUN0wWRYLop9lLsnCOEi5bYE/GC5LvzV2VZh520TM=", "narHash": "sha256-5tIpGp3E+hsDvWQWtAEvvQfUv+wdi6OsS1qziLPMJhk=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "b4426becc44de00e891098b9883eca2b2028f981", "rev": "e561e6d3be18fc3d5dc35380dc6a87ebc518b471",
"revCount": 53, "revCount": 47,
"type": "git", "type": "git",
"url": "https://git.voidarc.co.uk/voidarc/hypr" "url": "https://git.voidarc.co.uk/voidarc/hypr"
}, },
@@ -419,11 +426,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1784196523, "lastModified": 1782563850,
"narHash": "sha256-ahtKMGXFJdlQNhatQm1+BBU/pGfGYnAqQt3vWvq4p8s=", "narHash": "sha256-rs/EzgrgPHbCtJjFZN4aR1HYldH/0NtGAempWVpWQTs=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprland-guiutils", "repo": "hyprland-guiutils",
"rev": "a6ccb6cb112ed5a244c0191fb972347ecfa893e0", "rev": "5ba080ee036c30cb2485f2647ff8a61f7aa08178",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -476,11 +483,11 @@
"xdph": "xdph" "xdph": "xdph"
}, },
"locked": { "locked": {
"lastModified": 1785237127, "lastModified": 1783110106,
"narHash": "sha256-sMSWRj9zZ3O4Q1Bk8mKkdXsTb3zpXRESlrzWmQXmW54=", "narHash": "sha256-PRnnFkTfQ+sQHSrcWw0512zEMNp5/1WHJeVuDf6FmxI=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "Hyprland", "repo": "Hyprland",
"rev": "ff24e1755fd308ee70367d63168a12feb05d1fc2", "rev": "14fa1fd0273973b7a40966b4fa9e081d6bf67dae",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -594,11 +601,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1784323413, "lastModified": 1783002634,
"narHash": "sha256-XnAVV+H4f8Xdv0yZcSwJ5kCjLyE8fHxPeLX6a3HSrAU=", "narHash": "sha256-xGqHIUK0wIZoW7SiMalwvO6uGOO/VrlQwoRobpE7dDI=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprutils", "repo": "hyprutils",
"rev": "5f03477ab3a005ff27c527486f551883535aea2f", "rev": "41fb809557abd29a57151b6e1aaeabd05f9437e1",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -668,11 +675,11 @@
}, },
"import-tree": { "import-tree": {
"locked": { "locked": {
"lastModified": 1784254960, "lastModified": 1778781969,
"narHash": "sha256-iI88R3wHz8wTKQb5orvpc51L/Xr64AJyxid/0MKa/b8=", "narHash": "sha256-Jjuz5CmSkur8KvLDoGa+vylEp+RkQtv4mt/qcMznpH0=",
"owner": "vic", "owner": "vic",
"repo": "import-tree", "repo": "import-tree",
"rev": "4ebb10ae17d5f1ad366e7aef5b92cb8eecf24f69", "rev": "d321337efd0f23a9eb14a42adb7b2c29313ab274",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -758,135 +765,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_10": {
"locked": {
"lastModified": 1744536153,
"narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_11": {
"locked": {
"lastModified": 1780336545,
"narHash": "sha256-vhVhuXzFrIOfcssC/9hDHx7MHzDKjF3keHuREOQqQiQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "4df1b885d76a54e1aa1a318f8d16fd6005b6401f",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_12": {
"locked": {
"lastModified": 1781577229,
"narHash": "sha256-lrp67w8AulE9Ks53n27I45ADSzbOCn4H+CNW1Ck8B+8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "567a49d1913ce81ac6e9582e3553dd90a955875f",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": { "nixpkgs_2": {
"locked": {
"lastModified": 1784356753,
"narHash": "sha256-12KrbMiWLcf8m7pCvAtZh1ZrgF85ZXDXvfR/fWTKy84=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "61b7c44c4073f0b827768aff0049561b5110ea5a",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1785090369,
"narHash": "sha256-m0pDuRJG7EDo9ri+4Ksu83VsI+PlxNC9lNBfydejce4=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "624af665418d3c65d544145b4d34ad696439570e",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1782175435,
"narHash": "sha256-EMzXKmnOtBQ2MnvpiNOm7E+kOMvdPrIKaeg52Tip2Uk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "89570f24e97e614aa34aa9ab1c927b6578a43775",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_5": {
"locked": {
"lastModified": 1773734432,
"narHash": "sha256-IF5ppUWh6gHGHYDbtVUyhwy/i7D261P7fWD1bPefOsw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "cda48547b432e8d3b18b4180ba07473762ec8558",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_6": {
"locked": {
"lastModified": 1785386831,
"narHash": "sha256-sPS3CaXH8RAT3FZRuy4VcV47iuYIWMMfa0GbyJKC3o4=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "21ea275a7c46aef9d4d6ddc962e6d562e9d94183",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-26.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_7": {
"locked": { "locked": {
"lastModified": 1782467914, "lastModified": 1782467914,
"narHash": "sha256-pGvFkM8N0xEkIIXDe5YYfbEAvHrk4IxBrjB/x8OomhE=", "narHash": "sha256-pGvFkM8N0xEkIIXDe5YYfbEAvHrk4IxBrjB/x8OomhE=",
@@ -902,7 +781,71 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_8": { "nixpkgs_3": {
"locked": {
"lastModified": 1782175435,
"narHash": "sha256-EMzXKmnOtBQ2MnvpiNOm7E+kOMvdPrIKaeg52Tip2Uk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "89570f24e97e614aa34aa9ab1c927b6578a43775",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1773734432,
"narHash": "sha256-IF5ppUWh6gHGHYDbtVUyhwy/i7D261P7fWD1bPefOsw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "cda48547b432e8d3b18b4180ba07473762ec8558",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_5": {
"locked": {
"lastModified": 1783549019,
"narHash": "sha256-0XnckG4ZhBmAsYa9mLuEIFowBG0fDGPLHduQGsbMS4A=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "74cc63f702f7d60a557e152a57b40fb1fd0f72ac",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-26.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_6": {
"locked": {
"lastModified": 1782467914,
"narHash": "sha256-pGvFkM8N0xEkIIXDe5YYfbEAvHrk4IxBrjB/x8OomhE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e73de5be04e0eff4190a1432b946d469c794e7b4",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_7": {
"locked": { "locked": {
"lastModified": 1780336545, "lastModified": 1780336545,
"narHash": "sha256-vhVhuXzFrIOfcssC/9hDHx7MHzDKjF3keHuREOQqQiQ=", "narHash": "sha256-vhVhuXzFrIOfcssC/9hDHx7MHzDKjF3keHuREOQqQiQ=",
@@ -918,7 +861,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_9": { "nixpkgs_8": {
"locked": { "locked": {
"lastModified": 1783224372, "lastModified": 1783224372,
"narHash": "sha256-8i/87eeoqiGE4yOTjwSA3Eh/ziJRQEmd/unYU+K27sk=", "narHash": "sha256-8i/87eeoqiGE4yOTjwSA3Eh/ziJRQEmd/unYU+K27sk=",
@@ -934,17 +877,33 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_9": {
"locked": {
"lastModified": 1780336545,
"narHash": "sha256-vhVhuXzFrIOfcssC/9hDHx7MHzDKjF3keHuREOQqQiQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "4df1b885d76a54e1aa1a318f8d16fd6005b6401f",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nvim": { "nvim": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_7", "nixpkgs": "nixpkgs_6",
"wrappers": "wrappers_2" "wrappers": "wrappers_2"
}, },
"locked": { "locked": {
"lastModified": 1786377545, "lastModified": 1783352922,
"narHash": "sha256-I5/PcFU0jlDw6+32MXpMGJxxHqWBUdYCt6DzFDctybw=", "narHash": "sha256-59Kea6PaeTM6ZBEAWzdPnuLlij2emLd21JsPnobR3B0=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "dc386a5f5cf31925c513a3a39f546d5364289095", "rev": "970da906087f0691932418db8757803d64f60c28",
"revCount": 100, "revCount": 94,
"type": "git", "type": "git",
"url": "https://git.voidarc.co.uk/voidarc/nvim" "url": "https://git.voidarc.co.uk/voidarc/nvim"
}, },
@@ -985,11 +944,11 @@
"systems": "systems_3" "systems": "systems_3"
}, },
"locked": { "locked": {
"lastModified": 1783875707, "lastModified": 1783145565,
"narHash": "sha256-Ryg3PqFcGydelQpgPF0j8GMaXaGDrNTSesEy6fDw/eg=", "narHash": "sha256-czL1P2nQV3JrbV6J2b3jXnWcz+Kbz+xhaXKk3+wdnF0=",
"owner": "kuokuo123", "owner": "kuokuo123",
"repo": "otter-launcher", "repo": "otter-launcher",
"rev": "242e5da4f0acc0b4301be7b4546f5afb3e4b23d6", "rev": "2e35ce8c7ba6f5e4d98bf4c9073f5fa91143744d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1008,11 +967,11 @@
"systems": "systems_6" "systems": "systems_6"
}, },
"locked": { "locked": {
"lastModified": 1783875707, "lastModified": 1783339207,
"narHash": "sha256-Ryg3PqFcGydelQpgPF0j8GMaXaGDrNTSesEy6fDw/eg=", "narHash": "sha256-ZO2WzXNEM9XKuReixgQuP1G+5nrihYWajugBCIjjPkE=",
"owner": "kuokuo123", "owner": "kuokuo123",
"repo": "otter-launcher", "repo": "otter-launcher",
"rev": "242e5da4f0acc0b4301be7b4546f5afb3e4b23d6", "rev": "d101421377473a190701d53cbe28b8244edad728",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1024,6 +983,7 @@
"pre-commit-hooks": { "pre-commit-hooks": {
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
"gitignore": "gitignore",
"nixpkgs": [ "nixpkgs": [
"hyprland", "hyprland",
"hyprland", "hyprland",
@@ -1031,11 +991,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1784288435, "lastModified": 1781733627,
"narHash": "sha256-ReRHaLgr/uVqdD8afFSn+myXIfpHeOhP0yYe0TJqAA8=", "narHash": "sha256-U3yTuGBnmXvXoQI3qkpfEDsn9RovQPAjN7ndRco+3u0=",
"owner": "cachix", "owner": "cachix",
"repo": "git-hooks.nix", "repo": "git-hooks.nix",
"rev": "43b3c1ab9d40fb1dbb008f451988a91e375825e9", "rev": "3bbec39bc90eadfa031e6f3b77272f3f60803e39",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1047,11 +1007,11 @@
"quickshell": { "quickshell": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1786547899, "lastModified": 1783436659,
"narHash": "sha256-QxLEKq1R455FlEmaarx3cq9mk4jSBxHg3CyseLiOick=", "narHash": "sha256-rh0BJlcRM8nFet9aYIaZMxe7M6BMNJOrSgJi3cPQ+Tc=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "e33041b66c66a1b68930bfd3bb58746ffbd5f4b2", "rev": "68d4240fcbc605ee36a0e71797c04c0ac33f3e19",
"revCount": 72, "revCount": 25,
"type": "git", "type": "git",
"url": "https://git.voidarc.co.uk/voidarc/quickshell" "url": "https://git.voidarc.co.uk/voidarc/quickshell"
}, },
@@ -1067,46 +1027,27 @@
"gotify-desktop": "gotify-desktop", "gotify-desktop": "gotify-desktop",
"hyprland": "hyprland", "hyprland": "hyprland",
"import-tree": "import-tree", "import-tree": "import-tree",
"nixpkgs": "nixpkgs_6", "nixpkgs": "nixpkgs_5",
"nvim": "nvim", "nvim": "nvim",
"omnisearch": "omnisearch", "omnisearch": "omnisearch",
"otter-launcher": "otter-launcher_2", "otter-launcher": "otter-launcher_2",
"quickshell": "quickshell", "quickshell": "quickshell",
"sls-steam": "sls-steam", "sls-steam": "sls-steam",
"weylus": "weylus",
"woomer": "woomer_2", "woomer": "woomer_2",
"wrappers": "wrappers_3", "wrappers": "wrappers_3",
"wshowkeys": "wshowkeys_2" "wshowkeys": "wshowkeys_2"
} }
}, },
"rust-overlay": {
"inputs": {
"nixpkgs": "nixpkgs_10"
},
"locked": {
"lastModified": 1784438913,
"narHash": "sha256-NYF7ZM5ip0u+w1pBFDpIGEbrbgN/wpnLFAmBkWkYMXw=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "afacd6819d3765a05814ee8e3de74c77d42ac799",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"sls-steam": { "sls-steam": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_9" "nixpkgs": "nixpkgs_8"
}, },
"locked": { "locked": {
"lastModified": 1785411317, "lastModified": 1783704618,
"narHash": "sha256-r/YV6psmPZj9aSMydTmOooTBLFiwMJoCWnaKkUlXiss=", "narHash": "sha256-/zurHHGZW+E2xF4Pk6BSP4Mib3oPJDMtqrinRF2pYFI=",
"owner": "AceSLS", "owner": "AceSLS",
"repo": "SLSsteam", "repo": "SLSsteam",
"rev": "b3da36b024f565f79ee19b44bea493af3f48ea95", "rev": "37d5bb313fa186e70b38623bee3ba0f4f17f65b5",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1235,21 +1176,6 @@
"type": "github" "type": "github"
} }
}, },
"systems_9": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"utils": { "utils": {
"inputs": { "inputs": {
"systems": "systems" "systems": "systems"
@@ -1268,32 +1194,10 @@
"type": "github" "type": "github"
} }
}, },
"weylus": {
"inputs": {
"flake-utils": "flake-utils_2",
"nixpkgs": [
"nixpkgs"
],
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1784471251,
"narHash": "sha256-07//RRO1xhgR4lKyq460+iOEDHUw21rJRi59fMUhLfM=",
"owner": "voidarclabs",
"repo": "WeylusCommunityEdition",
"rev": "bcf34c2a2c9d3cbac00ca0d3e6ede5b3bbc6a18c",
"type": "github"
},
"original": {
"owner": "voidarclabs",
"repo": "WeylusCommunityEdition",
"type": "github"
}
},
"woomer": { "woomer": {
"inputs": { "inputs": {
"crane": "crane", "crane": "crane",
"nixpkgs": "nixpkgs_4", "nixpkgs": "nixpkgs_3",
"systems": "systems_4" "systems": "systems_4"
}, },
"locked": { "locked": {
@@ -1316,7 +1220,7 @@
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
"systems": "systems_8" "systems": "systems_7"
}, },
"locked": { "locked": {
"lastModified": 1782685056, "lastModified": 1782685056,
@@ -1334,14 +1238,14 @@
}, },
"wrappers": { "wrappers": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_5" "nixpkgs": "nixpkgs_4"
}, },
"locked": { "locked": {
"lastModified": 1785177581, "lastModified": 1782375095,
"narHash": "sha256-9Z4l080DSrHMxoQTZTpVsML2h6JDuB9lDwHPsLd9BrQ=", "narHash": "sha256-bRepNpAluz2i0IIk7Tmzw/4BkyOrwABvc66NEgXPEhA=",
"owner": "lassulus", "owner": "lassulus",
"repo": "wrappers", "repo": "wrappers",
"rev": "f57bc81aa9669871343341b13aa175c8927b6a74", "rev": "cd780e92c0fa66c2e721e1d91894f3db13b9f2b4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1352,7 +1256,7 @@
}, },
"wrappers_2": { "wrappers_2": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_8" "nixpkgs": "nixpkgs_7"
}, },
"locked": { "locked": {
"lastModified": 1782135443, "lastModified": 1782135443,
@@ -1370,7 +1274,7 @@
}, },
"wrappers_3": { "wrappers_3": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_11" "nixpkgs": "nixpkgs_9"
}, },
"locked": { "locked": {
"lastModified": 1782135443, "lastModified": 1782135443,
@@ -1410,8 +1314,10 @@
}, },
"wshowkeys_2": { "wshowkeys_2": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_3", "flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_12" "nixpkgs": [
"nixpkgs"
]
}, },
"locked": { "locked": {
"lastModified": 1781708685, "lastModified": 1781708685,
@@ -1461,11 +1367,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1784371182, "lastModified": 1782311043,
"narHash": "sha256-S8A1lezEalltWcCp3gAic5lssS0xTSISK6fKODefhOk=", "narHash": "sha256-07zLc2M3/ax+JsjxGTft17/Joua41LHE9/9AC/F9zeU=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland", "repo": "xdg-desktop-portal-hyprland",
"rev": "08d99f727944dd15e4740090305e31c5fb92a50a", "rev": "882ad01e195ce201b07c618bbee44a0cad8b9e5a",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -9,6 +9,7 @@
nvim.url = "git+https://git.voidarc.co.uk/voidarc/nvim"; nvim.url = "git+https://git.voidarc.co.uk/voidarc/nvim";
hyprland = { hyprland = {
url = "git+https://git.voidarc.co.uk/voidarc/hypr"; url = "git+https://git.voidarc.co.uk/voidarc/hypr";
inputs.nixpkgs.follows = "nixpkgs";
}; };
otter-launcher = { otter-launcher = {
url = "github:kuokuo123/otter-launcher"; url = "github:kuokuo123/otter-launcher";
@@ -32,9 +33,8 @@
url = "github:coffeeispower/woomer"; url = "github:coffeeispower/woomer";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
wshowkeys.url = "github:voidarclabs/wshowkeys"; wshowkeys = {
weylus = { url = "github:voidarclabs/wshowkeys";
url = "github:voidarclabs/WeylusCommunityEdition";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };

View File

@@ -7,29 +7,22 @@
flake.nixosModules.hyprland = moduleWithSystem ({ flake.nixosModules.hyprland = moduleWithSystem ({
self', self',
pkgs, pkgs,
inputs',
... ...
}: {config, ...}: let }: let
modules = with self.nixosModules; [ modules = with self.nixosModules; [
audio audio
systemTheme systemTheme
]; ];
runtimePkgs = self'.packages.hyprland.passthru.runtimePackages; runtimePkgs = self'.packages.hyprland.passthru.runtimePackages;
lib = pkgs.lib; lib = pkgs.lib;
runtimeTarget = name: pkg:
if config.security.wrappers ? ${name}
then "/run/wrappers/bin/${name}"
else lib.getExe pkg;
in { in {
imports = modules; imports = modules;
programs.hyprland = { programs.hyprland = {
enable = true; enable = true;
package = self'.packages.hyprland; package = self'.packages.hyprland;
}; };
services.displayManager.defaultSession = "hyprland";
services.xserver.enable = true; services.xserver.enable = true;
security.polkit.enable = true; security.polkit.enable = true;
@@ -41,15 +34,10 @@
system.activationScripts.hyprRuntimeEnv = lib.stringAfter ["specialfs"] '' system.activationScripts.hyprRuntimeEnv = lib.stringAfter ["specialfs"] ''
mkdir -p /run/hypr-runtime-env/bin mkdir -p /run/hypr-runtime-env/bin
${lib.concatStringsSep "\n" (lib.mapAttrsToList (name: pkg: '' ${lib.concatStringsSep "\n" (lib.mapAttrsToList (name: pkg: ''
ln -sfn ${runtimeTarget name pkg} /run/hypr-runtime-env/bin/${name} ln -sfn ${lib.getExe pkg} /run/hypr-runtime-env/bin/${name}
'') '')
runtimePkgs)} runtimePkgs)}
''; '';
system.activationScripts.hyprConfig = lib.stringAfter ["specialfs"] ''
mkdir -p /run/hypr/config
ln -sfn ${inputs'.hyprland.packages.repo-files}/* /run/hypr/config
'';
}); });
perSystem = { perSystem = {
self', self',
@@ -59,8 +47,6 @@
}: { }: {
packages = { packages = {
hyprland = inputs'.hyprland.packages.default.override { hyprland = inputs'.hyprland.packages.default.override {
flags."--config" = "/run/hypr/config/hyprland.lua";
env."MODULES_ROOT" = "/run/hypr/config/modules";
runtimePackages = runtimePackages =
inputs.hyprland.lib.defaultRuntimePkgs.${system} inputs.hyprland.lib.defaultRuntimePkgs.${system}
// { // {
@@ -69,7 +55,6 @@
gotify-desktop = self'.packages.gotify-desktop; gotify-desktop = self'.packages.gotify-desktop;
otter-launcher = self'.packages.otter-launcher; otter-launcher = self'.packages.otter-launcher;
quickshell = self'.packages.quickshell; quickshell = self'.packages.quickshell;
wshowkeys = self'.packages.wshowkeys;
waybar = self'.packages.waybar; waybar = self'.packages.waybar;
wlogout = self'.packages.wlogout; wlogout = self'.packages.wlogout;
way-edges = self'.packages.way-edges; way-edges = self'.packages.way-edges;

View File

@@ -1,71 +0,0 @@
set $mod Mod4
set $term kitty
set $menu dmenu_run
exec --no-startup-id xrandr --output HDMI-1 --mode 1920x1080 --rate 60 --pos -1920x0 --output DP-1 --mode 1920x1080 --rate 60 --pos 0x0 --output DP-2 --mode 1920x1080 --rate 60 --pos 1920x0
font pango:FiraMono Nerd Font 10
workspace 1 output DP-1
workspace 2 output HDMI-A-1
workspace 3 output DP-2
# Window functions
bindsym $mod+BackSpace kill
bindsym $mod+b fullscreen toggle
# Apps
bindsym $mod+Return exec --no-startup-id $term
bindsym $mod+d exec --no-startup-id $menu
bindsym $mod+f exec --no-startup-id firefox
bindsym $mod+s exec --no-startup-id nemo
# Focus windows
bindsym $mod+k focus up
bindsym $mod+j focus down
bindsym $mod+h focus left
bindsym $mod+l focus right
# Move windows
bindsym $mod+Shift+h move left
bindsym $mod+Shift+l move right
bindsym $mod+Shift+k move up
bindsym $mod+Shift+j move down
# Workspaces
bindsym $mod+q workspace number 1
bindsym $mod+w workspace number 2
bindsym $mod+e workspace number 3
bindsym $mod+r workspace number 4
bindsym $mod+t workspace number 5
bindsym $mod+y workspace number 6
bindsym $mod+u workspace number 7
bindsym $mod+i workspace number 8
bindsym $mod+o workspace number 9
bindsym $mod+p workspace number 10
# Move container to workspace
bindsym $mod+Shift+q move container to workspace number 1
bindsym $mod+Shift+w move container to workspace number 2
bindsym $mod+Shift+e move container to workspace number 3
bindsym $mod+Shift+r move container to workspace number 4
bindsym $mod+Shift+t move container to workspace number 5
bindsym $mod+Shift+y move container to workspace number 6
bindsym $mod+Shift+u move container to workspace number 7
bindsym $mod+Shift+i move container to workspace number 8
bindsym $mod+Shift+o move container to workspace number 9
bindsym $mod+Shift+p move container to workspace number 10
# Logout menu
bindsym $mod+Shift+a exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"
# Reload
bindsym $mod+Shift+m reload
# Drag windows with titlebar
tiling_drag modifier titlebar
# Bar
bar {
status_command i3status
}

View File

@@ -1,48 +0,0 @@
{
inputs,
moduleWithSystem,
...
}: {
flake.nixosModules.i3 = moduleWithSystem ({
pkgs,
self',
...
}: {
services.xserver = {
enable = true;
desktopManager = {
xterm.enable = false;
};
windowManager.i3 = {
enable = true;
package = self'.packages.i3;
extraPackages = with pkgs;
[
dmenu
i3status
xinit
];
};
};
});
perSystem = {pkgs, self', ...}: {
packages.i3 = inputs.wrappers.lib.wrapPackage ({...}: {
inherit pkgs;
package = pkgs.i3;
runtimePkgs = with pkgs;
[
xrandr
firefox
]
++ (with self'.packages; [
kitty
nemo
]);
flags = {
"-c" = ./config;
};
});
};
}

View File

@@ -4,7 +4,10 @@
... ...
}: { }: {
flake.nixosModules.kitty = moduleWithSystem ( flake.nixosModules.kitty = moduleWithSystem (
{self'}: { {
pkgs,
self',
}: {
environment.systemPackages = with self'.packages; [ environment.systemPackages = with self'.packages; [
kitty kitty
]; ];
@@ -29,7 +32,6 @@
settings = { settings = {
font_size = 11; font_size = 11;
scrollbar = "never"; scrollbar = "never";
pixel_scroll = false;
window_padding_width = 9; window_padding_width = 9;
background_opacity = 0.50; background_opacity = 0.50;
confirm_os_window_close = 0; confirm_os_window_close = 0;

View File

@@ -14,7 +14,7 @@ delay_startup = 0 # sometimes the otter runs too fast even before the terminal w
[interface] [interface]
# use three quotes to write longer codes # use three quotes to write longer codes
header = """ header = """
\x1b[1;38;2;203;166;247m$USER@nixos\x1b[0m \x1b[38;2;203;166;247m$USER@nixos\x1b[0m
""" """
header_cmd = '' # run a command and print stdout above the header header_cmd = '' # run a command and print stdout above the header
header_cmd_trimmed_lines = 0 # remove trailing lines from header_cmd output, in case of some programs appending excessive empty lines header_cmd_trimmed_lines = 0 # remove trailing lines from header_cmd output, in case of some programs appending excessive empty lines

View File

@@ -3,11 +3,7 @@
inputs, inputs,
... ...
}: { }: {
flake.nixosModules.quickshell = moduleWithSystem ({ flake.nixosModules.quickshell = moduleWithSystem ({self', ...}: {
self',
pkgs,
...
}: {
environment.systemPackages = with self'.packages; [ environment.systemPackages = with self'.packages; [
quickshell quickshell
]; ];

View File

@@ -1,11 +0,0 @@
{
self,
moduleWithSystem,
...
}: {
flake.nixosModules.tailscale = moduleWithSystem ({...}: {
services.tailscale = {
enable = true;
};
});
}

View File

@@ -1,9 +0,0 @@
{moduleWithSystem, ...}: {
flake.nixosModules.weylus = moduleWithSystem ({inputs', ...}: {
programs.weylus = {
enable = true;
package = inputs'.weylus.packages.default;
users = ["user01"];
};
});
}

View File

@@ -1,17 +1,32 @@
{moduleWithSystem, ...}: { {
flake.nixosModules.wshowkeys = moduleWithSystem ({ inputs,
self', moduleWithSystem,
pkgs, ...
... }: {
}: let flake.nixosModules.wshowkeys = moduleWithSystem ({inputs', ...}: {
lib = pkgs.lib;
in {
programs.wshowkeys = { programs.wshowkeys = {
enable = true; enable = true;
package = self'.packages.wshowkeys; package = inputs'.wshowkeys.packages.default;
}; };
}); });
perSystem = {inputs', ...}: { perSystem = {
packages.wshowkeys = inputs'.wshowkeys.packages.default; pkgs,
inputs',
...
}: {
packages.wshowkeys = inputs.wrappers.lib.wrapPackage ({...}: {
inherit pkgs;
package = inputs'.wshowkeys.packages.default;
flags = {
"-a" = ["right" "top"];
"-F" = "'FiraMono Nerd Font 35'";
"-s" = "'#cba6f7ff'";
"-f" = " '#cdd6f4ff'";
"-b" = "'#45475a99'";
"-m" = "70";
"-l" = "60";
"-t" = "1000";
};
});
}; };
} }

View File

@@ -34,11 +34,6 @@ template = '''
{{- end -}} {{- end -}}
''' '''
[[blocks.segments]] # Hostname
type = 'text'
style = 'plain'
template = '{{ if eq .HostName "server02" }}<green>󰒋 {{.HostName}}</> <#7f849c>|</> {{ end }}'
[[blocks.segments]] # Python venv [[blocks.segments]] # Python venv
type = 'text' type = 'text'
style = 'plain' style = 'plain'

View File

@@ -1,113 +1,92 @@
{ {
inputs, self,
moduleWithSystem, inputs,
... moduleWithSystem,
...
}: { }: {
flake.nixosModules.zsh = moduleWithSystem ({ flake.nixosModules.zsh = moduleWithSystem ({
pkgs, pkgs,
self', self',
... ...
}: { }: {
nixpkgs.overlays = [ nixpkgs.overlays = [
(final: prev: { (final: prev: {
zsh = self'.packages.zsh; zsh = self'.packages.zsh;
}) })
]; ];
programs.zsh = { programs.zsh = {
enable = true; enable = true;
enableCompletion = true; enableCompletion = true;
enableBashCompletion = true; enableBashCompletion = true;
autosuggestions.enable = true; autosuggestions.enable = true;
syntaxHighlighting.enable = true; syntaxHighlighting.enable = true;
histSize = 10000; histSize = 10000;
}; };
users.defaultUserShell = pkgs.zsh; users.defaultUserShell = pkgs.zsh;
}); });
perSystem = { perSystem = {
pkgs, pkgs,
lib, lib,
self', self',
... ...
}: { }: {
packages = { packages = {
zsh = let zsh = inputs.wrappers.wrappers.zsh.wrap {
flakeLocation = builtins.getEnv "PWD"; inherit pkgs;
in runtimePkgs = [pkgs.carapace pkgs.fzf];
lib.warnIf (flakeLocation == "") "Flake Location is undefined. Are you building in the right directory?" zshAliases = {
inputs.wrappers.wrappers.zsh.wrap { ls = "${lib.getExe pkgs.lsd} -l";
inherit pkgs; v = lib.getExe self'.packages.nvim;
runtimePkgs = [pkgs.carapace pkgs.devenv pkgs.fzf]; cat = lib.getExe pkgs.bat;
zshAliases = { lg = lib.getExe pkgs.lazygit;
ls = "${lib.getExe pkgs.lsd} -l"; devenv = lib.getExe pkgs.devenv;
v = lib.getExe self'.packages.nvim; carapace = lib.getExe pkgs.carapace;
cat = lib.getExe pkgs.bat; man = "man -P \"${lib.getExe pkgs.bat} -p\"";
lg = lib.getExe pkgs.lazygit; nsh = "nix-shell -p";
man = "man -P \"${lib.getExe pkgs.bat} -p\""; };
nsh = "nix-shell -p"; zshrc.content = ''
nrs = if (( ''${+terminfo[smkx]} )) && (( ''${+terminfo[rmkx]} )); then
if flakeLocation != "" function zle-line-init() { echoti smkx }
then "( cd ${flakeLocation} && sudo nixos-rebuild switch --impure --flake . )" function zle-line-finish() { echoti rmkx }
else "echo 'Flake location not specified. Did you build with --impure?'"; zle -N zle-line-init
vinix = zle -N zle-line-finish
if flakeLocation != "" fi
then "nvim --cmd 'cd ${flakeLocation}'" autoload -U compinit && compinit
else "echo 'Flake location not specified. Did you build with --impure?'"; export CARAPACE_BRIDGES='zsh,fish,bash,inshellisense' # optional
}; zstyle ':completion:*' format $'\e[2;37mCompleting %d\e[m'
zshrc.content = '' source <(${lib.getExe pkgs.carapace} _carapace)
source ${./devenv.zsh} zstyle ':completion:*' matcher-list 'm:{[:lower:]}={[:upper:]}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
if (( ''${+terminfo[smkx]} )) && (( ''${+terminfo[rmkx]} )); then autoload -U select-word-style
function zle-line-init() { echoti smkx } select-word-style bash
function zle-line-finish() { echoti rmkx }
zle -N zle-line-init
zle -N zle-line-finish
fi
autoload -U compinit && compinit autoload -U up-line-or-beginning-search down-line-or-beginning-search
export CARAPACE_BRIDGES='zsh,fish,bash,inshellisense' # optional zle -N up-line-or-beginning-search
zstyle ':completion:*' format $'\e[2;37mCompleting %d\e[m' zle -N down-line-or-beginning-search
source <(${lib.getExe pkgs.carapace} _carapace) bindkey "^[OA" up-line-or-beginning-search
zstyle ':completion:*' matcher-list 'm:{[:lower:]}={[:upper:]}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' bindkey "^[OB" down-line-or-beginning-search
autoload -U select-word-style bindkey "^[[1;5C" forward-word
select-word-style bash bindkey "^[[1;5D" backward-word
bindkey "^[[3;5~" kill-word
bindkey "^H" backward-kill-word
autoload -U up-line-or-beginning-search down-line-or-beginning-search source <(${lib.getExe pkgs.fzf} --zsh)
zle -N up-line-or-beginning-search
zle -N down-line-or-beginning-search
bindkey "^[OA" up-line-or-beginning-search
bindkey "^[OB" down-line-or-beginning-search
bindkey "^[[1;5C" forward-word setopt NO_CASE_GLOB
bindkey "^[[1;5D" backward-word
bindkey "^[[3;5~" kill-word
bindkey "^H" backward-kill-word
source <(${lib.getExe pkgs.fzf} --zsh) export EDITOR=nvim
setopt NO_CASE_GLOB eval "$(${lib.getExe pkgs.devenv} hook zsh)"
eval "$(${lib.getExe self'.packages.ohMyPosh} init zsh)"
${lib.getExe pkgs.any-nix-shell} zsh --info-right | source /dev/stdin ${lib.getExe pkgs.any-nix-shell} zsh --info-right | source /dev/stdin
'';
export EDITOR=nvim };
ohMyPosh = inputs.wrappers.wrappers.oh-my-posh.wrap {
eval "$(${lib.getExe self'.packages.ohMyPosh} init zsh)" inherit pkgs;
configFile = ./config.toml;
eval "$(${lib.getExe pkgs.devenv} hook zsh)" };
};
typeset -ag precmd_functions };
if (( ! ''${precmd_functions[(I)__devenv_reload_apply]} )); then
precmd_functions+=(__devenv_reload_apply)
fi
if (( ! ''${precmd_functions[(I)__devenv_restore_path]} )); then
precmd_functions+=(__devenv_restore_path)
fi
'';
};
ohMyPosh = inputs.wrappers.wrappers.oh-my-posh.wrap {
inherit pkgs;
configFile = ./config.toml;
};
};
};
} }

View File

@@ -1,82 +0,0 @@
__devenv_reload_apply() {
if [ -n "$DEVENV_RELOAD_FILE" ] && [ -f "$DEVENV_RELOAD_FILE" ]; then
local output
output=$(DEVENV_RELOAD_FILE="$DEVENV_RELOAD_FILE" bash <<'RELOAD_BASH' 2>/dev/null
__devenv_ignored_var() {
case "$1" in
_*|PWD|OLDPWD|SHLVL|SHELL|SHELLOPTS|BASHOPTS|BASH_*|HISTCMD|HISTFILE)
return 0 ;;
PS1|PS2|PS3|PS4|PROMPT|PROMPT_COMMAND|PROMPT_DIRTRIM)
return 0 ;;
COMP_*|READLINE_*|MAILCHECK|COLUMNS|LINES|RANDOM|SECONDS|LINENO|EPOCHSECONDS|EPOCHREALTIME|SRANDOM)
return 0 ;;
STARSHIP_*|__fish*|DIRENV_*|nix_saved_*)
return 0 ;;
*) return 1 ;;
esac
}
__devenv_capture_env() { declare -p -x 2>/dev/null | LC_ALL=C sort; }
__devenv_serialize_diff() { gzip -c | base64 -w0; }
__devenv_deserialize_diff() { echo "$1" | base64 -d | gzip -d 2>/dev/null; }
__devenv_compute_diff() {
local before_file="$1" after_file diff_content
after_file=$(mktemp); diff_content=$(mktemp)
__devenv_capture_env > "$after_file"
local -A before_vars after_vars
while IFS= read -r line; do
[[ "$line" != declare\ -x\ * ]] && continue
local vardef="${line#declare -x }" var="${vardef%%=*}"
[[ -z "$var" ]] && continue
__devenv_ignored_var "$var" && continue
before_vars["$var"]="$line"
done < "$before_file"
while IFS= read -r line; do
[[ "$line" != declare\ -x\ * ]] && continue
local vardef="${line#declare -x }" var="${vardef%%=*}"
[[ -z "$var" ]] && continue
__devenv_ignored_var "$var" && continue
after_vars["$var"]="$line"
done < "$after_file"
for var in "${!before_vars[@]}"; do
[[ "${after_vars[$var]}" != "${before_vars[$var]}" ]] && echo "P:${before_vars[$var]}" >> "$diff_content"
done
for var in "${!after_vars[@]}"; do
if [[ -z "${before_vars[$var]+x}" ]]; then echo "N:$var" >> "$diff_content"
elif [[ "${after_vars[$var]}" != "${before_vars[$var]}" ]]; then echo "N:$var" >> "$diff_content"; fi
done
_DEVENV_DIFF=$(__devenv_serialize_diff < "$diff_content"); export _DEVENV_DIFF
rm -f "$after_file" "$diff_content"
}
__devenv_apply_reverse_diff() {
[[ -z "$_DEVENV_DIFF" ]] && return
local -A prev_vars
local diff_content; diff_content=$(__devenv_deserialize_diff "$_DEVENV_DIFF")
while IFS= read -r line; do
if [[ "$line" == P:declare\ * ]]; then
local decl="${line#P:}" var="${decl#declare -x }"; var="${var%%=*}"
prev_vars["$var"]=1; eval "export ${decl#declare -x }" 2>/dev/null
fi
done <<< "$diff_content"
while IFS= read -r line; do
if [[ "$line" == N:* ]]; then
local var="${line#N:}"
[[ -z "${prev_vars[$var]+x}" ]] && unset "$var"
fi
done <<< "$diff_content"
}
__devenv_apply_reverse_diff
_before=$(mktemp); __devenv_capture_env > "$_before"
if { : >/dev/tty; } 2>/dev/null; then _devenv_reload_out=/dev/tty; else _devenv_reload_out=/dev/null; fi
source "$DEVENV_RELOAD_FILE" >"$_devenv_reload_out" 2>"$_devenv_reload_out"
rm -f "$DEVENV_RELOAD_FILE"; unset _devenv_reload_out
__devenv_compute_diff "$_before"; rm -f "$_before"
export -p
RELOAD_BASH
)
if [ -n "$output" ]; then eval "$output"; fi
_DEVENV_PATH="$PATH"
fi
}
__devenv_restore_path() {
[ -n "$_DEVENV_PATH" ] && export PATH="$_DEVENV_PATH"
}

View File

@@ -6,17 +6,14 @@
flake.nixosConfigurations.HACKSTATION = inputs.nixpkgs.lib.nixosSystem { flake.nixosConfigurations.HACKSTATION = inputs.nixpkgs.lib.nixosSystem {
modules = with self.nixosModules; [ modules = with self.nixosModules; [
desktop desktop
hackstationConfiguration amdDrivers
amdDrivers
youtube youtube
development development
hackstationConfiguration
bottles bottles
gaming gaming
davinci davinci
sddm-autologin sddm-autologin
nix-ld
i3
]; ];
}; };
} }

View File

@@ -1,15 +1,9 @@
{...}: { {
self,
inputs,
...
}: {
flake.nixosModules.hackstationConfiguration = {pkgs, ...}: { flake.nixosModules.hackstationConfiguration = {pkgs, ...}: {
virtualisation.docker = { networking.hostName = "HACKSTATION";
enable = true;
};
networking = {
interfaces.enp5s0.wakeOnLan.enable = true;
hostName = "HACKSTATION";
};
environment.systemPackages = with pkgs; [
tor-browser
tor
];
}; };
} }

View File

@@ -1,15 +0,0 @@
{
self,
inputs,
...
}: {
flake.nixosConfigurations.mobile02 = inputs.nixpkgs.lib.nixosSystem {
modules = with self.nixosModules; [
desktop
mobile02Configuration
intelDrivers
development
upower
];
};
}

View File

@@ -1,11 +0,0 @@
{
self,
inputs,
...
}: {
flake.nixosModules.mobile02Configuration = {...}: {
networking = {
hostName = "mobile02";
};
};
}

View File

@@ -8,16 +8,12 @@
lib, lib,
... ...
}: { }: {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
playerctl playerctl
pavucontrol pavucontrol
pulseaudioFull ];
];
services.pulseaudio.enable = false; services.pulseaudio.enable = false;
security.rtkit.enable = true; security.rtkit.enable = true;
nixpkgs.config.pulseaudio = true;
services.pipewire = { services.pipewire = {
enable = true; enable = true;
alsa.enable = true; alsa.enable = true;

View File

@@ -21,7 +21,6 @@
}; };
settings = { settings = {
cores = 6; cores = 6;
trusted-users = ["root" "user01"];
download-buffer-size = 524288000; download-buffer-size = 524288000;
experimental-features = [ experimental-features = [
"nix-command" "nix-command"

View File

@@ -3,19 +3,15 @@
moduleWithSystem, moduleWithSystem,
... ...
}: { }: {
flake.nixosModules.desktop = moduleWithSystem ({pkgs, ...}: let flake.nixosModules.desktop = moduleWithSystem ({...}: let
modules = with self.nixosModules; [ modules = with self.nixosModules; [
core core
hyprland hyprland
sddm sddm
network network
omnisearch omnisearch
tailscale
]; ];
in { in {
imports = modules; imports = modules;
environment.systemPackages = with pkgs; [
mpv
];
}); });
} }

View File

@@ -1,5 +1,13 @@
{...}: { {
flake.nixosModules.amdDrivers = {pkgs, ...}: { self,
inputs,
...
}: {
flake.nixosModules.amdDrivers = {
pkgs,
lib,
...
}: {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
mesa mesa
rocmPackages.rocm-smi rocmPackages.rocm-smi

View File

@@ -1,11 +0,0 @@
{...}: {
flake.nixosModules.upower = {pkgs, ...}: {
environment.systemPackages = with pkgs; [
upower
];
services = {
upower.enable = true;
power-profiles-daemon.enable = true;
};
};
}

View File

@@ -0,0 +1,21 @@
{
self,
inputs,
...
}: {
flake.nixosModules.networking = {
pkgs,
lib,
...
}: let
modules = with self.nixosModules; [
networking
];
in {
imports = modules;
networking = {
# Just for hackstation, replace enp5s0 with primary interface
interfaces.enp5s0.wakeOnLan.enable = true;
};
};
}

View File

@@ -1,15 +0,0 @@
{moduleWithSystem, ...}: {
flake.nixosModules.nix-ld = moduleWithSystem ({pkgs, ...}: {
programs = {
nix-ld = {
enable = true;
libraries = with pkgs; [
util-linux
stdenv.cc.cc
zlib
libusb1
];
};
};
});
}