Working config for fw13 amd
This commit is contained in:
commit
e706230566
48 changed files with 1812 additions and 0 deletions
450
flake.lock
generated
Normal file
450
flake.lock
generated
Normal file
|
|
@ -0,0 +1,450 @@
|
|||
{
|
||||
"nodes": {
|
||||
"base16": {
|
||||
"inputs": {
|
||||
"fromYaml": "fromYaml"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1732200724,
|
||||
"narHash": "sha256-+R1BH5wHhfnycySb7Sy5KbYEaTJZWm1h+LW1OtyhiTs=",
|
||||
"owner": "SenchoPens",
|
||||
"repo": "base16.nix",
|
||||
"rev": "153d52373b0fb2d343592871009a286ec8837aec",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "SenchoPens",
|
||||
"repo": "base16.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"base16-fish": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1622559957,
|
||||
"narHash": "sha256-PebymhVYbL8trDVVXxCvZgc0S5VxI7I1Hv4RMSquTpA=",
|
||||
"owner": "tomyun",
|
||||
"repo": "base16-fish",
|
||||
"rev": "2f6dd973a9075dabccd26f1cded09508180bf5fe",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tomyun",
|
||||
"repo": "base16-fish",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"base16-helix": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1736852337,
|
||||
"narHash": "sha256-esD42YdgLlEh7koBrSqcT7p2fsMctPAcGl/+2sYJa2o=",
|
||||
"owner": "tinted-theming",
|
||||
"repo": "base16-helix",
|
||||
"rev": "03860521c40b0b9c04818f2218d9cc9efc21e7a5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tinted-theming",
|
||||
"repo": "base16-helix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"base16-vim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1732806396,
|
||||
"narHash": "sha256-e0bpPySdJf0F68Ndanwm+KWHgQiZ0s7liLhvJSWDNsA=",
|
||||
"owner": "tinted-theming",
|
||||
"repo": "base16-vim",
|
||||
"rev": "577fe8125d74ff456cf942c733a85d769afe58b7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tinted-theming",
|
||||
"repo": "base16-vim",
|
||||
"rev": "577fe8125d74ff456cf942c733a85d769afe58b7",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"firefox-gnome-theme": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1736899990,
|
||||
"narHash": "sha256-S79Hqn2EtSxU4kp99t8tRschSifWD4p/51++0xNWUxw=",
|
||||
"owner": "rafaelmardojai",
|
||||
"repo": "firefox-gnome-theme",
|
||||
"rev": "91ca1f82d717b02ceb03a3f423cbe8082ebbb26d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "rafaelmardojai",
|
||||
"repo": "firefox-gnome-theme",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1733328505,
|
||||
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": "nixpkgs-lib"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1738453229,
|
||||
"narHash": "sha256-7H9XgNiGLKN1G1CgRh0vUL4AheZSYzPm+zmZ7vxbJdo=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "32ea77a06711b758da0ad9bd6a844c5740a87abd",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": [
|
||||
"stylix",
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"fromYaml": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1731966426,
|
||||
"narHash": "sha256-lq95WydhbUTWig/JpqiB7oViTcHFP8Lv41IGtayokA8=",
|
||||
"owner": "SenchoPens",
|
||||
"repo": "fromYaml",
|
||||
"rev": "106af9e2f715e2d828df706c386a685698f3223b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "SenchoPens",
|
||||
"repo": "fromYaml",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"git-hooks": {
|
||||
"inputs": {
|
||||
"flake-compat": [
|
||||
"stylix",
|
||||
"flake-compat"
|
||||
],
|
||||
"gitignore": "gitignore",
|
||||
"nixpkgs": [
|
||||
"stylix",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1735882644,
|
||||
"narHash": "sha256-3FZAG+pGt3OElQjesCAWeMkQ7C/nB1oTHLRQ8ceP110=",
|
||||
"owner": "cachix",
|
||||
"repo": "git-hooks.nix",
|
||||
"rev": "a5a961387e75ae44cc20f0a57ae463da5e959656",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "cachix",
|
||||
"repo": "git-hooks.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"gitignore": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"stylix",
|
||||
"git-hooks",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709087332,
|
||||
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"gnome-shell": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1732369855,
|
||||
"narHash": "sha256-JhUWbcYPjHO3Xs3x9/Z9RuqXbcp5yhPluGjwsdE2GMg=",
|
||||
"owner": "GNOME",
|
||||
"repo": "gnome-shell",
|
||||
"rev": "dadd58f630eeea41d645ee225a63f719390829dc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "GNOME",
|
||||
"ref": "47.2",
|
||||
"repo": "gnome-shell",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hm": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1739470101,
|
||||
"narHash": "sha256-NxNe32VB4XI/xIXrsKmIfrcgtEx5r/5s52pL3CpEcA4=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "5031c6d2978109336637977c165f82aa49fa16a7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "master",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"stylix",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1737630279,
|
||||
"narHash": "sha256-wJQCxyMRc4P26zDrHmZiRD5bbfcJpqPG3e2djdGG3pk=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "0db5c8bfcce78583ebbde0b2abbc95ad93445f7c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1739478914,
|
||||
"narHash": "sha256-qljqSeAWOFbd6HNg8Ey28RdZYdVN8bMb6HJK7uqCKZ0=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "6f9b8ea84c04411c48ab5aab4620ab204936d9fc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable-small",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-lib": {
|
||||
"locked": {
|
||||
"lastModified": 1738452942,
|
||||
"narHash": "sha256-vJzFZGaCpnmo7I6i416HaBLpC+hvcURh/BQwROcGIp8=",
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/072a6db25e947df2f31aab9eccd0ab75d5b2da11.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/072a6db25e947df2f31aab9eccd0ab75d5b2da11.tar.gz"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1736798957,
|
||||
"narHash": "sha256-qwpCtZhSsSNQtK4xYGzMiyEDhkNzOCz/Vfu4oL2ETsQ=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9abb87b552b7f55ac8916b6fc9e5cb486656a2f3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"hm": "hm",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"stylix": "stylix"
|
||||
}
|
||||
},
|
||||
"stylix": {
|
||||
"inputs": {
|
||||
"base16": "base16",
|
||||
"base16-fish": "base16-fish",
|
||||
"base16-helix": "base16-helix",
|
||||
"base16-vim": "base16-vim",
|
||||
"firefox-gnome-theme": "firefox-gnome-theme",
|
||||
"flake-compat": "flake-compat",
|
||||
"flake-utils": "flake-utils",
|
||||
"git-hooks": "git-hooks",
|
||||
"gnome-shell": "gnome-shell",
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"systems": "systems",
|
||||
"tinted-foot": "tinted-foot",
|
||||
"tinted-kitty": "tinted-kitty",
|
||||
"tinted-schemes": "tinted-schemes",
|
||||
"tinted-tmux": "tinted-tmux",
|
||||
"tinted-zed": "tinted-zed"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1739375014,
|
||||
"narHash": "sha256-0fNbvZ1Dod4rDIfwGnC7CzJ3wRFSF1v5AvNCmNkVgXo=",
|
||||
"owner": "danth",
|
||||
"repo": "stylix",
|
||||
"rev": "e86de61bb8f5f2b6459d0be3e3291ad16db4b777",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "danth",
|
||||
"repo": "stylix",
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"tinted-foot": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1726913040,
|
||||
"narHash": "sha256-+eDZPkw7efMNUf3/Pv0EmsidqdwNJ1TaOum6k7lngDQ=",
|
||||
"owner": "tinted-theming",
|
||||
"repo": "tinted-foot",
|
||||
"rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tinted-theming",
|
||||
"repo": "tinted-foot",
|
||||
"rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"tinted-kitty": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1716423189,
|
||||
"narHash": "sha256-2xF3sH7UIwegn+2gKzMpFi3pk5DlIlM18+vj17Uf82U=",
|
||||
"owner": "tinted-theming",
|
||||
"repo": "tinted-kitty",
|
||||
"rev": "eb39e141db14baef052893285df9f266df041ff8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tinted-theming",
|
||||
"repo": "tinted-kitty",
|
||||
"rev": "eb39e141db14baef052893285df9f266df041ff8",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"tinted-schemes": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1737565458,
|
||||
"narHash": "sha256-y+9cvOA6BLKT0WfebDsyUpUa/YxKow9hTjBp6HpQv68=",
|
||||
"owner": "tinted-theming",
|
||||
"repo": "schemes",
|
||||
"rev": "ae31625ba47aeaa4bf6a98cf11a8d4886f9463d9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tinted-theming",
|
||||
"repo": "schemes",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"tinted-tmux": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1735737224,
|
||||
"narHash": "sha256-FO2hRBkZsjlIRqzNHCPc/52yxg11kHGA8MEtSun9RwE=",
|
||||
"owner": "tinted-theming",
|
||||
"repo": "tinted-tmux",
|
||||
"rev": "aead506a9930c717ebf81cc83a2126e9ca08fa64",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tinted-theming",
|
||||
"repo": "tinted-tmux",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"tinted-zed": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1725758778,
|
||||
"narHash": "sha256-8P1b6mJWyYcu36WRlSVbuj575QWIFZALZMTg5ID/sM4=",
|
||||
"owner": "tinted-theming",
|
||||
"repo": "base16-zed",
|
||||
"rev": "122c9e5c0e6f27211361a04fae92df97940eccf9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tinted-theming",
|
||||
"repo": "base16-zed",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
42
flake.nix
Normal file
42
flake.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
description = "Nix is here, nix is everywhere, nix is everything.";
|
||||
|
||||
outputs = inputs:
|
||||
inputs.flake-parts.lib.mkFlake {inherit inputs;} {
|
||||
systems = ["x86_64-linux"];
|
||||
imports = [
|
||||
./hosts
|
||||
];
|
||||
|
||||
perSystem = {
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
devShells.default = pkgs.mkShell {
|
||||
packages = [
|
||||
pkgs.alejandra
|
||||
pkgs.git
|
||||
];
|
||||
name = "dots";
|
||||
DIRENV_LOG_FORMAT = "";
|
||||
};
|
||||
|
||||
formatter = pkgs.alejandra;
|
||||
};
|
||||
};
|
||||
|
||||
inputs = {
|
||||
# Nixpkgs and other core shit
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable-small"; # build error unrelated to config.
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
|
||||
hm = {
|
||||
url = "github:nix-community/home-manager/master";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# Ricing
|
||||
stylix.url = "github:danth/stylix";
|
||||
};
|
||||
}
|
||||
14
home/default.nix
Normal file
14
home/default.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{osConfig, ...}: {
|
||||
imports = [
|
||||
./wayland
|
||||
./shell
|
||||
./style
|
||||
];
|
||||
|
||||
home = {
|
||||
inherit (osConfig.system) stateVersion;
|
||||
username = "jsw";
|
||||
};
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
}
|
||||
8
home/shell/default.nix
Normal file
8
home/shell/default.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
imports = [
|
||||
./fish.nix
|
||||
./starship.nix
|
||||
./yazi.nix
|
||||
./zoxide.nix
|
||||
];
|
||||
}
|
||||
3
home/shell/fish.nix
Normal file
3
home/shell/fish.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
programs.fish.enable = true;
|
||||
}
|
||||
3
home/shell/starship.nix
Normal file
3
home/shell/starship.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
programs.starship.enable = true;
|
||||
}
|
||||
3
home/shell/yazi.nix
Normal file
3
home/shell/yazi.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
programs.yazi.enable = true;
|
||||
}
|
||||
3
home/shell/zoxide.nix
Normal file
3
home/shell/zoxide.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
programs.zoxide.enable = true;
|
||||
}
|
||||
6
home/style/default.nix
Normal file
6
home/style/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
#./pointer.nix
|
||||
./stylix.nix
|
||||
];
|
||||
}
|
||||
12
home/style/pointer.nix
Normal file
12
home/style/pointer.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
# Migrated to stylix.
|
||||
#{pkgs, ...}: {
|
||||
# home.pointerCursor = {
|
||||
# gtk.enable = true;
|
||||
# x11.enable = true;
|
||||
#
|
||||
# name = "Bibata-Modern-Ice";
|
||||
# package = pkgs.bibata-cursors;
|
||||
# size = 21;
|
||||
# };
|
||||
|
||||
#}
|
||||
27
home/style/stylix.nix
Normal file
27
home/style/stylix.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
config,
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
inputs.stylix.homeManagerModules.stylix
|
||||
];
|
||||
|
||||
stylix = {
|
||||
enable = true;
|
||||
polarity = "dark";
|
||||
cursor = {
|
||||
package = pkgs.bibata-cursors;
|
||||
name = "Bibata-Modern-Ice";
|
||||
size = 21;
|
||||
};
|
||||
fonts.monospace = {
|
||||
name = "DejaVuSansMNerdFontMono-Regular";
|
||||
package = pkgs.nerd-fonts.dejavu-sans-mono;
|
||||
};
|
||||
|
||||
# base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-frappe.yaml";
|
||||
image = ./background.png;
|
||||
};
|
||||
}
|
||||
21
home/wayland/default.nix
Normal file
21
home/wayland/default.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{pkgs, ...}: {
|
||||
imports = [
|
||||
./fuzzel.nix
|
||||
./hyprlock.nix
|
||||
./hyprland
|
||||
./waybar.nix
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
grim
|
||||
slurp
|
||||
wl-clipboard
|
||||
wlr-randr
|
||||
];
|
||||
|
||||
home.sessionVariables = {
|
||||
QT_QPA_PLATFORM = "wayland";
|
||||
SDL_VIDEODRIVER = "wayland";
|
||||
XDG_SESSION_TYPE = "wayland";
|
||||
};
|
||||
}
|
||||
13
home/wayland/fuzzel.nix
Normal file
13
home/wayland/fuzzel.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
programs.fuzzel = {
|
||||
enable = true;
|
||||
settings.main = {
|
||||
launch-prefix = "${lib.getExe pkgs.uwsm} app --";
|
||||
};
|
||||
};
|
||||
}
|
||||
102
home/wayland/hyprland/binds.nix
Normal file
102
home/wayland/hyprland/binds.nix
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) getExe;
|
||||
|
||||
runOnce = program: "pgrep ${program} || uwsm app -- ${program}";
|
||||
uwsm = getExe pkgs.uwsm;
|
||||
hyprlock = runOnce (getExe pkgs.hyprlock);
|
||||
|
||||
#TODO: Move these functions into a separate lib file.
|
||||
#TODO: Possibly migrate some of these applications into an option.
|
||||
#TODO: Stylix
|
||||
app = app: "${uwsm} app -- ${app}";
|
||||
appE = appE: app (getExe appE);
|
||||
termapp = termapp: "${foot} '${termapp}'";
|
||||
termappE = termappE: termapp (getExe termappE);
|
||||
|
||||
foot = appE pkgs.foot;
|
||||
fuzzel = appE config.programs.fuzzel.package;
|
||||
firefox = appE pkgs.firefox;
|
||||
playerctl = appE pkgs.playerctl;
|
||||
brightnessctl = appE pkgs.brightnessctl;
|
||||
wpctl = app "${pkgs.wireplumber}/bin/wpctl";
|
||||
|
||||
pulsemixer = termappE pkgs.pulsemixer;
|
||||
bluetui = termappE pkgs.bluetui;
|
||||
nmtui = termapp "${pkgs.networkmanager}/bin/nmtui";
|
||||
|
||||
# toggle = program: let
|
||||
# prog = builtins.substring 0 14 program;
|
||||
# in "pkill ${prog} || ${uwsm} app -- ${program}";
|
||||
|
||||
workspaces = builtins.concatLists (builtins.genList (
|
||||
x: let
|
||||
ws = let
|
||||
c = (x + 1) / 10;
|
||||
in
|
||||
builtins.toString (x + 1 - (c * 10));
|
||||
in [
|
||||
"$mod, ${ws}, workspace, ${toString (x + 1)}"
|
||||
"$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}"
|
||||
]
|
||||
)
|
||||
10);
|
||||
in {
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
"$mod" = "ALT";
|
||||
|
||||
bindm = [
|
||||
"$mod, mouse:272, movewindow"
|
||||
"$mod, mouse:273, resizewindow"
|
||||
"$mod ALT, mouse:272, resizewindow"
|
||||
];
|
||||
|
||||
bind =
|
||||
[
|
||||
"$mod SHIFT, E, exec, uwsm stop"
|
||||
"$mod, Q, killactive,"
|
||||
"$mod, F, fullscreen,"
|
||||
"$mod, SPACE, togglefloating,"
|
||||
"$mod, O, pseudo,"
|
||||
"$mod ALT, ,resizeactive,"
|
||||
|
||||
"$mod, D, exec, ${fuzzel}"
|
||||
"$mod, Return, exec, ${foot}"
|
||||
"$mod Shift, Return, exec, ${firefox}"
|
||||
"$mod, Escape, exec, ${hyprlock}"
|
||||
|
||||
"$mod, A, exec, ${pulsemixer}"
|
||||
"$mod, B, exec, ${bluetui}"
|
||||
"$mod, N, exec, ${nmtui}"
|
||||
|
||||
"$mod, h, movefocus, l"
|
||||
"$mod, l, movefocus, r"
|
||||
"$mod, k, movefocus, u"
|
||||
"$mod, j, movefocus, d"
|
||||
]
|
||||
++ workspaces;
|
||||
|
||||
bindl = [
|
||||
# media controls
|
||||
", XF86AudioPlay, exec, ${playerctl} play-pause"
|
||||
", XF86AudioPrev, exec, ${playerctl} previous"
|
||||
", XF86AudioNext, exec, ${playerctl} next"
|
||||
|
||||
# volume
|
||||
", XF86AudioMute, exec, ${wpctl} set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
||||
", XF86AudioMicMute, exec, ${wpctl} set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
|
||||
];
|
||||
|
||||
bindle = [
|
||||
# volume
|
||||
", XF86AudioRaiseVolume, exec, ${wpctl} set-volume -l '1.0' @DEFAULT_AUDIO_SINK@ 6%+"
|
||||
", XF86AudioLowerVolume, exec, ${wpctl} set-volume -l '1.0' @DEFAULT_AUDIO_SINK@ 6%-"
|
||||
",XF86MonBrightnessUp, exec, ${brightnessctl} s 10%+"
|
||||
",XF86MonBrightnessDown, exec, ${brightnessctl} s 10%-"
|
||||
];
|
||||
};
|
||||
}
|
||||
28
home/wayland/hyprland/default.nix
Normal file
28
home/wayland/hyprland/default.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) getExe;
|
||||
|
||||
uwsm = getExe pkgs.uwsm;
|
||||
hyprlock = getExe pkgs.hyprlock;
|
||||
in {
|
||||
imports = [
|
||||
./binds.nix
|
||||
./settings.nix
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
settings = {
|
||||
env = [
|
||||
"QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
|
||||
];
|
||||
exec-once = [
|
||||
"${uwsm} finalize"
|
||||
"${hyprlock}" # Lock screen
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
88
home/wayland/hyprland/settings.nix
Normal file
88
home/wayland/hyprland/settings.nix
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
general = {
|
||||
gaps_in = 5;
|
||||
gaps_out = 5;
|
||||
border_size = 1;
|
||||
|
||||
resize_on_border = true;
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = 10;
|
||||
rounding_power = 3;
|
||||
blur = {
|
||||
enabled = true;
|
||||
brightness = 1.0;
|
||||
contrast = 1.0;
|
||||
noise = 0.01;
|
||||
|
||||
vibrancy = 0.2;
|
||||
vibrancy_darkness = 0.5;
|
||||
|
||||
passes = 4;
|
||||
size = 7;
|
||||
|
||||
popups = true;
|
||||
popups_ignorealpha = 0.2;
|
||||
};
|
||||
|
||||
shadow = {
|
||||
enabled = true;
|
||||
ignore_window = true;
|
||||
offset = "0 15";
|
||||
range = 100;
|
||||
render_power = 2;
|
||||
scale = 0.97;
|
||||
};
|
||||
};
|
||||
|
||||
animations = {
|
||||
enabled = true;
|
||||
animation = [
|
||||
"border, 1, 2, default"
|
||||
"fade, 1, 4, default"
|
||||
"windows, 1, 3, default, popin 80%"
|
||||
"workspaces, 1, 2, default, slide"
|
||||
];
|
||||
};
|
||||
|
||||
group = {
|
||||
groupbar = {
|
||||
font_size = 10;
|
||||
gradients = false;
|
||||
};
|
||||
};
|
||||
|
||||
input = {
|
||||
repeat_rate = 60;
|
||||
repeat_delay = 200;
|
||||
kb_layout = "us";
|
||||
follow_mouse = 1;
|
||||
sensitivity = 0; # -1.0 - 1.0, 0 means no modification.
|
||||
kb_options = "compose:ralt";
|
||||
|
||||
touchpad = {
|
||||
natural_scroll = false;
|
||||
};
|
||||
};
|
||||
|
||||
gestures = {
|
||||
workspace_swipe = true;
|
||||
workspace_swipe_forever = true;
|
||||
workspace_swipe_direction_lock = false;
|
||||
};
|
||||
|
||||
dwindle = {
|
||||
pseudotile = true;
|
||||
preserve_split = true;
|
||||
};
|
||||
|
||||
misc = {
|
||||
disable_autoreload = true;
|
||||
force_default_wallpaper = 0;
|
||||
animate_mouse_windowdragging = false;
|
||||
vrr = 1;
|
||||
};
|
||||
};
|
||||
}
|
||||
88
home/wayland/hyprlock.nix
Normal file
88
home/wayland/hyprlock.nix
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
{
|
||||
config,
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
general = {
|
||||
disable_loading_bar = true;
|
||||
immediate_render = true;
|
||||
hide_cursor = false;
|
||||
no_fade_in = true;
|
||||
};
|
||||
|
||||
# background = [
|
||||
# {
|
||||
# monitor = "";
|
||||
# path = config.theme.wallpaper;
|
||||
# }
|
||||
# ];
|
||||
|
||||
# input-field = [
|
||||
# {
|
||||
# size = "300, 50";
|
||||
# valign = "bottom";
|
||||
# position = "0%, 10%";
|
||||
#
|
||||
# outline_thickness = 1;
|
||||
#
|
||||
# # font_color = "rgb(b6c4ff)";
|
||||
# # outer_color = "rgba(180, 180, 180, 0.5)";
|
||||
# # inner_color = "rgba(200, 200, 200, 0.1)";
|
||||
# # check_color = "rgba(247, 193, 19, 0.5)";
|
||||
# # fail_color = "rgba(255, 106, 134, 0.5)";
|
||||
#
|
||||
# fade_on_empty = false;
|
||||
# placeholder_text = "Enter Password";
|
||||
#
|
||||
# dots_spacing = 0.2;
|
||||
# dots_center = true;
|
||||
# dots_fade_time = 100;
|
||||
#
|
||||
# # shadow_color = "rgba(0, 0, 0, 0.1)";
|
||||
# shadow_size = 7;
|
||||
# shadow_passes = 2;
|
||||
# }
|
||||
# ];
|
||||
|
||||
label = [
|
||||
{
|
||||
monitor = "";
|
||||
text = "$TIME";
|
||||
font_size = 150;
|
||||
color = "rgb(b6c4ff)";
|
||||
|
||||
position = "0%, 30%";
|
||||
|
||||
valign = "center";
|
||||
halign = "center";
|
||||
|
||||
shadow_color = "rgba(0, 0, 0, 0.1)";
|
||||
shadow_size = 20;
|
||||
shadow_passes = 2;
|
||||
shadow_boost = 0.3;
|
||||
}
|
||||
{
|
||||
monitor = "";
|
||||
text = "cmd[update:3600000] date +'%a %b %d'";
|
||||
font_size = 20;
|
||||
color = "rgb(b6c4ff)";
|
||||
|
||||
position = "0%, 40%";
|
||||
|
||||
valign = "center";
|
||||
halign = "center";
|
||||
|
||||
shadow_color = "rgba(0, 0, 0, 0.1)";
|
||||
shadow_size = 20;
|
||||
shadow_passes = 2;
|
||||
shadow_boost = 0.3;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
328
home/wayland/waybar.nix
Normal file
328
home/wayland/waybar.nix
Normal file
|
|
@ -0,0 +1,328 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) getExe;
|
||||
|
||||
#TODO: UWSM library mentioned in binds.nix.
|
||||
hyprctl = "${config.wayland.windowManager.hyprland.package}/bin/hyprctl";
|
||||
fuzzel = getExe pkgs.fuzzel;
|
||||
kitty = getExe pkgs.kitty;
|
||||
|
||||
pulsemixer = "${kitty} ${getExe pkgs.pulsemixer}";
|
||||
nmtui = "${kitty} ${pkgs.networkmanager}/bin/nmtui";
|
||||
in {
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
settings = {
|
||||
mainBar = {
|
||||
layer = "bottom";
|
||||
position = "bottom";
|
||||
mod = "dock";
|
||||
exclusive = true;
|
||||
gtk-layer-shell = true;
|
||||
margin-bottom = -1;
|
||||
passthrough = false;
|
||||
height = 41;
|
||||
modules-left = [
|
||||
"custom/os_button"
|
||||
"hyprland/workspaces"
|
||||
"wlr/taskbar"
|
||||
];
|
||||
modules-center = [
|
||||
];
|
||||
modules-right = [
|
||||
"cpu"
|
||||
"memory"
|
||||
"disk"
|
||||
"tray"
|
||||
"pulseaudio"
|
||||
"network"
|
||||
"battery"
|
||||
"clock"
|
||||
];
|
||||
"hyprland/language" = {
|
||||
format = "{}";
|
||||
format-en = "ENG";
|
||||
format-ru = "РУС";
|
||||
};
|
||||
"hyprland/workspaces" = {
|
||||
icon-size = 32;
|
||||
spacing = 14;
|
||||
align = "center";
|
||||
justify = "center";
|
||||
on-scroll-up = "${hyprctl} dispatch workspace r+1";
|
||||
on-scroll-down = "${hyprctl} dispatch workspace r-1";
|
||||
};
|
||||
"custom/os_button" = {
|
||||
format = "";
|
||||
on-click = fuzzel;
|
||||
tooltip = false;
|
||||
};
|
||||
cpu = {
|
||||
interval = 5;
|
||||
format = " {usage}%";
|
||||
max-length = 10;
|
||||
};
|
||||
disk = {
|
||||
interval = 30;
|
||||
format = " {percentage_used}%";
|
||||
path = "/";
|
||||
tooltip = true;
|
||||
unit = "GB";
|
||||
tooltip-format = "Available {free} of {total}";
|
||||
};
|
||||
memory = {
|
||||
interval = 10;
|
||||
format = " {percentage}%";
|
||||
max-length = 10;
|
||||
tooltip = true;
|
||||
tooltip-format = "RAM - {used:0.1f}GiB used";
|
||||
};
|
||||
"wlr/taskbar" = {
|
||||
format = "{icon} {title:.17}";
|
||||
icon-size = 28;
|
||||
spacing = 3;
|
||||
on-click-middle = "close";
|
||||
tooltip-format = "{title}";
|
||||
ignore-list = [
|
||||
];
|
||||
on-click = "activate";
|
||||
};
|
||||
tray = {
|
||||
icon-size = 18;
|
||||
spacing = 3;
|
||||
};
|
||||
clock = {
|
||||
format = " {:%R\n %d.%m.%Y}";
|
||||
tooltip-format = "<tt><small>{calendar}</small></tt>";
|
||||
calendar = {
|
||||
mode = "year";
|
||||
mode-mon-col = 3;
|
||||
weeks-pos = "right";
|
||||
on-scroll = 1;
|
||||
on-click-right = "mode";
|
||||
format = {
|
||||
months = "<span color='#ffead3'><b>{}</b></span>";
|
||||
days = "<span color='#ecc6d9'><b>{}</b></span>";
|
||||
weeks = "<span color='#99ffdd'><b>W{}</b></span>";
|
||||
weekdays = "<span color='#ffcc66'><b>{}</b></span>";
|
||||
today = "<span color='#ff6699'><b><u>{}</u></b></span>";
|
||||
};
|
||||
};
|
||||
actions = {
|
||||
on-click-right = "mode";
|
||||
on-click-forward = "tz_up";
|
||||
on-click-backward = "tz_down";
|
||||
on-scroll-up = "shift_up";
|
||||
on-scroll-down = "shift_down";
|
||||
};
|
||||
};
|
||||
network = {
|
||||
format-wifi = " {icon}";
|
||||
format-ethernet = " ";
|
||||
format-disconnected = "";
|
||||
format-icons = [
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
];
|
||||
on-click = nmtui;
|
||||
};
|
||||
battery = {
|
||||
states = {
|
||||
good = 95;
|
||||
warning = 30;
|
||||
critical = 20;
|
||||
};
|
||||
format = "{icon} {capacity}%";
|
||||
format-charging = " {capacity}%";
|
||||
format-plugged = " {capacity}%";
|
||||
format-alt = "{time} {icon}";
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
};
|
||||
pulseaudio = {
|
||||
max-volume = 150;
|
||||
scroll-step = 10;
|
||||
format = "{icon}";
|
||||
tooltip-format = "{volume}%";
|
||||
format-muted = " ";
|
||||
format-icons = {
|
||||
default = [
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
];
|
||||
};
|
||||
on-click = pulsemixer;
|
||||
};
|
||||
};
|
||||
};
|
||||
style = ''
|
||||
* {
|
||||
text-shadow: none;
|
||||
box-shadow: none;
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
font-family: "DejaVuSansM Nerd Font:style=Regular";
|
||||
font-weight: 600;
|
||||
font-size: 12.7px;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background: @base00;
|
||||
border-top: 1px solid @base01;
|
||||
color: @base05;
|
||||
}
|
||||
|
||||
tooltip {
|
||||
background: @base01;
|
||||
border-radius: 5px;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: @base01;
|
||||
}
|
||||
tooltip label{
|
||||
color: @base05;
|
||||
}
|
||||
|
||||
#custom-os_button {
|
||||
font-size: 24px;
|
||||
padding-left: 12px;
|
||||
padding-right: 20px;
|
||||
transition: all 0.25s cubic-bezier(0.165, 0.84, 0.44, 1);
|
||||
}
|
||||
#custom-os_button:hover {
|
||||
background: @base03;
|
||||
color: @base05;
|
||||
}
|
||||
|
||||
#workspaces {
|
||||
color: transparent;
|
||||
margin-right: 1.5px;
|
||||
margin-left: 1.5px;
|
||||
}
|
||||
#workspaces button {
|
||||
padding: 3px;
|
||||
color: @base04;
|
||||
transition: all 0.25s cubic-bezier(0.165, 0.84, 0.44, 1);
|
||||
}
|
||||
#workspaces button.active {
|
||||
color: @base05;
|
||||
border-bottom: 3px solid white;
|
||||
}
|
||||
#workspaces button.focused {
|
||||
color: @base02;
|
||||
}
|
||||
#workspaces button.urgent {
|
||||
background: rgba(255, 200, 0, 0.35);
|
||||
border-bottom: 3px dashed @warning_color;
|
||||
color: @warning_color;
|
||||
}
|
||||
#workspaces button:hover {
|
||||
background: @base03;
|
||||
color: @base05;
|
||||
}
|
||||
|
||||
|
||||
#taskbar button {
|
||||
min-width: 130px;
|
||||
border-bottom: 3px solid rgba(255, 255, 255, 0.3);
|
||||
margin-left: 2px;
|
||||
margin-right: 2px;
|
||||
padding-left: 8px;
|
||||
padding-right: 8px;
|
||||
color: white;
|
||||
transition: all 0.25s cubic-bezier(0.165, 0.84, 0.44, 1);
|
||||
}
|
||||
|
||||
#taskbar button.active {
|
||||
border-bottom: 3px solid white;
|
||||
background: @base02;
|
||||
}
|
||||
|
||||
#taskbar button:hover {
|
||||
border-bottom: 3px solid white;
|
||||
background: @base03;
|
||||
color: @base05;
|
||||
}
|
||||
|
||||
#cpu, #disk, #memory {
|
||||
padding:3px;
|
||||
}
|
||||
|
||||
|
||||
#window {
|
||||
border-radius: 10px;
|
||||
margin-left: 20px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
#tray{
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
#tray > .passive {
|
||||
border-bottom: none;
|
||||
}
|
||||
#tray > .active {
|
||||
border-bottom: 3px solid white;
|
||||
}
|
||||
#tray > .needs-attention {
|
||||
border-bottom: 3px solid @warning_color;
|
||||
}
|
||||
#tray > widget {
|
||||
transition: all 0.25s cubic-bezier(0.165, 0.84, 0.44, 1);
|
||||
}
|
||||
#tray > widget:hover {
|
||||
background: @base03;
|
||||
}
|
||||
|
||||
#pulseaudio {
|
||||
font-family: "JetBrainsMono Nerd Font";
|
||||
padding-left: 3px;
|
||||
padding-right: 3px;
|
||||
transition: all 0.25s cubic-bezier(0.165, 0.84, 0.44, 1);
|
||||
}
|
||||
#pulseaudio:hover {
|
||||
background: @base03;
|
||||
}
|
||||
|
||||
#network {
|
||||
padding-left: 3px;
|
||||
padding-right: 3px;
|
||||
}
|
||||
|
||||
#language {
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
#clock {
|
||||
padding-right: 5px;
|
||||
padding-left: 5px;
|
||||
transition: all 0.25s cubic-bezier(0.165, 0.84, 0.44, 1);
|
||||
}
|
||||
#clock:hover {
|
||||
background: @base03;
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
61
hosts/default.nix
Normal file
61
hosts/default.nix
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
{
|
||||
self,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (inputs.nixpkgs.lib) nixosSystem genAttrs;
|
||||
|
||||
specialArgs = {inherit inputs self;};
|
||||
modules = [
|
||||
inputs.hm.nixosModules.home-manager
|
||||
|
||||
../system
|
||||
];
|
||||
in {
|
||||
flake = let
|
||||
systems = [
|
||||
"laptop"
|
||||
];
|
||||
in {
|
||||
# Systems
|
||||
nixosConfigurations = genAttrs systems (hostName:
|
||||
nixosSystem {
|
||||
inherit specialArgs;
|
||||
modules =
|
||||
modules
|
||||
++ [
|
||||
{
|
||||
imports = [./${hostName}];
|
||||
networking = {inherit hostName;};
|
||||
}
|
||||
];
|
||||
});
|
||||
};
|
||||
|
||||
perSystem = {
|
||||
# Allows running 'nix run github:jsw08/NixOS' and it'll spin up a vm.
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
nixos-vm = nixosSystem {
|
||||
inherit specialArgs;
|
||||
modules =
|
||||
modules
|
||||
++ [
|
||||
{
|
||||
networking.hostName = "vm";
|
||||
nixpkgs.hostPlatform = pkgs.system;
|
||||
|
||||
boot.plymouth.enable = lib.mkForce false;
|
||||
}
|
||||
];
|
||||
};
|
||||
in {
|
||||
apps.default = {
|
||||
type = "app";
|
||||
program = "${nixos-vm.config.system.build.vm}/bin/run-vm-vm";
|
||||
};
|
||||
};
|
||||
}
|
||||
23
hosts/laptop/default.nix
Normal file
23
hosts/laptop/default.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
services = {
|
||||
fprintd.enable = true;
|
||||
udev.extraRules = ''
|
||||
# Ethernet expansion card support
|
||||
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0bda", ATTR{idProduct}=="8156", ATTR{power/autosuspend}="20"
|
||||
'';
|
||||
};
|
||||
hardware.sensor.iio.enable = true; # brightness sensor
|
||||
|
||||
boot.kernelParams = [
|
||||
# There seems to be an issue with panel self-refresh (PSR) that
|
||||
# causes hangs for users.
|
||||
#
|
||||
# https://community.frame.work/t/fedora-kde-becomes-suddenly-slow/58459
|
||||
# https://gitlab.freedesktop.org/drm/amd/-/issues/3647
|
||||
"amdgpu.dcdebugmask=0x10"
|
||||
];
|
||||
}
|
||||
44
hosts/laptop/hardware-configuration.nix
Normal file
44
hosts/laptop/hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-amd"];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/59540469-ecb9-4a68-829b-4cd3ad6e95c3";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/83C9-84B1";
|
||||
fsType = "vfat";
|
||||
options = ["fmask=0077" "dmask=0077"];
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{device = "/dev/disk/by-uuid/65190d84-4e34-4905-a317-d750591933e2";}
|
||||
];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
33
system/core/boot.nix
Normal file
33
system/core/boot.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
boot = {
|
||||
bootspec.enable = true;
|
||||
|
||||
initrd = {
|
||||
systemd.enable = true;
|
||||
supportedFilesystems = ["ext4"];
|
||||
};
|
||||
|
||||
# use latest kernel
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
consoleLogLevel = 3;
|
||||
kernelParams = [
|
||||
"quiet"
|
||||
"systemd.show_status=auto"
|
||||
"rd.udev.log_level=3"
|
||||
"plymouth.use-simpledrm"
|
||||
];
|
||||
|
||||
loader = {
|
||||
# systemd-boot on UEFI
|
||||
efi.canTouchEfiVariables = true;
|
||||
systemd-boot.enable = true;
|
||||
};
|
||||
|
||||
plymouth.enable = true;
|
||||
};
|
||||
}
|
||||
6
system/core/default.nix
Normal file
6
system/core/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./boot.nix
|
||||
./users.nix
|
||||
];
|
||||
}
|
||||
14
system/core/users.nix
Normal file
14
system/core/users.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{pkgs, ...}: {
|
||||
users.users.jsw = {
|
||||
isNormalUser = true;
|
||||
shell = pkgs.fish;
|
||||
initialPassword = "changeme";
|
||||
extraGroups = [
|
||||
"libvirtd"
|
||||
"NetworkManager"
|
||||
"plugdev"
|
||||
"dialout"
|
||||
"wheel"
|
||||
];
|
||||
};
|
||||
}
|
||||
10
system/default.nix
Normal file
10
system/default.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
imports = [
|
||||
./core
|
||||
./hardware
|
||||
./network
|
||||
./nix
|
||||
./programs
|
||||
./services
|
||||
];
|
||||
}
|
||||
6
system/hardware/bluetooth.nix
Normal file
6
system/hardware/bluetooth.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{pkgs, ...}: {
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
};
|
||||
environment.systemPackages = [pkgs.bluetui];
|
||||
}
|
||||
16
system/hardware/commonGraphics.nix
Normal file
16
system/hardware/commonGraphics.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{pkgs, ...}: {
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
|
||||
extraPackages = with pkgs; [
|
||||
libva
|
||||
vaapiVdpau
|
||||
libvdpau-va-gl
|
||||
];
|
||||
extraPackages32 = with pkgs.pkgsi686Linux; [
|
||||
vaapiVdpau
|
||||
libvdpau-va-gl
|
||||
];
|
||||
};
|
||||
}
|
||||
9
system/hardware/default.nix
Normal file
9
system/hardware/default.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
||||
imports = [
|
||||
./bluetooth.nix
|
||||
./commonGraphics.nix
|
||||
./fwupd.nix
|
||||
];
|
||||
}
|
||||
3
system/hardware/fwupd.nix
Normal file
3
system/hardware/fwupd.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
services.fwupd.enable = true;
|
||||
}
|
||||
12
system/network/avahi.nix
Normal file
12
system/network/avahi.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
# network discovery, mDNS
|
||||
services.avahi = {
|
||||
enable = true;
|
||||
nssmdns4 = true;
|
||||
publish = {
|
||||
enable = true;
|
||||
domain = true;
|
||||
userServices = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
28
system/network/default.nix
Normal file
28
system/network/default.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
# networking configuration
|
||||
{pkgs, ...}: {
|
||||
networking = {
|
||||
# use quad9 with DNS over TLS
|
||||
nameservers = ["9.9.9.9#dns.quad9.net"];
|
||||
|
||||
networkmanager = {
|
||||
enable = true;
|
||||
dns = "systemd-resolved";
|
||||
wifi.powersave = true;
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
openssh = {
|
||||
enable = true;
|
||||
settings.UseDns = true;
|
||||
};
|
||||
|
||||
# DNS resolver
|
||||
resolved = {
|
||||
enable = true;
|
||||
dnsovertls = "opportunistic";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.NetworkManager-wait-online.serviceConfig.ExecStart = ["" "${pkgs.networkmanager}/bin/nm-online -q"];
|
||||
}
|
||||
13
system/network/tailscale.nix
Normal file
13
system/network/tailscale.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
networking.firewall = {
|
||||
trustedInterfaces = ["tailscale0"];
|
||||
# required to connect to Tailscale exit nodes
|
||||
checkReversePath = "loose";
|
||||
};
|
||||
|
||||
# inter-machine VPN
|
||||
services.tailscale = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
}
|
||||
44
system/nix/default.nix
Normal file
44
system/nix/default.nix
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./nh.nix
|
||||
./nixpkgs.nix
|
||||
./substituters.nix
|
||||
];
|
||||
|
||||
# we need git for flakes
|
||||
environment.systemPackages = [pkgs.git];
|
||||
|
||||
nix = let
|
||||
flakeInputs = lib.filterAttrs (_: v: lib.isType "flake" v) inputs;
|
||||
in {
|
||||
package = pkgs.lix;
|
||||
|
||||
# pin the registry to avoid downloading and evaling a new nixpkgs version every time
|
||||
registry = lib.mapAttrs (_: v: {flake = v;}) flakeInputs;
|
||||
|
||||
# set the path for channels compat
|
||||
nixPath = lib.mapAttrsToList (key: _: "${key}=flake:${key}") config.nix.registry;
|
||||
|
||||
settings = {
|
||||
auto-optimise-store = true;
|
||||
builders-use-substitutes = true;
|
||||
experimental-features = ["nix-command" "flakes"];
|
||||
flake-registry = "/etc/nix/registry.json";
|
||||
|
||||
# for direnv GC roots
|
||||
keep-derivations = true;
|
||||
keep-outputs = true;
|
||||
|
||||
trusted-users = ["root" "@wheel"];
|
||||
|
||||
accept-flake-config = false;
|
||||
};
|
||||
};
|
||||
system.stateVersion = "25.05";
|
||||
}
|
||||
11
system/nix/nh.nix
Normal file
11
system/nix/nh.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
programs.nh = {
|
||||
enable = true;
|
||||
# weekly cleanup
|
||||
clean = {
|
||||
enable = true;
|
||||
extraArgs = "--keep-since 30d";
|
||||
};
|
||||
flake = "/home/jsw/NixOS";
|
||||
};
|
||||
}
|
||||
5
system/nix/nixpkgs.nix
Normal file
5
system/nix/nixpkgs.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{self, ...}: {
|
||||
nixpkgs = {
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
}
|
||||
28
system/nix/substituters.nix
Normal file
28
system/nix/substituters.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
nix.settings = {
|
||||
substituters = [
|
||||
# high priority since it's almost always used
|
||||
"https://cache.nixos.org?priority=10"
|
||||
|
||||
# "https://anyrun.cachix.org"
|
||||
# "https://fufexan.cachix.org"
|
||||
# "https://helix.cachix.org"
|
||||
# "https://hyprland.cachix.org"
|
||||
# "https://nix-community.cachix.org"
|
||||
# "https://nix-gaming.cachix.org"
|
||||
# "https://yazi.cachix.org"
|
||||
];
|
||||
|
||||
trusted-public-keys = [
|
||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||
|
||||
# "anyrun.cachix.org-1:pqBobmOjI7nKlsUMV25u9QHa9btJK65/C8vnO3p346s="
|
||||
# "fufexan.cachix.org-1:LwCDjCJNJQf5XD2BV+yamQIMZfcKWR9ISIFy5curUsY="
|
||||
# "helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs="
|
||||
# "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||
# "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
# "nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="
|
||||
# "yazi.cachix.org-1:Dcdz63NZKfvUCbDGngQDAZq6kOroIrFoyO064uvLh8k="
|
||||
];
|
||||
};
|
||||
}
|
||||
10
system/programs/default.nix
Normal file
10
system/programs/default.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
imports = [
|
||||
./fish.nix
|
||||
./fonts.nix
|
||||
./games.nix
|
||||
./home-manager.nix
|
||||
./hyprland.nix
|
||||
./xdg.nix
|
||||
];
|
||||
}
|
||||
3
system/programs/fish.nix
Normal file
3
system/programs/fish.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
programs.fish.enable = true;
|
||||
}
|
||||
42
system/programs/fonts.nix
Normal file
42
system/programs/fonts.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{}
|
||||
# Migrated to home-manager stylix.
|
||||
# {pkgs, ...}: {
|
||||
# fonts = {
|
||||
# packages = with pkgs; [
|
||||
# # icon fonts
|
||||
# material-symbols
|
||||
#
|
||||
# # Sans(Serif) fonts
|
||||
# libertinus
|
||||
# noto-fonts
|
||||
# noto-fonts-cjk-sans
|
||||
# noto-fonts-emoji
|
||||
# roboto
|
||||
# (google-fonts.override {fonts = ["Inter"];})
|
||||
#
|
||||
# # monospace fonts
|
||||
# jetbrains-mono
|
||||
#
|
||||
# # nerdfonts
|
||||
# nerd-fonts.jetbrains-mono
|
||||
# nerd-fonts.symbols-only
|
||||
# ];
|
||||
#
|
||||
# # causes more issues than it solves
|
||||
# enableDefaultPackages = false;
|
||||
#
|
||||
# # user defined fonts
|
||||
# # the reason there's Noto Color Emoji everywhere is to override DejaVu's
|
||||
# # B&W emojis that would sometimes show instead of some Color emojis
|
||||
# fontconfig.defaultFonts = let
|
||||
# addAll = builtins.mapAttrs (_: v: v ++ ["Noto Color Emoji"]);
|
||||
# in
|
||||
# addAll {
|
||||
# serif = ["Libertinus Serif"];
|
||||
# sansSerif = ["Inter"];
|
||||
# monospace = ["JetBrains Mono Nerd Font"];
|
||||
# emoji = [];
|
||||
# };
|
||||
# };
|
||||
# }
|
||||
|
||||
22
system/programs/games.nix
Normal file
22
system/programs/games.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{pkgs, ...}: {
|
||||
programs = {
|
||||
gamescope = {
|
||||
enable = true;
|
||||
capSysNice = true;
|
||||
args = [
|
||||
"--rt"
|
||||
"--expose-wayland"
|
||||
];
|
||||
};
|
||||
|
||||
steam = {
|
||||
enable = true;
|
||||
|
||||
extraCompatPackages = [
|
||||
pkgs.proton-ge-bin
|
||||
];
|
||||
|
||||
gamescopeSession.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
15
system/programs/home-manager.nix
Normal file
15
system/programs/home-manager.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{inputs, specialArgs, config, ...}: {
|
||||
imports = [
|
||||
inputs.hm.nixosModules.default
|
||||
];
|
||||
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
extraSpecialArgs = specialArgs;
|
||||
|
||||
users.jsw = import ../../home;
|
||||
};
|
||||
|
||||
programs.dconf.enable = true; # else gtk-managed stuff won't work
|
||||
}
|
||||
10
system/programs/hyprland.nix
Normal file
10
system/programs/hyprland.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{pkgs, ...}: {
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
withUWSM = true;
|
||||
};
|
||||
environment.systemPackages = [
|
||||
pkgs.kitty # This is the default config's terminal and also my main one.
|
||||
];
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1"; # Makes electron apps use wayland.
|
||||
}
|
||||
14
system/programs/xdg.nix
Normal file
14
system/programs/xdg.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{pkgs, ...}: {
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
xdgOpenUsePortal = true;
|
||||
config = {
|
||||
common.default = ["gtk"];
|
||||
hyprland.default = ["gtk" "hyprland"];
|
||||
};
|
||||
|
||||
extraPortals = [
|
||||
pkgs.xdg-desktop-portal-gtk
|
||||
];
|
||||
};
|
||||
}
|
||||
8
system/services/default.nix
Normal file
8
system/services/default.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
imports = [
|
||||
./greetd.nix
|
||||
./kanata.nix
|
||||
./pipewire.nix
|
||||
./power.nix
|
||||
];
|
||||
}
|
||||
23
system/services/greetd.nix
Normal file
23
system/services/greetd.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
# greetd display manager
|
||||
services.greetd = let
|
||||
session = {
|
||||
command = "${lib.getExe config.programs.uwsm.package} start hyprland-uwsm.desktop";
|
||||
user = "jsw";
|
||||
};
|
||||
in {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
terminal.vt = 1;
|
||||
default_session = session;
|
||||
initial_session = session;
|
||||
};
|
||||
};
|
||||
|
||||
programs.uwsm.enable = true;
|
||||
}
|
||||
39
system/services/kanata.nix
Normal file
39
system/services/kanata.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{
|
||||
# keyboard remapping
|
||||
services.kanata = {
|
||||
enable = true;
|
||||
|
||||
keyboards.default = {
|
||||
# i know this config is aweful but it does the job.
|
||||
config = ''
|
||||
(defsrc
|
||||
caps d w e b h j k l
|
||||
)
|
||||
|
||||
(deflayer default
|
||||
@cap _ _ _ _ _ _ _ _
|
||||
)
|
||||
|
||||
(deflayer arrows
|
||||
_ @tablayer @nextword @nextword @prevword left down up right
|
||||
)
|
||||
|
||||
(deflayer tabs
|
||||
_ _ _ _ _ @tableft _ _ @tabright
|
||||
)
|
||||
|
||||
|
||||
(defalias
|
||||
cap (tap-hold-press 170 170 esc (layer-toggle arrows))
|
||||
|
||||
nextword (multi lctrl right)
|
||||
prevword (multi lctrl left)
|
||||
|
||||
tablayer (layer-while-held tabs)
|
||||
tableft (multi lctrl lshift tab)
|
||||
tabright (multi lctrl tab)
|
||||
)
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
11
system/services/pipewire.nix
Normal file
11
system/services/pipewire.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{lib, ...}: {
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
jack.enable = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
services.pulseaudio.enable = lib.mkForce false;
|
||||
}
|
||||
10
system/services/power.nix
Normal file
10
system/services/power.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
services = {
|
||||
logind = {
|
||||
powerKey = "suspend-then-hibernate";
|
||||
powerKeyLongPress = "poweroff";
|
||||
};
|
||||
upower.enable = true;
|
||||
power-profiles-daemon.enable = true;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue