nixos rework after break
This commit is contained in:
parent
a20f10427e
commit
7e9746a83a
56 changed files with 796 additions and 2434 deletions
|
@ -7,7 +7,7 @@
|
||||||
# to get rid of impermanance support, simply remove the "/persist" btrfs subvolume.
|
# to get rid of impermanance support, simply remove the "/persist" btrfs subvolume.
|
||||||
# to import, add this to the imports list:
|
# to import, add this to the imports list:
|
||||||
# (import ./disko.nix { device = "/dev/?" })
|
# (import ./disko.nix { device = "/dev/?" })
|
||||||
{device ? throw "Set this to your disk device, e.g. /dev/sda", ...}: {
|
{device ? throw "Set this to your disk device, e.g. /dev/disk/by-id/...", ...}: {
|
||||||
disko.devices = {
|
disko.devices = {
|
||||||
disk = {
|
disk = {
|
||||||
main = {
|
main = {
|
||||||
|
@ -79,10 +79,6 @@
|
||||||
mountpoint = "/nix";
|
mountpoint = "/nix";
|
||||||
mountOptions = ["compress=zstd" "noatime"];
|
mountOptions = ["compress=zstd" "noatime"];
|
||||||
};
|
};
|
||||||
"/persist" = {
|
|
||||||
mountpoint = "/persist";
|
|
||||||
mountOptions = ["compress=zstd" "noatime"];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
703
flake.lock
703
flake.lock
|
@ -1,703 +0,0 @@
|
||||||
{
|
|
||||||
"nodes": {
|
|
||||||
"base16": {
|
|
||||||
"inputs": {
|
|
||||||
"fromYaml": "fromYaml"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1708890466,
|
|
||||||
"narHash": "sha256-LlrC09LoPi8OPYOGPXegD72v+//VapgAqhbOFS3i8sc=",
|
|
||||||
"owner": "SenchoPens",
|
|
||||||
"repo": "base16.nix",
|
|
||||||
"rev": "665b3c6748534eb766c777298721cece9453fdae",
|
|
||||||
"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-foot": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1696725948,
|
|
||||||
"narHash": "sha256-65bz2bUL/yzZ1c8/GQASnoiGwaF8DczlxJtzik1c0AU=",
|
|
||||||
"owner": "tinted-theming",
|
|
||||||
"repo": "base16-foot",
|
|
||||||
"rev": "eedbcfa30de0a4baa03e99f5e3ceb5535c2755ce",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "tinted-theming",
|
|
||||||
"repo": "base16-foot",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"base16-helix": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1720809814,
|
|
||||||
"narHash": "sha256-numb3xigRGnr/deF7wdjBwVg7fpbTH7reFDkJ75AJkY=",
|
|
||||||
"owner": "tinted-theming",
|
|
||||||
"repo": "base16-helix",
|
|
||||||
"rev": "34f41987bec14c0f3f6b2155c19787b1f6489625",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "tinted-theming",
|
|
||||||
"repo": "base16-helix",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"base16-kitty": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1665001328,
|
|
||||||
"narHash": "sha256-aRaizTYPpuWEcvoYE9U+YRX+Wsc8+iG0guQJbvxEdJY=",
|
|
||||||
"owner": "kdrag0n",
|
|
||||||
"repo": "base16-kitty",
|
|
||||||
"rev": "06bb401fa9a0ffb84365905ffbb959ae5bf40805",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "kdrag0n",
|
|
||||||
"repo": "base16-kitty",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"base16-tmux": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1696725902,
|
|
||||||
"narHash": "sha256-wDPg5elZPcQpu7Df0lI5O8Jv4A3T6jUQIVg63KDU+3Q=",
|
|
||||||
"owner": "tinted-theming",
|
|
||||||
"repo": "base16-tmux",
|
|
||||||
"rev": "c02050bebb60dbb20cb433cd4d8ce668ecc11ba7",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "tinted-theming",
|
|
||||||
"repo": "base16-tmux",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"base16-vim": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1716150083,
|
|
||||||
"narHash": "sha256-ZMhnNmw34ogE5rJZrjRv5MtG3WaqKd60ds2VXvT6hEc=",
|
|
||||||
"owner": "tinted-theming",
|
|
||||||
"repo": "base16-vim",
|
|
||||||
"rev": "6e955d704d046b0dc3e5c2d68a2a6eeffd2b5d3d",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "tinted-theming",
|
|
||||||
"repo": "base16-vim",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"disko": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1721007199,
|
|
||||||
"narHash": "sha256-Gof4Lj1rgTrX59bNu5b/uS/3X/marUGM7LYw31NoXEA=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "disko",
|
|
||||||
"rev": "bad376945de7033c7adc424c02054ea3736cf7c4",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "disko",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-compat": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1673956053,
|
|
||||||
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
|
|
||||||
"owner": "edolstra",
|
|
||||||
"repo": "flake-compat",
|
|
||||||
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "edolstra",
|
|
||||||
"repo": "flake-compat",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-parts": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs-lib": "nixpkgs-lib"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1719994518,
|
|
||||||
"narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=",
|
|
||||||
"owner": "hercules-ci",
|
|
||||||
"repo": "flake-parts",
|
|
||||||
"rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "hercules-ci",
|
|
||||||
"repo": "flake-parts",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"fromYaml": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1689549921,
|
|
||||||
"narHash": "sha256-iX0pk/uB019TdBGlaJEWvBCfydT6sRq+eDcGPifVsCM=",
|
|
||||||
"owner": "SenchoPens",
|
|
||||||
"repo": "fromYaml",
|
|
||||||
"rev": "11fbbbfb32e3289d3c631e0134a23854e7865c84",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "SenchoPens",
|
|
||||||
"repo": "fromYaml",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"gnome-shell": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1713702291,
|
|
||||||
"narHash": "sha256-zYP1ehjtcV8fo+c+JFfkAqktZ384Y+y779fzmR9lQAU=",
|
|
||||||
"owner": "GNOME",
|
|
||||||
"repo": "gnome-shell",
|
|
||||||
"rev": "0d0aadf013f78a7f7f1dc984d0d812971864b934",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "GNOME",
|
|
||||||
"ref": "46.1",
|
|
||||||
"repo": "gnome-shell",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"home-manager": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1720734513,
|
|
||||||
"narHash": "sha256-neWQ8eNtLTd+YMesb7WjKl1SVCbDyCm46LUgP/g/hdo=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "home-manager",
|
|
||||||
"rev": "90ae324e2c56af10f20549ab72014804a3064c7f",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "home-manager",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"home-manager_2": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"stylix",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1715930644,
|
|
||||||
"narHash": "sha256-W9pyM3/vePxrffHtzlJI6lDS3seANQ+Nqp+i58O46LI=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "home-manager",
|
|
||||||
"rev": "e3ad5108f54177e6520535768ddbf1e6af54b59d",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "home-manager",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"hyprcursor": {
|
|
||||||
"inputs": {
|
|
||||||
"hyprlang": [
|
|
||||||
"hyprland",
|
|
||||||
"hyprlang"
|
|
||||||
],
|
|
||||||
"nixpkgs": [
|
|
||||||
"hyprland",
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"systems": [
|
|
||||||
"hyprland",
|
|
||||||
"systems"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1720108799,
|
|
||||||
"narHash": "sha256-AxRkTJlbB8r7aG6gvc7IaLhc2T9TO4/8uqanKRxukBQ=",
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "hyprcursor",
|
|
||||||
"rev": "a5c0d57325c5f0814c39110a70ca19c070ae9486",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "hyprcursor",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"hyprland": {
|
|
||||||
"inputs": {
|
|
||||||
"hyprcursor": "hyprcursor",
|
|
||||||
"hyprlang": "hyprlang",
|
|
||||||
"hyprutils": "hyprutils",
|
|
||||||
"hyprwayland-scanner": "hyprwayland-scanner",
|
|
||||||
"nixpkgs": "nixpkgs",
|
|
||||||
"systems": "systems",
|
|
||||||
"xdph": "xdph"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1721044084,
|
|
||||||
"narHash": "sha256-Bn4YQG4KPO5LeLis8kfz3BNEms1DqqFPVULlwLjzy/k=",
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "Hyprland",
|
|
||||||
"rev": "bd526822deb9ed47c0b51b534817aa8541fff07b",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "Hyprland",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"hyprland-protocols": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"hyprland",
|
|
||||||
"xdph",
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"systems": [
|
|
||||||
"hyprland",
|
|
||||||
"xdph",
|
|
||||||
"systems"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1718746314,
|
|
||||||
"narHash": "sha256-HUklK5u86w2Yh9dOkk4FdsL8eehcOZ95jPhLixGDRQY=",
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "hyprland-protocols",
|
|
||||||
"rev": "1b61f0093afff20ab44d88ad707aed8bf2215290",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "hyprland-protocols",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"hyprlang": {
|
|
||||||
"inputs": {
|
|
||||||
"hyprutils": [
|
|
||||||
"hyprland",
|
|
||||||
"hyprutils"
|
|
||||||
],
|
|
||||||
"nixpkgs": [
|
|
||||||
"hyprland",
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"systems": [
|
|
||||||
"hyprland",
|
|
||||||
"systems"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1720381373,
|
|
||||||
"narHash": "sha256-lyC/EZdHULsaAKVryK11lgHY9u6pXr7qR4irnxNWC7k=",
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "hyprlang",
|
|
||||||
"rev": "5df0174fd09de4ac5475233d65ffc703e89b82eb",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "hyprlang",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"hyprutils": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"hyprland",
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"systems": [
|
|
||||||
"hyprland",
|
|
||||||
"systems"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1720545076,
|
|
||||||
"narHash": "sha256-Pxacc2uoxI00koXp5+CyNqHOTQlqNlK0rlRHDBHX4+g=",
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "hyprutils",
|
|
||||||
"rev": "6174a2a25f4e216c0f1d0c4278adc23c476b1d09",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "hyprutils",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"hyprwayland-scanner": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"hyprland",
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"systems": [
|
|
||||||
"hyprland",
|
|
||||||
"systems"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1720215857,
|
|
||||||
"narHash": "sha256-JPdL+Qul+jEueAn8CARfcWP83eJgwkhMejQYfDvrgvU=",
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "hyprwayland-scanner",
|
|
||||||
"rev": "d5fa094ca27e0039be5e94c0a80ae433145af8bb",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "hyprwayland-scanner",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"impermanence": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1719091691,
|
|
||||||
"narHash": "sha256-AxaLX5cBEcGtE02PeGsfscSb/fWMnyS7zMWBXQWDKbE=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "impermanence",
|
|
||||||
"rev": "23c1f06316b67cb5dabdfe2973da3785cfe9c34a",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "impermanence",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"mysecrets": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1721677492,
|
|
||||||
"narHash": "sha256-VQBIEuO01t4Tq4We5ER9/GV/mbHXVQSf3zD7s6vwSqY=",
|
|
||||||
"ref": "main",
|
|
||||||
"rev": "1e1c10a8bd978220aa4cea5c3a13f726971276f2",
|
|
||||||
"shallow": true,
|
|
||||||
"type": "git",
|
|
||||||
"url": "ssh://git@192.168.1.203:2222/deva/secrets.git"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"ref": "main",
|
|
||||||
"shallow": true,
|
|
||||||
"type": "git",
|
|
||||||
"url": "ssh://git@192.168.1.203:2222/deva/secrets.git"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nh": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1720270372,
|
|
||||||
"narHash": "sha256-G5iteuo2gobI0Y5jHNEBc6UN9ixjwj6zopPKi7bJBE4=",
|
|
||||||
"owner": "viperML",
|
|
||||||
"repo": "nh",
|
|
||||||
"rev": "7f8a1859ed6ea971fcf49b07ca8938e3000c3af4",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "viperML",
|
|
||||||
"repo": "nh",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nix-gaming": {
|
|
||||||
"inputs": {
|
|
||||||
"flake-parts": "flake-parts",
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1720920199,
|
|
||||||
"narHash": "sha256-0dNwRhtUVQha5S+NFeoeMXEt/6v0x56DCdyUk+vEFeY=",
|
|
||||||
"owner": "fufexan",
|
|
||||||
"repo": "nix-gaming",
|
|
||||||
"rev": "fce565402d5b1ed4e92c4a9dfcd094d0172d8f0b",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "fufexan",
|
|
||||||
"repo": "nix-gaming",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nix-index-db": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1720926593,
|
|
||||||
"narHash": "sha256-fW6e27L6qY6s+TxInwrS2EXZZfhMAlaNqT0sWS49qMA=",
|
|
||||||
"owner": "mic92",
|
|
||||||
"repo": "nix-index-database",
|
|
||||||
"rev": "5fe5b0cdf1268112dc96319388819b46dc051ef4",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "mic92",
|
|
||||||
"repo": "nix-index-database",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1720542800,
|
|
||||||
"narHash": "sha256-ZgnNHuKV6h2+fQ5LuqnUaqZey1Lqqt5dTUAiAnqH0QQ=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "feb2849fdeb70028c70d73b848214b00d324a497",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "nixos-unstable",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs-lib": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1719876945,
|
|
||||||
"narHash": "sha256-Fm2rDDs86sHy0/1jxTOKB1118Q0O3Uc7EC0iXvXKpbI=",
|
|
||||||
"type": "tarball",
|
|
||||||
"url": "https://github.com/NixOS/nixpkgs/archive/5daf0514482af3f97abaefc78a6606365c9108e2.tar.gz"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"type": "tarball",
|
|
||||||
"url": "https://github.com/NixOS/nixpkgs/archive/5daf0514482af3f97abaefc78a6606365c9108e2.tar.gz"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs-stable": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1720915306,
|
|
||||||
"narHash": "sha256-6vuViC56+KSr+945bCV8akHK+7J5k6n/epYg/W3I5eQ=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "74348da2f3a312ee25cea09b98cdba4cb9fa5d5d",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "release-24.05",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs-unstable": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1720957393,
|
|
||||||
"narHash": "sha256-oedh2RwpjEa+TNxhg5Je9Ch6d3W1NKi7DbRO1ziHemA=",
|
|
||||||
"owner": "nixos",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "693bc46d169f5af9c992095736e82c3488bf7dbb",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nixos",
|
|
||||||
"ref": "nixos-unstable",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs_2": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1720954236,
|
|
||||||
"narHash": "sha256-1mEKHp4m9brvfQ0rjCca8P1WHpymK3TOr3v34ydv9bs=",
|
|
||||||
"owner": "nixos",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "53e81e790209e41f0c1efa9ff26ff2fd7ab35e27",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nixos",
|
|
||||||
"ref": "nixos-24.05",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs_3": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1714912032,
|
|
||||||
"narHash": "sha256-clkcOIkg8G4xuJh+1onLG4HPMpbtzdLv4rHxFzgsH9c=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "ee4a6e0f566fe5ec79968c57a9c2c3c25f2cf41d",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "nixpkgs-unstable",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": {
|
|
||||||
"inputs": {
|
|
||||||
"disko": "disko",
|
|
||||||
"home-manager": "home-manager",
|
|
||||||
"hyprland": "hyprland",
|
|
||||||
"impermanence": "impermanence",
|
|
||||||
"mysecrets": "mysecrets",
|
|
||||||
"nh": "nh",
|
|
||||||
"nix-gaming": "nix-gaming",
|
|
||||||
"nix-index-db": "nix-index-db",
|
|
||||||
"nixpkgs": "nixpkgs_2",
|
|
||||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
|
||||||
"sops-nix": "sops-nix",
|
|
||||||
"stylix": "stylix"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sops-nix": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"nixpkgs-stable": "nixpkgs-stable"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1720926522,
|
|
||||||
"narHash": "sha256-eTpnrT6yu1vp8C0B5fxHXhgKxHoYMoYTEikQx///jxY=",
|
|
||||||
"owner": "Mic92",
|
|
||||||
"repo": "sops-nix",
|
|
||||||
"rev": "0703ba03fd9c1665f8ab68cc3487302475164617",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "Mic92",
|
|
||||||
"repo": "sops-nix",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"stylix": {
|
|
||||||
"inputs": {
|
|
||||||
"base16": "base16",
|
|
||||||
"base16-fish": "base16-fish",
|
|
||||||
"base16-foot": "base16-foot",
|
|
||||||
"base16-helix": "base16-helix",
|
|
||||||
"base16-kitty": "base16-kitty",
|
|
||||||
"base16-tmux": "base16-tmux",
|
|
||||||
"base16-vim": "base16-vim",
|
|
||||||
"flake-compat": "flake-compat",
|
|
||||||
"gnome-shell": "gnome-shell",
|
|
||||||
"home-manager": "home-manager_2",
|
|
||||||
"nixpkgs": "nixpkgs_3"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1720818679,
|
|
||||||
"narHash": "sha256-u9PqY7O6TN42SLeb0e6mnYAgQOoQmclaVSHfLKMpmu0=",
|
|
||||||
"owner": "danth",
|
|
||||||
"repo": "stylix",
|
|
||||||
"rev": "29148118cc33f08b71058e1cda7ca017f5300b51",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "danth",
|
|
||||||
"repo": "stylix",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"systems": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1689347949,
|
|
||||||
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default-linux",
|
|
||||||
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default-linux",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"xdph": {
|
|
||||||
"inputs": {
|
|
||||||
"hyprland-protocols": "hyprland-protocols",
|
|
||||||
"hyprlang": [
|
|
||||||
"hyprland",
|
|
||||||
"hyprlang"
|
|
||||||
],
|
|
||||||
"nixpkgs": [
|
|
||||||
"hyprland",
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"systems": [
|
|
||||||
"hyprland",
|
|
||||||
"systems"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1720194466,
|
|
||||||
"narHash": "sha256-Rizg9efi6ue95zOp0MeIV2ZedNo+5U9G2l6yirgBUnA=",
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "xdg-desktop-portal-hyprland",
|
|
||||||
"rev": "b9b97e5ba23fe7bd5fa4df54696102e8aa863cf6",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "xdg-desktop-portal-hyprland",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": "root",
|
|
||||||
"version": 7
|
|
||||||
}
|
|
161
flake.nix
161
flake.nix
|
@ -1,119 +1,66 @@
|
||||||
{
|
{
|
||||||
description = "nixos system configuration";
|
description = "nixos system configuration";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
|
||||||
|
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-24.05";
|
||||||
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
|
|
||||||
inputs = {
|
home-manager = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
|
url = "github:nix-community/home-manager";
|
||||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
home-manager = {
|
disko = {
|
||||||
url = "github:nix-community/home-manager";
|
url = "github:nix-community/disko";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
nix-index-db = {
|
nh = {
|
||||||
url = "github:mic92/nix-index-database";
|
url = "github:viperML/nh";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
disko = {
|
nix-gaming = {
|
||||||
url = "github:nix-community/disko";
|
url = "github:fufexan/nix-gaming";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
impermanence = {
|
outputs = {
|
||||||
url = "github:nix-community/impermanence";
|
self,
|
||||||
};
|
nixpkgs,
|
||||||
|
nixpkgs-unstable,
|
||||||
|
home-manager,
|
||||||
|
flake-utils,
|
||||||
|
...
|
||||||
|
} @ inputs: flake-utils.lib.eachDefaultSystem(system: let
|
||||||
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
inherit (self) outputs;
|
||||||
|
in {
|
||||||
|
packages = (import ./pkgs pkgs);
|
||||||
|
|
||||||
hyprland.url = "github:hyprwm/Hyprland";
|
formatter = pkgs.alejandra;
|
||||||
|
|
||||||
nh = {
|
overlays = import ./overlays {inherit inputs;};
|
||||||
url = "github:viperML/nh";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
nix-gaming = {
|
nixosConfigurations.waves = nixpkgs.lib.nixosSystem {
|
||||||
url = "github:fufexan/nix-gaming";
|
specialArgs = {
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inherit inputs outputs flake-utils;
|
||||||
};
|
};
|
||||||
|
modules = [
|
||||||
|
inputs.disko.nixosModules.default
|
||||||
|
(import ./disko.nix {device="/dev/disk/by-id/nvme-Samsung_SSD_980_PRO_with_Heatsink_1TB_S6WSNJ0T900943T";})
|
||||||
|
./waves.nix
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
sops-nix = {
|
homeConfigurations."dv" = home-manager.lib.homeManagerConfiguration {
|
||||||
url = "github:Mic92/sops-nix";
|
inherit pkgs;
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
mysecrets = {
|
modules = [
|
||||||
url = "git+ssh://git@192.168.1.203:2222/deva/secrets.git?ref=main&shallow=1";
|
./modules/home/dv.nix
|
||||||
flake = false;
|
];
|
||||||
};
|
};
|
||||||
|
});
|
||||||
stylix.url = "github:danth/stylix";
|
|
||||||
};
|
|
||||||
|
|
||||||
outputs = {
|
|
||||||
self,
|
|
||||||
nixpkgs,
|
|
||||||
nixpkgs-unstable,
|
|
||||||
home-manager,
|
|
||||||
...
|
|
||||||
} @ inputs: let
|
|
||||||
inherit (self) outputs;
|
|
||||||
systems = [
|
|
||||||
"aarch64-linux"
|
|
||||||
"i686-linux"
|
|
||||||
"x86_64-linux"
|
|
||||||
"aarch64-darwin"
|
|
||||||
"x86_64-darwin"
|
|
||||||
];
|
|
||||||
forAllSystems = nixpkgs.lib.genAttrs systems;
|
|
||||||
in {
|
|
||||||
# Your custom packages
|
|
||||||
# Accessible through 'nix build', 'nix shell', etc
|
|
||||||
packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});
|
|
||||||
# Formatter for your nix files, available through 'nix fmt'
|
|
||||||
# Other options beside 'alejandra' include 'nixpkgs-fmt'
|
|
||||||
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
|
|
||||||
|
|
||||||
apps = forAllSystems (system: {
|
|
||||||
"clone" = {
|
|
||||||
type = "app";
|
|
||||||
program = self.outputs.packages.${system}.clone;
|
|
||||||
};
|
|
||||||
"disko" = {
|
|
||||||
type = "app";
|
|
||||||
program = self.outputs.packages.${system}.disko;
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
# Your custom packages and modifications, exported as overlays
|
|
||||||
overlays = import ./overlays {inherit inputs;};
|
|
||||||
# Reusable nixos modules you might want to export
|
|
||||||
# These are usually stuff you would upstream into nixpkgs
|
|
||||||
# nixosModules = import ./modules/nixos;
|
|
||||||
# Reusable home-manager modules you might want to export
|
|
||||||
# These are usually stuff you would upstream into home-manager
|
|
||||||
# homeManagerModules = import ./modules/home-manager;
|
|
||||||
|
|
||||||
nixosConfigurations.waves = nixpkgs.lib.nixosSystem {
|
|
||||||
specialArgs = {
|
|
||||||
inherit inputs outputs;
|
|
||||||
};
|
|
||||||
modules = [
|
|
||||||
inputs.disko.nixosModules.default
|
|
||||||
(import ./disko.nix {device = "/dev/nvme1n1";})
|
|
||||||
{networking.hostName = "waves";}
|
|
||||||
./os/configuration.nix
|
|
||||||
./waves-hardware.nix
|
|
||||||
inputs.impermanence.nixosModules.impermanence
|
|
||||||
inputs.stylix.nixosModules.stylix
|
|
||||||
inputs.home-manager.nixosModules.home-manager
|
|
||||||
{
|
|
||||||
home-manager.useGlobalPkgs = true;
|
|
||||||
home-manager.useUserPackages = true;
|
|
||||||
home-manager.backupFileExtension = "bak";
|
|
||||||
}
|
|
||||||
./os/users.nix
|
|
||||||
./os/styling.nix
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
27
modules/home/dev/default.nix
Normal file
27
modules/home/dev/default.nix
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
import = [
|
||||||
|
./git.nix
|
||||||
|
./ssh.nix
|
||||||
|
./gpg.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
unstable.bruno
|
||||||
|
unstable.xclip
|
||||||
|
unstable.just
|
||||||
|
unstable.nil
|
||||||
|
unstable.alejandra
|
||||||
|
unstable.zoxide
|
||||||
|
unstable.neovide
|
||||||
|
unstable.nodejs
|
||||||
|
unstable.corepack
|
||||||
|
unstable.cargo-watch
|
||||||
|
unstable.rustup
|
||||||
|
unstable.go
|
||||||
|
unstable.jetbrains.idea-community
|
||||||
|
unstable.cascadia-code
|
||||||
|
unstable.jdk17
|
||||||
|
unstable.ncdu
|
||||||
|
unstable.httpie
|
||||||
|
];
|
||||||
|
}
|
74
modules/home/dev/git.nix
Normal file
74
modules/home/dev/git.nix
Normal file
|
@ -0,0 +1,74 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
programs.git = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.gitAndTools.gitFull;
|
||||||
|
lfs.enable = true;
|
||||||
|
|
||||||
|
userName = "deva";
|
||||||
|
userEmail = "hi@dessa.dev";
|
||||||
|
signing = {
|
||||||
|
key = "CC10324DD962CB7E";
|
||||||
|
signByDefault = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
aliases = {
|
||||||
|
wta = "worktree add";
|
||||||
|
wtl = "worktree list";
|
||||||
|
wtr = "worktree remove";
|
||||||
|
rh = "reset HEAD"; # unstages all changes
|
||||||
|
lg = "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --";
|
||||||
|
lgb = "--no-pager log --oneline --decorate --graph --parents --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --";
|
||||||
|
nuke = "!git clean -xdf && git reset --hard && git pull";
|
||||||
|
st = "status -sb";
|
||||||
|
sync = "!git push && git pull";
|
||||||
|
rs = "restore --staged";
|
||||||
|
ll = "log --oneline";
|
||||||
|
last = "log -1 HEAD --stat";
|
||||||
|
cm = "commit -m";
|
||||||
|
co = "checkout";
|
||||||
|
rv = "remote -v";
|
||||||
|
df = "diff HEAD";
|
||||||
|
};
|
||||||
|
|
||||||
|
extraConfig = {
|
||||||
|
init.defaultBranch = "main";
|
||||||
|
branch.autosetupmerge = "true";
|
||||||
|
push.default = "current";
|
||||||
|
merge.stat = "true";
|
||||||
|
core.whitespace = "fix,-indent-with-non-tab,trailing-space,cr-at-eol";
|
||||||
|
repack.usedeltabaseoffset = "true";
|
||||||
|
pull.ff = "only";
|
||||||
|
rebase = {
|
||||||
|
autoSquash = true;
|
||||||
|
autoStash = true;
|
||||||
|
};
|
||||||
|
rerere = {
|
||||||
|
enabled = true;
|
||||||
|
autoupdate = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
ignores = [
|
||||||
|
"*~"
|
||||||
|
"*.swp"
|
||||||
|
"*result*"
|
||||||
|
"todo.md"
|
||||||
|
"node_modules"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
programs.gh = {
|
||||||
|
enable = true;
|
||||||
|
extensions = [
|
||||||
|
pkgs.gh-copilot
|
||||||
|
];
|
||||||
|
gitCredentialHelper.enable = true;
|
||||||
|
settings = {
|
||||||
|
editor = "nvim";
|
||||||
|
git_protocol = "ssh";
|
||||||
|
aliases = {
|
||||||
|
co = "pr checkout";
|
||||||
|
rc = "repo clone";
|
||||||
|
cp = "copilot";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
18
modules/home/dev/gpg.nix
Normal file
18
modules/home/dev/gpg.nix
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
{pkgs, config, ...}: {
|
||||||
|
programs.gpg = {
|
||||||
|
enable = true;
|
||||||
|
homedir = "${config.home.homeDirectory}/.gnupg";
|
||||||
|
settings = {
|
||||||
|
use-agent = true;
|
||||||
|
default-key = "CC10324DD962CB7E";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
services.gpg-agent = {
|
||||||
|
enable = true;
|
||||||
|
enableSshSupport = true;
|
||||||
|
pinentryPackage = pkgs.pinentry-gnome3;
|
||||||
|
};
|
||||||
|
home.sessionVariables = {
|
||||||
|
SSH_AUTH_SOCK = "$XDG_RUNTIME_DIR/keyring/ssh";
|
||||||
|
};
|
||||||
|
}
|
12
modules/home/dev/ssh.nix
Normal file
12
modules/home/dev/ssh.nix
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{programs.ssh = {
|
||||||
|
enable = true;
|
||||||
|
matchBlocks = {
|
||||||
|
"hi@dessa.dev" = {
|
||||||
|
host = "gitlab.com github.com 192.168.1.203";
|
||||||
|
identitiesOnly = true;
|
||||||
|
identityFile = [
|
||||||
|
"~/.ssh/id_user"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};}
|
50
modules/home/dv.nix
Normal file
50
modules/home/dv.nix
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
{pkgs, lib, config, inputs, ...}: {
|
||||||
|
imports = [
|
||||||
|
./services.nix
|
||||||
|
./programs.nix
|
||||||
|
# development
|
||||||
|
./dev
|
||||||
|
# terminal
|
||||||
|
./term
|
||||||
|
# gui
|
||||||
|
./gui.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
home = {
|
||||||
|
file.".ssh/id_user.pub".text = builtins.readFile ../nixos/id_user.pub;
|
||||||
|
username = config.users.users.dv.name;
|
||||||
|
homeDirectory = "/dv";
|
||||||
|
extraOutputsToInstall = ["doc" "devdoc"];
|
||||||
|
packages = [
|
||||||
|
inputs.nh.packages.x86_64-linux.default
|
||||||
|
pkgs.nom
|
||||||
|
pkgs.pinta
|
||||||
|
pkgs.vesktop
|
||||||
|
pkgs.signal-desktop
|
||||||
|
pkgs.blockbench
|
||||||
|
pkgs.blender
|
||||||
|
pkgs.prismlauncher
|
||||||
|
pkgs.steam
|
||||||
|
];
|
||||||
|
sessionVariables = {
|
||||||
|
NIX_AUTO_RUN = "1";
|
||||||
|
FLAKE = "/dv/nixos";
|
||||||
|
};
|
||||||
|
# stateVersion = ""; <- figure out when installing WARNING:
|
||||||
|
};
|
||||||
|
nix.package = lib.mkForce pkgs.unstable.nixVersions.latest;
|
||||||
|
nix.extraOptions = ''
|
||||||
|
experimental-features = nix-command flakes
|
||||||
|
'';
|
||||||
|
manual = {
|
||||||
|
html.enable = false;
|
||||||
|
json.enable = false;
|
||||||
|
manpages.enable = false;
|
||||||
|
};
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
programs.git.enable = true;
|
||||||
|
programs.nix-index.enable = true;
|
||||||
|
programs.nix-index.symlinkToCacheHome = true;
|
||||||
|
programs.nix-index-database.comma.enable = true;
|
||||||
|
systemd.user.startServices = "sd-switch";
|
||||||
|
}
|
16
modules/home/gui.nix
Normal file
16
modules/home/gui.nix
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
home.packages = [
|
||||||
|
pkgs.noto-fonts
|
||||||
|
pkgs.noto-fonts-emoji
|
||||||
|
|
||||||
|
pkgs.material-design-icons
|
||||||
|
(pkgs.google-fonts.override {fonts = ["Overpass" "Nunito"];})
|
||||||
|
(pkgs.nerdfonts.override {fonts = ["NerdFontsSymbolsOnly"];})
|
||||||
|
];
|
||||||
|
xsession.windowManager.bspwm = {
|
||||||
|
enable = true;
|
||||||
|
startupPrograms = [
|
||||||
|
"wezterm"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
8
modules/home/programs.nix
Normal file
8
modules/home/programs.nix
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
programs.obs-studio = {
|
||||||
|
enable = true;
|
||||||
|
plugins = with pkgs.obs-studio-plugins; [
|
||||||
|
wlrobs
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,12 +1,134 @@
|
||||||
{
|
{
|
||||||
pkgs,
|
config,
|
||||||
config,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: let
|
||||||
programs.bat.enable = true;
|
pst = pkgs.writeShellScriptBin "pst" (builtins.readFile ./pst);
|
||||||
|
in {
|
||||||
|
programs = {
|
||||||
|
wezterm = {
|
||||||
|
enable = true;
|
||||||
|
extraConfig = builtins.readFile ./wezterm.lua;
|
||||||
|
};
|
||||||
|
lf = {
|
||||||
|
enable = true;
|
||||||
|
commands = {
|
||||||
|
dragon-out = ''%${pkgs.xdragon}/bin/xdragon -a -x "$fx"'';
|
||||||
|
editor-open = ''$$EDITOR $f'';
|
||||||
|
mkdir = ''
|
||||||
|
''${{
|
||||||
|
printf "Directory Name: "
|
||||||
|
read DIR
|
||||||
|
mkdir $DIR
|
||||||
|
}}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
keybindings = {
|
||||||
|
"\\\"" = "";
|
||||||
|
o = "";
|
||||||
|
c = "mkdir";
|
||||||
|
D = ''$rm -fr "$fx"'';
|
||||||
|
"." = "set hidden!";
|
||||||
|
"`" = "mark-load";
|
||||||
|
"\\'" = "mark-load";
|
||||||
|
"<enter>" = "open";
|
||||||
|
do = "dragon-out";
|
||||||
|
"g~" = "cd";
|
||||||
|
gh = "cd";
|
||||||
|
"g/" = "/";
|
||||||
|
ee = "editor-open";
|
||||||
|
V = ''''$${pkgs.bat}/bin/bat --paging=always --theme=gruvbox "$f"'';
|
||||||
|
};
|
||||||
|
settings = {
|
||||||
|
preview = true;
|
||||||
|
hidden = true;
|
||||||
|
drawbox = true;
|
||||||
|
icons = true;
|
||||||
|
ignorecase = true;
|
||||||
|
};
|
||||||
|
extraConfig = let
|
||||||
|
previewer = pkgs.writeShellScriptBin "pv.sh" ''
|
||||||
|
file=$1
|
||||||
|
w=$2
|
||||||
|
h=$3
|
||||||
|
x=$4
|
||||||
|
y=$5
|
||||||
|
|
||||||
|
if [[ "$( ${pkgs.file}/bin/file -Lb --mime-type "$file")" =~ ^image ]]; then
|
||||||
|
# ${pkgs.kitty}/bin/kitty +kitten icat --silent --stdin no --transfer-mode file --place "''${w}x''${h}@''${x}x''${y}" "$file" < /dev/null > /dev/tty
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
${pkgs.pistol}/bin/pistol "$file"
|
||||||
|
'';
|
||||||
|
cleaner = pkgs.writeShellScriptBin "clean.sh" ''
|
||||||
|
# ${pkgs.kitty}/bin/kitty +kitten icat --clear --stdin no --silent --transfer-mode file < /dev/null > /dev/tty
|
||||||
|
'';
|
||||||
|
in ''
|
||||||
|
set cleaner ${cleaner}/bin/clean.sh
|
||||||
|
set previewer ${previewer}/bin/pv.sh
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
tmux = {
|
||||||
|
enable = true;
|
||||||
|
mouse = true;
|
||||||
|
prefix = "C-Space";
|
||||||
|
keyMode = "vi";
|
||||||
|
baseIndex = 1;
|
||||||
|
plugins = with pkgs.tmuxPlugins; [
|
||||||
|
vim-tmux-navigator
|
||||||
|
yank
|
||||||
|
{
|
||||||
|
plugin = tokyo-night-tmux;
|
||||||
|
extraConfig = ''
|
||||||
|
# tokyo night tmux config
|
||||||
|
set -g @tokyo-night-tmux_theme "night"
|
||||||
|
set -g @tokyo-night-tmux_show_datetime 0
|
||||||
|
set -g @tokyo-night-tmux_path_format relative
|
||||||
|
set -g @tokyo-night-tmux_window_id_style digital
|
||||||
|
set -g @tokyo-night-tmux_pane_id_style hide
|
||||||
|
set -g @tokyo-night-tmux_show_git 0
|
||||||
|
|
||||||
|
# Undercurl fixes (tokyonight.nvim)
|
||||||
|
set -g default-terminal "${TERM}"
|
||||||
|
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm' # undercurl support
|
||||||
|
set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m' # underscore colours - needs tmux 3.0
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
];
|
||||||
|
extraConfig = ''
|
||||||
|
set-option -sa terminal-overrides ",xterm*:Tc"
|
||||||
|
set-window-option -g pane-base-index 1
|
||||||
|
set-option -g renumber-windows on
|
||||||
|
|
||||||
|
# Use Alt-arrow keys without prefix key to switch panes
|
||||||
|
bind -n M-Left select-pane -L
|
||||||
|
bind -n M-Right select-pane -R
|
||||||
|
bind -n M-Up select-pane -U
|
||||||
|
bind -n M-Down select-pane -D
|
||||||
|
|
||||||
|
# Shift arrow to switch windows
|
||||||
|
bind -n S-Left previous-window
|
||||||
|
bind -n S-Right next-window
|
||||||
|
|
||||||
|
# Shift Alt vim keys to switch windows
|
||||||
|
bind -n M-H previous-window
|
||||||
|
bind -n M-L next-window
|
||||||
|
|
||||||
|
bind-key -T copy-mode-vi v send-keys -X begin-selection
|
||||||
|
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
|
||||||
|
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
|
||||||
|
|
||||||
|
bind '_' split-window -v -c "#{pane_current_path}"
|
||||||
|
bind | split-window -h -c "#{pane_current_path}"
|
||||||
|
bind c new-window -c "#{pane_current_path}"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
xdg.configFile."lf/icons".source = ./lf-icons;
|
||||||
|
};
|
||||||
|
programs.bat.enable = true;
|
||||||
programs.eza.enable = true;
|
programs.eza.enable = true;
|
||||||
programs.man.enable = true;
|
programs.man.enable = true;
|
||||||
programs.nix-index.enableZshIntegration = true;
|
|
||||||
home.packages = [
|
home.packages = [
|
||||||
pkgs.unstable.steam-run
|
pkgs.unstable.steam-run
|
||||||
pkgs.delta
|
pkgs.delta
|
||||||
|
@ -186,6 +308,7 @@
|
||||||
glg = "git lg";
|
glg = "git lg";
|
||||||
serve = "python3 -m http.server";
|
serve = "python3 -m http.server";
|
||||||
ytmp3 = "yt-dlp --ignore-errors --format bestaudio --extract-audio --audio-format mp3 --audio-quality 0 --embed-thumbnail --embed-metadata --output '%(title)s.%(ext)s'";
|
ytmp3 = "yt-dlp --ignore-errors --format bestaudio --extract-audio --audio-format mp3 --audio-quality 0 --embed-thumbnail --embed-metadata --output '%(title)s.%(ext)s'";
|
||||||
|
pst = "${pst}/bin/pst";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
0
os/dev/lf-icons → modules/home/term/lf-icons
Executable file → Normal file
0
os/dev/lf-icons → modules/home/term/lf-icons
Executable file → Normal file
|
@ -35,14 +35,7 @@
|
||||||
"style": "plain",
|
"style": "plain",
|
||||||
"template": "<#525252>git:(</>{{.HEAD}}<#525252>, </>{{if .BranchStatus }}{{ .BranchStatus }}{{ end }}{{ if .Working.Changed }}<#dde1e6>*</>{{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \ueb4b {{ .StashCount }}{{ end }}<#525252>)</> ",
|
"template": "<#525252>git:(</>{{.HEAD}}<#525252>, </>{{if .BranchStatus }}{{ .BranchStatus }}{{ end }}{{ if .Working.Changed }}<#dde1e6>*</>{{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \ueb4b {{ .StashCount }}{{ end }}<#525252>)</> ",
|
||||||
"type": "git"
|
"type": "git"
|
||||||
}
|
},
|
||||||
],
|
|
||||||
"type": "prompt"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"alignment": "left",
|
|
||||||
"newline": true,
|
|
||||||
"segments": [
|
|
||||||
{
|
{
|
||||||
"foreground": "#fff",
|
"foreground": "#fff",
|
||||||
"foreground_templates": [
|
"foreground_templates": [
|
||||||
|
@ -50,7 +43,7 @@
|
||||||
"{{if contains .Env.IN_NIX_SHELL \"pure\"}}#81A1C1{{end}}"
|
"{{if contains .Env.IN_NIX_SHELL \"pure\"}}#81A1C1{{end}}"
|
||||||
],
|
],
|
||||||
"style": "plain",
|
"style": "plain",
|
||||||
"template": "<b>\uf441</b> ",
|
"template": "<b>λ</b> ",
|
||||||
"type": "text"
|
"type": "text"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
@ -64,7 +57,7 @@
|
||||||
"{{if gt .Code 0 }}#BF616A{{ end }}",
|
"{{if gt .Code 0 }}#BF616A{{ end }}",
|
||||||
"{{if contains .Env.IN_NIX_SHELL \"pure\"}}#81A1C1{{end}}"
|
"{{if contains .Env.IN_NIX_SHELL \"pure\"}}#81A1C1{{end}}"
|
||||||
],
|
],
|
||||||
"template": "<b>\uf441</b> "
|
"template": "<b>λ</b> "
|
||||||
},
|
},
|
||||||
"secondary_prompt": {
|
"secondary_prompt": {
|
||||||
"foreground": "#525252",
|
"foreground": "#525252",
|
26
modules/home/term/pst
Normal file
26
modules/home/term/pst
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
URL="https://pastebin.dessa.dev"
|
||||||
|
|
||||||
|
FILEPATH="$1"
|
||||||
|
FILENAME=$(basename -- "$FILEPATH")
|
||||||
|
EXTENSION="''${FILENAME##*.}"
|
||||||
|
|
||||||
|
if [ ! -f $FILEPATH ]; then
|
||||||
|
# curl the file from the internet, given the id
|
||||||
|
# future regex for any wantsgunbin link: ^((http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b\/)?[0-9a-zA-Z]{5,}(\..*)?$
|
||||||
|
if [[ $FILEPATH =~ ^(https:\/\/pastebin\.dessa\.dev\/)?[0-9a-zA-Z]{5,}(\..*)?$ ]]; then
|
||||||
|
OUT=$(mktemp)
|
||||||
|
echo $OUT
|
||||||
|
curl -sL https://pastebin.dessa.dev/$FILEPATH > $OUT
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
echo "File not found: $FILEPATH"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
RESPONSE=$(curl --data-binary @''${FILEPATH:-/dev/stdin} --url $URL)
|
||||||
|
PASTELINK="$URL$RESPONSE"
|
||||||
|
|
||||||
|
[ -z "$EXTENSION" ] && echo $PASTELINK || echo $PASTELINK.$EXTENSION
|
34
modules/home/term/wezterm.lua
Normal file
34
modules/home/term/wezterm.lua
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
local wezterm = require("wezterm")
|
||||||
|
|
||||||
|
local config = wezterm.config_builder()
|
||||||
|
|
||||||
|
config.color_scheme = "Tokyo Night Moon"
|
||||||
|
config.use_fancy_tab_bar = false
|
||||||
|
config.window_decorations = "RESIZE"
|
||||||
|
config.hide_tab_bar_if_only_one_tab = true
|
||||||
|
-- config.font = wezterm.font({
|
||||||
|
-- family = "Rec Mono Waves",
|
||||||
|
-- weight = "Regular",
|
||||||
|
-- })
|
||||||
|
config.font = wezterm.font_with_fallback({
|
||||||
|
{ family = "Rec Mono Waves", weight = "Regular" },
|
||||||
|
"Symbols Nerd Font Mono",
|
||||||
|
})
|
||||||
|
-- config.cell_width = 0.88
|
||||||
|
|
||||||
|
config.set_environment_variables = {
|
||||||
|
TERM = "xterm-256color",
|
||||||
|
EDITOR = "nvim",
|
||||||
|
VISUAL = "nvim",
|
||||||
|
}
|
||||||
|
|
||||||
|
config.window_padding = {
|
||||||
|
left = 7,
|
||||||
|
right = 7,
|
||||||
|
top = 0,
|
||||||
|
bottom = 0,
|
||||||
|
}
|
||||||
|
|
||||||
|
config.default_cursor_style = "SteadyBar"
|
||||||
|
|
||||||
|
return config
|
3
modules/nixos/adb.nix
Normal file
3
modules/nixos/adb.nix
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{}: {
|
||||||
|
programs.adb.enable = true;
|
||||||
|
}
|
8
modules/nixos/console.nix
Normal file
8
modules/nixos/console.nix
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
console = {
|
||||||
|
earlySetup = true;
|
||||||
|
font = "${pkgs.terminus_font}/share/consolefonts/ter-v32n.psf.gz";
|
||||||
|
keyMap = lib.mkForce "us";
|
||||||
|
useXkbConfig = true; # use xkb.options in tty.
|
||||||
|
};
|
||||||
|
}
|
36
modules/nixos/fonts.nix
Normal file
36
modules/nixos/fonts.nix
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
fonts = {
|
||||||
|
enableDefaultPackages = false;
|
||||||
|
fontconfig = {
|
||||||
|
enable = true;
|
||||||
|
antialias = true;
|
||||||
|
defaultFonts = {
|
||||||
|
emoji = ["Noto Color Emoji"];
|
||||||
|
monospace = ["Rec Mono Waves" "Symbols Nerd Font" "Noto Color Emoji"];
|
||||||
|
serif = ["Noto Serif" "Noto Color Emoji"];
|
||||||
|
sansSerif = ["Overpass" "Nunito" "Noto Color Emoji"];
|
||||||
|
};
|
||||||
|
hinting = {
|
||||||
|
enable = true;
|
||||||
|
autohint = false;
|
||||||
|
style = "full";
|
||||||
|
};
|
||||||
|
subpixel = {
|
||||||
|
lcdfilter = "default";
|
||||||
|
rgba = "rgb";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
fontDir = {
|
||||||
|
enable = true;
|
||||||
|
decompressFonts = true;
|
||||||
|
};
|
||||||
|
packages = [
|
||||||
|
pkgs.noto-fonts
|
||||||
|
pkgs.noto-fonts-emoji
|
||||||
|
|
||||||
|
pkgs.material-design-icons
|
||||||
|
(pkgs.google-fonts.override {fonts = ["Overpass" "Nunito"];})
|
||||||
|
(pkgs.nerdfonts.override {fonts = ["NerdFontsSymbolsOnly"];})
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
3
modules/nixos/gui.nix
Normal file
3
modules/nixos/gui.nix
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
services.xserver.enable = true;
|
||||||
|
}
|
5
modules/nixos/i18n.nix
Normal file
5
modules/nixos/i18n.nix
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{}: {
|
||||||
|
time.timeZone = "America/Indiana/Indianapolis";
|
||||||
|
|
||||||
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
}
|
1
modules/nixos/id_user.pub
Normal file
1
modules/nixos/id_user.pub
Normal file
|
@ -0,0 +1 @@
|
||||||
|
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHq5h1BxfUVIJ4+v4aLG3wsZGig4R+6fb+1GGOSqqyQB hi@dessa.dev
|
7
modules/nixos/kanata.nix
Normal file
7
modules/nixos/kanata.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
environment.systemPackages = with pkgs; [kanata];
|
||||||
|
boot.kernelModules = ["uinput"];
|
||||||
|
services.udev.extraRules = ''
|
||||||
|
KERNEL=="uinput", SUBSYSTEM=="misc", TAG+="uaccess", OPTIONS+="static_node=uinput", GROUP="input", MODE="0660"
|
||||||
|
'';
|
||||||
|
}
|
11
modules/nixos/localnameresolution.nix
Normal file
11
modules/nixos/localnameresolution.nix
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
services.avahi = {
|
||||||
|
enable = true;
|
||||||
|
openFirewall = true;
|
||||||
|
};
|
||||||
|
system.nssModules = pkgs.lib.optional true pkgs.nssmdns;
|
||||||
|
system.nssDatabases.hosts = pkgs.lib.optionals true (pkgs.lib.mkMerge [
|
||||||
|
(pkgs.lib.mkBefore ["mdns4_minimal [NOTFOUND=return]"]) # before resolution
|
||||||
|
(pkgs.lib.mkAfter ["mdns4"]) # after dns
|
||||||
|
]);
|
||||||
|
}
|
50
modules/nixos/nvidia.nix
Normal file
50
modules/nixos/nvidia.nix
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
{config, ...}: {
|
||||||
|
#nvidia
|
||||||
|
hardware.opengl = {
|
||||||
|
enable = true;
|
||||||
|
driSupport32Bit = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.xserver.videoDrivers = ["nvidia"];
|
||||||
|
|
||||||
|
hardware.nvidia = {
|
||||||
|
# Modesetting is required.
|
||||||
|
modesetting.enable = true;
|
||||||
|
|
||||||
|
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
|
||||||
|
# Enable this if you have graphical corruption issues or application crashes after waking
|
||||||
|
# up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
|
||||||
|
# of just the bare essentials.
|
||||||
|
powerManagement.enable = false;
|
||||||
|
|
||||||
|
# Fine-grained power management. Turns off GPU when not in use.
|
||||||
|
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
|
||||||
|
powerManagement.finegrained = false;
|
||||||
|
|
||||||
|
# Use the NVidia open source kernel module (not to be confused with the
|
||||||
|
# independent third-party "nouveau" open source driver).
|
||||||
|
# Support is limited to the Turing and later architectures. Full list of
|
||||||
|
# supported GPUs is at:
|
||||||
|
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
|
||||||
|
# Only available from driver 515.43.04+
|
||||||
|
# Currently alpha-quality/buggy, so false is currently the recommended setting.
|
||||||
|
open = false;
|
||||||
|
|
||||||
|
# Enable the Nvidia settings menu,
|
||||||
|
# accessible via `nvidia-settings`.
|
||||||
|
nvidiaSettings = true;
|
||||||
|
|
||||||
|
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
||||||
|
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||||
|
|
||||||
|
prime = {
|
||||||
|
intelBusId = "PCI:0:2:0";
|
||||||
|
nvidiaBusId = "PCI:1:0:0";
|
||||||
|
|
||||||
|
offload = {
|
||||||
|
enable = true;
|
||||||
|
enableOffloadCmd = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
11
modules/nixos/services.nix
Normal file
11
modules/nixos/services.nix
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{...}: {
|
||||||
|
imports = [
|
||||||
|
./ssh.nix
|
||||||
|
./sound.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
services.gvfs.enable = true;
|
||||||
|
services.gnome.gnome-keyring.enable = true;
|
||||||
|
services.libinput.enable = true;
|
||||||
|
services.printing.enable = true;
|
||||||
|
}
|
15
modules/nixos/sound.nix
Normal file
15
modules/nixos/sound.nix
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{...}: {
|
||||||
|
services.pipewire = {
|
||||||
|
enable = true;
|
||||||
|
alsa.enable = true;
|
||||||
|
alsa.support32Bit = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
|
||||||
|
lowLatency = {
|
||||||
|
enable = true;
|
||||||
|
# defaults (USES nix-gaming PIPEWIRE LOW LATENCY MODULE!)
|
||||||
|
quantum = 64;
|
||||||
|
rate = 48000;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
12
modules/nixos/ssh.nix
Normal file
12
modules/nixos/ssh.nix
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{...}: {
|
||||||
|
services.openssh = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
KbdInteractiveAuthentication = false;
|
||||||
|
PermitRootLogin = "no";
|
||||||
|
PasswordAuthentication = true;
|
||||||
|
UseDns = true;
|
||||||
|
X11Forwarding = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
26
modules/nixos/syncthing.nix
Normal file
26
modules/nixos/syncthing.nix
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
{...}: {services.syncthing = {
|
||||||
|
enable = true;
|
||||||
|
user = "dv";
|
||||||
|
dataDir = "/dv";
|
||||||
|
configDir = "/dv/.config/syncthing";
|
||||||
|
overrideDevices = true;
|
||||||
|
overrideFolders = true;
|
||||||
|
settings = {
|
||||||
|
devices = {
|
||||||
|
"truenas" = {
|
||||||
|
id = "2HEHVRP-6Z4FBIB-MULQ6Y2-XP2IW6Q-WVOVKOR-HSJBZ3O-RUN7DZI-SAM2SAA";
|
||||||
|
autoAcceptFolders = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
folders = {
|
||||||
|
"Explicit Sync" = {
|
||||||
|
path = "/dv/sync";
|
||||||
|
devices = ["truenas"];
|
||||||
|
};
|
||||||
|
"zettelkasten" = {
|
||||||
|
path = "/dv/zet";
|
||||||
|
devices = ["truenas"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};}
|
31
modules/nixos/users.nix
Normal file
31
modules/nixos/users.nix
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
{pkgs,...}: {
|
||||||
|
users.users.dv = {
|
||||||
|
uid = 1337;
|
||||||
|
initialPassword = "iamsonaughty.";
|
||||||
|
shell = pkgs.zsh;
|
||||||
|
openssh.authorizedKeys.keys = [
|
||||||
|
(builtins.readFile ./id_user.pub)
|
||||||
|
];
|
||||||
|
isNormalUser = true;
|
||||||
|
extraGroups = [
|
||||||
|
"wheel"
|
||||||
|
"networkmanager"
|
||||||
|
"audio"
|
||||||
|
"docker"
|
||||||
|
"input"
|
||||||
|
"libvirtd"
|
||||||
|
"plugdev"
|
||||||
|
"video"
|
||||||
|
"adbusers"
|
||||||
|
"uinput"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
users.users.root = {
|
||||||
|
shell = pkgs.zsh;
|
||||||
|
extraGroups = [];
|
||||||
|
openssh.authorizedKeys.keys = [
|
||||||
|
(builtins.readFile ./id_user.pub)
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
5
modules/nixos/virtualisation.nix
Normal file
5
modules/nixos/virtualisation.nix
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{config, ...}: {
|
||||||
|
virtualisation.containers.cdi.dynamic.nvidia.enable = builtins.any (driver: driver == "nvidia") config.services.xserver.videoDrivers;
|
||||||
|
virtualisation.vmware.host.enable = true;
|
||||||
|
virtualisation.docker.enable = true;
|
||||||
|
}
|
16
modules/nixos/zsh.nix
Normal file
16
modules/nixos/zsh.nix
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
{
|
||||||
|
programs = {
|
||||||
|
less.enable = true;
|
||||||
|
|
||||||
|
# default zsh config if not configured using home-manager
|
||||||
|
zsh = {
|
||||||
|
enable = true;
|
||||||
|
enableCompletion = true;
|
||||||
|
autosuggestions.enable = true;
|
||||||
|
promptInit = ''
|
||||||
|
PS1='%B%1~%b %(#.#.$): '
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
environment.pathsToLink = ["/share/zsh"];
|
||||||
|
}
|
|
@ -1,22 +0,0 @@
|
||||||
mkdir /btrfs_tmp
|
|
||||||
mount /dev/root_vg/root /btrfs_tmp
|
|
||||||
if [[ -e /btrfs_tmp/root ]]; then
|
|
||||||
mkdir -p /btrfs_tmp/old_roots
|
|
||||||
timestamp=$(date --date="@$(stat -c %Y /btrfs_tmp/root)" "+%Y-%m-%-d_%H:%M:%S")
|
|
||||||
mv /btrfs_tmp/root /btrfs_tmp/old_roots/$timestamp
|
|
||||||
fi
|
|
||||||
|
|
||||||
delete_subvolume_recursively() {
|
|
||||||
IFS=$'\n'
|
|
||||||
for i in $(btrfs subvolume list -o "$1" | cut -f 9- -d ' '); do
|
|
||||||
delete_subvolume_recursively "/btrfs_tmp/$i"
|
|
||||||
done
|
|
||||||
btrfs subvolume delete "$1"
|
|
||||||
}
|
|
||||||
|
|
||||||
for i in $(find /btrfs_tmp/old_roots/ -maxdepth 1 -mtime +30); do
|
|
||||||
delete_subvolume_recursively "$i"
|
|
||||||
done
|
|
||||||
|
|
||||||
btrfs subvolume create /btrfs_tmp/root
|
|
||||||
umount /btrfs_tmp
|
|
|
@ -1,332 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
outputs,
|
|
||||||
inputs,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
secretspath = builtins.toString inputs.mysecrets;
|
|
||||||
in {
|
|
||||||
imports = [
|
|
||||||
inputs.nix-gaming.nixosModules.pipewireLowLatency
|
|
||||||
inputs.sops-nix.nixosModules.sops
|
|
||||||
];
|
|
||||||
|
|
||||||
sops.defaultSopsFormat = "yaml";
|
|
||||||
sops.defaultSopsFile = "${secretspath}/secrets.yaml";
|
|
||||||
sops.validateSopsFiles = false;
|
|
||||||
# sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
|
||||||
# sops.age.keyFile = "/var/lib/sops-nix/key.txt";
|
|
||||||
# sops.age.generateKey = true;
|
|
||||||
|
|
||||||
# This file below is the only file that needs to be copied over (for sops support)
|
|
||||||
sops.age.keyFile = "/etc/sops-keys.txt";
|
|
||||||
sops.secrets = {
|
|
||||||
id_deva = {
|
|
||||||
owner = config.users.users.me.name;
|
|
||||||
inherit (config.users.users.me) group;
|
|
||||||
path = "/home/${config.users.users.me.name}/.ssh/id_deva";
|
|
||||||
};
|
|
||||||
user_password = {
|
|
||||||
neededForUsers = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
home-manager.users.me.home.file.".ssh/id_deva.pub".text = builtins.readFile ./id_deva.pub;
|
|
||||||
users.mutableUsers = false;
|
|
||||||
users.users.me.hashedPasswordFile = config.sops.secrets.user_password.path;
|
|
||||||
|
|
||||||
nixpkgs.config = {
|
|
||||||
allowUnfree = true;
|
|
||||||
cudaSupport = true;
|
|
||||||
};
|
|
||||||
nixpkgs.overlays = [
|
|
||||||
outputs.overlays.additions
|
|
||||||
outputs.overlays.modifications
|
|
||||||
outputs.overlays.unstable-packages
|
|
||||||
];
|
|
||||||
|
|
||||||
virtualisation.docker = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
virtualisation.containers.cdi.dynamic.nvidia.enable = builtins.any (driver: driver == "nvidia") config.services.xserver.videoDrivers;
|
|
||||||
|
|
||||||
virtualisation.vmware.host.enable = true;
|
|
||||||
|
|
||||||
programs.seahorse.enable = true;
|
|
||||||
services.gnome.gnome-keyring.enable = true;
|
|
||||||
|
|
||||||
# security
|
|
||||||
security = {
|
|
||||||
sudo.wheelNeedsPassword = false; # don't ask password for wheel group, disk is encrypted with a secure password & ssh auth with password is disabled!
|
|
||||||
# enable trusted platform module 2 support
|
|
||||||
tpm2.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
unstable.neovim
|
|
||||||
fuse3
|
|
||||||
firefox
|
|
||||||
#jmtpfs
|
|
||||||
kanata
|
|
||||||
localsend
|
|
||||||
parsec-bin
|
|
||||||
];
|
|
||||||
|
|
||||||
services.gvfs.enable = true;
|
|
||||||
|
|
||||||
programs.adb.enable = true;
|
|
||||||
|
|
||||||
nix = let
|
|
||||||
flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs;
|
|
||||||
in {
|
|
||||||
settings = {
|
|
||||||
# Enable flakes and new 'nix' command
|
|
||||||
experimental-features = "nix-command flakes";
|
|
||||||
# Opinionated: disable global registry
|
|
||||||
flake-registry = "";
|
|
||||||
# Workaround for https://github.com/NixOS/nix/issues/9574
|
|
||||||
nix-path = config.nix.nixPath;
|
|
||||||
# allowUnfree = true;
|
|
||||||
auto-optimise-store = true;
|
|
||||||
builders-use-substitutes = true;
|
|
||||||
keep-derivations = true;
|
|
||||||
keep-outputs = true;
|
|
||||||
trusted-users = ["root" "@wheel"];
|
|
||||||
|
|
||||||
substituters = [
|
|
||||||
"https://cache.nixos.org"
|
|
||||||
"https://nix-community.cachix.org"
|
|
||||||
];
|
|
||||||
|
|
||||||
trusted-public-keys = [
|
|
||||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
|
||||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
|
||||||
];
|
|
||||||
};
|
|
||||||
# Opinionated: disable channels
|
|
||||||
channel.enable = false;
|
|
||||||
|
|
||||||
# Opinionated: make flake registry and nix path match flake inputs
|
|
||||||
registry = lib.mapAttrs (_: flake: {inherit flake;}) flakeInputs;
|
|
||||||
nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs;
|
|
||||||
};
|
|
||||||
|
|
||||||
services.openssh = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
KbdInteractiveAuthentication = false;
|
|
||||||
PermitRootLogin = "no";
|
|
||||||
PasswordAuthentication = false;
|
|
||||||
UseDns = true;
|
|
||||||
X11Forwarding = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
|
||||||
boot.kernelModules = ["uinput" "fuse"];
|
|
||||||
|
|
||||||
services.udev.extraRules = ''
|
|
||||||
KERNEL=="uinput", SUBSYSTEM=="misc", TAG+="uaccess", OPTIONS+="static_node=uinput", GROUP="input", MODE="0660"
|
|
||||||
'';
|
|
||||||
|
|
||||||
boot.initrd.postDeviceCommands = lib.mkAfter (builtins.readFile ./btrfs-impermanence);
|
|
||||||
|
|
||||||
fileSystems."/persist".neededForBoot = true;
|
|
||||||
environment.persistence."/persist/system" = {
|
|
||||||
hideMounts = true;
|
|
||||||
directories = [
|
|
||||||
"/etc/nixos"
|
|
||||||
"/var/log"
|
|
||||||
"/var/lib/bluetooth"
|
|
||||||
"/var/lib/nixos"
|
|
||||||
"/var/lib/systemd/coredump"
|
|
||||||
"/etc/NetworkManager/system-connections"
|
|
||||||
"/root/.local/share/zinit"
|
|
||||||
{
|
|
||||||
directory = "/var/lib/colord";
|
|
||||||
user = "colord";
|
|
||||||
group = "colord";
|
|
||||||
mode = "u=rwx,g=rx,o=";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
files = [
|
|
||||||
"/etc/machine-id"
|
|
||||||
"/etc/sops-keys.txt"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.networkmanager.enable = true;
|
|
||||||
time.timeZone = "America/Indiana/Indianapolis";
|
|
||||||
|
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
|
||||||
console = {
|
|
||||||
earlySetup = true;
|
|
||||||
font = "${pkgs.terminus_font}/share/consolefonts/ter-v32n.psf.gz";
|
|
||||||
keyMap = lib.mkForce "us";
|
|
||||||
useXkbConfig = true; # use xkb.options in tty.
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.pathsToLink = ["/share/zsh"];
|
|
||||||
|
|
||||||
programs = {
|
|
||||||
less.enable = true;
|
|
||||||
|
|
||||||
# default zsh config if not configured using home-manager
|
|
||||||
zsh = {
|
|
||||||
enable = true;
|
|
||||||
enableCompletion = true;
|
|
||||||
autosuggestions.enable = true;
|
|
||||||
promptInit = ''
|
|
||||||
PS1='%B%1~%b %(#.#.$): '
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
boot.supportedFilesystems = ["ntfs"];
|
|
||||||
|
|
||||||
hardware.pulseaudio.enable = false;
|
|
||||||
services.pipewire = {
|
|
||||||
enable = true;
|
|
||||||
alsa.enable = true;
|
|
||||||
alsa.support32Bit = true;
|
|
||||||
pulse.enable = true;
|
|
||||||
|
|
||||||
lowLatency = {
|
|
||||||
enable = true;
|
|
||||||
# defaults (USES nix-gaming PIPEWIRE LOW LATENCY MODULE!)
|
|
||||||
quantum = 64;
|
|
||||||
rate = 48000;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services.libinput.enable = true;
|
|
||||||
services.printing.enable = true;
|
|
||||||
|
|
||||||
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
|
||||||
system.stateVersion = "24.05";
|
|
||||||
|
|
||||||
fonts = {
|
|
||||||
enableDefaultPackages = false;
|
|
||||||
fontconfig = {
|
|
||||||
enable = true;
|
|
||||||
antialias = true;
|
|
||||||
defaultFonts = {
|
|
||||||
emoji = ["Noto Color Emoji"];
|
|
||||||
monospace = ["Cascadia Code" "Symbols Nerd Font" "Noto Color Emoji"];
|
|
||||||
serif = ["Noto Serif" "Noto Color Emoji"];
|
|
||||||
sansSerif = ["Overpass" "Nunito" "Noto Color Emoji"];
|
|
||||||
};
|
|
||||||
hinting = {
|
|
||||||
enable = true;
|
|
||||||
autohint = false;
|
|
||||||
style = "full";
|
|
||||||
};
|
|
||||||
subpixel = {
|
|
||||||
lcdfilter = "default";
|
|
||||||
rgba = "rgb";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
fontDir = {
|
|
||||||
enable = true;
|
|
||||||
decompressFonts = true;
|
|
||||||
};
|
|
||||||
packages = [
|
|
||||||
pkgs.noto-fonts
|
|
||||||
pkgs.noto-fonts-emoji
|
|
||||||
|
|
||||||
pkgs.material-design-icons
|
|
||||||
(pkgs.google-fonts.override {fonts = ["Overpass" "Nunito"];})
|
|
||||||
(pkgs.nerdfonts.override {fonts = ["NerdFontsSymbolsOnly"];})
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
#nvidia
|
|
||||||
hardware.opengl = {
|
|
||||||
enable = true;
|
|
||||||
driSupport32Bit = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
services.xserver.videoDrivers = ["nvidia"];
|
|
||||||
|
|
||||||
hardware.nvidia = {
|
|
||||||
# Modesetting is required.
|
|
||||||
modesetting.enable = true;
|
|
||||||
|
|
||||||
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
|
|
||||||
# Enable this if you have graphical corruption issues or application crashes after waking
|
|
||||||
# up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
|
|
||||||
# of just the bare essentials.
|
|
||||||
powerManagement.enable = false;
|
|
||||||
|
|
||||||
# Fine-grained power management. Turns off GPU when not in use.
|
|
||||||
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
|
|
||||||
powerManagement.finegrained = false;
|
|
||||||
|
|
||||||
# Use the NVidia open source kernel module (not to be confused with the
|
|
||||||
# independent third-party "nouveau" open source driver).
|
|
||||||
# Support is limited to the Turing and later architectures. Full list of
|
|
||||||
# supported GPUs is at:
|
|
||||||
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
|
|
||||||
# Only available from driver 515.43.04+
|
|
||||||
# Currently alpha-quality/buggy, so false is currently the recommended setting.
|
|
||||||
open = false;
|
|
||||||
|
|
||||||
# Enable the Nvidia settings menu,
|
|
||||||
# accessible via `nvidia-settings`.
|
|
||||||
nvidiaSettings = true;
|
|
||||||
|
|
||||||
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
|
||||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
|
||||||
|
|
||||||
prime = {
|
|
||||||
intelBusId = "PCI:0:2:0";
|
|
||||||
nvidiaBusId = "PCI:1:0:0";
|
|
||||||
|
|
||||||
offload = {
|
|
||||||
enable = true;
|
|
||||||
enableOffloadCmd = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# local name resolution???
|
|
||||||
services.avahi = {
|
|
||||||
enable = true;
|
|
||||||
openFirewall = true;
|
|
||||||
};
|
|
||||||
system.nssModules = pkgs.lib.optional true pkgs.nssmdns;
|
|
||||||
system.nssDatabases.hosts = pkgs.lib.optionals true (pkgs.lib.mkMerge [
|
|
||||||
(pkgs.lib.mkBefore ["mdns4_minimal [NOTFOUND=return]"]) # before resolution
|
|
||||||
(pkgs.lib.mkAfter ["mdns4"]) # after dns
|
|
||||||
]);
|
|
||||||
|
|
||||||
services.syncthing = {
|
|
||||||
enable = true;
|
|
||||||
user = "deva";
|
|
||||||
dataDir = "/home/deva";
|
|
||||||
configDir = "/home/deva/.config/syncthing";
|
|
||||||
overrideDevices = true;
|
|
||||||
overrideFolders = true;
|
|
||||||
settings = {
|
|
||||||
devices = {
|
|
||||||
"truenas" = {
|
|
||||||
id = "2HEHVRP-6Z4FBIB-MULQ6Y2-XP2IW6Q-WVOVKOR-HSJBZ3O-RUN7DZI-SAM2SAA";
|
|
||||||
autoAcceptFolders = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
folders = {
|
|
||||||
"Explicit Sync" = {
|
|
||||||
path = "/home/deva/sync";
|
|
||||||
devices = ["truenas"];
|
|
||||||
};
|
|
||||||
"zettelkasten" = {
|
|
||||||
path = "/home/deva/zet";
|
|
||||||
devices = ["truenas"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,26 +0,0 @@
|
||||||
{
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
home.packages = [
|
|
||||||
pkgs.noto-fonts
|
|
||||||
pkgs.noto-fonts-emoji
|
|
||||||
|
|
||||||
pkgs.material-design-icons
|
|
||||||
(pkgs.google-fonts.override {fonts = ["Overpass" "Nunito"];})
|
|
||||||
(pkgs.nerdfonts.override {fonts = ["NerdFontsSymbolsOnly"];})
|
|
||||||
];
|
|
||||||
|
|
||||||
home.pointerCursor = {
|
|
||||||
package = pkgs.graphite-cursors;
|
|
||||||
name = "graphite-dark";
|
|
||||||
size = 24;
|
|
||||||
gtk.enable = true;
|
|
||||||
x11.enable = true;
|
|
||||||
};
|
|
||||||
home.sessionVariables = {
|
|
||||||
XCURSOR_SIZE = config.home.pointerCursor.size;
|
|
||||||
XCURSOR_THEME = config.home.pointerCursor.name;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,127 +0,0 @@
|
||||||
{
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
dconf = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
settings = {
|
|
||||||
"org/gnome/shell" = {
|
|
||||||
disable-user-extensions = false;
|
|
||||||
|
|
||||||
enabled-extensions = [
|
|
||||||
# "user-theme@gnome-shell-extensions.gcampax.github.com"
|
|
||||||
"unite@hardpixel.eu"
|
|
||||||
"zen@le0.gs"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
# "org/gnome/shell/extensions/user-theme" = {
|
|
||||||
# name = "Materia-dark";
|
|
||||||
# };
|
|
||||||
|
|
||||||
"org/gnome/shell/extensions/unite" = {
|
|
||||||
desktop-name-text = "Desktop";
|
|
||||||
greyscale-tray-icons = true;
|
|
||||||
hide-activities-button = "always";
|
|
||||||
hide-window-titlebars = "always";
|
|
||||||
show-window-buttons = "always";
|
|
||||||
show-window-title = "tiled";
|
|
||||||
window-buttons-placement = "first";
|
|
||||||
window-buttons-theme = "arc";
|
|
||||||
};
|
|
||||||
|
|
||||||
# "org/gnome/desktop/interface" = {
|
|
||||||
# color-scheme = "prefer-dark";
|
|
||||||
# };
|
|
||||||
|
|
||||||
"org/gnome/desktop/wm/preferences" = {
|
|
||||||
resize-with-right-button = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = {
|
|
||||||
binding = "<Super>Return";
|
|
||||||
command = "wezterm";
|
|
||||||
name = "Open Terminal";
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/settings-daemon/plugins/media-keys" = {
|
|
||||||
custom-keybindings = [
|
|
||||||
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
# "org/gnome/desktop/background" = {
|
|
||||||
# picture-uri = "file:///${./wallpaper.jpg}";
|
|
||||||
# picture-uri-dark = "file:///${./nix-wallpaper.png}";
|
|
||||||
# };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
# Gnome extensions
|
|
||||||
gnomeExtensions.unite
|
|
||||||
gnomeExtensions.user-themes
|
|
||||||
gnomeExtensions.zen
|
|
||||||
|
|
||||||
# Theme
|
|
||||||
materia-theme
|
|
||||||
];
|
|
||||||
dconf.settings."org/gnome/desktop/interface".font-name = pkgs.lib.mkForce "Cascadia Code NF 12";
|
|
||||||
gtk = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
# font = pkgs.lib.mkForce {
|
|
||||||
# name = "Cascadia Code NF";
|
|
||||||
# size = 12;
|
|
||||||
# };
|
|
||||||
|
|
||||||
iconTheme = {
|
|
||||||
name = "Zafiro-icons-Dark";
|
|
||||||
package = pkgs.zafiro-icons;
|
|
||||||
};
|
|
||||||
|
|
||||||
# theme = {
|
|
||||||
# name = "Materia-dark";
|
|
||||||
# package = pkgs.lib.mkForce pkgs.materia-theme;
|
|
||||||
# };
|
|
||||||
|
|
||||||
gtk2 = {
|
|
||||||
configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
|
|
||||||
extraConfig = ''
|
|
||||||
gtk-xft-antialias=1
|
|
||||||
gtk-xft-hinting=1
|
|
||||||
gtk-xft-hintstyle="hintfull"
|
|
||||||
gtk-xft-rgba="rgb"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
gtk3 = {
|
|
||||||
bookmarks = [
|
|
||||||
"file://${config.home.homeDirectory}/Documents"
|
|
||||||
"file://${config.home.homeDirectory}/Downloads"
|
|
||||||
"file://${config.home.homeDirectory}/Music"
|
|
||||||
"file://${config.home.homeDirectory}/Pictures"
|
|
||||||
"file://${config.home.homeDirectory}/Videos"
|
|
||||||
];
|
|
||||||
|
|
||||||
extraConfig = {
|
|
||||||
gtk-application-prefer-dark-theme = 1;
|
|
||||||
|
|
||||||
gtk-xft-antialias = 1;
|
|
||||||
gtk-xft-hinting = 1;
|
|
||||||
gtk-xft-hintstyle = "hintfull";
|
|
||||||
gtk-xft-rgba = "rgb";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
gtk4.extraConfig.gtk-application-prefer-dark-theme = 1;
|
|
||||||
};
|
|
||||||
|
|
||||||
home = {
|
|
||||||
sessionVariables = {
|
|
||||||
GTK_THEME = config.gtk.theme.name;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
Binary file not shown.
Before Width: | Height: | Size: 3.1 MiB |
Binary file not shown.
Before Width: | Height: | Size: 2.1 MiB |
|
@ -1,285 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
wantgunsbin_script = pkgs.writeShellScriptBin "pst" ''
|
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
URL="https://pastebin.dessa.dev"
|
|
||||||
|
|
||||||
FILEPATH="$1"
|
|
||||||
FILENAME=$(basename -- "$FILEPATH")
|
|
||||||
EXTENSION="''${FILENAME##*.}"
|
|
||||||
|
|
||||||
if [ ! -f $FILEPATH ]; then
|
|
||||||
# curl the file from the internet, given the id
|
|
||||||
# future regex for any wantsgunbin link: ^((http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b\/)?[0-9a-zA-Z]{5,}(\..*)?$
|
|
||||||
if [[ $FILEPATH =~ ^(https:\/\/pastebin\.dessa\.dev\/)?[0-9a-zA-Z]{5,}(\..*)?$ ]]; then
|
|
||||||
OUT=$(mktemp)
|
|
||||||
echo $OUT
|
|
||||||
curl -sL https://pastebin.dessa.dev/$FILEPATH > $OUT
|
|
||||||
exit 0
|
|
||||||
else
|
|
||||||
echo "File not found: $FILEPATH"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
RESPONSE=$(curl --data-binary @''${FILEPATH:-/dev/stdin} --url $URL)
|
|
||||||
PASTELINK="$URL$RESPONSE"
|
|
||||||
|
|
||||||
[ -z "$EXTENSION" ] && echo $PASTELINK || echo $PASTELINK.$EXTENSION
|
|
||||||
'';
|
|
||||||
in {
|
|
||||||
programs.zsh.shellAliases = {
|
|
||||||
pst = "${wantgunsbin_script}/bin/pst";
|
|
||||||
};
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
unstable.bruno
|
|
||||||
unstable.xclip
|
|
||||||
unstable.just
|
|
||||||
unstable.nil
|
|
||||||
unstable.alejandra
|
|
||||||
unstable.zoxide
|
|
||||||
unstable.neovide
|
|
||||||
unstable.nodejs
|
|
||||||
unstable.corepack
|
|
||||||
unstable.cargo-watch
|
|
||||||
unstable.rustup
|
|
||||||
unstable.go
|
|
||||||
# unstable.
|
|
||||||
unstable.jetbrains.idea-community
|
|
||||||
#unstable.vscode-fhs
|
|
||||||
unstable.cascadia-code
|
|
||||||
unstable.jdk17
|
|
||||||
unstable.ncdu
|
|
||||||
unstable.httpie
|
|
||||||
zed-fhs
|
|
||||||
];
|
|
||||||
|
|
||||||
programs = {
|
|
||||||
wezterm = {
|
|
||||||
enable = true;
|
|
||||||
extraConfig = builtins.readFile ./wezterm.lua;
|
|
||||||
colorSchemes = {
|
|
||||||
oxocarbon-dark = builtins.fromTOML (builtins.readFile (pkgs.fetchFromGitHub {
|
|
||||||
owner = "nyoom-engineering";
|
|
||||||
repo = "oxocarbon-wezterm";
|
|
||||||
rev = "b435c308403816db6fec6b87370223e8e8fbb6f4";
|
|
||||||
hash = "sha256-KsAoWQVWBHbmimw3Z9kj9j1wnFdLquzi64WP5mEjRzo=";
|
|
||||||
}
|
|
||||||
+ "/oxocarbon-dark.toml"));
|
|
||||||
};
|
|
||||||
};
|
|
||||||
lf = {
|
|
||||||
enable = true;
|
|
||||||
commands = {
|
|
||||||
dragon-out = ''%${pkgs.xdragon}/bin/xdragon -a -x "$fx"'';
|
|
||||||
editor-open = ''$$EDITOR $f'';
|
|
||||||
mkdir = ''
|
|
||||||
''${{
|
|
||||||
printf "Directory Name: "
|
|
||||||
read DIR
|
|
||||||
mkdir $DIR
|
|
||||||
}}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
keybindings = {
|
|
||||||
"\\\"" = "";
|
|
||||||
o = "";
|
|
||||||
c = "mkdir";
|
|
||||||
D = ''$rm -fr "$fx"'';
|
|
||||||
"." = "set hidden!";
|
|
||||||
"`" = "mark-load";
|
|
||||||
"\\'" = "mark-load";
|
|
||||||
"<enter>" = "open";
|
|
||||||
do = "dragon-out";
|
|
||||||
"g~" = "cd";
|
|
||||||
gh = "cd";
|
|
||||||
"g/" = "/";
|
|
||||||
ee = "editor-open";
|
|
||||||
V = ''''$${pkgs.bat}/bin/bat --paging=always --theme=gruvbox "$f"'';
|
|
||||||
};
|
|
||||||
settings = {
|
|
||||||
preview = true;
|
|
||||||
hidden = true;
|
|
||||||
drawbox = true;
|
|
||||||
icons = true;
|
|
||||||
ignorecase = true;
|
|
||||||
};
|
|
||||||
extraConfig = let
|
|
||||||
previewer = pkgs.writeShellScriptBin "pv.sh" ''
|
|
||||||
file=$1
|
|
||||||
w=$2
|
|
||||||
h=$3
|
|
||||||
x=$4
|
|
||||||
y=$5
|
|
||||||
|
|
||||||
if [[ "$( ${pkgs.file}/bin/file -Lb --mime-type "$file")" =~ ^image ]]; then
|
|
||||||
# ${pkgs.kitty}/bin/kitty +kitten icat --silent --stdin no --transfer-mode file --place "''${w}x''${h}@''${x}x''${y}" "$file" < /dev/null > /dev/tty
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
${pkgs.pistol}/bin/pistol "$file"
|
|
||||||
'';
|
|
||||||
cleaner = pkgs.writeShellScriptBin "clean.sh" ''
|
|
||||||
# ${pkgs.kitty}/bin/kitty +kitten icat --clear --stdin no --silent --transfer-mode file < /dev/null > /dev/tty
|
|
||||||
'';
|
|
||||||
in ''
|
|
||||||
set cleaner ${cleaner}/bin/clean.sh
|
|
||||||
set previewer ${previewer}/bin/pv.sh
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
ssh = {
|
|
||||||
enable = true;
|
|
||||||
matchBlocks = {
|
|
||||||
"hi@dessa.dev" = {
|
|
||||||
host = "gitlab.com github.com 192.168.1.203";
|
|
||||||
identitiesOnly = true;
|
|
||||||
identityFile = [
|
|
||||||
"~/.ssh/id_deva"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
gpg = {
|
|
||||||
enable = true;
|
|
||||||
homedir = "${config.home.homeDirectory}/.gnupg";
|
|
||||||
settings = {
|
|
||||||
use-agent = true;
|
|
||||||
default-key = "CC10324DD962CB7E";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
git = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.gitAndTools.gitFull;
|
|
||||||
lfs.enable = true;
|
|
||||||
|
|
||||||
userName = "deva";
|
|
||||||
userEmail = "hi@dessa.dev";
|
|
||||||
signing = {
|
|
||||||
key = "CC10324DD962CB7E";
|
|
||||||
signByDefault = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
aliases = {
|
|
||||||
wta = "worktree add";
|
|
||||||
wtl = "worktree list";
|
|
||||||
wtr = "worktree remove";
|
|
||||||
rh = "reset HEAD"; # unstages all changes
|
|
||||||
lg = "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --";
|
|
||||||
lgb = "--no-pager log --oneline --decorate --graph --parents --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --";
|
|
||||||
nuke = "!git clean -xdf && git reset --hard && git pull";
|
|
||||||
st = "status -sb";
|
|
||||||
sync = "!git push && git pull";
|
|
||||||
rs = "restore --staged";
|
|
||||||
ll = "log --oneline";
|
|
||||||
last = "log -1 HEAD --stat";
|
|
||||||
cm = "commit -m";
|
|
||||||
co = "checkout";
|
|
||||||
rv = "remote -v";
|
|
||||||
df = "diff HEAD";
|
|
||||||
};
|
|
||||||
|
|
||||||
extraConfig = {
|
|
||||||
init.defaultBranch = "main";
|
|
||||||
branch.autosetupmerge = "true";
|
|
||||||
push.default = "current";
|
|
||||||
merge.stat = "true";
|
|
||||||
core.whitespace = "fix,-indent-with-non-tab,trailing-space,cr-at-eol";
|
|
||||||
repack.usedeltabaseoffset = "true";
|
|
||||||
pull.ff = "only";
|
|
||||||
rebase = {
|
|
||||||
autoSquash = true;
|
|
||||||
autoStash = true;
|
|
||||||
};
|
|
||||||
rerere = {
|
|
||||||
enabled = true;
|
|
||||||
autoupdate = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
ignores = [
|
|
||||||
"*~"
|
|
||||||
"*.swp"
|
|
||||||
"*result*"
|
|
||||||
"todo.md"
|
|
||||||
"node_modules"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
gh = {
|
|
||||||
enable = true;
|
|
||||||
extensions = [
|
|
||||||
pkgs.gh-copilot
|
|
||||||
];
|
|
||||||
gitCredentialHelper.enable = true;
|
|
||||||
settings = {
|
|
||||||
editor = "nvim";
|
|
||||||
git_protocol = "ssh";
|
|
||||||
aliases = {
|
|
||||||
co = "pr checkout";
|
|
||||||
rc = "repo clone";
|
|
||||||
cp = "copilot";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
tmux = {
|
|
||||||
enable = true;
|
|
||||||
mouse = true;
|
|
||||||
prefix = "C-Space";
|
|
||||||
keyMode = "vi";
|
|
||||||
baseIndex = 1;
|
|
||||||
plugins = with pkgs.tmuxPlugins; [
|
|
||||||
vim-tmux-navigator
|
|
||||||
yank
|
|
||||||
{
|
|
||||||
plugin = tokyo-night-tmux;
|
|
||||||
extraConfig = ''
|
|
||||||
set -g @tokyo-night-tmux_show_datetime 0
|
|
||||||
set -g @tokyo-night-tmux_show_path 1
|
|
||||||
set -g @tokyo-night-tmux_path_format relative
|
|
||||||
set -g @tokyo-night-tmux_window_id_style dsquare
|
|
||||||
set -g @tokyo-night-tmux_window_id_style dsquare
|
|
||||||
set -g @tokyo-night-tmux_show_git 0
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
];
|
|
||||||
extraConfig = ''
|
|
||||||
set-option -sa terminal-overrides ",xterm*:Tc"
|
|
||||||
set-window-option -g pane-base-index 1
|
|
||||||
set-option -g renumber-windows on
|
|
||||||
|
|
||||||
# Use Alt-arrow keys without prefix key to switch panes
|
|
||||||
bind -n M-Left select-pane -L
|
|
||||||
bind -n M-Right select-pane -R
|
|
||||||
bind -n M-Up select-pane -U
|
|
||||||
bind -n M-Down select-pane -D
|
|
||||||
|
|
||||||
# Shift arrow to switch windows
|
|
||||||
bind -n S-Left previous-window
|
|
||||||
bind -n S-Right next-window
|
|
||||||
|
|
||||||
# Shift Alt vim keys to switch windows
|
|
||||||
bind -n M-H previous-window
|
|
||||||
bind -n M-L next-window
|
|
||||||
|
|
||||||
bind-key -T copy-mode-vi v send-keys -X begin-selection
|
|
||||||
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
|
|
||||||
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
|
|
||||||
|
|
||||||
bind '_' split-window -v -c "#{pane_current_path}"
|
|
||||||
bind | split-window -h -c "#{pane_current_path}"
|
|
||||||
bind c new-window -c "#{pane_current_path}"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
xdg.configFile."lf/icons".source = ./lf-icons;
|
|
||||||
services.gpg-agent = {
|
|
||||||
enable = true;
|
|
||||||
enableSshSupport = true;
|
|
||||||
pinentryPackage = pkgs.pinentry-gnome3;
|
|
||||||
};
|
|
||||||
home.sessionVariables = {
|
|
||||||
SSH_AUTH_SOCK = "$XDG_RUNTIME_DIR/keyring/ssh";
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,26 +0,0 @@
|
||||||
local wezterm = require 'wezterm'
|
|
||||||
|
|
||||||
local config = wezterm.config_builder()
|
|
||||||
|
|
||||||
config.color_scheme = 'GruvboxDarkHard'
|
|
||||||
config.use_fancy_tab_bar = false
|
|
||||||
config.window_decorations = "RESIZE"
|
|
||||||
config.hide_tab_bar_if_only_one_tab = true
|
|
||||||
config.font = wezterm.font "Cascadia Code NF"
|
|
||||||
|
|
||||||
config.set_environment_variables = {
|
|
||||||
TERM = "xterm-256color",
|
|
||||||
EDITOR = "nvim",
|
|
||||||
VISUAL = "code --wait",
|
|
||||||
}
|
|
||||||
|
|
||||||
config.window_padding = {
|
|
||||||
left = 7,
|
|
||||||
right = 7,
|
|
||||||
top = 0,
|
|
||||||
bottom = 0,
|
|
||||||
}
|
|
||||||
|
|
||||||
config.default_cursor_style = 'SteadyBar'
|
|
||||||
|
|
||||||
return config
|
|
|
@ -1,5 +0,0 @@
|
||||||
{
|
|
||||||
services.xserver.displayManager.gdm.enable = true;
|
|
||||||
services.xserver.desktopManager.gnome.enable = true;
|
|
||||||
services.xserver.enable = true;
|
|
||||||
}
|
|
|
@ -1 +0,0 @@
|
||||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPVwUob8DTgkccFqWNU2XJEf3xlFPOKef+43+56W5UGj hi@dessa.dev
|
|
|
@ -1,112 +0,0 @@
|
||||||
{
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
programs.bat.enable = true;
|
|
||||||
programs.eza.enable = true;
|
|
||||||
programs.man.enable = true;
|
|
||||||
|
|
||||||
programs.wezterm.enableBashIntegration = true;
|
|
||||||
programs.fzf = {
|
|
||||||
enable = true;
|
|
||||||
enableBashIntegration = true;
|
|
||||||
};
|
|
||||||
services.gpg-agent.enableBashIntegration = true;
|
|
||||||
programs.bash = {
|
|
||||||
enable = true;
|
|
||||||
enableCompletion = true;
|
|
||||||
# historyControl = ["erasedups" "ignorespace" "ignoredups" "ignoreboth"]
|
|
||||||
historyFile = "${config.home.homeDirectory}/.histfile";
|
|
||||||
historyFileSize = 100000000;
|
|
||||||
shellOptions = [
|
|
||||||
"APPEND_HISTORY" # Append to histfile instead of overwriting.
|
|
||||||
"SHARE_HISTORY" # Share history between all sessions.
|
|
||||||
"HIST_IGNORE_SPACE" # Do not record an event starting with a space.
|
|
||||||
"HIST_IGNORE_ALL_DUPS" # Delete an old recorded event if a new event is a duplicate.
|
|
||||||
"HIST_SAVE_NO_DUPS" # Do not write a duplicate event to the history file.
|
|
||||||
"HIST_IGNORE_DUPS" # Do not record an event that was just recorded again.
|
|
||||||
"HIST_FIND_NO_DUPS" # Do not display a previously found event.
|
|
||||||
"EXTENDED_HISTORY" # Write the history file in the ':start:elapsed;command' format.
|
|
||||||
"HIST_EXPIRE_DUPS_FIRST" # Expire a duplicate event first when trimming history.
|
|
||||||
|
|
||||||
"ALWAYS_TO_END"
|
|
||||||
"ALWAYS_TO_END"
|
|
||||||
"AUTO_LIST"
|
|
||||||
"AUTO_MENU"
|
|
||||||
"AUTO_PARAM_SLASH"
|
|
||||||
"AUTO_PUSHD"
|
|
||||||
"ALWAYS_TO_END"
|
|
||||||
"COMPLETE_IN_WORD"
|
|
||||||
"EXTENDED_GLOB"
|
|
||||||
"INC_APPEND_HISTORY"
|
|
||||||
"INTERACTIVE_COMMENTS"
|
|
||||||
"MENU_COMPLETE"
|
|
||||||
"NO_BEEP"
|
|
||||||
"NOTIFY"
|
|
||||||
"PATH_DIRS"
|
|
||||||
"PUSHD_IGNORE_DUPS"
|
|
||||||
"PUSHD_SILENT"
|
|
||||||
|
|
||||||
"-CASE_GLOB"
|
|
||||||
"-CORRECT"
|
|
||||||
"-EQUALS"
|
|
||||||
"-FLOWCONTROL"
|
|
||||||
"-NOMATCH"
|
|
||||||
];
|
|
||||||
initExtra = ''
|
|
||||||
eval "$(${pkgs.zoxide}/bin/zoxide init --cmd cd bash)"
|
|
||||||
eval "$(${pkgs.oh-my-posh}/bin/oh-my-posh init bash --config ${./prompt-zen.toml})"
|
|
||||||
|
|
||||||
hash -d "dl"="$HOME/Downloads"
|
|
||||||
hash -d "docs"="$HOME/Documents"
|
|
||||||
hash -d "src"="$HOME/src"
|
|
||||||
hash -d "dots"="$HOME/nix"
|
|
||||||
hash -d "nix"="$HOME/nix"
|
|
||||||
hash -d "pics"="$HOME/Pictures"
|
|
||||||
hash -d "vids"="$HOME/Videos"
|
|
||||||
'';
|
|
||||||
sessionVariables = {
|
|
||||||
SAVEHIST = 1000000000;
|
|
||||||
HISTDUP = "erase";
|
|
||||||
DIRENV_LOG_FORMAT = "";
|
|
||||||
LC_ALL = "en_US.UTF-8";
|
|
||||||
KEYTIMEOUT = 1;
|
|
||||||
GPG_TTY = "$(tty)";
|
|
||||||
PATH = "$PATH:$HOME/bin";
|
|
||||||
};
|
|
||||||
shellAliases = {
|
|
||||||
run = "nix-shell --command 'zsh' -p";
|
|
||||||
nsh = "nix-shell --command 'zsh'";
|
|
||||||
nd = "nix develop";
|
|
||||||
g = "git";
|
|
||||||
gs = "git st";
|
|
||||||
gst = "git st";
|
|
||||||
src = "cd $HOME/dev";
|
|
||||||
sv0 = "ssh -l root proxmox";
|
|
||||||
nmcs = "ssh -l kd nmcs";
|
|
||||||
pn = "pnpm";
|
|
||||||
rm = "rm -rf";
|
|
||||||
cp = "cp -ri";
|
|
||||||
mkdir = "mkdir -p";
|
|
||||||
free = "free -m";
|
|
||||||
j = "just";
|
|
||||||
ed = "code";
|
|
||||||
n = "nvim";
|
|
||||||
cdr = "cd \$(git rev-parse --show-toplevel)";
|
|
||||||
l = "eza -al --no-time --group-directories-first";
|
|
||||||
ls = "eza -al --no-time --group-directories-first";
|
|
||||||
la = "eza -a";
|
|
||||||
ll = "eza -l --no-time --group-directories-first";
|
|
||||||
lt = "eza -aT --no-time --group-directories-first";
|
|
||||||
cat = "bat --theme gruvbox-dark --style numbers,changes --color=always --tabs=2 --wrap=never";
|
|
||||||
diff = "delta";
|
|
||||||
top = "btm";
|
|
||||||
c = "clear";
|
|
||||||
glg = "git lg";
|
|
||||||
ghr = "gh repo";
|
|
||||||
serve = "python3 -m http.server";
|
|
||||||
ytmp3 = "yt-dlp --ignore-errors --format bestaudio --extract-audio --audio-format mp3 --audio-quality 0 --embed-thumbnail --embed-metadata --output '%(title)s.%(ext)s'";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,70 +0,0 @@
|
||||||
#:schema https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json
|
|
||||||
|
|
||||||
version = 2
|
|
||||||
final_space = true
|
|
||||||
console_title_template = '{{if .Root}}(Admin){{end}} {{ .PWD }}'
|
|
||||||
|
|
||||||
[[blocks]]
|
|
||||||
type = 'prompt'
|
|
||||||
alignment = 'left'
|
|
||||||
|
|
||||||
# [[blocks.segments]]
|
|
||||||
# type = 'session'
|
|
||||||
# style = 'plain'
|
|
||||||
# foreground = '#BF616A'
|
|
||||||
# template = '{{ .UserName }} '
|
|
||||||
|
|
||||||
[[blocks.segments]]
|
|
||||||
type = 'text'
|
|
||||||
style = 'plain'
|
|
||||||
foreground = 'blue'
|
|
||||||
background = 'transparent'
|
|
||||||
template = '➜ '
|
|
||||||
|
|
||||||
[[blocks.segments]]
|
|
||||||
type = 'path'
|
|
||||||
style = 'plain'
|
|
||||||
foreground = '#81A1C1'
|
|
||||||
background = 'transparent'
|
|
||||||
template = '{{ path .Path .Location }} '
|
|
||||||
|
|
||||||
[blocks.segments.properties]
|
|
||||||
style = 'full'
|
|
||||||
|
|
||||||
[[blocks.segments]]
|
|
||||||
type = 'git'
|
|
||||||
style = 'plain'
|
|
||||||
foreground = 'p:grey'
|
|
||||||
background = 'transparent'
|
|
||||||
template = '{{ .HEAD }}{{if or (.Working.Changed) (.Staging.Changed)}}*{{end}}{{if gt .Behind 0}}⇣{{end}}{{if gt .Ahead 0}}⇡{{end}} '
|
|
||||||
|
|
||||||
[blocks.segments.properties]
|
|
||||||
branch_icon = ''
|
|
||||||
commit_icon = '@'
|
|
||||||
fetch_status = true
|
|
||||||
|
|
||||||
[[blocks.segments]]
|
|
||||||
type = 'text'
|
|
||||||
style = 'plain'
|
|
||||||
foreground = 'green'
|
|
||||||
foreground_templates = [
|
|
||||||
"{{if gt .Code 0}}red{{end}}"
|
|
||||||
]
|
|
||||||
background = 'transparent'
|
|
||||||
template = '{{if eq .UserName "root" }}#{{else}}🞂{{end}}'
|
|
||||||
|
|
||||||
[transient_prompt]
|
|
||||||
foreground_templates = [
|
|
||||||
"{{if gt .Code 0}}red{{end}}"
|
|
||||||
]
|
|
||||||
foreground = 'green'
|
|
||||||
background= 'transparent'
|
|
||||||
template = '~ '
|
|
||||||
|
|
||||||
[secondary_prompt]
|
|
||||||
foreground = '#3c3c3c'
|
|
||||||
background = 'transparent'
|
|
||||||
template = '~> '
|
|
||||||
|
|
||||||
[pallete]
|
|
||||||
grey = '#6c6c6c'
|
|
167
os/shell/zshrc
167
os/shell/zshrc
|
@ -1,167 +0,0 @@
|
||||||
# Created by newuser for 5.9
|
|
||||||
HISTFILE=~/.histfile
|
|
||||||
HISTSIZE=100000000
|
|
||||||
SAVEHIST=1000000000
|
|
||||||
HISTDUP=erase
|
|
||||||
|
|
||||||
setopt APPEND_HISTORY # Append to histfile instead of overwriting.
|
|
||||||
setopt SHARE_HISTORY # Share history between all sessions.
|
|
||||||
setopt HIST_IGNORE_SPACE # Do not record an event starting with a space.
|
|
||||||
setopt HIST_IGNORE_ALL_DUPS # Delete an old recorded event if a new event is a duplicate.
|
|
||||||
setopt HIST_SAVE_NO_DUPS # Do not write a duplicate event to the history file.
|
|
||||||
setopt HIST_IGNORE_DUPS # Do not record an event that was just recorded again.
|
|
||||||
setopt HIST_FIND_NO_DUPS # Do not display a previously found event.
|
|
||||||
setopt EXTENDED_HISTORY # Write the history file in the ':start:elapsed;command' format.
|
|
||||||
setopt HIST_EXPIRE_DUPS_FIRST # Expire a duplicate event first when trimming history.
|
|
||||||
|
|
||||||
# Set the directory we want to store zinit (and plugins) in
|
|
||||||
# The XDG_DATA_HOME:-$HOME... line chooses XDG_DATA_HOME if it exists, otherwise .local/share
|
|
||||||
ZINIT_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/zinit.git"
|
|
||||||
|
|
||||||
# download zinit if it doesn't exist
|
|
||||||
if [ ! -d "$ZINIT_HOME" ]; then
|
|
||||||
mkdir -p "$(dirname $ZINIT_HOME)"
|
|
||||||
git clone https://github.com/zdharma-continuum/zinit.git "$ZINIT_HOME"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# load zinit
|
|
||||||
source "${ZINIT_HOME}/zinit.zsh"
|
|
||||||
|
|
||||||
#region plugins
|
|
||||||
zinit light zsh-users/zsh-completions
|
|
||||||
autoload -U compinit && compinit
|
|
||||||
eval "$(fzf --zsh)"
|
|
||||||
zinit light Aloxaf/fzf-tab
|
|
||||||
zinit light zsh-users/zsh-syntax-highlighting
|
|
||||||
zinit light zsh-users/zsh-autosuggestions
|
|
||||||
|
|
||||||
# snippets
|
|
||||||
zinit snippet OMZP::git
|
|
||||||
zinit snippet OMZP::sudo
|
|
||||||
zinit snippet OMZP::debian
|
|
||||||
zinit snippet OMZP::command-not-found
|
|
||||||
zinit snippet OMZP::extract
|
|
||||||
|
|
||||||
zinit cdreplay -q
|
|
||||||
eval "$(zoxide init --cmd cd zsh)"
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region setopts
|
|
||||||
while read -r option; do
|
|
||||||
setopt $option
|
|
||||||
done <<-EOF
|
|
||||||
ALWAYS_TO_END
|
|
||||||
AUTO_LIST
|
|
||||||
AUTO_MENU
|
|
||||||
AUTO_PARAM_SLASH
|
|
||||||
AUTO_PUSHD
|
|
||||||
ALWAYS_TO_END
|
|
||||||
COMPLETE_IN_WORD
|
|
||||||
EXTENDED_GLOB
|
|
||||||
INC_APPEND_HISTORY
|
|
||||||
INTERACTIVE_COMMENTS
|
|
||||||
MENU_COMPLETE
|
|
||||||
NO_BEEP
|
|
||||||
NOTIFY
|
|
||||||
PATH_DIRS
|
|
||||||
PUSHD_IGNORE_DUPS
|
|
||||||
PUSHD_SILENT
|
|
||||||
EOF
|
|
||||||
while read -r option; do
|
|
||||||
unsetopt $option
|
|
||||||
done <<-EOF
|
|
||||||
CASE_GLOB
|
|
||||||
CORRECT
|
|
||||||
EQUALS
|
|
||||||
FLOWCONTROL
|
|
||||||
NOMATCH
|
|
||||||
EOF
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
# bindkey -v
|
|
||||||
# zmodload zsh/complist
|
|
||||||
# bindkey -M menuselect 'h' vi-backward-char
|
|
||||||
# bindkey -M menuselect 'k' vi-up-line-or-history
|
|
||||||
# bindkey -M menuselect 'l' vi-forward-char
|
|
||||||
# bindkey -M menuselect 'j' vi-down-line-or-history
|
|
||||||
bindkey "^a" vi-beginning-of-line
|
|
||||||
bindkey "^e" vi-end-of-line
|
|
||||||
bindkey '^p' history-search-backward
|
|
||||||
bindkey '^n' history-search-forward
|
|
||||||
bindkey '^f' autosuggest-accept
|
|
||||||
bindkey -M emacs '^[^[' sudo-command-line
|
|
||||||
bindkey -M vicmd '^[^[' sudo-command-line
|
|
||||||
bindkey -M viins '^[^[' sudo-command-line
|
|
||||||
|
|
||||||
# zstyle ':completion:*' menu select
|
|
||||||
zstyle ':completion:*' menu no
|
|
||||||
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
|
|
||||||
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
|
|
||||||
zstyle ':completion:*:descriptions' format '[%d]'
|
|
||||||
zstyle ':completion::complete:*' gain-privileges 1
|
|
||||||
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'eza -1 --color=always $realpath'
|
|
||||||
zstyle ':fzf-tab:complete:+__zoxide_z:*' fzf-preview 'eza -1 --color=always $realpath'
|
|
||||||
zstyle ':fzf-tab:*' switch-group '<' '>'
|
|
||||||
zstyle ':completion:*:git-checkout:*' sort false
|
|
||||||
# _comp_options+=(globdots)
|
|
||||||
|
|
||||||
# prompt init
|
|
||||||
eval "$(oh-my-posh init zsh --config ~/.config/omp/zen.toml)"
|
|
||||||
|
|
||||||
#region dirHashes
|
|
||||||
hash -d "dl"="$HOME/Downloads"
|
|
||||||
hash -d "docs"="$HOME/Documents"
|
|
||||||
hash -d "dev"="$HOME/dev"
|
|
||||||
hash -d "dots"="$HOME/sysconf"
|
|
||||||
hash -d "pics"="$HOME/Pictures"
|
|
||||||
hash -d "vids"="$HOME/Videos"
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region env
|
|
||||||
export DIRENV_LOG_FORMAT=""
|
|
||||||
export LC_ALL="en_US.UTF-8"
|
|
||||||
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
|
||||||
export KEYTIMEOUT=1
|
|
||||||
export GPG_TTY=$(tty)
|
|
||||||
export PATH="$PATH:$HOME/bin"
|
|
||||||
export FLAKE="$HOME/sysconf/nix"
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region aliases
|
|
||||||
alias run="nix-shell --command 'zsh' -p"
|
|
||||||
alias nsh="nix-shell --command 'zsh'"
|
|
||||||
alias nd="nix develop"
|
|
||||||
alias g="git"
|
|
||||||
alias gs="git st"
|
|
||||||
alias gst="git st"
|
|
||||||
|
|
||||||
alias src="cd $HOME/dev"
|
|
||||||
alias sv0="ssh -l root proxmox"
|
|
||||||
alias nmcs="ssh -l kd nmcs"
|
|
||||||
|
|
||||||
alias pn="pnpm"
|
|
||||||
|
|
||||||
alias rm="rm -rf"
|
|
||||||
alias cp="cp -ri"
|
|
||||||
alias mkdir="mkdir -p"
|
|
||||||
alias free="free -m"
|
|
||||||
alias j="just"
|
|
||||||
alias ed="code"
|
|
||||||
alias n="nvim"
|
|
||||||
alias cdr="cd \$(git rev-parse --show-toplevel)"
|
|
||||||
|
|
||||||
alias l="eza -al --no-time --group-directories-first"
|
|
||||||
alias ls="eza -al --no-time --group-directories-first"
|
|
||||||
alias la="eza -a"
|
|
||||||
alias ll="eza -l --no-time --group-directories-first"
|
|
||||||
alias lt="eza -aT --no-time --group-directories-first"
|
|
||||||
|
|
||||||
alias cat="bat --theme gruvbox-dark --style numbers,changes --color=always --tabs=2 --wrap=never"
|
|
||||||
alias diff="delta"
|
|
||||||
alias top="btm"
|
|
||||||
alias c="clear"
|
|
||||||
alias glg="git lg"
|
|
||||||
alias ghr="gh repo"
|
|
||||||
alias serve="python3 -m http.server"
|
|
||||||
alias ytmp3="yt-dlp --ignore-errors --format bestaudio --extract-audio --audio-format mp3 --audio-quality 0 --embed-thumbnail --embed-metadata --output '%(title)s.%(ext)s'"
|
|
||||||
#endregion
|
|
|
@ -1,37 +0,0 @@
|
||||||
{pkgs, ...}: {
|
|
||||||
stylix.enable = true;
|
|
||||||
|
|
||||||
# stylix.base16Scheme = {
|
|
||||||
# # oxocarbon dark
|
|
||||||
# base00 = "161616";
|
|
||||||
# base01 = "262626";
|
|
||||||
# base02 = "393939";
|
|
||||||
# base03 = "525252";
|
|
||||||
# base04 = "dde1e6";
|
|
||||||
# base05 = "f2f4f8";
|
|
||||||
# base06 = "ffffff";
|
|
||||||
# base07 = "08bdba";
|
|
||||||
# base08 = "3ddbd9";
|
|
||||||
# base09 = "78a9ff";
|
|
||||||
# base0A = "ee5396";
|
|
||||||
# base0B = "33b1ff";
|
|
||||||
# base0C = "ff7eb6";
|
|
||||||
# base0D = "42be65";
|
|
||||||
# base0E = "be95ff";
|
|
||||||
# base0F = "82cfff";
|
|
||||||
# };
|
|
||||||
|
|
||||||
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-hard.yaml";
|
|
||||||
|
|
||||||
stylix.fonts = {
|
|
||||||
monospace = {
|
|
||||||
package = pkgs.cascadia-code;
|
|
||||||
name = "Cascadia Code NF";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
stylix.image = ./desktop/nix-wallpaper.png;
|
|
||||||
|
|
||||||
stylix.cursor.package = pkgs.graphite-cursors;
|
|
||||||
stylix.cursor.name = "graphite-dark";
|
|
||||||
}
|
|
41
os/users.nix
41
os/users.nix
|
@ -1,41 +0,0 @@
|
||||||
{
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
imports = [./util/user.nix ./gnome_support.nix];
|
|
||||||
|
|
||||||
user.me = {
|
|
||||||
username = "deva";
|
|
||||||
shell = "zsh";
|
|
||||||
description = "Deva Waves";
|
|
||||||
initialPassword = "12345";
|
|
||||||
sudoer = true;
|
|
||||||
developer = true;
|
|
||||||
extraGroups = ["networkmanager" "audio" "docker" "input" "libvirtd" "plugdev" "video" "adbusers" "uinput"];
|
|
||||||
normalUser = true;
|
|
||||||
desktopEnvironment = "gnome";
|
|
||||||
obs = true;
|
|
||||||
authorizedKeys = [
|
|
||||||
(builtins.readFile ./id_deva.pub)
|
|
||||||
];
|
|
||||||
packages = with pkgs; [
|
|
||||||
nom
|
|
||||||
pinta
|
|
||||||
vesktop
|
|
||||||
signal-desktop
|
|
||||||
blockbench
|
|
||||||
blender
|
|
||||||
prismlauncher
|
|
||||||
steam
|
|
||||||
unstable.koboldcpp
|
|
||||||
];
|
|
||||||
};
|
|
||||||
user.root = {
|
|
||||||
shell = "zsh";
|
|
||||||
extraGroups = [];
|
|
||||||
authorizedKeys = [
|
|
||||||
(builtins.readFile ./id_deva.pub)
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
313
os/util/user.nix
313
os/util/user.nix
|
@ -1,313 +0,0 @@
|
||||||
{
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
outputs,
|
|
||||||
inputs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
userOpts = {
|
|
||||||
name,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
options = with lib; {
|
|
||||||
allowUnfree = mkOption {
|
|
||||||
type = with types; bool;
|
|
||||||
default = true;
|
|
||||||
description = "Whether or not to allow unfree packages for this user.";
|
|
||||||
};
|
|
||||||
username = mkOption {
|
|
||||||
type = with types; nullOr str;
|
|
||||||
default = null;
|
|
||||||
description = "The username of the user, if undefined it uses the name of the attribute set.";
|
|
||||||
};
|
|
||||||
homeDirectory = mkOption {
|
|
||||||
type = with types; nullOr str;
|
|
||||||
default = null;
|
|
||||||
description = "The home directory of the user.";
|
|
||||||
};
|
|
||||||
description = mkOption {
|
|
||||||
type = with types; nullOr str;
|
|
||||||
default = null;
|
|
||||||
description = "The user's description. It is usually their full name.";
|
|
||||||
};
|
|
||||||
uid = mkOption {
|
|
||||||
type = with types; nullOr int;
|
|
||||||
default = null;
|
|
||||||
description = "The user id of the user.";
|
|
||||||
};
|
|
||||||
initialPassword = mkOption {
|
|
||||||
type = with types; nullOr str;
|
|
||||||
default = null;
|
|
||||||
description = "The initial password of the user.";
|
|
||||||
};
|
|
||||||
hashedPassword = mkOption {
|
|
||||||
type = with types; nullOr str;
|
|
||||||
default = null;
|
|
||||||
description = "The hashed password of the user.";
|
|
||||||
};
|
|
||||||
initialHashedPassword = mkOption {
|
|
||||||
type = with types; nullOr str;
|
|
||||||
default = null;
|
|
||||||
description = "The initial hashed password of the user.";
|
|
||||||
};
|
|
||||||
normalUser = mkOption {
|
|
||||||
type = with types; bool;
|
|
||||||
default = false;
|
|
||||||
description = "Whether the user is a system user.";
|
|
||||||
};
|
|
||||||
desktopEnvironment = mkOption {
|
|
||||||
type = with types; nullOr (enum ["gnome" "hyprland" "bspwm"]);
|
|
||||||
default = null;
|
|
||||||
description = "The desktop environment of the user.";
|
|
||||||
};
|
|
||||||
developer = mkOption {
|
|
||||||
type = with types; bool;
|
|
||||||
default = false;
|
|
||||||
description = "Whether or not the user is a developer.";
|
|
||||||
};
|
|
||||||
sudoer = mkOption {
|
|
||||||
type = with types; bool;
|
|
||||||
default = false;
|
|
||||||
description = "Whether or not the user has access to sudo.";
|
|
||||||
};
|
|
||||||
obs = mkOption {
|
|
||||||
type = with types; bool;
|
|
||||||
default = false;
|
|
||||||
description = "Whether or not the user requires OBS.";
|
|
||||||
};
|
|
||||||
authorizedKeys = mkOption {
|
|
||||||
type = with types; listOf str;
|
|
||||||
default = [];
|
|
||||||
description = "List of Authorized SSH Keys for the user.";
|
|
||||||
};
|
|
||||||
extraGroups = mkOption {
|
|
||||||
type = with types; listOf str;
|
|
||||||
default = [];
|
|
||||||
description = "Extra groups to put the user in.";
|
|
||||||
};
|
|
||||||
packages = mkOption {
|
|
||||||
type = with types; listOf package;
|
|
||||||
default = [];
|
|
||||||
description = "The user's packages.";
|
|
||||||
};
|
|
||||||
shell = mkOption {
|
|
||||||
type = with types; enum ["bash" "zsh"];
|
|
||||||
default = "zsh";
|
|
||||||
description = "The user's shell.";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = with lib;
|
|
||||||
mkMerge [
|
|
||||||
{
|
|
||||||
shell = mkDefault "zsh";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
in {
|
|
||||||
options = with lib; {
|
|
||||||
user = mkOption {
|
|
||||||
type = with types; attrsOf (submodule userOpts);
|
|
||||||
default = {};
|
|
||||||
example = {
|
|
||||||
deva = {
|
|
||||||
shell = "zsh";
|
|
||||||
sudoer = true;
|
|
||||||
developer = true;
|
|
||||||
desktopEnvironment = "gnome";
|
|
||||||
obs = true;
|
|
||||||
name = "Deva Waves";
|
|
||||||
};
|
|
||||||
root = {
|
|
||||||
shell = "zsh";
|
|
||||||
authorizedKeys = [];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = let
|
|
||||||
mkIfNoValue = lib.mkOverride 1500;
|
|
||||||
in {
|
|
||||||
users.users = lib.mkIf (config.user != null) (lib.attrsets.mapAttrs (name: userConfig: {
|
|
||||||
uid = (
|
|
||||||
if userConfig.uid != null
|
|
||||||
then userConfig.uid
|
|
||||||
else mkIfNoValue null
|
|
||||||
);
|
|
||||||
initialPassword = (
|
|
||||||
if userConfig.initialPassword != null
|
|
||||||
then userConfig.initialPassword
|
|
||||||
else mkIfNoValue null
|
|
||||||
);
|
|
||||||
hashedPassword = (
|
|
||||||
if userConfig.hashedPassword != null
|
|
||||||
then userConfig.hashedPassword
|
|
||||||
else mkIfNoValue null
|
|
||||||
);
|
|
||||||
initialHashedPassword = (
|
|
||||||
if userConfig.initialHashedPassword != null
|
|
||||||
then userConfig.initialHashedPassword
|
|
||||||
else mkIfNoValue null
|
|
||||||
);
|
|
||||||
description = (
|
|
||||||
if userConfig.description != null
|
|
||||||
then userConfig.description
|
|
||||||
else mkIfNoValue "${name}"
|
|
||||||
);
|
|
||||||
shell = pkgs.${userConfig.shell};
|
|
||||||
openssh.authorizedKeys.keys = userConfig.authorizedKeys or [];
|
|
||||||
isNormalUser =
|
|
||||||
if userConfig.normalUser
|
|
||||||
then true
|
|
||||||
else mkIfNoValue false;
|
|
||||||
name =
|
|
||||||
if userConfig.username != null
|
|
||||||
then userConfig.username
|
|
||||||
else mkIfNoValue name;
|
|
||||||
extraGroups =
|
|
||||||
(
|
|
||||||
if userConfig.extraGroups != null
|
|
||||||
then userConfig.extraGroups
|
|
||||||
else mkIfNoValue []
|
|
||||||
)
|
|
||||||
++ (
|
|
||||||
if userConfig.sudoer
|
|
||||||
then ["wheel"]
|
|
||||||
else []
|
|
||||||
);
|
|
||||||
})
|
|
||||||
config.user);
|
|
||||||
|
|
||||||
home-manager.users = lib.mkIf (config.user != null) (lib.attrsets.mapAttrs (name: userConfig: {
|
|
||||||
imports =
|
|
||||||
[
|
|
||||||
inputs.nix-index-db.hmModules.nix-index
|
|
||||||
]
|
|
||||||
++ (
|
|
||||||
if name != "root"
|
|
||||||
then [
|
|
||||||
../services.nix
|
|
||||||
]
|
|
||||||
else []
|
|
||||||
)
|
|
||||||
++ (
|
|
||||||
if userConfig.developer
|
|
||||||
then [
|
|
||||||
../dev
|
|
||||||
]
|
|
||||||
else []
|
|
||||||
)
|
|
||||||
++ (
|
|
||||||
if userConfig.shell == "zsh"
|
|
||||||
then [
|
|
||||||
../shell/zsh.nix
|
|
||||||
]
|
|
||||||
else []
|
|
||||||
)
|
|
||||||
++ (
|
|
||||||
if userConfig.shell == "bash"
|
|
||||||
then [
|
|
||||||
../shell/bash.nix
|
|
||||||
]
|
|
||||||
else []
|
|
||||||
)
|
|
||||||
++ (
|
|
||||||
if userConfig.obs
|
|
||||||
then [
|
|
||||||
{
|
|
||||||
programs.obs-studio = {
|
|
||||||
enable = true;
|
|
||||||
plugins = with pkgs.obs-studio-plugins; [
|
|
||||||
wlrobs
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
]
|
|
||||||
else []
|
|
||||||
)
|
|
||||||
++ (
|
|
||||||
if userConfig.desktopEnvironment == "gnome"
|
|
||||||
then [
|
|
||||||
../desktop/gnome.nix
|
|
||||||
]
|
|
||||||
else []
|
|
||||||
)
|
|
||||||
++ (
|
|
||||||
if userConfig.desktopEnvironment == "hyprland"
|
|
||||||
then [
|
|
||||||
../desktop/hyprland.nix
|
|
||||||
]
|
|
||||||
else []
|
|
||||||
)
|
|
||||||
++ (
|
|
||||||
if userConfig.desktopEnvironment == "bspwm"
|
|
||||||
then [
|
|
||||||
../desktop/bspwm.nix
|
|
||||||
]
|
|
||||||
else []
|
|
||||||
);
|
|
||||||
|
|
||||||
home = {
|
|
||||||
username =
|
|
||||||
if userConfig.username != null
|
|
||||||
then userConfig.username
|
|
||||||
else mkIfNoValue name;
|
|
||||||
homeDirectory =
|
|
||||||
if userConfig.homeDirectory != null
|
|
||||||
then userConfig.homeDirectory
|
|
||||||
else
|
|
||||||
mkIfNoValue "/home/${(
|
|
||||||
if userConfig.username != null
|
|
||||||
then userConfig.username
|
|
||||||
else name
|
|
||||||
)}";
|
|
||||||
extraOutputsToInstall = ["doc" "devdoc"];
|
|
||||||
packages =
|
|
||||||
[
|
|
||||||
inputs.nh.packages.x86_64-linux.default
|
|
||||||
]
|
|
||||||
++ userConfig.packages or [];
|
|
||||||
sessionVariables = {
|
|
||||||
NIX_AUTO_RUN = "1";
|
|
||||||
FLAKE = "${config.home-manager.users.${name}.home.homeDirectory}/nix";
|
|
||||||
};
|
|
||||||
stateVersion = "24.05";
|
|
||||||
};
|
|
||||||
|
|
||||||
nixpkgs =
|
|
||||||
if config.home-manager.useGlobalPkgs != true
|
|
||||||
then {
|
|
||||||
overlays = [
|
|
||||||
outputs.overlays.additions
|
|
||||||
outputs.overlays.modifications
|
|
||||||
outputs.overlays.unstable-packages
|
|
||||||
];
|
|
||||||
config = {
|
|
||||||
allowUnfree =
|
|
||||||
if userConfig.allowUnfree != true
|
|
||||||
then false
|
|
||||||
else mkIfNoValue true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
else mkIfNoValue {};
|
|
||||||
nix.package = lib.mkForce pkgs.unstable.nixVersions.latest;
|
|
||||||
nix.extraOptions = ''
|
|
||||||
experimental-features = nix-command flakes
|
|
||||||
'';
|
|
||||||
manual = {
|
|
||||||
html.enable = false;
|
|
||||||
json.enable = false;
|
|
||||||
manpages.enable = false;
|
|
||||||
};
|
|
||||||
programs.home-manager.enable = true;
|
|
||||||
programs.git.enable = true;
|
|
||||||
programs.nix-index.enable = true;
|
|
||||||
programs.nix-index.symlinkToCacheHome = true;
|
|
||||||
programs.nix-index-database.comma.enable = true;
|
|
||||||
systemd.user.startServices = "sd-switch";
|
|
||||||
})
|
|
||||||
config.user);
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -12,9 +12,8 @@
|
||||||
tmuxPlugins =
|
tmuxPlugins =
|
||||||
prev.tmuxPlugins
|
prev.tmuxPlugins
|
||||||
// {
|
// {
|
||||||
tokyo-night-tmux = prev.callPackage ../pkgs/tmux-tokyo-night.nix {
|
tokyo-night-tmux = prev.callPackage ../pkgs/tokyo-night-tmux.nix {
|
||||||
pkgs = prev;
|
pkgs = prev;
|
||||||
lib = prev.lib;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
gnome-keyring = prev.gnome.gnome-keyring;
|
gnome-keyring = prev.gnome.gnome-keyring;
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
{pkgs}:
|
|
||||||
pkgs.writeShellScriptBin "clone" ''
|
|
||||||
CLONE_LOCATION=''${1=$HOME/nix}
|
|
||||||
${pkgs.git}/bin/git clone https://github.com/devawaves/nixos $CLONE_LOCATION
|
|
||||||
''
|
|
|
@ -1,5 +1,4 @@
|
||||||
pkgs: {
|
pkgs: {
|
||||||
clone = pkgs.callPackage ./clone.nix {};
|
|
||||||
disko = pkgs.callPackage ./disko.nix {};
|
disko = pkgs.callPackage ./disko.nix {};
|
||||||
zed-fhs = pkgs.callPackage ./zed-fhs.nix {};
|
tokyo-night-tmux = pkgs.callPackage ./tokyo-night-tmux.nix {};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{pkgs}:
|
pkgs: pkgs.writeShellScriptBin "disko" ''
|
||||||
pkgs.writeShellScriptBin "disko" ''
|
cat >disko.nix <<EOL
|
||||||
${pkgs.curl}/bin/curl "https://raw.githubusercontent.com/devawaves/nixos/main/disko.nix" -o disko.nix
|
${builtins.readFile ../disko.nix}
|
||||||
|
EOL
|
||||||
''
|
''
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
# USED IN OVERLAY
|
pkgs: let
|
||||||
{
|
lib = pkgs.lib;
|
||||||
pkgs,
|
in pkgs.tmuxPlugins.mkTmuxPlugin {
|
||||||
lib,
|
|
||||||
}:
|
|
||||||
pkgs.tmuxPlugins.mkTmuxPlugin {
|
|
||||||
pluginName = "tokyo-night-tmux";
|
pluginName = "tokyo-night-tmux";
|
||||||
version = "c3bc283cceeefaa7e5896878fe20711f466ab591";
|
version = "c3bc283cceeefaa7e5896878fe20711f466ab591";
|
||||||
src = pkgs.fetchFromGitHub {
|
src = pkgs.fetchFromGitHub {
|
|
@ -1,20 +0,0 @@
|
||||||
{pkgs}: pkgs.buildFHSUserEnv {
|
|
||||||
name = "zed";
|
|
||||||
targetPkgs = pkgs: with pkgs; [
|
|
||||||
unstable.zed-editor
|
|
||||||
];
|
|
||||||
runScript = "zed";
|
|
||||||
desktopItem = pkgs.lib.makeDesktopItem {
|
|
||||||
name = "zed";
|
|
||||||
desktopName = "Zed";
|
|
||||||
comment = "A high-performance, multiplayer code editor.";
|
|
||||||
genericName = "Text Editor";
|
|
||||||
exec = "zed %U";
|
|
||||||
icon = "zed";
|
|
||||||
startupNotify = true;
|
|
||||||
startupWMClass = "zed";
|
|
||||||
mimeTypes = ["text/plain" "inode/directory"];
|
|
||||||
categories = [ "Utility" "TextEditor" "Development" "IDE" ];
|
|
||||||
keywords = [ "zed" ];
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,7 +1,7 @@
|
||||||
<h1 align="center">deva's nixos flake</h1>
|
<h1 align="center">deva's nixos flake</h1>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://builtwithnix.org"><img src="https://builtwithnix.org/badge.svg" alt="built with nix" height="20"/></a>
|
<a href="https://nixos.org"><img src="https://builtwithnix.org/badge.svg" alt="built with nix" height="20"/></a>
|
||||||
<img src="https://img.shields.io/github/license/devawaves/nixos" alt="License Badge"/>
|
<img src="https://img.shields.io/github/license/devawaves/nixos" alt="License Badge"/>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
94
waves.nix
Normal file
94
waves.nix
Normal file
|
@ -0,0 +1,94 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
outputs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
modulesPath = "./modules/nixos";
|
||||||
|
in {
|
||||||
|
imports = [
|
||||||
|
./waves-hardware.nix
|
||||||
|
inputs.nix-gaming.nixosModules.pipewireLowLatency
|
||||||
|
"${modulesPath}/virtualisation.nix"
|
||||||
|
"${modulesPath}/kanata.nix"
|
||||||
|
"${modulesPath}/services.nix"
|
||||||
|
"${modulesPath}/localnameresolution.nix"
|
||||||
|
"${modulesPath}/syncthing.nix"
|
||||||
|
"${modulesPath}/users.nix"
|
||||||
|
"${modulesPath}/adb.nix"
|
||||||
|
"${modulesPath}/console.nix"
|
||||||
|
"${modulesPath}/fonts.nix"
|
||||||
|
"${modulesPath}/nvidia.nix"
|
||||||
|
"${modulesPath}/gui.nix"
|
||||||
|
"${modulesPath}/i18n.nix"
|
||||||
|
"${modulesPath}/zsh.nix"
|
||||||
|
];
|
||||||
|
|
||||||
|
#system.stateVersion = ""; #<- replace when have stateversion
|
||||||
|
|
||||||
|
nixpkgs.config = {
|
||||||
|
allowUnfree = true;
|
||||||
|
cudaSupport = true;
|
||||||
|
};
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
outputs.overlays.additions
|
||||||
|
outputs.overlays.modifications
|
||||||
|
outputs.overlays.unstable-packages
|
||||||
|
];
|
||||||
|
nix = let
|
||||||
|
flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs;
|
||||||
|
in {
|
||||||
|
settings = {
|
||||||
|
# Enable flakes and new 'nix' command
|
||||||
|
experimental-features = "nix-command flakes";
|
||||||
|
# Opinionated: disable global registry
|
||||||
|
flake-registry = "";
|
||||||
|
# Workaround for https://github.com/NixOS/nix/issues/9574
|
||||||
|
nix-path = config.nix.nixPath;
|
||||||
|
# allowUnfree = true;
|
||||||
|
auto-optimise-store = true;
|
||||||
|
builders-use-substitutes = true;
|
||||||
|
keep-derivations = true;
|
||||||
|
keep-outputs = true;
|
||||||
|
trusted-users = ["root" "@wheel"];
|
||||||
|
|
||||||
|
substituters = [
|
||||||
|
"https://cache.nixos.org"
|
||||||
|
"https://nix-community.cachix.org"
|
||||||
|
];
|
||||||
|
|
||||||
|
trusted-public-keys = [
|
||||||
|
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||||
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
|
];
|
||||||
|
};
|
||||||
|
# Opinionated: disable channels
|
||||||
|
channel.enable = false;
|
||||||
|
|
||||||
|
# Opinionated: make flake registry and nix path match flake inputs
|
||||||
|
registry = lib.mapAttrs (_: flake: {inherit flake;}) flakeInputs;
|
||||||
|
nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs;
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
unstable.neovim
|
||||||
|
fuse3
|
||||||
|
floorp
|
||||||
|
localsend
|
||||||
|
parsec-bin
|
||||||
|
];
|
||||||
|
|
||||||
|
# security
|
||||||
|
security = {
|
||||||
|
sudo.wheelNeedsPassword = false; # don't ask password for wheel group, disk is encrypted with a secure password & ssh auth with password is disabled!
|
||||||
|
# enable trusted platform module 2 support
|
||||||
|
tpm2.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
networking.networkmanager.enable = true;
|
||||||
|
boot.supportedFilesystems = ["ntfs"];
|
||||||
|
}
|
Loading…
Reference in a new issue