Compare commits
1 Commits
main
...
xps16-btbr
| Author | SHA1 | Date | |
|---|---|---|---|
|
68b8da0c8f
|
@@ -1,6 +1,6 @@
|
|||||||
keys:
|
keys:
|
||||||
- &gpg_h7x4 F7D37890228A907440E1FD4846B9228E814A2AAC
|
- &gpg_h7x4 F7D37890228A907440E1FD4846B9228E814A2AAC
|
||||||
- &host_tsuki age1ue7uv559wf6tfjsutn9dsh07vpk53sgrfkdzqy4ltg6dnxcxeg7srx800u
|
- &host_tsuki age1c92j4w0gqh32hwssl5m2mfrggssxax9pge8qxwytv9lmrnfttcvqdrgsst
|
||||||
- &host_kasei age1eu2a6m3adakfzelfa9pqpl74a5dz0wkyr0v7gegm5ajnx7aqmqcqsp2ftc
|
- &host_kasei age1eu2a6m3adakfzelfa9pqpl74a5dz0wkyr0v7gegm5ajnx7aqmqcqsp2ftc
|
||||||
- &host_dosei age1s6s4w7cdfgajm30z9gy8va8pvs2lrzk5gnsg0hmn5z2sl8z36seqej406r
|
- &host_dosei age1s6s4w7cdfgajm30z9gy8va8pvs2lrzk5gnsg0hmn5z2sl8z36seqej406r
|
||||||
- &host_xps16 age1np3fg9ue2tp4l47x7waapvjxh5zcaye2j54laapy7uklamve2c4qv3gytm
|
- &host_xps16 age1np3fg9ue2tp4l47x7waapvjxh5zcaye2j54laapy7uklamve2c4qv3gytm
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
[](https://builtwithnix.org)
|
[](https://builtwithnix.org)
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
# Nix Dotfiles
|
# Nix Dotfiles
|
||||||
|
|
||||||
@@ -16,7 +15,7 @@ Here are some of the interesting files and dirs:
|
|||||||
| `/modules` | Custom nixos modules that I use in my own configuration. If you see options that does not appear in [NixOS Search][nixos-search], they might be defined here. |
|
| `/modules` | Custom nixos modules that I use in my own configuration. If you see options that does not appear in [NixOS Search][nixos-search], they might be defined here. |
|
||||||
| `/package-overrides` | Updated or pinned versions of packages that have not been upstreamed to nixpkgs (yet). |
|
| `/package-overrides` | Updated or pinned versions of packages that have not been upstreamed to nixpkgs (yet). |
|
||||||
| `/secrets` | Encrypted [sops-nix][sops-nix] secrets. |
|
| `/secrets` | Encrypted [sops-nix][sops-nix] secrets. |
|
||||||
| `flake.nix` | The root of everything. Defines the inputs and outputs of the project. Also applies misc overlays and adds config-wide modules. See [Nix Flakes][nix-flakes] for more information. |
|
| `flake.nix` | The root of everyting. Defines the inputs and outputs of the project. Also applies misc overlays and adds config-wide modules. See [Nix Flakes][nix-flakes] for more information. |
|
||||||
|
|
||||||
|
|
||||||
## Hosts
|
## Hosts
|
||||||
@@ -25,6 +24,7 @@ Here are some of the interesting files and dirs:
|
|||||||
|------|--------------|---------|
|
|------|--------------|---------|
|
||||||
| `Tsuki` | Dell Poweredge r710 server | Data storage / Build server / Selfhosted services. This server hosts a wide variety of services, including websites, matrix server, git repos, CI/CD and more. **This is probably the most interesting machine to pick config from** |
|
| `Tsuki` | Dell Poweredge r710 server | Data storage / Build server / Selfhosted services. This server hosts a wide variety of services, including websites, matrix server, git repos, CI/CD and more. **This is probably the most interesting machine to pick config from** |
|
||||||
| `Kasei` | AMD Zen 2 CPU / AMD GPU - desktop computer | Semi-daily driver. This is my main computer at home. |
|
| `Kasei` | AMD Zen 2 CPU / AMD GPU - desktop computer | Semi-daily driver. This is my main computer at home. |
|
||||||
|
| `Dosei` | Dell Optiplex | Work computer, mostly used for development and testing. |
|
||||||
|
|
||||||
|
|
||||||
## home-manager configuration
|
## home-manager configuration
|
||||||
|
|||||||
130
flake.lock
generated
130
flake.lock
generated
@@ -1,34 +1,36 @@
|
|||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"disko": {
|
"anyrun": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"flake-parts": "flake-parts",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
],
|
||||||
|
"systems": "systems"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1746728054,
|
"lastModified": 1743762088,
|
||||||
"narHash": "sha256-eDoSOhxGEm2PykZFa/x9QG5eTH0MJdiJ9aR00VAofXE=",
|
"narHash": "sha256-f+oXT9b3xuBDmm4v4nDqJvlHabxxZRB6+pay4Ub/NvA=",
|
||||||
"owner": "nix-community",
|
"owner": "anyrun-org",
|
||||||
"repo": "disko",
|
"repo": "anyrun",
|
||||||
"rev": "ff442f5d1425feb86344c028298548024f21256d",
|
"rev": "786f539d69d5abcefa68978dbaa964ac14536a00",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nix-community",
|
"owner": "anyrun-org",
|
||||||
"ref": "v1.12.0",
|
"ref": "master",
|
||||||
"repo": "disko",
|
"repo": "anyrun",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-compat": {
|
"flake-compat": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1747046372,
|
"lastModified": 1733328505,
|
||||||
"narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
|
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
|
||||||
"owner": "edolstra",
|
"owner": "edolstra",
|
||||||
"repo": "flake-compat",
|
"repo": "flake-compat",
|
||||||
"rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
|
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -37,9 +39,30 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"flake-parts": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs-lib": [
|
||||||
|
"anyrun",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1743550720,
|
||||||
|
"narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=",
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"rev": "c621e8422220273271f52058f618c94e405bb0f5",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"flake-utils": {
|
"flake-utils": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": "systems"
|
"systems": "systems_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1731533236,
|
"lastModified": 1731533236,
|
||||||
@@ -62,16 +85,16 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1764866045,
|
"lastModified": 1745557122,
|
||||||
"narHash": "sha256-0GsEtXV9OquDQ1VclQfP16cU5VZh7NEVIOjSH4UaJuM=",
|
"narHash": "sha256-eqSo9ugzsqhFgaDFYUZj943nurlX4L6f+AW0skJ4W+M=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "f63d0fe9d81d36e5fc95497217a72e02b8b7bcab",
|
"rev": "dd26f75fb4ec1c731d4b1396eaf4439ce40a91c1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"ref": "release-25.11",
|
"ref": "release-24.11",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@@ -83,16 +106,16 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1764844095,
|
"lastModified": 1735857245,
|
||||||
"narHash": "sha256-Drf1orxsmFDzO+UbPo85gHjXW7QzAM+6oTPvI7vOSik=",
|
"narHash": "sha256-AKLLPrgXTxgzll3DqVUMa4QlPlRN3QceutgFBmEf8Nk=",
|
||||||
"owner": "dali99",
|
"owner": "dali99",
|
||||||
"repo": "nixos-matrix-modules",
|
"repo": "nixos-matrix-modules",
|
||||||
"rev": "25b9f31ef1dbc3987b4c716de716239f2b283701",
|
"rev": "da9dc0479ffe22362793c87dc089035facf6ec4d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "dali99",
|
"owner": "dali99",
|
||||||
"ref": "v0.8.0",
|
"ref": "0.7.0",
|
||||||
"repo": "nixos-matrix-modules",
|
"repo": "nixos-matrix-modules",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@@ -144,11 +167,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1764900372,
|
"lastModified": 1745805739,
|
||||||
"narHash": "sha256-kTXDohz28PWDyjH+7O6UkXtKwaP0JkCmjMTLc/wbjmk=",
|
"narHash": "sha256-ryJ95o+w0hSVm5LkW5dxTbL2e1HCHCPcpNh627D3KHU=",
|
||||||
"owner": "infinidoge",
|
"owner": "infinidoge",
|
||||||
"repo": "nix-minecraft",
|
"repo": "nix-minecraft",
|
||||||
"rev": "777ee6af79272a1302815a2ea62b2a951aa9a6fe",
|
"rev": "ea8fa40a5fbf2762c41efc913c03aed3587ec7fa",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -160,11 +183,11 @@
|
|||||||
},
|
},
|
||||||
"nixos-hardware": {
|
"nixos-hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1764440730,
|
"lastModified": 1745503349,
|
||||||
"narHash": "sha256-ZlJTNLUKQRANlLDomuRWLBCH5792x+6XUJ4YdFRjtO4=",
|
"narHash": "sha256-bUGjvaPVsOfQeTz9/rLTNLDyqbzhl0CQtJJlhFPhIYw=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixos-hardware",
|
"repo": "nixos-hardware",
|
||||||
"rev": "9154f4569b6cdfd3c595851a6ba51bfaa472d9f3",
|
"rev": "f7bee55a5e551bd8e7b5b82c9bc559bc50d868d1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -176,26 +199,26 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1764677808,
|
"lastModified": 1745742390,
|
||||||
"narHash": "sha256-H3lC7knbXOBrHI9hITQ7modLuX20mYJVhZORL5ioms0=",
|
"narHash": "sha256-1rqa/XPSJqJg21BKWjzJZC7yU0l/YTVtjRi0RJmipus=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "1aab89277eb2d87823d5b69bae631a2496cff57a",
|
"rev": "26245db0cb552047418cfcef9a25da91b222d6c7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"id": "nixpkgs",
|
"id": "nixpkgs",
|
||||||
"ref": "nixos-25.11",
|
"ref": "nixos-24.11",
|
||||||
"type": "indirect"
|
"type": "indirect"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-unstable": {
|
"nixpkgs-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1764856222,
|
"lastModified": 1745377448,
|
||||||
"narHash": "sha256-yEJmtoFu4cJre1NuU4fb8q57Oux+NTbocnALtJ64aEI=",
|
"narHash": "sha256-jhZDfXVKdD7TSEGgzFJQvEEZ2K65UMiqW5YJ2aIqxMA=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "ece6e266caf1effab32eceef0403b797b4330373",
|
"rev": "507b63021ada5fee621b6ca371c4fca9ca46f52c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -206,11 +229,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-yet-unstabler": {
|
"nixpkgs-yet-unstabler": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1764914011,
|
"lastModified": 1745831704,
|
||||||
"narHash": "sha256-CMCi1WvBniQdrZDyvka+kymHZ23BaAzYrWwaQwp1PpQ=",
|
"narHash": "sha256-HMoKsZr3POMhCCIN1sFbPmYZ5ZBT/pCeyZnUXnJchdc=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "e019ef2611fa67e169327177e113c274e924d22d",
|
"rev": "7aa91c307d9af07d6900b337cecd02da067e8433",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -227,11 +250,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1742203788,
|
"lastModified": 1684092181,
|
||||||
"narHash": "sha256-nRqyf+msCPEXvvXF6bvfiYH/B089dqWPc7ljRXieA7g=",
|
"narHash": "sha256-Oi6G8Jx2RkEMi3UndtAnZw61hfgKGEe7l/ILdB9ump4=",
|
||||||
"ref": "refs/heads/master",
|
"ref": "refs/heads/master",
|
||||||
"rev": "c4e353e745b4012feb75dd1c4405a71f6318ed02",
|
"rev": "028ed8774d1cf4650fc15253146cf14451eb608c",
|
||||||
"revCount": 51,
|
"revCount": 43,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "file:///home/h7x4/git/osuchan-line-bot"
|
"url": "file:///home/h7x4/git/osuchan-line-bot"
|
||||||
},
|
},
|
||||||
@@ -242,7 +265,7 @@
|
|||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"disko": "disko",
|
"anyrun": "anyrun",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"matrix-synapse-next": "matrix-synapse-next",
|
"matrix-synapse-next": "matrix-synapse-next",
|
||||||
"maunium-stickerpicker": "maunium-stickerpicker",
|
"maunium-stickerpicker": "maunium-stickerpicker",
|
||||||
@@ -262,11 +285,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1764483358,
|
"lastModified": 1745310711,
|
||||||
"narHash": "sha256-EyyvCzXoHrbL467YSsQBTWWg4sR96MH1sPpKoSOelB4=",
|
"narHash": "sha256-ePyTpKEJTgX0gvgNQWd7tQYQ3glIkbqcW778RpHlqgA=",
|
||||||
"owner": "Mic92",
|
"owner": "Mic92",
|
||||||
"repo": "sops-nix",
|
"repo": "sops-nix",
|
||||||
"rev": "5aca6ff67264321d47856a2ed183729271107c9c",
|
"rev": "5e3e92b16d6fdf9923425a8d4df7496b2434f39c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -276,6 +299,21 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"systems": {
|
"systems": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1689347949,
|
||||||
|
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default-linux",
|
||||||
|
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default-linux",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1681028828,
|
"lastModified": 1681028828,
|
||||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
|||||||
82
flake.nix
82
flake.nix
@@ -1,18 +1,11 @@
|
|||||||
{
|
{
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "nixpkgs/nixos-25.11";
|
nixpkgs.url = "nixpkgs/nixos-24.11";
|
||||||
# nixpkgs.url = "nixpkgs/nixos-unstable";
|
|
||||||
nixpkgs-unstable.url = "nixpkgs/nixpkgs-unstable";
|
nixpkgs-unstable.url = "nixpkgs/nixpkgs-unstable";
|
||||||
nixpkgs-yet-unstabler.url = "github:NixOS/nixpkgs/master";
|
nixpkgs-yet-unstabler.url = "github:NixOS/nixpkgs/master";
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager/release-25.11";
|
url = "github:nix-community/home-manager/release-24.11";
|
||||||
# url = "github:nix-community/home-manager/master";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
disko = {
|
|
||||||
url = "github:nix-community/disko/v1.12.0";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -39,7 +32,12 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
matrix-synapse-next = {
|
matrix-synapse-next = {
|
||||||
url = "github:dali99/nixos-matrix-modules/v0.8.0";
|
url = "github:dali99/nixos-matrix-modules/0.7.0";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
|
anyrun = {
|
||||||
|
url = "github:anyrun-org/anyrun/master";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -50,7 +48,6 @@
|
|||||||
nixpkgs-unstable,
|
nixpkgs-unstable,
|
||||||
nixpkgs-yet-unstabler,
|
nixpkgs-yet-unstabler,
|
||||||
home-manager,
|
home-manager,
|
||||||
disko,
|
|
||||||
nixos-hardware,
|
nixos-hardware,
|
||||||
|
|
||||||
matrix-synapse-next,
|
matrix-synapse-next,
|
||||||
@@ -58,7 +55,7 @@
|
|||||||
minecraft,
|
minecraft,
|
||||||
osuchan,
|
osuchan,
|
||||||
sops-nix,
|
sops-nix,
|
||||||
# anyrun,
|
anyrun,
|
||||||
}: let
|
}: let
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
|
|
||||||
@@ -70,7 +67,10 @@
|
|||||||
android_sdk.accept_license = true;
|
android_sdk.accept_license = true;
|
||||||
segger-jlink.acceptLicense = true;
|
segger-jlink.acceptLicense = true;
|
||||||
permittedInsecurePackages = [
|
permittedInsecurePackages = [
|
||||||
"segger-jlink-qt4-810"
|
"segger-jlink-qt4-796s"
|
||||||
|
"dotnet-core-combined"
|
||||||
|
"dotnet-sdk-6.0.428"
|
||||||
|
"dotnet-sdk-wrapped-6.0.428"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -150,7 +150,6 @@
|
|||||||
cargo = ./home/modules/programs/cargo;
|
cargo = ./home/modules/programs/cargo;
|
||||||
colors = ./home/modules/colors.nix;
|
colors = ./home/modules/colors.nix;
|
||||||
direnv-auto-prune = ./home/modules/programs/direnv/auto-prune.nix;
|
direnv-auto-prune = ./home/modules/programs/direnv/auto-prune.nix;
|
||||||
downloads-sorter = ./home/modules/services/downloads-sorter.nix;
|
|
||||||
gpg = ./home/modules/programs/gpg;
|
gpg = ./home/modules/programs/gpg;
|
||||||
mpd-auto-updater = ./home/modules/services/mpd.nix;
|
mpd-auto-updater = ./home/modules/services/mpd.nix;
|
||||||
neovim-auto-clean-swapfiles = ./home/modules/programs/neovim/auto-clean-swapfiles.nix;
|
neovim-auto-clean-swapfiles = ./home/modules/programs/neovim/auto-clean-swapfiles.nix;
|
||||||
@@ -185,55 +184,6 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
pvv = home-manager.lib.homeManagerConfiguration {
|
|
||||||
inherit pkgs;
|
|
||||||
|
|
||||||
extraSpecialArgs = {
|
|
||||||
inherit inputs;
|
|
||||||
inherit unstable-pkgs;
|
|
||||||
inherit yet-unstabler-pkgs;
|
|
||||||
inherit (self) extendedLib;
|
|
||||||
machineName = "pvv-machine";
|
|
||||||
machineVars = {
|
|
||||||
headless = true;
|
|
||||||
# fixDisplayCommand = "echo 'not available'";
|
|
||||||
gaming = false;
|
|
||||||
development = true;
|
|
||||||
laptop = false;
|
|
||||||
battery = null;
|
|
||||||
wlanInterface = null;
|
|
||||||
wayland = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
modules = [
|
|
||||||
./home/home.nix
|
|
||||||
./modules/machineVars.nix
|
|
||||||
inputs.sops-nix.homeManagerModules.sops
|
|
||||||
({ config, pkgs, lib, ... }: {
|
|
||||||
home = {
|
|
||||||
username = lib.mkForce "oysteikt";
|
|
||||||
homeDirectory = lib.mkForce "/home/pvv/d/oysteikt";
|
|
||||||
stateVersion = "25.05";
|
|
||||||
packages = [
|
|
||||||
# NOTE: nix on pvv machines is severely outdated
|
|
||||||
# putting it in the path of home-manager
|
|
||||||
# will ensure we use the new one by default
|
|
||||||
config.nix.package
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
nix.package = pkgs.nix;
|
|
||||||
nix.settings.use-xdg-base-directories = lib.mkForce false;
|
|
||||||
|
|
||||||
local.shell.aliases."Nix Stuff" = {
|
|
||||||
nxr = lib.mkForce "echo \"Local rebuilds are not available on this machine\"";
|
|
||||||
nxrl = lib.mkForce "echo \"Local rebuilds are not available on this machine\"";
|
|
||||||
};
|
|
||||||
})
|
|
||||||
] ++ (builtins.attrValues self.homeModules);
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
nixosConfigurations = let
|
nixosConfigurations = let
|
||||||
@@ -277,6 +227,7 @@
|
|||||||
|
|
||||||
sharedModules = [
|
sharedModules = [
|
||||||
inputs.sops-nix.homeManagerModules.sops
|
inputs.sops-nix.homeManagerModules.sops
|
||||||
|
inputs.anyrun.homeManagerModules.default
|
||||||
] ++ (builtins.attrValues self.homeModules);
|
] ++ (builtins.attrValues self.homeModules);
|
||||||
|
|
||||||
users.h7x4.imports = [
|
users.h7x4.imports = [
|
||||||
@@ -325,11 +276,6 @@
|
|||||||
};
|
};
|
||||||
tsuki = nixSys "tsuki" {
|
tsuki = nixSys "tsuki" {
|
||||||
modules = [
|
modules = [
|
||||||
nixos-hardware.nixosModules.common-cpu-amd
|
|
||||||
nixos-hardware.nixosModules.common-pc-ssd
|
|
||||||
|
|
||||||
disko.nixosModules.default
|
|
||||||
|
|
||||||
matrix-synapse-next.nixosModules.default
|
matrix-synapse-next.nixosModules.default
|
||||||
osuchan.outputs.nixosModules.default
|
osuchan.outputs.nixosModules.default
|
||||||
maunium-stickerpicker.nixosModules.default
|
maunium-stickerpicker.nixosModules.default
|
||||||
|
|||||||
@@ -1,191 +0,0 @@
|
|||||||
{ config, lib, machineVars, ... }:
|
|
||||||
let
|
|
||||||
inherit (lib) mkForce mkIf optionals;
|
|
||||||
graphics = !machineVars.headless;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./config/gtk.nix
|
|
||||||
|
|
||||||
./programs/nix.nix
|
|
||||||
|
|
||||||
./programs/ahoviewer.nix
|
|
||||||
./programs/alacritty.nix
|
|
||||||
./programs/anki.nix
|
|
||||||
./programs/anyrun
|
|
||||||
./programs/aria2.nix
|
|
||||||
./programs/atuin.nix
|
|
||||||
./programs/bash.nix
|
|
||||||
./programs/bat.nix
|
|
||||||
./programs/beets.nix
|
|
||||||
./programs/bottom.nix
|
|
||||||
./programs/cargo.nix
|
|
||||||
# ./programs/comma.nix
|
|
||||||
./programs/delta.nix
|
|
||||||
./programs/direnv
|
|
||||||
./programs/element-desktop.nix
|
|
||||||
./programs/emacs
|
|
||||||
./programs/eza.nix
|
|
||||||
./programs/fastfetch.nix
|
|
||||||
./programs/feh.nix
|
|
||||||
./programs/firefox.nix
|
|
||||||
./programs/fzf.nix
|
|
||||||
./programs/gdb.nix
|
|
||||||
./programs/gh-dash.nix
|
|
||||||
./programs/gh.nix
|
|
||||||
./programs/ghci.nix
|
|
||||||
./programs/git
|
|
||||||
./programs/gpg.nix
|
|
||||||
./programs/home-manager.nix
|
|
||||||
./programs/hyprland
|
|
||||||
./programs/jq.nix
|
|
||||||
./programs/less.nix
|
|
||||||
./programs/man.nix
|
|
||||||
./programs/meli.nix
|
|
||||||
./programs/mpv.nix
|
|
||||||
./programs/ncmpcpp.nix
|
|
||||||
./programs/neomutt.nix
|
|
||||||
./programs/neovim
|
|
||||||
./programs/newsboat
|
|
||||||
./programs/nix-index
|
|
||||||
./programs/nushell.nix
|
|
||||||
./programs/nyxt.nix
|
|
||||||
./programs/obs-studio.nix
|
|
||||||
./programs/obsidian.nix
|
|
||||||
./programs/pandoc.nix
|
|
||||||
./programs/prism-launcher.nix
|
|
||||||
./programs/python.nix
|
|
||||||
./programs/qutebrowser.nix
|
|
||||||
./programs/rclone.nix
|
|
||||||
./programs/ripgrep.nix
|
|
||||||
./programs/rofi
|
|
||||||
./programs/skim.nix
|
|
||||||
./programs/sqlite.nix
|
|
||||||
./programs/ssh
|
|
||||||
./programs/taskwarrior.nix
|
|
||||||
./programs/tealdeer
|
|
||||||
./programs/texlive.nix
|
|
||||||
./programs/thunderbird.nix
|
|
||||||
./programs/tmux
|
|
||||||
./programs/uv.nix
|
|
||||||
./programs/vscode
|
|
||||||
./programs/waybar.nix
|
|
||||||
./programs/yazi.nix
|
|
||||||
./programs/yt-dlp.nix
|
|
||||||
./programs/zathura.nix
|
|
||||||
./programs/zed
|
|
||||||
./programs/zoxide.nix
|
|
||||||
./programs/zsh
|
|
||||||
|
|
||||||
./services/copyq.nix
|
|
||||||
./services/dunst.nix
|
|
||||||
./services/fcitx5.nix
|
|
||||||
./services/gnome-keyring.nix
|
|
||||||
./services/mpd.nix
|
|
||||||
./services/mpris-proxy.nix
|
|
||||||
./services/network-manager.nix
|
|
||||||
./services/nix-channel-update.nix
|
|
||||||
./services/psd.nix
|
|
||||||
./services/pueue.nix
|
|
||||||
./services/tumblerd.nix
|
|
||||||
] ++ (optionals (!machineVars.wayland) [
|
|
||||||
./programs/xmonad
|
|
||||||
# ./programs/xmobar
|
|
||||||
|
|
||||||
./services/picom.nix
|
|
||||||
./services/polybar.nix
|
|
||||||
./services/screen-locker.nix
|
|
||||||
# ./services/stalonetray.nix
|
|
||||||
./services/sxhkd.nix
|
|
||||||
]);
|
|
||||||
|
|
||||||
programs.aria2.enable = true;
|
|
||||||
programs.atuin.enable = true;
|
|
||||||
programs.bash.enable = true;
|
|
||||||
programs.bat.enable = true;
|
|
||||||
programs.beets.enable = true;
|
|
||||||
programs.bottom.enable = true;
|
|
||||||
programs.cargo.enable = true;
|
|
||||||
# programs.comma.enable = true;
|
|
||||||
programs.direnv.enable = true;
|
|
||||||
programs.eza.enable = true;
|
|
||||||
programs.fastfetch.enable = true;
|
|
||||||
programs.fzf.enable = true;
|
|
||||||
programs.gdb.enable = true;
|
|
||||||
programs.gh-dash.enable = true;
|
|
||||||
programs.gh.enable = true;
|
|
||||||
programs.ghci.enable = true;
|
|
||||||
programs.git.enable = true;
|
|
||||||
programs.gpg.enable = true;
|
|
||||||
programs.helix.enable = true;
|
|
||||||
programs.home-manager.enable = true;
|
|
||||||
programs.jq.enable = true;
|
|
||||||
programs.less.enable = true;
|
|
||||||
programs.man.enable = true;
|
|
||||||
programs.meli.enable = true;
|
|
||||||
programs.neomutt.enable = true;
|
|
||||||
programs.neovim.enable = true;
|
|
||||||
programs.nix-index.enable = true;
|
|
||||||
programs.nushell.enable = true;
|
|
||||||
programs.pandoc.enable = true;
|
|
||||||
programs.python.enable = true;
|
|
||||||
programs.rclone.enable = true;
|
|
||||||
programs.ripgrep.enable = true;
|
|
||||||
programs.skim.enable = true;
|
|
||||||
programs.sqlite.enable = true;
|
|
||||||
programs.ssh.enable = true;
|
|
||||||
programs.tealdeer.enable = true;
|
|
||||||
programs.tmux.enable = true;
|
|
||||||
programs.uv.enable = true;
|
|
||||||
programs.yazi.enable = true;
|
|
||||||
programs.yt-dlp.enable = true;
|
|
||||||
programs.zoxide.enable = true;
|
|
||||||
programs.zsh.enable = true;
|
|
||||||
|
|
||||||
services.pueue.enable = true;
|
|
||||||
|
|
||||||
gtk.enable = graphics;
|
|
||||||
|
|
||||||
programs.ahoviewer.enable = graphics;
|
|
||||||
programs.alacritty.enable = graphics;
|
|
||||||
programs.anki.enable = graphics;
|
|
||||||
programs.element-desktop.enable = graphics;
|
|
||||||
programs.emacs.enable = graphics;
|
|
||||||
programs.feh.enable = graphics;
|
|
||||||
programs.firefox.enable = graphics;
|
|
||||||
programs.mpv.enable = graphics;
|
|
||||||
programs.ncmpcpp.enable = graphics;
|
|
||||||
programs.newsboat.enable = graphics;
|
|
||||||
programs.nyxt.enable = graphics;
|
|
||||||
programs.obs-studio.enable = graphics;
|
|
||||||
programs.obsidian.enable = graphics;
|
|
||||||
programs.prism-launcher.enable = graphics;
|
|
||||||
programs.qutebrowser.enable = graphics;
|
|
||||||
programs.rofi.enable = graphics;
|
|
||||||
programs.taskwarrior.enable = graphics;
|
|
||||||
programs.texlive.enable = graphics;
|
|
||||||
programs.thunderbird.enable = graphics;
|
|
||||||
programs.vscode.enable = graphics;
|
|
||||||
programs.zathura.enable = graphics;
|
|
||||||
programs.zed-editor.enable = graphics;
|
|
||||||
|
|
||||||
services.copyq.enable = graphics;
|
|
||||||
services.dunst.enable = graphics;
|
|
||||||
services.gnome-keyring.enable = graphics;
|
|
||||||
services.kbfs.enable = graphics;
|
|
||||||
services.keybase.enable = graphics;
|
|
||||||
services.mpd.enable = graphics;
|
|
||||||
services.mpris-proxy.enable = graphics;
|
|
||||||
services.network-manager-applet.enable = graphics;
|
|
||||||
services.psd.enable = graphics;
|
|
||||||
services.tumblerd.enable = graphics;
|
|
||||||
|
|
||||||
i18n.inputMethod = mkIf graphics {
|
|
||||||
enable = true;
|
|
||||||
type = "fcitx5";
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.anyrun.enable = machineVars.wayland;
|
|
||||||
programs.waybar.enable = machineVars.wayland;
|
|
||||||
wayland.windowManager.hyprland.enable = machineVars.wayland;
|
|
||||||
}
|
|
||||||
@@ -1,129 +0,0 @@
|
|||||||
{ config, lib, ... }:
|
|
||||||
let
|
|
||||||
cfg = config.services.downloads-sorter;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
services.downloads-sorter = {
|
|
||||||
enable = true;
|
|
||||||
mappings = {
|
|
||||||
"archives" = [
|
|
||||||
"*.rar"
|
|
||||||
"*.zip"
|
|
||||||
"*.7z"
|
|
||||||
"*.tar"
|
|
||||||
|
|
||||||
"*.tar.bz2"
|
|
||||||
"*.tar.gz"
|
|
||||||
"*.tar.lz4"
|
|
||||||
"*.tar.lzma"
|
|
||||||
"*.tar.sz"
|
|
||||||
"*.tar.sz"
|
|
||||||
"*.tar.xz"
|
|
||||||
"*.tar.zst"
|
|
||||||
|
|
||||||
"*.tbz"
|
|
||||||
"*.tbz2"
|
|
||||||
"*.tgz"
|
|
||||||
"*.tlz4"
|
|
||||||
"*.tlzma"
|
|
||||||
"*.tsz"
|
|
||||||
"*.txz"
|
|
||||||
"*.tzst"
|
|
||||||
|
|
||||||
"*.bz2"
|
|
||||||
"*.gz"
|
|
||||||
"*.lz4"
|
|
||||||
"*.lzma"
|
|
||||||
"*.sz"
|
|
||||||
"*.sz"
|
|
||||||
"*.xz"
|
|
||||||
"*.zst"
|
|
||||||
];
|
|
||||||
|
|
||||||
"pictures" = {
|
|
||||||
createDirIfNotExists = false;
|
|
||||||
globs = [
|
|
||||||
"*.gif"
|
|
||||||
"*.jpeg"
|
|
||||||
"*.jpg"
|
|
||||||
"*.png"
|
|
||||||
"*.svg"
|
|
||||||
"*.webp"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
"docs" = {
|
|
||||||
createDirIfNotExists = false;
|
|
||||||
globs = [
|
|
||||||
"*.md"
|
|
||||||
|
|
||||||
"*.pdf"
|
|
||||||
"*.PDF" # why do people do this
|
|
||||||
|
|
||||||
"*.docx"
|
|
||||||
"*.doc"
|
|
||||||
|
|
||||||
"*.xlsx"
|
|
||||||
"*.xls"
|
|
||||||
|
|
||||||
"*.ppt"
|
|
||||||
"*.pptx"
|
|
||||||
|
|
||||||
"*.odt"
|
|
||||||
"*.ods"
|
|
||||||
"*.odp"
|
|
||||||
"*.odg"
|
|
||||||
"*.odf"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
"books" = {
|
|
||||||
createDirIfNotExists = false;
|
|
||||||
globs = [ "*.epub" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
"videos" = {
|
|
||||||
createDirIfNotExists = false;
|
|
||||||
globs = [
|
|
||||||
"*.mp4"
|
|
||||||
"*.webm"
|
|
||||||
"*.mov"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
"isos" = [
|
|
||||||
"*.iso"
|
|
||||||
"*.img"
|
|
||||||
];
|
|
||||||
"jars" = [ "*.jar" ];
|
|
||||||
"txt" = [ "*.txt" ];
|
|
||||||
"patches" = [
|
|
||||||
"*.patch"
|
|
||||||
"*.diff"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.user.tmpfiles.settings."10-downloads-sorter-service" = let
|
|
||||||
inherit (cfg) downloadsDirectory;
|
|
||||||
inherit (config.xdg) userDirs;
|
|
||||||
|
|
||||||
symlink = link: target: {
|
|
||||||
"${link}".L = {
|
|
||||||
user = config.home.username;
|
|
||||||
mode = "0770";
|
|
||||||
argument = "${target}";
|
|
||||||
};
|
|
||||||
|
|
||||||
"${target}".d = {
|
|
||||||
user = config.home.username;
|
|
||||||
mode = "0770";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
in lib.mkMerge [
|
|
||||||
(symlink "${downloadsDirectory}/books" "${userDirs.documents}/books/downloads")
|
|
||||||
(symlink "${downloadsDirectory}/docs" "${userDirs.documents}/downloads")
|
|
||||||
(symlink "${downloadsDirectory}/pictures" "${userDirs.pictures}/downloads")
|
|
||||||
(symlink "${downloadsDirectory}/videos" "${userDirs.videos}/downloads")
|
|
||||||
];
|
|
||||||
}
|
|
||||||
@@ -1,46 +1,27 @@
|
|||||||
{ config, ... }:
|
{ config, ... }:
|
||||||
{
|
let
|
||||||
systemd.user.tmpfiles.settings."05-homedir" = let
|
home = config.home.homeDirectory;
|
||||||
home = config.home.homeDirectory;
|
user = config.home.username;
|
||||||
user = config.home.username;
|
in {
|
||||||
|
systemd.user.tmpfiles.rules = [
|
||||||
|
"d ${home}/SD - ${user} - - -"
|
||||||
|
"d ${home}/ctf - ${user} - - -"
|
||||||
|
"d ${home}/git - ${user} - - -"
|
||||||
|
"d ${home}/pvv - ${user} - - -"
|
||||||
|
"d ${home}/work - ${user} - - -"
|
||||||
|
|
||||||
defaultDirConf = {
|
"d ${home}/pictures/icons - ${user} - - -"
|
||||||
d = {
|
"d ${home}/pictures/photos - ${user} - - -"
|
||||||
inherit user;
|
"d ${home}/pictures/screenshots - ${user} - - -"
|
||||||
mode = "0700";
|
"d ${home}/pictures/stickers - ${user} - - -"
|
||||||
};
|
"d ${home}/pictures/wallpapers - ${user} - - -"
|
||||||
};
|
|
||||||
|
|
||||||
symlink = target: {
|
"d ${home}/documents/books - ${user} - - -"
|
||||||
L = {
|
"d ${home}/documents/scans - ${user} - - -"
|
||||||
inherit user;
|
|
||||||
argument = target;
|
|
||||||
mode = "0600";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
in {
|
|
||||||
"${home}/SD" = defaultDirConf;
|
|
||||||
"${home}/ctf" = defaultDirConf;
|
|
||||||
"${home}/git" = defaultDirConf;
|
|
||||||
"${home}/pvv" = defaultDirConf;
|
|
||||||
"${home}/tmp" = defaultDirConf;
|
|
||||||
"${home}/work" = defaultDirConf;
|
|
||||||
|
|
||||||
"${home}/pictures/icons" = defaultDirConf;
|
"L ${home}/Downloads - ${user} - - ${home}/downloads"
|
||||||
"${home}/pictures/photos" = defaultDirConf;
|
|
||||||
"${home}/pictures/screenshots" = defaultDirConf;
|
|
||||||
"${home}/pictures/stickers" = defaultDirConf;
|
|
||||||
"${home}/pictures/wallpapers" = defaultDirConf;
|
|
||||||
|
|
||||||
"${home}/documents/books" = defaultDirConf;
|
"L ${config.xdg.dataHome}/wallpapers - ${user} - - ${home}/pictures/wallpapers"
|
||||||
"${home}/documents/manuals" = defaultDirConf;
|
"L ${config.home.sessionVariables.TEXMFHOME} - ${user} - - ${home}/git/texmf"
|
||||||
"${home}/documents/music-sheets" = defaultDirConf;
|
];
|
||||||
"${home}/documents/scans" = defaultDirConf;
|
|
||||||
"${home}/documents/schematics" = defaultDirConf;
|
|
||||||
|
|
||||||
"${home}/Downloads" = symlink "${home}/downloads";
|
|
||||||
|
|
||||||
"${config.xdg.dataHome}/wallpapers" = symlink "${home}/pictures/wallpapers";
|
|
||||||
"${config.home.sessionVariables.TEXMFHOME}" = symlink "${home}/git/texmf";
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
{ pkgs, config, ... }:
|
{ pkgs, config, machineVars, ... }:
|
||||||
{
|
{
|
||||||
gtk = {
|
gtk = pkgs.lib.mkIf (!machineVars.headless) {
|
||||||
|
enable = true;
|
||||||
font.name = "Droid Sans";
|
font.name = "Droid Sans";
|
||||||
|
|
||||||
iconTheme = {
|
iconTheme = {
|
||||||
|
|||||||
@@ -1,21 +1,16 @@
|
|||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
let
|
|
||||||
cfg = config.xdg.userDirs;
|
|
||||||
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./mimetypes.nix
|
./mimetypes.nix
|
||||||
./directory-spec-overrides.nix
|
./directory-spec-overrides.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
xdg = {
|
xdg = {
|
||||||
enable = true;
|
enable = true;
|
||||||
userDirs = {
|
userDirs = {
|
||||||
enable = true;
|
enable = true;
|
||||||
desktop = lib.mkDefault "${config.home.homeDirectory}/Desktop";
|
desktop = lib.mkDefault "${config.home.homeDirectory}/Desktop";
|
||||||
documents = lib.mkDefault "${config.home.homeDirectory}/documents";
|
documents = lib.mkDefault "${config.home.homeDirectory}/documents";
|
||||||
download = lib.mkDefault "${config.home.homeDirectory}/downloads";
|
download = lib.mkDefault "${config.home.homeDirectory}/Downloads";
|
||||||
music = lib.mkDefault "${config.home.homeDirectory}/music";
|
music = lib.mkDefault "${config.home.homeDirectory}/music";
|
||||||
pictures = lib.mkDefault "${config.home.homeDirectory}/pictures";
|
pictures = lib.mkDefault "${config.home.homeDirectory}/pictures";
|
||||||
publicShare = lib.mkDefault "${config.home.homeDirectory}/public";
|
publicShare = lib.mkDefault "${config.home.homeDirectory}/public";
|
||||||
@@ -23,25 +18,4 @@ in
|
|||||||
videos = lib.mkDefault "${config.home.homeDirectory}/videos";
|
videos = lib.mkDefault "${config.home.homeDirectory}/videos";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
home.sessionVariables.XDG_SCREENSHOTS_DIR = "${cfg.pictures}/screenshots";
|
|
||||||
|
|
||||||
systemd.user.tmpfiles.settings."05-xdg-userdirs" = let
|
|
||||||
dirCfg = {
|
|
||||||
d = {
|
|
||||||
user = config.home.username;
|
|
||||||
mode = "0700";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
in {
|
|
||||||
"${cfg.desktop}" = dirCfg;
|
|
||||||
"${cfg.documents}" = dirCfg;
|
|
||||||
"${cfg.download}" = dirCfg;
|
|
||||||
"${cfg.music}" = dirCfg;
|
|
||||||
"${cfg.pictures}" = dirCfg;
|
|
||||||
"${cfg.publicShare}" = dirCfg;
|
|
||||||
"${cfg.templates}" = dirCfg;
|
|
||||||
"${cfg.videos}" = dirCfg;
|
|
||||||
"${config.home.sessionVariables.XDG_SCREENSHOTS_DIR}" = dirCfg;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,12 +5,94 @@ in {
|
|||||||
imports = [
|
imports = [
|
||||||
./shell.nix
|
./shell.nix
|
||||||
./packages.nix
|
./packages.nix
|
||||||
./breakerbox.nix
|
|
||||||
|
|
||||||
./config/xdg
|
./config/xdg
|
||||||
./config/ensure-homedir-structure.nix
|
./config/ensure-homedir-structure.nix
|
||||||
./config/downloads-sorter.nix
|
|
||||||
];
|
./programs/aria2.nix
|
||||||
|
./programs/atuin.nix
|
||||||
|
./programs/bash.nix
|
||||||
|
./programs/bat.nix
|
||||||
|
./programs/beets.nix
|
||||||
|
./programs/bottom.nix
|
||||||
|
./programs/cargo.nix
|
||||||
|
./programs/comma.nix
|
||||||
|
./programs/direnv
|
||||||
|
./programs/eza.nix
|
||||||
|
./programs/fzf.nix
|
||||||
|
./programs/gdb.nix
|
||||||
|
./programs/gh-dash.nix
|
||||||
|
./programs/gh.nix
|
||||||
|
./programs/git
|
||||||
|
./programs/gpg.nix
|
||||||
|
./programs/home-manager.nix
|
||||||
|
./programs/jq.nix
|
||||||
|
./programs/less.nix
|
||||||
|
./programs/man.nix
|
||||||
|
./programs/neovim
|
||||||
|
./programs/nix-index
|
||||||
|
./programs/nix.nix
|
||||||
|
./programs/nushell.nix
|
||||||
|
./programs/pandoc.nix
|
||||||
|
./programs/python.nix
|
||||||
|
./programs/ripgrep.nix
|
||||||
|
./programs/skim.nix
|
||||||
|
./programs/sqlite.nix
|
||||||
|
./programs/ssh
|
||||||
|
./programs/tealdeer
|
||||||
|
./programs/texlive.nix
|
||||||
|
./programs/thunderbird.nix
|
||||||
|
./programs/tmux
|
||||||
|
./programs/uv.nix
|
||||||
|
./programs/yt-dlp.nix
|
||||||
|
./programs/zoxide.nix
|
||||||
|
./programs/zsh
|
||||||
|
|
||||||
|
./services/nix-channel-update.nix
|
||||||
|
./services/pueue.nix
|
||||||
|
] ++ (optionals graphics [
|
||||||
|
./config/gtk.nix
|
||||||
|
|
||||||
|
./programs/alacritty.nix
|
||||||
|
./programs/emacs
|
||||||
|
./programs/feh.nix
|
||||||
|
./programs/firefox.nix
|
||||||
|
./programs/mpv.nix
|
||||||
|
./programs/ncmpcpp.nix
|
||||||
|
./programs/newsboat
|
||||||
|
./programs/obs-studio.nix
|
||||||
|
./programs/prism-launcher.nix
|
||||||
|
./programs/qutebrowser.nix
|
||||||
|
./programs/rofi
|
||||||
|
./programs/taskwarrior.nix
|
||||||
|
./programs/vscode
|
||||||
|
./programs/zathura.nix
|
||||||
|
./programs/zed
|
||||||
|
|
||||||
|
./services/copyq.nix
|
||||||
|
./services/dunst.nix
|
||||||
|
./services/fcitx5.nix
|
||||||
|
./services/gnome-keyring.nix
|
||||||
|
./services/keybase.nix
|
||||||
|
./services/mpd.nix
|
||||||
|
./services/mpris-proxy.nix
|
||||||
|
./services/network-manager.nix
|
||||||
|
./services/psd.nix
|
||||||
|
./services/tumblerd.nix
|
||||||
|
]) ++ (optionals machineVars.wayland [
|
||||||
|
./programs/hyprland.nix
|
||||||
|
./programs/waybar.nix
|
||||||
|
./programs/anyrun
|
||||||
|
]) ++ (optionals (!machineVars.wayland) [
|
||||||
|
./programs/xmonad
|
||||||
|
# ./programs/xmobar
|
||||||
|
|
||||||
|
./services/picom.nix
|
||||||
|
./services/polybar.nix
|
||||||
|
./services/screen-locker.nix
|
||||||
|
# ./services/stalonetray.nix
|
||||||
|
./services/sxhkd.nix
|
||||||
|
]);
|
||||||
|
|
||||||
sops.defaultSopsFile = ../secrets/home.yaml;
|
sops.defaultSopsFile = ../secrets/home.yaml;
|
||||||
sops.age.sshKeyPaths = [ "${config.home.homeDirectory}/.ssh/id_ed25519_home_sops" ];
|
sops.age.sshKeyPaths = [ "${config.home.homeDirectory}/.ssh/id_ed25519_home_sops" ];
|
||||||
@@ -33,7 +115,8 @@ in {
|
|||||||
package = pkgs.capitaine-cursors;
|
package = pkgs.capitaine-cursors;
|
||||||
name = "capitaine-cursors";
|
name = "capitaine-cursors";
|
||||||
size = 16;
|
size = 16;
|
||||||
dotIcons.enable = false;
|
# TODO: enable in 25.05
|
||||||
|
# dotIcons = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
keyboard.options = [ "caps:escape" ];
|
keyboard.options = [ "caps:escape" ];
|
||||||
@@ -57,6 +140,12 @@ in {
|
|||||||
profilePath = ".config/X11/xprofile";
|
profilePath = ".config/X11/xprofile";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
xdg.configFile = {
|
||||||
|
"ghc/ghci.conf".text = ''
|
||||||
|
:set prompt "${extendedLib.termColors.front.magenta "[GHCi]λ"} "
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
news.display = "silent";
|
news.display = "silent";
|
||||||
|
|
||||||
fonts.fontconfig.enable = mkForce true;
|
fonts.fontconfig.enable = mkForce true;
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ in
|
|||||||
|
|
||||||
Service = {
|
Service = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
Slice = "background.slice";
|
|
||||||
CPUSchedulingPolicy = "idle";
|
CPUSchedulingPolicy = "idle";
|
||||||
IOSchedulingClass = "idle";
|
IOSchedulingClass = "idle";
|
||||||
ExecStart = "${lib.getExe cfg.package} prune";
|
ExecStart = "${lib.getExe cfg.package} prune";
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ in
|
|||||||
|
|
||||||
Service = {
|
Service = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
Slice = "background.slice";
|
|
||||||
CPUSchedulingPolicy = "idle";
|
CPUSchedulingPolicy = "idle";
|
||||||
IOSchedulingClass = "idle";
|
IOSchedulingClass = "idle";
|
||||||
ExecStart = "${lib.getExe cfg.package} --refresh-keys";
|
ExecStart = "${lib.getExe cfg.package} --refresh-keys";
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ in
|
|||||||
|
|
||||||
Service = {
|
Service = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
Slice = "background.slice";
|
|
||||||
CPUSchedulingPolicy = "idle";
|
CPUSchedulingPolicy = "idle";
|
||||||
IOSchedulingClass = "idle";
|
IOSchedulingClass = "idle";
|
||||||
ExecStart = "${lib.getExe cfg.package} --update-trustdb";
|
ExecStart = "${lib.getExe cfg.package} --update-trustdb";
|
||||||
|
|||||||
@@ -31,7 +31,6 @@ in
|
|||||||
|
|
||||||
Service = {
|
Service = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
Slice = "background.slice";
|
|
||||||
CPUSchedulingPolicy = "idle";
|
CPUSchedulingPolicy = "idle";
|
||||||
IOSchedulingClass = "idle";
|
IOSchedulingClass = "idle";
|
||||||
ExecStart = lib.getExe (pkgs.writeShellApplication {
|
ExecStart = lib.getExe (pkgs.writeShellApplication {
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ in
|
|||||||
|
|
||||||
Service = {
|
Service = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
Slice = "background.slice";
|
|
||||||
CPUSchedulingPolicy = "idle";
|
CPUSchedulingPolicy = "idle";
|
||||||
IOSchedulingClass = "idle";
|
IOSchedulingClass = "idle";
|
||||||
ExecStart = "${lib.getExe pkgs.flock} %t/newsboat.lock ${lib.getExe package} --execute=reload";
|
ExecStart = "${lib.getExe pkgs.flock} %t/newsboat.lock ${lib.getExe package} --execute=reload";
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ in
|
|||||||
|
|
||||||
Service = {
|
Service = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
Slice = "background.slice";
|
|
||||||
CPUSchedulingPolicy = "idle";
|
CPUSchedulingPolicy = "idle";
|
||||||
IOSchedulingClass = "idle";
|
IOSchedulingClass = "idle";
|
||||||
ExecStart = "${lib.getExe pkgs.flock} %t/newsboat.lock ${lib.getExe package} --vacuum";
|
ExecStart = "${lib.getExe pkgs.flock} %t/newsboat.lock ${lib.getExe package} --vacuum";
|
||||||
|
|||||||
@@ -44,7 +44,6 @@ in
|
|||||||
|
|
||||||
Service = {
|
Service = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
Slice = "background.slice";
|
|
||||||
ExecStart = lib.getExe (pkgs.writeShellApplication {
|
ExecStart = lib.getExe (pkgs.writeShellApplication {
|
||||||
name = "fetch-nix-index-database";
|
name = "fetch-nix-index-database";
|
||||||
runtimeInputs = with pkgs; [
|
runtimeInputs = with pkgs; [
|
||||||
|
|||||||
@@ -3,10 +3,6 @@ let
|
|||||||
cfg = config.programs.prism-launcher;
|
cfg = config.programs.prism-launcher;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
|
||||||
../../systemd-tmpfiles.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
options.programs.prism-launcher = {
|
options.programs.prism-launcher = {
|
||||||
enable = lib.mkEnableOption "PrismLauncher, an open source minecraft launcher";
|
enable = lib.mkEnableOption "PrismLauncher, an open source minecraft launcher";
|
||||||
|
|
||||||
@@ -61,7 +57,6 @@ in
|
|||||||
Unit.Description = "Watchdog that moves screenshots from all prismlauncher minecraft instances into a common dir";
|
Unit.Description = "Watchdog that moves screenshots from all prismlauncher minecraft instances into a common dir";
|
||||||
Service = {
|
Service = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
Slice = "background.slice";
|
|
||||||
ExecStart = lib.getExe (pkgs.writeShellApplication {
|
ExecStart = lib.getExe (pkgs.writeShellApplication {
|
||||||
name = "prismlauncher-move-minecraft-screenshots.sh";
|
name = "prismlauncher-move-minecraft-screenshots.sh";
|
||||||
runtimeInputs = with pkgs; [ coreutils findutils ];
|
runtimeInputs = with pkgs; [ coreutils findutils ];
|
||||||
@@ -101,10 +96,8 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.user.tmpfiles.settings."10-prismlauncher" = lib.mkIf cfg.screenshotMover.enable {
|
systemd.user.tmpfiles.rules = lib.mkIf cfg.screenshotMover.enable [
|
||||||
${cfg.screenshotMover.screenshotDir}.d = {
|
"'d' '${cfg.screenshotMover.screenshotDir}' - ${config.home.username} - - -"
|
||||||
user = config.home.username;
|
];
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,160 +1,5 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ ... }:
|
||||||
let
|
|
||||||
cfg = config.services.downloads-sorter;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
imports = [
|
# TODO: create abstraction over `systemd.path` thingy that looks at incoming files and
|
||||||
../systemd-tmpfiles.nix
|
# sorts them into subdirs by extension.
|
||||||
];
|
|
||||||
|
|
||||||
options.services.downloads-sorter = {
|
|
||||||
enable = lib.mkEnableOption "downloads sorter units, path activated units to keep the download dir clean";
|
|
||||||
|
|
||||||
downloadsDirectory = lib.mkOption {
|
|
||||||
type = lib.types.path;
|
|
||||||
description = "Which directory to keep clean";
|
|
||||||
default = if config.xdg.userDirs.enable then config.xdg.userDirs.download else "${config.home.homeDirectory}/Downloads";
|
|
||||||
defaultText = ''
|
|
||||||
if config.xdg.userDirs.enable then config.xdg.userDirs.download else "''${config.home.homeDirectory}/Downloads"
|
|
||||||
'';
|
|
||||||
example = ''
|
|
||||||
"''${config.home.homeDirectory}/downloads"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
mappings = lib.mkOption {
|
|
||||||
type = let
|
|
||||||
mappingType = lib.types.submodule ({ name, ... }: {
|
|
||||||
options = {
|
|
||||||
unitName = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
description = ''
|
|
||||||
The basename of the path/service unit responsible for this mapping
|
|
||||||
'';
|
|
||||||
default = "downloads-sorter@${name}";
|
|
||||||
example = "downloads-sorter@asdf";
|
|
||||||
};
|
|
||||||
|
|
||||||
dir = lib.mkOption {
|
|
||||||
type = lib.types.path;
|
|
||||||
description = ''
|
|
||||||
Absolute path to the directory where matching files should be moved.
|
|
||||||
'';
|
|
||||||
default = if builtins.substring 0 1 name == "/" then name else "${cfg.downloadsDirectory}/${name}";
|
|
||||||
defaultText = ''
|
|
||||||
if builtins.substring 0 1 name == "/" then name else "''${config.services.downloads-sorter.downloadsDirectory}/''${name}"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
globs = lib.mkOption {
|
|
||||||
type = with lib.types; listOf str;
|
|
||||||
description = ''
|
|
||||||
A list of globs that match the files that should be moved.
|
|
||||||
'';
|
|
||||||
example = [
|
|
||||||
"*.jpg"
|
|
||||||
"IMG_*_2020_*.png"
|
|
||||||
];
|
|
||||||
apply = map (g: "${cfg.downloadsDirectory}/${g}");
|
|
||||||
};
|
|
||||||
|
|
||||||
createDirIfNotExists = lib.mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
description = ''
|
|
||||||
Whether to create the target directory if it does not exist yet.
|
|
||||||
|
|
||||||
Turn this off if you'd like the target directory to be a symlink or similar.
|
|
||||||
'';
|
|
||||||
default = true;
|
|
||||||
example = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
# TODO: allow specifying a dynamic filter together with a system path trigger in an attrset.
|
|
||||||
};
|
|
||||||
});
|
|
||||||
in with lib.types; attrsOf (coercedTo (listOf str) (globs: { inherit globs; }) mappingType);
|
|
||||||
description = ''
|
|
||||||
A mapping from a file pattern to the location where it should be moved.
|
|
||||||
|
|
||||||
By default, the output mapping is relative to the download dir.
|
|
||||||
If an absolute path is given, the sorter will move the files out of the downloads dir.
|
|
||||||
'';
|
|
||||||
default = { };
|
|
||||||
example = {
|
|
||||||
"pictures" = [
|
|
||||||
"*.png"
|
|
||||||
"*.jpg"
|
|
||||||
];
|
|
||||||
"documents" = {
|
|
||||||
createDirIfNotExists = false;
|
|
||||||
globs = [ "*.pdf" ];
|
|
||||||
};
|
|
||||||
"/home/<user>/archives" = [ "*.rar" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
systemd.user.paths = lib.mapAttrs' (dir: mapping: {
|
|
||||||
name = mapping.unitName;
|
|
||||||
value = {
|
|
||||||
Install.WantedBy = [ "paths.target" ];
|
|
||||||
Path = {
|
|
||||||
PathExistsGlob = mapping.globs;
|
|
||||||
Unit = "${mapping.unitName}.service";
|
|
||||||
TriggerLimitIntervalSec = "1s";
|
|
||||||
TriggerLimitBurst = "1";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}) cfg.mappings;
|
|
||||||
|
|
||||||
# TODO: deduplicate
|
|
||||||
systemd.user.services = lib.mapAttrs' (dir: mapping: {
|
|
||||||
name = mapping.unitName;
|
|
||||||
value = {
|
|
||||||
Unit.Description = "Downloads directory watchdog, sorts the downloads directory";
|
|
||||||
Service = {
|
|
||||||
Type = "oneshot";
|
|
||||||
Slice = "background.slice";
|
|
||||||
SyslogIdentifier = mapping.unitName;
|
|
||||||
ExecStart = let
|
|
||||||
script = pkgs.writeShellApplication {
|
|
||||||
name = "downloads-sorter-${dir}.sh";
|
|
||||||
runtimeInputs = [ pkgs.coreutils ];
|
|
||||||
text = ''
|
|
||||||
shopt -s nullglob
|
|
||||||
|
|
||||||
FILES=(${builtins.concatStringsSep " " mapping.globs})
|
|
||||||
|
|
||||||
for file in "''${FILES[@]}"; do
|
|
||||||
echo "$file -> ${mapping.dir}"
|
|
||||||
mv "$file" '${mapping.dir}'
|
|
||||||
done
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
in lib.getExe script;
|
|
||||||
|
|
||||||
PrivateUsers = true;
|
|
||||||
ProtectSystem = true;
|
|
||||||
NoNewPrivileges = true;
|
|
||||||
ProtectKernelTunables = true;
|
|
||||||
ProtectControlGroups = true;
|
|
||||||
PrivateNetwork = true;
|
|
||||||
RestrictNamespaces = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}) cfg.mappings;
|
|
||||||
|
|
||||||
systemd.user.tmpfiles.settings."10-downloads-sorter-service" = let
|
|
||||||
absolutePaths = lib.pipe cfg.mappings [
|
|
||||||
builtins.attrValues
|
|
||||||
(builtins.filter (m: m.createDirIfNotExists))
|
|
||||||
(map (m: m.dir))
|
|
||||||
];
|
|
||||||
in lib.genAttrs absolutePaths (_: {
|
|
||||||
d = {
|
|
||||||
user = config.home.username;
|
|
||||||
};
|
|
||||||
});
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,8 +36,7 @@ in
|
|||||||
};
|
};
|
||||||
Service = {
|
Service = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
Slice = "background.slice";
|
ExecStart = "${lib.getExe pkgs.mpc-cli} update --wait";
|
||||||
ExecStart = "${lib.getExe pkgs.mpc} update --wait";
|
|
||||||
|
|
||||||
PrivateUsers = true;
|
PrivateUsers = true;
|
||||||
ProtectSystem = true;
|
ProtectSystem = true;
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
isAlias = v: builtins.isAttrs v && v ? alias;
|
isAlias = v: builtins.isAttrs v && v ? "alias" && v ? "type";
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
lib = formatLib;
|
lib = formatLib;
|
||||||
@@ -47,29 +47,6 @@
|
|||||||
"grep nix"
|
"grep nix"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
shells = lib.mkOption {
|
|
||||||
description = "List of shells for which the alias is valid.";
|
|
||||||
type = with lib.types; listOf (enum [
|
|
||||||
"bash"
|
|
||||||
"zsh"
|
|
||||||
"fish"
|
|
||||||
"nushell"
|
|
||||||
]);
|
|
||||||
default = [
|
|
||||||
"bash"
|
|
||||||
"zsh"
|
|
||||||
"fish"
|
|
||||||
"nushell"
|
|
||||||
];
|
|
||||||
example = [
|
|
||||||
"bash"
|
|
||||||
"zsh"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
# TODO:
|
|
||||||
# subshell = lib.mkEnableOption "" // {
|
|
||||||
# description = "Whether to run the aliased command in a subshell";
|
|
||||||
# };
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -78,36 +55,49 @@
|
|||||||
type = " ";
|
type = " ";
|
||||||
alias = [ str ];
|
alias = [ str ];
|
||||||
};
|
};
|
||||||
in addCheck (coercedTo str coerce rawAliasType) (v: builtins.isString v || formatLib.isAlias v);
|
in (coercedTo str coerce rawAliasType) // {
|
||||||
|
check = v: builtins.isString v || formatLib.isAlias v;
|
||||||
aliasTreeType = with lib.types; attrsOf (either coercedAliasType aliasTreeType) // {
|
|
||||||
description = "Alias tree";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
aliasTreeType = with lib.types; attrsOf (either coercedAliasType aliasTreeType);
|
||||||
in aliasTreeType;
|
in aliasTreeType;
|
||||||
|
|
||||||
# Alias Tree -> String -> { :: Alias }
|
# Alias Tree -> { :: Alias }
|
||||||
generateAttrs = shell: let
|
generateAttrs = let
|
||||||
generateAttrs' = attrset: lib.pipe attrset [
|
inherit (lib) mapAttrs attrValues filterAttrs isAttrs
|
||||||
(attrset: {
|
isString concatStringsSep foldr;
|
||||||
right = lib.filterAttrs (_: v: formatLib.isAlias v) attrset;
|
|
||||||
wrong = lib.filterAttrs (_: v: !(formatLib.isAlias v)) attrset;
|
applyFunctor = attrset: formatLib.functors.${attrset.type}.apply attrset;
|
||||||
})
|
|
||||||
({ right, wrong }:
|
# TODO: better naming
|
||||||
# Leaf nodes
|
allAttrValuesAreStrings = attrset: let
|
||||||
(lib.pipe right [
|
|
||||||
(lib.filterAttrs (_: v: lib.elem shell v.shells))
|
# [ {String} ]
|
||||||
(builtins.mapAttrs (_: v: formatLib.functors.${v.type}.apply v))
|
filteredAliases = [(filterAttrs (_: isString) attrset)];
|
||||||
])
|
|
||||||
//
|
# [ {String} ]
|
||||||
# Subsets
|
remainingFunctors = let
|
||||||
(lib.pipe wrong [
|
functorSet = filterAttrs (_: formatLib.isAlias) attrset;
|
||||||
builtins.attrValues
|
appliedFunctorSet = mapAttrs (_: applyFunctor) functorSet;
|
||||||
(map generateAttrs')
|
in [ appliedFunctorSet ];
|
||||||
(lib.foldr (a: b: a // b) { })
|
|
||||||
])
|
# [ {AttrSet} ]
|
||||||
)
|
remainingAliasSets = attrValues (filterAttrs (_: v: isAttrs v && !formatLib.isAlias v) attrset);
|
||||||
];
|
|
||||||
in generateAttrs';
|
# [ {String} ]
|
||||||
|
recursedAliasSets = filteredAliases
|
||||||
|
++ (remainingFunctors)
|
||||||
|
++ (map allAttrValuesAreStrings remainingAliasSets);
|
||||||
|
in foldr (a: b: a // b) {} recursedAliasSets;
|
||||||
|
|
||||||
|
in
|
||||||
|
allAttrValuesAreStrings;
|
||||||
|
|
||||||
|
# TODO:
|
||||||
|
# generateAttrs = pipe [
|
||||||
|
# collect leave nodes
|
||||||
|
# map apply functor
|
||||||
|
# ]
|
||||||
|
|
||||||
# Alias Tree -> String
|
# Alias Tree -> String
|
||||||
generateText = aliases: let
|
generateText = aliases: let
|
||||||
@@ -253,20 +243,20 @@ in {
|
|||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
zsh = {
|
zsh = {
|
||||||
shellAliases = shellAliasesFormat.generateAttrs "zsh" cfg.aliases;
|
shellAliases = shellAliasesFormat.generateAttrs cfg.aliases;
|
||||||
sessionVariables = cfg.variables;
|
sessionVariables = cfg.variables;
|
||||||
};
|
};
|
||||||
bash = {
|
bash = {
|
||||||
shellAliases = shellAliasesFormat.generateAttrs "bash" cfg.aliases;
|
shellAliases = shellAliasesFormat.generateAttrs cfg.aliases;
|
||||||
sessionVariables = cfg.variables;
|
sessionVariables = cfg.variables;
|
||||||
};
|
};
|
||||||
fish = {
|
fish = {
|
||||||
shellAliases = shellAliasesFormat.generateAttrs "fish" cfg.aliases;
|
shellAliases = shellAliasesFormat.generateAttrs cfg.aliases;
|
||||||
# TODO: fish does not support session variables?
|
# TODO: fish does not support session variables?
|
||||||
# localVariables = cfg.variables;
|
# localVariables = cfg.variables;
|
||||||
};
|
};
|
||||||
nushell = {
|
nushell = {
|
||||||
shellAliases = shellAliasesFormat.generateAttrs "nushell" cfg.aliases;
|
shellAliases = shellAliasesFormat.generateAttrs cfg.aliases;
|
||||||
environmentVariables = cfg.variables;
|
environmentVariables = cfg.variables;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ pkgs, yet-unstabler-pkgs, config, machineVars, machineName, ... }:
|
{ pkgs, config, machineVars, machineName, ... }:
|
||||||
{
|
{
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
bandwhich
|
bandwhich
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
cyme
|
cyme
|
||||||
czkawka
|
czkawka
|
||||||
difftastic
|
difftastic
|
||||||
# diskonaut
|
diskonaut
|
||||||
duf
|
duf
|
||||||
duff
|
duff
|
||||||
fclones
|
fclones
|
||||||
@@ -35,9 +35,11 @@
|
|||||||
lurk
|
lurk
|
||||||
mdcat
|
mdcat
|
||||||
mediainfo
|
mediainfo
|
||||||
|
meli
|
||||||
mkvtoolnix
|
mkvtoolnix
|
||||||
mmv
|
mmv
|
||||||
mtr
|
mtr
|
||||||
|
neofetch
|
||||||
nix-diff
|
nix-diff
|
||||||
nix-output-monitor
|
nix-output-monitor
|
||||||
nix-tree
|
nix-tree
|
||||||
@@ -50,10 +52,12 @@
|
|||||||
pipr
|
pipr
|
||||||
progress
|
progress
|
||||||
pwntools
|
pwntools
|
||||||
|
rclone
|
||||||
rip2
|
rip2
|
||||||
rnr
|
rnr
|
||||||
rsync
|
rsync
|
||||||
# sc-im
|
# sc-im
|
||||||
|
skim
|
||||||
slack-term
|
slack-term
|
||||||
tea
|
tea
|
||||||
terminal-parrot
|
terminal-parrot
|
||||||
@@ -83,16 +87,19 @@
|
|||||||
xorg.xprop
|
xorg.xprop
|
||||||
] ++ (
|
] ++ (
|
||||||
lib.optionals (!machineVars.headless) [
|
lib.optionals (!machineVars.headless) [
|
||||||
|
ahoviewer
|
||||||
alsa-utils
|
alsa-utils
|
||||||
kdePackages.ark
|
anki
|
||||||
|
ark
|
||||||
calibre
|
calibre
|
||||||
cool-retro-term
|
cool-retro-term
|
||||||
darktable
|
darktable
|
||||||
yet-unstabler-pkgs.discord
|
discord
|
||||||
|
element-desktop
|
||||||
foliate
|
foliate
|
||||||
geogebra
|
geogebra
|
||||||
ghidra
|
ghidra
|
||||||
gimp3-with-plugins
|
gimp
|
||||||
gnome-font-viewer
|
gnome-font-viewer
|
||||||
google-chrome
|
google-chrome
|
||||||
imhex
|
imhex
|
||||||
@@ -103,19 +110,20 @@
|
|||||||
kid3
|
kid3
|
||||||
koreader
|
koreader
|
||||||
krita
|
krita
|
||||||
# kdePackages.ktouch
|
ktouch
|
||||||
libnotify
|
libnotify
|
||||||
libreoffice
|
libreoffice
|
||||||
light
|
light
|
||||||
mission-center
|
mission-center
|
||||||
# mopidy
|
mopidy
|
||||||
# mopidy-mpd
|
mopidy-mpd
|
||||||
# mopidy-soundcloud
|
mopidy-soundcloud
|
||||||
# mopidy-youtube
|
mopidy-youtube
|
||||||
mpc
|
mpc_cli
|
||||||
mumble
|
|
||||||
naps2
|
naps2
|
||||||
nsxiv
|
nsxiv
|
||||||
|
nyxt
|
||||||
|
obsidian
|
||||||
pdfarranger
|
pdfarranger
|
||||||
pwvucontrol
|
pwvucontrol
|
||||||
# scrcpy
|
# scrcpy
|
||||||
@@ -150,12 +158,12 @@
|
|||||||
touchegg
|
touchegg
|
||||||
] ++ lib.optionals (machineVars.gaming) [
|
] ++ lib.optionals (machineVars.gaming) [
|
||||||
desmume
|
desmume
|
||||||
# osu-lazer
|
osu-lazer
|
||||||
# retroarchFull
|
retroarchFull
|
||||||
steam
|
steam
|
||||||
steam-tui
|
steam-tui
|
||||||
stepmania
|
stepmania
|
||||||
# taisei
|
taisei
|
||||||
] ++ lib.optionals (machineName != "dosei") [
|
] ++ lib.optionals (machineName != "dosei") [
|
||||||
# Source blocked by external firewall on dosei
|
# Source blocked by external firewall on dosei
|
||||||
pcloud
|
pcloud
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
{ ... }:
|
|
||||||
{
|
|
||||||
programs.ahoviewer = { };
|
|
||||||
}
|
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
{ pkgs, lib, config, ... }:
|
{ pkgs, lib, config, ... }:
|
||||||
{
|
{
|
||||||
programs.alacritty = {
|
programs.alacritty = {
|
||||||
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
window = {
|
window = {
|
||||||
padding = { x = 15; y = 15; };
|
padding = { x = 15; y = 15; };
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
{ ... }:
|
|
||||||
{
|
|
||||||
programs.anki = { };
|
|
||||||
}
|
|
||||||
@@ -1,18 +1,20 @@
|
|||||||
{ pkgs, lib, ... }:
|
{ pkgs, lib, inputs, ... }:
|
||||||
{
|
{
|
||||||
programs.anyrun = {
|
programs.anyrun = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
y.fraction = 0.3;
|
y.fraction = 0.3;
|
||||||
width.fraction = 0.25;
|
width.fraction = 0.25;
|
||||||
plugins = [
|
plugins = [
|
||||||
"${pkgs.anyrun}/lib/libapplications.so"
|
inputs.anyrun.packages.${pkgs.system}.applications
|
||||||
];
|
];
|
||||||
hidePluginInfo = true;
|
hidePluginInfo = true;
|
||||||
closeOnClick = true;
|
closeOnClick = true;
|
||||||
showResultsImmediately = true;
|
showResultsImmediately = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
extraCss = builtins.readFile ./style.css;
|
extraCss = builtins.readFile (./. + "/style.css");
|
||||||
|
|
||||||
extraConfigFiles."applications.ron".text = let
|
extraConfigFiles."applications.ron".text = let
|
||||||
preprocess_script = pkgs.writeShellApplication {
|
preprocess_script = pkgs.writeShellApplication {
|
||||||
@@ -28,10 +30,7 @@
|
|||||||
desktop_actions: false,
|
desktop_actions: false,
|
||||||
max_entries: 10,
|
max_entries: 10,
|
||||||
preprocess_exec_script: Some("${lib.getExe preprocess_script}"),
|
preprocess_exec_script: Some("${lib.getExe preprocess_script}"),
|
||||||
terminal: Some(Terminal(
|
terminal: Some("${lib.getExe pkgs.alacritty}"),
|
||||||
command: "${lib.getExe pkgs.alacritty}",
|
|
||||||
args: "-e {}",
|
|
||||||
)),
|
|
||||||
)
|
)
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
programs.aria2 = { };
|
programs.aria2.enable = true;
|
||||||
}
|
}
|
||||||
@@ -1,10 +1,11 @@
|
|||||||
{ config, lib, ... }:
|
{ config, ... }:
|
||||||
let
|
let
|
||||||
cfg = config.programs.atuin;
|
cfg = config.programs.atuin;
|
||||||
xdg_runtime_dir = "/run/user/${toString config.home.uid}";
|
xdg_runtime_dir = "/run/user/${toString config.home.uid}";
|
||||||
in
|
in
|
||||||
lib.mkIf cfg.enable {
|
{
|
||||||
programs.atuin = {
|
programs.atuin = {
|
||||||
|
enable = true;
|
||||||
enableBashIntegration = true;
|
enableBashIntegration = true;
|
||||||
enableZshIntegration = true;
|
enableZshIntegration = true;
|
||||||
enableNushellIntegration = config.programs.nushell.enable;
|
enableNushellIntegration = config.programs.nushell.enable;
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
{ config, lib, ... }:
|
{ config, ... }:
|
||||||
let
|
|
||||||
cfg = config.programs.bash;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
programs.bash = {
|
programs.bash = {
|
||||||
|
enable = true;
|
||||||
historyFile = "${config.xdg.dataHome}/bash_history";
|
historyFile = "${config.xdg.dataHome}/bash_history";
|
||||||
historySize = 100000;
|
historySize = 100000;
|
||||||
bashrcExtra = ''
|
bashrcExtra = ''
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
programs.bat = { };
|
programs.bat.enable = true;
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
programs.beets = { };
|
programs.beets.enable = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
{ config, lib, ... }:
|
{ ... }:
|
||||||
let
|
|
||||||
cfg = config.programs.bottom;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
programs.bottom = {
|
programs.bottom = {
|
||||||
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
flags.enable_gpu = true;
|
flags.enable_gpu = true;
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
{ pkgs, lib, ... }:
|
{ pkgs, lib, ... }:
|
||||||
{
|
{
|
||||||
"amazondotcom-us".metaData.hidden = true;
|
"Amazon.com".metaData.hidden = true;
|
||||||
"bing".metaData.hidden = true;
|
"Bing".metaData.hidden = true;
|
||||||
"wikipedia".metaData.hidden = true;
|
"Wikipedia (en)".metaData.hidden = true;
|
||||||
"google".metaData.alias = "gg";
|
"Google".metaData.alias = "gg";
|
||||||
"ddg".metaData.alias = "dd";
|
"DuckDuckGo".metaData.alias = "dd";
|
||||||
|
|
||||||
"Arch Package Repository" = {
|
"Arch Package Repository" = {
|
||||||
urls = [{
|
urls = [{
|
||||||
@@ -166,7 +166,7 @@
|
|||||||
definedAliases = [ "ut" ];
|
definedAliases = [ "ut" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
"youtube" = {
|
"YouTube" = {
|
||||||
urls = [{
|
urls = [{
|
||||||
template = "https://www.youtube.com/results";
|
template = "https://www.youtube.com/results";
|
||||||
params = [{ name = "search_query"; value = "{searchTerms}"; }];
|
params = [{ name = "search_query"; value = "{searchTerms}"; }];
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
{ config, lib, ... }:
|
{ ... }:
|
||||||
let
|
{
|
||||||
cfg = config.programs.cargo;
|
|
||||||
in
|
|
||||||
lib.mkIf cfg.enable {
|
|
||||||
programs.cargo = {
|
programs.cargo = {
|
||||||
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
cargo-new.vcs = "git";
|
cargo-new.vcs = "git";
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
{ ... }:
|
|
||||||
{
|
|
||||||
programs.delta = {
|
|
||||||
enableGitIntegration = true;
|
|
||||||
options = {
|
|
||||||
line-numbers = true;
|
|
||||||
side-by-side = true;
|
|
||||||
theme = "Monokai Extended Origin";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,9 +1,7 @@
|
|||||||
{ config, lib, ... }:
|
{ config, ... }:
|
||||||
let
|
|
||||||
cfg = config.programs.direnv;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
programs.direnv = {
|
programs.direnv = {
|
||||||
|
enable = true;
|
||||||
silent = true;
|
silent = true;
|
||||||
|
|
||||||
nix-direnv.enable = true;
|
nix-direnv.enable = true;
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
{ ... }:
|
|
||||||
{
|
|
||||||
programs.element-desktop = { };
|
|
||||||
}
|
|
||||||
@@ -1,6 +1,4 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ pkgs, ... }: let
|
||||||
let
|
|
||||||
cfg = config.programs.emacs;
|
|
||||||
|
|
||||||
configEl = pkgs.stdenv.mkDerivation {
|
configEl = pkgs.stdenv.mkDerivation {
|
||||||
name = "config.el";
|
name = "config.el";
|
||||||
@@ -16,11 +14,11 @@ let
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
in
|
in {
|
||||||
lib.mkIf cfg.enable {
|
|
||||||
xdg.configFile."emacs/init.el".source = configEl.outPath;
|
xdg.configFile."emacs/init.el".source = configEl.outPath;
|
||||||
|
|
||||||
programs.emacs = {
|
programs.emacs = {
|
||||||
|
enable = true;
|
||||||
extraPackages = epkgs: with epkgs; [
|
extraPackages = epkgs: with epkgs; [
|
||||||
# # package
|
# # package
|
||||||
use-package
|
use-package
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
{ config, lib, ... }:
|
{ config, ... }:
|
||||||
let
|
|
||||||
cfg = config.programs.eza;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
programs.eza = {
|
programs.eza = {
|
||||||
|
enable = true;
|
||||||
icons = "auto";
|
icons = "auto";
|
||||||
enableNushellIntegration = config.programs.nushell.enable;
|
enableNushellIntegration = config.programs.nushell.enable;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
{ ... }:
|
|
||||||
{
|
|
||||||
programs.fastfetch = { };
|
|
||||||
}
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
{ ... }:
|
{ machineVars, ... }:
|
||||||
{
|
{
|
||||||
programs.feh = { };
|
programs.feh.enable = !machineVars.headless;
|
||||||
}
|
}
|
||||||
@@ -1,17 +1,15 @@
|
|||||||
{ lib, pkgs, ... }:
|
{ lib, pkgs, ... }:
|
||||||
{
|
{
|
||||||
programs.firefox = {
|
programs.firefox = {
|
||||||
|
enable = true;
|
||||||
profiles.h7x4 = {
|
profiles.h7x4 = {
|
||||||
bookmarks = {
|
bookmarks = [{
|
||||||
force = true;
|
toolbar = true;
|
||||||
settings = [{
|
bookmarks = import ./browser/bookmarks.nix;
|
||||||
toolbar = true;
|
}];
|
||||||
bookmarks = import ./browser/bookmarks.nix;
|
|
||||||
}];
|
|
||||||
};
|
|
||||||
|
|
||||||
search = {
|
search = {
|
||||||
default = "google";
|
default = "Google";
|
||||||
engines = import ./browser/engines.nix { inherit pkgs lib; };
|
engines = import ./browser/engines.nix { inherit pkgs lib; };
|
||||||
force = true;
|
force = true;
|
||||||
};
|
};
|
||||||
@@ -25,25 +23,18 @@
|
|||||||
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
|
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
|
||||||
"browser.newtabpage.activity-stream.feeds.telemetry" = false;
|
"browser.newtabpage.activity-stream.feeds.telemetry" = false;
|
||||||
"browser.newtabpage.activity-stream.telemetry" = false;
|
"browser.newtabpage.activity-stream.telemetry" = false;
|
||||||
|
|
||||||
"datareporting.policy.dataSubmissionEnabled" = false;
|
"datareporting.policy.dataSubmissionEnabled" = false;
|
||||||
"datareporting.healthreport.uploadEnabled" = false;
|
"datareporting.healthreport.uploadEnabled" = false;
|
||||||
|
|
||||||
"toolkit.telemetry.archive.enabled" = false;
|
|
||||||
"toolkit.telemetry.bhrPing.enabled" = false;
|
|
||||||
"toolkit.telemetry.coverage.opt-out" = true;
|
|
||||||
"toolkit.telemetry.enabled" = false;
|
|
||||||
"toolkit.telemetry.firstShutdownPing.enabled" = false;
|
|
||||||
"toolkit.telemetry.hybridContent.enabled" = false;
|
|
||||||
"toolkit.telemetry.newProfilePing.enabled" = false;
|
|
||||||
"toolkit.telemetry.prompted" = 2;
|
|
||||||
"toolkit.telemetry.rejected" = true;
|
|
||||||
"toolkit.telemetry.reportingpolicy.firstRun" = false;
|
|
||||||
"toolkit.telemetry.server" = "data:,";
|
|
||||||
"toolkit.telemetry.shutdownPingSender.enabled" = false;
|
|
||||||
"toolkit.telemetry.unified" = false;
|
"toolkit.telemetry.unified" = false;
|
||||||
"toolkit.telemetry.unifiedIsOptIn" = false;
|
"toolkit.telemetry.enabled" = false;
|
||||||
|
"toolkit.telemetry.server" = "data:,";
|
||||||
|
"toolkit.telemetry.archive.enabled" = false;
|
||||||
|
"toolkit.telemetry.newProfilePing.enabled" = false;
|
||||||
|
"toolkit.telemetry.shutdownPingSender.enabled" = false;
|
||||||
"toolkit.telemetry.updatePing.enabled" = false;
|
"toolkit.telemetry.updatePing.enabled" = false;
|
||||||
|
"toolkit.telemetry.bhrPing.enabled" = false;
|
||||||
|
"toolkit.telemetry.firstShutdownPing.enabled" = false;
|
||||||
|
"toolkit.telemetry.coverage.opt-out" = true;
|
||||||
"toolkit.coverage.opt-out" = true;
|
"toolkit.coverage.opt-out" = true;
|
||||||
"toolkit.coverage.endpoint.base" = "";
|
"toolkit.coverage.endpoint.base" = "";
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
{ config, lib, ... }:
|
{ ... }:
|
||||||
let
|
|
||||||
cfg = config.programs.fzf;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
programs.fzf = {
|
programs.fzf = {
|
||||||
|
enable = true;
|
||||||
defaultCommand = "fd --type f";
|
defaultCommand = "fd --type f";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -1,32 +1,25 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
let
|
|
||||||
cfg = config.programs.gdb;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
options.programs.gdb.enable = lib.mkEnableOption "gdb";
|
xdg.configFile."gdb/gdbinit".text = ''
|
||||||
|
# C++ related beautifiers
|
||||||
|
set print pretty on
|
||||||
|
set print object on
|
||||||
|
set print static-members on
|
||||||
|
set print vtbl on
|
||||||
|
set print demangle on
|
||||||
|
set print sevenbit-strings off
|
||||||
|
set print asm-demangle on
|
||||||
|
set print elements 0
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
# Assembly
|
||||||
xdg.configFile."gdb/gdbinit".text = ''
|
set disassembly-flavor intel
|
||||||
# C++ related beautifiers
|
|
||||||
set print pretty on
|
|
||||||
set print object on
|
|
||||||
set print static-members on
|
|
||||||
set print vtbl on
|
|
||||||
set print demangle on
|
|
||||||
set print sevenbit-strings off
|
|
||||||
set print asm-demangle on
|
|
||||||
set print elements 0
|
|
||||||
|
|
||||||
# Assembly
|
# Save command history between sessions:
|
||||||
set disassembly-flavor intel
|
set history save
|
||||||
|
|
||||||
# Save command history between sessions:
|
# Print a beautifully colored prompt:
|
||||||
set history save
|
set prompt \001\033[1;36m\002(gdb) \001\033[0m\002
|
||||||
|
'';
|
||||||
|
|
||||||
# Print a beautifully colored prompt:
|
local.shell.aliases."System Tool Replacements".gdb = "${pkgs.pwndbg}/bin/pwndbg";
|
||||||
set prompt \001\033[1;36m\002(gdb) \001\033[0m\002
|
|
||||||
'';
|
|
||||||
|
|
||||||
# local.shell.aliases."System Tool Replacements".gdb = "${pkgs.pwndbg}/bin/pwndbg";
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
programs.gh-dash = { };
|
programs.gh-dash.enable = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
programs.gh = {
|
programs.gh = {
|
||||||
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
gitProtocol = "ssh";
|
gitProtocol = "ssh";
|
||||||
pager = "${pkgs.bat}/bin/bat";
|
pager = "${pkgs.bat}/bin/bat";
|
||||||
|
|||||||
@@ -1,22 +0,0 @@
|
|||||||
{ config, lib, pkgs, extendedLib, ... }:
|
|
||||||
let
|
|
||||||
cfg = config.programs.ghci;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.programs.ghci = {
|
|
||||||
enable = lib.mkEnableOption "ghci, interactive haskell shell";
|
|
||||||
|
|
||||||
package = lib.mkPackageOption pkgs "ghc" { };
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
home.packages = [ cfg.package ];
|
|
||||||
|
|
||||||
# Personal config
|
|
||||||
xdg.configFile = {
|
|
||||||
"ghc/ghci.conf".text = ''
|
|
||||||
:set prompt "${extendedLib.termColors.front.magenta "[GHCi]λ"} "
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -13,11 +13,18 @@ let
|
|||||||
"github.com:"
|
"github.com:"
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
lib.mkIf cfg.enable {
|
{
|
||||||
|
# TODO: convert to template once nix-sops supports it in hm module
|
||||||
|
sops.secrets."git/nordicsemi-config" = { };
|
||||||
|
|
||||||
programs.git = lib.mkMerge [
|
programs.git = lib.mkMerge [
|
||||||
{
|
{
|
||||||
|
enable = true;
|
||||||
package = pkgs.gitFull;
|
package = pkgs.gitFull;
|
||||||
|
|
||||||
|
userName = "h7x4";
|
||||||
|
userEmail = "h7x4@nani.wtf";
|
||||||
|
|
||||||
signing = {
|
signing = {
|
||||||
key = "46B9228E814A2AAC";
|
key = "46B9228E814A2AAC";
|
||||||
# format = "openpgp";
|
# format = "openpgp";
|
||||||
@@ -28,82 +35,86 @@ lib.mkIf cfg.enable {
|
|||||||
|
|
||||||
lfs.enable = true;
|
lfs.enable = true;
|
||||||
|
|
||||||
settings = {
|
delta = {
|
||||||
user = {
|
enable = true;
|
||||||
name = "h7x4";
|
options = {
|
||||||
email = "h7x4@nani.wtf";
|
line-numbers = true;
|
||||||
|
side-by-side = true;
|
||||||
|
theme = "Monokai Extended Origin";
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
alias = {
|
aliases = {
|
||||||
aliases = "!git config --get-regexp alias | sed -re 's/alias\\.(\\S*)\\s(.*)$/\\1 = \\2/g'";
|
aliases = "!git config --get-regexp alias | sed -re 's/alias\\.(\\S*)\\s(.*)$/\\1 = \\2/g'";
|
||||||
authors = "shortlog --summary --numbered --email";
|
authors = "shortlog --summary --numbered --email";
|
||||||
delete-merged = "!git branch --merged | grep -v -e '\\*' -e 'master' -e 'main' | xargs -n 1 git branch -d";
|
delete-merged = "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d";
|
||||||
ff = "fixup-fixup";
|
ff = "fixup-fixup";
|
||||||
fi = "fixup-interactive";
|
fi = "fixup-interactive";
|
||||||
forcepush = "push --force-with-lease --force-if-includes";
|
forcepush = "push --force-with-lease --force-if-includes";
|
||||||
git = "!git";
|
git = "!git";
|
||||||
pp = "post-pr";
|
pp = "post-pr";
|
||||||
rebase-author = "rebase -i -x \"git commit --amend --reset-author -CHEAD\"";
|
rebase-author = "rebase -i -x \"git commit --amend --reset-author -CHEAD\"";
|
||||||
reset-to-upstream = "!git reset --hard \"origin/$(git rev-parse --abbrev-ref HEAD)\"";
|
reset-to-upstream = "!git reset --hard \"origin/$(git rev-parse --abbrev-ref HEAD)\"";
|
||||||
rf = "rebase-fixups";
|
rf = "rebase-fixups";
|
||||||
si = "switch-interactive";
|
si = "switch-interactive";
|
||||||
subs = "submodule update --init --recursive";
|
subs = "submodule update --init --recursive";
|
||||||
} // (let
|
} // (let
|
||||||
c = c: s: "%C(${c})${s}%C(reset)";
|
c = c: s: "%C(${c})${s}%C(reset)";
|
||||||
in {
|
in {
|
||||||
graph = let
|
graph = let
|
||||||
fmt = lib.concatStringsSep "" [
|
fmt = lib.concatStringsSep "" [
|
||||||
" - "
|
" - "
|
||||||
(c "bold blue" "%h")
|
(c "bold blue" "%h")
|
||||||
" - "
|
" - "
|
||||||
(c "bold green" "(%ar)")
|
(c "bold green" "(%ar)")
|
||||||
" "
|
" "
|
||||||
(c "white" "> %s")
|
(c "white" "> %s")
|
||||||
" "
|
" "
|
||||||
(c "dim white" "- %an")
|
(c "dim white" "- %an")
|
||||||
(c "bold yellow" "%d")
|
(c "bold yellow" "%d")
|
||||||
];
|
];
|
||||||
in "log --graph --abbrev-commit --decorate --format=format:'${fmt}' --all";
|
in "log --graph --abbrev-commit --decorate --format=format:'${fmt}' --all";
|
||||||
|
|
||||||
graphv = let
|
graphv = let
|
||||||
fmt = lib.concatStringsSep "" [
|
fmt = lib.concatStringsSep "" [
|
||||||
(c "bold blue" "%h")
|
(c "bold blue" "%h")
|
||||||
" - "
|
" - "
|
||||||
(c "bold cyan" "%aD")
|
(c "bold cyan" "%aD")
|
||||||
" "
|
" "
|
||||||
(c "bold green" "(%ar)")
|
(c "bold green" "(%ar)")
|
||||||
(c "bold yellow" "%d")
|
(c "bold yellow" "%d")
|
||||||
"%n"
|
"%n"
|
||||||
" "
|
" "
|
||||||
(c "white" "%s")
|
(c "white" "%s")
|
||||||
" "
|
" "
|
||||||
(c "dim white" "- %an")
|
(c "dim white" "- %an")
|
||||||
];
|
];
|
||||||
in "log --graph --abbrev-commit --decorate --format=format:'${fmt}' --all";
|
in "log --graph --abbrev-commit --decorate --format=format:'${fmt}' --all";
|
||||||
|
|
||||||
l = let
|
l = let
|
||||||
fmt = lib.concatStringsSep "%n" (map (x: if builtins.isList x then lib.concatStringsSep " " x else x) [
|
fmt = lib.concatStringsSep "%n" (map (x: if builtins.isList x then lib.concatStringsSep " " x else x) [
|
||||||
[ (c "bold yellow" "%H") (c "auto" "%d") ]
|
[ (c "bold yellow" "%H") (c "auto" "%d") ]
|
||||||
[ (c "bold white" "Author:") (c "bold cyan" "%aN <%aE>") (c "bold green" "(%ah)") ]
|
[ (c "bold white" "Author:") (c "bold cyan" "%aN <%aE>") (c "bold green" "(%ah)") ]
|
||||||
[ (c "bold white" "Committer:") (c "bold cyan" "%cN <%cE>") (c "bold green" "(%ah)") ]
|
[ (c "bold white" "Committer:") (c "bold cyan" "%cN <%cE>") (c "bold green" "(%ah)") ]
|
||||||
[ (c "bold white" "GPG: (%G?)") (c "bold magenta" "%GF") "-" (c "bold cyan" "%GS") (c "bold blue" "(%GT) ") ]
|
[ (c "bold white" "GPG: (%G?)") (c "bold magenta" "%GF") "-" (c "bold cyan" "%GS") (c "bold blue" "(%GT) ") ]
|
||||||
""
|
""
|
||||||
(c "bold white" "# %s")
|
(c "bold white" "# %s")
|
||||||
"%+b"
|
"%+b"
|
||||||
(c "dim yellow" "%+N")
|
(c "dim yellow" "%+N")
|
||||||
]);
|
]);
|
||||||
# sedExpressions = let
|
# sedExpressions = let
|
||||||
# colorExpr = "\\x1B\\[([0-9]{1,3}(;[0-9]{1,2};?)?)?[mGK]";
|
# colorExpr = "\\x1B\\[([0-9]{1,3}(;[0-9]{1,2};?)?)?[mGK]";
|
||||||
# colorEndExpr = "\\x1B\\[m";
|
# colorEndExpr = "\\x1B\\[m";
|
||||||
# colored = x: "${colorExpr}${x}${colorEndExpr}";
|
# colored = x: "${colorExpr}${x}${colorEndExpr}";
|
||||||
# in lib.concatMapStringsSep " " (x: "-e '${x}'") [
|
# in lib.concatMapStringsSep " " (x: "-e '${x}'") [
|
||||||
# "s|${colored "GPG: \\(N\\)"} ${colored "F3CDA86CC55A9F10D7A069819F2F7D8250F35146"} - ${colored "h7x4 <h7x4@nani.wtf>"} ${colored "\\(ultimate\\)"}|GPG: h7x4|"
|
# "s|${colored "GPG: \\(N\\)"} ${colored "F3CDA86CC55A9F10D7A069819F2F7D8250F35146"} - ${colored "h7x4 <h7x4@nani.wtf>"} ${colored "\\(ultimate\\)"}|GPG: h7x4|"
|
||||||
# "s|${colored "GPG: \\(N\\)"} ${colored ""} - ${colored ""} ${colored "\\(undefined\\)"}||"
|
# "s|${colored "GPG: \\(N\\)"} ${colored ""} - ${colored ""} ${colored "\\(undefined\\)"}||"
|
||||||
# ];
|
# ];
|
||||||
in "log --decorate --format=tformat:'${fmt}'";
|
in "log --decorate --format=tformat:'${fmt}'";
|
||||||
# in "!git log --color=always --format=format:'${fmt}' | sed -E ${sedExpressions} | $PAGER";
|
# in "!git log --color=always --format=format:'${fmt}' | sed -E ${sedExpressions} | $PAGER";
|
||||||
});
|
});
|
||||||
|
|
||||||
|
extraConfig = {
|
||||||
core = {
|
core = {
|
||||||
whitespace = lib.concatStringsSep "," [
|
whitespace = lib.concatStringsSep "," [
|
||||||
"space-before-tab"
|
"space-before-tab"
|
||||||
@@ -271,7 +282,7 @@ lib.mkIf cfg.enable {
|
|||||||
];
|
];
|
||||||
in lib.genAttrs organizations (org: map (uri-prefix: "${uri-prefix}${org}") uri-prefixes);
|
in lib.genAttrs organizations (org: map (uri-prefix: "${uri-prefix}${org}") uri-prefixes);
|
||||||
in {
|
in {
|
||||||
settings."url \"${lib.head uri-prefixes}\"".insteadOf = lib.tail uri-prefixes;
|
extraConfig."url \"${lib.head uri-prefixes}\"".insteadOf = lib.tail uri-prefixes;
|
||||||
|
|
||||||
includes = map (x: {
|
includes = map (x: {
|
||||||
contentSuffix = "pvv.gitconfig";
|
contentSuffix = "pvv.gitconfig";
|
||||||
@@ -284,6 +295,42 @@ lib.mkIf cfg.enable {
|
|||||||
};
|
};
|
||||||
}) (lib.flatten (lib.attrValues prefixes-per-org));
|
}) (lib.flatten (lib.attrValues prefixes-per-org));
|
||||||
})
|
})
|
||||||
|
|
||||||
|
(let
|
||||||
|
bitbucket-uri-prefixes = [
|
||||||
|
# Preferred
|
||||||
|
"bitbucket-nordicsemi:"
|
||||||
|
|
||||||
|
# Alternative
|
||||||
|
"ssh://git@bitbucket.nordicsemi.no:7999"
|
||||||
|
"https://projecttools.nordicsemi.no/bitbucket/scm"
|
||||||
|
];
|
||||||
|
|
||||||
|
prefixes-per-org = let
|
||||||
|
organizations = [
|
||||||
|
"NordicSemiconductor"
|
||||||
|
"NordicPlayground"
|
||||||
|
"nrfconnect"
|
||||||
|
"oysteintveit-nordicsemi"
|
||||||
|
];
|
||||||
|
in lib.genAttrs organizations (org: map (uri-prefix: "${uri-prefix}${org}") (github-uri-prefixes ++ [ "github-nordicsemi:" ]));
|
||||||
|
in {
|
||||||
|
extraConfig = lib.mergeAttrs
|
||||||
|
{
|
||||||
|
"url \"${lib.head bitbucket-uri-prefixes}\"".insteadOf = lib.tail bitbucket-uri-prefixes;
|
||||||
|
}
|
||||||
|
(lib.mapAttrs' (org: uri-prefixes: {
|
||||||
|
name = "url \"github-nordicsemi:${org}\"";
|
||||||
|
value.insteadOf = uri-prefixes;
|
||||||
|
}) prefixes-per-org)
|
||||||
|
;
|
||||||
|
|
||||||
|
includes = map (x: {
|
||||||
|
contentSuffix = "nordicsemi.gitconfig";
|
||||||
|
condition = "hasconfig:remote.*.url:${x}/**";
|
||||||
|
path = config.sops.secrets."git/nordicsemi-config".path;
|
||||||
|
}) (bitbucket-uri-prefixes ++ (lib.flatten (lib.attrValues prefixes-per-org)));
|
||||||
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
systemd.user.services."git-maintenance@".Service = lib.mkIf cfg.maintenance.enable {
|
systemd.user.services."git-maintenance@".Service = lib.mkIf cfg.maintenance.enable {
|
||||||
@@ -301,7 +348,7 @@ lib.mkIf cfg.enable {
|
|||||||
echo "[maintenance]"
|
echo "[maintenance]"
|
||||||
for repoLocation in ${repoDirs}; do
|
for repoLocation in ${repoDirs}; do
|
||||||
for repo in "$repoLocation"/*/.git; do
|
for repo in "$repoLocation"/*/.git; do
|
||||||
echo "repo = $('${pkgs.coreutils}/bin/realpath' "''${repo%"/.git"}")"
|
echo "repo = $("${pkgs.coreutils}/bin/realpath" "''${repo%"/.git"}")"
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
} > "$1"
|
} > "$1"
|
||||||
@@ -352,16 +399,6 @@ lib.mkIf cfg.enable {
|
|||||||
"SC2001" # (style): See if you can use ${variable//search/replace} instead. (sed invocation)
|
"SC2001" # (style): See if you can use ${variable//search/replace} instead. (sed invocation)
|
||||||
];
|
];
|
||||||
})
|
})
|
||||||
(pkgs.writeShellApplication {
|
|
||||||
name = "git-author-lines";
|
|
||||||
runtimeInputs = with pkgs; [ cfg.package gnused gnugrep gawk uutils-coreutils-noprefix ];
|
|
||||||
text = lib.fileContents ./scripts/git-author-lines.sh;
|
|
||||||
})
|
|
||||||
(pkgs.writeShellApplication {
|
|
||||||
name = "git-all-commits";
|
|
||||||
runtimeInputs = with pkgs; [ cfg.package gnugrep gawk findutils uutils-coreutils-noprefix ];
|
|
||||||
text = lib.fileContents ./scripts/git-all-commits.sh;
|
|
||||||
})
|
|
||||||
((pkgs.writers.writePython3Bin "git-post-pr" {
|
((pkgs.writers.writePython3Bin "git-post-pr" {
|
||||||
libraries = with pkgs.python3Packages; [
|
libraries = with pkgs.python3Packages; [
|
||||||
tkinter
|
tkinter
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
GIT_ROOT="$(git rev-parse --show-toplevel)"
|
|
||||||
|
|
||||||
find "$GIT_ROOT/.git/objects" -type f | \
|
|
||||||
while read -r file; do
|
|
||||||
if echo "$file" | grep -Eq '\.idx$'; then
|
|
||||||
git show-index < "$file" | awk '{print $2}'
|
|
||||||
elif echo "$file" | grep -Eq '[0-9a-f]{38}$'; then
|
|
||||||
echo "$(basename "$(dirname "$file")")$(basename "$file")"
|
|
||||||
fi
|
|
||||||
done | \
|
|
||||||
while read -r hash; do
|
|
||||||
if [ "$(git cat-file -t "$hash")" = commit ]; then
|
|
||||||
echo "$hash"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
set -euo pipefail
|
|
||||||
|
|
||||||
if [ -n "${1:-}" ]; then
|
|
||||||
REF="${1}"
|
|
||||||
else
|
|
||||||
REF="HEAD"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# TODO: optionally keep track of which files the authors were present in,
|
|
||||||
# and print a list of up to N files where the authors contributed the most.
|
|
||||||
|
|
||||||
git ls-tree -r "${REF}" \
|
|
||||||
| while read -r _filemode _objtype _githash filepath; do
|
|
||||||
git blame --line-porcelain "${filepath}"
|
|
||||||
done \
|
|
||||||
| grep --binary-files=without-match '^author ' \
|
|
||||||
| sed -e 's/author //' \
|
|
||||||
| awk '{ a[$0]+=1 } END{ for (i in a) { print a[i],i } }' \
|
|
||||||
| sort --numeric-sort --key 1 --reverse
|
|
||||||
@@ -1,9 +1,7 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
let
|
{
|
||||||
cfg = config.programs.gpg;
|
|
||||||
in
|
|
||||||
lib.mkIf cfg.enable {
|
|
||||||
programs.gpg = {
|
programs.gpg = {
|
||||||
|
enable = true;
|
||||||
homedir = "${config.xdg.configHome}/gnupg";
|
homedir = "${config.xdg.configHome}/gnupg";
|
||||||
|
|
||||||
auto-refresh-keys.enable = true;
|
auto-refresh-keys.enable = true;
|
||||||
@@ -28,7 +26,7 @@ lib.mkIf cfg.enable {
|
|||||||
|
|
||||||
services.gpg-agent = {
|
services.gpg-agent = {
|
||||||
enable = true;
|
enable = true;
|
||||||
pinentry.package = pkgs.pinentry-curses;
|
pinentryPackage = pkgs.pinentry-curses;
|
||||||
enableExtraSocket = true;
|
enableExtraSocket = true;
|
||||||
enableSshSupport = true;
|
enableSshSupport = true;
|
||||||
enableScDaemon = true;
|
enableScDaemon = true;
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
{ ... }:
|
|
||||||
{
|
|
||||||
programs.helix = { };
|
|
||||||
}
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
programs.home-manager = { };
|
programs.home-manager.enable = true;
|
||||||
}
|
}
|
||||||
380
home/programs/hyprland.nix
Normal file
380
home/programs/hyprland.nix
Normal file
@@ -0,0 +1,380 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.wayland.windowManager.hyprland;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
home.sessionVariables = {
|
||||||
|
WLR_NO_HARDWARE_CURSORS = "1";
|
||||||
|
WLR_RENDERER_ALLOW_SOFTWARE = "1";
|
||||||
|
XDG_CURRENT_DESKTOP = "Hyprland";
|
||||||
|
XDG_SESSION_DESKTOP = "Hyprland";
|
||||||
|
XDG_SESSION_TYPE = "wayland";
|
||||||
|
GDK_BACKEND = "wayland,x11,*";
|
||||||
|
QT_QPA_PLATFORM = "wayland;xcb";
|
||||||
|
NIXOS_OZONE_WL = "1";
|
||||||
|
MOZ_ENABLE_WAYLAND = "1";
|
||||||
|
SDL_VIDEODRIVER = "wayland";
|
||||||
|
OZONE_PLATFORM = "wayland";
|
||||||
|
CLUTTER_BACKEND = "wayland";
|
||||||
|
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
||||||
|
# QT_QPA_PLATFORMTHEME = "qt6ct";
|
||||||
|
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
|
||||||
|
|
||||||
|
# LIBVA_DRIVER_NAME = "nvidia";
|
||||||
|
# GBM_BACKEND = "nvidia-drm";
|
||||||
|
# __GLX_VENDOR_LIBRARY_NAME = "nvidia";
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
hyprpolkitagent
|
||||||
|
wl-clipboard-rs
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.hyprlock = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
general = {
|
||||||
|
disable_loading_bar = true;
|
||||||
|
grace = 0;
|
||||||
|
hide_cursor = true;
|
||||||
|
no_fade_in = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
background = [
|
||||||
|
{
|
||||||
|
path = "screenshot";
|
||||||
|
blur_passes = 3;
|
||||||
|
blur_size = 8;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
input-field = [
|
||||||
|
{
|
||||||
|
size = "200, 50";
|
||||||
|
position = "0, -80";
|
||||||
|
monitor = "";
|
||||||
|
dots_center = true;
|
||||||
|
fade_on_empty = false;
|
||||||
|
font_color = "rgb(202, 211, 245)";
|
||||||
|
inner_color = "rgb(91, 96, 120)";
|
||||||
|
outer_color = "rgb(24, 25, 38)";
|
||||||
|
outline_thickness = 5;
|
||||||
|
placeholder_text = ''Password...'';
|
||||||
|
shadow_passes = 2;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
auth = {
|
||||||
|
"pam:enabled" = true;
|
||||||
|
"pam:module" = "hyprlock";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.hypridle = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
general = {
|
||||||
|
ignore_dbus_inhibit = false;
|
||||||
|
lock_cmd = "pidof hyprlock || ${config.programs.hyprlock.package}/bin/hyprlock";
|
||||||
|
before_sleep_cmd = "${pkgs.systemd}/bin/loginctl lock-session";
|
||||||
|
after_sleep_cmd = "${cfg.finalPackage}/bin/hyprctl dispatch dpms on";
|
||||||
|
};
|
||||||
|
|
||||||
|
listener = [
|
||||||
|
{
|
||||||
|
timeout = 900;
|
||||||
|
on-timeout = "${config.programs.hyprlock.package}/bin/hyprlock";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
timeout = 1200;
|
||||||
|
on-timeout = "${cfg.finalPackage}/bin/hyprctl dispatch dpms off";
|
||||||
|
on-resume = "${cfg.finalPackage}/bin/hyprctl dispatch dpms on";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
wayland.windowManager.hyprland = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
systemd.enable = false;
|
||||||
|
systemd.enableXdgAutostart = false;
|
||||||
|
|
||||||
|
settings = let
|
||||||
|
exe = lib.getExe;
|
||||||
|
scratchpads = [
|
||||||
|
(rec {
|
||||||
|
title = "Floating terminal";
|
||||||
|
class = "floatingTerminal";
|
||||||
|
command = "uwsm app -- ${exe pkgs.alacritty} --class ${class} -e ${exe pkgs.tmux} new-session -A -s f";
|
||||||
|
size = { h = 90; w = 95; };
|
||||||
|
keys = [
|
||||||
|
"$mod, RETURN"
|
||||||
|
"$mod, SPACE"
|
||||||
|
];
|
||||||
|
})
|
||||||
|
(rec {
|
||||||
|
title = "Ncmpcpp";
|
||||||
|
class = "floatingNcmpcpp";
|
||||||
|
command = "uwsm app -- ${exe pkgs.alacritty} --class ${class} -e ${exe pkgs.ncmpcpp}";
|
||||||
|
size = { h = 95; w = 95; };
|
||||||
|
keys = [ "$mod, Q" ];
|
||||||
|
})
|
||||||
|
# "$mod, W, emacs"
|
||||||
|
# "$mod, E, filebrowser"
|
||||||
|
# "$mod, X, taskwarriortui"
|
||||||
|
];
|
||||||
|
in {
|
||||||
|
"$mod" = "SUPER";
|
||||||
|
|
||||||
|
# https://github.com/xkbcommon/libxkbcommon/blob/master/include/xkbcommon/xkbcommon-keysyms.h
|
||||||
|
bind = [
|
||||||
|
"$mod SHIFT, Q, exec, ${pkgs.systemd}/bin/loginctl terminate-user \"\""
|
||||||
|
"$mod ALT SHIFT, Q, exec, uwsm stop"
|
||||||
|
"$mod, R, exec, uwsm app -- ${exe config.programs.anyrun.package}"
|
||||||
|
"$mod, T, togglefloating"
|
||||||
|
|
||||||
|
"$mod, F, fullscreenstate, 1"
|
||||||
|
"$mod SHIFT, F, fullscreenstate, 3"
|
||||||
|
"$mod, C, exec, ${cfg.finalPackage}/bin/hyprctl reload"
|
||||||
|
|
||||||
|
"$mod, BACKSPACE, killactive"
|
||||||
|
|
||||||
|
"$mod SHIFT, RETURN, exec, uwsm app -- ${exe pkgs.alacritty} --class termTerminal -e ${exe pkgs.tmux} new-session -A -s term"
|
||||||
|
"$mod SHIFT, SPACE, exec, uwsm app -- ${exe pkgs.alacritty} --class termTerminal -e ${exe pkgs.tmux} new-session -A -s term"
|
||||||
|
|
||||||
|
"$mod, j, layoutmsg,cyclenext"
|
||||||
|
"$mod, k, layoutmsg,cycleprev"
|
||||||
|
"$mod SHIFT, j, layoutmsg, swapnext"
|
||||||
|
"$mod SHIFT, k, layoutmsg, swapprev"
|
||||||
|
|
||||||
|
"$mod, 1, focusworkspaceoncurrentmonitor, 1"
|
||||||
|
"$mod, 2, focusworkspaceoncurrentmonitor, 2"
|
||||||
|
"$mod, 3, focusworkspaceoncurrentmonitor, 3"
|
||||||
|
"$mod, 4, focusworkspaceoncurrentmonitor, 4"
|
||||||
|
"$mod, 5, focusworkspaceoncurrentmonitor, 5"
|
||||||
|
"$mod, 6, focusworkspaceoncurrentmonitor, 6"
|
||||||
|
"$mod, 7, focusworkspaceoncurrentmonitor, 7"
|
||||||
|
"$mod, 8, focusworkspaceoncurrentmonitor, 8"
|
||||||
|
"$mod, 9, focusworkspaceoncurrentmonitor, 9"
|
||||||
|
|
||||||
|
"$mod SHIFT, 1, movetoworkspacesilent, 1"
|
||||||
|
"$mod SHIFT, 2, movetoworkspacesilent, 2"
|
||||||
|
"$mod SHIFT, 3, movetoworkspacesilent, 3"
|
||||||
|
"$mod SHIFT, 4, movetoworkspacesilent, 4"
|
||||||
|
"$mod SHIFT, 5, movetoworkspacesilent, 5"
|
||||||
|
"$mod SHIFT, 6, movetoworkspacesilent, 6"
|
||||||
|
"$mod SHIFT, 7, movetoworkspacesilent, 7"
|
||||||
|
"$mod SHIFT, 8, movetoworkspacesilent, 8"
|
||||||
|
"$mod SHIFT, 9, movetoworkspacesilent, 9"
|
||||||
|
|
||||||
|
"$mod, b, exec, ${pkgs.fcitx5}/bin/fcitx5-remote -s mozc"
|
||||||
|
"$mod, n, exec, ${pkgs.fcitx5}/bin/fcitx5-remote -s keyboard-no"
|
||||||
|
"$mod, m, exec, ${pkgs.fcitx5}/bin/fcitx5-remote -s keyboard-us"
|
||||||
|
|
||||||
|
"$mod, l, exec, ${pkgs.systemd}/bin/loginctl lock-session"
|
||||||
|
|
||||||
|
# TODO: fix
|
||||||
|
# "super + minus" = "${pkgs.xcalib}/bin/xcalib -invert -alter"
|
||||||
|
|
||||||
|
", Print, exec, ${exe pkgs.grimblast} copy area"
|
||||||
|
|
||||||
|
# "SHIFT, Print, exec, ${lib.getExe pkgs.grimblast} copy area"
|
||||||
|
# "shift + @Print" = "${pkgs.maim}/bin/maim --hidecursor --nokeyboard $SCREENSHOT_DIR/$(date +%s).png"
|
||||||
|
|
||||||
|
"$mod, Print, exec, ${exe pkgs.woomer}"
|
||||||
|
]
|
||||||
|
++
|
||||||
|
(lib.pipe scratchpads [
|
||||||
|
(map ({ keys, command, class, ... }:
|
||||||
|
(map (key: let
|
||||||
|
# TODO: rewrite this to take arguments instead of creating n copies
|
||||||
|
invokeIfNotRunningAndToggleWorkspace = pkgs.writeShellApplication {
|
||||||
|
name = "hyprland-toggle-scratchpad-${class}";
|
||||||
|
runtimeInputs = [ cfg.finalPackage pkgs.jq ];
|
||||||
|
text = ''
|
||||||
|
SCRATCHPAD_PROGRAM_EXISTS=$(hyprctl clients -j | jq -r '[.[].class]|any(. == "${class}")')
|
||||||
|
CURRENT_WORKSPACE_ID=$(hyprctl activeworkspace -j | jq -r '.id')
|
||||||
|
|
||||||
|
if [ "$SCRATCHPAD_PROGRAM_EXISTS" != "true" ]; then
|
||||||
|
${command} &
|
||||||
|
hyprctl dispatch movetoworkspacesilent "''${CURRENT_WORKSPACE_ID},class:${class}"
|
||||||
|
hyprctl dispatch focuswindow "class:${class}"
|
||||||
|
else
|
||||||
|
SCRATCHPAD_PROGRAM_WORKSPACE_ID=$(hyprctl clients -j | jq '.[] | select( .class == "${class}") | .workspace.id')
|
||||||
|
if [ "$SCRATCHPAD_PROGRAM_WORKSPACE_ID" != "$CURRENT_WORKSPACE_ID" ]; then
|
||||||
|
hyprctl dispatch movetoworkspacesilent "''${CURRENT_WORKSPACE_ID},class:${class}"
|
||||||
|
hyprctl dispatch focuswindow "class:${class}"
|
||||||
|
else
|
||||||
|
hyprctl dispatch movetoworkspacesilent "special:${class}Ws,class:${class}"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
in "${key}, exec, ${lib.getExe invokeIfNotRunningAndToggleWorkspace}"
|
||||||
|
) keys)
|
||||||
|
))
|
||||||
|
lib.flatten
|
||||||
|
]);
|
||||||
|
|
||||||
|
bindm = [
|
||||||
|
"$mod, mouse:272, movewindow"
|
||||||
|
"$mod, Control_L, movewindow"
|
||||||
|
"$mod, mouse:273, resizewindow"
|
||||||
|
"$mod, ALT_L, resizewindow"
|
||||||
|
];
|
||||||
|
|
||||||
|
bindl = [
|
||||||
|
"$mod, p, exec, ${exe pkgs.mpc_cli} toggle"
|
||||||
|
",XF86AudioPlay, exec, ${exe pkgs.mpc_cli} toggle"
|
||||||
|
",XF86AudioPrev, exec, ${exe pkgs.mpc_cli} prev"
|
||||||
|
",XF86AudioNext, exec, ${exe pkgs.mpc_cli} next"
|
||||||
|
];
|
||||||
|
|
||||||
|
bindle = [
|
||||||
|
",XF86MonBrightnessUp, exec, ${exe pkgs.brightnessctl} s +5%"
|
||||||
|
",XF86MonBrightnessDown, exec, ${exe pkgs.brightnessctl} s 5%-"
|
||||||
|
",XF86AudioLowerVolume, exec, ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%-"
|
||||||
|
",XF86AudioRaiseVolume, exec, ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%+"
|
||||||
|
"$mod ,F7, exec, ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%-"
|
||||||
|
"$mod ,F8, exec, ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%+"
|
||||||
|
];
|
||||||
|
|
||||||
|
exec-once = [
|
||||||
|
"uwsm finalize"
|
||||||
|
];
|
||||||
|
|
||||||
|
windowrulev2 = [
|
||||||
|
"float, class:^(Rofi)$"
|
||||||
|
"float, class:^(xdg-desktop-portal-gtk)$"
|
||||||
|
"float, title:^(.*Bitwarden Password Manager.*)$"
|
||||||
|
"float, title:^(Picture-in-Picture)$"
|
||||||
|
"tile, class:^(Nsxiv)$"
|
||||||
|
|
||||||
|
"float, class: ^(Gimp-2.*)$, title:^(Open Image)$"
|
||||||
|
"size 70%, class: ^(Gimp-2.*)$, title:^(Open Image)$"
|
||||||
|
"center, class: ^(Gimp-2.*)$, title:^(Open Image)$"
|
||||||
|
|
||||||
|
"dimaround, class:^(xdg-desktop-portal-gtk)$"
|
||||||
|
|
||||||
|
"workspace special silent, title:^(Firefox — Sharing Indicator)$"
|
||||||
|
"workspace special silent, title:^(Zen — Sharing Indicator)$"
|
||||||
|
"workspace special silent, title:^(.*is sharing (your screen|a window)\.)$"
|
||||||
|
|
||||||
|
"workspace 2, class:^(firefox)$"
|
||||||
|
"workspace 2, class:^(google-chrome)$"
|
||||||
|
|
||||||
|
"workspace 3, class:^(Emacs)$"
|
||||||
|
"workspace 3, class:^(code)$"
|
||||||
|
"workspace 3, class:^(code-url-handler)$"
|
||||||
|
"workspace 3, class:^(dev.zed.Zed)$"
|
||||||
|
|
||||||
|
"workspace 5, class:^(discord)$"
|
||||||
|
"workspace 5, class:^(Element)$"
|
||||||
|
]
|
||||||
|
++
|
||||||
|
(lib.pipe scratchpads [
|
||||||
|
(map ({ class, size, ... }: [
|
||||||
|
"workspace special:${class}Ws, class:^${class}$"
|
||||||
|
"float, class:^${class}$"
|
||||||
|
"size ${toString size.w}% ${toString size.h}%, class:^${class}$"
|
||||||
|
"move ${toString ((100 - size.w) / 2)}% ${toString ((100 - size.h) / 2)}%, class:^${class}$"
|
||||||
|
]))
|
||||||
|
lib.flatten
|
||||||
|
]);
|
||||||
|
|
||||||
|
monitor = [
|
||||||
|
# TODO: host specific
|
||||||
|
"eDP-1, 3840x2400@90.00Hz, 0x0, 2"
|
||||||
|
|
||||||
|
# PVV Demiurgen
|
||||||
|
"desc:Hewlett Packard HP ZR24w CNT01711G6, 1920x1200, 0x-1200, 1"
|
||||||
|
"desc:Hewlett Packard HP ZR24w CNT018103H, 1920x1200, 1920x-1200, 1"
|
||||||
|
|
||||||
|
# PVV Eirin
|
||||||
|
"desc:Hewlett Packard HP ZR24w CNT01710L4, 1920x1200, 0x-1200, 1"
|
||||||
|
"desc:Hewlett Packard HP ZR24w CNT0181039, 1920x1200, 1920x-1200, 1"
|
||||||
|
|
||||||
|
",preferred,auto,1"
|
||||||
|
];
|
||||||
|
|
||||||
|
general = {
|
||||||
|
gaps_in = 5;
|
||||||
|
gaps_out = 15;
|
||||||
|
|
||||||
|
border_size = 2;
|
||||||
|
|
||||||
|
"col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg";
|
||||||
|
"col.inactive_border" = "rgba(595959aa)";
|
||||||
|
|
||||||
|
resize_on_border = false;
|
||||||
|
allow_tearing = false;
|
||||||
|
layout = "master";
|
||||||
|
};
|
||||||
|
|
||||||
|
decoration = {
|
||||||
|
rounding = 10;
|
||||||
|
|
||||||
|
# Change transparency of focused and unfocused windows
|
||||||
|
active_opacity = 1.0;
|
||||||
|
inactive_opacity = 1.0;
|
||||||
|
|
||||||
|
# drop_shadow = true;
|
||||||
|
# shadow_range = 4;
|
||||||
|
# shadow_render_power = 3;
|
||||||
|
# "col.shadow" = "rgba(1a1a1aee)";
|
||||||
|
|
||||||
|
# https://wiki.hyprland.org/Configuring/Variables/#blur
|
||||||
|
blur = {
|
||||||
|
enabled = true;
|
||||||
|
size = 3;
|
||||||
|
passes = 1;
|
||||||
|
|
||||||
|
vibrancy = 0.1696;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
animations.enabled = false;
|
||||||
|
|
||||||
|
master = {
|
||||||
|
new_status = "slave";
|
||||||
|
};
|
||||||
|
|
||||||
|
misc = {
|
||||||
|
force_default_wallpaper = 0; # Set to 0 or 1 to disable the anime mascot wallpapers
|
||||||
|
disable_hyprland_logo = false; # If true disables the random hyprland logo / anime girl background. :(
|
||||||
|
};
|
||||||
|
|
||||||
|
input ={
|
||||||
|
kb_layout = "us";
|
||||||
|
kb_variant = "";
|
||||||
|
kb_model = "";
|
||||||
|
kb_options = "caps:escape";
|
||||||
|
kb_rules = "";
|
||||||
|
|
||||||
|
follow_mouse = 1;
|
||||||
|
|
||||||
|
sensitivity = 0; # -1.0 - 1.0, 0 means no modification.
|
||||||
|
|
||||||
|
touchpad = {
|
||||||
|
natural_scroll = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.hyprpaper = {
|
||||||
|
enable = true;
|
||||||
|
settings.ipc = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# UWSM
|
||||||
|
systemd.user.services = {
|
||||||
|
hypridle.Unit.After = lib.mkForce "graphical-session.target";
|
||||||
|
waybar.Unit.After = lib.mkForce "graphical-session.target";
|
||||||
|
network-manager-applet.Unit.After = lib.mkForce "graphical-session.target";
|
||||||
|
fcitx5-daemon.Unit.After = lib.mkForce "graphical-session.target";
|
||||||
|
# hyprpaper.Unit.After = lib.mkForce "graphical-session.target";
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
|
||||||
let
|
|
||||||
cfg = config.wayland.windowManager.hyprland;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./hypridle.nix
|
|
||||||
./hyprland.nix
|
|
||||||
./hyprlock.nix
|
|
||||||
./hyprpaper.nix
|
|
||||||
./hyprpolkitagent.nix
|
|
||||||
./keybinds.nix
|
|
||||||
./scratchpads.nix
|
|
||||||
./windowrules.nix
|
|
||||||
./xdg-portals.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
home.sessionVariables = {
|
|
||||||
WLR_NO_HARDWARE_CURSORS = "1";
|
|
||||||
WLR_RENDERER_ALLOW_SOFTWARE = "1";
|
|
||||||
XDG_CURRENT_DESKTOP = "Hyprland";
|
|
||||||
XDG_SESSION_DESKTOP = "Hyprland";
|
|
||||||
XDG_SESSION_TYPE = "wayland";
|
|
||||||
GDK_BACKEND = "wayland,x11,*";
|
|
||||||
QT_QPA_PLATFORM = "wayland;xcb";
|
|
||||||
NIXOS_OZONE_WL = "1";
|
|
||||||
MOZ_ENABLE_WAYLAND = "1";
|
|
||||||
SDL_VIDEODRIVER = "wayland";
|
|
||||||
OZONE_PLATFORM = "wayland";
|
|
||||||
CLUTTER_BACKEND = "wayland";
|
|
||||||
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
|
||||||
# QT_QPA_PLATFORMTHEME = "qt6ct";
|
|
||||||
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
|
|
||||||
|
|
||||||
# LIBVA_DRIVER_NAME = "nvidia";
|
|
||||||
# GBM_BACKEND = "nvidia-drm";
|
|
||||||
# __GLX_VENDOR_LIBRARY_NAME = "nvidia";
|
|
||||||
};
|
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
wl-clipboard-rs
|
|
||||||
];
|
|
||||||
|
|
||||||
systemd.user.services = {
|
|
||||||
waybar.Unit.After = lib.mkForce "graphical-session.target";
|
|
||||||
|
|
||||||
network-manager-applet.Unit.After = lib.mkForce "graphical-session.target";
|
|
||||||
|
|
||||||
fcitx5-daemon = {
|
|
||||||
Unit.After = lib.mkForce "graphical-session.target";
|
|
||||||
Service.Slice = "session.slice";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
|
||||||
let
|
|
||||||
cfg = config.wayland.windowManager.hyprland;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
services.hypridle = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
general = {
|
|
||||||
ignore_dbus_inhibit = false;
|
|
||||||
lock_cmd = "pidof hyprlock || ${config.programs.hyprlock.package}/bin/hyprlock";
|
|
||||||
before_sleep_cmd = "${pkgs.systemd}/bin/loginctl lock-session";
|
|
||||||
after_sleep_cmd = "${cfg.finalPackage}/bin/hyprctl dispatch dpms on";
|
|
||||||
};
|
|
||||||
|
|
||||||
listener = [
|
|
||||||
{
|
|
||||||
timeout = 900;
|
|
||||||
on-timeout = "${config.programs.hyprlock.package}/bin/hyprlock";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
timeout = 1200;
|
|
||||||
on-timeout = "${cfg.finalPackage}/bin/hyprctl dispatch dpms off";
|
|
||||||
on-resume = "${cfg.finalPackage}/bin/hyprctl dispatch dpms on";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.user.services.hypridle = {
|
|
||||||
Unit.After = lib.mkForce "graphical-session.target";
|
|
||||||
Service.Slice = "session.slice";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,90 +0,0 @@
|
|||||||
{
|
|
||||||
wayland.windowManager.hyprland = {
|
|
||||||
systemd.enable = false;
|
|
||||||
systemd.enableXdgAutostart = false;
|
|
||||||
|
|
||||||
settings = {
|
|
||||||
exec-once = [
|
|
||||||
"uwsm finalize"
|
|
||||||
];
|
|
||||||
|
|
||||||
monitor = [
|
|
||||||
# TODO: host specific
|
|
||||||
"eDP-1, 3840x2400@90.00Hz, 0x0, 2"
|
|
||||||
|
|
||||||
# PVV Demiurgen
|
|
||||||
"desc:Hewlett Packard HP ZR24w CNT01711G6, 1920x1200, 0x-1200, 1"
|
|
||||||
"desc:Hewlett Packard HP ZR24w CNT018103H, 1920x1200, 1920x-1200, 1"
|
|
||||||
|
|
||||||
# PVV Eirin
|
|
||||||
"desc:Hewlett Packard HP ZR24w CNT01710L4, 1920x1200, 0x-1200, 1"
|
|
||||||
"desc:Hewlett Packard HP ZR24w CNT0181039, 1920x1200, 1920x-1200, 1"
|
|
||||||
|
|
||||||
",preferred,auto,1"
|
|
||||||
];
|
|
||||||
|
|
||||||
general = {
|
|
||||||
gaps_in = 5;
|
|
||||||
gaps_out = 15;
|
|
||||||
|
|
||||||
border_size = 2;
|
|
||||||
|
|
||||||
"col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg";
|
|
||||||
"col.inactive_border" = "rgba(595959aa)";
|
|
||||||
|
|
||||||
resize_on_border = false;
|
|
||||||
allow_tearing = false;
|
|
||||||
layout = "master";
|
|
||||||
};
|
|
||||||
|
|
||||||
decoration = {
|
|
||||||
rounding = 10;
|
|
||||||
|
|
||||||
# Change transparency of focused and unfocused windows
|
|
||||||
active_opacity = 1.0;
|
|
||||||
inactive_opacity = 1.0;
|
|
||||||
|
|
||||||
# drop_shadow = true;
|
|
||||||
# shadow_range = 4;
|
|
||||||
# shadow_render_power = 3;
|
|
||||||
# "col.shadow" = "rgba(1a1a1aee)";
|
|
||||||
|
|
||||||
# https://wiki.hyprland.org/Configuring/Variables/#blur
|
|
||||||
blur = {
|
|
||||||
enabled = true;
|
|
||||||
size = 3;
|
|
||||||
passes = 1;
|
|
||||||
|
|
||||||
vibrancy = 0.1696;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
animations.enabled = false;
|
|
||||||
|
|
||||||
master = {
|
|
||||||
new_status = "slave";
|
|
||||||
};
|
|
||||||
|
|
||||||
misc = {
|
|
||||||
force_default_wallpaper = 0; # Set to 0 or 1 to disable the anime mascot wallpapers
|
|
||||||
disable_hyprland_logo = false; # If true disables the random hyprland logo / anime girl background. :(
|
|
||||||
};
|
|
||||||
|
|
||||||
input ={
|
|
||||||
kb_layout = "us";
|
|
||||||
kb_variant = "";
|
|
||||||
kb_model = "";
|
|
||||||
kb_options = "caps:escape";
|
|
||||||
kb_rules = "";
|
|
||||||
|
|
||||||
follow_mouse = 1;
|
|
||||||
|
|
||||||
sensitivity = 0; # -1.0 - 1.0, 0 means no modification.
|
|
||||||
|
|
||||||
touchpad = {
|
|
||||||
natural_scroll = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
|
||||||
let
|
|
||||||
cfg = config.wayland.windowManager.hyprland;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
programs.hyprlock = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
general = {
|
|
||||||
disable_loading_bar = true;
|
|
||||||
grace = 0;
|
|
||||||
hide_cursor = true;
|
|
||||||
no_fade_in = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
background = [
|
|
||||||
{
|
|
||||||
path = "screenshot";
|
|
||||||
blur_passes = 3;
|
|
||||||
blur_size = 8;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
input-field = [
|
|
||||||
{
|
|
||||||
size = "200, 50";
|
|
||||||
position = "0, -80";
|
|
||||||
monitor = "";
|
|
||||||
dots_center = true;
|
|
||||||
fade_on_empty = false;
|
|
||||||
font_color = "rgb(202, 211, 245)";
|
|
||||||
inner_color = "rgb(91, 96, 120)";
|
|
||||||
outer_color = "rgb(24, 25, 38)";
|
|
||||||
outline_thickness = 5;
|
|
||||||
placeholder_text = ''Password...'';
|
|
||||||
shadow_passes = 2;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
auth = {
|
|
||||||
"pam:enabled" = true;
|
|
||||||
"pam:module" = "hyprlock";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
{ config, lib, ... }:
|
|
||||||
let
|
|
||||||
cfg = config.wayland.windowManager.hyprland;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
services.hyprpaper = {
|
|
||||||
enable = true;
|
|
||||||
settings.ipc = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.user.services.hyprpaper = {
|
|
||||||
Unit.After = lib.mkForce "graphical-session.target";
|
|
||||||
Service.Slice = "session.slice";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
{ config, lib, ... }:
|
|
||||||
let
|
|
||||||
cfg = config.wayland.windowManager.hyprland;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
services.hyprpolkitagent.enable = true;
|
|
||||||
|
|
||||||
systemd.user.services.hyprpolkitagent = {
|
|
||||||
Unit.After = lib.mkForce "graphical-session.target";
|
|
||||||
Service.Slice = "session.slice";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,94 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
|
||||||
let
|
|
||||||
cfg = config.wayland.windowManager.hyprland;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
wayland.windowManager.hyprland.settings = let
|
|
||||||
exe = lib.getExe;
|
|
||||||
in {
|
|
||||||
"$mod" = "SUPER";
|
|
||||||
|
|
||||||
# https://github.com/xkbcommon/libxkbcommon/blob/master/include/xkbcommon/xkbcommon-keysyms.h
|
|
||||||
bind = [
|
|
||||||
"$mod SHIFT, Q, exec, uwsm stop"
|
|
||||||
"$mod ALT SHIFT, Q, exec, ${pkgs.systemd}/bin/loginctl terminate-user \"${config.home.username}\""
|
|
||||||
"$mod, R, exec, uwsm app -- ${exe config.programs.anyrun.package}"
|
|
||||||
"$mod, T, togglefloating"
|
|
||||||
|
|
||||||
"$mod, F, fullscreenstate, 1"
|
|
||||||
"$mod SHIFT, F, fullscreenstate, 3"
|
|
||||||
"$mod, C, exec, ${cfg.finalPackage}/bin/hyprctl reload"
|
|
||||||
|
|
||||||
"$mod, BACKSPACE, killactive"
|
|
||||||
|
|
||||||
"$mod SHIFT, RETURN, exec, uwsm app -- ${exe pkgs.alacritty} --class termTerminal -e ${exe pkgs.tmux} new-session -A -s term"
|
|
||||||
"$mod SHIFT, SPACE, exec, uwsm app -- ${exe pkgs.alacritty} --class termTerminal -e ${exe pkgs.tmux} new-session -A -s term"
|
|
||||||
|
|
||||||
"$mod, j, layoutmsg,cyclenext"
|
|
||||||
"$mod, k, layoutmsg,cycleprev"
|
|
||||||
"$mod SHIFT, j, layoutmsg, swapnext"
|
|
||||||
"$mod SHIFT, k, layoutmsg, swapprev"
|
|
||||||
|
|
||||||
"$mod, 1, focusworkspaceoncurrentmonitor, 1"
|
|
||||||
"$mod, 2, focusworkspaceoncurrentmonitor, 2"
|
|
||||||
"$mod, 3, focusworkspaceoncurrentmonitor, 3"
|
|
||||||
"$mod, 4, focusworkspaceoncurrentmonitor, 4"
|
|
||||||
"$mod, 5, focusworkspaceoncurrentmonitor, 5"
|
|
||||||
"$mod, 6, focusworkspaceoncurrentmonitor, 6"
|
|
||||||
"$mod, 7, focusworkspaceoncurrentmonitor, 7"
|
|
||||||
"$mod, 8, focusworkspaceoncurrentmonitor, 8"
|
|
||||||
"$mod, 9, focusworkspaceoncurrentmonitor, 9"
|
|
||||||
|
|
||||||
"$mod SHIFT, 1, movetoworkspacesilent, 1"
|
|
||||||
"$mod SHIFT, 2, movetoworkspacesilent, 2"
|
|
||||||
"$mod SHIFT, 3, movetoworkspacesilent, 3"
|
|
||||||
"$mod SHIFT, 4, movetoworkspacesilent, 4"
|
|
||||||
"$mod SHIFT, 5, movetoworkspacesilent, 5"
|
|
||||||
"$mod SHIFT, 6, movetoworkspacesilent, 6"
|
|
||||||
"$mod SHIFT, 7, movetoworkspacesilent, 7"
|
|
||||||
"$mod SHIFT, 8, movetoworkspacesilent, 8"
|
|
||||||
"$mod SHIFT, 9, movetoworkspacesilent, 9"
|
|
||||||
|
|
||||||
"$mod, b, exec, ${pkgs.fcitx5}/bin/fcitx5-remote -s mozc"
|
|
||||||
"$mod, n, exec, ${pkgs.fcitx5}/bin/fcitx5-remote -s keyboard-no"
|
|
||||||
"$mod, m, exec, ${pkgs.fcitx5}/bin/fcitx5-remote -s keyboard-us"
|
|
||||||
|
|
||||||
"$mod, l, exec, ${pkgs.systemd}/bin/loginctl lock-session"
|
|
||||||
|
|
||||||
# TODO: fix
|
|
||||||
# "super + minus" = "${pkgs.xcalib}/bin/xcalib -invert -alter"
|
|
||||||
|
|
||||||
", Print, exec, ${exe pkgs.grimblast} copy area"
|
|
||||||
|
|
||||||
"SHIFT, Print, exec, ${lib.getExe pkgs.grimblast} save"
|
|
||||||
# "shift + @Print" = "${pkgs.maim}/bin/maim --hidecursor --nokeyboard $SCREENSHOT_DIR/$(date +%s).png"
|
|
||||||
|
|
||||||
"$mod, Print, exec, ${exe pkgs.woomer}"
|
|
||||||
];
|
|
||||||
|
|
||||||
bindm = [
|
|
||||||
"$mod, mouse:272, movewindow"
|
|
||||||
"$mod, Control_L, movewindow"
|
|
||||||
"$mod, mouse:273, resizewindow"
|
|
||||||
"$mod, ALT_L, resizewindow"
|
|
||||||
];
|
|
||||||
|
|
||||||
bindl = [
|
|
||||||
"$mod, p, exec, ${exe pkgs.mpc} toggle"
|
|
||||||
",XF86AudioPlay, exec, ${exe pkgs.mpc} toggle"
|
|
||||||
",XF86AudioPrev, exec, ${exe pkgs.mpc} prev"
|
|
||||||
",XF86AudioNext, exec, ${exe pkgs.mpc} next"
|
|
||||||
];
|
|
||||||
|
|
||||||
bindle = [
|
|
||||||
",XF86MonBrightnessUp, exec, ${exe pkgs.brightnessctl} s +5%"
|
|
||||||
",XF86MonBrightnessDown, exec, ${exe pkgs.brightnessctl} s 5%-"
|
|
||||||
",XF86AudioLowerVolume, exec, ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%-"
|
|
||||||
",XF86AudioRaiseVolume, exec, ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%+"
|
|
||||||
"$mod ,F7, exec, ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%-"
|
|
||||||
"$mod ,F8, exec, ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%+"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,75 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
|
||||||
let
|
|
||||||
cfg = config.wayland.windowManager.hyprland;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
wayland.windowManager.hyprland.settings = let
|
|
||||||
exe = lib.getExe;
|
|
||||||
scratchpads = [
|
|
||||||
(rec {
|
|
||||||
title = "Floating terminal";
|
|
||||||
class = "floatingTerminal";
|
|
||||||
command = "uwsm app -- ${exe pkgs.alacritty} --class ${class} -e ${exe pkgs.tmux} new-session -A -s f";
|
|
||||||
size = { h = 90; w = 95; };
|
|
||||||
keys = [
|
|
||||||
"$mod, RETURN"
|
|
||||||
"$mod, SPACE"
|
|
||||||
];
|
|
||||||
})
|
|
||||||
(rec {
|
|
||||||
title = "Ncmpcpp";
|
|
||||||
class = "floatingNcmpcpp";
|
|
||||||
command = "uwsm app -- ${exe pkgs.alacritty} --class ${class} -e ${exe pkgs.ncmpcpp}";
|
|
||||||
size = { h = 95; w = 95; };
|
|
||||||
keys = [ "$mod, Q" ];
|
|
||||||
})
|
|
||||||
# "$mod, W, emacs"
|
|
||||||
# "$mod, E, filebrowser"
|
|
||||||
# "$mod, X, taskwarriortui"
|
|
||||||
];
|
|
||||||
in {
|
|
||||||
bind = lib.pipe scratchpads [
|
|
||||||
(map ({ keys, command, class, ... }:
|
|
||||||
(map (key: let
|
|
||||||
# TODO: rewrite this to take arguments instead of creating n copies
|
|
||||||
invokeIfNotRunningAndToggleWorkspace = pkgs.writeShellApplication {
|
|
||||||
name = "hyprland-toggle-scratchpad-${class}";
|
|
||||||
runtimeInputs = [ cfg.finalPackage pkgs.jq ];
|
|
||||||
text = ''
|
|
||||||
SCRATCHPAD_PROGRAM_EXISTS=$(hyprctl clients -j | jq -r '[.[].class]|any(. == "${class}")')
|
|
||||||
CURRENT_WORKSPACE_ID=$(hyprctl activeworkspace -j | jq -r '.id')
|
|
||||||
|
|
||||||
if [ "$SCRATCHPAD_PROGRAM_EXISTS" != "true" ]; then
|
|
||||||
${command} &
|
|
||||||
hyprctl dispatch movetoworkspacesilent "''${CURRENT_WORKSPACE_ID},class:${class}"
|
|
||||||
hyprctl dispatch focuswindow "class:${class}"
|
|
||||||
else
|
|
||||||
SCRATCHPAD_PROGRAM_WORKSPACE_ID=$(hyprctl clients -j | jq '.[] | select( .class == "${class}") | .workspace.id')
|
|
||||||
if [ "$SCRATCHPAD_PROGRAM_WORKSPACE_ID" != "$CURRENT_WORKSPACE_ID" ]; then
|
|
||||||
hyprctl dispatch movetoworkspacesilent "''${CURRENT_WORKSPACE_ID},class:${class}"
|
|
||||||
hyprctl dispatch focuswindow "class:${class}"
|
|
||||||
else
|
|
||||||
hyprctl dispatch movetoworkspacesilent "special:${class}Ws,class:${class}"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
in "${key}, exec, ${lib.getExe invokeIfNotRunningAndToggleWorkspace}"
|
|
||||||
) keys)
|
|
||||||
))
|
|
||||||
lib.flatten
|
|
||||||
];
|
|
||||||
|
|
||||||
windowrulev2 = lib.pipe scratchpads [
|
|
||||||
(map ({ class, size, ... }: [
|
|
||||||
"workspace special:${class}Ws, class:^(${class})$"
|
|
||||||
"float, class:^${class}$"
|
|
||||||
"size ${toString size.w}% ${toString size.h}%, class:^(${class})$"
|
|
||||||
"move ${toString ((100 - size.w) / 2)}% ${toString ((100 - size.h) / 2)}%, class:^(${class})$"
|
|
||||||
]))
|
|
||||||
lib.flatten
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
{ config, lib, ... }:
|
|
||||||
let
|
|
||||||
cfg = config.wayland.windowManager.hyprland;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
wayland.windowManager.hyprland.settings.windowrulev2 = [
|
|
||||||
"float, class:^(Rofi)$"
|
|
||||||
"float, class:^(xdg-desktop-portal-gtk)$"
|
|
||||||
"float, title:^(.*Bitwarden Password Manager.*)$"
|
|
||||||
"float, title:^(Picture-in-Picture)$"
|
|
||||||
"tile, class:^(Nsxiv)$"
|
|
||||||
|
|
||||||
"float, class: ^(Gimp-2.*)$, title:^(Open Image)$"
|
|
||||||
"size 70%, class: ^(Gimp-2.*)$, title:^(Open Image)$"
|
|
||||||
"center, class: ^(Gimp-2.*)$, title:^(Open Image)$"
|
|
||||||
|
|
||||||
"dimaround, class:^(xdg-desktop-portal-gtk)$"
|
|
||||||
|
|
||||||
"workspace special silent, title:^(Firefox — Sharing Indicator)$"
|
|
||||||
"workspace special silent, title:^(Zen — Sharing Indicator)$"
|
|
||||||
"workspace special silent, title:^(.*is sharing (your screen|a window)\.)$"
|
|
||||||
|
|
||||||
"workspace 2, class:^(firefox)$"
|
|
||||||
"workspace 2, class:^(google-chrome)$"
|
|
||||||
|
|
||||||
"workspace 3, class:^(Emacs)$"
|
|
||||||
"workspace 3, class:^(code)$"
|
|
||||||
"workspace 3, class:^(code-url-handler)$"
|
|
||||||
"workspace 3, class:^(dev.zed.Zed)$"
|
|
||||||
|
|
||||||
"workspace 5, class:^(discord)$"
|
|
||||||
"workspace 5, class:^(Element)$"
|
|
||||||
|
|
||||||
"float, class:^(xdg-desktop-portal-termfilechooser)$"
|
|
||||||
"size 70% 80%, class:^(xdg-desktop-portal-termfilechooser)$"
|
|
||||||
"move 15% 10%, class:^(xdg-desktop-portal-termfilechooser)$"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
|
||||||
let
|
|
||||||
cfg = config.wayland.windowManager.hyprland;
|
|
||||||
in {
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
xdg.portal = {
|
|
||||||
xdgOpenUsePortal = true;
|
|
||||||
configPackages = with pkgs; [ gnome-session ];
|
|
||||||
extraPortals = with pkgs; [
|
|
||||||
gnome-keyring
|
|
||||||
xdg-desktop-portal-gtk
|
|
||||||
xdg-desktop-portal-termfilechooser
|
|
||||||
];
|
|
||||||
config.hyprland = {
|
|
||||||
default = "hyprland;gtk;";
|
|
||||||
"org.freedesktop.impl.portal.FileChooser" = [ "termfilechooser" ];
|
|
||||||
"org.freedesktop.impl.portal.OpenURI" = [ "gtk" ];
|
|
||||||
"org.freedesktop.impl.portal.Notification" = [ "gtk" ];
|
|
||||||
"org.freedesktop.impl.portal.Secret" = [ "gnome-keyring" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
xdg.configFile."xdg-desktop-portal-termfilechooser/config".source =
|
|
||||||
(pkgs.formats.ini { listsAsDuplicateKeys = true; }).generate "xdg-desktop-portal-termfilechooser.ini" {
|
|
||||||
filechooser = {
|
|
||||||
cmd = "${pkgs.xdg-desktop-portal-termfilechooser}/share/xdg-desktop-portal-termfilechooser/yazi-wrapper.sh";
|
|
||||||
default_dir = "$HOME";
|
|
||||||
env = [
|
|
||||||
"TERMCMD=alacritty -T \"Filechooser\" --class \"xdg-desktop-portal-termfilechooser\" --command"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
programs.jq = { };
|
programs.jq.enable = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
{ config, ... }:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
programs.less = {
|
programs.less = {
|
||||||
config = ''
|
enable = true;
|
||||||
|
keys = ''
|
||||||
#env
|
#env
|
||||||
LESS = -i -R
|
LESS = -i -R
|
||||||
LESSHISTSIZE=20000
|
LESSHISTSIZE=20000
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
programs.man = {
|
programs.man = {
|
||||||
|
enable = true;
|
||||||
generateCaches = true;
|
generateCaches = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
programs.meli = {
|
|
||||||
package = pkgs.meli.overrideAttrs {
|
|
||||||
doCheck = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
{ config, lib, machineVars, ... }:
|
{ config, lib, machineVars, ... }:
|
||||||
{
|
{
|
||||||
programs.mpv = {
|
programs.mpv = {
|
||||||
|
enable = !machineVars.headless;
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
screenshot-directory = "${config.xdg.userDirs.pictures}/mpv-screenshots";
|
screenshot-directory = "${config.xdg.userDirs.pictures}/mpv-screenshots";
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
{
|
{
|
||||||
programs.ncmpcpp = {
|
programs.ncmpcpp = {
|
||||||
|
enable = true;
|
||||||
package = pkgs.ncmpcpp.override { visualizerSupport = true; };
|
package = pkgs.ncmpcpp.override { visualizerSupport = true; };
|
||||||
|
|
||||||
bindings = [
|
bindings = [
|
||||||
|
|||||||
@@ -1,29 +0,0 @@
|
|||||||
{ config, lib, ... }:
|
|
||||||
let
|
|
||||||
cfg = config.programs.neomutt;
|
|
||||||
in lib.mkIf cfg.enable {
|
|
||||||
programs.neomutt = {
|
|
||||||
# vimKeys = true;
|
|
||||||
# set mailcap_path = ~/.config/neomutt/mailcap
|
|
||||||
# set header_cache = "~/.cache/mutt"
|
|
||||||
# set message_cachedir = "~/.cache/mutt"
|
|
||||||
# set tmpdir = /run/user/${uid}/mutt
|
|
||||||
|
|
||||||
# extraConfig = ''
|
|
||||||
# # vim: filetype=muttrc
|
|
||||||
# '';
|
|
||||||
};
|
|
||||||
|
|
||||||
xdg.configFile."neomutt/mailcap".text = ''
|
|
||||||
# vim: filetype=muttrc
|
|
||||||
|
|
||||||
text/plain; nvim %s
|
|
||||||
|
|
||||||
#PDFs
|
|
||||||
application/pdf; zathura %s pdf
|
|
||||||
|
|
||||||
#Images
|
|
||||||
image/png; feh %s
|
|
||||||
image/jpeg; feh %s
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
@@ -1,9 +1,8 @@
|
|||||||
{ config, pkgs, lib, machineVars, ... }:
|
{ pkgs, lib, machineVars, ... }:
|
||||||
let
|
{
|
||||||
cfg = config.programs.neovim;
|
|
||||||
in
|
|
||||||
lib.mkIf cfg.enable {
|
|
||||||
programs.neovim = {
|
programs.neovim = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
auto-clean-swapfiles.enable = true;
|
auto-clean-swapfiles.enable = true;
|
||||||
|
|
||||||
viAlias = true;
|
viAlias = true;
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ in {
|
|||||||
imports = [ ./sources.nix ];
|
imports = [ ./sources.nix ];
|
||||||
|
|
||||||
programs.newsboat = {
|
programs.newsboat = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
fetch-articles.enable = true;
|
fetch-articles.enable = true;
|
||||||
vacuum.enable = true;
|
vacuum.enable = true;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
programs.nix-index = {
|
programs.nix-index = {
|
||||||
|
enable = true;
|
||||||
autoUpdateDatabase.enable = true;
|
autoUpdateDatabase.enable = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,27 +1,18 @@
|
|||||||
{ config, lib, ... }:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
sops = {
|
sops = {
|
||||||
secrets = {
|
secrets = {
|
||||||
"nix/access-tokens/github" = { sopsFile = ./../../secrets/common.yaml; };
|
"nix/access-tokens/github" = { sopsFile = ../../secrets/common.yaml; };
|
||||||
"nix/access-tokens/pvv-git" = { sopsFile = ./../../secrets/common.yaml; };
|
"nix/access-tokens/pvv-git" = { sopsFile = ../../secrets/common.yaml; };
|
||||||
};
|
};
|
||||||
templates."nix-access-tokens.conf".content = let
|
templates."nix-access-tokens.conf".content = let
|
||||||
inherit (config.sops) placeholder;
|
inherit (config.sops) placeholder;
|
||||||
|
in ''
|
||||||
tokens = {
|
access-tokens = github.com=${placeholder."nix/access-tokens/github"} git.pvv.ntnu.no=${placeholder."nix/access-tokens/pvv-git"}
|
||||||
"github.com" = placeholder."nix/access-tokens/github";
|
'';
|
||||||
"git.pvv.ntnu.no" = placeholder."nix/access-tokens/pvv-git";
|
|
||||||
};
|
|
||||||
in "access-tokens = ${lib.pipe tokens [
|
|
||||||
lib.attrsToList
|
|
||||||
(builtins.sort (p: q: p.name > q.name))
|
|
||||||
(map ({ name, value }: "${name}=${value}"))
|
|
||||||
(builtins.concatStringsSep " ")
|
|
||||||
]}";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
enable = true;
|
|
||||||
settings.use-xdg-base-directories = true;
|
settings.use-xdg-base-directories = true;
|
||||||
extraOptions = ''
|
extraOptions = ''
|
||||||
!include ${config.sops.templates."nix-access-tokens.conf".path}
|
!include ${config.sops.templates."nix-access-tokens.conf".path}
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
programs.nushell = { };
|
programs.nushell = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
{ ... }:
|
|
||||||
{
|
|
||||||
programs.nyxt = { };
|
|
||||||
}
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
{ ... }:
|
{ machineVars, ... }:
|
||||||
{
|
{
|
||||||
programs.obs-studio = { };
|
programs.obs-studio.enable = !machineVars.headless;
|
||||||
}
|
}
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
{ ... }:
|
|
||||||
{
|
|
||||||
programs.obsidian = { };
|
|
||||||
}
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
programs.pandoc = { };
|
programs.pandoc.enable = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
programs.prism-launcher = {
|
programs.prism-launcher = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
package = pkgs.prismlauncher.override {
|
package = pkgs.prismlauncher.override {
|
||||||
jdk17 = pkgs.jdk21;
|
jdk17 = pkgs.jdk21;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,31 +1,24 @@
|
|||||||
{ config, lib, pkgs, extendedLib, ... }:
|
{ config, pkgs, extendedLib, ... }:
|
||||||
let
|
|
||||||
cfg = config.programs.python;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
options.programs.python.enable = lib.mkEnableOption "python";
|
# Python for interactive use
|
||||||
|
home.packages = [
|
||||||
|
(pkgs.python3.withPackages (pypkgs: with pypkgs; [
|
||||||
|
requests
|
||||||
|
]))
|
||||||
|
];
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
xdg.configFile."python/pyrc".text = ''
|
||||||
# Python for interactive use
|
#!/usr/bin/env python3
|
||||||
home.packages = [
|
import sys
|
||||||
(pkgs.python3.withPackages (pypkgs: with pypkgs; [
|
|
||||||
requests
|
|
||||||
]))
|
|
||||||
];
|
|
||||||
|
|
||||||
xdg.configFile."python/pyrc".text = ''
|
# You also need \x01 and \x02 to separate escape sequence, due to:
|
||||||
#!/usr/bin/env python3
|
# https://stackoverflow.com/a/9468954/1147688
|
||||||
import sys
|
sys.ps1='\x01\x1b${extendedLib.termColors.front.blue "[Python]> "}\x02>>>\x01\x1b[0m\x02 ' # bright yellow
|
||||||
|
sys.ps2='\x01\x1b[1;49;31m\x02...\x01\x1b[0m\x02 ' # bright red
|
||||||
|
'';
|
||||||
|
|
||||||
# You also need \x01 and \x02 to separate escape sequence, due to:
|
home.sessionVariables = {
|
||||||
# https://stackoverflow.com/a/9468954/1147688
|
PYTHONSTARTUP = "${config.xdg.configHome}/python/pyrc";
|
||||||
sys.ps1='\x01\x1b${extendedLib.termColors.front.blue "[Python]> "}\x02>>>\x01\x1b[0m\x02 ' # bright yellow
|
PYTHON_HISTORY = "${config.xdg.dataHome}/python_history";
|
||||||
sys.ps2='\x01\x1b[1;49;31m\x02...\x01\x1b[0m\x02 ' # bright red
|
|
||||||
'';
|
|
||||||
|
|
||||||
home.sessionVariables = {
|
|
||||||
PYTHONSTARTUP = "${config.xdg.configHome}/python/pyrc";
|
|
||||||
PYTHON_HISTORY = "${config.xdg.dataHome}/python_history";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
programs.qutebrowser = {
|
programs.qutebrowser = {
|
||||||
|
enable = true;
|
||||||
aliases = {};
|
aliases = {};
|
||||||
searchEngines = {};
|
searchEngines = {};
|
||||||
settings = {};
|
settings = {};
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
{ ... }:
|
|
||||||
{
|
|
||||||
programs.rclone = { };
|
|
||||||
}
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
programs.ripgrep = { };
|
programs.ripgrep.enable = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
programs.rofi = {
|
programs.rofi = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
# plugins = with pkgs; [
|
# plugins = with pkgs; [
|
||||||
# rofi-emoji
|
# rofi-emoji
|
||||||
# rofi-mpd
|
# rofi-mpd
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
programs.skim = {
|
programs.skim = {
|
||||||
|
enable = true;
|
||||||
defaultCommand = "fd --type f";
|
defaultCommand = "fd --type f";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,24 +1,17 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
let
|
|
||||||
cfg = config.programs.sqlite;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
options.programs.sqlite.enable = lib.mkEnableOption "sqlite";
|
xdg.configFile."sqlite3/sqliterc".text = ''
|
||||||
|
.bail on
|
||||||
|
.changes on
|
||||||
|
.headers on
|
||||||
|
.mode box
|
||||||
|
.nullvalue '<NULL>'
|
||||||
|
.timer on
|
||||||
|
'';
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
home.packages = [
|
||||||
xdg.configFile."sqlite3/sqliterc".text = ''
|
pkgs.sqlite-interactive
|
||||||
.bail on
|
];
|
||||||
.changes on
|
|
||||||
.headers on
|
|
||||||
.mode box
|
|
||||||
.nullvalue '<NULL>'
|
|
||||||
.timer on
|
|
||||||
'';
|
|
||||||
|
|
||||||
home.packages = [
|
home.sessionVariables.SQLITE_HISTORY= "${config.xdg.dataHome}/sqlite_history";
|
||||||
pkgs.sqlite-interactive
|
|
||||||
];
|
|
||||||
|
|
||||||
home.sessionVariables.SQLITE_HISTORY= "${config.xdg.dataHome}/sqlite_history";
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
let
|
let
|
||||||
cfg = config.programs.ssh;
|
|
||||||
runtimeDir = "/run/user/${toString config.home.uid}";
|
runtimeDir = "/run/user/${toString config.home.uid}";
|
||||||
controlMastersDir = "${runtimeDir}/ssh";
|
controlMastersDir = "${runtimeDir}/ssh";
|
||||||
in
|
in
|
||||||
@@ -9,36 +8,32 @@ in
|
|||||||
./home.nix
|
./home.nix
|
||||||
./other.nix
|
./other.nix
|
||||||
./pvv.nix
|
./pvv.nix
|
||||||
./kyoto-u.nix
|
|
||||||
];
|
];
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
|
|
||||||
sops.secrets."ssh/secret-config" = {
|
sops.secrets."ssh/secret-config" = {
|
||||||
mode = "0444";
|
mode = "0444";
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.ssh = {
|
||||||
|
enable = true;
|
||||||
|
includes = [
|
||||||
|
config.sops.secrets."ssh/secret-config".path
|
||||||
|
"${config.home.homeDirectory}/.ssh/mutable_config"
|
||||||
|
];
|
||||||
|
|
||||||
|
controlMaster = "auto";
|
||||||
|
controlPersist = "10m";
|
||||||
|
controlPath = "${controlMastersDir}/%n%C";
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.user.tmpfiles.settings."10-ssh" = {
|
||||||
|
${controlMastersDir}.d = {
|
||||||
|
user = config.home.username;
|
||||||
|
mode = "0700";
|
||||||
};
|
};
|
||||||
|
"${config.home.homeDirectory}/.ssh/mutable_config".f = {
|
||||||
programs.ssh = {
|
user = config.home.username;
|
||||||
includes = [
|
mode = "0600";
|
||||||
config.sops.secrets."ssh/secret-config".path
|
|
||||||
"${config.home.homeDirectory}/.ssh/mutable_config"
|
|
||||||
];
|
|
||||||
|
|
||||||
matchBlocks."*" = {
|
|
||||||
controlMaster = "auto";
|
|
||||||
controlPersist = "10m";
|
|
||||||
controlPath = "${controlMastersDir}/%n%C";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.user.tmpfiles.settings."10-ssh" = {
|
|
||||||
${controlMastersDir}.d = {
|
|
||||||
user = config.home.username;
|
|
||||||
mode = "0700";
|
|
||||||
};
|
|
||||||
"${config.home.homeDirectory}/.ssh/mutable_config".f = {
|
|
||||||
user = config.home.username;
|
|
||||||
mode = "0600";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
{ lib, ... }:
|
|
||||||
let
|
|
||||||
default = {
|
|
||||||
user = "oysteikt";
|
|
||||||
identityFile = [ "~/.ssh/id_ed25519" ];
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
programs.ssh.matchBlocks = {
|
|
||||||
"io" = default // {
|
|
||||||
hostname = "io.kuis.kyoto-u.ac.jp";
|
|
||||||
# SOCKS proxy for access to internal web.
|
|
||||||
dynamicForwards = [{ port = 8080; }];
|
|
||||||
};
|
|
||||||
} // (lib.genAttrs [
|
|
||||||
"argo"
|
|
||||||
"procyon"
|
|
||||||
"apus"
|
|
||||||
"vega"
|
|
||||||
"leo"
|
|
||||||
] (name: default // {
|
|
||||||
hostname = "${name}.fos.kuis.kyoto-u.ac.jp";
|
|
||||||
proxyJump = "io";
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
@@ -11,6 +11,17 @@
|
|||||||
hostname = "github.com";
|
hostname = "github.com";
|
||||||
identityFile = [ "~/.ssh/id_rsa" ];
|
identityFile = [ "~/.ssh/id_rsa" ];
|
||||||
};
|
};
|
||||||
|
"github-nordicsemi" = {
|
||||||
|
user = "git";
|
||||||
|
hostname = "github.com";
|
||||||
|
identityFile = [ "~/.ssh/id_ed25519_nordicsemi" ];
|
||||||
|
};
|
||||||
|
"bitbucket-nordicsemi" = {
|
||||||
|
user = "git";
|
||||||
|
hostname = "bitbucket.nordicsemi.no";
|
||||||
|
port = 7999;
|
||||||
|
identityFile = [ "~/.ssh/id_ed25519_nordicsemi" ];
|
||||||
|
};
|
||||||
"gitlab.stud.idi.ntnu.no" = {
|
"gitlab.stud.idi.ntnu.no" = {
|
||||||
user = "git";
|
user = "git";
|
||||||
proxyJump = "pvv";
|
proxyJump = "pvv";
|
||||||
|
|||||||
@@ -24,11 +24,6 @@ let # http://www.pvv.ntnu.no/pvv/Maskiner
|
|||||||
"isvegg"
|
"isvegg"
|
||||||
"knutsen"
|
"knutsen"
|
||||||
"kommode"
|
"kommode"
|
||||||
"lupine-1"
|
|
||||||
"lupine-2"
|
|
||||||
"lupine-3"
|
|
||||||
"lupine-4"
|
|
||||||
"lupine-5"
|
|
||||||
{
|
{
|
||||||
names = [ "microbel" "pvv-users" "pvv-mail" ];
|
names = [ "microbel" "pvv-users" "pvv-mail" ];
|
||||||
proxyJump = lib.mkDefault null;
|
proxyJump = lib.mkDefault null;
|
||||||
@@ -40,7 +35,6 @@ let # http://www.pvv.ntnu.no/pvv/Maskiner
|
|||||||
"tom"
|
"tom"
|
||||||
"ustetind"
|
"ustetind"
|
||||||
"venture"
|
"venture"
|
||||||
"wenche"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
rootMachines = [
|
rootMachines = [
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
let
|
{
|
||||||
cfg = config.programs.taskwarrior;
|
|
||||||
in
|
|
||||||
lib.mkIf cfg.enable {
|
|
||||||
programs.taskwarrior = {
|
programs.taskwarrior = {
|
||||||
|
enable = true;
|
||||||
package = pkgs.taskwarrior3;
|
package = pkgs.taskwarrior3;
|
||||||
config = rec {
|
config = rec {
|
||||||
report.minimal.filter = "(status:pending or status:waiting)";
|
report.minimal.filter = "(status:pending or status:waiting)";
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ pkgs, lib, ... }:
|
||||||
let
|
{
|
||||||
cfg = config.programs.tealdeer;
|
|
||||||
in
|
|
||||||
lib.mkIf cfg.enable {
|
|
||||||
systemd.user.services.update-tldr-db = {
|
systemd.user.services.update-tldr-db = {
|
||||||
Unit = {
|
Unit = {
|
||||||
Description = "Update tealdeer database";
|
Description = "Update tealdeer database";
|
||||||
|
|||||||
@@ -4,5 +4,5 @@
|
|||||||
./auto-update-tldr-db.nix
|
./auto-update-tldr-db.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.tealdeer = { };
|
programs.tealdeer.enable = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
programs.texlive = {
|
programs.texlive = {
|
||||||
|
enable = true;
|
||||||
# packageSet = pkgs.texlive.combined.scheme-medium;
|
# packageSet = pkgs.texlive.combined.scheme-medium;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -2,15 +2,17 @@
|
|||||||
let
|
let
|
||||||
cfg = config.programs.thunderbird;
|
cfg = config.programs.thunderbird;
|
||||||
in
|
in
|
||||||
lib.mkIf cfg.enable {
|
{
|
||||||
programs.thunderbird = {
|
programs.thunderbird = {
|
||||||
|
enable = !machineVars.headless;
|
||||||
profiles.h7x4 = {
|
profiles.h7x4 = {
|
||||||
isDefault = true;
|
isDefault = true;
|
||||||
withExternalGnupg = true;
|
withExternalGnupg = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
|
home.packages = lib.mkIf cfg.enable (with pkgs; [
|
||||||
birdtray
|
birdtray
|
||||||
];
|
]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ pkgs, lib, ... }:
|
||||||
let
|
|
||||||
cfg = config.programs.tmux;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
programs.tmux = {
|
programs.tmux = {
|
||||||
|
enable = true;
|
||||||
baseIndex = 1;
|
baseIndex = 1;
|
||||||
clock24 = true;
|
clock24 = true;
|
||||||
escapeTime = 0;
|
escapeTime = 0;
|
||||||
@@ -40,14 +38,10 @@ in
|
|||||||
});
|
});
|
||||||
mpd-status = (pkgs.writeShellApplication {
|
mpd-status = (pkgs.writeShellApplication {
|
||||||
name = "tmux-mpd-status";
|
name = "tmux-mpd-status";
|
||||||
runtimeInputs = with pkgs; [ mpc gawk gnugrep ];
|
runtimeInputs = with pkgs; [ mpc-cli gawk gnugrep ];
|
||||||
text = fileContentsWithoutShebang ./scripts/mpd-status.sh;
|
text = fileContentsWithoutShebang ./scripts/mpd-status.sh;
|
||||||
});
|
});
|
||||||
in ''
|
in ''
|
||||||
# https://github.com/nix-community/home-manager/issues/7771
|
|
||||||
bind -N "Send the prefix key through to the application" \
|
|
||||||
${cfg.prefix} send-prefix
|
|
||||||
|
|
||||||
# Don't rename windows automatically after rename with ','
|
# Don't rename windows automatically after rename with ','
|
||||||
set-option -g allow-rename off
|
set-option -g allow-rename off
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env nix-shell
|
#!/usr/bin/env nix-shell
|
||||||
#!nix-shell -i sh -p mpc gawk gnugrep
|
#!nix-shell -i sh -p mpc-cli gawk gnugrep
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
MPC_OUTPUT=$(mpc --format '[[%artist% - ]%title%]|[%file%]')
|
MPC_OUTPUT=$(mpc --format '[[%artist% - ]%title%]|[%file%]')
|
||||||
|
|||||||
@@ -1,12 +1,14 @@
|
|||||||
{ ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
programs.uv = {
|
home.packages = [
|
||||||
# https://docs.astral.sh/uv/configuration/files/
|
pkgs.uv
|
||||||
# https://docs.astral.sh/uv/reference/settings/
|
];
|
||||||
settings = {
|
|
||||||
python-downloads = "never";
|
# https://docs.astral.sh/uv/configuration/files/
|
||||||
python-preference = "only-system";
|
# https://docs.astral.sh/uv/reference/settings/
|
||||||
pip.index-url = "https://test.pypi.org/simple";
|
xdg.configFile."uv/uv.toml".source = (pkgs.formats.toml { }).generate "uv-config" {
|
||||||
};
|
python-downloads = "never";
|
||||||
|
python-preference = "only-system";
|
||||||
|
pip.index-url = "https://test.pypi.org/simple";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user