1
Fork 0

Integrated nixos-hardware, more ricing, and much more

This commit is contained in:
Matei Adriel 2023-08-17 10:31:46 +03:00
parent 16752e40d5
commit d0073fbee4
No known key found for this signature in database
37 changed files with 248 additions and 87 deletions

View file

@ -1,6 +1,6 @@
# shell containing the tools i most commonly use for haskell work!
{ pkgs, ... }:
pkgs.mkShell {
nativebuildinputs = with pkgs; [ ghc hpack stack cabal-install ];
buildInputs = with pkgs; [ ghc hpack stack cabal-install ];
}

View file

@ -1,5 +1,5 @@
{
"LuaSnip": { "branch": "master", "commit": "99a94cc35ec99bf06263d0346128e908a204575c" },
"LuaSnip": { "branch": "master", "commit": "409535b8fc54c650eb845b0c35e0cc7f08810284" },
"abbreinder.nvim": { "branch": "main", "commit": "5b2b5ff08a9ada42238d733aeebc6d3d96314d77" },
"abbremand.nvim": { "branch": "main", "commit": "d633341f632b0b2666dfc6dfe6b9842ba1610a1d" },
"catppuccin": { "branch": "main", "commit": "490078b1593c6609e6a50ad5001e7902ea601824" },
@ -38,7 +38,7 @@
"neoconf.nvim": { "branch": "main", "commit": "08f146d53e075055500dca35e93281faff95716b" },
"neodev.nvim": { "branch": "main", "commit": "9a5c0f0de5c15fba52d4fb83d425d3f4fa7abfa1" },
"neogit": { "branch": "master", "commit": "e4c428239928425829cb5247e430f26d25d5788e" },
"neorg": { "branch": "main", "commit": "66e5a4e4ed7645590ac8388abdedb8f840b88f0d" },
"neorg": { "branch": "main", "commit": "f296a22864bbac0d94ad00fa18cc8231dbeaa1e3" },
"neorg-telescope": { "branch": "main", "commit": "1310d4aaefd8149c9839bbe1d5610e94389e2f0e" },
"nui.nvim": { "branch": "main", "commit": "9e3916e784660f55f47daa6f26053ad044db5d6a" },
"null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" },
@ -46,8 +46,8 @@
"nvim-cmp": { "branch": "main", "commit": "51f1e11a89ec701221877532ee1a23557d291dd5" },
"nvim-comment": { "branch": "main", "commit": "e9ac16ab056695cad6461173693069ec070d2b23" },
"nvim-lspconfig": { "branch": "master", "commit": "a981d4447b92c54a4d464eb1a76b799bc3f9a771" },
"nvim-tree.lua": { "branch": "master", "commit": "0a54dcb76b02f3a4e2da370c7a3f6f2b7b43ef01" },
"nvim-treesitter": { "branch": "master", "commit": "bc52938ddde0ff6b3d51ff215d2c66f2e39b7099" },
"nvim-tree.lua": { "branch": "master", "commit": "18c7a3119839adc4599d838726deae662859c8b2" },
"nvim-treesitter": { "branch": "master", "commit": "93ee00cd9daf8d2e3fbaa2a18b8b9adcb4471b16" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "9e519b6146512c8e2e702faf8ac48420f4f5deec" },
"nvim-web-devicons": { "branch": "master", "commit": "ab899311f8ae00a47eae8e0879506cead8eb1561" },
"nvim_context_vt": { "branch": "master", "commit": "f44f46ecad6e6983fd04dac84c5a5c03815d3427" },

View file

@ -119,9 +119,11 @@ local servers = {
-- }}}
-- {{{ Haskell
hls = {
settings = {
haskell = {
-- set formatter
formattingProvider = "ormolu",
formattingProvider = "fourmolu",
},
},
},
-- }}}

View file

@ -9,7 +9,6 @@ local telescope = {
"nvim-lua/plenary.nvim"
},
version = "0.1.x",
pin = true,
cond = env.vscode.not_active(),
}

View file

