Compare commits
13 commits
e94dee0c7f
...
e488d6ee4b
| Author | SHA1 | Date | |
|---|---|---|---|
| e488d6ee4b | |||
| 5b145e5b83 | |||
| dfe2db681d | |||
| cf70828749 | |||
| 3cebfb6a4c | |||
| 015cdeb931 | |||
| 5bc43a1a92 | |||
| c0d67ed108 | |||
| 385bfedd8f | |||
| aa062722d5 | |||
| 66a2700943 | |||
| 3412ecb175 | |||
| f5b69deee9 |
48 changed files with 778 additions and 411 deletions
3
.envrc
Normal file
3
.envrc
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
watch_file ./flake.lock **/*.nix
|
||||
|
||||
use flake
|
||||
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
/.direnv
|
||||
result
|
||||
result-*
|
||||
11
README.md
11
README.md
|
|
@ -14,17 +14,16 @@ Hey, you. This is my nixos configurations.
|
|||
|
||||
- david@Tytonidae
|
||||
|
||||
| Specialisation | DE / WM | Shell | Editor | Terminal | Launcher | Browser | DM |
|
||||
| -------------- | --------- | ----------- | ----------- | -------- | --------------- | ------- | ---------------- |
|
||||
| default | niri | fish + bash | helix + zed | ghostty | fuzzel | firefox | greetd + regreet |
|
||||
| cosmic | cosmic de | fish + bash | helix + zed | ghostty | cosmic-launcher | firefox | cosmic-greeter |
|
||||
| kde | kde | fish + bash | helix + zed | ghostty | - | firefox | sddm |
|
||||
| Specialisation | DE / WM | Shell | Editor | Terminal | Launcher | Browser | DM |
|
||||
| -------------- | ------- | ----------- | ----------- | -------- | -------- | ------- | ---------------- |
|
||||
| default | niri | fish + bash | helix + zed | ghostty | fuzzel | firefox | greetd + regreet |
|
||||
| kde | kde | fish + bash | helix + zed | ghostty | kde run | firefox | sddm |
|
||||
|
||||
- david@Akun
|
||||
|
||||
| Specialisation | DE / WM | Shell | Editor | Terminal | Launcher | Browser | DM |
|
||||
| -------------- | ------- | ----------- | ----------- | -------- | -------- | ------- | ---------------- |
|
||||
| default | niri | fish + bash | helix + zed | ghostty | - | firefox | greetd + regreet |
|
||||
| default | niri | fish + bash | helix + zed | ghostty | fuzzel | firefox | greetd + regreet |
|
||||
|
||||
- alice@Cape
|
||||
|
||||
|
|
|
|||
102
flake.lock
generated
102
flake.lock
generated
|
|
@ -90,11 +90,11 @@
|
|||
"bt-tracker": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1746144670,
|
||||
"narHash": "sha256-l1Roga5tbx5775OQDD34lQAntmlU56A3HKqJrK86P2I=",
|
||||
"lastModified": 1746720600,
|
||||
"narHash": "sha256-HRa7/lX6Cz1+c0Bo0mdTgyTCAKV17I45N7F41IUd0/c=",
|
||||
"owner": "XIU2",
|
||||
"repo": "TrackersListCollection",
|
||||
"rev": "0a9ac8d11e9e67649edf33b378190e17ce1e7e9e",
|
||||
"rev": "b90418d8ee2ef9a999dd8c412393f95cc711035d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -157,11 +157,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1745812220,
|
||||
"narHash": "sha256-hotBG0EJ9VmAHJYF0yhWuTVZpENHvwcJ2SxvIPrXm+g=",
|
||||
"lastModified": 1746695594,
|
||||
"narHash": "sha256-pAAWYs3S+/tY65vemHZdVSXpeIz4JINEJZoPoBjr8JU=",
|
||||
"owner": "nix-community",
|
||||
"repo": "disko",
|
||||
"rev": "d0c543d740fad42fe2c035b43c9d41127e073c78",
|
||||
"rev": "6bb82b77ce140137177e30df067759931ab60a73",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -221,11 +221,11 @@
|
|||
"flake-compat_3": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1717312683,
|
||||
"narHash": "sha256-FrlieJH50AuvagamEvWMIE6D2OAnERuDboFDYAED/dE=",
|
||||
"lastModified": 1746162366,
|
||||
"narHash": "sha256-5SSSZ/oQkwfcAz/o/6TlejlVGqeK08wyREBQ5qFFPhM=",
|
||||
"owner": "nix-community",
|
||||
"repo": "flake-compat",
|
||||
"rev": "38fd3954cf65ce6faf3d0d45cd26059e059f07ea",
|
||||
"rev": "0f158086a2ecdbb138cd0429410e44994f1b7e4b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -352,11 +352,11 @@
|
|||
"zon2nix": "zon2nix"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1746118269,
|
||||
"narHash": "sha256-nWCxF4Fl53yaJzxlHVDkDZNrWGsrYk9f5ondtMa+S04=",
|
||||
"lastModified": 1746649518,
|
||||
"narHash": "sha256-ogOT0WwOy8rY5vhJ5JfVOa3qc6sbDxRAMQAQIjCz1gk=",
|
||||
"owner": "ghostty-org",
|
||||
"repo": "ghostty",
|
||||
"rev": "e79bf71f2322fa5d54af07f2985f8460290f2085",
|
||||
"rev": "bcff488095cab023f26bb7bbfaf674cb0086ef87",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -441,11 +441,11 @@
|
|||
"rust-overlay": "rust-overlay"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1746132885,
|
||||
"narHash": "sha256-naxkk3EcVXP8gPeG/mQq2i37ITvAZs1AKw7K7u5DXuE=",
|
||||
"lastModified": 1746710534,
|
||||
"narHash": "sha256-OkPewzZXoV3CI7nHln2/Y5hPKVe0NuwNzFQnOveOsv4=",
|
||||
"owner": "helix-editor",
|
||||
"repo": "helix",
|
||||
"rev": "aa3fad84ef136b482eb5f84abbf109f25af9700a",
|
||||
"rev": "e4ef096945638850ad1b383c49cd197e1458c614",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -462,11 +462,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1746134275,
|
||||
"narHash": "sha256-sxfY7TIP59o2hcueanoRAtg833PiNroZkQDwlKJxGvs=",
|
||||
"lastModified": 1746719124,
|
||||
"narHash": "sha256-KOL73WIjO00ds1oIe+5HAcGcpd/TfE6dymmmYbiSlYM=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "015f1913109d44c36e683b55f0e47e283b383caa",
|
||||
"rev": "3c59c5132b64e885faca381e713b579dcbddba75",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -486,11 +486,11 @@
|
|||
"rust-overlay": "rust-overlay_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1746133891,
|
||||
"narHash": "sha256-ZZVz8ZPa+T9/pKt3khNKZ79dya5qWX1nMhJ1D46vpE8=",
|
||||
"lastModified": 1746717416,
|
||||
"narHash": "sha256-MDL5/PMRdWnKt6QtkVrEejdyMKUShoxRLTqtrbpRWys=",
|
||||
"owner": "jj-vcs",
|
||||
"repo": "jj",
|
||||
"rev": "0eceed9832d53b8e870123c88d1c1f0514fb061b",
|
||||
"rev": "da6d564e266a663bbce52c2a1f13a76b6a6ce967",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -604,11 +604,11 @@
|
|||
"rust-overlay": "rust-overlay_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1746109800,
|
||||
"narHash": "sha256-sjDpqdvbQaiA6OAsgLE4niz6hmmCpoUH0cl5zyfu6FI=",
|
||||
"lastModified": 1746702551,
|
||||
"narHash": "sha256-ygR8f63Z+3mkqak1XBWjPYqB0KMVCLVE9UZaoOavrFc=",
|
||||
"owner": "lilyinstarlight",
|
||||
"repo": "nixos-cosmic",
|
||||
"rev": "9fe1aa7b6a1043003b38f36626dd29b52247d720",
|
||||
"rev": "bfb8be07381e9b847c9f38cd63a809023f6da086",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -619,11 +619,11 @@
|
|||
},
|
||||
"nixos-hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1745955289,
|
||||
"narHash": "sha256-mmV2oPhQN+YF2wmnJzXX8tqgYmUYXUj3uUUBSTmYN5o=",
|
||||
"lastModified": 1746621361,
|
||||
"narHash": "sha256-T9vOxEqI1j1RYugV0b9dgy0AreiZ9yBDKZJYyclF0og=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "72081c9fbbef63765ae82bff9727ea79cc86bd5b",
|
||||
"rev": "2ea3ad8a1f26a76f8a8e23fc4f7757c46ef30ee5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -635,11 +635,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1745930157,
|
||||
"narHash": "sha256-y3h3NLnzRSiUkYpnfvnS669zWZLoqqI6NprtLQ+5dck=",
|
||||
"lastModified": 1746461020,
|
||||
"narHash": "sha256-7+pG1I9jvxNlmln4YgnlW4o+w0TZX24k688mibiFDUE=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "46e634be05ce9dc6d4db8e664515ba10b78151ae",
|
||||
"rev": "3730d8a308f94996a9ba7c7138ede69c1b9ac4ae",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -698,11 +698,11 @@
|
|||
},
|
||||
"nixpkgs-stable_3": {
|
||||
"locked": {
|
||||
"lastModified": 1746055187,
|
||||
"narHash": "sha256-3dqArYSMP9hM7Qpy5YWhnSjiqniSaT2uc5h2Po7tmg0=",
|
||||
"lastModified": 1746557022,
|
||||
"narHash": "sha256-QkNoyEf6TbaTW5UZYX0OkwIJ/ZMeKSSoOMnSDPQuol0=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "3e362ce63e16b9572d8c2297c04f7c19ab6725a5",
|
||||
"rev": "1d3aeb5a193b9ff13f63f4d9cc169fb88129f860",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -714,11 +714,11 @@
|
|||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1746064326,
|
||||
"narHash": "sha256-r7IZkN9NhK/IO9/J6D9ih2P1OXb67nr5HaQ1YAte18w=",
|
||||
"lastModified": 1746461020,
|
||||
"narHash": "sha256-7+pG1I9jvxNlmln4YgnlW4o+w0TZX24k688mibiFDUE=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "91bf6dffa21c7709607c9fdbf9a6acb44e7a0a5d",
|
||||
"rev": "3730d8a308f94996a9ba7c7138ede69c1b9ac4ae",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -754,11 +754,11 @@
|
|||
"nur-rycee": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1746158597,
|
||||
"narHash": "sha256-IugPXmlzFdAMxeqACtd40yLslezVDxUqPvpEn5LWcp4=",
|
||||
"lastModified": 1746681993,
|
||||
"narHash": "sha256-w3mYEUnbBjMC01c6ZixEa6LIqyiTCU9eF3vv9YTesWs=",
|
||||
"owner": "rycee",
|
||||
"repo": "nur-expressions",
|
||||
"rev": "47711ca43fc3f91fa566038cd2681812c6c3252d",
|
||||
"rev": "1f0519b8b0d044ac3699b52e60586cbebbb7b6cb",
|
||||
"type": "gitlab"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -820,11 +820,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1744252416,
|
||||
"narHash": "sha256-Vrs2GxaL0tLi9GCIUrutHgPSr+g7GYCetu7argsNrB4=",
|
||||
"lastModified": 1746585402,
|
||||
"narHash": "sha256-Pf+ufu6bYNA1+KQKHnGMNEfTwpD9ZIcAeLoE2yPWIP0=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "2af83121f9d2c5281796e60e2b048906a84b9fac",
|
||||
"rev": "72dd969389583664f87aa348b3458f2813693617",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -841,11 +841,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1746067100,
|
||||
"narHash": "sha256-6JeEbboDvRjLwB9kzCnmWj+f+ZnMtKOe5c2F1VBpaTs=",
|
||||
"lastModified": 1746671794,
|
||||
"narHash": "sha256-V+mpk2frYIEm85iYf+KPDmCGG3zBRAEhbv0E3lHdG2U=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "026e8fedefd6b167d92ed04b195c658d95ffc7a5",
|
||||
"rev": "ceec434b8741c66bb8df5db70d7e629a9d9c598f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -861,11 +861,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1745310711,
|
||||
"narHash": "sha256-ePyTpKEJTgX0gvgNQWd7tQYQ3glIkbqcW778RpHlqgA=",
|
||||
"lastModified": 1746485181,
|
||||
"narHash": "sha256-PxrrSFLaC7YuItShxmYbMgSuFFuwxBB+qsl9BZUnRvg=",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "5e3e92b16d6fdf9923425a8d4df7496b2434f39c",
|
||||
"rev": "e93ee1d900ad264d65e9701a5c6f895683433386",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -902,11 +902,11 @@
|
|||
"tinted-zed": "tinted-zed"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1746158690,
|
||||
"narHash": "sha256-Pe2emz36QL8GOILXvvmH/agqkspZFrcOrQxv6uufaEc=",
|
||||
"lastModified": 1746575057,
|
||||
"narHash": "sha256-kBlPMNZXPzDG4HUmdqYpvjvVYkoDdDrVvO14cKgHaiU=",
|
||||
"owner": "danth",
|
||||
"repo": "stylix",
|
||||
"rev": "bc38629511dd9cc78c5ca37a6e546fa66330d50e",
|
||||
"rev": "685deb9bae2e4c463e953ff39bd54fd448feaf05",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
|||
203
flake.nix
203
flake.nix
|
|
@ -168,14 +168,23 @@
|
|||
flake-parts,
|
||||
flake-utils,
|
||||
...
|
||||
} @ inputs: let
|
||||
inherit (self) outputs;
|
||||
rootPath = ./.;
|
||||
in
|
||||
flake-parts.lib.mkFlake {inherit inputs;} {
|
||||
} @ inputs:
|
||||
flake-parts.lib.mkFlake {inherit inputs;} ({flake-parts-lib, ...}: let
|
||||
inherit (self) outputs;
|
||||
inherit (flake-parts-lib) importApply;
|
||||
rootPath = ./.;
|
||||
nixos = importApply ./flake/nixos.nix {inherit rootPath outputs;};
|
||||
home = importApply ./flake/home.nix {inherit rootPath outputs;};
|
||||
deploy = importApply ./flake/deploy.nix {inherit outputs;};
|
||||
templates = importApply ./flake/templates.nix {inherit rootPath;};
|
||||
in {
|
||||
systems = flake-utils.lib.defaultSystems;
|
||||
imports = [
|
||||
inputs.home-manager.flakeModules.home-manager
|
||||
nixos
|
||||
home
|
||||
deploy
|
||||
templates
|
||||
];
|
||||
perSystem = {
|
||||
pkgs,
|
||||
|
|
@ -195,165 +204,31 @@
|
|||
inherit inputs;
|
||||
}
|
||||
);
|
||||
devShells.default = pkgs.mkShell {
|
||||
packages = with pkgs; [
|
||||
nixd
|
||||
typos
|
||||
just
|
||||
nvfetcher
|
||||
];
|
||||
};
|
||||
};
|
||||
flake =
|
||||
{
|
||||
nix.settings = {
|
||||
# substituters shared in home-manager and nixos configuration
|
||||
substituters = let
|
||||
cachix = x: "https://${x}.cachix.org";
|
||||
in
|
||||
nixpkgs.lib.flatten [
|
||||
(cachix "nix-community")
|
||||
"https://cache.nixos.org"
|
||||
(cachix "cosmic")
|
||||
];
|
||||
};
|
||||
|
||||
nixosModules.default = import ./nixos/modules;
|
||||
|
||||
overlays = {
|
||||
modifications = import ./overlays/modifications {inherit inputs outputs;};
|
||||
additions = import ./overlays/additions {inherit inputs outputs;};
|
||||
};
|
||||
|
||||
nixosConfigurations = let
|
||||
nixosConfigDir = ./nixos/configurations;
|
||||
makeNixConfiguration = hostName:
|
||||
nixpkgs.lib.nixosSystem {
|
||||
modules =
|
||||
[outputs.nixosModules.default]
|
||||
++ [
|
||||
(
|
||||
let
|
||||
dirPath = nixosConfigDir + "/${hostName}";
|
||||
filePath = nixosConfigDir + "/${hostName}.nix";
|
||||
in
|
||||
if builtins.pathExists dirPath
|
||||
then dirPath
|
||||
else filePath
|
||||
)
|
||||
];
|
||||
specialArgs = {inherit inputs outputs rootPath;};
|
||||
};
|
||||
flake = {
|
||||
overlays = {
|
||||
modifications = import ./overlays/modifications {inherit inputs outputs;};
|
||||
additions = import ./overlays/additions {inherit inputs outputs;};
|
||||
};
|
||||
nix.settings = {
|
||||
# substituters shared in home-manager and nixos configuration
|
||||
substituters = let
|
||||
cachix = x: "https://${x}.cachix.org";
|
||||
in
|
||||
nixosConfigDir
|
||||
|> builtins.readDir
|
||||
|> builtins.attrNames
|
||||
|> map (f: nixpkgs.lib.removeSuffix ".nix" f)
|
||||
|> map (name: {
|
||||
inherit name;
|
||||
value = makeNixConfiguration name;
|
||||
})
|
||||
|> builtins.listToAttrs;
|
||||
}
|
||||
// (
|
||||
let
|
||||
mkHomeConfig = {
|
||||
hostName,
|
||||
unixName ? "david",
|
||||
system ? "x86_64-linux",
|
||||
nixpkgs ? inputs.nixpkgs,
|
||||
home-manager ? inputs.home-manager,
|
||||
}: {
|
||||
"${unixName}@${hostName}" = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages."${system}";
|
||||
modules =
|
||||
[
|
||||
"${toString ./home}/${unixName}/configurations/${hostName}"
|
||||
]
|
||||
++ (with outputs.homeModules; [
|
||||
default
|
||||
extra
|
||||
])
|
||||
++ [
|
||||
outputs.homeModules."${unixName}"
|
||||
];
|
||||
extraSpecialArgs = {
|
||||
inherit
|
||||
inputs
|
||||
outputs
|
||||
unixName
|
||||
hostName
|
||||
system
|
||||
rootPath
|
||||
;
|
||||
};
|
||||
};
|
||||
};
|
||||
in {
|
||||
homeConfigurations =
|
||||
nixpkgs.lib.foldr (a: b: a // b) {} (
|
||||
map (hostName: mkHomeConfig {inherit hostName;}) [
|
||||
"Tytonidae"
|
||||
"Akun"
|
||||
]
|
||||
)
|
||||
// mkHomeConfig {
|
||||
hostName = "Cape";
|
||||
unixName = "alice";
|
||||
};
|
||||
homeModules =
|
||||
{
|
||||
default = import ./home/modules;
|
||||
extra = import ./home/extra;
|
||||
}
|
||||
// (
|
||||
./home
|
||||
|> builtins.readDir
|
||||
|> nixpkgs.lib.filterAttrs (key: value: value == "directory")
|
||||
|> nixpkgs.lib.filterAttrs (
|
||||
key: value:
|
||||
!builtins.elem key [
|
||||
"modules"
|
||||
"extra"
|
||||
]
|
||||
)
|
||||
|> builtins.attrNames
|
||||
|> map (name: {
|
||||
name = name;
|
||||
value = import "${toString ./home}/${name}/modules";
|
||||
})
|
||||
|> builtins.listToAttrs
|
||||
);
|
||||
}
|
||||
)
|
||||
// (
|
||||
let
|
||||
mkDeployNode = {
|
||||
hostName,
|
||||
unixName ? "deploy",
|
||||
system ? "x86_64-linux",
|
||||
sshName ? hostName,
|
||||
}: {
|
||||
"${hostName}" = {
|
||||
hostname = "${sshName}";
|
||||
sshUser = "${unixName}";
|
||||
interactiveSudo = true;
|
||||
profiles = {
|
||||
system = {
|
||||
user = "root";
|
||||
path =
|
||||
inputs.deploy-rs.lib."${system}".activate.nixos
|
||||
self.outputs.nixosConfigurations."${hostName}";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
in {
|
||||
deploy.nodes =
|
||||
[
|
||||
"Cape"
|
||||
"Akun"
|
||||
]
|
||||
|> map (
|
||||
hostName:
|
||||
mkDeployNode {
|
||||
inherit hostName;
|
||||
}
|
||||
)
|
||||
|> nixpkgs.lib.foldr (a: b: a // b) {};
|
||||
}
|
||||
);
|
||||
};
|
||||
nixpkgs.lib.flatten [
|
||||
(cachix "nix-community")
|
||||
"https://cache.nixos.org"
|
||||
(cachix "cosmic")
|
||||
];
|
||||
};
|
||||
};
|
||||
});
|
||||
}
|
||||
|
|
|
|||
49
flake/deploy.nix
Normal file
49
flake/deploy.nix
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
{outputs}: {
|
||||
lib,
|
||||
inputs,
|
||||
flake-parts-lib,
|
||||
...
|
||||
}: let
|
||||
mkDeployNode = {
|
||||
hostName,
|
||||
unixName ? "deploy",
|
||||
system ? "x86_64-linux",
|
||||
sshName ? hostName,
|
||||
}: {
|
||||
"${hostName}" = {
|
||||
hostname = "${sshName}";
|
||||
sshUser = "${unixName}";
|
||||
interactiveSudo = true;
|
||||
profiles = {
|
||||
system = {
|
||||
user = "root";
|
||||
path =
|
||||
inputs.deploy-rs.lib."${system}".activate.nixos
|
||||
outputs.nixosConfigurations."${hostName}";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
in {
|
||||
options = {
|
||||
flake = flake-parts-lib.mkSubmoduleOptions {
|
||||
deploy = lib.mkOption {
|
||||
type = lib.types.lazyAttrsOf lib.types.raw;
|
||||
};
|
||||
};
|
||||
};
|
||||
config = {
|
||||
flake.deploy.nodes =
|
||||
[
|
||||
"Cape"
|
||||
"Akun"
|
||||
]
|
||||
|> map (
|
||||
hostName:
|
||||
mkDeployNode {
|
||||
inherit hostName;
|
||||
}
|
||||
)
|
||||
|> lib.foldr (a: b: a // b) {};
|
||||
};
|
||||
}
|
||||
79
flake/home.nix
Normal file
79
flake/home.nix
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
{
|
||||
outputs,
|
||||
rootPath,
|
||||
}: {
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
homeModules =
|
||||
{
|
||||
default = import "${toString rootPath}/home/modules";
|
||||
extra = import "${toString rootPath}/home/extra";
|
||||
}
|
||||
// (
|
||||
(rootPath + "/home")
|
||||
|> builtins.readDir
|
||||
|> lib.filterAttrs (key: value: value == "directory")
|
||||
|> lib.filterAttrs (
|
||||
key: value:
|
||||
!builtins.elem key [
|
||||
"modules"
|
||||
"extra"
|
||||
]
|
||||
)
|
||||
|> builtins.attrNames
|
||||
|> map (name: {
|
||||
name = name;
|
||||
value = import "${toString rootPath}/home/${name}/modules";
|
||||
})
|
||||
|> builtins.listToAttrs
|
||||
);
|
||||
mkHomeConfig = {
|
||||
hostName,
|
||||
unixName ? "david",
|
||||
system ? "x86_64-linux",
|
||||
nixpkgs ? inputs.nixpkgs,
|
||||
home-manager ? inputs.home-manager,
|
||||
}: {
|
||||
"${unixName}@${hostName}" = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages."${system}";
|
||||
modules =
|
||||
[
|
||||
"${toString rootPath}/home/${unixName}/configurations/${hostName}"
|
||||
]
|
||||
++ (with homeModules; [
|
||||
default
|
||||
extra
|
||||
])
|
||||
++ [
|
||||
homeModules."${unixName}"
|
||||
];
|
||||
extraSpecialArgs = {
|
||||
inherit
|
||||
inputs
|
||||
outputs
|
||||
unixName
|
||||
hostName
|
||||
system
|
||||
rootPath
|
||||
;
|
||||
};
|
||||
};
|
||||
};
|
||||
in {
|
||||
flake = {
|
||||
homeConfigurations =
|
||||
lib.foldr (a: b: a // b) {} (
|
||||
map (hostName: mkHomeConfig {inherit hostName;}) [
|
||||
"Tytonidae"
|
||||
"Akun"
|
||||
]
|
||||
)
|
||||
// mkHomeConfig {
|
||||
hostName = "Cape";
|
||||
unixName = "alice";
|
||||
};
|
||||
inherit homeModules;
|
||||
};
|
||||
}
|
||||
42
flake/nixos.nix
Normal file
42
flake/nixos.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
rootPath,
|
||||
outputs,
|
||||
}: {inputs, ...}: let
|
||||
defaultNixosModule = import (rootPath + "/nixos/modules");
|
||||
inherit (inputs.nixpkgs) lib;
|
||||
in {
|
||||
flake = {
|
||||
nixosModules.default = defaultNixosModule;
|
||||
nixosConfigurations = let
|
||||
nixosConfigDir = rootPath + "/nixos/configurations";
|
||||
makeNixConfiguration = hostName:
|
||||
lib.nixosSystem {
|
||||
modules =
|
||||
[defaultNixosModule]
|
||||
++ [
|
||||
(
|
||||
let
|
||||
dirPath = nixosConfigDir + "/${hostName}";
|
||||
filePath = nixosConfigDir + "/${hostName}.nix";
|
||||
in
|
||||
if builtins.pathExists dirPath
|
||||
then dirPath
|
||||
else filePath
|
||||
)
|
||||
];
|
||||
specialArgs = {
|
||||
inherit inputs outputs rootPath;
|
||||
};
|
||||
};
|
||||
in
|
||||
nixosConfigDir
|
||||
|> builtins.readDir
|
||||
|> builtins.attrNames
|
||||
|> map (f: lib.removeSuffix ".nix" f)
|
||||
|> map (name: {
|
||||
inherit name;
|
||||
value = makeNixConfiguration name;
|
||||
})
|
||||
|> builtins.listToAttrs;
|
||||
};
|
||||
}
|
||||
16
flake/templates.nix
Normal file
16
flake/templates.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{rootPath, ...}: {
|
||||
flake-parts-lib,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options = {
|
||||
flake = flake-parts-lib.mkSubmoduleOptions {
|
||||
templates = lib.mkOption {
|
||||
type = lib.types.lazyAttrsOf lib.types.raw;
|
||||
};
|
||||
};
|
||||
};
|
||||
config = {
|
||||
flake.templates = import (rootPath + "/templates");
|
||||
};
|
||||
}
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
inherit (inputs.niri-flake.lib.kdl) node leaf plain flag;
|
||||
in {
|
||||
david.programs.niri = {
|
||||
enable = true;
|
||||
DISPLAY = ":1";
|
||||
extraConfig = let
|
||||
output = node "output";
|
||||
in [
|
||||
|
|
|
|||
|
|
@ -88,7 +88,6 @@
|
|||
kdePackages.kdenlive
|
||||
fd
|
||||
viu
|
||||
just
|
||||
android-tools
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,10 +2,20 @@
|
|||
inherit (inputs.niri-flake.lib.kdl) node leaf plain flag;
|
||||
in {
|
||||
david.programs.niri = {
|
||||
enable = true;
|
||||
DISPLAY = ":1";
|
||||
extraConfig = let
|
||||
output = node "output";
|
||||
in [
|
||||
(output "DP-3" [
|
||||
(leaf "mode" "2560x1440@169.900")
|
||||
(leaf "scale" 1.0)
|
||||
(leaf "position" {
|
||||
x = 0;
|
||||
y = 0;
|
||||
})
|
||||
(leaf "transform" "normal")
|
||||
(flag "focus-at-startup")
|
||||
])
|
||||
(output "DP-1" [
|
||||
(leaf "mode" "2560x1440@169.900")
|
||||
(leaf "scale" 1.0)
|
||||
|
|
|
|||
|
|
@ -5,6 +5,12 @@
|
|||
./emails.nix
|
||||
];
|
||||
config = {
|
||||
youthlic.programs = {
|
||||
zoxide.enable = true;
|
||||
fzf.enable = true;
|
||||
yazi.enable = true;
|
||||
eza.enable = true;
|
||||
};
|
||||
services.mpris-proxy.enable = true;
|
||||
home.packages = with pkgs; [
|
||||
spacer
|
||||
|
|
|
|||
|
|
@ -2,8 +2,9 @@
|
|||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
osConfig,
|
||||
inputs,
|
||||
osConfig ? null,
|
||||
DISPLAY,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) getExe getExe';
|
||||
|
|
@ -26,19 +27,18 @@
|
|||
plain
|
||||
;
|
||||
|
||||
DISPLAY = ":1";
|
||||
|
||||
bash = getExe config.programs.bash.package;
|
||||
sh = getExe' config.programs.bash.package "sh";
|
||||
swaylock = getExe config.programs.swaylock.package;
|
||||
fuzzel = getExe config.programs.fuzzel.package;
|
||||
waybar = getExe config.programs.waybar.package;
|
||||
swaync = getExe config.services.swaync.package;
|
||||
fcitx5 = getExe' osConfig.i18n.inputMethod.package "fcitx5";
|
||||
fcitx5 = lib.getExe' osConfig.i18n.inputMethod.package "fcitx5";
|
||||
xwayland-satellite = lib.getExe pkgs.xwayland-satellite;
|
||||
sleep = lib.getExe' pkgs.coreutils "sleep";
|
||||
|
||||
polkit-kde-agent = getExe' pkgs.kdePackages.polkit-kde-agent-1 "polkit-kde-agent";
|
||||
wpctl = getExe' pkgs.wireplumber "wpctl";
|
||||
swaybg = getExe pkgs.swaybg;
|
||||
xwayland-satellite = getExe pkgs.xwayland-satellite;
|
||||
ghostty = getExe config.programs.ghostty.package;
|
||||
wl-paste = getExe' pkgs.wl-clipboard "wl-paste";
|
||||
wl-copy = getExe' pkgs.wl-clipboard "wl-copy";
|
||||
|
|
@ -50,7 +50,7 @@ in
|
|||
in [
|
||||
(plain "binds" [
|
||||
(plain "Mod+V" [
|
||||
(spawn [bash "-c" "${cliphist} list | ${fuzzel} --dmenu | ${cliphist} decode | ${wl-copy}"])
|
||||
(spawn [sh "-c" "${cliphist} list | ${fuzzel} --dmenu | ${cliphist} decode | ${wl-copy}"])
|
||||
])
|
||||
(plain "Mod+Shift+P" [
|
||||
(spawn [swaylock "--screenshots" "--clock" "--indicator" "--indicator-radius" "100" "--indicator-thickness" "7" "--effect-blur" "7x5" "--effect-vignette" "0.5:0.5" "--grace" "2" "--fade-in" "0.5"])
|
||||
|
|
@ -321,34 +321,34 @@ in
|
|||
(plain "Mod+Period" [
|
||||
(flag "expel-window-from-column")
|
||||
])
|
||||
(plain "Mod+R" [
|
||||
(node "Mod+R" {repeat = false;} [
|
||||
(flag "switch-preset-column-width")
|
||||
])
|
||||
(plain "Mod+Shift+R" [
|
||||
(node "Mod+Shift+R" {repeat = false;} [
|
||||
(flag "switch-preset-window-height")
|
||||
])
|
||||
(plain "Mod+Ctrl+R" [
|
||||
(flag "reset-window-height")
|
||||
])
|
||||
(plain "Mod+M" [
|
||||
(node "Mod+M" {repeat = false;} [
|
||||
(flag "maximize-column")
|
||||
])
|
||||
(plain "Mod+Shift+M" [
|
||||
(node "Mod+Shift+M" {repeat = false;} [
|
||||
(flag "fullscreen-window")
|
||||
])
|
||||
(plain "Mod+Z" [
|
||||
(flag "center-column")
|
||||
])
|
||||
(plain "Mod+Minus" [
|
||||
(node "Mod+Minus" {repeat = false;} [
|
||||
(leaf "set-column-width" "-10%")
|
||||
])
|
||||
(plain "Mod+Equal" [
|
||||
(node "Mod+Equal" {repeat = false;} [
|
||||
(leaf "set-column-width" "+10%")
|
||||
])
|
||||
(plain "Mod+Shift+Minus" [
|
||||
(node "Mod+Shift+Minus" {repeat = false;} [
|
||||
(leaf "set-window-height" "-10%")
|
||||
])
|
||||
(plain "Mod+Shift+Equal" [
|
||||
(node "Mod+Shift+Equal" {repeat = false;} [
|
||||
(leaf "set-window-height" "+10%")
|
||||
])
|
||||
(plain "Print" [
|
||||
|
|
@ -390,10 +390,10 @@ in
|
|||
(spawn-at-startup [waybar])
|
||||
(spawn-at-startup [swaync])
|
||||
(spawn-at-startup [swaybg "-i" "${config.home.homeDirectory}/wallpaper/01.png"])
|
||||
(spawn-at-startup [fcitx5 "-d" "--replace"])
|
||||
(spawn-at-startup [xwayland-satellite DISPLAY])
|
||||
(spawn-at-startup [polkit-kde-agent])
|
||||
(spawn-at-startup [wl-paste "--watch" cliphist "store"])
|
||||
(spawn-at-startup [xwayland-satellite "${DISPLAY}"])
|
||||
(spawn-at-startup [sh "-c" "${sleep} 10; ${fcitx5} --replace"])
|
||||
(plain "input" [
|
||||
(plain "touchpad" [
|
||||
(leaf "click-method" "clickfinger")
|
||||
|
|
|
|||
|
|
@ -13,14 +13,31 @@ in {
|
|||
extraConfig = lib.mkOption {
|
||||
type = inputs.niri-flake.lib.kdl.types.kdl-document;
|
||||
};
|
||||
DISPLAY = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
};
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
youthlic.programs.niri = {
|
||||
enable = true;
|
||||
# settings = lib.mkMerge [(import ./settings.nix args) cfg.settings];
|
||||
config = (lib.toList (import ./config.nix args)) ++ (lib.toList cfg.extraConfig);
|
||||
};
|
||||
david.programs.wluma.enable = true;
|
||||
};
|
||||
config = lib.mkMerge [
|
||||
{
|
||||
david.programs.niri.enable = config.youthlic.programs.niri.enable;
|
||||
}
|
||||
(
|
||||
lib.mkIf cfg.enable {
|
||||
home.sessionVariables = {
|
||||
inherit (cfg) DISPLAY;
|
||||
};
|
||||
youthlic.programs.niri = {
|
||||
# settings = lib.mkMerge [(import ./settings.nix args) cfg.settings];
|
||||
config =
|
||||
(lib.toList (import ./config.nix (args
|
||||
// {
|
||||
inherit (cfg) DISPLAY;
|
||||
})))
|
||||
++ (lib.toList cfg.extraConfig);
|
||||
};
|
||||
david.programs.wluma.enable = true;
|
||||
}
|
||||
)
|
||||
];
|
||||
}
|
||||
|
|
|
|||
20
home/modules/programs/bash.nix
Normal file
20
home/modules/programs/bash.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
cfg = config.youthlic.programs.bash;
|
||||
in {
|
||||
options = {
|
||||
youthlic.programs.bash = {
|
||||
enable = lib.mkEnableOption "bash";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs = {
|
||||
bash = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -4,7 +4,8 @@
|
|||
./rustypaste-cli.nix
|
||||
./atuin.nix
|
||||
./firefox.nix
|
||||
./shell
|
||||
./bash.nix
|
||||
./fish.nix
|
||||
./kvm.nix
|
||||
./ghostty.nix
|
||||
./wluma.nix
|
||||
|
|
@ -25,5 +26,9 @@
|
|||
./waybar.nix
|
||||
./jujutsu.nix
|
||||
./espanso.nix
|
||||
./yazi.nix
|
||||
./zoxide.nix
|
||||
./fzf.nix
|
||||
./eza.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
18
home/modules/programs/eza.nix
Normal file
18
home/modules/programs/eza.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
cfg = config.youthlic.programs.eza;
|
||||
in {
|
||||
options = {
|
||||
youthlic.programs.eza = {
|
||||
enable = lib.mkEnableOption "eza";
|
||||
};
|
||||
};
|
||||
config = {
|
||||
programs.eza = lib.mkIf cfg.enable {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
35
home/modules/programs/fish.nix
Normal file
35
home/modules/programs/fish.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
cfg = config.youthlic.programs.fish;
|
||||
in {
|
||||
options = {
|
||||
youthlic.programs.fish = {
|
||||
enable = lib.mkEnableOption "fish";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs = {
|
||||
fish = {
|
||||
enable = true;
|
||||
interactiveShellInit = ''
|
||||
fish_vi_key_bindings
|
||||
'';
|
||||
functions = {
|
||||
__fish_command_not_found_handler = {
|
||||
body = "__fish_default_command_not_found_handler $argv[1]";
|
||||
onEvent = "fish_command_not_found";
|
||||
};
|
||||
fish_greeting = {
|
||||
body = ''
|
||||
fastfetch
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
fastfetch.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
18
home/modules/programs/fzf.nix
Normal file
18
home/modules/programs/fzf.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
cfg = config.youthlic.programs.fzf;
|
||||
in {
|
||||
options = {
|
||||
youthlic.programs.fzf = {
|
||||
enable = lib.mkEnableOption "fzf";
|
||||
};
|
||||
};
|
||||
config = {
|
||||
programs.fzf = lib.mkIf cfg.enable {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -20,55 +20,62 @@ in {
|
|||
};
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages =
|
||||
(with pkgs; [
|
||||
swaynotificationcenter
|
||||
swaybg
|
||||
xwayland-satellite
|
||||
kdePackages.polkit-kde-agent-1
|
||||
wl-clipboard
|
||||
cliphist
|
||||
])
|
||||
++ [niri];
|
||||
qt = {
|
||||
enable = true;
|
||||
};
|
||||
xdg.portal = {
|
||||
configPackages = [niri];
|
||||
enable = true;
|
||||
extraPortals = lib.mkIf (
|
||||
!niri.cargoBuildNoDefaultFeatures || builtins.elem "xdp-gnome-screencast" niri.cargoBuildFeatures
|
||||
) [pkgs.xdg-desktop-portal-gnome];
|
||||
};
|
||||
xdg.configFile = let
|
||||
qtctConf =
|
||||
''
|
||||
[Appearance]
|
||||
standard_dialogs=xdgdesktopportal
|
||||
''
|
||||
+ lib.optionalString (config.qt.style ? name) ''
|
||||
style=${config.qt.style.name}
|
||||
'';
|
||||
in {
|
||||
"qt5ct/qt5ct.conf" = lib.mkForce {
|
||||
text = qtctConf;
|
||||
};
|
||||
"qt6ct/qt6ct.conf" = lib.mkForce {
|
||||
text = qtctConf;
|
||||
};
|
||||
};
|
||||
youthlic.programs = {
|
||||
fuzzel.enable = true;
|
||||
wluma.enable = true;
|
||||
waybar.enable = true;
|
||||
swaync.enable = true;
|
||||
swaylock.enable = true;
|
||||
};
|
||||
programs.niri = {
|
||||
# settings = cfg.settings;
|
||||
config = cfg.config;
|
||||
package = niri;
|
||||
};
|
||||
};
|
||||
config = lib.mkMerge [
|
||||
{
|
||||
youthlic.programs.niri.enable = osConfig.youthlic.gui.enabled == "niri";
|
||||
}
|
||||
(
|
||||
lib.mkIf cfg.enable {
|
||||
home.packages =
|
||||
(with pkgs; [
|
||||
swaynotificationcenter
|
||||
swaybg
|
||||
xwayland-satellite
|
||||
kdePackages.polkit-kde-agent-1
|
||||
wl-clipboard
|
||||
cliphist
|
||||
])
|
||||
++ [niri];
|
||||
qt = {
|
||||
enable = true;
|
||||
};
|
||||
xdg.portal = {
|
||||
configPackages = [niri];
|
||||
enable = true;
|
||||
extraPortals = lib.mkIf (
|
||||
!niri.cargoBuildNoDefaultFeatures || builtins.elem "xdp-gnome-screencast" niri.cargoBuildFeatures
|
||||
) [pkgs.xdg-desktop-portal-gnome];
|
||||
};
|
||||
xdg.configFile = let
|
||||
qtctConf =
|
||||
''
|
||||
[Appearance]
|
||||
standard_dialogs=xdgdesktopportal
|
||||
''
|
||||
+ lib.optionalString (config.qt.style ? name) ''
|
||||
style=${config.qt.style.name}
|
||||
'';
|
||||
in {
|
||||
"qt5ct/qt5ct.conf" = lib.mkForce {
|
||||
text = qtctConf;
|
||||
};
|
||||
"qt6ct/qt6ct.conf" = lib.mkForce {
|
||||
text = qtctConf;
|
||||
};
|
||||
};
|
||||
youthlic.programs = {
|
||||
fuzzel.enable = true;
|
||||
wluma.enable = true;
|
||||
waybar.enable = true;
|
||||
swaync.enable = true;
|
||||
swaylock.enable = true;
|
||||
};
|
||||
programs.niri = {
|
||||
# settings = cfg.settings;
|
||||
config = cfg.config;
|
||||
package = niri;
|
||||
};
|
||||
}
|
||||
)
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,77 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkEnableOption mkIf mkMerge;
|
||||
fish-cfg = config.youthlic.programs.fish;
|
||||
bash-cfg = config.youthlic.programs.bash;
|
||||
cfg-helper = conf:
|
||||
mkMerge [
|
||||
conf
|
||||
(mkIf fish-cfg.enable {
|
||||
enableFishIntegration = true;
|
||||
})
|
||||
(mkIf bash-cfg.enable {
|
||||
enableBashIntegration = true;
|
||||
})
|
||||
];
|
||||
in {
|
||||
options = {
|
||||
youthlic.programs = {
|
||||
fish = {
|
||||
enable = mkEnableOption "fish";
|
||||
};
|
||||
bash = {
|
||||
enable = mkEnableOption "bash";
|
||||
};
|
||||
};
|
||||
};
|
||||
config = mkMerge [
|
||||
{
|
||||
programs = {
|
||||
zoxide = cfg-helper {
|
||||
enable = true;
|
||||
};
|
||||
yazi = cfg-helper {
|
||||
enable = true;
|
||||
};
|
||||
fzf = cfg-helper {
|
||||
enable = true;
|
||||
};
|
||||
eza = cfg-helper {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
(mkIf fish-cfg.enable {
|
||||
programs = {
|
||||
fish = {
|
||||
enable = true;
|
||||
interactiveShellInit = ''
|
||||
fish_vi_key_bindings
|
||||
'';
|
||||
functions = {
|
||||
__fish_command_not_found_handler = {
|
||||
body = "__fish_default_command_not_found_handler $argv[1]";
|
||||
onEvent = "fish_command_not_found";
|
||||
};
|
||||
fish_greeting = {
|
||||
body = ''
|
||||
fastfetch
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
fastfetch.enable = true;
|
||||
};
|
||||
})
|
||||
(mkIf bash-cfg.enable {
|
||||
programs = {
|
||||
bash = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
18
home/modules/programs/yazi.nix
Normal file
18
home/modules/programs/yazi.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
cfg = config.youthlic.programs.yazi;
|
||||
in {
|
||||
options = {
|
||||
youthlic.programs.yazi = {
|
||||
enable = lib.mkEnableOption "yazi";
|
||||
};
|
||||
};
|
||||
config = {
|
||||
programs.yazi = lib.mkIf cfg.enable {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
18
home/modules/programs/zoxide.nix
Normal file
18
home/modules/programs/zoxide.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
cfg = config.youthlic.programs.zoxide;
|
||||
in {
|
||||
options = {
|
||||
youthlic.programs.zoxide = {
|
||||
enable = lib.mkEnableOption "zoxide";
|
||||
};
|
||||
};
|
||||
config = {
|
||||
programs.zoxide = lib.mkIf cfg.enable {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -19,6 +19,8 @@
|
|||
./networking.nix
|
||||
./disk-config.nix
|
||||
./hardware.nix
|
||||
./specialisation/kde.nix
|
||||
./specialisation/niri-hybrid.nix
|
||||
];
|
||||
|
||||
youthlic = {
|
||||
|
|
@ -27,6 +29,7 @@
|
|||
unixName = "david";
|
||||
hostName = "Tytonidae";
|
||||
};
|
||||
hardware.asus.enable = true;
|
||||
i18n.enable = true;
|
||||
programs = {
|
||||
guix.enable = true;
|
||||
|
|
@ -42,27 +45,11 @@
|
|||
transmission.enable = true;
|
||||
nix-ld.enable = true;
|
||||
juicity.client.enable = true;
|
||||
asusd.enable = true;
|
||||
owncast.enable = true;
|
||||
minio.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
# specialisation = {
|
||||
# cosmic = {
|
||||
# inheritParentConfig = true;
|
||||
# configuration = {
|
||||
# youthlic.gui.enabled = lib.mkForce "cosmic";
|
||||
# };
|
||||
# };
|
||||
# kde = {
|
||||
# inheritParentConfig = true;
|
||||
# configuration = {
|
||||
# youthlic.gui.enabled = lib.mkForce "kde";
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
};
|
||||
|
|
@ -92,14 +79,12 @@
|
|||
jq
|
||||
onefetch
|
||||
vesktop
|
||||
gg
|
||||
aria2
|
||||
|
||||
juicity
|
||||
waypipe
|
||||
wineWow64Packages.waylandFull
|
||||
iperf3
|
||||
nvfetcher
|
||||
];
|
||||
|
||||
environment.variables.EDITOR = "hx";
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{pkgs, ...}: let
|
||||
extraConfig = ''
|
||||
output "DP-1" {
|
||||
output "DP-3" {
|
||||
mode "2560x1440@169.900"
|
||||
scale 1.0
|
||||
position x=0 y=0
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
}
|
||||
window-rule {
|
||||
match app-id="apps.regreet"
|
||||
open-on-output "DP-1"
|
||||
open-on-output "DP-3"
|
||||
}
|
||||
'';
|
||||
in {
|
||||
|
|
|
|||
8
nixos/configurations/Tytonidae/specialisation/kde.nix
Normal file
8
nixos/configurations/Tytonidae/specialisation/kde.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{lib, ...}: {
|
||||
config.specialisation.kde = {
|
||||
inheritParentConfig = true;
|
||||
configuration = {
|
||||
youthlic.gui.enabled = lib.mkForce "kde";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
{lib, ...}: let
|
||||
extraConfig = ''
|
||||
output "DP-1" {
|
||||
mode "2560x1440@169.900"
|
||||
scale 1.0
|
||||
position x=0 y=0
|
||||
transform "normal"
|
||||
focus-at-startup
|
||||
}
|
||||
output "eDP-1" {
|
||||
mode "2560x1440@165.003"
|
||||
scale 1.5
|
||||
position x=2560 y=0
|
||||
transform "normal"
|
||||
}
|
||||
window-rule {
|
||||
match app-id="apps.regreet"
|
||||
open-on-output "DP-1"
|
||||
}
|
||||
'';
|
||||
in {
|
||||
config.specialisation.niri-hybrid = {
|
||||
inheritParentConfig = true;
|
||||
configuration = {
|
||||
youthlic.gui.niri.extraConfig = lib.mkForce extraConfig;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -24,6 +24,7 @@
|
|||
./i18n.nix
|
||||
./gui
|
||||
./programs
|
||||
./hardware.nix
|
||||
];
|
||||
|
||||
config = {
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ in {
|
|||
display = 0;
|
||||
enable = true;
|
||||
xkb = {
|
||||
layout = "cn";
|
||||
layout = "us";
|
||||
variant = "";
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -6,14 +6,13 @@
|
|||
cfg = config.youthlic.gui;
|
||||
in {
|
||||
config = lib.mkIf (cfg.enabled == "kde") {
|
||||
stylix.targets.qt.platform = "kde";
|
||||
services = {
|
||||
desktopManager.plasma6.enable = true;
|
||||
displayManager.sddm.enable = true;
|
||||
xserver = {
|
||||
enable = true;
|
||||
xkb = {
|
||||
layout = "cn";
|
||||
layout = "us";
|
||||
variant = "";
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -97,10 +97,6 @@ in {
|
|||
layout = "us";
|
||||
variant = "";
|
||||
};
|
||||
# displayManager.gdm = {
|
||||
# enable = true;
|
||||
# wayland = true;
|
||||
# };
|
||||
};
|
||||
};
|
||||
programs = {
|
||||
|
|
|
|||
23
nixos/modules/hardware.nix
Normal file
23
nixos/modules/hardware.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
cfg = config.youthlic.hardware;
|
||||
in {
|
||||
options = {
|
||||
youthlic.hardware = {
|
||||
asus = {
|
||||
enable = lib.mkEnableOption "asus";
|
||||
};
|
||||
};
|
||||
};
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf cfg.asus.enable {
|
||||
youthlic.programs = {
|
||||
asusd.enable = true;
|
||||
supergfxd.enable = true;
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
@ -13,6 +13,7 @@ in {
|
|||
config = lib.mkIf cfg.enable {
|
||||
services.asusd = {
|
||||
enable = true;
|
||||
enableUserService = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,5 +26,6 @@
|
|||
./asusd.nix
|
||||
./owncast.nix
|
||||
./minio.nix
|
||||
./supergfxd.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
18
nixos/modules/programs/supergfxd.nix
Normal file
18
nixos/modules/programs/supergfxd.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
cfg = config.youthlic.programs.supergfxd;
|
||||
in {
|
||||
options = {
|
||||
youthlic.programs.supergfxd = {
|
||||
enable = lib.mkEnableOption "supergfxd";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.supergfxd = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
{outputs, ...}: final: prev: let
|
||||
inherit (final) stdenv;
|
||||
inherit (stdenv.hostPlatform) system;
|
||||
inherit (prev.stdenv.hostPlatform) system;
|
||||
in {
|
||||
rime-ice = outputs.packages."${system}".rime-ice;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
{outputs, ...}: final: prev: let
|
||||
inherit (final) stdenv;
|
||||
inherit (stdenv.hostPlatform) system;
|
||||
inherit (prev.stdenv.hostPlatform) system;
|
||||
in {
|
||||
juicity = outputs.packages."${system}".juicity;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
{outputs, ...}: final: prev: let
|
||||
inherit (final) stdenv;
|
||||
inherit (stdenv.hostPlatform) system;
|
||||
inherit (prev.stdenv.hostPlatform) system;
|
||||
in {
|
||||
spotify = outputs.packages."${system}".spotifyx;
|
||||
}
|
||||
|
|
|
|||
6
templates/default.nix
Normal file
6
templates/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
rust = {
|
||||
path = ./rust;
|
||||
description = "Rust template.";
|
||||
};
|
||||
}
|
||||
3
templates/rust/.envrc
Normal file
3
templates/rust/.envrc
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
watch_file *.nix flake.lock
|
||||
|
||||
use flake
|
||||
2
templates/rust/.gitignore
vendored
Normal file
2
templates/rust/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
.direnv
|
||||
target
|
||||
7
templates/rust/Cargo.lock
generated
Normal file
7
templates/rust/Cargo.lock
generated
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 4
|
||||
|
||||
[[package]]
|
||||
name = "rust"
|
||||
version = "0.1.0"
|
||||
6
templates/rust/Cargo.toml
Normal file
6
templates/rust/Cargo.toml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
[package]
|
||||
name = "rust"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
82
templates/rust/flake.lock
generated
Normal file
82
templates/rust/flake.lock
generated
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1746300365,
|
||||
"narHash": "sha256-thYTdWqCRipwPRxWiTiH1vusLuAy0okjOyzRx4hLWh4=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "f21e4546e3ede7ae34d12a84602a22246b31f7e0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"rust-overlay": "rust-overlay"
|
||||
}
|
||||
},
|
||||
"rust-overlay": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1746326315,
|
||||
"narHash": "sha256-IDqSls/r6yBfdOBRSMQ/noTUoigmsKnTQ7TqpsBtN4Y=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "dd280c436961ec5adccf0135efe5b66a23d84497",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
38
templates/rust/flake.nix
Normal file
38
templates/rust/flake.nix
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
flake-utils = {
|
||||
url = "github:numtide/flake-utils";
|
||||
};
|
||||
rust-overlay = {
|
||||
url = "github:oxalica/rust-overlay";
|
||||
inputs = {
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
};
|
||||
outputs = {
|
||||
flake-utils,
|
||||
nixpkgs,
|
||||
rust-overlay,
|
||||
...
|
||||
}:
|
||||
flake-utils.lib.eachDefaultSystem (system: let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [(import rust-overlay)];
|
||||
};
|
||||
rustToolchain = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
|
||||
rustPlatform = pkgs.makeRustPlatform {
|
||||
cargo = rustToolchain;
|
||||
rustc = rustToolchain;
|
||||
};
|
||||
in {
|
||||
devShells.default = pkgs.mkShell {
|
||||
packages = with pkgs; [
|
||||
rust-analyzer
|
||||
rustToolchain
|
||||
];
|
||||
};
|
||||
});
|
||||
}
|
||||
3
templates/rust/rust-toolchain.toml
Normal file
3
templates/rust/rust-toolchain.toml
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
[toolchain]
|
||||
channel = "stable"
|
||||
profile = "default"
|
||||
3
templates/rust/src/main.rs
Normal file
3
templates/rust/src/main.rs
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fn main() {
|
||||
println!("Hello, world!");
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue