1 Commits

Author SHA1 Message Date
1105bc8fed add microcode service for amd 2024-11-11 18:18:20 -07:00
53 changed files with 383 additions and 907 deletions

View File

@ -21,7 +21,7 @@
exit 1 exit 1
fi fi
${pkgs.disko}/bin/disko \ ${pkgs.disko-packaged}/bin/disko \
--mode create \ --mode create \
--dry-run \ --dry-run \
--flake "path:$(pwd)#root" \ --flake "path:$(pwd)#root" \
@ -31,7 +31,7 @@
"This will ERASE ALL DATA on the disk /dev/''${DISK}. Are you sure you want to continue?" \ "This will ERASE ALL DATA on the disk /dev/''${DISK}. Are you sure you want to continue?" \
--default=false --default=false
${pkgs.disko}/bin/disko \ ${pkgs.disko-packaged}/bin/disko \
--mode create \ --mode create \
--flake "path:$(pwd)#root" \ --flake "path:$(pwd)#root" \
--arg disk "/dev/''${DISK}" --arg disk "/dev/''${DISK}"

339
flake.lock generated
View File

@ -51,11 +51,11 @@
}, },
"cl-nix-lite": { "cl-nix-lite": {
"locked": { "locked": {
"lastModified": 1728174978, "lastModified": 1717972076,
"narHash": "sha256-Grqqg+xuicANB85j0gNEXxi9SBKY7bzGeTuyi95eGcY=", "narHash": "sha256-hnZEsDInTcsVSL5LBGDAZegAxVLBus/wiJh+sNM15zU=",
"owner": "hraban", "owner": "hraban",
"repo": "cl-nix-lite", "repo": "cl-nix-lite",
"rev": "31cfe6275c341eb3120a99f4b1c8516c49a29d87", "rev": "cc920bfb0a6402d3871f470c98d65266126973e4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -67,11 +67,11 @@
"cmp-nvim-lsp-src": { "cmp-nvim-lsp-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1733823748, "lastModified": 1715931395,
"narHash": "sha256-iaihXNCF5bB5MdeoosD/kc3QtpA/QaIDZVLiLIurBSM=", "narHash": "sha256-CT1+Z4XJBVsl/RqvJeGmyitD6x7So0ylXvvef5jh7I8=",
"owner": "hrsh7th", "owner": "hrsh7th",
"repo": "cmp-nvim-lsp", "repo": "cmp-nvim-lsp",
"rev": "99290b3ec1322070bcfb9e846450a46f6efa50f0", "rev": "39e2eda76828d88b773cc27a3f61d2ad782c922d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -87,11 +87,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1737504076, "lastModified": 1731032247,
"narHash": "sha256-/B4XJnzYU/6K1ZZOBIgsa3K4pqDJrnC2579c44c+4rI=", "narHash": "sha256-OjLft7fwkmiRLXQsGAudGFZxEYXOT0nHwrQ9GbsBqJ4=",
"owner": "lnl7", "owner": "lnl7",
"repo": "nix-darwin", "repo": "nix-darwin",
"rev": "65cc1fa8e36ceff067daf6cfb142331f02f524d3", "rev": "2fbf4a8417c28cf45bae6e6e97248cbbd9b78632",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -108,11 +108,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1737038063, "lastModified": 1731060864,
"narHash": "sha256-rMEuiK69MDhjz1JgbaeQ9mBDXMJ2/P8vmOYRbFndXsk=", "narHash": "sha256-aYE7oAYZ+gPU1mPNhM0JwLAQNgjf0/JK1BF1ln2KBgk=",
"owner": "nix-community", "owner": "nix-community",
"repo": "disko", "repo": "disko",
"rev": "bf0abfde48f469c256f2b0f481c6281ff04a5db2", "rev": "5e40e02978e3bd63c2a6a9fa6fa8ba0e310e747f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -145,11 +145,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1737766332, "lastModified": 1731113649,
"narHash": "sha256-EcKXfadl+51Y5DQU4R7cy3FQx6XklLwmSwIAtOl1hNU=", "narHash": "sha256-U6FMghMpHTk2Pb5VsjNk8tBgCiiyB+bebmfOuNtMisA=",
"owner": "bandithedoge", "owner": "bandithedoge",
"repo": "nixpkgs-firefox-darwin", "repo": "nixpkgs-firefox-darwin",
"rev": "ef9a452ffc26aed9265e2a5ff04952e960f8f21b", "rev": "22a53e2cae4d37fb24e9326c6f72a54cb4f269d5",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -161,11 +161,11 @@
"flake-compat": { "flake-compat": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1730663653, "lastModified": 1697816753,
"narHash": "sha256-kFCUWettiFHDIqxCWWQ9qY8pVh+Lj+XL0Giyy/kdomg=", "narHash": "sha256-40to80AEIyKCQI0xMKCeF5ePoIKTYgjVVCZeu4CnTxM=",
"owner": "hraban", "owner": "hraban",
"repo": "flake-compat", "repo": "flake-compat",
"rev": "e5b16676185cb7548581c852f51ce7f3a49bba5e", "rev": "6025bade1336a36014639bc3f67eacc853dab78f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -178,11 +178,11 @@
"flake-compat_2": { "flake-compat_2": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1733328505, "lastModified": 1696426674,
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra", "owner": "edolstra",
"repo": "flake-compat", "repo": "flake-compat",
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -191,58 +191,16 @@
"type": "github" "type": "github"
} }
}, },
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
"nur",
"nixpkgs"
]
},
"locked": {
"lastModified": 1733312601,
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-utils": { "flake-utils": {
"inputs": { "inputs": {
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1731533236, "lastModified": 1710146030,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": [
"mac-app-util",
"systems"
]
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -250,9 +208,9 @@
"type": "indirect" "type": "indirect"
} }
}, },
"flake-utils_3": { "flake-utils_2": {
"inputs": { "inputs": {
"systems": "systems_3" "systems": "systems_2"
}, },
"locked": { "locked": {
"lastModified": 1705309234, "lastModified": 1705309234,
@ -268,14 +226,32 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_3": {
"inputs": {
"systems": "systems_3"
},
"locked": {
"lastModified": 1726560853,
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"gh-collaborators": { "gh-collaborators": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1736185279, "lastModified": 1717117275,
"narHash": "sha256-SGmP/8Fvf2rcYkwscMOFG01Y0VJGb/TXrNZtLacurxA=", "narHash": "sha256-x3p2bHL6U8gWanXnTTJGgA9x4Ixy9AOZiBbfcfn5VVw=",
"owner": "katiem0", "owner": "katiem0",
"repo": "gh-collaborators", "repo": "gh-collaborators",
"rev": "bf412dde50605e48af86f291c2ac8714f2c1b228", "rev": "4dfcd0b5c2e31f2d0fbfd4b83fdfae787a5e6ff8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -307,11 +283,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1737762889, "lastModified": 1730837930,
"narHash": "sha256-5HGG09bh/Yx0JA8wtBMAzt0HMCL1bYZ93x4IqzVExio=", "narHash": "sha256-0kZL4m+bKBJUBQse0HanewWO0g8hDdCvBhudzxgehqc=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "daf04c5950b676f47a794300657f1d3d14c1a120", "rev": "2f607e07f3ac7e53541120536708e824acccfaa8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -321,44 +297,21 @@
"type": "github" "type": "github"
} }
}, },
"jujutsu": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
],
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1737770753,
"narHash": "sha256-3CxkhWleCeSF18dO4lo0teBfHm5evdEaL959gOcD+0A=",
"owner": "martinvonz",
"repo": "jj",
"rev": "e58713c1355d0536e197a3f99ce5a5c713fe69c3",
"type": "github"
},
"original": {
"owner": "martinvonz",
"repo": "jj",
"type": "github"
}
},
"mac-app-util": { "mac-app-util": {
"inputs": { "inputs": {
"cl-nix-lite": "cl-nix-lite", "cl-nix-lite": "cl-nix-lite",
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
"flake-utils": "flake-utils_2", "flake-utils": "flake-utils",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ]
"systems": "systems_2"
}, },
"locked": { "locked": {
"lastModified": 1732920695, "lastModified": 1727470707,
"narHash": "sha256-1fxvJZUznwrmEtYqpPuWi2tPcL9kj6v7p1J7ZZncAPE=", "narHash": "sha256-BqkwZ2mvzn+COdfIuzllSzWmiaBwQktt4sw9slfwM70=",
"owner": "hraban", "owner": "hraban",
"repo": "mac-app-util", "repo": "mac-app-util",
"rev": "548672d0cb661ce11d08ee8bde92b87d2a75c872", "rev": "9c6bbe2a6a7ec647d03f64f0fadb874284f59eac",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -409,7 +362,7 @@
"nextcloud-snappymail": { "nextcloud-snappymail": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1737776393, "lastModified": 1731123727,
"narHash": "sha256-oCw6Brs85rINBHvz3UJXheyLVqvA3RgPXG03b30Fx7E=", "narHash": "sha256-oCw6Brs85rINBHvz3UJXheyLVqvA3RgPXG03b30Fx7E=",
"type": "tarball", "type": "tarball",
"url": "https://snappymail.eu/repository/nextcloud/snappymail-2.38.2-nextcloud.tar.gz" "url": "https://snappymail.eu/repository/nextcloud/snappymail-2.38.2-nextcloud.tar.gz"
@ -421,17 +374,17 @@
}, },
"nix2vim": { "nix2vim": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_3", "flake-utils": "flake-utils_2",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
] ]
}, },
"locked": { "locked": {
"lastModified": 1732820845, "lastModified": 1729103549,
"narHash": "sha256-YPXk41l4PzKb5rtcxkYhymwjHJG95fxl4iXIzXnftr8=", "narHash": "sha256-9caCn1wB0bD39bwwjnTsHoDveCUKs06nBe212fs5TKU=",
"owner": "gytis-ivaskevicius", "owner": "gytis-ivaskevicius",
"repo": "nix2vim", "repo": "nix2vim",
"rev": "e2c511ea553418dd432005875c649b09d56b7e58", "rev": "b3900e6d79233573f318006505d9ad3fb7170b92",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -442,11 +395,11 @@
}, },
"nixlib": { "nixlib": {
"locked": { "locked": {
"lastModified": 1736643958, "lastModified": 1729386149,
"narHash": "sha256-tmpqTSWVRJVhpvfSN9KXBvKEXplrwKnSZNAoNPf/S/s=", "narHash": "sha256-hUP9oxmnOmNnKcDOf5Y55HQ+NnoT0+bLWHLQWLLw9Ks=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixpkgs.lib", "repo": "nixpkgs.lib",
"rev": "1418bc28a52126761c02dd3d89b2d8ca0f521181", "rev": "cce4521b6df014e79a7b7afc58c703ed683c916e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -463,11 +416,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1737057290, "lastModified": 1729472750,
"narHash": "sha256-3Pe0yKlCc7EOeq1X/aJVDH0CtNL+tIBm49vpepwL1MQ=", "narHash": "sha256-s93LPHi5BN7I2xSGNAFWiYb8WRsPvT1LE9ZjZBrpFlg=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixos-generators", "repo": "nixos-generators",
"rev": "d002ce9b6e7eb467cd1c6bb9aef9c35d191b5453", "rev": "7c60ba4bc8d6aa2ba3e5b0f6ceb9fc07bc261565",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -478,11 +431,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1737632463, "lastModified": 1730785428,
"narHash": "sha256-38J9QfeGSej341ouwzqf77WIHAScihAKCt8PQJ+NH28=", "narHash": "sha256-Zwl8YgTVJTEum+L+0zVAWvXAGbWAuXHax3KzuejaDyo=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "0aa475546ed21629c4f5bbf90e38c846a99ec9e9", "rev": "4aa36568d413aca0ea84a1684d2d46f55dbabad7",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -510,11 +463,11 @@
}, },
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1735563628, "lastModified": 1730883749,
"narHash": "sha256-OnSAY7XDSx7CtDoqNh8jwVwh4xNL/2HaJxGjryLWzX8=", "narHash": "sha256-mwrFF0vElHJP8X3pFCByJR365Q2463ATp2qGIrDUdlE=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "b134951a4c9f3c995fd7be05f3243f8ecd65d798", "rev": "dba414932936fde69f0606b4f1d87c5bc0003ede",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -526,32 +479,27 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1737632463, "lastModified": 1730531603,
"narHash": "sha256-38J9QfeGSej341ouwzqf77WIHAScihAKCt8PQJ+NH28=", "narHash": "sha256-Dqg6si5CqIzm87sp57j5nTaeBbWhHFaVyG7V6L8k3lY=",
"owner": "nixos", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "0aa475546ed21629c4f5bbf90e38c846a99ec9e9", "rev": "7ffd9ae656aec493492b44d0ddfb28e79a1ea25d",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "NixOS",
"ref": "nixos-unstable", "ref": "nixos-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"nur": { "nur": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": "nixpkgs_2",
"treefmt-nix": "treefmt-nix"
},
"locked": { "locked": {
"lastModified": 1737776325, "lastModified": 1731119600,
"narHash": "sha256-uSt1yFqmuyehOr0u6k8MXSBrwEGToWcIrTzJexHBufM=", "narHash": "sha256-Asx9nXJBdRN4AvuA8+etlQWY8PrqrXXvPb1uNFveV8k=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nur", "repo": "nur",
"rev": "e3bdfbe8b01b6469fd2351ab0cf867d9cfa73da8", "rev": "b29499982ee565c8dab5ca5c7be8d2ebfc267d87",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -563,11 +511,11 @@
"nvim-lint-src": { "nvim-lint-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1737487916, "lastModified": 1730367889,
"narHash": "sha256-DKfivSjBFra/iXIuYQa7Mv5f2LglNbQTr8bQ+sCm8to=", "narHash": "sha256-vLsyRc8nbJJBjWebNFy5yrS6w2TmibEeMNpyzFenoTg=",
"owner": "mfussenegger", "owner": "mfussenegger",
"repo": "nvim-lint", "repo": "nvim-lint",
"rev": "789b7ada1b4f00e08d026dffde410dcfa6a0ba87", "rev": "36da8dd0ddc4f88e0beae234c20e75397326f143",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -596,11 +544,11 @@
"nvim-tree-lua-src": { "nvim-tree-lua-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1737769654, "lastModified": 1731122044,
"narHash": "sha256-3wHzEixIhg+aFO9fOOSuTPdNkMK96eG7cdSbK7i5pXA=", "narHash": "sha256-pf4S8iMtgCJU8jOMxqr0oItO0htBGafGglKnEU1neus=",
"owner": "kyazdani42", "owner": "kyazdani42",
"repo": "nvim-tree.lua", "repo": "nvim-tree.lua",
"rev": "fee1da88972f5972a8296813f6c00d7598325ebd", "rev": "3fc8de198c15ec4e5395f57b70579b3959976960",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -626,23 +574,6 @@
"type": "github" "type": "github"
} }
}, },
"osc": {
"flake": false,
"locked": {
"lastModified": 1732197203,
"narHash": "sha256-xL9mqwb+C6WbuJ/qk0lNbi9xd24PbKi5G0FlwaH5XPk=",
"owner": "theimpostor",
"repo": "osc",
"rev": "87b316b3f96a22fd85654cd7bd091f2cac1c6691",
"type": "github"
},
"original": {
"owner": "theimpostor",
"ref": "v0.4.6",
"repo": "osc",
"type": "github"
}
},
"ren": { "ren": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -688,7 +619,6 @@
"gh-collaborators": "gh-collaborators", "gh-collaborators": "gh-collaborators",
"hmts-nvim-src": "hmts-nvim-src", "hmts-nvim-src": "hmts-nvim-src",
"home-manager": "home-manager", "home-manager": "home-manager",
"jujutsu": "jujutsu",
"mac-app-util": "mac-app-util", "mac-app-util": "mac-app-util",
"nextcloud-cookbook": "nextcloud-cookbook", "nextcloud-cookbook": "nextcloud-cookbook",
"nextcloud-external": "nextcloud-external", "nextcloud-external": "nextcloud-external",
@ -704,7 +634,6 @@
"nvim-lspconfig-src": "nvim-lspconfig-src", "nvim-lspconfig-src": "nvim-lspconfig-src",
"nvim-tree-lua-src": "nvim-tree-lua-src", "nvim-tree-lua-src": "nvim-tree-lua-src",
"nvim-treesitter-src": "nvim-treesitter-src", "nvim-treesitter-src": "nvim-treesitter-src",
"osc": "osc",
"ren": "ren", "ren": "ren",
"rep": "rep", "rep": "rep",
"snipe-nvim-src": "snipe-nvim-src", "snipe-nvim-src": "snipe-nvim-src",
@ -719,40 +648,20 @@
"tree-sitter-python": "tree-sitter-python", "tree-sitter-python": "tree-sitter-python",
"tree-sitter-rasi": "tree-sitter-rasi", "tree-sitter-rasi": "tree-sitter-rasi",
"tree-sitter-vimdoc": "tree-sitter-vimdoc", "tree-sitter-vimdoc": "tree-sitter-vimdoc",
"ucodenix": "ucodenix",
"wallpapers": "wallpapers", "wallpapers": "wallpapers",
"wsl": "wsl", "wsl": "wsl",
"zenyd-mpv-scripts": "zenyd-mpv-scripts" "zenyd-mpv-scripts": "zenyd-mpv-scripts"
} }
}, },
"rust-overlay": {
"inputs": {
"nixpkgs": [
"jujutsu",
"nixpkgs"
]
},
"locked": {
"lastModified": 1737685583,
"narHash": "sha256-p+NVABRpGi+pT+xxf9HcLcFVxG6L+vEEy+NwzB9T0f8=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "eb64cbcc8eee0fa87ebded92805280d2ec97415a",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"snipe-nvim-src": { "snipe-nvim-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1736108869, "lastModified": 1730493972,
"narHash": "sha256-sJ71eiE0XmMJkhNCkbY82R4eHzBOOKFrPa+nxLc1f8s=", "narHash": "sha256-9Q/ZbhtteS9SemQJ/3Nov1rshQgm1Beiw88/zgmJbRg=",
"owner": "leath-dub", "owner": "leath-dub",
"repo": "snipe.nvim", "repo": "snipe.nvim",
"rev": "0d0a482ac713370196e4fc0025d5aaac5030104d", "rev": "64b3763c1b388ac5a3d5a2da615a3d0824af4a45",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -778,16 +687,16 @@
}, },
"systems_2": { "systems_2": {
"locked": { "locked": {
"lastModified": 1689347925, "lastModified": 1681028828,
"narHash": "sha256-ozenz5bFe1UUqOn7f60HRmgc01BgTGIKZ4Xl+HbocGQ=", "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems", "owner": "nix-systems",
"repo": "default-darwin", "repo": "default",
"rev": "2235d7e6cc29ae99878133c95e9fe5e157661ffb", "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-systems", "owner": "nix-systems",
"repo": "default-darwin", "repo": "default",
"type": "github" "type": "github"
} }
}, },
@ -826,11 +735,11 @@
"telescope-project-nvim-src": { "telescope-project-nvim-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1733083023, "lastModified": 1725880250,
"narHash": "sha256-qEORRWYKBpK7fn7se8g+5uuVBJNu0T4JHSc0C2QzNDY=", "narHash": "sha256-wO/cm5PT1L0hFr/CX466w0UimoFg/tWrDK8T0QeKZMU=",
"owner": "nvim-telescope", "owner": "nvim-telescope",
"repo": "telescope-project.nvim", "repo": "telescope-project.nvim",
"rev": "1d7920e799fc5001dffc7bd10909a86e0358eaf4", "rev": "796200876bb0fe8157b8eb1ce03d927d3827a052",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -842,11 +751,11 @@
"tiny-inline-diagnostic-nvim-src": { "tiny-inline-diagnostic-nvim-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1737657256, "lastModified": 1731028203,
"narHash": "sha256-4RNZjzVrc6lSXCAEHwtdbWJvNCRjglq97ZL9DRM3IiI=", "narHash": "sha256-A4v8pZuzuH/MSWYF7Hg7ZQo2HNLqlE7dZMhylPEpTdM=",
"owner": "rachartier", "owner": "rachartier",
"repo": "tiny-inline-diagnostic.nvim", "repo": "tiny-inline-diagnostic.nvim",
"rev": "5c00aec99f558b8f0a2c4445038f74e5f5435c00", "rev": "86050f39a62de48734f1a2876d70d179b75deb7c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -875,11 +784,11 @@
"tree-sitter-bash": { "tree-sitter-bash": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1737678721, "lastModified": 1728963142,
"narHash": "sha256-aTM0DjmCX2HaeDfZPCoqWULLVoa+nBppiR97jMWWItM=", "narHash": "sha256-h6L5eIItu3IOJBKSZCajHMhhencN1Fk/4dXgBMuVxYc=",
"owner": "tree-sitter", "owner": "tree-sitter",
"repo": "tree-sitter-bash", "repo": "tree-sitter-bash",
"rev": "03f4927065b3c0d71a962be87130aa7e79b35448", "rev": "597a5ed6ed4d932fd44697feec988f977081ae59",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -925,11 +834,11 @@
"tree-sitter-puppet": { "tree-sitter-puppet": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1734835631, "lastModified": 1713617121,
"narHash": "sha256-bO5g5AdhzpB13yHklpAndUHIX7Rvd7OMjH0Ds2ATA6Q=", "narHash": "sha256-+zMgzyuGerJ8l+i5ZtWnmGr3i4fFiSLD5FssyKESsmI=",
"owner": "amaanq", "owner": "amaanq",
"repo": "tree-sitter-puppet", "repo": "tree-sitter-puppet",
"rev": "15f192929b7d317f5914de2b4accd37b349182a6", "rev": "584522f32495d648b18a53ccb52d988e60de127d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -941,11 +850,11 @@
"tree-sitter-python": { "tree-sitter-python": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1737668819, "lastModified": 1728966077,
"narHash": "sha256-g06oE9w2AMCM6BwTQmB+acY1wcQXjIgj62N+z+nrpaY=", "narHash": "sha256-pD4JedYrnz6d5pgzRPtKPY0XPRoot1FMI9XgTgONOyw=",
"owner": "tree-sitter", "owner": "tree-sitter",
"repo": "tree-sitter-python", "repo": "tree-sitter-python",
"rev": "ab2ba8be034368fa009f62f371c068b8728f9db7", "rev": "7f4b9c2d8039701b0579b7c060a918f8548aa7cd",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -987,24 +896,21 @@
"type": "github" "type": "github"
} }
}, },
"treefmt-nix": { "ucodenix": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": "nixpkgs_2"
"nur",
"nixpkgs"
]
}, },
"locked": { "locked": {
"lastModified": 1733222881, "lastModified": 1731337052,
"narHash": "sha256-JIPcz1PrpXUCbaccEnrcUS8jjEb/1vJbZz5KkobyFdM=", "narHash": "sha256-/wKkjAHHmaov6VWW7POdL+dUWtAWA9Zs6Ys/r7ugy00=",
"owner": "numtide", "owner": "e-tho",
"repo": "treefmt-nix", "repo": "ucodenix",
"rev": "49717b5af6f80172275d47a418c9719a31a78b53", "rev": "5d8df57d4258d225dc9f5c2c4bb96855842cbac2",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "numtide", "owner": "e-tho",
"repo": "treefmt-nix", "repo": "ucodenix",
"type": "github" "type": "github"
} }
}, },
@ -1027,16 +933,17 @@
"wsl": { "wsl": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_2", "flake-compat": "flake-compat_2",
"flake-utils": "flake-utils_3",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
] ]
}, },
"locked": { "locked": {
"lastModified": 1736095716, "lastModified": 1730453870,
"narHash": "sha256-csysw/Szu98QDiA2lhWk9seYOyCebeVEWL89zh1cduM=", "narHash": "sha256-d+kIgz4BvTXb7emjSFV3zjNydGmLUmuluQjdBb51R9o=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NixOS-WSL", "repo": "NixOS-WSL",
"rev": "63c3b4ed1712a3a0621002cd59bfdc80875ecbb0", "rev": "adb6bc4b661a43328752b4575be4968a4990c033",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -31,6 +31,9 @@
inputs.nixpkgs.follows = "nixpkgs"; # Use system packages list for their inputs inputs.nixpkgs.follows = "nixpkgs"; # Use system packages list for their inputs
}; };
# Used for AMD CPU microcode
ucodenix.url = "github:e-tho/ucodenix";
# Community packages; used for Firefox extensions # Community packages; used for Firefox extensions
nur.url = "github:nix-community/nur"; nur.url = "github:nix-community/nur";
@ -175,13 +178,6 @@
flake = false; flake = false;
}; };
# Git alternative
# Fixes: https://github.com/martinvonz/jj/issues/4784
jujutsu = {
url = "github:martinvonz/jj";
inputs.nixpkgs.follows = "nixpkgs";
};
# Ren and rep - CLI find and replace # Ren and rep - CLI find and replace
rep = { rep = {
url = "github:robenkleene/rep-grep"; url = "github:robenkleene/rep-grep";
@ -197,12 +193,6 @@
flake = false; flake = false;
}; };
# Clipboard over SSH
osc = {
url = "github:theimpostor/osc/v0.4.6";
flake = false;
};
# Nextcloud Apps # Nextcloud Apps
nextcloud-news = { nextcloud-news = {
# https://github.com/nextcloud/news/releases # https://github.com/nextcloud/news/releases
@ -249,7 +239,6 @@
dotfilesRepo = "https://github.com/nmasur/dotfiles"; dotfilesRepo = "https://github.com/nmasur/dotfiles";
hostnames = { hostnames = {
audiobooks = "read.${baseName}"; audiobooks = "read.${baseName}";
budget = "money.${baseName}";
files = "files.${baseName}"; files = "files.${baseName}";
git = "git.${baseName}"; git = "git.${baseName}";
influxdb = "influxdb.${baseName}"; influxdb = "influxdb.${baseName}";
@ -260,7 +249,6 @@
notifications = "ntfy.${baseName}"; notifications = "ntfy.${baseName}";
prometheus = "prom.${baseName}"; prometheus = "prom.${baseName}";
paperless = "paper.${baseName}"; paperless = "paper.${baseName}";
photos = "photos.${baseName}";
secrets = "vault.${baseName}"; secrets = "vault.${baseName}";
stream = "stream.${baseName}"; stream = "stream.${baseName}";
content = "cloud.${baseName}"; content = "cloud.${baseName}";
@ -273,18 +261,16 @@
# Common overlays to always use # Common overlays to always use
overlays = [ overlays = [
inputs.nur.overlays.default inputs.nur.overlay
inputs.nix2vim.overlay inputs.nix2vim.overlay
inputs.jujutsu.overlays.default # Fix: https://github.com/martinvonz/jj/issues/4784
(import ./overlays/neovim-plugins.nix inputs) (import ./overlays/neovim-plugins.nix inputs)
(import ./overlays/disko.nix inputs)
(import ./overlays/tree-sitter.nix inputs) (import ./overlays/tree-sitter.nix inputs)
(import ./overlays/mpv-scripts.nix inputs) (import ./overlays/mpv-scripts.nix inputs)
(import ./overlays/nextcloud-apps.nix inputs) (import ./overlays/nextcloud-apps.nix inputs)
(import ./overlays/betterlockscreen.nix) (import ./overlays/betterlockscreen.nix)
(import ./overlays/gh-collaborators.nix inputs) (import ./overlays/gh-collaborators.nix inputs)
(import ./overlays/osc.nix inputs)
(import ./overlays/ren-rep.nix inputs) (import ./overlays/ren-rep.nix inputs)
(import ./overlays/volnoti.nix)
]; ];
# System types to support. # System types to support.

View File

@ -62,7 +62,7 @@ inputs.nixpkgs.lib.nixosSystem rec {
# Still require colors for programs like Neovim, K9S # Still require colors for programs like Neovim, K9S
theme = { theme = {
colors = (import ../../colorscheme/gruvbox-dark).dark; colors = (import ../../colorscheme/gruvbox).dark;
}; };
# Programs and services # Programs and services
@ -71,7 +71,6 @@ inputs.nixpkgs.lib.nixosSystem rec {
dotfiles.enable = true; # Clone dotfiles dotfiles.enable = true; # Clone dotfiles
neovim.enable = true; neovim.enable = true;
giteaRunner.enable = true; giteaRunner.enable = true;
services.actualbudget.enable = true;
services.caddy.enable = true; services.caddy.enable = true;
services.grafana.enable = true; services.grafana.enable = true;
services.thelounge.enable = true; services.thelounge.enable = true;
@ -83,7 +82,6 @@ inputs.nixpkgs.lib.nixosSystem rec {
services.minecraft-server.enable = true; # Setup Minecraft server services.minecraft-server.enable = true; # Setup Minecraft server
services.n8n.enable = true; services.n8n.enable = true;
services.ntfy-sh.enable = true; services.ntfy-sh.enable = true;
services.postgresql.enable = true;
services.uptime-kuma.enable = true; services.uptime-kuma.enable = true;
system.autoUpgrade.enable = true; system.autoUpgrade.enable = true;
@ -100,7 +98,6 @@ inputs.nixpkgs.lib.nixosSystem rec {
endpoint = "s3.us-west-002.backblazeb2.com"; endpoint = "s3.us-west-002.backblazeb2.com";
bucket = "noahmasur-backup"; bucket = "noahmasur-backup";
accessKeyId = "0026b0e73b2e2c80000000005"; accessKeyId = "0026b0e73b2e2c80000000005";
resticBucket = "noahmasur-restic";
}; };
# Disable passwords, only use SSH key # Disable passwords, only use SSH key

View File

@ -26,8 +26,7 @@ inputs.darwin.lib.darwinSystem {
inputs.mac-app-util.darwinModules.default inputs.mac-app-util.darwinModules.default
{ {
nixpkgs.overlays = [ inputs.firefox-darwin.overlay ] ++ overlays; nixpkgs.overlays = [ inputs.firefox-darwin.overlay ] ++ overlays;
networking.hostName = "NYCM-NMASUR2"; networking.hostName = "lookingglass";
networking.computerName = "NYCM-NMASUR2";
identityFile = "/Users/Noah.Masur/.ssh/id_ed25519"; identityFile = "/Users/Noah.Masur/.ssh/id_ed25519";
gui.enable = true; gui.enable = true;
theme = { theme = {

View File

@ -109,7 +109,6 @@ inputs.nixpkgs.lib.nixosSystem rec {
services.audiobookshelf.enable = true; services.audiobookshelf.enable = true;
services.bind.enable = true; services.bind.enable = true;
services.caddy.enable = true; services.caddy.enable = true;
services.immich.enable = true;
services.jellyfin.enable = true; services.jellyfin.enable = true;
services.nextcloud.enable = true; services.nextcloud.enable = true;
services.calibre-web.enable = true; services.calibre-web.enable = true;
@ -134,7 +133,6 @@ inputs.nixpkgs.lib.nixosSystem rec {
endpoint = "s3.us-west-002.backblazeb2.com"; endpoint = "s3.us-west-002.backblazeb2.com";
bucket = "noahmasur-backup"; bucket = "noahmasur-backup";
accessKeyId = "0026b0e73b2e2c80000000005"; accessKeyId = "0026b0e73b2e2c80000000005";
resticBucket = "noahmasur-restic";
}; };
# Disable passwords, only use SSH key # Disable passwords, only use SSH key

View File

@ -17,6 +17,7 @@ inputs.nixpkgs.lib.nixosSystem rec {
modules = [ modules = [
globals globals
inputs.home-manager.nixosModules.home-manager inputs.home-manager.nixosModules.home-manager
inputs.ucodenix.nixosModules.default
../../modules/common ../../modules/common
../../modules/nixos ../../modules/nixos
{ {
@ -41,12 +42,6 @@ inputs.nixpkgs.lib.nixosSystem rec {
boot.kernelModules = [ "kvm-amd" ]; boot.kernelModules = [ "kvm-amd" ];
services.xserver.videoDrivers = [ "amdgpu" ]; services.xserver.videoDrivers = [ "amdgpu" ];
# I don't think I need this?
# boot.kernelParams = [
# "video=DP-0:2560x1440@165"
# "video=DP-1:1920x1080@60"
# ];
# Required binary blobs to boot on this machine # Required binary blobs to boot on this machine
hardware.enableRedistributableFirmware = true; hardware.enableRedistributableFirmware = true;
@ -55,6 +50,7 @@ inputs.nixpkgs.lib.nixosSystem rec {
# Allow firmware updates # Allow firmware updates
hardware.cpu.amd.updateMicrocode = true; hardware.cpu.amd.updateMicrocode = true;
services.ucodenix.enable = true;
# Helps reduce GPU fan noise under idle loads # Helps reduce GPU fan noise under idle loads
hardware.fancontrol.enable = true; hardware.fancontrol.enable = true;

View File

@ -23,6 +23,6 @@
# Broken on 2023-12-11 # Broken on 2023-12-11
# https://forum.obsidian.md/t/electron-25-is-now-eol-please-upgrade-to-a-newer-version/72878/8 # https://forum.obsidian.md/t/electron-25-is-now-eol-please-upgrade-to-a-newer-version/72878/8
insecurePackages = [ "electron-25.9.0" ]; nixpkgs.config.permittedInsecurePackages = [ "electron-25.9.0" ];
}; };
} }

View File

@ -21,6 +21,4 @@
home.packages = with pkgs; [ slack ]; home.packages = with pkgs; [ slack ];
}; };
}; };
# Theme string: #1D2122,#665C54,#8EC07C,#BDAE93
} }

View File

@ -29,14 +29,14 @@
sessionVariables.ROFI_SYSTEMD_TERM = "${pkgs.wezterm}/bin/wezterm"; sessionVariables.ROFI_SYSTEMD_TERM = "${pkgs.wezterm}/bin/wezterm";
}; };
terminal = "${pkgs.wezterm}/bin/wezterm";
terminalLaunchCommand = "${config.terminal} start --";
home-manager.users.${config.user} = { home-manager.users.${config.user} = {
# Set the i3 terminal # Set the i3 terminal
xsession.windowManager.i3.config.terminal = lib.mkIf pkgs.stdenv.isLinux "wezterm"; xsession.windowManager.i3.config.terminal = lib.mkIf pkgs.stdenv.isLinux "wezterm";
# Set the Rofi terminal for running programs
programs.rofi.terminal = lib.mkIf pkgs.stdenv.isLinux "${pkgs.wezterm}/bin/wezterm";
# Display images in the terminal # Display images in the terminal
programs.fish.shellAliases = { programs.fish.shellAliases = {
icat = lib.mkForce "wezterm imgcat"; icat = lib.mkForce "wezterm imgcat";
@ -102,183 +102,135 @@
}; };
}; };
extraConfig = '' extraConfig = ''
local wezterm = require("wezterm") return {
local config = wezterm.config_builder() color_scheme = "myTheme",
config.check_for_updates = false
config.color_scheme = "myTheme"
-- Scrollback -- Scrollback
config.scrollback_lines = 10000 scrollback_lines = 10000,
-- Window -- Window
config.window_padding = { window_padding = {
left = 10, left = 10,
right = 10, right = 10,
top = 10, top = 10,
bottom = 12, bottom = 10,
}
config.font = wezterm.font('${font}', { weight = 'Bold'})
config.font_size = ${if pkgs.stdenv.isLinux then "14.0" else "18.0"}
-- Fix color blocks instead of text
config.front_end = "WebGpu"
-- Tab Bar
config.hide_tab_bar_if_only_one_tab = true
config.window_frame = {
font = wezterm.font('${font}', { weight = 'Bold'}),
font_size = ${if pkgs.stdenv.isLinux then "12.0" else "16.0"},
}
config.colors = {
tab_bar = {
active_tab = {
bg_color = '${config.theme.colors.base00}',
fg_color = '${config.theme.colors.base04}',
}, },
},
}
-- Disable audio font = wezterm.font('${font}', { weight = 'Bold'}),
config.audible_bell = "Disabled" font_size = ${if pkgs.stdenv.isLinux then "14.0" else "18.0"},
config.initial_rows = 80 -- Fix color blocks instead of text
config.initial_cols = 200 front_end = "WebGpu",
config.unix_domains = { -- Tab Bar
{ hide_tab_bar_if_only_one_tab = true,
name = 'unix', window_frame = {
}, font = wezterm.font('${font}', { weight = 'Bold'}),
} font_size = ${if pkgs.stdenv.isLinux then "12.0" else "16.0"},
-- This causes `wezterm` to act as though it was started as
-- `wezterm connect unix` by default, connecting to the unix
-- domain on startup.
-- If you prefer to connect manually, leave out this line.
config.default_gui_startup_args = { 'connect', 'unix' }
config.leader = {
key = 'a',
mods = 'CTRL',
timeout_milliseconds = 2000,
}
config.keys = {
-- Attach to muxer
{
key = 'a',
mods = 'LEADER',
action = wezterm.action.AttachDomain 'unix',
},
-- Detach from muxer
{
key = 'd',
mods = 'LEADER',
action = wezterm.action.DetachDomain { DomainName = 'unix' },
},
-- sends completion string for fish autosuggestions
{
key = 'Enter',
mods = 'SHIFT',
action = wezterm.action.SendString '\x1F'
},
-- ctrl-shift-h was "hide"
{
key = 'H',
mods = 'SHIFT|CTRL',
action = wezterm.action.DisableDefaultAssignment
},
-- alt-enter was "fullscreen"
{
key = 'Enter',
mods = 'ALT',
action = wezterm.action.DisableDefaultAssignment
},
-- make super-f "fullscreen"
{
key = 'f',
mods = 'SUPER',
action = wezterm.action.ToggleFullScreen
},
-- super-t open new tab in new dir
{
key = 't',
mods = ${if pkgs.stdenv.isDarwin then "'SUPER'" else "'ALT'"},
action = wezterm.action.SpawnCommandInNewTab {
cwd = wezterm.home_dir,
}, },
},
-- shift-super-t open new tab in same dir
{
key = 't',
mods = 'SUPER|SHIFT',
action = wezterm.action.SpawnTab 'CurrentPaneDomain'
},
-- project switcher
{
key = 'P',
mods = 'SUPER',
action = wezterm.action_callback(function(window, pane)
local choices = {}
wezterm.log_info "working?" colors = {
tab_bar = {
active_tab = {
bg_color = '${config.theme.colors.base00}',
fg_color = '${config.theme.colors.base04}',
},
},
},
function scandir(directory) -- Disable audio
local i, t, popen = 0, {}, io.popen audible_bell = "Disabled",
local pfile = popen('${pkgs.fd}/bin/fd --search-path "'..directory..'" --type directory --exact-depth 2 | ${pkgs.proximity-sort}/bin/proximity-sort "'..os.getenv("HOME").."/dev/work"..'"')
for filename in pfile:lines() do initial_rows = 80,
i = i + 1 initial_cols = 200,
t[i] = filename
keys = {
-- sends completion string for fish autosuggestions
{
key = 'Enter',
mods = 'SHIFT',
action = wezterm.action.SendString '\x1F'
},
-- ctrl-shift-h was "hide"
{
key = 'H',
mods = 'SHIFT|CTRL',
action = wezterm.action.DisableDefaultAssignment
},
-- alt-enter was "fullscreen"
{
key = 'Enter',
mods = 'ALT',
action = wezterm.action.DisableDefaultAssignment
},
-- make super-f "fullscreen"
{
key = 'f',
mods = 'SUPER',
action = wezterm.action.ToggleFullScreen
},
-- super-t open new tab in new dir
{
key = 't',
mods = ${if pkgs.stdenv.isDarwin then "'SUPER'" else "'ALT'"},
action = wezterm.action.SpawnCommandInNewTab {
cwd = wezterm.home_dir,
},
},
-- shift-super-t open new tab in same dir
{
key = 't',
mods = 'SUPER|SHIFT',
action = wezterm.action.SpawnTab 'CurrentPaneDomain'
},
-- project switcher
{
key = 'P',
mods = 'SUPER',
action = wezterm.action_callback(function(window, pane)
local choices = {}
wezterm.log_info "working?"
function scandir(directory)
local i, t, popen = 0, {}, io.popen
local pfile = popen('${pkgs.fd}/bin/fd --search-path "'..directory..'" --type directory --exact-depth 2 | ${pkgs.proximity-sort}/bin/proximity-sort "'..os.getenv("HOME").."/dev/work"..'"')
for filename in pfile:lines() do
i = i + 1
t[i] = filename
end
pfile:close()
return t
end end
pfile:close()
return t
end
for _, v in pairs(scandir(os.getenv("HOME").."/dev")) do for _, v in pairs(scandir(os.getenv("HOME").."/dev")) do
table.insert(choices, { label = v }) table.insert(choices, { label = v })
end end
window:perform_action( window:perform_action(
wezterm.action.InputSelector { wezterm.action.InputSelector {
action = wezterm.action_callback(function(window, pane, id, label) action = wezterm.action_callback(function(window, pane, id, label)
if not id and not label then if not id and not label then
wezterm.log_info "cancelled" wezterm.log_info "cancelled"
else else
window:perform_action( window:perform_action(
wezterm.action.SpawnCommandInNewTab { wezterm.action.SpawnCommandInNewTab {
cwd = label, cwd = label,
}, },
pane pane
) )
end end
end), end),
fuzzy = true, fuzzy = true,
title = "Select Project", title = "Select Project",
choices = choices, choices = choices,
}, },
pane pane
) )
end), end),
}, },
},
} }
-- print the workspace name at the upper right
wezterm.on("update-right-status", function(window, pane)
window:set_right_status(window:active_workspace())
end)
-- load plugin
local workspace_switcher = wezterm.plugin.require("https://github.com/MLFlexer/smart_workspace_switcher.wezterm")
-- set path to zoxide
workspace_switcher.zoxide_path = "${pkgs.zoxide}/bin/zoxide"
-- keymaps
table.insert(config.keys, { key = "s", mods = "CTRL|SHIFT", action = workspace_switcher.switch_workspace() })
-- table.insert(config.keys, { key = "t", mods = "CTRL|SHIFT", action = wezterm.action.ShowLauncherArgs({ flags = "FUZZY|WORKSPACES" }) })
table.insert(config.keys, { key = "[", mods = "CTRL|SHIFT", action = wezterm.action.SwitchWorkspaceRelative(1) })
table.insert(config.keys, { key = "]", mods = "CTRL|SHIFT", action = wezterm.action.SwitchWorkspaceRelative(-1) })
return config
''; '';
}; };
}; };

View File

@ -76,20 +76,11 @@
description = "List of unfree packages to allow."; description = "List of unfree packages to allow.";
default = [ ]; default = [ ];
}; };
insecurePackages = lib.mkOption {
type = lib.types.listOf lib.types.str;
description = "List of insecure packages to allow.";
default = [ ];
};
hostnames = { hostnames = {
audiobooks = lib.mkOption { audiobooks = lib.mkOption {
type = lib.types.str; type = lib.types.str;
description = "Hostname for audiobook server (Audiobookshelf)."; description = "Hostname for audiobook server (Audiobookshelf).";
}; };
budget = lib.mkOption {
type = lib.types.str;
description = "Hostname for budgeting server (ActualBudget).";
};
files = lib.mkOption { files = lib.mkOption {
type = lib.types.str; type = lib.types.str;
description = "Hostname for files server (Filebrowser)."; description = "Hostname for files server (Filebrowser).";
@ -110,10 +101,6 @@
type = lib.types.str; type = lib.types.str;
description = "Hostname for document server (paperless-ngx)."; description = "Hostname for document server (paperless-ngx).";
}; };
photos = lib.mkOption {
type = lib.types.str;
description = "Hostname for photo management (Immich).";
};
prometheus = lib.mkOption { prometheus = lib.mkOption {
type = lib.types.str; type = lib.types.str;
description = "Hostname for Prometheus server."; description = "Hostname for Prometheus server.";
@ -190,9 +177,6 @@
# Retrieves package object based on string name # Retrieves package object based on string name
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) config.unfreePackages; nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) config.unfreePackages;
# Allow specified insecure packages (identified elsewhere)
nixpkgs.config.permittedInsecurePackages = config.insecurePackages;
# Pin a state version to prevent warnings # Pin a state version to prevent warnings
home-manager.users.${config.user}.home.stateVersion = stateVersion; home-manager.users.${config.user}.home.stateVersion = stateVersion;
home-manager.users.root.home.stateVersion = stateVersion; home-manager.users.root.home.stateVersion = stateVersion;

View File

@ -169,8 +169,7 @@
filters = { filters = {
"text/plain" = "${pkgs.aerc}/libexec/aerc/filters/colorize"; "text/plain" = "${pkgs.aerc}/libexec/aerc/filters/colorize";
"text/calendar" = "${pkgs.gawk}/bin/awk -f ${pkgs.aerc}/libexec/aerc/filters/calendar"; "text/calendar" = "${pkgs.gawk}/bin/awk -f ${pkgs.aerc}/libexec/aerc/filters/calendar";
"text/html" = "text/html" = "${pkgs.aerc}/libexec/aerc/filters/html | ${pkgs.aerc}/libexec/aerc/filters/colorize"; # Requires w3m, dante
"${pkgs.aerc}/libexec/aerc/filters/html | ${pkgs.aerc}/libexec/aerc/filters/colorize"; # Requires w3m, dante
# "text/*" = # "text/*" =
# ''${pkgs.bat}/bin/bat -fP --file-name="$AERC_FILENAME "''; # ''${pkgs.bat}/bin/bat -fP --file-name="$AERC_FILENAME "'';
"message/delivery-status" = "${pkgs.aerc}/libexec/aerc/filters/colorize"; "message/delivery-status" = "${pkgs.aerc}/libexec/aerc/filters/colorize";
@ -191,25 +190,26 @@
}; };
}; };
xdg.desktopEntries.aerc = lib.mkIf (pkgs.stdenv.isLinux && config.gui.enable) { xdg.desktopEntries.aerc = lib.mkIf pkgs.stdenv.isLinux {
name = "aerc"; name = "aerc";
exec = "${config.terminalLaunchCommand} aerc %u"; exec = "kitty aerc %u";
}; };
xsession.windowManager.i3.config.keybindings = lib.mkIf pkgs.stdenv.isLinux { xsession.windowManager.i3.config.keybindings = lib.mkIf pkgs.stdenv.isLinux {
"${config.home-manager.users.${config.user}.xsession.windowManager.i3.config.modifier}+Shift+e" = "${
"exec ${ config.home-manager.users.${config.user}.xsession.windowManager.i3.config.modifier
# Don't name the script `aerc` or it will affect grep }+Shift+e" = "exec ${
builtins.toString ( # Don't name the script `aerc` or it will affect grep
pkgs.writeShellScript "focus-mail.sh" '' builtins.toString (
count=$(ps aux | grep -c aerc) pkgs.writeShellScript "focus-mail.sh" ''
if [ "$count" -eq 1 ]; then count=$(ps aux | grep -c aerc)
i3-msg "exec --no-startup-id ${config.terminal} start --class aerc -- aerc" if [ "$count" -eq 1 ]; then
sleep 0.25 i3-msg "exec --no-startup-id kitty --class aerc aerc"
fi sleep 0.25
i3-msg "[class=aerc] focus" fi
'' i3-msg "[class=aerc] focus"
) ''
}"; )
}";
}; };
programs.fish.shellAbbrs = { programs.fish.shellAbbrs = {

View File

@ -2,7 +2,6 @@
{ {
plugins = [ plugins = [
pkgs.vimPlugins.nvim-cmp
pkgs.vimPlugins.cmp-nvim-lsp pkgs.vimPlugins.cmp-nvim-lsp
pkgs.vimPlugins.cmp-buffer pkgs.vimPlugins.cmp-buffer
pkgs.vimPlugins.cmp-path pkgs.vimPlugins.cmp-path
@ -27,21 +26,15 @@
# Basic completion keybinds # Basic completion keybinds
mapping = { mapping = {
"['<C-n>']" = "['<C-n>']" = dsl.rawLua "require('cmp').mapping.select_next_item({ behavior = require('cmp').SelectBehavior.Insert }, { 'i', 'c' })";
dsl.rawLua "require('cmp').mapping.select_next_item({ behavior = require('cmp').SelectBehavior.Insert }, { 'i', 'c' })"; "['<C-p>']" = dsl.rawLua "require('cmp').mapping.select_prev_item({ behavior = require('cmp').SelectBehavior.Insert }, { 'i', 'c' })";
"['<C-p>']" = "['<Down>']" = dsl.rawLua "require('cmp').mapping.select_next_item({ behavior = require('cmp').SelectBehavior.Select }, { 'i', 'c' })";
dsl.rawLua "require('cmp').mapping.select_prev_item({ behavior = require('cmp').SelectBehavior.Insert }, { 'i', 'c' })"; "['<Up>']" = dsl.rawLua "require('cmp').mapping.select_prev_item({ behavior = require('cmp').SelectBehavior.Select }, { 'i', 'c' })";
"['<Down>']" =
dsl.rawLua "require('cmp').mapping.select_next_item({ behavior = require('cmp').SelectBehavior.Select }, { 'i', 'c' })";
"['<Up>']" =
dsl.rawLua "require('cmp').mapping.select_prev_item({ behavior = require('cmp').SelectBehavior.Select }, { 'i', 'c' })";
"['<C-d>']" = dsl.rawLua "require('cmp').mapping.scroll_docs(-4)"; "['<C-d>']" = dsl.rawLua "require('cmp').mapping.scroll_docs(-4)";
"['<C-f>']" = dsl.rawLua "require('cmp').mapping.scroll_docs(4)"; "['<C-f>']" = dsl.rawLua "require('cmp').mapping.scroll_docs(4)";
"['<C-e>']" = dsl.rawLua "require('cmp').mapping.abort()"; "['<C-e>']" = dsl.rawLua "require('cmp').mapping.abort()";
"['<C-y>']" = "['<C-y>']" = dsl.rawLua "require('cmp').mapping.confirm({ behavior = require('cmp').ConfirmBehavior.Insert, select = true, }, { 'i', 'c' })";
dsl.rawLua "require('cmp').mapping.confirm({ behavior = require('cmp').ConfirmBehavior.Insert, select = true, }, { 'i', 'c' })"; "['<C-r>']" = dsl.rawLua "require('cmp').mapping.confirm({ behavior = require('cmp').ConfirmBehavior.Replace, select = true, }, { 'i', 'c' })";
"['<C-r>']" =
dsl.rawLua "require('cmp').mapping.confirm({ behavior = require('cmp').ConfirmBehavior.Replace, select = true, }, { 'i', 'c' })";
"['<Esc>']" = dsl.rawLua '' "['<Esc>']" = dsl.rawLua ''
function(_) function(_)
cmp.mapping({ cmp.mapping({
@ -135,7 +128,7 @@
}; };
}; };
lua' = '' lua = ''
-- Use buffer source for `/` -- Use buffer source for `/`
require('cmp').setup.cmdline("/", { require('cmp').setup.cmdline("/", {
mapping = { mapping = {

View File

@ -1,23 +0,0 @@
#!/usr/bin/env bash
# Adapted from: https://gist.github.com/reegnz/b9e40993d410b75c2d866441add2cb55
if [[ -z $1 ]] || [[ $1 == "-" ]]; then
input=$(mktemp)
trap 'rm -f $input' EXIT
cat /dev/stdin >"$input"
else
input=$1
fi
echo '' |
fzf --phony \
--height 100% \
--preview-window='up:80%' \
--query '.' \
--print-query \
--header $'CTRL-O: jq output\nCTRL-Y: copy output\nALT-Y: copy query' \
--preview "jq --color-output -r {q} $input" \
--bind "ctrl-o:execute(jq -r {q} $input)+clear-query+accept" \
--bind "alt-y:execute(echo {q} | pbcopy)" \
--bind "ctrl-y:execute(jq -r {q} $input | pbcopy)"

View File

@ -1,4 +1,4 @@
set vimfile (fzf) set vimfile (fzf)
and set vimfile (echo $vimfile | tr -d '\r') and set vimfile (echo $vimfile | tr -d '\r')
and commandline -r "vim \"$vimfile\"" and commandline -r "vim $vimfile"
and commandline -f execute and commandline -f execute

View File

@ -41,16 +41,5 @@
FZF_CTRL_T_COMMAND = fzfCommand; FZF_CTRL_T_COMMAND = fzfCommand;
FZF_DEFAULT_OPTS = "-m --height 50% --border"; FZF_DEFAULT_OPTS = "-m --height 50% --border";
}; };
home.packages = [
(pkgs.writeShellApplication {
name = "jqr";
runtimeInputs = [
pkgs.jq
pkgs.fzf
];
text = builtins.readFile ./bash/scripts/jqr.sh;
})
];
}; };
} }

View File

@ -6,8 +6,6 @@
}: }:
{ {
unfreePackages = [ "gh-copilot" ];
home-manager.users.${config.user} = { home-manager.users.${config.user} = {
programs.gh = lib.mkIf config.home-manager.users.${config.user}.programs.git.enable { programs.gh = lib.mkIf config.home-manager.users.${config.user}.programs.git.enable {
@ -17,7 +15,6 @@
extensions = [ extensions = [
pkgs.gh-collaborators pkgs.gh-collaborators
pkgs.gh-dash pkgs.gh-dash
pkgs.gh-copilot
]; ];
}; };
@ -57,7 +54,7 @@
esac esac
selected=$(gh repo list "$organization" \ selected=$(gh repo list "$organization" \
--limit 1000 \ --limit 100 \
--no-archived \ --no-archived \
--json=name,description,isPrivate,updatedAt,primaryLanguage \ --json=name,description,isPrivate,updatedAt,primaryLanguage \
| jq -r '.[] | .name + "," + if .description == "" then "-" else .description |= gsub(","; " ") | .description end + "," + .updatedAt + "," + .primaryLanguage.name' \ | jq -r '.[] | .name + "," + if .description == "" then "-" else .description |= gsub(","; " ") | .description end + "," + .updatedAt + "," + .primaryLanguage.name' \

View File

@ -16,15 +16,9 @@
nps = "nix repl --expr 'import <nixpkgs>{}'"; nps = "nix repl --expr 'import <nixpkgs>{}'";
nixo = "man configuration.nix"; nixo = "man configuration.nix";
nixh = "man home-configuration.nix"; nixh = "man home-configuration.nix";
nr = { nr = "rebuild-nixos";
function = "rebuild-nixos"; nro = "rebuild-nixos offline";
}; hm = "rebuild-home";
nro = {
function = "rebuild-nixos-offline";
};
hm = {
function = "rebuild-home";
};
}; };
functions = { functions = {
nix-shell-run = { nix-shell-run = {
@ -48,20 +42,19 @@
}; };
rebuild-nixos = { rebuild-nixos = {
body = '' body = ''
if test "$argv[1]" = "offline"
set option "--option substitute false"
end
git -C ${config.dotfilesPath} add --intent-to-add --all git -C ${config.dotfilesPath} add --intent-to-add --all
echo "doas nixos-rebuild switch --flake ${config.dotfilesPath}#${config.networking.hostName}" commandline -r "doas nixos-rebuild switch $option --flake ${config.dotfilesPath}#${config.networking.hostName}"
''; commandline --function execute
};
rebuild-nixos-offline = {
body = ''
git -C ${config.dotfilesPath} add --intent-to-add --all
echo "doas nixos-rebuild switch --option substitute false --flake ${config.dotfilesPath}#${config.networking.hostName}"
''; '';
}; };
rebuild-home = { rebuild-home = {
body = '' body = ''
git -C ${config.dotfilesPath} add --intent-to-add --all git -C ${config.dotfilesPath} add --intent-to-add --all
echo "${pkgs.home-manager}/bin/home-manager switch --flake ${config.dotfilesPath}#${config.networking.hostName}"; commandline -r "${pkgs.home-manager}/bin/home-manager switch --flake ${config.dotfilesPath}#${config.networking.hostName}";
commandline --function execute
''; '';
}; };
}; };
@ -98,6 +91,12 @@
# Set channel to flake packages, used for nix-shell commands # Set channel to flake packages, used for nix-shell commands
nixPath = [ "nixpkgs=${pkgs.path}" ]; nixPath = [ "nixpkgs=${pkgs.path}" ];
# Set registry to this flake's packages, used for nix X commands
registry.nixpkgs.to = {
type = "path";
path = builtins.toString pkgs.path;
};
# For security, only allow specific users # For security, only allow specific users
settings.allowed-users = [ settings.allowed-users = [
"@wheel" "@wheel"

View File

@ -31,14 +31,12 @@ in
jo # JSON output jo # JSON output
jq # JSON manipulation jq # JSON manipulation
lf # File viewer lf # File viewer
osc # Clipboard over SSH
qrencode # Generate qr codes qrencode # Generate qr codes
rsync # Copy folders rsync # Copy folders
# ren # Rename files ren # Rename files
# rep # Replace text in files # rep # Replace text in files
ripgrep # grep ripgrep # grep
sd # sed sd # sed
spacer # Output lines in terminal
tealdeer # Cheatsheets tealdeer # Cheatsheets
tree # View directory hierarchy tree # View directory hierarchy
vimv-rs # Batch rename files vimv-rs # Batch rename files

View File

@ -48,19 +48,11 @@
fi fi
${ldap_script}/bin/ldap "$@" | jq '[ .[].member] | add' ${ldap_script}/bin/ldap "$@" | jq '[ .[].member] | add'
''; '';
ldapl_script = pkgs.writeShellScriptBin "ldapl" ''
if ! [ "$LDAP_HOST" ]; then
echo "No LDAP_HOST specified!"
exit 1
fi
${ldap_script}/bin/ldap "*$@*" | jq -r '.[].name'
'';
in in
[ [
ldap_script ldap_script
ldapm_script ldapm_script
ldapg_script ldapg_script
ldapl_script
jq_parse jq_parse
]; ];
}; };

View File

@ -8,14 +8,14 @@
home-manager.users.${config.user} = lib.mkIf pkgs.stdenv.isDarwin { home-manager.users.${config.user} = lib.mkIf pkgs.stdenv.isDarwin {
home.packages = with pkgs; [ nerd-fonts.victor-mono ]; home.packages = with pkgs; [ (nerdfonts.override { fonts = [ "VictorMono" ]; }) ];
programs.alacritty.settings = { programs.alacritty.settings = {
font.normal.family = "VictorMono"; font.normal.family = "VictorMono";
}; };
programs.kitty.font = { programs.kitty.font = {
package = pkgs.nerd-fonts.victor-mono; package = (pkgs.nerdfonts.override { fonts = [ "VictorMono" ]; });
name = "VictorMono Nerd Font Mono"; name = "VictorMono Nerd Font Mono";
}; };
}; };

View File

@ -20,10 +20,7 @@
''; '';
# Add homebrew paths to CLI path # Add homebrew paths to CLI path
home-manager.users.${config.user}.home.sessionPath = [ home-manager.users.${config.user}.home.sessionPath = [ "/opt/homebrew/bin/" ];
"/opt/homebrew/bin/"
"/opt/homebrew/opt/trash/bin/"
];
homebrew = { homebrew = {
enable = true; enable = true;
@ -49,7 +46,7 @@
"scroll-reverser" # Different scroll style for mouse vs. trackpad "scroll-reverser" # Different scroll style for mouse vs. trackpad
"notunes" # Don't launch Apple Music with the play button "notunes" # Don't launch Apple Music with the play button
"steam" # Not packaged for Nixon macOS "steam" # Not packaged for Nixon macOS
"epic-games" # Not packaged for Nix # "epic-games" # Not packaged for Nix
]; ];
}; };
}; };

View File

@ -6,12 +6,11 @@
}: }:
{ {
# config = lib.mkIf pkgs.stdenv.isDarwin { config = lib.mkIf pkgs.stdenv.isDarwin {
# networking = { networking = {
# computerName = config.networking.hostName; computerName = config.networking.hostName;
# # Adjust if necessary # Adjust if necessary
# # hostName = ""; # hostName = "";
# }; };
# }; };
# }
} }

View File

@ -10,30 +10,25 @@
programs.fish = { programs.fish = {
shellAbbrs = { shellAbbrs = {
nr = { nr = lib.mkForce "rebuild-darwin";
function = lib.mkForce "rebuild-darwin"; nro = lib.mkForce "rebuild-darwin offline";
};
nro = {
function = lib.mkForce "rebuild-darwin-offline";
};
}; };
functions = { functions = {
rebuild-darwin = { rebuild-darwin = {
body = '' body = ''
if test "$argv[1]" = "offline"
set option "--option substitute false"
end
git -C ${config.dotfilesPath} add --intent-to-add --all git -C ${config.dotfilesPath} add --intent-to-add --all
echo "darwin-rebuild switch --flake ${config.dotfilesPath}#lookingglass" commandline -r "darwin-rebuild switch $option --flake ${config.dotfilesPath}#lookingglass"
''; commandline --function execute
};
rebuild-darwin-offline = {
body = ''
git -C ${config.dotfilesPath} add --intent-to-add --all
echo "darwin-rebuild switch --option substitute false --flake ${config.dotfilesPath}#lookingglass"
''; '';
}; };
rebuild-home = lib.mkForce { rebuild-home = lib.mkForce {
body = '' body = ''
git -C ${config.dotfilesPath} add --intent-to-add --all git -C ${config.dotfilesPath} add --intent-to-add --all
echo "${pkgs.home-manager}/bin/home-manager switch --flake ${config.dotfilesPath}#lookingglass"; commandline -r "${pkgs.home-manager}/bin/home-manager switch --flake ${config.dotfilesPath}#lookingglass";
commandline --function execute
''; '';
}; };
}; };

View File

@ -6,19 +6,6 @@
}: }:
{ {
options = {
terminal = lib.mkOption {
type = lib.types.nullOr lib.types.str;
description = "Path to executable for terminal emulator program.";
default = null;
};
terminalLaunchCommand = lib.mkOption {
type = lib.types.nullOr lib.types.str;
description = "Command for using the terminal to launch a new window with a program.";
default = null;
};
};
config = lib.mkIf pkgs.stdenv.isDarwin { config = lib.mkIf pkgs.stdenv.isDarwin {
services.nix-daemon.enable = true; services.nix-daemon.enable = true;
@ -148,9 +135,6 @@
# Where to save screenshots # Where to save screenshots
screencapture.location = "~/Downloads"; screencapture.location = "~/Downloads";
# Show seconds on the clock
menuExtraClock.ShowSeconds = true;
CustomUserPreferences = { CustomUserPreferences = {
# Disable disk image verification # Disable disk image verification
"com.apple.frameworks.diskimages" = { "com.apple.frameworks.diskimages" = {

View File

@ -11,12 +11,11 @@
users.users."${config.user}" = { users.users."${config.user}" = {
# macOS user # macOS user
home = config.homePath; home = config.homePath;
uid = 502;
# shell = pkgs.fish; # Default shell # shell = pkgs.fish; # Default shell
}; };
# This might fix the shell issues # This might fix the shell issues
users.knownUsers = [ config.user ]; # users.knownUsers = [ config.user ];
home-manager.users.${config.user} = { home-manager.users.${config.user} = {

View File

@ -10,7 +10,7 @@
unfreePackages = [ unfreePackages = [
"consul" "consul"
"vault-bin" "vault-bin"
# "teams" "teams"
]; ];
home-manager.users.${config.user} = lib.mkIf pkgs.stdenv.isDarwin { home-manager.users.${config.user} = lib.mkIf pkgs.stdenv.isDarwin {
@ -32,9 +32,8 @@
pkgs.consul pkgs.consul
pkgs.noti # Create notifications programmatically pkgs.noti # Create notifications programmatically
pkgs.ipcalc # Make IP network calculations pkgs.ipcalc # Make IP network calculations
# pkgs.teams pkgs.teams
pkgs.cloudflared # Allow connecting to Cloudflare tunnels pkgs.cloudflared # Allow connecting to Cloudflare tunnels
pkgs.monitorcontrol # Allows adjusting external displays
(pkgs.writeShellApplication { (pkgs.writeShellApplication {
name = "ocr"; name = "ocr";
runtimeInputs = [ pkgs.tesseract ]; runtimeInputs = [ pkgs.tesseract ];

View File

@ -46,16 +46,6 @@
type = lib.types.str; type = lib.types.str;
description = "Command to use for power options menu"; description = "Command to use for power options menu";
}; };
terminal = lib.mkOption {
type = lib.types.nullOr lib.types.str;
description = "Path to executable for terminal emulator program.";
default = null;
};
terminalLaunchCommand = lib.mkOption {
type = lib.types.nullOr lib.types.str;
description = "Command for using the terminal to launch a new window with a program.";
default = null;
};
wallpaper = lib.mkOption { wallpaper = lib.mkOption {
type = lib.types.path; type = lib.types.path;
description = "Wallpaper background image file"; description = "Wallpaper background image file";

View File

@ -14,7 +14,7 @@ in
fonts.packages = with pkgs; [ fonts.packages = with pkgs; [
victor-mono # Used for Vim and Terminal victor-mono # Used for Vim and Terminal
nerd-fonts.hack # For Polybar, Rofi (nerdfonts.override { fonts = [ "Hack" ]; }) # For Polybar, Rofi
]; ];
fonts.fontconfig.defaultFonts.monospace = [ fontName ]; fonts.fontconfig.defaultFonts.monospace = [ fontName ];

View File

@ -29,7 +29,6 @@ in
cycle = true; cycle = true;
location = "center"; location = "center";
pass = { }; pass = { };
terminal = lib.mkIf pkgs.stdenv.isLinux config.terminal;
plugins = [ plugins = [
pkgs.rofi-calc pkgs.rofi-calc
pkgs.rofi-emoji pkgs.rofi-emoji

View File

@ -37,16 +37,16 @@
# Set up screen position and rotation # Set up screen position and rotation
setupCommands = '' setupCommands = ''
${pkgs.xorg.xrandr}/bin/xrandr --output DisplayPort-1 \ ${pkgs.xorg.xrandr}/bin/xrandr --output DisplayPort-1 \
--primary \ --mode 1920x1200 \
--rotate normal \ --pos 1920x0 \
--mode 2560x1440 \
--rate 165 \
--output DisplayPort-2 \
--right-of DisplayPort-1 \
--rotate left \ --rotate left \
--output HDMI-A-0 \
--primary \
--mode 1920x1080 \
--pos 0x560 \
--rotate normal \
--output DVI-0 --off \ --output DVI-0 --off \
--output DVI-1 --off \ --output DVI-1 --off \
|| echo "xrandr failed"
''; '';
}; };
}; };

View File

@ -8,10 +8,6 @@
config = lib.mkIf (config.physical && !config.server) { config = lib.mkIf (config.physical && !config.server) {
# Use power button to sleep instead of poweroff
services.logind.powerKey = "suspend";
services.logind.powerKeyLongPress = "poweroff";
# Prevent wake from keyboard # Prevent wake from keyboard
powerManagement.powerDownCommands = '' powerManagement.powerDownCommands = ''
set +e set +e

View File

@ -1,74 +0,0 @@
{ config, lib, ... }:
{
options = {
services.actualbudget = {
enable = lib.mkEnableOption "ActualBudget budgeting service";
port = lib.mkOption {
type = lib.types.port;
description = "Port to use for the localhost";
default = 5006;
};
};
};
config = lib.mkIf config.services.actualbudget.enable {
virtualisation.podman.enable = lib.mkDefault true;
users.users.actualbudget = {
isSystemUser = true;
group = "shared";
uid = 980;
};
# Create budget directory, allowing others to manage it
systemd.tmpfiles.rules = [
"d /var/lib/actualbudget 0770 actualbudget shared"
];
virtualisation.oci-containers.containers.actualbudget = {
workdir = null;
volumes = [ "/var/lib/actualbudget:/data" ];
user = "${toString (builtins.toString config.users.users.actualbudget.uid)}";
pull = "missing";
privileged = false;
ports = [ "127.0.0.1:${builtins.toString config.services.actualbudget.port}:5006" ];
networks = [ ];
log-driver = "journald";
labels = {
app = "actualbudget";
};
image = "ghcr.io/actualbudget/actual-server:25.1.0";
hostname = null;
environmentFiles = [ ];
environment = {
DEBUG = "actual:config"; # Enable debug logging
ACTUAL_TRUSTED_PROXIES = builtins.concatStringsSep "," [ "127.0.0.1" ];
};
dependsOn = [ ];
autoStart = true;
};
# Allow web traffic to Caddy
caddy.routes = [
{
match = [ { host = [ config.hostnames.budget ]; } ];
handle = [
{
handler = "reverse_proxy";
upstreams = [ { dial = "localhost:${builtins.toString config.services.actualbudget.port}"; } ];
}
];
}
];
# Configure Cloudflare DNS to point to this machine
services.cloudflare-dyndns.domains = [ config.hostnames.budget ];
# Backups
services.restic.backups.default.paths = [ "/var/lib/actualbudget" ];
};
}

View File

@ -44,44 +44,41 @@ in
config = lib.mkIf config.arrs.enable { config = lib.mkIf config.arrs.enable {
# Broken on 2024-12-07
# https://discourse.nixos.org/t/solved-sonarr-is-broken-in-24-11-unstable-aka-how-the-hell-do-i-use-nixpkgs-config-permittedinsecurepackages/
insecurePackages = [
"aspnetcore-runtime-wrapped-6.0.36"
"aspnetcore-runtime-6.0.36"
"dotnet-sdk-wrapped-6.0.428"
"dotnet-sdk-6.0.428"
];
services = { services = {
bazarr = { bazarr = {
enable = true; enable = true;
group = "shared"; group = "media";
}; };
jellyseerr.enable = true; jellyseerr.enable = true;
prowlarr.enable = true; prowlarr.enable = true;
sabnzbd = { sabnzbd = {
enable = true; enable = true;
group = "shared"; group = "media";
# The config file must be editable within the application # The config file must be editable within the application
# It contains server configs and credentials # It contains server configs and credentials
configFile = "/data/downloads/sabnzbd/sabnzbd.ini"; configFile = "/data/downloads/sabnzbd/sabnzbd.ini";
}; };
sonarr = { sonarr = {
enable = true; enable = true;
group = "shared"; group = "media";
}; };
radarr = { radarr = {
enable = true; enable = true;
group = "shared"; group = "media";
}; };
readarr = { readarr = {
enable = true; enable = true;
group = "shared"; group = "media";
}; };
}; };
# Allows shared group to read/write the sabnzbd directory # Create a media group to be shared between services
users.groups.media = { };
# Give the human user access to the media group
users.users.${config.user}.extraGroups = [ "media" ];
# Allows media group to read/write the sabnzbd directory
users.users.sabnzbd.homeMode = "0770"; users.users.sabnzbd.homeMode = "0770";
unfreePackages = [ "unrar" ]; # Required as a dependency for sabnzbd unfreePackages = [ "unrar" ]; # Required as a dependency for sabnzbd

View File

@ -4,7 +4,6 @@
config = lib.mkIf config.services.audiobookshelf.enable { config = lib.mkIf config.services.audiobookshelf.enable {
services.audiobookshelf = { services.audiobookshelf = {
group = "shared";
dataDir = "audiobookshelf"; dataDir = "audiobookshelf";
}; };
@ -24,6 +23,15 @@
# Configure Cloudflare DNS to point to this machine # Configure Cloudflare DNS to point to this machine
services.cloudflare-dyndns.domains = [ config.hostnames.audiobooks ]; services.cloudflare-dyndns.domains = [ config.hostnames.audiobooks ];
# Grant user access to Audiobookshelf directories
users.users.${config.user}.extraGroups = [ config.services.audiobookshelf.group ];
# Grant audiobookshelf access to media and Calibre directories
users.users.${config.services.audiobookshelf.user}.extraGroups = [
"media"
"calibre-web"
];
}; };
} }

View File

@ -22,11 +22,6 @@
description = "S3 access key ID for backups"; description = "S3 access key ID for backups";
default = null; default = null;
}; };
resticBucket = lib.mkOption {
type = lib.types.nullOr lib.types.str;
description = "S3 bucket for restic backups";
default = null;
};
}; };
}; };
@ -51,7 +46,7 @@
# Broken on 2024-08-23 # Broken on 2024-08-23
# https://github.com/NixOS/nixpkgs/commit/0875d0ce1c778f344cd2377a5337a45385d6ffa0 # https://github.com/NixOS/nixpkgs/commit/0875d0ce1c778f344cd2377a5337a45385d6ffa0
insecurePackages = [ "litestream-0.3.13" ]; nixpkgs.config.permittedInsecurePackages = [ "litestream-0.3.13" ];
# Wait for secret to exist # Wait for secret to exist
systemd.services.litestream = { systemd.services.litestream = {
@ -74,30 +69,5 @@
# timerConfig = { OnCalendar = "00:05:00"; }; # timerConfig = { OnCalendar = "00:05:00"; };
# environmentFile = backup.s3File; # environmentFile = backup.s3File;
# }; # };
secrets.s3-glacier = {
source = ../../../private/s3-glacier.age;
dest = "${config.secretsDirectory}/s3-glacier";
};
secrets.restic = {
source = ../../../private/restic.age;
dest = "${config.secretsDirectory}/restic";
};
services.restic.backups = lib.mkIf (config.backup.s3.resticBucket != null) {
default = {
repository = "s3:s3.us-east-1.amazonaws.com/${config.backup.s3.resticBucket}/restic";
paths = [ ];
environmentFile = config.secrets.s3-glacier.dest;
passwordFile = config.secrets.restic.dest;
pruneOpts = [
"--keep-daily 14"
"--keep-weekly 6"
"--keep-monthly 12"
"--keep-yearly 100"
];
};
};
}; };
} }

View File

@ -20,7 +20,6 @@ let
config.hostnames.content config.hostnames.content
config.hostnames.books config.hostnames.books
config.hostnames.download config.hostnames.download
config.hostnames.photos
]; ];
mkRecord = service: "${service} A ${localIp}"; mkRecord = service: "${service} A ${localIp}";
localRecords = lib.concatLines (map mkRecord localServices); localRecords = lib.concatLines (map mkRecord localServices);

View File

@ -28,7 +28,6 @@ in
config = lib.mkIf config.services.calibre-web.enable { config = lib.mkIf config.services.calibre-web.enable {
services.calibre-web = { services.calibre-web = {
group = "shared";
openFirewall = true; openFirewall = true;
options = { options = {
reverseProxyAuth.enable = false; reverseProxyAuth.enable = false;

View File

@ -5,7 +5,6 @@
{ {
imports = [ imports = [
./actualbudget.nix
./audiobookshelf.nix ./audiobookshelf.nix
./arr.nix ./arr.nix
./backups.nix ./backups.nix
@ -16,7 +15,6 @@
./cloudflare.nix ./cloudflare.nix
./filebrowser.nix ./filebrowser.nix
./identity.nix ./identity.nix
./immich.nix
./irc.nix ./irc.nix
./gitea-runner.nix ./gitea-runner.nix
./gitea.nix ./gitea.nix

View File

@ -5,6 +5,12 @@
... ...
}: }:
let let
user =
if config.services.nextcloud.enable then
config.services.phpfpm.pools.nextcloud.user
else
"filebrowser";
dataDir = "/var/lib/filebrowser"; dataDir = "/var/lib/filebrowser";
settings = { settings = {
@ -37,15 +43,15 @@ in
startLimitBurst = 10; startLimitBurst = 10;
serviceConfig = { serviceConfig = {
ExecStart = "${pkgs.filebrowser}/bin/filebrowser"; ExecStart = "${pkgs.filebrowser}/bin/filebrowser";
DynamicUser = true; DynamicUser = !config.services.nextcloud.enable; # Unique user if not using Nextcloud
Group = "shared"; User = user;
Group = user;
ReadWritePaths = [ dataDir ]; ReadWritePaths = [ dataDir ];
StateDirectory = [ "filebrowser" ]; StateDirectory = [ "filebrowser" ];
Restart = "on-failure"; Restart = "on-failure";
RestartPreventExitStatus = 1; RestartPreventExitStatus = 1;
RestartSec = "5s"; RestartSec = "5s";
}; };
path = [ pkgs.getent ]; # Fix: getent not found in $PATH
}; };
caddy.routes = [ caddy.routes = [

View File

@ -1,48 +0,0 @@
{ config, lib, ... }:
{
config = lib.mkIf config.services.immich.enable {
services.immich = {
port = 2283;
group = "shared";
database.enable = true;
redis.enable = true;
machine-learning.enable = true;
machine-learning.environment = { };
mediaLocation = "/data/images";
secretsFile = null;
settings.server.externalDomain = "https://${config.hostnames.photos}";
environment = {
IMMICH_ENV = "production";
IMMICH_LOG_LEVEL = "log";
NO_COLOR = "false";
IMMICH_TRUSTED_PROXIES = "127.0.0.1";
};
};
caddy.routes = [
{
match = [ { host = [ config.hostnames.photos ]; } ];
handle = [
{
handler = "reverse_proxy";
upstreams = [ { dial = "localhost:${builtins.toString config.services.immich.port}"; } ];
}
];
}
];
# Configure Cloudflare DNS to point to this machine
services.cloudflare-dyndns.domains = [ config.hostnames.photos ];
# Point localhost to the local domain
networking.hosts."127.0.0.1" = [ config.hostnames.photos ];
# Backups
services.restic.backups.default.paths = [ "/data/images" ];
};
}

View File

@ -11,7 +11,7 @@
config = lib.mkIf config.services.jellyfin.enable { config = lib.mkIf config.services.jellyfin.enable {
services.jellyfin.group = "shared"; services.jellyfin.group = "media";
users.users.jellyfin = { users.users.jellyfin = {
isSystemUser = true; isSystemUser = true;
}; };
@ -49,8 +49,8 @@
# Create videos directory, allow anyone in Jellyfin group to manage it # Create videos directory, allow anyone in Jellyfin group to manage it
systemd.tmpfiles.rules = [ systemd.tmpfiles.rules = [
"d /var/lib/jellyfin 0775 jellyfin shared" "d /var/lib/jellyfin 0775 jellyfin media"
"d /var/lib/jellyfin/library 0775 jellyfin shared" "d /var/lib/jellyfin/library 0775 jellyfin media"
]; ];
# Enable VA-API for hardware transcoding # Enable VA-API for hardware transcoding

View File

@ -57,9 +57,5 @@
systemd.services.paperless-web.serviceConfig.UMask = lib.mkForce "0026"; systemd.services.paperless-web.serviceConfig.UMask = lib.mkForce "0026";
systemd.services.paperless-scheduler.serviceConfig.UMask = lib.mkForce "0026"; systemd.services.paperless-scheduler.serviceConfig.UMask = lib.mkForce "0026";
systemd.services.paperless-task-queue.serviceConfig.UMask = lib.mkForce "0026"; systemd.services.paperless-task-queue.serviceConfig.UMask = lib.mkForce "0026";
# Backups
services.restic.backups.default.paths = [ "/data/generic/paperless/documents" ];
}; };
} }

View File

@ -91,6 +91,8 @@ in
services.vmagent = { services.vmagent = {
package = pkgs-stable.vmagent; package = pkgs-stable.vmagent;
prometheusConfig = prometheusConfig; prometheusConfig = prometheusConfig;
# https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5567
extraArgs = [ "-promscrape.maxScrapeSize 450000000" ];
remoteWrite = { remoteWrite = {
url = "https://${config.hostnames.prometheus}/api/v1/write"; url = "https://${config.hostnames.prometheus}/api/v1/write";
basicAuthUsername = username; basicAuthUsername = username;

View File

@ -10,7 +10,6 @@
./auto-upgrade.nix ./auto-upgrade.nix
./doas.nix ./doas.nix
./journald.nix ./journald.nix
./shared.nix
./user.nix ./user.nix
./timezone.nix ./timezone.nix
]; ];

View File

@ -1,14 +0,0 @@
{ config, lib, ... }:
{
config = lib.mkIf config.server {
# Create a shared group for many services
users.groups.shared = { };
# Give the human user access to the shared group
users.users.${config.user}.extraGroups = [ config.users.groups.shared.name ];
};
}

View File

@ -8,14 +8,22 @@
config = lib.mkIf pkgs.stdenv.isLinux { config = lib.mkIf pkgs.stdenv.isLinux {
services.tzupdate.enable = true;
# Service to determine location for time zone # Service to determine location for time zone
# This is required for redshift which depends on the location provider
services.geoclue2.enable = true; services.geoclue2.enable = true;
services.geoclue2.enableWifi = false; # Breaks when it can't connect services.geoclue2.enableWifi = false; # Breaks when it can't connect
location = { location = {
provider = "geoclue2"; provider = "geoclue2";
}; };
# Enable local time based on time zone
services.localtimed.enable = true;
# Required to get localtimed to talk to geoclue2
services.geoclue2.appConfig.localtimed.isSystem = true;
services.geoclue2.appConfig.localtimed.isAllowed = true;
# Fix "Failed to set timezone"
# https://github.com/NixOS/nixpkgs/issues/68489#issuecomment-1484030107
services.geoclue2.enableDemoAgent = lib.mkForce true;
}; };
} }

3
overlays/disko.nix Normal file
View File

@ -0,0 +1,3 @@
# Add disko to nixpkgs from its input flake
inputs: _final: prev: { disko = inputs.disko.packages.${prev.system}.disko; }

View File

@ -2,10 +2,11 @@ inputs: _final: prev: {
gh-collaborators = prev.buildGoModule rec { gh-collaborators = prev.buildGoModule rec {
pname = "gh-collaborators"; pname = "gh-collaborators";
version = "v3.0.0"; version = "v2.0.3";
src = inputs.gh-collaborators; src = inputs.gh-collaborators;
vendorHash = "sha256-9qmvG2q9t1Zj8yhKFyA99IaJ90R/gRVdQVjdliVKLRE"; # vendorHash = "sha256-rsRDOgJBa8T6+bC/APcmuRmg6ykbIp9pwRnJ9rrfHEs=";
vendorHash = "sha256-fykxRb2U9DDsXorRTLiVWmhMY89N7RS07sal8ww6gz4=";
ldflags = [ ldflags = [
"-s" "-s"

View File

@ -1,15 +0,0 @@
inputs: _final: prev: {
osc = prev.buildGoModule {
pname = "osc";
version = "v0.4.6";
src = inputs.osc;
vendorHash = "sha256-POtQWIjPObsfa3YZ1dLZgedZFUcc4HeTWjU20AucoKc=";
ldflags = [
"-s"
"-w"
];
};
}

View File

@ -1,44 +0,0 @@
# Fix: Volnoti error: 'volnoti' has been removed due to lack of maintenance upstream.
_final: prev: {
volnoti = prev.stdenv.mkDerivation {
pname = "volnoti-unstable";
version = "2013-09-23";
src = prev.fetchFromGitHub {
owner = "davidbrazdil";
repo = "volnoti";
rev = "4af7c8e54ecc499097121909f02ecb42a8a60d24";
sha256 = "155lb7w563dkdkdn4752hl0zjhgnq3j4cvs9z98nb25k1xpmpki7";
};
patches = [
# Fix dbus interface headers. See
# https://github.com/davidbrazdil/volnoti/pull/10
(prev.fetchpatch {
url = "https://github.com/davidbrazdil/volnoti/commit/623ad8ea5c3ac8720d00a2ced4b6163aae38c119.patch";
sha256 = "046zfdjmvhb7jrsgh04vfgi35sgy1zkrhd3bzdby3nvds1wslfam";
})
];
nativeBuildInputs = with prev; [
pkg-config
autoreconfHook
wrapGAppsHook3
];
buildInputs = with prev; [
dbus
gdk-pixbuf
glib
xorg.libX11
gtk2
dbus-glib
librsvg
];
meta = with prev.lib; {
description = "Lightweight volume notification for Linux";
homepage = "https://github.com/davidbrazdil/volnoti";
license = licenses.gpl3;
platforms = platforms.linux;
maintainers = [ ];
# Broken by https://github.com/nix-community/home-manager/pull/5725/commits/98bf8de65dc1ed12c6443b18f6f24d36e9c438d6
mainProgram = "volnoti";
};
};
}

View File

@ -1,17 +0,0 @@
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IE1nSGFPdyAvWi9T
NnFzUnlKUGord21NUy9OT1NDRjhIbFB6MUc3TzgwVzY3OHpFSlN3CmhuNFY1L1FB
VFBHY1lNNjFYdFZyeHoxZUZyTFdpVHhqM1JqMUM3YWljVUUKLT4gc3NoLWVkMjU1
MTkgWXlTVU1RIFI4aGU5Z2NUeGNSNmEzNFk0anBBbUw0NUtHTE55WmgxOUN0T1p1
QUZyR2cKeTNack0vMVVsNTFMbmFSUXdUUkw2MTlnSzhRajVSWXJvZmV2QjlFcUZY
QQotPiBzc2gtZWQyNTUxOSBuanZYNUEgc01kWFdYS3BBay96Uzd5cG1MMlNMNXhQ
NTV4NVpvc2lLZkpLWkhZZlRrVQo0SXJhWUVMVUtYb1hEOEtJUnJoY2t0OUlpQVY2
UUZYdHpBcWRvUU0yRHlvCi0+IHNzaC1lZDI1NTE5IENxSU9VQSB2NTZHWUd2c3o1
c0NKTThaMkgyeG54Nmw1dHZBQkZoYmJkOTZNcnVyMUJVCldzQ1NHNk8vTGRMNHlM
eU0yYmltMkhlUjY2NWxhdHQ2N3BMUjdzTk9PMFkKLT4gc3NoLWVkMjU1MTkgejFP
Y1p3IHh3OEEzTmIrQXhtSTE2REFUV1loVE5vNTRUbEJmNEE4YmhBckRmZGpwVXMK
OEo5RXdwU1JuY3FPQnJNQ1hMdHJxcE4xVnVVWVVLREROYjNsZkN3ZzV2cwotLS0g
aXMrandHZTJzME95VFRuUDRzWDQ5Z3N5RGxVOUUxQ1FGNGpvN3Y4SllSNApAOIi/
0iP9cccbkUqLZJicpIlKAP+QsYM8Bfb/wYyaQPnh4vlKqil4LpQEfFW+/J82DIti
8o/ddK8YDlLg3lwyiZ2dUm3O87jA7KEgd/g=
-----END AGE ENCRYPTED FILE-----

View File

@ -1,18 +0,0 @@
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IE1nSGFPdyBuQTZM
TTg0ai9yNi9Ia3pFNW0vb3JQczZtVEVyNkFNVzBlUVpVd3ZBbndrCklqdS8zeGky
WEN0YW5xck5sSXpXeFZCbHY0NHhDMU5SeGlaYmN4Szc0b1EKLT4gc3NoLWVkMjU1
MTkgWXlTVU1RIGJVZTZBdERTNUt6d0sxeGVOcnRtNmdCSlRKWUNjRHByMkZucUlz
Nm5FMTQKbHFtNnM4ZCtzdFNTa214ZVRkaFdmZnFYOCs1Z25YTDVVKzloYUVHVlg1
cwotPiBzc2gtZWQyNTUxOSBuanZYNUEgOXFwSzByaUdidFRWbE5seFNEVDYxRWtq
OXZURnEzVWphM0VoVnJvSURoUQpGbEt4YmcraDZOcXRTQUF1ekw4RTRCN2JRR1NK
QlRQaGRZd1RIMWNiRWpjCi0+IHNzaC1lZDI1NTE5IENxSU9VQSBzTTVsbnVjWUxt
L0hyM21RS2w2a2NIY2xvSmZ0OUdDWGFVcG5IYlNhUFNzClY1bmdNUkRYR2QyYVFW
VHF3enZqUlZqUWlvZlI2aHZrREdwZGUwdzdXUHMKLT4gc3NoLWVkMjU1MTkgejFP
Y1p3IDN4cThQRjdvTWJ2S2FaMjZ0RHlDeElDc1BuU0JDSzlpcFdzT2ZhLzA1QmcK
TjlFMkgzOFhKbkdvUWt2SGhaUUJXdjBxK2hUeE1sSzBsNWJyNG8rUlZRbwotLS0g
SGw4VmpCMktjQ0ZpUExnWUtsOHhHS0tZckoxeTdtZXMyVXpWT09Ea1NUMAoRRzA+
0rbfJ+eVeccDaulmqh+Wv3T1/+SQQJYD5trume3vSzXgRxJYeXR/BespsDzWJ3yg
McHYNvEK76stD3vopKvpDU3Nk861xp++SavJtrIVKon6YJl6a6Ox+GxhrNk0+5f9
xgDWhIHwzHLPvyseYNjRFy8GsYaP2tT9TGMrQHFTAKeuvA==
-----END AGE ENCRYPTED FILE-----