restructuring5

This commit is contained in:
cnst
2024-06-24 20:59:48 +02:00
parent c130053edf
commit d1b3c635c8
11 changed files with 120 additions and 61 deletions

62
flake.lock generated
View File

@@ -27,11 +27,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1719145560, "lastModified": 1719253381,
"narHash": "sha256-LLg4I+NSx94iHsJMy1AK+UlOa0QRmzMxBmrKj2iVhtc=", "narHash": "sha256-ZRK+P5OSzXVOLRsVIvtC/M7dMQ5JdLQ9tlCPURBy7zY=",
"owner": "nix-community", "owner": "nix-community",
"repo": "flake-firefox-nightly", "repo": "flake-firefox-nightly",
"rev": "b42f1c6122099e4be0e5f78d7b127954a7e95e3f", "rev": "c57cfcd3ca865b3ac291ece6b5914785fd8518b2",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -212,6 +212,21 @@
"type": "github" "type": "github"
} }
}, },
"hardware": {
"locked": {
"lastModified": 1719145664,
"narHash": "sha256-+0bBlerLxsHUJcKPDWZM1wL3V9bzCFjz+VyRTG8fnUA=",
"owner": "nixos",
"repo": "nixos-hardware",
"rev": "c3e48cbd88414f583ff08804eb57b0da4c194f9e",
"type": "github"
},
"original": {
"owner": "nixos",
"repo": "nixos-hardware",
"type": "github"
}
},
"hercules-ci-effects": { "hercules-ci-effects": {
"inputs": { "inputs": {
"flake-parts": "flake-parts_2", "flake-parts": "flake-parts_2",
@@ -241,11 +256,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1719037157, "lastModified": 1719180626,
"narHash": "sha256-aOKd8+mhBsLQChCu1mn/W5ww79ta5cXVE59aJFrifM8=", "narHash": "sha256-vZAzm5KQpR6RGple1dzmSJw5kPivES2heCFM+ZWkt0I=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "cd886711998fe5d9ff7979fdd4b4cbd17b1f1511", "rev": "6b1f90a8ff92e81638ae6eb48cd62349c3e387bb",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -301,11 +316,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1719151941, "lastModified": 1719211247,
"narHash": "sha256-6DlzbOUC14DN3ChG6YDfHp3dlyRunlCuNIGiJ0/j0SU=", "narHash": "sha256-GaEckCf2RaHzoEDj/j07BIV6eyDOT5wCFVSdbbkZ87U=",
"owner": "nix-community", "owner": "nix-community",
"repo": "neovim-nightly-overlay", "repo": "neovim-nightly-overlay",
"rev": "8fbf3ad99db5af164230b7965de5572ce238c0da", "rev": "820da0e6b6127df9ad05ef3af40d767577e21ba1",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -317,11 +332,11 @@
"neovim-src": { "neovim-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1719082813, "lastModified": 1719138008,
"narHash": "sha256-C2stSASvUp0XHljA6iZfDFHSH0JIDJ0g7g0uQUIHU2E=", "narHash": "sha256-+rM0RjvuW6/vzxdJxEU6KvQEF159NXrgB+irtS044Cc=",
"owner": "neovim", "owner": "neovim",
"repo": "neovim", "repo": "neovim",
"rev": "6c3f7e7e27a0ffcf6d58dc1f5ad2fce7e59a2d88", "rev": "be999e6a0e5b251b2b37500d06636d4167334c6e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -363,11 +378,11 @@
}, },
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1718835956, "lastModified": 1719145550,
"narHash": "sha256-wM9v2yIxClRYsGHut5vHICZTK7xdrUGfrLkXvSuv6s4=", "narHash": "sha256-K0i/coxxTEl30tgt4oALaylQfxqbotTSNb1/+g+mKMQ=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "dd457de7e08c6d06789b1f5b88fc9327f4d96309", "rev": "e4509b3a560c87a8d4cb6f9992b8915abf9e36d8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -380,6 +395,7 @@
"root": { "root": {
"inputs": { "inputs": {
"firefox-nightly": "firefox-nightly", "firefox-nightly": "firefox-nightly",
"hardware": "hardware",
"home-manager": "home-manager", "home-manager": "home-manager",
"neovim-nightly-overlay": "neovim-nightly-overlay", "neovim-nightly-overlay": "neovim-nightly-overlay",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
@@ -425,15 +441,17 @@
}, },
"systems_2": { "systems_2": {
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1689347949,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"path": "/nix/store/yj1wxm9hh8610iyzqnz75kvs6xl8j3my-source", "owner": "nix-systems",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", "repo": "default-linux",
"type": "path" "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github"
}, },
"original": { "original": {
"id": "systems", "owner": "nix-systems",
"type": "indirect" "repo": "default-linux",
"type": "github"
} }
} }
}, },

View File

@@ -30,31 +30,16 @@ in
imports = [ imports = [
inputs.home-manager.nixosModules.home-manager inputs.home-manager.nixosModules.home-manager
../pkgs/cnix.nix
../pkgs/fonts.nix ../pkgs/fonts.nix
../programs ../common
../extra
../services/cnix.nix ../services/cnix.nix
../hardware/cnix.nix ../hardware/cnix.nix
../generic/cnix.nix ../locale/cnix.nix
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
home-manager = { home-manager.users.cnst = import ../../home/cnst/home.nix;
useGlobalPkgs = true;
extraSpecialArgs = {
inherit inputs outputs;
};
users = {
cnst = import ../../home/cnst/home.nix;
};
};
nixpkgs = {
overlays = [ ];
config = {
allowUnfree = true;
};
};
nix = nix =
let let
@@ -82,9 +67,6 @@ in
nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs; nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs;
}; };
# Add .local/bin to $PATH
environment.localBinInPath = true;
# Bootloader # Bootloader
boot.loader = { boot.loader = {
systemd-boot.enable = true; systemd-boot.enable = true;
@@ -106,10 +88,6 @@ in
}; };
}; };
# TODO: Configure your system-wide user settings (groups, etc), add more users as needed.
console.useXkbConfig = true;
# services
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = "24.05"; system.stateVersion = "24.05";
} }

