Compare commits
2 commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
3811e38dac | ||
![]() |
c50ed8a901 |
6 changed files with 204 additions and 0 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,3 +1,6 @@
|
||||||
# Python bytecode
|
# Python bytecode
|
||||||
__pycache__
|
__pycache__
|
||||||
*.pyc
|
*.pyc
|
||||||
|
|
||||||
|
# home-manager output
|
||||||
|
/result
|
||||||
|
|
132
flake.lock
generated
Normal file
132
flake.lock
generated
Normal file
|
@ -0,0 +1,132 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"flake-utils": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1710146030,
|
||||||
|
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-utils_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1659877975,
|
||||||
|
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"home-manager": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1720607326,
|
||||||
|
"narHash": "sha256-0Bpp15EMSP+Q/4TyIS/tQnKU5ZjbZGDtxoQFu+ddqCY=",
|
||||||
|
"owner": "exzombie",
|
||||||
|
"repo": "home-manager-smona",
|
||||||
|
"rev": "ff5bf3f36ebd59dec42b00dad40e195ae8818ee4",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "exzombie",
|
||||||
|
"ref": "nixgl-compat",
|
||||||
|
"repo": "home-manager-smona",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixGL": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils_2",
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1713543440,
|
||||||
|
"narHash": "sha256-lnzZQYG0+EXl/6NkGpyIz+FEOc/DSEG57AP1VsdeNrM=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixGL",
|
||||||
|
"rev": "310f8e49a149e4c9ea52f1adf70cdc768ec53f8a",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixGL",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1660551188,
|
||||||
|
"narHash": "sha256-a1LARMMYQ8DPx1BgoI/UN4bXe12hhZkCNqdxNi6uS0g=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "441dc5d512153039f19ef198e662e4f3dbb9fd65",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1724242322,
|
||||||
|
"narHash": "sha256-HMpK7hNjhEk4z5SFg5UtxEio9OWFocHdaQzCfW1pE7w=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "224042e9a3039291f22f4f2ded12af95a616cca0",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"id": "nixpkgs",
|
||||||
|
"ref": "nixos-24.05",
|
||||||
|
"type": "indirect"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
|
"home-manager": "home-manager",
|
||||||
|
"nixGL": "nixGL",
|
||||||
|
"nixpkgs": "nixpkgs_2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
19
flake.nix
Normal file
19
flake.nix
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
{
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "nixpkgs/nixos-24.05";
|
||||||
|
|
||||||
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
|
|
||||||
|
home-manager = {
|
||||||
|
url = "github:exzombie/home-manager-smona/nixgl-compat";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
|
nixGL.url = "github:nix-community/nixGL";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { nixpkgs, ... } @ inputs:
|
||||||
|
(import ./modules/hosts.nix inputs) // {
|
||||||
|
# TODO devshell config
|
||||||
|
};
|
||||||
|
}
|
12
justfile
Normal file
12
justfile
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
user := `whoami`
|
||||||
|
hostname := `hostname`
|
||||||
|
hm_flags := "--flake .#" + user + "@" + hostname
|
||||||
|
|
||||||
|
alias b := build
|
||||||
|
alias inst := install
|
||||||
|
|
||||||
|
build:
|
||||||
|
home-manager build {{hm_flags}}
|
||||||
|
|
||||||
|
install:
|
||||||
|
home-manager switch {{hm_flags}}
|
14
modules/common.nix
Normal file
14
modules/common.nix
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
{ config, lib, pkgs, ... }: {
|
||||||
|
home = {
|
||||||
|
stateVersion = "24.05";
|
||||||
|
|
||||||
|
username = "goose";
|
||||||
|
homeDirectory = "/home/goose";
|
||||||
|
|
||||||
|
packages = with pkgs; [
|
||||||
|
# fira-mono
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# programs.home-manager.enable = true;
|
||||||
|
}
|
24
modules/hosts.nix
Normal file
24
modules/hosts.nix
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
{ nixpkgs, flake-utils, home-manager, nixGL, ... } @ inputs:
|
||||||
|
let
|
||||||
|
getNixOsPkgs = system: import nixpkgs { inherit system; };
|
||||||
|
getPkgs = system: import nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
overlays = [ nixGL.overlay ];
|
||||||
|
};
|
||||||
|
|
||||||
|
makeHostSystem = pkgs: modules: home-manager.lib.homeManagerConfiguration {
|
||||||
|
inherit pkgs;
|
||||||
|
modules = [ ./common.nix ] ++ modules;
|
||||||
|
extraSpecialArgs = {
|
||||||
|
inherit inputs;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
packages.x86_64-linux.homeConfigurations = let
|
||||||
|
pkgs = getPkgs "x86_64-linux";
|
||||||
|
makeHost = makeHostSystem pkgs;
|
||||||
|
in {
|
||||||
|
"goose@adventurer" = makeHost [ /*./hosts/adventurer.nix*/ ];
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue