Compare commits
35 Commits
6b6556cd80
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 36cdaac5ad | |||
| 126671ffc7 | |||
| a1263d8bf1 | |||
| 50b2f38f21 | |||
|
|
c335534278 | ||
|
|
88d5657cf8 | ||
| d2a4e35417 | |||
| 7e58bb7bc2 | |||
| 4d6ba61f52 | |||
| 683e6e4d10 | |||
| dbad023043 | |||
| 355cad6574 | |||
| c9f69530d8 | |||
| 0197e99b8f | |||
| 0bad5c492c | |||
| 1cba6c968a | |||
| 8ae482d846 | |||
| 8c3e762a46 | |||
| 43832361ea | |||
| 166d904735 | |||
| 67d0733bbd | |||
| ae55782bf2 | |||
| e10923f74d | |||
| 6b5ac0c370 | |||
| 0652389078 | |||
| 2913e9578e | |||
| b72c1d5e86 | |||
| 1c844adf91 | |||
| fdbe4366e1 | |||
| a9ffcc12ee | |||
| 9765d93f9f | |||
| 42dbe5ade2 | |||
| bab2c35bff | |||
| ce26b1c206 | |||
| 2d26d6ebd8 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -4,3 +4,5 @@ result
|
|||||||
result-*
|
result-*
|
||||||
|
|
||||||
nixos-efi-vars.fd
|
nixos-efi-vars.fd
|
||||||
|
|
||||||
|
home/hosts/work/packages.local.nix
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ map f5 goto_tab 5
|
|||||||
map f6 goto_tab 6
|
map f6 goto_tab 6
|
||||||
map f7 goto_tab 7
|
map f7 goto_tab 7
|
||||||
map f8 goto_tab 8
|
map f8 goto_tab 8
|
||||||
map kitty_mod+c new_tab
|
# map kitty_mod+c new_tab # FIXME: conflict with 'copy'
|
||||||
map cmd+t
|
map cmd+t
|
||||||
map kitty_mod+q
|
map kitty_mod+q
|
||||||
map cmd+w
|
map cmd+w
|
||||||
|
|||||||
@@ -4,6 +4,9 @@ local keymap = vim.keymap
|
|||||||
local opt = vim.opt
|
local opt = vim.opt
|
||||||
local treesitter_configs = require("nvim-treesitter.configs")
|
local treesitter_configs = require("nvim-treesitter.configs")
|
||||||
|
|
||||||
|
local nixCatsUtils = require("nixCatsUtils")
|
||||||
|
local is_nix = nixCatsUtils.isNixCats
|
||||||
|
|
||||||
treesitter_configs.setup({
|
treesitter_configs.setup({
|
||||||
-- Basically added what I might need from the docs
|
-- Basically added what I might need from the docs
|
||||||
-- <https://github.com/nvim-treesitter/nvim-treesitter?tab=readme-ov-file#supported-languages>
|
-- <https://github.com/nvim-treesitter/nvim-treesitter?tab=readme-ov-file#supported-languages>
|
||||||
@@ -86,7 +89,7 @@ treesitter_configs.setup({
|
|||||||
enable = true,
|
enable = true,
|
||||||
},
|
},
|
||||||
sync_install = false,
|
sync_install = false,
|
||||||
auto_install = true,
|
auto_install = not is_nix,
|
||||||
ignore_install = {},
|
ignore_install = {},
|
||||||
modules = {},
|
modules = {},
|
||||||
textobjects = {
|
textobjects = {
|
||||||
|
|||||||
12
dots/.config/nvim/flake.lock
generated
12
dots/.config/nvim/flake.lock
generated
@@ -2,11 +2,11 @@
|
|||||||
"nodes": {
|
"nodes": {
|
||||||
"nixCats": {
|
"nixCats": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1763330129,
|
"lastModified": 1764009888,
|
||||||
"narHash": "sha256-KbOeWIF52SV53BOeETGO2C5ewaV2Ex9iaXH7G72gOr8=",
|
"narHash": "sha256-hJekfTiW1792txgRSM4LcHnz1lDSY87LYbsJEn2V378=",
|
||||||
"owner": "BirdeeHub",
|
"owner": "BirdeeHub",
|
||||||
"repo": "nixCats-nvim",
|
"repo": "nixCats-nvim",
|
||||||
"rev": "c81551ed87db2aefab30a12cf7425ff94dc0ad64",
|
"rev": "16ac3281f322ea15d39843829e42a44d22da3715",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -17,11 +17,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1763464769,
|
"lastModified": 1764733908,
|
||||||
"narHash": "sha256-AJHrsT7VoeQzErpBRlLJM1SODcaayp0joAoEA35yiwM=",
|
"narHash": "sha256-QJiih52NU+nm7XQWCj+K8SwUdIEayDQ1FQgjkYISt4I=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "6f374686605df381de8541c072038472a5ea2e2d",
|
"rev": "cadcc8de247676e4751c9d4a935acb2c0b059113",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
{
|
{
|
||||||
pkgs ? import <nixpkgs> { },
|
pkgs ? import <nixpkgs> { },
|
||||||
}:
|
}:
|
||||||
pkgs.mkShell {
|
pkgs.mkShell { nativeBuildInputs = with pkgs.buildPackages; [ ]; }
|
||||||
nativeBuildInputs = with pkgs.buildPackages; [ ];
|
|
||||||
}
|
|
||||||
|
|||||||
12
dots/.config/nvim/snips/typescriptreact.lua
Normal file
12
dots/.config/nvim/snips/typescriptreact.lua
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
local ls = require("luasnip")
|
||||||
|
local s = ls.snippet
|
||||||
|
local t = ls.text_node
|
||||||
|
local i = ls.insert_node
|
||||||
|
|
||||||
|
return {
|
||||||
|
s("preJ", {
|
||||||
|
t("<pre>{JSON.stringify("),
|
||||||
|
i(1, "object"), -- first tab stop
|
||||||
|
t(", null, 2)}</pre>"),
|
||||||
|
}),
|
||||||
|
}
|
||||||
@@ -1,9 +1,11 @@
|
|||||||
|
[include]
|
||||||
|
path = ~/.gitconfig.email
|
||||||
|
|
||||||
[core]
|
[core]
|
||||||
editor = nvim
|
editor = nvim
|
||||||
excludesfile = ~/.gitignore
|
excludesfile = ~/.gitignore
|
||||||
|
|
||||||
[user]
|
[user]
|
||||||
email = hektor.misplon@pm.me
|
|
||||||
name = Hektor Misplon
|
name = Hektor Misplon
|
||||||
username = hektor
|
username = hektor
|
||||||
signingKey = AEB98353B8D72E465C4236435151AF79E723F21C
|
signingKey = AEB98353B8D72E465C4236435151AF79E723F21C
|
||||||
@@ -76,8 +78,6 @@
|
|||||||
[merge]
|
[merge]
|
||||||
tool = nvimdiff
|
tool = nvimdiff
|
||||||
conflictstyle = diff3
|
conflictstyle = diff3
|
||||||
[pull]
|
|
||||||
rebase = true
|
|
||||||
[diff]
|
[diff]
|
||||||
colorMoved = zebra
|
colorMoved = zebra
|
||||||
[commit]
|
[commit]
|
||||||
@@ -85,3 +85,11 @@
|
|||||||
|
|
||||||
[interactive]
|
[interactive]
|
||||||
singleKey = true
|
singleKey = true
|
||||||
|
|
||||||
|
[pull]
|
||||||
|
rebase = true
|
||||||
|
[rerere]
|
||||||
|
enabled = true
|
||||||
|
|
||||||
|
[includeIf "gitdir:~/work/"]
|
||||||
|
path = ~/.gitconfig.work
|
||||||
|
|||||||
2
dots/.gitconfig.email.example
Normal file
2
dots/.gitconfig.email.example
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
[user]
|
||||||
|
email = your.email@example.com
|
||||||
13
dots/.gitconfig.work
Normal file
13
dots/.gitconfig.work
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
[include]
|
||||||
|
path = ~/.gitconfig.work.email
|
||||||
|
|
||||||
|
[core]
|
||||||
|
longpaths = true
|
||||||
|
|
||||||
|
[user]
|
||||||
|
name = Hektor Misplon
|
||||||
|
username = hektor.misplon
|
||||||
|
signingKey = 1C88BE828184CEE6
|
||||||
|
|
||||||
|
[commit]
|
||||||
|
gpgsign = false
|
||||||
2
dots/.gitconfig.work.email.example
Normal file
2
dots/.gitconfig.work.email.example
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
[user]
|
||||||
|
email = your.work.email@example.com
|
||||||
45
flake.lock
generated
45
flake.lock
generated
@@ -29,11 +29,11 @@
|
|||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"dir": "pkgs/firefox-addons",
|
"dir": "pkgs/firefox-addons",
|
||||||
"lastModified": 1763885608,
|
"lastModified": 1764561884,
|
||||||
"narHash": "sha256-eFRbKKMaEHC5EaL7sxfPVFPFsr0Plzx03e1VkJkcsBA=",
|
"narHash": "sha256-vQ3iFPPhxsLqV3c5kgmYP53mVD6id6gsP0tN+oTmqok=",
|
||||||
"owner": "rycee",
|
"owner": "rycee",
|
||||||
"repo": "nur-expressions",
|
"repo": "nur-expressions",
|
||||||
"rev": "c94982d5890f4ff0737d57ed97503c1c8d40195c",
|
"rev": "aba4621459aec251d90d6452e3495b58a8a5e185",
|
||||||
"type": "gitlab"
|
"type": "gitlab"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -68,16 +68,15 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1758463745,
|
"lastModified": 1764544324,
|
||||||
"narHash": "sha256-uhzsV0Q0I9j2y/rfweWeGif5AWe0MGrgZ/3TjpDYdGA=",
|
"narHash": "sha256-GVBGjO7UsmzLrlOJV8NlKSxukHaHencrJqWkCA6FkqI=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "3b955f5f0a942f9f60cdc9cacb7844335d0f21c3",
|
"rev": "e4e25a8c310fa45f2a8339c7972dc43d2845a612",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"ref": "release-25.05",
|
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@@ -85,10 +84,10 @@
|
|||||||
"nix-secrets": {
|
"nix-secrets": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1763919406,
|
"lastModified": 1764371082,
|
||||||
"narHash": "sha256-WaGxnH7dm63syPt8E4MXbg4XVxQveXPe+cZu3iPz25w=",
|
"narHash": "sha256-yxFxEKXFuXFyFIDZY1gla2OyuqcIE3uT8KDDgTmm3cE=",
|
||||||
"ref": "main",
|
"ref": "main",
|
||||||
"rev": "4423bf215047474ecb89f4d8ad63a04e734b252a",
|
"rev": "b9c2ce32cc4c95d7ff01372faea2668407ef8d27",
|
||||||
"shallow": true,
|
"shallow": true,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "ssh://git@github.com/hektor/nix-secrets"
|
"url": "ssh://git@github.com/hektor/nix-secrets"
|
||||||
@@ -102,11 +101,11 @@
|
|||||||
},
|
},
|
||||||
"nixCats": {
|
"nixCats": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1763330129,
|
"lastModified": 1764009888,
|
||||||
"narHash": "sha256-KbOeWIF52SV53BOeETGO2C5ewaV2Ex9iaXH7G72gOr8=",
|
"narHash": "sha256-hJekfTiW1792txgRSM4LcHnz1lDSY87LYbsJEn2V378=",
|
||||||
"owner": "BirdeeHub",
|
"owner": "BirdeeHub",
|
||||||
"repo": "nixCats-nvim",
|
"repo": "nixCats-nvim",
|
||||||
"rev": "c81551ed87db2aefab30a12cf7425ff94dc0ad64",
|
"rev": "16ac3281f322ea15d39843829e42a44d22da3715",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -138,11 +137,11 @@
|
|||||||
},
|
},
|
||||||
"nixos-hardware": {
|
"nixos-hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1762847253,
|
"lastModified": 1764440730,
|
||||||
"narHash": "sha256-BWWnUUT01lPwCWUvS0p6Px5UOBFeXJ8jR+ZdLX8IbrU=",
|
"narHash": "sha256-ZlJTNLUKQRANlLDomuRWLBCH5792x+6XUJ4YdFRjtO4=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixos-hardware",
|
"repo": "nixos-hardware",
|
||||||
"rev": "899dc449bc6428b9ee6b3b8f771ca2b0ef945ab9",
|
"rev": "9154f4569b6cdfd3c595851a6ba51bfaa472d9f3",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -154,16 +153,16 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1763622513,
|
"lastModified": 1764517877,
|
||||||
"narHash": "sha256-1jQnuyu82FpiSxowrF/iFK6Toh9BYprfDqfs4BB+19M=",
|
"narHash": "sha256-pp3uT4hHijIC8JUK5MEqeAWmParJrgBVzHLNfJDZxg4=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "c58bc7f5459328e4afac201c5c4feb7c818d604b",
|
"rev": "2d293cbfa5a793b4c50d17c05ef9e385b90edf6c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"ref": "nixos-25.05",
|
"ref": "nixos-unstable",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@@ -324,11 +323,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1763870012,
|
"lastModified": 1764483358,
|
||||||
"narHash": "sha256-AHxFfIu73SpNLAOZbu/AvpLhZ/Szhx6gRPj9ufZtaZA=",
|
"narHash": "sha256-EyyvCzXoHrbL467YSsQBTWWg4sR96MH1sPpKoSOelB4=",
|
||||||
"owner": "Mic92",
|
"owner": "Mic92",
|
||||||
"repo": "sops-nix",
|
"repo": "sops-nix",
|
||||||
"rev": "4e7d74d92398b933cc0e0e25af5b0836efcfdde3",
|
"rev": "5aca6ff67264321d47856a2ed183729271107c9c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
13
flake.nix
13
flake.nix
@@ -1,11 +1,10 @@
|
|||||||
{
|
{
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
url = "github:nixos/nixpkgs?ref=nixos-25.05";
|
url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
};
|
};
|
||||||
nixos-hardware = {
|
nixos-hardware = {
|
||||||
url = "github:NixOS/nixos-hardware/master";
|
url = "github:NixOS/nixos-hardware/master";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
};
|
||||||
disko = {
|
disko = {
|
||||||
url = "github:nix-community/disko/latest";
|
url = "github:nix-community/disko/latest";
|
||||||
@@ -20,7 +19,7 @@
|
|||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager/release-25.05";
|
url = "github:nix-community/home-manager";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
nixgl = {
|
nixgl = {
|
||||||
@@ -61,7 +60,9 @@
|
|||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
nix.nixPath = [ "nixpkgs=${inputs.nixpkgs}" ]; # <https://github.com/nix-community/nixd/blob/main/nixd/docs/configuration.md>
|
nix.nixPath = [
|
||||||
|
"nixpkgs=${inputs.nixpkgs}"
|
||||||
|
]; # <https://github.com/nix-community/nixd/blob/main/nixd/docs/configuration.md>
|
||||||
nixosConfigurations = lib.genAttrs hostDirNames (
|
nixosConfigurations = lib.genAttrs hostDirNames (
|
||||||
host:
|
host:
|
||||||
nixpkgs.lib.nixosSystem {
|
nixpkgs.lib.nixosSystem {
|
||||||
@@ -73,9 +74,7 @@
|
|||||||
work = home-manager.lib.homeManagerConfiguration {
|
work = home-manager.lib.homeManagerConfiguration {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
modules = [ ./home/hosts/work ];
|
modules = [ ./home/hosts/work ];
|
||||||
extraSpecialArgs = {
|
extraSpecialArgs = { inherit inputs; };
|
||||||
inherit inputs;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -10,12 +10,14 @@ let
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../../modules/dconf.nix # TODO: Only enable when on Gnome?
|
../../modules/desktop/niri
|
||||||
../../modules/git.nix
|
../../modules/git.nix
|
||||||
|
../../modules/k9s.nix
|
||||||
(import ../../modules/taskwarrior.nix {
|
(import ../../modules/taskwarrior.nix {
|
||||||
inherit config;
|
inherit config;
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
})
|
})
|
||||||
|
(import ../../modules/keepassxc.nix { inherit pkgs; })
|
||||||
];
|
];
|
||||||
|
|
||||||
home.stateVersion = "25.05";
|
home.stateVersion = "25.05";
|
||||||
@@ -53,7 +55,6 @@ in
|
|||||||
enableBashIntegration = true;
|
enableBashIntegration = true;
|
||||||
};
|
};
|
||||||
home-manager.enable = true;
|
home-manager.enable = true;
|
||||||
keepassxc = import ../../modules/keepassxc.nix;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
home.packages = import ./packages.nix {
|
home.packages = import ./packages.nix {
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ with pkgs;
|
|||||||
nixfmt-rfc-style
|
nixfmt-rfc-style
|
||||||
nmap
|
nmap
|
||||||
nodejs_24
|
nodejs_24
|
||||||
nodePackages.ts-node
|
|
||||||
nvimpager
|
nvimpager
|
||||||
ormolu
|
ormolu
|
||||||
pandoc
|
pandoc
|
||||||
@@ -30,6 +29,7 @@ with pkgs;
|
|||||||
pass
|
pass
|
||||||
pnpm
|
pnpm
|
||||||
ripgrep
|
ripgrep
|
||||||
|
signal-desktop
|
||||||
silver-searcher
|
silver-searcher
|
||||||
sops
|
sops
|
||||||
sshfs
|
sshfs
|
||||||
|
|||||||
@@ -10,38 +10,37 @@ let
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../../modules/dconf.nix # TODO: Only enable when on Gnome?
|
../../modules/dconf.nix
|
||||||
|
../../modules/git.nix
|
||||||
|
../../modules/k9s.nix
|
||||||
|
(import ../../modules/keepassxc.nix { inherit pkgs; })
|
||||||
];
|
];
|
||||||
|
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
home.stateVersion = "25.05";
|
home.stateVersion = "25.05";
|
||||||
home.username = username;
|
home.username = username;
|
||||||
home.homeDirectory = "/home/${username}";
|
home.homeDirectory = "/home/${username}";
|
||||||
|
|
||||||
sops = {
|
targets.genericLinux.nixGL = {
|
||||||
defaultSopsFile = "${builtins.toString inputs.nix-secrets}/secrets.yaml";
|
|
||||||
defaultSopsFormat = "yaml";
|
|
||||||
age.keyFile = "${config.home.homeDirectory}/.config/sops/age/keys.txt";
|
|
||||||
|
|
||||||
secrets."test" = { };
|
|
||||||
};
|
|
||||||
|
|
||||||
nixGL = {
|
|
||||||
packages = inputs.nixgl.packages;
|
packages = inputs.nixgl.packages;
|
||||||
defaultWrapper = "mesa";
|
defaultWrapper = "mesa";
|
||||||
};
|
};
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
anki = import ../../modules/anki.nix;
|
# editorconfig.enable = true;
|
||||||
firefox = import ../../modules/firefox.nix {
|
firefox = import ../../modules/firefox.nix {
|
||||||
inherit inputs;
|
inherit inputs;
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
inherit config;
|
inherit config;
|
||||||
};
|
};
|
||||||
git = import ../../modules/git.nix;
|
gh.enable = true;
|
||||||
keepassxc = import ../../modules/keepassxc.nix;
|
kubecolor.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
home.packages = import ./packages.nix {
|
home.packages = import ./packages.nix {
|
||||||
inherit pkgs;
|
inherit inputs;
|
||||||
inherit config;
|
inherit config;
|
||||||
|
inherit pkgs;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,19 @@
|
|||||||
{ pkgs, config, ... }:
|
{
|
||||||
|
inputs,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
with pkgs;
|
let
|
||||||
[ ]
|
localPackages =
|
||||||
|
if builtins.pathExists ./packages.local.nix then
|
||||||
|
import ./packages.local.nix { inherit inputs config pkgs; }
|
||||||
|
else
|
||||||
|
[ ];
|
||||||
|
in
|
||||||
|
|
||||||
|
(with pkgs; [
|
||||||
|
inputs.nvim.packages.x86_64-linux.nvim
|
||||||
|
])
|
||||||
|
++ localPackages
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
{
|
{
|
||||||
enable = true;
|
enable = true;
|
||||||
|
# sync = {
|
||||||
|
# username = config.sops.secrets."email/personal".path;
|
||||||
|
# };
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,5 +7,107 @@
|
|||||||
"org/gnome/desktop/interface" = {
|
"org/gnome/desktop/interface" = {
|
||||||
color-scheme = "prefer-dark";
|
color-scheme = "prefer-dark";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
"org/gnome/desktop/applications/terminal" = {
|
||||||
|
exec = "kitty";
|
||||||
|
exec-arg = "";
|
||||||
|
};
|
||||||
|
|
||||||
|
"org/gnome/desktop/background" = {
|
||||||
|
color-shading-type = "solid";
|
||||||
|
picture-opacity = 100;
|
||||||
|
picture-options = "zoom";
|
||||||
|
picture-uri = "none";
|
||||||
|
picture-uri-dark = "none";
|
||||||
|
primary-color = "#555555";
|
||||||
|
secondary-color = "#555555";
|
||||||
|
show-desktop-icons = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
# "org/gnome/desktop/input-sources" = {
|
||||||
|
# sources = [
|
||||||
|
# (mkTuple [
|
||||||
|
# "xkb"
|
||||||
|
# "us"
|
||||||
|
# ])
|
||||||
|
# ];
|
||||||
|
# xkb-options = [ "caps:none" ];
|
||||||
|
# };
|
||||||
|
|
||||||
|
"org/gnome/desktop/wm/keybindings" = {
|
||||||
|
close = [ "<Shift><Super>Delete" ];
|
||||||
|
cycle-group = [ ];
|
||||||
|
cycle-group-backward = [ ];
|
||||||
|
cycle-panels = [ ];
|
||||||
|
cycle-panels-backward = [ ];
|
||||||
|
cycle-windows = [ ];
|
||||||
|
cycle-windows-backward = [ ];
|
||||||
|
maximize = [ "<Super> " ];
|
||||||
|
minimize = [ ];
|
||||||
|
move-to-workspace-1 = [ "<Super><Shift>a" ];
|
||||||
|
move-to-workspace-2 = [ "<Super><Shift>s" ];
|
||||||
|
move-to-workspace-3 = [ "<Super><Shift>d" ];
|
||||||
|
move-to-workspace-4 = [ "<Super><Shift>f" ];
|
||||||
|
move-to-workspace-5 = [ "<Super><Shift>g" ];
|
||||||
|
move-to-workspace-last = [ ];
|
||||||
|
move-to-workspace-left = [ "<Super><Shift>h" ];
|
||||||
|
move-to-workspace-right = [ "<Super><Shift>l" ];
|
||||||
|
panel-run-dialog = [ ];
|
||||||
|
switch-applications = [ "<Super>j" ];
|
||||||
|
switch-applications-backward = [ "<Super>k" ];
|
||||||
|
switch-group = [ ];
|
||||||
|
switch-group-backward = [ ];
|
||||||
|
switch-input-source = [ ];
|
||||||
|
switch-input-source-backward = [ ];
|
||||||
|
switch-panels = [ ];
|
||||||
|
switch-panels-backward = [ ];
|
||||||
|
switch-to-workspace-1 = [ "<Super>a" ];
|
||||||
|
switch-to-workspace-2 = [ "<Super>s" ];
|
||||||
|
switch-to-workspace-3 = [ "<Super>d" ];
|
||||||
|
switch-to-workspace-4 = [ "<Super>f" ];
|
||||||
|
switch-to-workspace-5 = [ "<Super>g" ];
|
||||||
|
switch-to-workspace-last = [ ];
|
||||||
|
switch-to-workspace-left = [ "<Super>h" ];
|
||||||
|
switch-to-workspace-right = [ "<Super>l" ];
|
||||||
|
switch-windows = [ ];
|
||||||
|
switch-windows-backward = [ ];
|
||||||
|
toggle-maximized = [ "<Super>space" ];
|
||||||
|
unmaximize = [ ];
|
||||||
|
};
|
||||||
|
|
||||||
|
"org/gnome/desktop/wm/preferences" = {
|
||||||
|
num-workspaces = 5;
|
||||||
|
workspace-names = [
|
||||||
|
"sh"
|
||||||
|
"www"
|
||||||
|
"dev"
|
||||||
|
"info"
|
||||||
|
"etc"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
"org/gnome/settings-daemon/plugins/media-keys" = {
|
||||||
|
custom-keybindings = [
|
||||||
|
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = {
|
||||||
|
binding = "Print";
|
||||||
|
command = "flameshot gui";
|
||||||
|
name = "flameshot";
|
||||||
|
};
|
||||||
|
|
||||||
|
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1" = {
|
||||||
|
binding = "<Super>Return";
|
||||||
|
command = "kitty";
|
||||||
|
name = "Kitty";
|
||||||
|
};
|
||||||
|
|
||||||
|
"org/gnome/shell/keybindings" = {
|
||||||
|
screenshot = [ "Print" ];
|
||||||
|
toggle-application-view = [ "<Super>p" ];
|
||||||
|
toggle-quick-settings = [ ];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
183
home/modules/desktop/niri/config.kdl
Normal file
183
home/modules/desktop/niri/config.kdl
Normal file
@@ -0,0 +1,183 @@
|
|||||||
|
input {
|
||||||
|
touchpad {
|
||||||
|
tap
|
||||||
|
natural-scroll
|
||||||
|
}
|
||||||
|
mouse {
|
||||||
|
accel-profile "flat"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NOTE: monitors are managed using `shikane` instead, as I assume this to be
|
||||||
|
// too limited for multiple multimonitor configurations. Below is an example
|
||||||
|
// for a simple, fixed, vertical dual monitor setup
|
||||||
|
|
||||||
|
// output "eDP-1" {
|
||||||
|
// position x=0 y=1440
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// output "DP-5" {
|
||||||
|
// position x=0 y=0
|
||||||
|
// }
|
||||||
|
|
||||||
|
layout {
|
||||||
|
gaps 4
|
||||||
|
struts {}
|
||||||
|
center-focused-column "never"
|
||||||
|
preset-column-widths {
|
||||||
|
proportion 0.382
|
||||||
|
proportion 0.618
|
||||||
|
proportion 1.0
|
||||||
|
}
|
||||||
|
default-column-width { }
|
||||||
|
focus-ring {
|
||||||
|
off
|
||||||
|
}
|
||||||
|
border {
|
||||||
|
width 2
|
||||||
|
active-color "#555555"
|
||||||
|
inactive-color "#55555511"
|
||||||
|
urgent-color "#ff0000"
|
||||||
|
}
|
||||||
|
shadow {
|
||||||
|
on
|
||||||
|
softness 32
|
||||||
|
spread 4
|
||||||
|
offset x=0 y=0
|
||||||
|
color "#0007"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
spawn-at-startup "wlsunset -l 51.05 -L 3.72"
|
||||||
|
spawn-at-startup "waybar"
|
||||||
|
|
||||||
|
hotkey-overlay {
|
||||||
|
skip-at-startup
|
||||||
|
}
|
||||||
|
|
||||||
|
prefer-no-csd
|
||||||
|
|
||||||
|
screenshot-path "~/doc/screenshots/%Y-%m-%d %H-%M-%S.png"
|
||||||
|
|
||||||
|
// https://yalter.github.io/niri/Configuration:-Animations
|
||||||
|
animations {
|
||||||
|
slowdown 0.66
|
||||||
|
}
|
||||||
|
|
||||||
|
window-rule {
|
||||||
|
match app-id=r#"firefox$"# title="^Picture-in-Picture$"
|
||||||
|
open-floating true
|
||||||
|
}
|
||||||
|
|
||||||
|
window-rule {
|
||||||
|
match app-id=r#"^org\.keepassxc\.KeePassXC$"#
|
||||||
|
block-out-from "screen-capture"
|
||||||
|
}
|
||||||
|
|
||||||
|
window-rule {
|
||||||
|
geometry-corner-radius 0
|
||||||
|
clip-to-geometry true
|
||||||
|
}
|
||||||
|
|
||||||
|
gestures {
|
||||||
|
hot-corners {
|
||||||
|
off
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
binds {
|
||||||
|
Mod+Slash { show-hotkey-overlay; }
|
||||||
|
|
||||||
|
Mod+Return hotkey-overlay-title="Open a Terminal: kitty" { spawn "kitty"; }
|
||||||
|
Mod+P hotkey-overlay-title="Run an Application: fuzzel" { spawn "fuzzel"; }
|
||||||
|
Super+Alt+L hotkey-overlay-title="Lock the Screen: swaylock" { spawn "swaylock"; }
|
||||||
|
|
||||||
|
XF86AudioRaiseVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1+"; }
|
||||||
|
XF86AudioLowerVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1-"; }
|
||||||
|
XF86AudioMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; }
|
||||||
|
XF86AudioMicMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"; }
|
||||||
|
|
||||||
|
Mod+Shift+XF86Display { power-off-monitors; }
|
||||||
|
XF86MonBrightnessUp allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "+10%"; }
|
||||||
|
XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "10%-"; }
|
||||||
|
|
||||||
|
Mod+O repeat=false { toggle-overview; }
|
||||||
|
Mod+Delete repeat=false { close-window; }
|
||||||
|
|
||||||
|
Mod+H { focus-column-left; }
|
||||||
|
Mod+J { focus-window-or-workspace-down; }
|
||||||
|
Mod+K { focus-window-or-workspace-up; }
|
||||||
|
Mod+L { focus-column-right; }
|
||||||
|
|
||||||
|
Mod+Shift+H { move-column-left; }
|
||||||
|
Mod+Shift+J { move-window-down-or-to-workspace-down; }
|
||||||
|
Mod+Shift+K { move-window-up-or-to-workspace-up; }
|
||||||
|
Mod+Shift+L { move-column-right; }
|
||||||
|
|
||||||
|
Mod+Home { focus-column-first; }
|
||||||
|
Mod+End { focus-column-last; }
|
||||||
|
Mod+Ctrl+Home { move-column-to-first; }
|
||||||
|
Mod+Ctrl+End { move-column-to-last; }
|
||||||
|
|
||||||
|
Mod+Left { focus-monitor-left; }
|
||||||
|
Mod+Down { focus-monitor-down; }
|
||||||
|
Mod+Up { focus-monitor-up; }
|
||||||
|
Mod+Right { focus-monitor-right; }
|
||||||
|
Mod+Shift+Left { move-column-to-monitor-left; }
|
||||||
|
Mod+Shift+Down { move-column-to-monitor-down; }
|
||||||
|
Mod+Shift+Up { move-column-to-monitor-up; }
|
||||||
|
Mod+Shift+Right { move-column-to-monitor-right; }
|
||||||
|
|
||||||
|
Mod+Ctrl+Up { move-workspace-down; }
|
||||||
|
Mod+Ctrl+Down { move-workspace-up; }
|
||||||
|
|
||||||
|
// Mod+WheelScrollDown cooldown-ms=150 { focus-workspace-down; }
|
||||||
|
// Mod+WheelScrollUp cooldown-ms=150 { focus-workspace-up; }
|
||||||
|
// Mod+Shift+WheelScrollDown cooldown-ms=150 { move-window-down-or-to-workspace-down; }
|
||||||
|
// Mod+Shift+WheelScrollUp cooldown-ms=150 { move-window-up-or-to-workspace-up; }
|
||||||
|
|
||||||
|
// Mod+A { focus-workspace 1; }
|
||||||
|
// Mod+S { focus-workspace 2; }
|
||||||
|
// Mod+D { focus-workspace 3; }
|
||||||
|
// Mod+F { focus-workspace 4; }
|
||||||
|
// Mod+Shift+A { move-column-to-workspace 1; }
|
||||||
|
// Mod+Shift+S { move-column-to-workspace 2; }
|
||||||
|
// Mod+Shift+D { move-column-to-workspace 3; }
|
||||||
|
// Mod+Shift+F { move-column-to-workspace 4; }
|
||||||
|
|
||||||
|
Mod+Tab { focus-workspace-previous; }
|
||||||
|
|
||||||
|
Mod+BracketLeft { consume-or-expel-window-left; }
|
||||||
|
Mod+BracketRight { consume-or-expel-window-right; }
|
||||||
|
|
||||||
|
Mod+Comma { consume-window-into-column; }
|
||||||
|
Mod+Period { expel-window-from-column; }
|
||||||
|
|
||||||
|
Mod+N { switch-preset-column-width; }
|
||||||
|
Mod+Shift+N { switch-preset-window-height; }
|
||||||
|
Mod+Ctrl+R { reset-window-height; }
|
||||||
|
|
||||||
|
Mod+Space { maximize-column; }
|
||||||
|
Mod+Shift+Space { fullscreen-window; }
|
||||||
|
|
||||||
|
Mod+Escape { toggle-window-floating; }
|
||||||
|
Mod+Shift+Escape { switch-focus-between-floating-and-tiling; }
|
||||||
|
|
||||||
|
Mod+Ctrl+F { expand-column-to-available-width; }
|
||||||
|
|
||||||
|
Mod+C { center-column; }
|
||||||
|
Mod+Ctrl+C { center-visible-columns; }
|
||||||
|
|
||||||
|
Mod+Minus { set-column-width "-10%"; }
|
||||||
|
Mod+Equal { set-column-width "+10%"; }
|
||||||
|
Mod+Shift+Minus { set-window-height "-10%"; }
|
||||||
|
Mod+Shift+Equal { set-window-height "+10%"; }
|
||||||
|
|
||||||
|
Mod+W { toggle-column-tabbed-display; }
|
||||||
|
|
||||||
|
Print { screenshot; }
|
||||||
|
Ctrl+Print { screenshot-screen; }
|
||||||
|
Alt+Print { screenshot-window; }
|
||||||
|
|
||||||
|
Mod+Shift+Delete { quit; }
|
||||||
|
}
|
||||||
13
home/modules/desktop/niri/default.nix
Normal file
13
home/modules/desktop/niri/default.nix
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
../../fuzzel
|
||||||
|
../../waybar
|
||||||
|
];
|
||||||
|
|
||||||
|
home = {
|
||||||
|
file.".config/niri/config.kdl".source = ./config.kdl;
|
||||||
|
packages = with pkgs; [ wlsunset ];
|
||||||
|
};
|
||||||
|
}
|
||||||
28
home/modules/fuzzel/default.nix
Normal file
28
home/modules/fuzzel/default.nix
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
programs.fuzzel = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
main = {
|
||||||
|
font = "Iosevka Term SS08";
|
||||||
|
horizontal-pad = 0;
|
||||||
|
vertical-pad = 0;
|
||||||
|
};
|
||||||
|
colors = {
|
||||||
|
background = "ccccccff";
|
||||||
|
text = "111111ff";
|
||||||
|
prompt = "ccccccff";
|
||||||
|
placeholder = "aaaaaaff";
|
||||||
|
input = "111111ff";
|
||||||
|
selection = "eeeeeeff";
|
||||||
|
selection-text = "111111ff";
|
||||||
|
selection-match = "333333ff";
|
||||||
|
counter = "111111ff";
|
||||||
|
border = "111111ff";
|
||||||
|
};
|
||||||
|
border = {
|
||||||
|
width = 2;
|
||||||
|
radius = 0;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
programs.git.enable = true;
|
programs.git.enable = true;
|
||||||
home.file = {
|
home.file = {
|
||||||
".gitconfig".source = ../../dots/.gitconfig;
|
".gitconfig".source = ../../dots/.gitconfig;
|
||||||
|
".gitconfig.work".source = ../../dots/.gitconfig.work;
|
||||||
".gitignore".source = ../../dots/.gitignore;
|
".gitignore".source = ../../dots/.gitignore;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
11
home/modules/k9s.nix
Normal file
11
home/modules/k9s.nix
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
programs.k9s = {
|
||||||
|
enable = true;
|
||||||
|
settings.k9s = {
|
||||||
|
ui = {
|
||||||
|
logoless = true;
|
||||||
|
reactive = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,4 +1,11 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
programs.keepassxc = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# TODO: https://mynixos.com/home-manager/option/programs.keepassxc.settings
|
settings = {
|
||||||
|
Browser.Enabled = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
# programs.firefox.nativeMessagingHosts = [ pkgs.keepassxc ]; # FIXME: Resolve 'Access error for config file /home/h/.config/keepassxc/keepassxc.ini' error
|
||||||
}
|
}
|
||||||
|
|||||||
57
home/modules/waybar/config.jsonc
Normal file
57
home/modules/waybar/config.jsonc
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"height": 16,
|
||||||
|
"spacing": 4,
|
||||||
|
"modules-left": ["niri/workspaces"],
|
||||||
|
"modules-right": [
|
||||||
|
"pulseaudio",
|
||||||
|
"memory",
|
||||||
|
"cpu",
|
||||||
|
"network",
|
||||||
|
"clock",
|
||||||
|
"battery",
|
||||||
|
],
|
||||||
|
"clock": {
|
||||||
|
"format": "W{:%V %d %b %H:%M}",
|
||||||
|
"tooltip-format": "{calendar}",
|
||||||
|
"format-alt": "{:%Y-%m-%d %H:%M:%S}",
|
||||||
|
},
|
||||||
|
"battery": {
|
||||||
|
"bat": "BAT0",
|
||||||
|
"adapter": "ADP1",
|
||||||
|
"interval": 5,
|
||||||
|
"full-at": 99,
|
||||||
|
"states": {
|
||||||
|
"good": 80,
|
||||||
|
"warning": 20,
|
||||||
|
"critical": 10,
|
||||||
|
},
|
||||||
|
"format": "{capacity}%--",
|
||||||
|
"format-charging": "{capacity}%++",
|
||||||
|
"format-plugged": "{capacity}%",
|
||||||
|
"format-alt": "{time} {power}W",
|
||||||
|
},
|
||||||
|
"pulseaudio": {
|
||||||
|
"format": "VOL {volume}%",
|
||||||
|
"format-muted": "muted",
|
||||||
|
"on-click": "pavucontrol",
|
||||||
|
},
|
||||||
|
"memory": {
|
||||||
|
"interval": 2,
|
||||||
|
"format": "RAM {percentage}%",
|
||||||
|
"format-alt": "RAM {used:0.1f}G/{total:0.1f}G",
|
||||||
|
},
|
||||||
|
"cpu": {
|
||||||
|
"interval": 2,
|
||||||
|
"format": "CPU {usage}%",
|
||||||
|
"format-alt": "CPU {avg_frequency}GHz",
|
||||||
|
},
|
||||||
|
"network": {
|
||||||
|
"interval": 5,
|
||||||
|
"format-wifi": "{ifname} {ipaddr} {essid}",
|
||||||
|
"format-ethernet": "{ifname} {ipaddr}",
|
||||||
|
"format-disconnected": "{ifname} disconnected",
|
||||||
|
"tooltip-format": "{ifname}: {ipaddr}/{cidr}",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
]
|
||||||
8
home/modules/waybar/default.nix
Normal file
8
home/modules/waybar/default.nix
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
programs.waybar = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
home.file.".config/waybar/config.jsonc".source = ./config.jsonc;
|
||||||
|
home.file.".config/waybar/style.css".source = ./style.css;
|
||||||
|
}
|
||||||
56
home/modules/waybar/style.css
Normal file
56
home/modules/waybar/style.css
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
* {
|
||||||
|
font-family:
|
||||||
|
Iosevka Term SS08,
|
||||||
|
monospace;
|
||||||
|
font-size: 12px;
|
||||||
|
border-radius: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modules-left,
|
||||||
|
.modules-center,
|
||||||
|
.modules-right {
|
||||||
|
margin: 4px;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#waybar {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#waybar.hidden {
|
||||||
|
opacity: 0.2;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button {
|
||||||
|
padding: 0;
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button:hover {
|
||||||
|
background: #000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.focused,
|
||||||
|
#workspaces button.active {
|
||||||
|
background-color: #111111;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.urgent {
|
||||||
|
background-color: #eb4d4b;
|
||||||
|
}
|
||||||
|
|
||||||
|
#clock,
|
||||||
|
#battery,
|
||||||
|
#pulseaudio,
|
||||||
|
#memory,
|
||||||
|
#cpu,
|
||||||
|
#network {
|
||||||
|
padding: 0 4px;
|
||||||
|
color: #ffffff;
|
||||||
|
background-color: #111111;
|
||||||
|
}
|
||||||
|
|
||||||
|
#window,
|
||||||
|
#workspaces {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
@@ -8,28 +8,28 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
username = "h";
|
username = "h";
|
||||||
|
wolInterfaces = import ./wol-interfaces.nix;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
system.stateVersion = "25.05";
|
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
|
../../modules/common
|
||||||
inputs.disko.nixosModules.disko
|
inputs.disko.nixosModules.disko
|
||||||
inputs.sops-nix.nixosModules.sops
|
inputs.sops-nix.nixosModules.sops
|
||||||
inputs.home-manager.nixosModules.default
|
inputs.home-manager.nixosModules.default
|
||||||
./hard.nix
|
./hard.nix
|
||||||
../../modules/bootloader.nix
|
../../modules/boot/bootloader.nix
|
||||||
(import ../../modules/disko.zfs-encrypted-root.nix {
|
(import ../../modules/disko/zfs-encrypted-root.nix {
|
||||||
device = "/dev/nvme1n1";
|
device = "/dev/nvme1n1";
|
||||||
inherit lib;
|
inherit lib;
|
||||||
inherit config;
|
inherit config;
|
||||||
})
|
})
|
||||||
../../modules/gnome.nix
|
../../modules/desktops/niri
|
||||||
../../modules/bluetooth.nix
|
../../modules/bluetooth
|
||||||
../../modules/keyboard
|
../../modules/keyboard
|
||||||
(import ../../modules/networking.nix { hostName = "andromache"; })
|
(import ../../modules/networking { hostName = "andromache"; })
|
||||||
../../modules/users.nix
|
../../modules/users
|
||||||
../../modules/audio.nix
|
../../modules/audio
|
||||||
../../modules/localization.nix
|
../../modules/localization
|
||||||
../../modules/fonts
|
../../modules/fonts
|
||||||
../../modules/ssh/hardened-openssh.nix
|
../../modules/ssh/hardened-openssh.nix
|
||||||
(import ../../modules/secrets {
|
(import ../../modules/secrets {
|
||||||
@@ -37,10 +37,11 @@ in
|
|||||||
inherit inputs;
|
inherit inputs;
|
||||||
inherit config;
|
inherit config;
|
||||||
})
|
})
|
||||||
../../modules/docker.nix
|
../../modules/docker
|
||||||
];
|
];
|
||||||
|
|
||||||
secrets.username = username;
|
secrets.username = username;
|
||||||
|
docker.user = username;
|
||||||
|
|
||||||
disko.devices = {
|
disko.devices = {
|
||||||
disk.data = {
|
disk.data = {
|
||||||
@@ -77,13 +78,6 @@ in
|
|||||||
|
|
||||||
environment.systemPackages = [ inputs.nvim.packages.x86_64-linux.nvim ];
|
environment.systemPackages = [ inputs.nvim.packages.x86_64-linux.nvim ];
|
||||||
|
|
||||||
nix.settings.experimental-features = [
|
|
||||||
"nix-command"
|
|
||||||
"flakes"
|
|
||||||
];
|
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
useUserPackages = true;
|
useUserPackages = true;
|
||||||
@@ -95,10 +89,6 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
networking = {
|
|
||||||
hostId = "80eef97e";
|
|
||||||
};
|
|
||||||
|
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
videoDrivers = [ "nvidia" ];
|
videoDrivers = [ "nvidia" ];
|
||||||
};
|
};
|
||||||
@@ -111,16 +101,18 @@ in
|
|||||||
services.syncthing = {
|
services.syncthing = {
|
||||||
enable = true;
|
enable = true;
|
||||||
openDefaultPorts = true;
|
openDefaultPorts = true;
|
||||||
|
settings = {
|
||||||
|
devices = {
|
||||||
|
# "device1" = {
|
||||||
|
# id = "DEVICE-ID-GOES-HERE";
|
||||||
|
# };
|
||||||
|
};
|
||||||
folders = {
|
folders = {
|
||||||
"/home/${username}/sync" = {
|
"/home/${username}/sync" = {
|
||||||
id = "sync";
|
id = "sync";
|
||||||
devices = [ ];
|
devices = [ ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
devices = {
|
|
||||||
# "device1" = {
|
|
||||||
# id = "DEVICE-ID-GOES-HERE";
|
|
||||||
# };
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -130,9 +122,11 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
|
hostId = "80eef97e";
|
||||||
interfaces = {
|
interfaces = {
|
||||||
eno1 = {
|
eno1 = {
|
||||||
wakeOnLan.enable = true;
|
wakeOnLan.enable = true;
|
||||||
|
macAddress = wolInterfaces.eno1.macAddress;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
firewall = {
|
firewall = {
|
||||||
|
|||||||
@@ -1,14 +1,29 @@
|
|||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports = [
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "vmd" "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "uas" "sd_mod" ];
|
boot.initrd.availableKernelModules = [
|
||||||
|
"vmd"
|
||||||
|
"xhci_pci"
|
||||||
|
"ahci"
|
||||||
|
"nvme"
|
||||||
|
"usbhid"
|
||||||
|
"usb_storage"
|
||||||
|
"uas"
|
||||||
|
"sd_mod"
|
||||||
|
];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|||||||
3
hosts/andromache/wol-interfaces.nix
Normal file
3
hosts/andromache/wol-interfaces.nix
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
eno1.macAddress = "02:68:b3:29:da:98";
|
||||||
|
}
|
||||||
@@ -8,30 +8,30 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
username = "h";
|
username = "h";
|
||||||
hostName = "astynanax";
|
hostName = "astyanax";
|
||||||
|
wolInterfaces = import ../andromache/wol-interfaces.nix;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
system.stateVersion = "25.05";
|
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
|
../../modules/common
|
||||||
inputs.nixos-hardware.nixosModules.lenovo-thinkpad-e14-intel
|
inputs.nixos-hardware.nixosModules.lenovo-thinkpad-e14-intel
|
||||||
inputs.disko.nixosModules.disko
|
inputs.disko.nixosModules.disko
|
||||||
inputs.sops-nix.nixosModules.sops
|
inputs.sops-nix.nixosModules.sops
|
||||||
inputs.home-manager.nixosModules.default
|
inputs.home-manager.nixosModules.default
|
||||||
./hard.nix
|
./hard.nix
|
||||||
../../modules/bootloader.nix
|
../../modules/boot/bootloader.nix
|
||||||
(import ../../modules/disko.zfs-encrypted-root.nix {
|
(import ../../modules/disko/zfs-encrypted-root.nix {
|
||||||
inherit lib;
|
inherit lib;
|
||||||
inherit config;
|
inherit config;
|
||||||
device = "/dev/nvme0n1";
|
device = "/dev/nvme0n1";
|
||||||
})
|
})
|
||||||
../../modules/gnome.nix
|
../../modules/desktops/niri
|
||||||
../../modules/bluetooth.nix
|
../../modules/bluetooth
|
||||||
../../modules/keyboard
|
../../modules/keyboard
|
||||||
(import ../../modules/networking.nix { hostName = hostName; })
|
(import ../../modules/networking { hostName = hostName; })
|
||||||
../../modules/users.nix
|
../../modules/users
|
||||||
../../modules/audio.nix
|
../../modules/audio
|
||||||
../../modules/localization.nix
|
../../modules/localization
|
||||||
../../modules/fonts
|
../../modules/fonts
|
||||||
../../modules/ssh/hardened-openssh.nix
|
../../modules/ssh/hardened-openssh.nix
|
||||||
(import ../../modules/secrets {
|
(import ../../modules/secrets {
|
||||||
@@ -44,15 +44,17 @@ in
|
|||||||
|
|
||||||
secrets.username = username;
|
secrets.username = username;
|
||||||
|
|
||||||
environment.systemPackages = [ inputs.nvim.packages.x86_64-linux.nvim ];
|
environment.systemPackages = [
|
||||||
|
inputs.nvim.packages.x86_64-linux.nvim
|
||||||
nix.settings.experimental-features = [
|
(pkgs.writeShellApplication {
|
||||||
"nix-command"
|
name = "wol-andromache";
|
||||||
"flakes"
|
runtimeInputs = [ pkgs.wakeonlan ];
|
||||||
|
text = ''
|
||||||
|
wakeonlan ${wolInterfaces.eno1.macAddress}
|
||||||
|
'';
|
||||||
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
useUserPackages = true;
|
useUserPackages = true;
|
||||||
|
|||||||
55
hosts/hecuba/default.nix
Normal file
55
hosts/hecuba/default.nix
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
# Also see <https://wiki.nixos.org/wiki/Install_NixOS_on_Hetzner_Cloud>
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./hard.nix
|
||||||
|
../../modules/common
|
||||||
|
../../modules/ssh/hardened-openssh.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
vim
|
||||||
|
git
|
||||||
|
];
|
||||||
|
|
||||||
|
fileSystems."/" = {
|
||||||
|
device = "/dev/disk/by-label/nixos";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
fileSystems."/boot" = {
|
||||||
|
device = "/dev/disk/by-label/boot";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
swapDevices = [
|
||||||
|
{
|
||||||
|
device = "/dev/disk/by-label/swap";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.loader.grub.enable = true;
|
||||||
|
boot.loader.grub.device = "/dev/sda";
|
||||||
|
|
||||||
|
users.users = {
|
||||||
|
root.hashedPassword = "!";
|
||||||
|
username = {
|
||||||
|
isNormalUser = true;
|
||||||
|
extraGroups = [ "wheel" ];
|
||||||
|
openssh.authorizedKeys.keys = [
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOOXPEhdKOVnb6mkeLLUcFGt+mnUR5pMie17JtjrxwgO h@andromache"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
security.sudo.wheelNeedsPassword = false;
|
||||||
|
|
||||||
|
networking = {
|
||||||
|
firewall.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.openssh = {
|
||||||
|
enable = true;
|
||||||
|
harden = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
37
hosts/hecuba/hard.nix
Normal file
37
hosts/hecuba/hard.nix
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
|
# and may be overwritten by future invocations. Please make changes
|
||||||
|
# to /etc/nixos/configuration.nix instead.
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
(modulesPath + "/profiles/qemu-guest.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [
|
||||||
|
"ahci"
|
||||||
|
"xhci_pci"
|
||||||
|
"virtio_pci"
|
||||||
|
"virtio_scsi"
|
||||||
|
"sd_mod"
|
||||||
|
"sr_mod"
|
||||||
|
];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
# still possible to use this option, but it's recommended to use it in conjunction
|
||||||
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||||
|
networking.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
}
|
||||||
@@ -10,21 +10,20 @@ let
|
|||||||
username = "h";
|
username = "h";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
system.stateVersion = "25.05";
|
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
|
../../modules/common
|
||||||
inputs.disko.nixosModules.disko
|
inputs.disko.nixosModules.disko
|
||||||
inputs.sops-nix.nixosModules.sops
|
inputs.sops-nix.nixosModules.sops
|
||||||
inputs.home-manager.nixosModules.default
|
inputs.home-manager.nixosModules.default
|
||||||
./hard.nix
|
./hard.nix
|
||||||
./disk.nix
|
./disk.nix
|
||||||
../../modules/bootloader.nix
|
../../modules/boot/bootloader.nix
|
||||||
../../modules/keyboard
|
../../modules/keyboard
|
||||||
(import ../../modules/networking.nix { hostName = "vm"; })
|
(import ../../modules/networking.nix { hostName = "vm"; })
|
||||||
../../modules/users.nix
|
../../modules/users
|
||||||
../../modules/audio.nix
|
../../modules/audio
|
||||||
../../modules/localization.nix
|
../../modules/localization
|
||||||
../../modules/x.nix
|
../../modules/x
|
||||||
../../modules/fonts
|
../../modules/fonts
|
||||||
../../modules/ssh/hardened-openssh.nix
|
../../modules/ssh/hardened-openssh.nix
|
||||||
(import ../../modules/secrets {
|
(import ../../modules/secrets {
|
||||||
@@ -38,13 +37,6 @@ in
|
|||||||
|
|
||||||
environment.systemPackages = [ inputs.nvim.packages.x86_64-linux.nvim ];
|
environment.systemPackages = [ inputs.nvim.packages.x86_64-linux.nvim ];
|
||||||
|
|
||||||
nix.settings.experimental-features = [
|
|
||||||
"nix-command"
|
|
||||||
"flakes"
|
|
||||||
];
|
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
|
|
||||||
disko = {
|
disko = {
|
||||||
devices.disk.main.device = "/dev/vda";
|
devices.disk.main.device = "/dev/vda";
|
||||||
devices.disk.main.imageName = "nixos-vm";
|
devices.disk.main.imageName = "nixos-vm";
|
||||||
|
|||||||
@@ -9,4 +9,5 @@
|
|||||||
alsa.support32Bit = true;
|
alsa.support32Bit = true;
|
||||||
pulse.enable = true;
|
pulse.enable = true;
|
||||||
};
|
};
|
||||||
|
services.pulseaudio.extraConfig = "load-module module-switch-on-connect";
|
||||||
}
|
}
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
hardware.bluetooth.enable = true;
|
|
||||||
}
|
|
||||||
15
modules/bluetooth/default.nix
Normal file
15
modules/bluetooth/default.nix
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
hardware.bluetooth = {
|
||||||
|
enable = true;
|
||||||
|
powerOnBoot = true;
|
||||||
|
settings = {
|
||||||
|
General = {
|
||||||
|
Experimental = true;
|
||||||
|
FastConnectable = true;
|
||||||
|
};
|
||||||
|
Policy = {
|
||||||
|
AutoEnable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
10
modules/common/default.nix
Normal file
10
modules/common/default.nix
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
system.stateVersion = "25.05";
|
||||||
|
|
||||||
|
nix.settings.experimental-features = [
|
||||||
|
"nix-command"
|
||||||
|
"flakes"
|
||||||
|
];
|
||||||
|
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
}
|
||||||
8
modules/desktops/niri/default.nix
Normal file
8
modules/desktops/niri/default.nix
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
programs.niri.enable = true;
|
||||||
|
|
||||||
|
services.dbus.enable = true;
|
||||||
|
xdg = {
|
||||||
|
portal.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
virtualisation.docker = {
|
|
||||||
enable = false;
|
|
||||||
rootless = {
|
|
||||||
enable = true;
|
|
||||||
setSocketVariable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
44
modules/docker/default.nix
Normal file
44
modules/docker/default.nix
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
{ config, lib, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.docker;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.docker = {
|
||||||
|
rootless = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
};
|
||||||
|
user = lib.mkOption {
|
||||||
|
type = lib.types.nullOr lib.types.str;
|
||||||
|
default = null;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = lib.mkMerge [
|
||||||
|
{
|
||||||
|
warnings = lib.flatten [
|
||||||
|
(lib.optional (
|
||||||
|
cfg.rootless && cfg.user != null
|
||||||
|
) "'virtualisation.docker.user' is ignored when rootless mode is enabled")
|
||||||
|
(lib.optional (
|
||||||
|
!cfg.rootless && cfg.user == null
|
||||||
|
) "'virtualisation.docker.user' is not set (no user is added to the docker group)")
|
||||||
|
];
|
||||||
|
}
|
||||||
|
(lib.mkIf cfg.rootless {
|
||||||
|
virtualisation.docker = {
|
||||||
|
enable = false;
|
||||||
|
rootless = {
|
||||||
|
enable = true;
|
||||||
|
setSocketVariable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
})
|
||||||
|
(lib.mkIf (!cfg.rootless && cfg.user != null) {
|
||||||
|
virtualisation.docker = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
users.users.${cfg.user}.extraGroups = [ "docker" ];
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
||||||
79
modules/k3s/default.nix
Normal file
79
modules/k3s/default.nix
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
# TODO: see if this works with podman
|
||||||
|
# TODO: check if docker/podman is enabled
|
||||||
|
|
||||||
|
# Rootless K3S
|
||||||
|
|
||||||
|
# FIXME
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
k3s
|
||||||
|
rootlesskit
|
||||||
|
slirp4netns
|
||||||
|
];
|
||||||
|
|
||||||
|
# running K3S on rootless docker was causing the following error: "failed to find cpuset cgroup (v2)" (in `docker logs k3d-lab-server-0` output)
|
||||||
|
#
|
||||||
|
# see <https://docs.k3s.io/advanced#known-issues-with-rootless-mode>
|
||||||
|
# see <https://rootlesscontaine.rs/getting-started/common/cgroup2/>
|
||||||
|
# see <https://discourse.nixos.org/t/declarative-rootless-k3s/49839>
|
||||||
|
systemd.services."user@".serviceConfig.Delegate = "cpu cpuset io memory pids";
|
||||||
|
|
||||||
|
# taken from <https://github.com/k3s-io/k3s/blob/main/k3s-rootless.service> as described in <https://docs.k3s.io/advanced#known-issues-with-rootless-mode#Rootless>
|
||||||
|
systemd.user.services."k3s-rootless" = with pkgs; {
|
||||||
|
path = with pkgs; [
|
||||||
|
"${rootlesskit}"
|
||||||
|
"${slirp4netns}"
|
||||||
|
"${fuse-overlayfs}"
|
||||||
|
"${fuse3}"
|
||||||
|
"/run/wrappers"
|
||||||
|
];
|
||||||
|
# systemd unit file for k3s (rootless)
|
||||||
|
#
|
||||||
|
# Usage:
|
||||||
|
# - [Optional] Enable cgroup v2 delegation, see https://rootlesscontaine.rs/getting-started/common/cgroup2/ .
|
||||||
|
# This step is optional, but highly recommended for enabling CPU and memory resource limtitation.
|
||||||
|
#
|
||||||
|
# - Copy this file as `~/.config/systemd/user/k3s-rootless.service`.
|
||||||
|
# Installing this file as a system-wide service (`/etc/systemd/...`) is not supported.
|
||||||
|
# Depending on the path of `k3s` binary, you might need to modify the `ExecStart=/usr/local/bin/k3s ...` line of this file.
|
||||||
|
#
|
||||||
|
# - Run `systemctl --user daemon-reload`
|
||||||
|
#
|
||||||
|
# - Run `systemctl --user enable --now k3s-rootless`
|
||||||
|
#
|
||||||
|
# - Run `KUBECONFIG=~/.kube/k3s.yaml kubectl get pods -A`, and make sure the pods are running.
|
||||||
|
#
|
||||||
|
# Troubleshooting:
|
||||||
|
# - See `systemctl --user status k3s-rootless` to check the daemon status
|
||||||
|
# - See `journalctl --user -f -u k3s-rootless` to see the daemon log
|
||||||
|
# - See also https://rootlesscontaine.rs/
|
||||||
|
enable = true;
|
||||||
|
description = "k3s (Rootless)";
|
||||||
|
serviceConfig = {
|
||||||
|
# NOTE: Don't try to run `k3s server --rootless` on a terminal, as it doesn't enable cgroup v2 delegation.
|
||||||
|
# If you really need to try it on a terminal, prepend `systemd-run --user -p Delegate=yes --tty` to create a systemd scope.
|
||||||
|
ExecStart = "${k3s}/bin/k3s server --rootless --snapshotter=fuse-overlayfs";
|
||||||
|
ExecReload = "/run/current-system/sw/bin/kill -s HUP $MAINPID";
|
||||||
|
TimeoutSec = 0;
|
||||||
|
RestartSec = 2;
|
||||||
|
Restart = "always";
|
||||||
|
StartLimitBurst = 3;
|
||||||
|
StartLimitInterval = "60s";
|
||||||
|
LimitNOFILE = "infinity";
|
||||||
|
LimitNPROC = "infinity";
|
||||||
|
LimitCORE = "infinity";
|
||||||
|
TasksMax = "infinity";
|
||||||
|
Delegate = "yes";
|
||||||
|
Type = "simple";
|
||||||
|
KillMode = "mixed";
|
||||||
|
};
|
||||||
|
|
||||||
|
wantedBy = [ "default.target" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
boot.kernel.sysctl = {
|
||||||
|
"net.ipv4.ip_forward" = 1;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -25,6 +25,8 @@ in
|
|||||||
"taskwarrior_sync_server_url".owner = config.users.users.${cfg.username}.name;
|
"taskwarrior_sync_server_url".owner = config.users.users.${cfg.username}.name;
|
||||||
"taskwarrior_sync_server_client_id".owner = config.users.users.${cfg.username}.name;
|
"taskwarrior_sync_server_client_id".owner = config.users.users.${cfg.username}.name;
|
||||||
"taskwarrior_sync_encryption_secret".owner = config.users.users.${cfg.username}.name;
|
"taskwarrior_sync_encryption_secret".owner = config.users.users.${cfg.username}.name;
|
||||||
|
"email_personal".owner = config.users.users.${cfg.username}.name;
|
||||||
|
"email_work".owner = config.users.users.${cfg.username}.name;
|
||||||
};
|
};
|
||||||
|
|
||||||
templates."taskrc.d/sync" = {
|
templates."taskrc.d/sync" = {
|
||||||
@@ -35,6 +37,24 @@ in
|
|||||||
sync.encryption_secret=${config.sops.placeholder."taskwarrior_sync_encryption_secret"}
|
sync.encryption_secret=${config.sops.placeholder."taskwarrior_sync_encryption_secret"}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
templates.".gitconfig.email" = {
|
||||||
|
owner = config.users.users.${cfg.username}.name;
|
||||||
|
path = "/home/${cfg.username}/.gitconfig.email";
|
||||||
|
content = ''
|
||||||
|
[user]
|
||||||
|
email = ${config.sops.placeholder."email_personal"}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
templates.".gitconfig.work.email" = {
|
||||||
|
owner = config.users.users.${cfg.username}.name;
|
||||||
|
path = "/home/${cfg.username}/.gitconfig.work.email";
|
||||||
|
content = ''
|
||||||
|
[user]
|
||||||
|
email = ${config.sops.placeholder."email_work"}
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ in
|
|||||||
services.openssh.settings = optionalAttrs cfg.harden {
|
services.openssh.settings = optionalAttrs cfg.harden {
|
||||||
PermitRootLogin = "no";
|
PermitRootLogin = "no";
|
||||||
PasswordAuthentication = false;
|
PasswordAuthentication = false;
|
||||||
|
KbdInteractiveAuthentication = false;
|
||||||
ChallengeResponseAuthentication = false;
|
ChallengeResponseAuthentication = false;
|
||||||
X11Forwarding = false;
|
X11Forwarding = false;
|
||||||
AllowAgentForwarding = false;
|
AllowAgentForwarding = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user