@ -22,6 +22,27 @@
"type": "github"
}
},
"anyrun": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1692117840,
"narHash": "sha256-BT2URpn3zzcKaOv9RqSASZzOrIMrQdvpIAeBJLz8CZo=",
"owner": "Kirottu",
"repo": "anyrun",
"rev": "d4b16a7c2b92332dba34af45956cf726e40ec400",
"type": "github"
},
"original": {
"owner": "Kirottu",
"repo": "anyrun",
"type": "github"
}
},
"base16": {
"inputs": {
"fromYaml": "fromYaml"
@ -209,7 +230,7 @@
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
"neovim-nightly-overlay",
"anyrun",
"nixpkgs"
]
},
@ -228,6 +249,27 @@
}
},
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": [
"neovim-nightly-overlay",
"nixpkgs"
]
},
"locked": {
"lastModified": 1685662779,
"narHash": "sha256-cKDDciXGpMEjP1n6HlzKinN0H+oLmNpgeCTzYnsA2po=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "71fb97f0d875fd4de4994dfb849f2c75e17eb6c3",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_3": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
@ -244,7 +286,7 @@
"type": "indirect"
}
},
"flake-parts_3": {
"flake-parts_4": {
"inputs": {
"nixpkgs-lib": [
"neovim-nightly-overlay",
@ -267,7 +309,7 @@
"type": "github"
}
},
"flake-parts_4": {
"flake-parts_5": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib_2"
},
@ -285,7 +327,7 @@
"type": "github"
}
},
"flake-parts_5": {
"flake-parts_6": {
"inputs": {
"nixpkgs-lib": [
"nixpkgs-wayland",
@ -430,7 +472,7 @@
},
"hercules-ci-agent": {
"inputs": {
"flake-parts": "flake-parts_3",
"flake-parts": "flake-parts_4",
"haskell-flake": "haskell-flake",
"nixpkgs": "nixpkgs"
},
@ -449,7 +491,7 @@
},
"hercules-ci-effects": {
"inputs": {
"flake-parts": "flake-parts_2",
"flake-parts": "flake-parts_3",
"hercules-ci-agent": "hercules-ci-agent",
"nixpkgs": [
"neovim-nightly-overlay",
@ -498,11 +540,11 @@
]
},
"locked": {
"lastModified": 1687871164,
"narHash": "sha256-bBFlPthuYX322xOlpJvkjUBz0C+MOBjZdDOOJJ+G2jU=",
"lastModified": 1692099905,
"narHash": "sha256-/pSusGhmIdSdAaywQRFA5dVbfdIzlWQTecM+E46+cJ0=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "07c347bb50994691d7b0095f45ebd8838cf6bc38",
"rev": "2a6679aa9cc3872c29ba2a57fe1b71b3e3c5649f",
"type": "github"
},
"original": {
@ -662,7 +704,7 @@
"neovim-nightly-overlay": {
"inputs": {
"flake-compat": "flake-compat_2",
"flake-parts": "flake-parts",
"flake-parts": "flake-parts_2",
"hercules-ci-effects": "hercules-ci-effects",
"neovim-flake": "neovim-flake",
"nixpkgs": [
@ -685,7 +727,7 @@
},
"nix-eval-jobs": {
"inputs": {
"flake-parts": "flake-parts_5",
"flake-parts": "flake-parts_6",
"nixpkgs": "nixpkgs_4"
},
"locked": {
@ -704,7 +746,7 @@
},
"nixd": {
"inputs": {
"flake-parts": "flake-parts_4",
"flake-parts": "flake-parts_5",
"nixpkgs": "nixpkgs_2"
},
"locked": {
@ -741,6 +783,22 @@
"type": "github"
}
},
"nixos-hardware": {
"locked": {
"lastModified": 1691871742,
"narHash": "sha256-6yDNjfbAMpwzWL4y75fxs6beXHRANfYX8BNSPjYehck=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "430a56dd16fe583a812b2df44dca002acab2f4f6",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "master",
"repo": "nixos-hardware",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1680213900,
@ -913,6 +971,7 @@
"root": {
"inputs": {
"agenix": "agenix",
"anyrun": "anyrun",
"catppuccin-base16": "catppuccin-base16",
"deploy-rs": "deploy-rs",
"disko": "disko",
@ -926,6 +985,7 @@
"neovim-nightly-overlay": "neovim-nightly-overlay",
"nixd": "nixd",
"nixinate": "nixinate",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_3",
"nixpkgs-unstable": "nixpkgs-unstable",
"nixpkgs-wayland": "nixpkgs-wayland",

View file

@ -88,6 +88,13 @@
# Nixinate
nixinate.url = "github:matthewcroughan/nixinate";
nixinate.inputs.nixpkgs.follows = "nixpkgs-unstable";
# Anyrun
anyrun.url = "github:Kirottu/anyrun";
anyrun.inputs.nixpkgs.follows = "nixpkgs";
# Nixos hardware
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
};
# }}}
@ -248,11 +255,13 @@
extra-substituters = [
"https://nix-community.cachix.org" # I think I need this for neovim-nightly?
"https://nixpkgs-wayland.cachix.org"
"https://anyrun.cachix.org"
];
extra-trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA="
"anyrun.cachix.org-1:pqBobmOjI7nKlsUMV25u9QHa9btJK65/C8vnO3p346s="
];
};
# }}}

View file

@ -12,6 +12,8 @@
# Syncthing
".stfolder"
".stversions"
# Direnv
".direnv"
];
extraConfig = {

View file

@ -66,12 +66,8 @@
# }}}
# {{{ Steam
satellite.persistence.at.state.apps.Steam = {
files = [
".steam/registry.vdf" # It seems like auto-login does not work without this
];
directories = [
".factorio" # TODO: perhaps this should leave in it's own file?
".factorio" # TODO: perhaps this should have it's own file?
# A couple of games don't play well with bindfs
{

View file

View file

@ -0,0 +1,18 @@
{ inputs, pkgs, ... }: {
programs.anyrun = {
enable = true;
config = {
plugins = with inputs.anyrun.packages.${pkgs.system}; [
applications
dictionary
rink
stdin
symbols
websearch
];
width.fraction = 0.5;
height.fraction = 0.6;
};
};
}

View file

@ -1,10 +1,11 @@
# Common wayland stuff
{ lib, pkgs, upkgs, ... }: {
imports = [
./wofi.nix
./dunst.nix
./wlsunset.nix
./wlogout.nix
./wofi
./anyrun
../desktop/wezterm # Default hyprland terminal
../desktop/batsignal.nix
../desktop/eww

View file

@ -25,8 +25,10 @@ decoration {
}
}
# Blur eww widgets
blurls=gtk-layer-shell
# Blur extra surfaces
layerrule = blur,gtk-layer-shell
layerrule = blur,wofi
layerrule = ignorezero,wofi
input {
kb_layout = us

View file

@ -1,23 +0,0 @@
{ pkgs, config, ... }:
let
base16-wofi = config.lib.stylix.colors {
templateRepo = pkgs.fetchFromSourcehut {
owner = "~knezi";
repo = "base16-wofi";
rev = "2182a5ad36d372e625b3d8e1a20ba7447e77ed22";
sha256 = "0hzn9lgh7rzahmzzdsgxnz4f8vvcpx5diwsnc7gb29gj9nbb1a8f";
};
};
in
{
programs.wofi = {
enable = true;
settings = {
allow_markup = true;
allow_images = true;
};
};
# xdg.configFile."wofi/style.css".source = base16-wofi;
}

View file

@ -0,0 +1,13 @@
{ config, ... }:
{
programs.wofi = {
enable = true;
settings = {
allow_markup = true;
allow_images = true;
};
};
xdg.configFile."wofi/style.css".source = config.satellite.dev.path "home/features/wayland/wofi/wofi.css";
}

View file

@ -0,0 +1,56 @@
/* Styling guide: https://cloudninja.pw/docs/wofi.html */
window {
background:none;
}
#outer-box {
margin: 3px;
border-radius: 8px;
/* box-shadow: .5px .5px 1.5px 1.5px rgba(0, 0, 0, .5); */
/* background-color: rgba(256, 256, 256, 0.6); */
}
#input {
margin: 1rem;
padding: 1rem;
font-size: 2em;
border-radius: 8px;
box-shadow: .5px .5px 1.5px 1.5px rgba(0, 0, 0, .5);
/* background: none; */
background-color: rgba(256, 256, 256, 0.6);
}
#scroll {
margin: 1rem;
border-radius: 8px;
box-shadow: .5px .5px 1.5px 1.5px rgba(0, 0, 0, .5);
/* background: none; */
background-color: rgba(256, 256, 256, 0.6);
}
#entry {
margin: 0.7rem;
margin-bottom: 0;
color: #4c4f69;
border-radius: 8px;
}
#text {
margin: .5rem;
font-size: 1.5em;
}
#img {
margin-left: .5rem;
}
#entry:selected {
outline: none;
color: #4c4f69;
background: rgba(188, 192, 204, 0.2);
box-shadow: .5px .5px 1.5px 1.5px rgba(0, 0, 0, .5);
}
#text:selected {
color: #4c4f69;
}

View file

@ -8,6 +8,7 @@ let
inputs.impermanence.nixosModules.home-manager.impermanence
inputs.hyprland.homeManagerModules.default
inputs.spicetify-nix.homeManagerModules.spicetify
inputs.anyrun.homeManagerModules.default
../features/cli
../features/persistence.nix

View file

@ -9,7 +9,7 @@ let
hostname = config.networking.hostName;
# Function from hostname to relative path to public ssh key
pubKey = host: ../../${host}/ssh_host_ed25519_key.pub;
pubKey = host: ../../${host}/keys/ssh_host_ed25519_key.pub;
in
{
services.openssh = {

View file

@ -6,7 +6,9 @@
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
};
environment.systemPackages = [ pkgs.xdg-utils ];
# HACK: copied from @lily on discord.
systemd.user.services.xdg-desktop-portal.path = lib.mkAfter [ "/run/current-system/sw" ];
# systemd.user.services.xdg-desktop-portal.path = lib.mkAfter [ "/run/current-system/sw" ];
# services.gnome.at-spi2-core.enable = true;
}

View file

@ -1,6 +1,6 @@
{ config, ... }:
{
import = [ ../touchpad.nix ];
imports = [ ../touchpad.nix ];
services.xserver = {
enable = true;

View file

@ -5,7 +5,7 @@
hosts = outputs.nixosConfigurations;
# Function from hostname to relative path to public ssh key
idKey = host: ../../${host}/id_ed25519.pub;
idKey = host: ../../${host}/keys/id_ed25519.pub;
in
lib.pipe hosts [
# attrsetof host -> attrsetof path

View file

@ -5,13 +5,8 @@
../common/optional/slambda.nix
./services/syncthing.nix
./hardware-configuration.nix
./filesystems.nix
./zfs.nix
(import ./partitions.nix {
disks = [ "/dev/sda" ];
})
./filesystems
./hardware
];
# Machine ids
@ -24,7 +19,4 @@
# Bootloader
boot.loader.systemd-boot.enable = true;
# Do not suspend on lid closing
services.logind.lidSwitch = "ignore";
}

View file

@ -1,6 +1,13 @@
# Mark a bunch of paths as needed for boot
{ lib, ... }:
{
imports = [
./zfs.nix
(import ./partitions.nix {
disks = [ "/dev/sda" ];
})
];
# Mark a bunch of paths as needed for boot
fileSystems = lib.attrsets.genAttrs
[ "/" "/nix" "/persist/data" "/persist/state" "/persist/local/cache" "/boot" ]
(_: { neededForBoot = true; });

View file

@ -0,0 +1,14 @@
{ inputs, ... }:
{
imports = with inputs.nixos-hardware.nixosModules; [
common-cpu-intel
common-gpu-intel
common-pc-laptop
common-pc-laptop-hdd
common-pc-hdd
./generated.nix
];
# Do not suspend on lid closing
services.logind.lidSwitch = "ignore";
}

View file

@ -13,8 +13,8 @@
../common/optional/hyprland.nix
../common/optional/quietboot.nix
./hardware
./services/syncthing.nix
./hardware-configuration.nix
./boot.nix
];

View file

@ -0,0 +1,10 @@
{ inputs, ... }:
{
imports = with inputs.nixos-hardware.nixosModules; [
common-cpu-intel
common-gpu-intel
common-pc-laptop
common-pc-ssd
./generated.nix
];
}

View file

@ -22,20 +22,20 @@
});
# }}}
# {{{ Discord
discord =
let
enableWayland = drv: bin: drv.overrideAttrs (
old: {
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ final.makeWrapper ];
postFixup = (old.postFixup or "") + ''
wrapProgram $out/bin/${bin} \
--add-flags "--enable-features=UseOzonePlatform" \
--add-flags "--ozone-platform=wayland"
'';
}
);
in
enableWayland prev.discord "discord";
# discord =
# let
# enableWayland = drv: bin: drv.overrideAttrs (
# old: {
# nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ final.makeWrapper ];
# postFixup = (old.postFixup or "") + ''
# wrapProgram $out/bin/${bin} \
# --add-flags "--enable-features=UseOzonePlatform" \
# --add-flags "--ozone-platform=wayland"
# '';
# }
# );
# in
# enableWayland prev.discord "discord";
# }}}
};

View file

@ -1,9 +1,9 @@
let
tethys = builtins.readFile ./hosts/nixos/tethys/ssh_host_ed25519_key.pub;
lapetus = builtins.readFile ./hosts/nixos/lapetus/ssh_host_ed25519_key.pub;
tethys = builtins.readFile ./hosts/nixos/tethys/keys/ssh_host_ed25519_key.pub;
lapetus = builtins.readFile ./hosts/nixos/lapetus/keys/ssh_host_ed25519_key.pub;
adrielus_tethys = builtins.readFile ./hosts/nixos/tethys/id_ed25519.pub;
adrielus_lapetus = builtins.readFile ./hosts/nixos/lapetus/id_ed25519.pub;
adrielus_tethys = builtins.readFile ./hosts/nixos/tethys/keys/id_ed25519.pub;
adrielus_lapetus = builtins.readFile ./hosts/nixos/lapetus/keys/id_ed25519.pub;
all_hosts = [ tethys lapetus ];
in