76
hosts/common/default.nix Normal file
View File

@@ -0,0 +1,76 @@
# This file (and the global directory) holds config that i use on all hosts
{
inputs,
outputs,
pkgs,
...
}:
{
imports = [
inputs.home-manager.nixosModules.home-manager
./adb.nix
./hyprland.nix
./neovim.nix
./zsh.nix
];
home-manager = {
useGlobalPkgs = true;
extraSpecialArgs = {
inherit inputs outputs;
};
};
nixpkgs = {
overlays = [ ];
config = {
allowUnfree = true;
};
};
environment = {
systemPackages = [
# Dev
pkgs.git
pkgs.pyright
pkgs.python3
pkgs.gcc
pkgs.go
pkgs.nodePackages_latest.npm
pkgs.nodePackages_latest.nodejs
pkgs.nodePackages.prettier
pkgs.nodePackages.prettier-plugin-toml
pkgs.lua-language-server
pkgs.stylua
pkgs.prettierd
pkgs.cargo
pkgs.hyprlang
pkgs.nixd
pkgs.nil
pkgs.black
pkgs.python312Packages.jedi-language-server
pkgs.isort
pkgs.bacon
pkgs.clang
pkgs.clang-tools
pkgs.alejandra
# Util
pkgs.stow
pkgs.gnumake
pkgs.wget
pkgs.curl
pkgs.ripgrep
pkgs.python312Packages.oauth2
pkgs.python312Packages.httplib2
pkgs.python312Packages.pip
pkgs.killall
pkgs.tree-sitter
pkgs.lazygit
pkgs.tmux
pkgs.tmuxifier
pkgs.unzip
pkgs.p7zip
pkgs.unrar
pkgs.xdg-utils
pkgs.xdg-user-dirs
];
};
}

View File

@@ -1,17 +1,4 @@
{ {
environment = {
etc."xdg/user-dirs.defaults".text = ''
DESKTOP=desktop
DOWNLOAD=documents/downloads
TEMPLATES=documents/templates
PUBLICSHARE=documents/share
DOCUMENTS=documents
MUSIC=media/music
PICTURES=media/photos
VIDEOS=media/video
'';
};
time.timeZone = "Europe/Stockholm"; time.timeZone = "Europe/Stockholm";
i18n = { i18n = {