Compare commits

...

76 Commits

Author SHA1 Message Date
Cian-H 7995a87f71 Updated dotfiles 2026-05-08 00:05:25 +01:00
Cian-H 4678cadd72 Updated dotfiles 2026-05-07 13:10:08 +01:00
Cian-H b2645b5996 Updated dotfiles 2026-05-06 10:41:10 +01:00
Cian-H 894a5c9828 Tweaked pipewire settings for high/dynamic bitrate audio 2026-05-05 21:19:29 +01:00
Cian-H 576e5cfffa Switched spotify/spicetify for tidal/sone 2026-05-05 21:16:28 +01:00
Cian-H 2d44cda4de Fixed issue with git pulls on flake.lock 2026-05-01 10:16:38 +01:00
Cian-H 647cb5c098 Added nix-helper to config 2026-05-01 10:16:38 +01:00
Cian-H 3906a51581 Fixed workday-progress noctalia plugin 2026-05-01 09:39:16 +01:00
Cian-H 69a1f4364b Dependencies update 2026-04-28 12:35:36 +01:00
Cian-H 36c0541d61 Updates 2026-04-23 01:24:38 +01:00
Cian-H 1a5c582aca Flake lock bump 2026-04-21 09:21:43 +01:00
Cian-H 58950a3a81 Removed lagging plugin from nushell plugins 2026-04-21 09:20:17 +01:00
Cian-H 4d5a66d21b Updated homeserver user to enable linger 2026-04-16 14:24:47 +01:00
Cian-H 96abb9ca7a Updated dotfiles 2026-04-12 23:46:34 +01:00
Cian-H ac37790efd Made noctalia plugin settings mutable 2026-04-10 13:49:13 +01:00
Cian-H 8bc8cfeb7c Fixed broken neovim config 2026-04-10 13:20:57 +01:00
Cian-H cf2c5a4269 Flake bump 2026-04-10 13:13:50 +01:00
Cian-H d7dfb807a6 Disabled broke nushell plugins 2026-04-10 13:13:42 +01:00
Cian-H acbe360b55 Removed static declarations of dynamic settings 2026-04-10 13:13:31 +01:00
Cian-H 0f9cdba39f Fixed noctalia plugins 2026-04-10 13:05:56 +01:00
Cian-H 85a598dd06 Typo fix 2026-04-10 10:10:02 +01:00
Cian-H 6dd23701d7 Simplified hyprland config 2026-04-10 10:03:12 +01:00
Cian-H 4b1cfdd845 submodule/flake bumps 2026-04-10 09:45:25 +01:00
Cian-H 7cd07d90f2 Added spicetify 2026-04-09 13:32:35 +01:00
Cian-H 077f266b51 Fixed missing path variables at session startup 2026-04-09 12:24:36 +01:00
Cian-H c264f0867f Flake bump 2026-04-09 10:22:25 +01:00
Cian-H e08fe8a195 Created noctalia-cli wrapper to allow portable shell management 2026-04-09 10:22:07 +01:00
Cian-H c1200dcf1e Disabled hyprpaper 2026-04-09 01:32:45 +01:00
Cian-H cc9e3c1927 Updated WM configs 2026-04-09 00:51:49 +01:00
Cian-H bc5be7c553 Moved nushell completions to carapace 2026-04-08 23:14:32 +01:00
Cian-H b4cc636160 Drop glow.yazi plugin from core profile 2026-04-08 16:22:25 +01:00
Cian-H 9332df2a8d Fixed dotfile typo 2026-04-08 15:41:50 +01:00
Cian-H cf76e1f8c2 Switched to quickshell/noctalia as unified shell env 2026-04-08 15:35:53 +01:00
Cian-H da05b15ff0 Added cachix caching to speed up updates 2026-04-08 11:36:45 +01:00
Cian-H e24b3e722e Added binsider to config 2026-04-07 15:04:13 +01:00
Cian-H cbcfd5c482 Fixed packages script arg parsing 2026-04-07 13:26:25 +01:00
Cian-H 75705ebced Fixed bugs and improved justfile UX 2026-04-07 13:18:12 +01:00
Cian-H 2ce738fc0e Improved justfile script env caching 2026-04-07 13:05:41 +01:00
Cian-H c4d74f74b8 Refactored justfile for more reliability 2026-04-07 12:53:21 +01:00
Cian-H ea35fe339b Improved justfile 2026-04-07 11:03:57 +01:00
Cian-H 3cf2747833 Flake bump 2026-04-07 11:03:29 +01:00
Cian-H 1b5084c36c Reverted zeal version to fix theming 2026-03-09 11:58:31 +00:00
Cian-H 62622d8484 Added signal apps 2026-03-05 09:47:12 +00:00
Cian-H af45dc34cf Enable zram compression 2026-03-03 13:43:53 +00:00
Cian-H 3d2516aa83 dotfiles bump 2026-03-03 13:43:42 +00:00
Cian-H 5d15ebe2d2 Attempt to fix theming 2026-02-26 18:43:17 +00:00
Cian-H e8becbb9b4 Replaced smile with walker "symbols" module 2026-02-26 12:10:45 +00:00
Cian-H 25e607b05f Flake bump 2026-02-25 13:06:40 +00:00
Cian-H 11dbca9a25 Updated ghostty config 2026-02-25 12:35:16 +00:00
Cian-H 705861861c Dotfiles pull 2026-02-25 12:21:54 +00:00
Cian-H af9e6c1f99 Flake bump 2026-02-25 11:19:05 +00:00
Cian-H 60c8c0e805 Enables ghostty systemd service 2026-02-25 11:09:29 +00:00
Cian-H 052957dda2 Updated dotfiles 2026-02-25 11:09:20 +00:00
Cian-H a99d56674a Fixed errors and warnings 2026-02-24 10:50:38 +00:00
Cian-H 0ee99ecacc Fixed nixer imports 2026-02-24 10:05:13 +00:00
Cian-H 5961834ac1 Updated conifg to use nixers repo 2026-02-24 00:20:36 +00:00
Cian-H 43890000f1 Failed attempt to fix/formalize repo 2026-02-23 18:21:29 +00:00
Cian-H c9dd770fe7 Dependency pull 2026-02-23 14:13:31 +00:00
Cian-H d25930beda Refactored rbw-autofill 2026-02-23 14:12:08 +00:00
Cian-H 2e1da650f1 Added babashka, and package for obsidian searching via walker 2026-02-23 14:11:55 +00:00
Cian-H 1bed7f9a24 Update submodules 2026-02-19 14:45:46 +00:00
Cian-H 0bdb2cd9c7 Fixed bash config on homeserver 2026-02-19 14:34:22 +00:00
Cian-H a2ccb82883 Disabled non-working goaccess container 2026-02-19 12:07:05 +00:00
Cian-H 313788b705 Update config files 2026-02-18 16:32:13 +00:00
Cian-H 10f251232f Added syntax highlighting 2026-02-18 16:26:04 +00:00
Cian-H da96083321 Added more shell configs 2026-02-18 15:45:55 +00:00
Cian-H 1e7dc1c592 Created rbw autounlock 2026-02-18 12:25:01 +00:00
Cian-H 973d334944 Added local custom packages repo 2026-02-18 12:25:01 +00:00
Cian-H 22bc6e1411 Version bumps 2026-02-18 10:34:53 +00:00
Cian-H 4a57caf66f Switched wpa_supplicant for iwd 2026-02-18 10:34:49 +00:00
Cian-H f9ff10b687 Update Dotfiles 2026-02-16 13:57:53 +00:00
Cian-H bfb58ab2d1 Flake bump 2026-02-16 13:57:53 +00:00
Cian-H 845f148529 Added nushell updates 2026-02-13 14:39:02 +00:00
Cian-H dbe307daa8 Update dotfiles 2026-02-13 13:36:10 +00:00
Cian-H a6f9f11759 Updated dotfiles 2026-02-13 13:27:54 +00:00
Cian-H 60c06f47f6 Updated dotfiles 2026-02-13 11:17:18 +00:00
31 changed files with 910 additions and 246 deletions
+1
View File
@@ -0,0 +1 @@
use flake
+1
View File
@@ -1 +1,2 @@
nix.conf
.direnv
Generated
+200 -46
View File
@@ -19,6 +19,22 @@
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1767039857,
"narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@@ -26,11 +42,11 @@
]
},
"locked": {
"lastModified": 1770260404,
"narHash": "sha256-3iVX1+7YUIt23hBx1WZsUllhbmP2EnXrV8tCRbLxHc8=",
"lastModified": 1777851538,
"narHash": "sha256-Gp8qwTEYNoy2yvmErVGlvLOQvrtEECCAKbonW7VJef8=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "0d782ee42c86b196acff08acfbf41bb7d13eed5b",
"rev": "cc09c0f9b7eaa95c2d9827338a5eb03d32505ca5",
"type": "github"
},
"original": {
@@ -43,16 +59,17 @@
"home-manager_2": {
"inputs": {
"nixpkgs": [
"nixers-repo",
"zen-browser",
"nixpkgs"
]
},
"locked": {
"lastModified": 1769872935,
"narHash": "sha256-07HMIGQ/WJeAQJooA7Kkg1SDKxhAiV6eodvOwTX6WKI=",
"lastModified": 1771756436,
"narHash": "sha256-Tl2I0YXdhSTufGqAaD1ySh8x+cvVsEI1mJyJg12lxhI=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "f4ad5068ee8e89e4a7c2e963e10dd35cd77b37b7",
"rev": "5bd3589390b431a63072868a90c0f24771ff4cbb",
"type": "github"
},
"original": {
@@ -79,6 +96,30 @@
"type": "github"
}
},
"nixers-repo": {
"inputs": {
"elephant": "elephant",
"flake-compat": "flake-compat",
"hyprcursor-phinger": "hyprcursor-phinger",
"nixpkgs": "nixpkgs_3",
"nixpkgs-unstable": "nixpkgs-unstable",
"walker": "walker",
"zen-browser": "zen-browser"
},
"locked": {
"lastModified": 1772125727,
"narHash": "sha256-J41Xm8ewrCn16r0bDtOX+qu+uhNiOp9EAvy4FJ6mhKY=",
"owner": "Cian-H",
"repo": "Nixers",
"rev": "918d6b2bf5fbe032fda2bf989e0716de4d68e057",
"type": "github"
},
"original": {
"owner": "Cian-H",
"repo": "Nixers",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1764242076,
@@ -97,11 +138,27 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1770841267,
"narHash": "sha256-9xejG0KoqsoKEGp2kVbXRlEYtFFcDTHjidiuX8hGO44=",
"lastModified": 1771369470,
"narHash": "sha256-0NBlEBKkN3lufyvFegY4TYv5mCNHbi5OmBDrzihbBMQ=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "ec7c70d12ce2fc37cb92aff673dcdca89d187bae",
"rev": "0182a361324364ae3f436a63005877674cf45efb",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-unstable_2": {
"locked": {
"lastModified": 1777954456,
"narHash": "sha256-hGdgeU2Nk87RAuZyYjyDjFL6LK7dAZN5RE9+hrDTkDU=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "549bd84d6279f9852cae6225e372cc67fb91a4c1",
"type": "github"
},
"original": {
@@ -129,11 +186,11 @@
},
"nixpkgs_3": {
"locked": {
"lastModified": 1770770419,
"narHash": "sha256-iKZMkr6Cm9JzWlRYW/VPoL0A9jVKtZYiU4zSrVeetIs=",
"lastModified": 1771714954,
"narHash": "sha256-nhZJPnBavtu40/L2aqpljrfUNb2rxmWTmSjK2c9UKds=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "6c5e707c6b5339359a9a9e215c5e66d6d802fd7a",
"rev": "afbbf774e2087c3d734266c22f96fca2e78d3620",
"type": "github"
},
"original": {
@@ -144,22 +201,6 @@
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1770380644,
"narHash": "sha256-P7dWMHRUWG5m4G+06jDyThXO7kwSk46C1kgjEWcybkE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ae67888ff7ef9dff69b3cf0cc0fbfbcd3a722abe",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_5": {
"locked": {
"lastModified": 1768564909,
"narHash": "sha256-Kell/SpJYVkHWMvnhqJz/8DqQg2b6PguxVWOuadbHCc=",
@@ -175,28 +216,102 @@
"type": "github"
}
},
"nixpkgs_5": {
"locked": {
"lastModified": 1777673416,
"narHash": "sha256-5c2POKPOjU40Kh0MirOdScBLG0bu9TAuPYAtPRNZMBs=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "26ef669cffa904b6f6832ab57b77892a37c1a671",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-25.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_6": {
"locked": {
"lastModified": 1775888245,
"narHash": "sha256-nwASzrRDD1JBEu/o8ekKYEXm/oJW6EMCzCRdrwcLe90=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "13043924aaa7375ce482ebe2494338e058282925",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"noctalia": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"noctalia-qs": "noctalia-qs"
},
"locked": {
"lastModified": 1777859147,
"narHash": "sha256-0vCgxdwrxBkHmqNgJtUMGCFwSV5a6AgYdKAgBCtFFPM=",
"owner": "noctalia-dev",
"repo": "noctalia-shell",
"rev": "6b48834dd6c3913d211476ab2f964f3fb100675e",
"type": "github"
},
"original": {
"owner": "noctalia-dev",
"repo": "noctalia-shell",
"type": "github"
}
},
"noctalia-qs": {
"inputs": {
"nixpkgs": [
"noctalia",
"nixpkgs"
],
"systems": "systems_3",
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1777773024,
"narHash": "sha256-pLU+KB84A0Jei/vTD6pOS4Ovkmq3QDfPQHg1MlKsRqM=",
"owner": "noctalia-dev",
"repo": "noctalia-qs",
"rev": "d3e26ccd9eecde9139be00caf5dc2d4260fb31ee",
"type": "github"
},
"original": {
"owner": "noctalia-dev",
"repo": "noctalia-qs",
"type": "github"
}
},
"root": {
"inputs": {
"elephant": "elephant",
"home-manager": "home-manager",
"hyprcursor-phinger": "hyprcursor-phinger",
"nixpkgs": "nixpkgs_3",
"nixpkgs-unstable": "nixpkgs-unstable",
"sops-nix": "sops-nix",
"walker": "walker",
"zen-browser": "zen-browser"
"nixers-repo": "nixers-repo",
"nixpkgs": "nixpkgs_5",
"nixpkgs-unstable": "nixpkgs-unstable_2",
"noctalia": "noctalia",
"sops-nix": "sops-nix"
}
},
"sops-nix": {
"inputs": {
"nixpkgs": "nixpkgs_4"
"nixpkgs": "nixpkgs_6"
},
"locked": {
"lastModified": 1770683991,
"narHash": "sha256-xVfPvXDf9QN3Eh9dV+Lw6IkWG42KSuQ1u2260HKvpnc=",
"lastModified": 1777944972,
"narHash": "sha256-VfGRo1qTBKOe3s2gOv8LSoA6Fk19PvBlwQ1ECN0Evn8=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "8b89f44c2cc4581e402111d928869fe7ba9f7033",
"rev": "c591bf665727040c6cc5cb409079acb22dcce33c",
"type": "github"
},
"original": {
@@ -235,20 +350,58 @@
"type": "github"
}
},
"systems_3": {
"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"
}
},
"treefmt-nix": {
"inputs": {
"nixpkgs": [
"noctalia",
"noctalia-qs",
"nixpkgs"
]
},
"locked": {
"lastModified": 1775636079,
"narHash": "sha256-pc20NRoMdiar8oPQceQT47UUZMBTiMdUuWrYu2obUP0=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "790751ff7fd3801feeaf96d7dc416a8d581265ba",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
},
"walker": {
"inputs": {
"elephant": [
"nixers-repo",
"elephant"
],
"nixpkgs": "nixpkgs_5",
"nixpkgs": "nixpkgs_4",
"systems": "systems_2"
},
"locked": {
"lastModified": 1769093508,
"narHash": "sha256-ccwJ1ADGNFd5LDF2JWdfP7+f1Hs2EvJ+2o6sUOdYi7w=",
"lastModified": 1771062828,
"narHash": "sha256-y1jBFFO0u+V21y3YldHZozrDwVJVrdC+o3c4M8/rasU=",
"owner": "abenz1267",
"repo": "walker",
"rev": "e427025bdda667712b08dd56f1a0a23667f1364c",
"rev": "19b1104585305e0806b842af341630f72038a4b9",
"type": "github"
},
"original": {
@@ -261,15 +414,16 @@
"inputs": {
"home-manager": "home-manager_2",
"nixpkgs": [
"nixers-repo",
"nixpkgs-unstable"
]
},
"locked": {
"lastModified": 1770975915,
"narHash": "sha256-WwzL82Cnt2RJYG82o4chf0sdx68uCTZVZ5aNQipz7/Y=",
"lastModified": 1771876204,
"narHash": "sha256-nTX+Qa3W+xsFxBl+lr4RsWvC4vgZocLt/qDeIvnf4+w=",
"owner": "0xc000022070",
"repo": "zen-browser-flake",
"rev": "17a9aeb5a85802567eddb4f9141cb13d72beba08",
"rev": "2f951adfab1f5a090fe5ea4c5eaf11efca7f1039",
"type": "github"
},
"original": {
+79 -46
View File
@@ -1,28 +1,28 @@
{
description = "Cian-H's nix config";
# Add cachix binary cache to prevent massive compilation times
nixConfig = {
extra-substituters = ["https://noctalia.cachix.org"];
extra-trusted-public-keys = ["noctalia.cachix.org-1:pCOR47nnMEo5thcxNDtzWpOxNFQsBRglJzxWPp3dkU4="];
};
inputs = {
# Nixpkgs
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
# Nixpkgs-unstable
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
# Nixers
nixers-repo.url = "github:Cian-H/Nixers";
# Home manager
home-manager.url = "github:nix-community/home-manager/release-25.11";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
# Add sops for secret management
sops-nix.url = "github:Mic92/sops-nix";
# Add phinger hyprcursor flake
hyprcursor-phinger.url = "github:jappie3/hyprcursor-phinger";
# Add walker as an option for a launcher
elephant.url = "github:abenz1267/elephant";
walker = {
url = "github:abenz1267/walker";
inputs.elephant.follows = "elephant";
};
# Add zen browser flake
zen-browser = {
url = "github:0xc000022070/zen-browser-flake";
inputs.nixpkgs.follows = "nixpkgs-unstable";
# Add Noctalia input
noctalia = {
url = "github:noctalia-dev/noctalia-shell";
inputs.nixpkgs.follows = "nixpkgs";
};
};
@@ -30,15 +30,24 @@
self,
nixpkgs,
nixpkgs-unstable,
nixers-repo,
home-manager,
...
} @ inputs: let
inherit (self) outputs;
worklaptopTheme = pkgs: {
theme = {
worklaptopTheme = {
pkgs,
unstablePkgs,
nixers,
}: {
gtkTheme = {
name = "Tokyonight-Dark";
package = pkgs.tokyonight-gtk-theme;
};
qtTheme = {
name = "Kvantum-Tokyo-Night";
package = nixers.tokyonight-kvantum-theme;
};
iconTheme = {
name = "Papirus-Dark";
package = pkgs.papirus-icon-theme;
@@ -58,6 +67,17 @@
avatar = "/var/lib/AccountsService/icons/cianh";
};
in {
# A temporary devshell for running system management functions
devShells."x86_64-linux".default = let
pkgs = import nixpkgs {system = "x86_64-linux";};
in
pkgs.mkShell {
packages = [
pkgs.babashka
(pkgs.python3.withPackages (ps: with ps; [typer rich]))
];
};
# NixOS configuration entrypoint
# Available through 'nixos-rebuild --flake .#your-hostname'
nixosConfigurations = {
@@ -72,10 +92,12 @@
};
in
nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs outputs;
specialArgs = let
unstablePkgs = inputs.nixpkgs-unstable.legacyPackages.x86_64-linux;
theme = worklaptopTheme pkgs;
nixers = inputs.nixers-repo.packages.x86_64-linux;
in {
inherit inputs outputs unstablePkgs nixers;
theme = worklaptopTheme {inherit pkgs unstablePkgs nixers;};
};
modules = [
./nixos/worklaptop.nix
@@ -85,6 +107,7 @@
specialArgs = {
inherit inputs outputs;
unstablePkgs = inputs.nixpkgs-unstable.legacyPackages.x86_64-linux;
nixers = inputs.nixers-repo.packages.x86_64-linux;
};
modules = [
./nixos/homeserver.nix
@@ -95,7 +118,7 @@
# Standalone home-manager configuration entrypoint
# Available through 'home-manager --flake .#your-username@your-hostname'
homeConfigurations = {
"cianh@core" = home-manager.lib.homeManagerConfiguration {
"cianh@core" = let
pkgs = import nixpkgs {
# Home-manager requires 'pkgs' instance
system = "x86_64-linux";
@@ -105,21 +128,25 @@
allowUnfreePredicate = _: true;
};
};
extraSpecialArgs = {
inherit inputs outputs;
unstablePkgs = import nixpkgs-unstable {
# We also need to do the same for unstable
system = "x86_64-linux";
config = {
allowUnfree = true;
allowUnfreePredicate = _: true;
in
home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {
inherit inputs outputs;
unstablePkgs = import nixpkgs-unstable {
# We also need to do the same for unstable
system = pkgs.stdenv.hostPlatform.system;
config = {
allowUnfree = true;
allowUnfreePredicate = _: true;
};
};
nixers = inputs.nixers-repo.packages.${pkgs.stdenv.hostPlatform.system};
};
modules = [
./home-manager/core.nix
];
};
modules = [
./home-manager/core.nix
];
};
"cianh@worklaptop" = let
pkgs = import nixpkgs {
system = "x86_64-linux";
@@ -133,8 +160,7 @@
home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {
inherit inputs outputs;
extraSpecialArgs = let
unstablePkgs = import nixpkgs-unstable {
system = "x86_64-linux";
cudaSupport = true;
@@ -143,14 +169,17 @@
allowUnfreePredicate = _: true;
};
};
theme = worklaptopTheme pkgs;
nixers = inputs.nixers-repo.packages.${pkgs.stdenv.hostPlatform.system};
in {
inherit inputs outputs unstablePkgs nixers;
theme = worklaptopTheme {inherit pkgs unstablePkgs nixers;};
};
modules = [
./home-manager/worklaptop.nix
];
};
"cianh@homeserver" = home-manager.lib.homeManagerConfiguration {
"cianh@homeserver" = let
pkgs = import nixpkgs {
# Home-manager requires 'pkgs' instance
system = "x86_64-linux";
@@ -160,21 +189,25 @@
allowUnfreePredicate = _: true;
};
};
extraSpecialArgs = {
inherit inputs outputs;
unstablePkgs = import nixpkgs-unstable {
# We also need to do the same for unstable
system = "x86_64-linux";
config = {
allowUnfree = true;
allowUnfreePredicate = _: true;
in
home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {
inherit inputs outputs;
unstablePkgs = import nixpkgs-unstable {
# We also need to do the same for unstable
system = "x86_64-linux";
config = {
allowUnfree = true;
allowUnfreePredicate = _: true;
};
};
nixers = inputs.nixers-repo.packages.${pkgs.stdenv.hostPlatform.system};
};
modules = [
./home-manager/homeserver.nix
];
};
modules = [
./home-manager/homeserver.nix
];
};
};
};
}
+1 -1
View File
@@ -13,7 +13,7 @@
./core/packages.nix
./core/programs.nix
./core/services.nix
inputs.hyprcursor-phinger.homeManagerModules.hyprcursor-phinger
inputs.nixers-repo.homeManagerModules.hyprcursor-phinger
];
nix = {
+111 -51
View File
@@ -6,69 +6,130 @@
pkgs,
unstablePkgs,
...
}: {
home.file = {
".bashrc" = lib.mkIf (!config.programs.bash.enable) {
source = ./dotfiles/dot_bashrc;
};
"nushell" = {
source = ./dotfiles/dot_config/nushell;
target = ".config/nushell/my_config";
recursive = true;
};
"nvim" = {
source = lib.cleanSourceWith {
src = ./dotfiles/dot_config/nvim;
filter = name: type: let
baseName = baseNameOf name;
in
! (
(lib.hasPrefix "*/nvim/*" name)
|| (lib.hasPrefix "." baseName)
|| (lib.hasPrefix "devenv" baseName)
|| (lib.hasSuffix ".toml" baseName)
|| (lib.hasSuffix ".yml" baseName)
);
};
target = ".config/nvim";
recursive = true;
};
"pypoetry" = {
source = ./dotfiles/dot_config/pypoetry;
target = ".config/pypoetry";
recursive = true;
};
"Thunar" = {
source = ./dotfiles/dot_config/Thunar;
target = ".config/Thunar";
};
"rye" = {
source = ./dotfiles/dot_config/.rye;
target = ".config/.rye";
}: let
noctaliaPlugins = [
"keybind-cheatsheet"
"privacy-indicator"
"screen-toolkit"
];
makeNoctaliaEntries = plugin: let
pluginSource = ./dotfiles/dot_config/noctalia/plugins-repo + "/${plugin}";
in {
name = "noctalia-plugin-${plugin}";
value = {
source = pluginSource;
target = ".config/noctalia/plugins/${plugin}";
recursive = true;
};
};
noctaliaPluginFiles = builtins.listToAttrs (map makeNoctaliaEntries noctaliaPlugins);
customPluginsDir = ./dotfiles/dot_config/noctalia/plugins-custom;
customPlugins = builtins.attrNames (
lib.filterAttrs (name: type: type == "directory") (builtins.readDir customPluginsDir)
);
makeCustomEntries = plugin: {
name = "noctalia-custom-plugin-${plugin}";
value = {
source = customPluginsDir + "/${plugin}";
target = ".config/noctalia/plugins/${plugin}";
recursive = true;
};
};
customPluginFiles = builtins.listToAttrs (map makeCustomEntries customPlugins);
in {
home.file =
{
".bashrc".source = ./dotfiles/dot_bashrc;
".zshrc".source = ./dotfiles/dot_zshrc;
"nushell" = {
source = ./dotfiles/dot_config/nushell;
target = ".config/nushell/my_config";
recursive = true;
};
"fish" = {
source = ./dotfiles/dot_config/fish;
target = ".config/fish";
recursive = true;
};
"nvim" = {
source = lib.cleanSourceWith {
src = ./dotfiles/dot_config/nvim;
filter = name: type: let
baseName = baseNameOf name;
in
! (
(lib.hasPrefix "*/nvim/*" name)
|| (lib.hasPrefix "." baseName)
|| (lib.hasPrefix "devenv" baseName)
|| (lib.hasSuffix ".toml" baseName)
|| (lib.hasSuffix ".yml" baseName)
);
};
target = ".config/nvim";
recursive = true;
};
"noctalia" = {
source = lib.cleanSourceWith {
src = ./dotfiles/dot_config/noctalia;
filter = name: type: let
baseName = baseNameOf name;
in
! (
(lib.hasInfix "/plugins/" name)
|| (lib.hasInfix "/plugins-repo/" name)
|| (lib.hasInfix "/plugins-custom/" name)
# || (lib.hasInfix "/plugins-settings/" name)
);
};
target = ".config/noctalia";
recursive = true;
};
"noctalia-cli" = {
source = ./dotfiles/dot_local/bin/executable_noctalia-cli;
target = ".local/bin/noctalia-cli";
executable = true;
};
"pypoetry" = {
source = ./dotfiles/dot_config/pypoetry;
target = ".config/pypoetry";
recursive = true;
};
"Thunar" = {
source = ./dotfiles/dot_config/Thunar;
target = ".config/Thunar";
};
"rye" = {
source = ./dotfiles/dot_config/.rye;
target = ".config/.rye";
recursive = true;
};
}
// noctaliaPluginFiles
// customPluginFiles;
# Move across noctalia plugin settings as a writable overlay
home.activation.overlayNoctaliaSettings = lib.hm.dag.entryAfter ["writeBoundary"] ''
mkdir -p "$HOME/.config/noctalia/plugins"
cp -rL --no-preserve=mode "$HOME/.config/noctalia/plugins-settings/"* "$HOME/.config/noctalia/plugins/"
'';
xdg.configFile = {
"bat".source = ./dotfiles/dot_config/bat;
"path.env".source = ./dotfiles/dot_config/path.env;
"fastfetch".source = ./dotfiles/dot_config/fastfetch;
"helix".source = ./dotfiles/dot_config/helix;
"home-manager".source = ./dotfiles/dot_config/home-manager;
"hypr" = {
source = ./dotfiles/dot_config/hypr;
recursive = true;
# Here, we use OnChange, because we don't want the config to be mutable but we do want it to
# manage modifiable state at runtime
onChange = ''
rm -f ${config.xdg.configHome}/hypr/inputs.conf
cp ${config.xdg.configHome}/hypr/HomeManagerInit_inputs.conf ${config.xdg.configHome}/hypr/inputs.conf
chmod u+w ${config.xdg.configHome}/hypr/inputs.conf
'';
};
"hypr".source = ./dotfiles/dot_config/hypr;
"just".source = ./dotfiles/dot_config/just;
"kitty".source = ./dotfiles/dot_config/kitty;
"ghostty".source = ./dotfiles/dot_config/ghostty;
"micro".source = ./dotfiles/dot_config/micro;
"niri".source = ./dotfiles/dot_config/niri;
"nushell/lsp.nu".text = ''
source ~/.config/nushell/my_config/lsp.nu
'';
@@ -90,7 +151,6 @@
"hg".source = ./dotfiles/dot_config/hg;
"stylua.toml".source = ./dotfiles/dot_config/stylua.toml;
"electron-flags.conf".source = ./dotfiles/dot_config/electron-flags.conf;
"Kvantum".source = ./dotfiles/dot_config/Kvantum;
"foot".source = ./dotfiles/dot_config/foot;
};
}
+3
View File
@@ -17,5 +17,8 @@
unstablePkgs.lazygit
unstablePkgs.nixd
unstablePkgs.nushell
unstablePkgs.nh
unstablePkgs.nix-output-monitor
unstablePkgs.nvd
];
}
+8
View File
@@ -18,10 +18,14 @@
enable = true;
package = pkgStream.nushell;
plugins = with pkgStream.nushellPlugins; [
# bson
# desktop_notifications
formats
gstat
# highlight
polars
query
# semver
];
extraConfig = ''
source ~/.config/nushell/my_config/config.nu
@@ -31,6 +35,10 @@
'';
};
git.enable = true;
carapace = {
enable = true;
enableNushellIntegration = true;
};
zoxide = {
enable = true;
enableNushellIntegration = true;
-1
View File
@@ -21,7 +21,6 @@
"yazi/plugins/chmod.yazi".source = ../dotfiles/dot_config/yazi/plugins/core/chmod.yazi;
"yazi/plugins/full-border.yazi".source = ../dotfiles/dot_config/yazi/plugins/core/full-border.yazi;
"yazi/plugins/git.yazi".source = ../dotfiles/dot_config/yazi/plugins/core/git.yazi;
"yazi/plugins/glow.yazi".source = ../dotfiles/dot_config/yazi/plugins/glow.yazi;
"yazi/plugins/hexyl.yazi".source = ../dotfiles/dot_config/yazi/plugins/hexyl.yazi;
"yazi/plugins/max-preview.yazi".source = ../dotfiles/dot_config/yazi/plugins/max-preview.yazi;
"yazi/plugins/mime-ext.yazi".source = ../dotfiles/dot_config/yazi/plugins/core/mime-ext.yazi;
+3
View File
@@ -11,5 +11,8 @@
username = "cianh";
homeDirectory = "/home/cianh";
shell.enableNushellIntegration = true;
sessionPath = [
"$HOME/.local/bin"
];
};
}
-1
View File
@@ -10,7 +10,6 @@
imports = [
./core.nix
./homeserver/packages.nix
./homeserver/programs.nix
./homeserver/containers.nix
inputs.sops-nix.homeManagerModules.sops
];
+1 -1
View File
@@ -21,7 +21,7 @@
imports = [
./containers/media.nix
./containers/metrics.nix
# ./containers/metrics.nix
./containers/caddy.nix
./containers/work_tools.nix
./containers/nextcloud.nix
-13
View File
@@ -1,13 +0,0 @@
{
inputs,
outputs,
lib,
config,
pkgs,
unstablePkgs,
...
}: {
programs = {
bash.enable = true;
};
}
+1 -1
View File
@@ -14,6 +14,6 @@
./worklaptop/programs.nix
./worklaptop/defaultapps.nix
./worklaptop/theming.nix
inputs.walker.homeManagerModules.default
inputs.nixers-repo.homeManagerModules.walker
];
}
+11 -27
View File
@@ -5,33 +5,17 @@
config,
pkgs,
unstablePkgs,
nixers,
...
}: let
# Patch vivaldi to ensure reliability on wayland
vivaldi-wayland = pkgs.symlinkJoin {
name = "vivaldi-wayland";
paths = [pkgs.vivaldi];
buildInputs = [pkgs.makeWrapper];
postBuild = ''
wrapProgram $out/bin/vivaldi \
--set NIXOS_OZONE_WL 1 \
--add-flags "--ozone-platform=wayland --enable-features=UseOzonePlatform --ozone-platform-hint=auto"
'';
};
python = pkgs.python314.withPackages (
python-pkgs: [
python-pkgs.pkginfo
python-pkgs.setuptools
]
);
in {
home.packages = [
pkgs.bitwarden-desktop
pkgs.babashka
pkgs.bat-extras.batman
pkgs.bat-extras.batdiff
pkgs.bat-extras.batgrep
pkgs.bat-extras.prettybat
pkgs.blueman
pkgs.broot
pkgs.clapper
pkgs.cliphist
@@ -40,10 +24,10 @@ in {
pkgs.feh
pkgs.git-lfs
pkgs.go
unstablePkgs.gurk-rs
pkgs.has
pkgs.hyperfine
pkgs.imagemagick
pkgs.impala
pkgs.jujutsu
pkgs.kubectl
pkgs.lnav
@@ -51,7 +35,6 @@ in {
pkgs.minikube
unstablePkgs.mission-center
pkgs.neovide
pkgs.nix-output-monitor
pkgs.nix-tree
pkgs.nh
pkgs.nodejs_24
@@ -64,31 +47,32 @@ in {
unstablePkgs.podman-desktop
unstablePkgs.podman-tui
pkgs.popsicle
python
nixers.python-env
nixers.rbw-autofill
unstablePkgs.ruff
pkgs.smile
pkgs.signal-desktop
unstablePkgs.sone
pkgs.sshs
unstablePkgs.uv
pkgs.vial
vivaldi-wayland
nixers.vivaldi-wayland
unstablePkgs.visidata
pkgs.vivaldi-ffmpeg-codecs
nixers.walker-obsidian-search
pkgs.warpinator
pkgs.xarchiver
pkgs.yubikey-agent
pkgs.yubikey-manager
pkgs.zathura
unstablePkgs.zeal
pkgs.zeal
unstablePkgs.zed-editor
unstablePkgs.zotero
inputs.zen-browser.packages.x86_64-linux.default
nixers.zen-browser
# theming
pkgs.adwaita-icon-theme
pkgs.gtk-engine-murrine
pkgs.gtk_engines
pkgs.hicolor-icon-theme
pkgs.phinger-cursors
pkgs.tokyonight-gtk-theme
# Backend dev tools
pkgs.lua54Packages.lua
pkgs.luajitPackages.luarocks
+13 -4
View File
@@ -5,8 +5,13 @@
config,
pkgs,
unstablePkgs,
nixers,
...
}: {
imports = [
inputs.noctalia.homeModules.default
];
programs = {
nix-your-shell = {
enable = true;
@@ -16,14 +21,18 @@
enable = true;
enableNushellIntegration = true;
};
waybar = {
enable = true;
systemd.enable = true;
};
noctalia-shell.enable = true;
walker = {
enable = true;
runAsService = true;
};
rbw = {
enable = true;
settings = {
email = "chughes000@gmail.com";
pinentry = nixers.rbw-autofill;
};
};
hyprcursor-phinger.enable = true;
};
}
+20 -2
View File
@@ -8,8 +8,26 @@
...
}: {
services = {
swaync.enable = true;
pueue.enable = true;
hyprpaper.enable = true;
};
# Custom version of ghostty service, to stop closing during update
systemd.user.services."app-com.mitchellh.ghostty" = {
Unit = {
Description = "Ghostty Terminal Emulator";
X-SwitchMethod = "keep-old";
After = ["graphical-session.target"];
PartOf = ["graphical-session.target"];
};
Service = {
ExecStart = "${lib.getExe config.programs.ghostty.package}";
Environment = "WAYLAND_DISPLAY=wayland-1";
Type = "notify";
ReloadSignal = "SIGUSR2";
KillMode = "mixed";
Restart = "on-failure";
};
Install = {
WantedBy = ["graphical-session.target"];
};
};
}
+24 -3
View File
@@ -16,8 +16,8 @@
package = theme.iconTheme.package;
};
theme = {
name = theme.theme.name;
package = theme.theme.package;
name = theme.gtkTheme.name;
package = theme.gtkTheme.package;
};
cursorTheme = {
name = theme.cursorTheme.name;
@@ -39,13 +39,34 @@
'';
};
};
# QT theming
qt = {
enable = true;
platformTheme.name = "kvantum";
style.name = "kvantum";
};
xdg.configFile."Kvantum/kvantum.kvconfig".text = ''
[General]
theme=${theme.qtTheme.name}
'';
# dconf theming settings
dconf.settings = {
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
gtk-theme = theme.theme.name;
gtk-theme = theme.gtkTheme.name;
icon-theme = theme.iconTheme.name;
cursor-theme = theme.cursorTheme.name;
};
};
# Ensure theming packages are installed
home.packages = [
theme.gtkTheme.package
theme.qtTheme.package
theme.iconTheme.package
theme.cursorTheme.package
];
}
+57 -28
View File
@@ -4,16 +4,40 @@ git := "true"
flake := "true"
flatpak := "true"
# Show this interactive menu
default:
@just --choose
_git-sync:
git pull --recurse
git submodule update --remote --recursive
@if [ -n "$(git status --porcelain)" ]; then \
if git status --porcelain | grep -q "flake.lock"; then \
echo ">> flake.lock is dirty. Resetting to avoid pull conflicts..."; \
git checkout flake.lock; \
fi; \
if [ -n "$(git status --porcelain)" ]; then \
echo ">> Stashing remaining local changes..."; \
git stash; \
git pull --ff-only --recurse-submodules; \
git submodule update --remote --recursive; \
git stash pop; \
else \
git pull --ff-only --recurse-submodules; \
git submodule update --remote --recursive; \
fi; \
else \
git pull --ff-only --recurse-submodules; \
git submodule update --remote --recursive; \
fi
_flake-update:
nix flake update
# Safely commit the lockfile changes
commit-lock:
git add flake.lock
git commit -m "chore: update flake.lock" || echo "No changes to commit"
# Sync git and update flake inputs (override with git=false or flake=false)
prebuild:
@if [ "{{git}}" == "true" ]; then \
echo ">> Syncing Git..."; \
@@ -25,50 +49,35 @@ prebuild:
fi
_update-root:
if `/usr/bin/env grep -Rq "nixos" /etc/*-release`; then \
sudo nixos-rebuild switch --flake .?submodules=1#$HOSTNAME; \
@if [ -f /etc/NIXOS ] && grep -q "nixos" /etc/os-release 2>/dev/null; then \
sudo nixos-rebuild switch --flake .?submodules=1#$(hostname); \
fi
# Rebuild and switch NixOS system configuration
update-root: prebuild _update-root
# Install Home Manager standalone (useful for initial non-NixOS setup)
install-home:
home-manager switch --flake .?submodules=1#$USER@core \
home-manager switch --flake .?submodules=1#$(whoami)@core \
--extra-experimental-features nix-command \
--extra-experimental-features flakes
_update-home:
home-manager switch --flake .?submodules=1#$USER@$HOSTNAME \
|| home-manager switch --flake .?submodules=1#$USER@core
home-manager switch --flake .?submodules=1#$(whoami)@$(hostname) \
|| home-manager switch --flake .?submodules=1#$(whoami)@core
# Rebuild and switch Home Manager configuration
update-home: prebuild _update-home
quick-update-root:
just git=false flake=false update-root
quick-update-home:
just git=false flake=false update-home
# Quick update skipping git and flake syncs
quick-update:
just git=false flake=false update
nogit-update-root:
just git=false update-root
nogit-update-home:
just git=false update-home
# Update the system without fetching the latest git commits
nogit-update:
just git=false update
noflake-update-root:
just flake=false update-root
noflake-update-home:
just flake=false update-home
noflake-update:
just flake=false update
# Update and clean up Flatpak packages
update-flatpaks:
@if [ "{{flatpak}}" == "true" ] && command -v flatpak &> /dev/null; then \
echo ">> Updating Flatpaks..."; \
@@ -78,17 +87,25 @@ update-flatpaks:
echo ">> Flatpak not found or disabled. Skipping."; \
fi
# View the 5 most recent NixOS and Home Manager generations
history:
@echo ">> System Generations:"
@nix-env -p /nix/var/nix/profiles/system --list-generations | tail -n 5
@echo "\n>> Home Manager Generations:"
@home-manager generations | head -n 5
# Open a Nix REPL loaded with the current flake
repl:
nix repl --file flake.nix
# Fully update the system, home-manager, and flatpaks
update: prebuild _update-root _update-home update-flatpaks
# Preview system changes without activating them
dry-run: prebuild
sudo nixos-rebuild dry-activate --flake .?submodules=1#$(hostname)
# Run Nix and Flatpak garbage collection. Optionally specify age (e.g., 'just cleanup 7d')
cleanup days="":
@if [ -n "{{days}}" ]; then \
echo ">> Deleting system generations older than {{days}}..."; \
@@ -101,3 +118,15 @@ cleanup days="":
echo ">> Cleaning unused Flatpaks..."; \
flatpak uninstall --unused -y; \
fi
# Open the editor (nvim, yazi, or heh) for a target
edit target:
@direnv exec . scripts/edit.py "{{target}}"
# Edit packages.nix for a specific system/user (run 'just packages help' for flags)
packages *flags:
@direnv exec . scripts/packages.bb {{flags}}
# Bootstrap a fresh system from the repo
bootstrap:
@direnv exec . scripts/bootstrap.py
+2
View File
@@ -24,6 +24,7 @@
pkgs.glab
pkgs.glow
pkgs.gnupg
pkgs.heh
pkgs.hexyl
pkgs.killall
pkgs.libsecret
@@ -48,6 +49,7 @@
pkgs.xcp
pkgs.zellij
pkgs.zoxide
unstablePkgs.binsider
unstablePkgs.just
unstablePkgs.neovim
unstablePkgs.nushell
+7
View File
@@ -9,4 +9,11 @@
imports = [
./programs/neovim.nix
];
programs.nh = {
enable = true;
clean.enable = true;
clean.extraArgs = "--keep-since 7d --keep 5";
flake = "/home/cianh/.config/nix";
};
}
+1
View File
@@ -79,6 +79,7 @@
users.users = {
cianh = {
isNormalUser = true;
linger = true;
hashedPasswordFile = "/etc/hashedPasswordFile";
description = "Cian Hughes";
extraGroups = ["networkmanager" "wheel" "docker" "podman" "nixcfg"];
+15 -9
View File
@@ -75,10 +75,15 @@
blacklistedKernelModules = ["nouveau"];
};
networking.hostName = "worklaptop"; # Define your hostname.
# Enable networking
networking.networkmanager.enable = true;
# Configure networking
networking = {
hostName = "worklaptop"; # Define your hostname.
wireless.iwd.enable = true;
networkmanager = {
enable = true;
wifi.backend = "iwd";
};
};
# Set your time zone.
time.timeZone = "Europe/Dublin";
@@ -101,11 +106,6 @@
nix = {
registry = (lib.mapAttrs (_: flake: {inherit flake;})) ((lib.filterAttrs (_: lib.isType "flake")) inputs);
nixPath = ["nixpkgs=${inputs.nixpkgs}"];
gc = {
automatic = true;
dates = "daily";
options = "--delete-older-than 14d";
};
settings = {
experimental-features = "nix-command flakes";
auto-optimise-store = true;
@@ -138,7 +138,13 @@
stateVersion = "23.11"; # Did you read the comment?
autoUpgrade.enable = true;
autoUpgrade.dates = "weekly";
activationScripts.diff = ''
if [[ -e /run/current-system ]]; then
${pkgs.nushell}/bin/nu -c "let diff_closure = (${pkgs.nix}/bin/nix store diff-closures /run/current-system '$systemConfig'); let table = (\$diff_closure | lines | where \$it =~ KiB | where \$it =~ | parse -r '^(?<Package>\S+): (?<Old>[^,]+)(?:.*) (?<New>[^,]+)(?:.*), (?<DiffBin>.*)$' | insert Diff { get DiffBin | ansi strip | into filesize } | sort-by -r Diff | reject DiffBin); if (\$table | get Diff | is-not-empty) { print \"\"; \$table | append [[Package Old New Diff]; [\"\" \"\" \"\" \"\"]] | append [[Package Old New Diff]; [\"\" \"\" \"Total:\" (\$table | get Diff | math sum) ]] | print; print \"\" }"
fi
'';
};
zramSwap.enable = true; # enable RAM compression
# Set user config settings
users.defaultUserShell = unstablePkgs.nushell;
+2 -5
View File
@@ -4,6 +4,7 @@
config,
pkgs,
unstablePkgs,
nixers,
...
}: {
environment.systemPackages = [
@@ -22,7 +23,7 @@
pkgs.qmk_hid
pkgs.regreet
pkgs.seahorse
pkgs.walker
nixers.walker
pkgs.wayland
pkgs.wayland-utils
pkgs.xfce.thunar
@@ -30,13 +31,9 @@
pkgs.xh
unstablePkgs.ghostty
unstablePkgs.hyprland
unstablePkgs.hyprlock
unstablePkgs.hyprpaper
unstablePkgs.hyprpicker
unstablePkgs.hyprshot
unstablePkgs.kitty
unstablePkgs.libnotify
unstablePkgs.swaynotificationcenter
unstablePkgs.waybar
];
}
+2 -2
View File
@@ -18,8 +18,8 @@ in {
regreet = {
enable = true;
theme = {
name = theme.theme.name;
package = theme.theme.package;
name = theme.gtkTheme.name;
package = theme.gtkTheme.package;
};
cursorTheme = {
name = theme.cursorTheme.name;
+25
View File
@@ -20,12 +20,37 @@
variant = "";
};
};
resolved.enable = true;
upower.enable = true;
tuned.enable = true;
pulseaudio.enable = false;
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
extraConfig.pipewire."99-high-res-audio" = {
"context.properties" = {
"default.clock.rate" = 48000;
"default.clock.allowed-rates" = [44100 48000 88200 96000 176400 192000];
};
};
wireplumber.extraConfig."10-high-res-audio" = {
"monitor.alsa.rules" = [
{
matches = [
{"node.name" = "~alsa_output.*";}
];
actions = {
update-props = {
"audio.format" = "S32LE";
};
};
}
];
};
};
gvfs.enable = true;
+12 -4
View File
@@ -6,11 +6,14 @@
theme,
...
}: {
# GTK theming
environment.sessionVariables.GTK_THEME = theme.theme.name;
# Session Variable for GTK
environment.sessionVariables.GTK_THEME = theme.gtkTheme.name;
# Delegate QT theming to kvantum
environment.sessionVariables.QT_STYLE_OVERRIDE = "kvantum";
# QT config
qt = {
enable = true;
style = "kvantum";
};
# Fonts
fonts = {
@@ -50,5 +53,10 @@
# Adwaita (i love gnome, but god damn is adwaita annoying on other DEs)
pkgs.adwaita-icon-theme
pkgs.libadwaita
# My theme packages set at the top level
theme.gtkTheme.package
theme.qtTheme.package
theme.iconTheme.package
theme.cursorTheme.package
];
}
+216
View File
@@ -0,0 +1,216 @@
#!/usr/bin/env python3
import os
import sys
import subprocess
import socket
import getpass
import shutil
REPO_URL = "https://github.com/Cian-H/My_NixOS_Config"
TARGET_DIR = os.path.expanduser("~/.config/nix")
def command_exists(cmd: str) -> bool:
"""Check if a command is available on the system."""
return shutil.which(cmd) is not None
def check_preconditions(target_dir: str):
"""Ensure the system is in a valid state to begin bootstrapping."""
if not command_exists("git"):
print(
"Error: 'git' is not installed. Please install git before bootstrapping.",
file=sys.stderr,
)
sys.exit(1)
if os.path.exists(target_dir):
print(
f"Error: {target_dir} already exists. Aborting bootstrap.", file=sys.stderr
)
sys.exit(1)
def clone_repository(repo_url: str, target_dir: str):
"""Clone the configuration repository and enter the directory."""
print(f">> Cloning {repo_url} into {target_dir}...")
try:
subprocess.run(["git", "clone", "--recursive", repo_url, target_dir], check=True)
except subprocess.CalledProcessError:
print("Error: Failed to clone repository.", file=sys.stderr)
sys.exit(1)
os.chdir(target_dir)
def detect_nixos() -> bool:
"""Check if the current host system is NixOS."""
if os.path.exists("/etc/os-release"):
with open("/etc/os-release", "r") as f:
if "ID=nixos" in f.read():
return True
return False
def has_config(sys_name: str, is_nixos: bool) -> bool:
"""Determine if system configuration directories exist for the given hostname."""
has_nixos_dir = os.path.isdir(f"nixos/{sys_name}")
has_hm_dir = os.path.isdir(f"home-manager/{sys_name}")
return (has_nixos_dir and has_hm_dir) if is_nixos else has_hm_dir
def get_available_systems() -> list:
"""Discover existing system configurations in the repository."""
opts = set()
if os.path.exists("nixos"):
opts.update([d for d in os.listdir("nixos") if os.path.isdir(f"nixos/{d}")])
if os.path.exists("home-manager"):
opts.update(
[
d
for d in os.listdir("home-manager")
if os.path.isdir(f"home-manager/{d}")
]
)
# Filter out base/core directories and hidden folders, then sort for consistent output
return sorted([o for o in opts if o not in ["core"] and not o.startswith(".")])
def setup_new_config(target_sys: str, target_dir: str, is_nixos: bool):
"""Create boilerplate directories for a missing system and open an editor."""
print(">> Creating directories...")
if is_nixos:
os.makedirs(f"nixos/{target_sys}", exist_ok=True)
os.makedirs(f"home-manager/{target_sys}", exist_ok=True)
if command_exists("yazi"):
print(">> Opening yazi. Please add your configs and exit yazi when finished.")
subprocess.run(["yazi", target_dir])
else:
print(
f">> Yazi not found. Please manually configure your files in {target_dir} in another terminal."
)
input("Press Enter when you have finished adding your configurations...")
def prompt_for_existing_config(current_sys: str, current_user: str) -> tuple[str, str]:
"""Prompt the user to select an existing configuration from the repo."""
opts = get_available_systems()
if not opts:
print(
"Error: No existing configurations found. Cannot proceed.", file=sys.stderr
)
sys.exit(1)
print("\nAvailable systems:")
for o in opts:
print(f" - {o}")
chosen_sys = input(f"\nEnter system to use [default: {current_sys}]: ").strip()
if chosen_sys:
if chosen_sys not in opts:
print(f"Error: '{chosen_sys}' is not a valid option.")
sys.exit(1)
target_sys = chosen_sys
else:
target_sys = current_sys
# Failsafe: if they press enter, but the default hostname isn't actually a valid config
if target_sys not in opts:
print(
f"Error: Default '{target_sys}' is not in available systems. You must type a valid option."
)
sys.exit(1)
chosen_user = input(
f"Enter user configuration to use [default: {current_user}]: "
).strip()
target_user = chosen_user if chosen_user else current_user
return target_sys, target_user
def resolve_configuration(
target_sys: str, target_user: str, target_dir: str, is_nixos: bool
) -> tuple[str, str]:
"""Ensure a valid configuration target exists, prompting the user for resolution if necessary."""
if has_config(target_sys, is_nixos):
return target_sys, target_user
print(
f"\n>> Configuration for system '{target_sys}' (user: '{target_user}') not found."
)
ans = (
input("Do you want to create the missing directories now? [y/N]: ")
.strip()
.lower()
)
if ans == "y":
setup_new_config(target_sys, target_dir, is_nixos)
return target_sys, target_user
ans = (
input("Do you want to switch to one of the existing configs instead? [y/N]: ")
.strip()
.lower()
)
if ans == "y":
return prompt_for_existing_config(target_sys, target_user)
print(
"Error: Cannot proceed without a valid configuration. Aborting.",
file=sys.stderr,
)
sys.exit(1)
def execute_installation(target_sys: str, target_user: str, is_nixos: bool):
"""Execute the final NixOS or Home Manager commands to build the system."""
print(
f"\n>> Proceeding with installation for user '{target_user}' on system '{target_sys}'..."
)
try:
if is_nixos:
print(
">> [NixOS detected] Performing full system and home-manager install..."
)
subprocess.run(
["sudo", "nixos-rebuild", "switch", "--flake", f".#{target_sys}"],
check=True,
)
subprocess.run(
["home-manager", "switch", "--flake", f".#{target_user}@{target_sys}"],
check=True,
)
else:
print(">> [Non-NixOS detected] Performing home-manager install only...")
subprocess.run(
["home-manager", "switch", "--flake", f".#{target_user}@{target_sys}"],
check=True,
)
print("\n>> Bootstrap complete! Welcome to your new environment.")
except subprocess.CalledProcessError as e:
print(f"\nError: Command '{' '.join(e.cmd)}' failed with exit status {e.returncode}.", file=sys.stderr)
sys.exit(e.returncode)
def main():
"""Main orchestration loop."""
check_preconditions(TARGET_DIR)
clone_repository(REPO_URL, TARGET_DIR)
is_nixos = detect_nixos()
hostname = socket.gethostname()
username = getpass.getuser()
# The returned tuple contains the final resolved system/user strings
final_sys, final_user = resolve_configuration(
hostname, username, TARGET_DIR, is_nixos
)
execute_installation(final_sys, final_user, is_nixos)
if __name__ == "__main__":
main()
+43
View File
@@ -0,0 +1,43 @@
#!/usr/bin/env python3
import typer
import subprocess
from pathlib import Path
import mimetypes
def is_text_file(filepath: str):
mime_type, _ = mimetypes.guess_type(filepath)
if mime_type:
return mime_type.startswith("text/")
try:
with open(filepath, "rb") as f:
chunk = f.read(1024)
if b"\0" in chunk:
return False # Null bytes usually mean binary
return True
except IsADirectoryError:
return False
app = typer.Typer()
@app.command()
def edit(target: Path = typer.Argument(..., help="File or directory to edit")):
if not target.exists():
subprocess.run(["nvim", str(target)])
return
if target.is_dir():
subprocess.run(["yazi", str(target)])
return
if is_text_file(str(target)):
subprocess.run(["nvim", str(target)])
else:
subprocess.run(["heh", str(target)])
if __name__ == "__main__":
app()
+50
View File
@@ -0,0 +1,50 @@
#!/usr/bin/env bb
(require '[babashka.cli :as cli]
'[babashka.fs :as fs]
'[babashka.process :refer [shell]]
'[clojure.string :as str])
(defn get-hostname []
(let [env-host (System/getenv "HOSTNAME")
etc-host (try (str/trim (slurp "/etc/hostname")) (catch Exception _ nil))
java-host (try (.getHostName (java.net.InetAddress/getLocalHost)) (catch Exception _ nil))]
(first (remove str/blank? [env-host etc-host java-host "default-system"]))))
(def cli-spec
{:spec {:home {:coerce :boolean :desc "Edit home-manager config instead of NixOS config"}
:sys {:desc "Specify system (defaults to current hostname)"}
:user {:default (System/getProperty "user.name")
:desc "Specify user (defaults to current user)"}
:update {:coerce :boolean :default true
:desc "Run auto-update after editing"}
:help {:alias :h :coerce :boolean :desc "Show this help message"}}})
(let [opts (cli/parse-opts *command-line-args* cli-spec)]
(when (:help opts)
(println "Usage: just packages [OPTIONS]")
(println (cli/format-opts cli-spec))
(System/exit 0))
(let [sys (let [s (:sys opts)]
(if (str/blank? s) (get-hostname) s))
target (if (:home opts)
(str "home-manager/" sys "/packages.nix")
(str "nixos/" sys "/packages.nix"))]
(if-not (fs/exists? target)
(do
(binding [*out* *err*]
(println (str ">> Error: Target file does not exist: " target))
(println ">> Please ensure this system profile has been bootstrapped or configured first."))
(System/exit 1))
(do
(println ">> Editing" target "...")
(shell "just" "edit" target)
(if (:update opts)
(do
(println ">> Applying updates...")
(shell "just" "quick-update"))
(println ">> Skipping update (no-update provided)."))))))